17 INLINE
bool FrameBufferProperties::
19 return !operator == (other);
25 INLINE
bool FrameBufferProperties::
26 is_single_buffered()
const {
27 return (_property[FBP_back_buffers] == 0);
33 INLINE
bool FrameBufferProperties::
35 return (_flags & FBF_stereo) != 0;
50 INLINE
int FrameBufferProperties::
51 get_depth_bits()
const {
52 return _property[FBP_depth_bits];
58 INLINE
int FrameBufferProperties::
59 get_color_bits()
const {
60 return std::max(_property[FBP_color_bits],
61 _property[FBP_red_bits] +
62 _property[FBP_green_bits] +
63 _property[FBP_blue_bits]);
69 INLINE
int FrameBufferProperties::
70 get_red_bits()
const {
71 return _property[FBP_red_bits];
77 INLINE
int FrameBufferProperties::
78 get_green_bits()
const {
79 return _property[FBP_green_bits];
85 INLINE
int FrameBufferProperties::
86 get_blue_bits()
const {
87 return _property[FBP_blue_bits];
93 INLINE
int FrameBufferProperties::
94 get_alpha_bits()
const {
95 return _property[FBP_alpha_bits];
101 INLINE
int FrameBufferProperties::
102 get_stencil_bits()
const {
103 return _property[FBP_stencil_bits];
109 INLINE
int FrameBufferProperties::
110 get_accum_bits()
const {
111 return _property[FBP_accum_bits];
117 INLINE
int FrameBufferProperties::
118 get_aux_rgba()
const {
119 return _property[FBP_aux_rgba];
125 INLINE
int FrameBufferProperties::
126 get_aux_hrgba()
const {
127 return _property[FBP_aux_hrgba];
133 INLINE
int FrameBufferProperties::
134 get_aux_float()
const {
135 return _property[FBP_aux_float];
141 INLINE
int FrameBufferProperties::
142 get_multisamples()
const {
143 return _property[FBP_multisamples];
150 INLINE
int FrameBufferProperties::
151 get_coverage_samples()
const {
152 return _property[FBP_coverage_samples];
158 INLINE
int FrameBufferProperties::
159 get_back_buffers()
const {
160 return _property[FBP_back_buffers];
166 INLINE
bool FrameBufferProperties::
167 get_indexed_color()
const {
168 return (_flags & FBF_indexed_color) != 0;
174 INLINE
bool FrameBufferProperties::
175 get_rgb_color()
const {
176 return (_flags & FBF_rgb_color) != 0;
182 INLINE
bool FrameBufferProperties::
184 return (_flags & FBF_stereo) != 0;
190 INLINE
bool FrameBufferProperties::
191 get_force_hardware()
const {
192 return (_flags & FBF_force_hardware) != 0;
198 INLINE
bool FrameBufferProperties::
199 get_force_software()
const {
200 return (_flags & FBF_force_software) != 0;
206 INLINE
bool FrameBufferProperties::
207 get_srgb_color()
const {
208 return (_flags & FBF_srgb_color) != 0;
214 INLINE
bool FrameBufferProperties::
215 get_float_color()
const {
216 return (_flags & FBF_float_color) != 0;
222 INLINE
bool FrameBufferProperties::
223 get_float_depth()
const {
224 return (_flags & FBF_float_depth) != 0;
230 INLINE
void FrameBufferProperties::
231 set_depth_bits(
int n) {
232 _property[FBP_depth_bits] = n;
233 _specified |= (1 << FBP_depth_bits);
246 _property[FBP_color_bits] = n;
247 _specified |= (1 << FBP_color_bits);
256 _property[FBP_red_bits] = r;
257 _property[FBP_green_bits] = g;
258 _property[FBP_blue_bits] = b;
259 _property[FBP_alpha_bits] = a;
260 _property[FBP_color_bits] = r + g + b;
261 _specified |= (1 << FBP_color_bits) | (1 << FBP_red_bits) |
262 (1 << FBP_green_bits) | (1 << FBP_blue_bits) |
263 (1 << FBP_alpha_bits);
269 INLINE
void FrameBufferProperties::
270 set_red_bits(
int n) {
271 _property[FBP_red_bits] = n;
272 _specified |= (1 << FBP_red_bits);
278 INLINE
void FrameBufferProperties::
279 set_green_bits(
int n) {
280 _property[FBP_green_bits] = n;
281 _specified |= (1 << FBP_green_bits);
287 INLINE
void FrameBufferProperties::
288 set_blue_bits(
int n) {
289 _property[FBP_blue_bits] = n;
290 _specified |= (1 << FBP_blue_bits);
296 INLINE
void FrameBufferProperties::
297 set_alpha_bits(
int n) {
298 _property[FBP_alpha_bits] = n;
299 _specified |= (1 << FBP_alpha_bits);
305 INLINE
void FrameBufferProperties::
306 set_stencil_bits(
int n) {
307 _property[FBP_stencil_bits] = n;
308 _specified |= (1 << FBP_stencil_bits);
314 INLINE
void FrameBufferProperties::
315 set_accum_bits(
int n) {
316 _property[FBP_accum_bits] = n;
317 _specified |= (1 << FBP_accum_bits);
323 INLINE
void FrameBufferProperties::
324 set_aux_rgba(
int n) {
326 _property[FBP_aux_rgba] = n;
327 _specified |= (1 << FBP_aux_rgba);
333 INLINE
void FrameBufferProperties::
334 set_aux_hrgba(
int n) {
336 _property[FBP_aux_hrgba] = n;
337 _specified |= (1 << FBP_aux_hrgba);
343 INLINE
void FrameBufferProperties::
344 set_aux_float(
int n) {
346 _property[FBP_aux_float] = n;
347 _specified |= (1 << FBP_aux_float);
353 INLINE
void FrameBufferProperties::
354 set_multisamples(
int n) {
355 _property[FBP_multisamples] = n;
356 _specified |= (1 << FBP_multisamples);
365 _property[FBP_coverage_samples] = n;
366 _specified |= (1 << FBP_coverage_samples);
372 INLINE
void FrameBufferProperties::
373 set_back_buffers(
int n) {
374 _property[FBP_back_buffers] = n;
375 _specified |= (1 << FBP_back_buffers);
381 INLINE
void FrameBufferProperties::
382 set_indexed_color(
bool n) {
384 _flags |= FBF_indexed_color;
386 _flags &= ~FBF_indexed_color;
388 _flags_specified |= FBF_indexed_color;
394 INLINE
void FrameBufferProperties::
395 set_rgb_color(
bool n) {
397 _flags |= FBF_rgb_color;
399 _flags &= ~FBF_rgb_color;
401 _flags_specified |= FBF_rgb_color;
407 INLINE
void FrameBufferProperties::
410 _flags |= FBF_stereo;
412 _flags &= ~FBF_stereo;
414 _flags_specified |= FBF_stereo;
420 INLINE
void FrameBufferProperties::
421 set_force_hardware(
bool n) {
423 _flags |= FBF_force_hardware;
425 _flags &= ~FBF_force_hardware;
427 _flags_specified |= FBF_force_hardware;
433 INLINE
void FrameBufferProperties::
434 set_force_software(
bool n) {
436 _flags |= FBF_force_software;
438 _flags &= ~FBF_force_software;
440 _flags_specified |= FBF_force_software;
446 INLINE
void FrameBufferProperties::
447 set_srgb_color(
bool n) {
449 _flags |= FBF_srgb_color;
451 _flags &= ~FBF_srgb_color;
453 _flags_specified |= FBF_srgb_color;
459 INLINE
void FrameBufferProperties::
460 set_float_color(
bool n) {
462 _flags |= FBF_float_color;
464 _flags &= ~FBF_float_color;
466 _flags_specified |= FBF_float_color;
472 INLINE
void FrameBufferProperties::
473 set_float_depth(
bool n) {
475 _flags |= FBF_float_depth;
477 _flags &= ~FBF_float_depth;
479 _flags_specified |= FBF_float_depth;
void output(std::ostream &out) const
Generates a string representation.
set_color_bits
Sets the number of requested color bits as a single number that represents the sum of the individual ...
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.
set_coverage_samples
If coverage samples are specified, and there is hardware support, we use coverage multisampling.
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...