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