24 const LVecBase4 &dimensions,
32 set_stereo_channel(Lens::SC_stereo);
40 ~StereoDisplayRegion() {
56 _right_eye->set_clear_active(n, clear_active);
66 _left_eye->set_clear_value(n, clear_value);
67 _right_eye->set_clear_value(n, clear_value);
77 _left_eye->disable_clears();
78 _right_eye->disable_clears();
87 _left_eye->set_pixel_zoom(pixel_zoom);
88 _right_eye->set_pixel_zoom(pixel_zoom);
97 _left_eye->set_dimensions(i, dimensions);
98 _right_eye->set_dimensions(i, dimensions);
115 _left_eye->set_camera(camera);
116 _right_eye->set_camera(camera);
126 _left_eye->set_active(active);
127 _right_eye->set_active(active);
142 _left_eye->set_sort(sort + 1);
143 _right_eye->set_sort(sort + 2);
174 switch (stereo_channel) {
175 case Lens::SC_stereo:
176 _left_eye->set_stereo_channel(Lens::SC_left);
177 _left_eye->set_active(
true);
178 _right_eye->set_stereo_channel(Lens::SC_right);
179 _right_eye->set_active(
true);
183 _left_eye->set_stereo_channel(Lens::SC_left);
184 _left_eye->set_active(
true);
185 _right_eye->set_active(
false);
189 _left_eye->set_active(
false);
190 _right_eye->set_stereo_channel(Lens::SC_right);
191 _right_eye->set_active(
true);
195 _left_eye->set_stereo_channel(Lens::SC_mono);
196 _left_eye->set_active(
true);
197 _right_eye->set_active(
false);
214 _left_eye->set_tex_view_offset(tex_view_offset);
215 _right_eye->set_tex_view_offset(tex_view_offset + 1);
225 _left_eye->set_incomplete_render(incomplete_render);
226 _right_eye->set_incomplete_render(incomplete_render);
236 _left_eye->set_texture_reload_priority(texture_reload_priority);
237 _right_eye->set_texture_reload_priority(texture_reload_priority);
246 _left_eye->set_cull_traverser(trav);
247 _right_eye->set_cull_traverser(trav);
257 _left_eye->set_target_tex_page(page);
258 _right_eye->set_target_tex_page(page);
264 void StereoDisplayRegion::
265 output(std::ostream &out)
const {
266 out <<
"StereoDisplayRegion(" << *_left_eye <<
")";
274 make_cull_result_graph() {
277 PT(
PandaNode) left = _left_eye->make_cull_result_graph();
278 left->set_name(
"left");
279 root->add_child(left, _left_eye->
get_sort());
281 PT(
PandaNode) right = _right_eye->make_cull_result_graph();
282 right->set_name(
"right");
283 root->add_child(right, _right_eye->
get_sort());
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A basic node of the scene graph or data graph.
virtual void disable_clears()
Disables both the color and depth clear.
set_cull_traverser
Specifies the CullTraverser that will be used to draw the contents of this DisplayRegion.
virtual void set_clear_active(int n, bool clear_aux_active)
Sets the clear-active flag for any bitplane.
virtual void set_tex_view_offset(int tex_view_offset)
Sets the current texture view offset for this DisplayRegion.
virtual void set_texture_reload_priority(int texture_reload_priority)
Sets the texture_reload_priority on both the left and right DisplayRegions to the indicated value.
PT(PandaNode) StereoDisplayRegion
Returns a special scene graph constructed to represent the results of the last frame's cull operation...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool is_stereo() const
Returns true if this is a StereoDisplayRegion, false otherwise.
virtual void set_clear_value(int n, const LColor &clear_value)
Sets the clear value for any bitplane.
set_stereo_channel
Specifies whether the DisplayRegion represents the left or right channel of a stereo pair,...
set_incomplete_render
Sets the incomplete_render flag.
virtual void set_incomplete_render(bool incomplete_render)
Sets the incomplete_render flag on both the left and right DisplayRegions to the indicated value.
virtual void set_active(bool active)
Sets the active flag on both the left and right DisplayRegions to the indicated value.
virtual void set_camera(const NodePath &camera)
Sets both the left and right DisplayRegions to the indicated camera.
virtual void set_stereo_channel(Lens::StereoChannel stereo_channel)
Sets the stereo channels on the left and right eyes, and also sets the active flags independently on ...
set_tex_view_offset
Sets the current texture view offset for this DisplayRegion.
virtual void disable_clears()
Disables both the color and depth clear.
set_texture_reload_priority
Specifies an integer priority which is assigned to any asynchronous texture reload requests spawned w...
virtual void set_dimensions(int i, const LVecBase4 &dimensions)
Sets both the left and right DisplayRegions to the indicated dimensions.
This is a base class for the various different classes that represent the result of a frame of render...
set_target_tex_page
This is a special parameter that is only used when rendering the faces of a cube map or multipage and...
set_camera
Sets the camera that is associated with this DisplayRegion.
set_pixel_zoom
Sets the amount by which the pixels of the region are scaled internally when filling the image intera...
virtual void set_pixel_zoom(PN_stdfloat pixel_zoom)
Sets the pixel_zoom for left and right eyes.
virtual void set_target_tex_page(int page)
Sets the page and view on both the left and right DisplayRegions to the indicated value.
get_window
Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no windo...
virtual void set_sort(int sort)
Sets the indicated sort value on the overall DisplayRegion, the indicated sort value + 1 on the left ...
get_stereo_channel
Returns whether the DisplayRegion is specified as the left or right channel of a stereo pair,...
A rectangular subregion within a window for rendering into.
set_active
Sets the active flag associated with the DisplayRegion.
virtual void set_cull_traverser(CullTraverser *trav)
Sets the CullTraverser for both the left and right DisplayRegions.
get_sort
Returns the sort value associated with the DisplayRegion.
TypeHandle is the identifier used to differentiate C++ class types.
set_dimensions
Changes the portion of the framebuffer this DisplayRegion corresponds to.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
set_sort
Sets the sort value associated with the DisplayRegion.
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
virtual void set_clear_active(int n, bool clear_aux_active)
Sets the clear-active flag for any bitplane.
is_active
Returns the active flag associated with the DisplayRegion.
virtual void set_clear_value(int n, const LColor &clear_value)
Sets the clear value for any bitplane.