30 nassertv(n >= 0 && n < RTP_COUNT);
32 _clear_mask |= 1 << n;
34 _clear_mask &= ~(1 << n);
36 update_pixel_factor();
44 nassertr(n >= 0 && n < RTP_COUNT,
false);
45 return (_clear_mask & (1 << n)) != 0;
53 nassertv((n >= 0) && (n < RTP_COUNT));
54 _clear_value[n] = clear_value;
62 static LColor blank(0.5,0.5,0.5,0.0);
63 nassertr((n >= 0) && (n < RTP_COUNT), blank);
64 return _clear_value[n];
74 update_pixel_factor();
84 return (_clear_mask != 0);
107 _pixel_zoom = pixel_zoom;
108 update_pixel_factor();
132 case RTP_stencil:
return RenderBuffer::T_stencil;
133 case RTP_depth:
return RenderBuffer::T_depth;
134 case RTP_depth_stencil:
return RenderBuffer::T_depth | RenderBuffer::T_stencil;
135 case RTP_color:
return RenderBuffer::T_color;
136 case RTP_aux_rgba_0:
return RenderBuffer::T_aux_rgba_0;
137 case RTP_aux_rgba_1:
return RenderBuffer::T_aux_rgba_1;
138 case RTP_aux_rgba_2:
return RenderBuffer::T_aux_rgba_2;
139 case RTP_aux_rgba_3:
return RenderBuffer::T_aux_rgba_3;
140 case RTP_aux_hrgba_0:
return RenderBuffer::T_aux_hrgba_0;
141 case RTP_aux_hrgba_1:
return RenderBuffer::T_aux_hrgba_1;
142 case RTP_aux_hrgba_2:
return RenderBuffer::T_aux_hrgba_2;
143 case RTP_aux_hrgba_3:
return RenderBuffer::T_aux_hrgba_3;
144 case RTP_aux_float_0:
return RenderBuffer::T_aux_float_0;
145 case RTP_aux_float_1:
return RenderBuffer::T_aux_float_1;
146 case RTP_aux_float_2:
return RenderBuffer::T_aux_float_2;
147 case RTP_aux_float_3:
return RenderBuffer::T_aux_float_3;
149 display_cat.error() <<
"DrawableRegion::get_renderbuffer_type unexpected case!\n";
157 void DrawableRegion::
158 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 get_clear_active(int n) const
Gets the clear-active flag for any bitplane.
virtual void set_clear_value(int n, const LColor &clear_value)
Sets the clear value for any bitplane.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void disable_clears()
Disables both the color and depth clear.
virtual const LColor & get_clear_value(int n) const
Returns the clear value for any bitplane.
virtual bool supports_pixel_zoom() const
Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored.
set_pixel_zoom
Sets the amount by which the pixels of the region are scaled internally when filling the image intera...
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,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.