15 #include "drawableRegion.h"
16 #include "config_display.h"
35 nassertv((n >= 0)&&(n < RTP_COUNT));
36 _clear_active[n] = clear_active;
37 update_pixel_factor();
47 nassertr((n >= 0)&&(n < RTP_COUNT),
false);
48 return _clear_active[n];
58 nassertv((n >= 0) && (n < RTP_COUNT));
59 _clear_value[n] = clear_value;
69 static LColor blank(0.5,0.5,0.5,0.0);
70 nassertr((n >= 0) && (n < RTP_COUNT), blank);
71 return _clear_value[n];
82 for (
int i = 0; i < RTP_COUNT; ++i) {
83 _clear_active[i] =
false;
85 update_pixel_factor();
98 for (
int i = 0; i < RTP_COUNT; ++i) {
134 _pixel_zoom = pixel_zoom;
135 update_pixel_factor();
166 case RTP_stencil:
return RenderBuffer::T_stencil;
167 case RTP_depth:
return RenderBuffer::T_depth;
168 case RTP_depth_stencil:
return RenderBuffer::T_depth | RenderBuffer::T_stencil;
169 case RTP_color:
return RenderBuffer::T_color;
170 case RTP_aux_rgba_0:
return RenderBuffer::T_aux_rgba_0;
171 case RTP_aux_rgba_1:
return RenderBuffer::T_aux_rgba_1;
172 case RTP_aux_rgba_2:
return RenderBuffer::T_aux_rgba_2;
173 case RTP_aux_rgba_3:
return RenderBuffer::T_aux_rgba_3;
174 case RTP_aux_hrgba_0:
return RenderBuffer::T_aux_hrgba_0;
175 case RTP_aux_hrgba_1:
return RenderBuffer::T_aux_hrgba_1;
176 case RTP_aux_hrgba_2:
return RenderBuffer::T_aux_hrgba_2;
177 case RTP_aux_hrgba_3:
return RenderBuffer::T_aux_hrgba_3;
178 case RTP_aux_float_0:
return RenderBuffer::T_aux_float_0;
179 case RTP_aux_float_1:
return RenderBuffer::T_aux_float_1;
180 case RTP_aux_float_2:
return RenderBuffer::T_aux_float_2;
181 case RTP_aux_float_3:
return RenderBuffer::T_aux_float_3;
183 display_cat.error() <<
"DrawableRegion::get_renderbuffer_type unexpected case!\n";
193 void DrawableRegion::
194 pixel_factor_changed() {
static int get_renderbuffer_type(int plane)
Returns the RenderBuffer::Type that corresponds to a RenderTexturePlane.
virtual void set_clear_active(int n, bool clear_aux_active)
Sets the clear-active flag for any bitplane.
virtual bool is_any_clear_active() const
Returns true if any of the clear types (so far there are just color or depth) have been set active...
virtual const LColor & get_clear_value(int n) const
Returns the clear value for any bitplane.
virtual void set_clear_value(int n, const LColor &clear_value)
Sets the clear value for any bitplane.
virtual void disable_clears()
Disables both the color and depth clear.
virtual bool supports_pixel_zoom() const
Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored...
This is the base class for all three-component vectors and points.
virtual bool get_clear_active(int n) const
Gets the clear-active flag for any bitplane.
virtual void set_pixel_zoom(PN_stdfloat pixel_zoom)
Sets the amount by which the pixels of the region are scaled internally when filling the image intera...