14 #ifndef FRAMEBUFFERPROPERTIES_H 15 #define FRAMEBUFFERPROPERTIES_H 29 enum FrameBufferProperty {
54 enum FrameBufferFlag {
55 FBF_indexed_color = 0x001,
56 FBF_rgb_color = 0x002,
58 FBF_force_hardware = 0x008,
59 FBF_force_software = 0x010,
60 FBF_srgb_color = 0x020,
61 FBF_float_color = 0x040,
62 FBF_float_depth = 0x080,
66 int _property[FBP_COUNT] = {0};
70 int _flags_specified = 0;
75 INLINE
int get_depth_bits()
const;
76 INLINE
int get_color_bits()
const;
77 INLINE
int get_red_bits()
const;
78 INLINE
int get_green_bits()
const;
79 INLINE
int get_blue_bits()
const;
80 INLINE
int get_alpha_bits()
const;
81 INLINE
int get_stencil_bits()
const;
82 INLINE
int get_accum_bits()
const;
83 INLINE
int get_aux_rgba()
const;
84 INLINE
int get_aux_hrgba()
const;
85 INLINE
int get_aux_float()
const;
86 INLINE
int get_multisamples()
const;
87 INLINE
int get_coverage_samples()
const;
88 INLINE
int get_back_buffers()
const;
89 INLINE
bool get_indexed_color()
const;
90 INLINE
bool get_rgb_color()
const;
91 INLINE
bool get_stereo()
const;
92 INLINE
bool get_force_hardware()
const;
93 INLINE
bool get_force_software()
const;
94 INLINE
bool get_srgb_color()
const;
95 INLINE
bool get_float_color()
const;
96 INLINE
bool get_float_depth()
const;
99 INLINE
void set_depth_bits(
int n);
100 INLINE
void set_color_bits(
int n);
101 INLINE
void set_rgba_bits(
int r,
int g,
int b,
int a);
102 INLINE
void set_red_bits(
int n);
103 INLINE
void set_green_bits(
int n);
104 INLINE
void set_blue_bits(
int n);
105 INLINE
void set_alpha_bits(
int n);
106 INLINE
void set_stencil_bits(
int n);
107 INLINE
void set_accum_bits(
int n);
108 INLINE
void set_aux_rgba(
int n);
109 INLINE
void set_aux_hrgba(
int n);
110 INLINE
void set_aux_float(
int n);
111 INLINE
void set_multisamples(
int n);
112 INLINE
void set_coverage_samples(
int n);
113 INLINE
void set_back_buffers(
int n);
114 INLINE
void set_indexed_color(
bool n);
115 INLINE
void set_rgb_color(
bool n);
116 INLINE
void set_stereo(
bool n);
117 INLINE
void set_force_hardware(
bool n);
118 INLINE
void set_force_software(
bool n);
119 INLINE
void set_srgb_color(
bool n);
120 INLINE
void set_float_color(
bool n);
121 INLINE
void set_float_depth(
bool n);
123 MAKE_PROPERTY(depth_bits, get_depth_bits, set_depth_bits);
124 MAKE_PROPERTY(color_bits, get_color_bits, set_color_bits);
125 MAKE_PROPERTY(red_bits, get_red_bits, set_red_bits);
126 MAKE_PROPERTY(green_bits, get_green_bits, set_green_bits);
127 MAKE_PROPERTY(blue_bits, get_blue_bits, set_blue_bits);
128 MAKE_PROPERTY(alpha_bits, get_alpha_bits, set_alpha_bits);
129 MAKE_PROPERTY(stencil_bits, get_stencil_bits, set_stencil_bits);
130 MAKE_PROPERTY(accum_bits, get_accum_bits, set_accum_bits);
131 MAKE_PROPERTY(aux_rgba, get_aux_rgba, set_aux_rgba);
132 MAKE_PROPERTY(aux_hrgba, get_aux_hrgba, set_aux_hrgba);
133 MAKE_PROPERTY(aux_float, get_aux_float, set_aux_float);
134 MAKE_PROPERTY(multisamples, get_multisamples, set_multisamples);
135 MAKE_PROPERTY(coverage_samples, get_coverage_samples, set_coverage_samples);
136 MAKE_PROPERTY(back_buffers, get_back_buffers, set_back_buffers);
137 MAKE_PROPERTY(indexed_color, get_indexed_color, set_indexed_color);
138 MAKE_PROPERTY(rgb_color, get_rgb_color, set_rgb_color);
139 MAKE_PROPERTY(stereo, get_stereo, set_stereo);
140 MAKE_PROPERTY(force_hardware, get_force_hardware, set_force_hardware);
141 MAKE_PROPERTY(force_software, get_force_software, set_force_software);
142 MAKE_PROPERTY(srgb_color, get_srgb_color, set_srgb_color);
143 MAKE_PROPERTY(float_color, get_float_color, set_float_color);
144 MAKE_PROPERTY(float_depth, get_float_depth, set_float_depth);
155 void set_all_specified();
158 void output(std::ostream &out)
const;
159 void set_one_bit_per_channel();
161 INLINE
bool is_stereo()
const;
162 INLINE
bool is_single_buffered()
const;
164 bool is_any_specified()
const;
165 bool is_basic()
const;
166 int get_aux_mask()
const;
167 int get_buffer_mask()
const;
168 bool verify_hardware_software(
const FrameBufferProperties &props,
const std::string &renderer)
const;
170 bool setup_color_texture(
Texture *tex)
const;
171 bool setup_depth_texture(
Texture *tex)
const;
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...