21 INLINE FrameBufferProperties::
31 INLINE FrameBufferProperties::
32 ~FrameBufferProperties() {
40 INLINE
bool FrameBufferProperties::
42 return !operator == (other);
50 INLINE
bool FrameBufferProperties::
51 is_single_buffered()
const {
52 return (_property[FBP_back_buffers] == 0);
60 INLINE
bool FrameBufferProperties::
62 return (_flags & FBF_stereo) != 0;
81 INLINE
int FrameBufferProperties::
82 get_depth_bits()
const {
83 return _property[FBP_depth_bits];
91 INLINE
int FrameBufferProperties::
92 get_color_bits()
const {
93 return max(_property[FBP_color_bits],
94 _property[FBP_red_bits] +
95 _property[FBP_green_bits] +
96 _property[FBP_blue_bits]);
104 INLINE
int FrameBufferProperties::
105 get_red_bits()
const {
106 return _property[FBP_red_bits];
114 INLINE
int FrameBufferProperties::
115 get_green_bits()
const {
116 return _property[FBP_green_bits];
124 INLINE
int FrameBufferProperties::
125 get_blue_bits()
const {
126 return _property[FBP_blue_bits];
134 INLINE
int FrameBufferProperties::
135 get_alpha_bits()
const {
136 return _property[FBP_alpha_bits];
144 INLINE
int FrameBufferProperties::
145 get_stencil_bits()
const {
146 return _property[FBP_stencil_bits];
154 INLINE
int FrameBufferProperties::
155 get_accum_bits()
const {
156 return _property[FBP_accum_bits];
164 INLINE
int FrameBufferProperties::
165 get_aux_rgba()
const {
166 return _property[FBP_aux_rgba];
174 INLINE
int FrameBufferProperties::
175 get_aux_hrgba()
const {
176 return _property[FBP_aux_hrgba];
184 INLINE
int FrameBufferProperties::
185 get_aux_float()
const {
186 return _property[FBP_aux_float];
194 INLINE
int FrameBufferProperties::
195 get_multisamples()
const {
196 return _property[FBP_multisamples];
207 return _property[FBP_coverage_samples];
215 INLINE
int FrameBufferProperties::
216 get_back_buffers()
const {
217 return _property[FBP_back_buffers];
225 INLINE
bool FrameBufferProperties::
226 get_indexed_color()
const {
227 return (_flags & FBF_indexed_color) != 0;
235 INLINE
bool FrameBufferProperties::
236 get_rgb_color()
const {
237 return (_flags & FBF_rgb_color) != 0;
245 INLINE
bool FrameBufferProperties::
247 return (_flags & FBF_stereo) != 0;
255 INLINE
bool FrameBufferProperties::
256 get_force_hardware()
const {
257 return (_flags & FBF_force_hardware) != 0;
265 INLINE
bool FrameBufferProperties::
266 get_force_software()
const {
267 return (_flags & FBF_force_software) != 0;
275 INLINE
bool FrameBufferProperties::
276 get_srgb_color()
const {
277 return (_flags & FBF_srgb_color) != 0;
285 INLINE
bool FrameBufferProperties::
286 get_float_color()
const {
287 return (_flags & FBF_float_color) != 0;
295 INLINE
bool FrameBufferProperties::
296 get_float_depth()
const {
297 return (_flags & FBF_float_depth) != 0;
305 INLINE
void FrameBufferProperties::
306 set_depth_bits(
int n) {
307 _property[FBP_depth_bits] = n;
308 _specified |= (1 << FBP_depth_bits);
324 _property[FBP_color_bits] = n;
325 _specified |= (1 << FBP_color_bits);
336 _property[FBP_red_bits] = r;
337 _property[FBP_green_bits] = g;
338 _property[FBP_blue_bits] = b;
339 _property[FBP_alpha_bits] = a;
340 _property[FBP_color_bits] = r + g + b;
341 _specified |= (1 << FBP_color_bits) | (1 << FBP_red_bits) |
342 (1 << FBP_green_bits) | (1 << FBP_blue_bits) |
343 (1 << FBP_alpha_bits);
351 INLINE
void FrameBufferProperties::
352 set_red_bits(
int n) {
353 _property[FBP_red_bits] = n;
354 _specified |= (1 << FBP_red_bits);
362 INLINE
void FrameBufferProperties::
363 set_green_bits(
int n) {
364 _property[FBP_green_bits] = n;
365 _specified |= (1 << FBP_green_bits);
373 INLINE
void FrameBufferProperties::
374 set_blue_bits(
int n) {
375 _property[FBP_blue_bits] = n;
376 _specified |= (1 << FBP_blue_bits);
384 INLINE
void FrameBufferProperties::
385 set_alpha_bits(
int n) {
386 _property[FBP_alpha_bits] = n;
387 _specified |= (1 << FBP_alpha_bits);
395 INLINE
void FrameBufferProperties::
396 set_stencil_bits(
int n) {
397 _property[FBP_stencil_bits] = n;
398 _specified |= (1 << FBP_stencil_bits);
406 INLINE
void FrameBufferProperties::
407 set_accum_bits(
int n) {
408 _property[FBP_accum_bits] = n;
409 _specified |= (1 << FBP_accum_bits);
417 INLINE
void FrameBufferProperties::
418 set_aux_rgba(
int n) {
420 _property[FBP_aux_rgba] = n;
421 _specified |= (1 << FBP_aux_rgba);
429 INLINE
void FrameBufferProperties::
430 set_aux_hrgba(
int n) {
432 _property[FBP_aux_hrgba] = n;
433 _specified |= (1 << FBP_aux_hrgba);
441 INLINE
void FrameBufferProperties::
442 set_aux_float(
int n) {
444 _property[FBP_aux_float] = n;
445 _specified |= (1 << FBP_aux_float);
453 INLINE
void FrameBufferProperties::
454 set_multisamples(
int n) {
455 _property[FBP_multisamples] = n;
456 _specified |= (1 << FBP_multisamples);
467 _property[FBP_coverage_samples] = n;
468 _specified |= (1 << FBP_coverage_samples);
476 INLINE
void FrameBufferProperties::
477 set_back_buffers(
int n) {
478 _property[FBP_back_buffers] = n;
479 _specified |= (1 << FBP_back_buffers);
487 INLINE
void FrameBufferProperties::
488 set_indexed_color(
bool n) {
490 _flags |= FBF_indexed_color;
492 _flags &= ~FBF_indexed_color;
494 _flags_specified |= FBF_indexed_color;
502 INLINE
void FrameBufferProperties::
503 set_rgb_color(
bool n) {
505 _flags |= FBF_rgb_color;
507 _flags &= ~FBF_rgb_color;
509 _flags_specified |= FBF_rgb_color;
517 INLINE
void FrameBufferProperties::
520 _flags |= FBF_stereo;
522 _flags &= ~FBF_stereo;
524 _flags_specified |= FBF_stereo;
532 INLINE
void FrameBufferProperties::
533 set_force_hardware(
bool n) {
535 _flags |= FBF_force_hardware;
537 _flags &= ~FBF_force_hardware;
539 _flags_specified |= FBF_force_hardware;
547 INLINE
void FrameBufferProperties::
548 set_force_software(
bool n) {
550 _flags |= FBF_force_software;
552 _flags &= ~FBF_force_software;
554 _flags_specified |= FBF_force_software;
562 INLINE
void FrameBufferProperties::
563 set_srgb_color(
bool n) {
565 _flags |= FBF_srgb_color;
567 _flags &= ~FBF_srgb_color;
569 _flags_specified |= FBF_srgb_color;
577 INLINE
void FrameBufferProperties::
578 set_float_color(
bool n) {
580 _flags |= FBF_float_color;
582 _flags &= ~FBF_float_color;
584 _flags_specified |= FBF_float_color;
592 INLINE
void FrameBufferProperties::
593 set_float_depth(
bool n) {
595 _flags |= FBF_float_depth;
597 _flags &= ~FBF_float_depth;
599 _flags_specified |= FBF_float_depth;
void output(ostream &out) const
Generates a string representation.
void set_coverage_samples(int n)
If coverage samples are specified, and there is hardware support, we use coverage multisampling...
int get_coverage_samples() const
If coverage samples are specified, and there is hardware support, we use coverage multisampling...
void set_rgba_bits(int r, int g, int b, int a)
Convenience method for setting the red, green, blue and alpha bits in one go.
void set_color_bits(int n)
Sets the number of requested color bits as a single number that represents the sum of the individual ...
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...