Panda3D
Public Types | Public Member Functions | Static Public Member Functions

StereoDisplayRegion Class Reference

This is a special DisplayRegion wrapper that actually includes a pair of DisplayRegions internally: the left and right eyes. More...

Inheritance diagram for StereoDisplayRegion:
DisplayRegion DisplayRegionBase DrawableRegion TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Types

enum  RenderTexturePlane {
  RTPStencil = 0, RTPDepthStencil = 1, RTPColor = 2, RTPAuxRgba0 = 3,
  RTPAuxRgba1 = 4, RTPAuxRgba2 = 5, RTPAuxRgba3 = 6, RTPAuxHrgba0 = 7,
  RTPAuxHrgba1 = 8, RTPAuxHrgba2 = 9, RTPAuxHrgba3 = 10, RTPAuxFloat0 = 11,
  RTPAuxFloat1 = 12, RTPAuxFloat2 = 13, RTPAuxFloat3 = 14, RTPDepth = 15,
  RTPCOUNT = 16
}

Public Member Functions

 clearCullCallback ()
 Removes the callback set by an earlier call to set_cull_callback().
 clearDrawCallback ()
 Removes the callback set by an earlier call to set_draw_callback().
 disableClears ()
 Disables both the color and depth clear.
float getBottom ()
 Retrieves the y coordinate of the bottom edge of the rectangle within its GraphicsOutput.
NodePath getCamera ()
 Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associated.
NodePath getCamera (Thread current_thread)
 Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associated.
bool getClearActive (int n)
 Gets the clear-active flag for any bitplane.
VBase4 const getClearColor ()
 Returns the current clear color value.
bool getClearColorActive ()
 Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.
float getClearDepth ()
 Returns the current clear depth value.
bool getClearDepthActive ()
 Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame.
unsigned int getClearStencil ()
 Returns the current clear stencil value.
bool getClearStencilActive ()
 Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.
VBase4 const getClearValue (int n)
 Returns the clear value for any bitplane.
int getCubeMapIndex ()
 Returns the cube map face index associated with this particular DisplayRegion, or -1 if it is not associated with a cube map.
CallbackObject getCullCallback ()
 Returns the CallbackObject set by set_cull_callback().
CullTraverser getCullTraverser ()
 Returns the CullTraverser that will be used to draw the contents of this DisplayRegion.
CallbackObject getDrawCallback ()
 Returns the CallbackObject set by set_draw_callback().
bool getIncompleteRender ()
 Returns the incomplete_render flag.
float getLeft ()
 Retrieves the x coordinate of the left edge of the rectangle within its GraphicsOutput.
DisplayRegion getLeftEye ()
 Returns a pointer to the left DisplayRegion managed by this stereo object.
int getLensIndex ()
 Returns the specific lens of the associated Camera that will be used for rendering this scene.
GraphicsPipe getPipe ()
 Returns the GraphicsPipe that this DisplayRegion is ultimately associated with, or NULL if no pipe is associated.
float getPixelFactor ()
 Returns the amount by which the height and width of the region will be scaled internally, based on the zoom factor set by set_pixel_zoom().
int getPixelHeight ()
 Returns the height of the DisplayRegion in pixels.
int getPixelWidth ()
 Returns the width of the DisplayRegion in pixels.
float getPixelZoom ()
 Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not.
int getRefCount ()
 Returns the current reference count.
float getRight ()
 Retrieves the x coordinate of the right edge of the rectangle within its GraphicsOutput.
DisplayRegion getRightEye ()
 Returns a pointer to the right DisplayRegion managed by this stereo object.
bool getScreenshot (PNMImage image)
 Captures the most-recently rendered image from the framebuffer into the indicated PNMImage.
int getSort ()
 Returns the sort value associated with the DisplayRegion.
StereoChannel getStereoChannel ()
 Returns whether the DisplayRegion is specified as the left or right channel of a stereo pair, or whether it is a normal, monocular image.
int getTextureReloadPriority ()
 Returns the priority which is assigned to asynchronous texture reload requests.
float getTop ()
 Retrieves the y coordinate of the top edge of the rectangle within its GraphicsOutput.
TypeHandle getType ()
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
GraphicsOutput getWindow ()
 Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no window is associated.
bool isActive ()
 Returns the active flag associated with the DisplayRegion.
bool isAnyClearActive ()
 Returns true if any of the clear types (so far there are just color or depth) have been set active, or false if none of them are active and there is no need to clear.
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly.
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type.
bool isStereo ()
 Returns true if this is a StereoDisplayRegion, false otherwise.
PandaNode makeCullResultGraph ()
 Returns a special scene graph constructed to represent the results of the last frame's cull operation.
 output (ostream out)
 ref ()
 Explicitly increments the reference count.
bool saveScreenshot (Filename const filename, string image_comment)
 Saves a screenshot of the region to the indicated filename.
bool saveScreenshot (Filename const filename)
 Saves a screenshot of the region to the indicated filename.
Filename saveScreenshotDefault (string prefix)
 Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed.
Filename saveScreenshotDefault ()
 Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed.
 setActive (bool active)
 Sets the active flag associated with the DisplayRegion.
 setCamera (NodePath const camera)
 Sets the camera that is associated with this DisplayRegion.
 setClearActive (int n, bool clear_aux_active)
 Sets the clear-active flag for any bitplane.
 setClearColor (VBase4 const color)
 Sets the clear color to the indicated value.
 setClearColorActive (bool clear_color_active)
 Toggles the flag that indicates whether the color buffer should be cleared every frame.
 setClearDepth (float depth)
 Sets the clear depth to the indicated value.
 setClearDepthActive (bool clear_depth_active)
 Toggles the flag that indicates whether the depth buffer should be cleared every frame.
 setClearStencil (unsigned int stencil)
 setClearStencilActive (bool clear_stencil_active)
 Toggles the flag that indicates whether the stencil buffer should be cleared every frame.
 setClearValue (int n, VBase4 const clear_value)
 Sets the clear value for any bitplane.
 setCubeMapIndex (int cube_map_index)
 This is a special parameter that is only used when rendering the faces of a cube map.
 setCullCallback (CallbackObject object)
 Sets the CallbackObject that will be notified when the DisplayRegion is visited during the cull traversal.
 setCullTraverser (CullTraverser trav)
 Specifies the CullTraverser that will be used to draw the contents of this DisplayRegion.
 setDimensions (float l, float r, float b, float t)
 Changes the portion of the framebuffer this DisplayRegion corresponds to.
 setDrawCallback (CallbackObject object)
 Sets the CallbackObject that will be notified when the contents of DisplayRegion is drawn during the draw traversal.
 setIncompleteRender (bool incomplete_render)
 Sets the incomplete_render flag.
 setLensIndex (int index)
 Sets the lens index, allows for multiple lenses to be attached to a camera.
 setPixelZoom (float pixel_zoom)
 Sets the amount by which the pixels of the region are scaled internally when filling the image interally.
 setSort (int sort)
 Sets the sort value associated with the DisplayRegion.
 setStereoChannel (StereoChannel stereo_channel)
 Specifies whether the DisplayRegion represents the left or right channel of a stereo pair, or whether it is a normal, monocular image.
 setTextureReloadPriority (int texture_reload_priority)
 Specifies an integer priority which is assigned to any asynchronous texture reload requests spawned while processing this DisplayRegion.
bool supportsPixelZoom ()
 Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored.
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus.
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
bool unref ()
 Explicitly decrements the reference count.

Static Public Member Functions

static TypeHandle getClassType ()
static int getRenderbufferType (int plane)
 Returns the RenderBuffer.Type that corresponds to a RenderTexturePlane.
static Filename makeScreenshotFilename ()
 Synthesizes a suitable default filename for passing to save_screenshot().
static Filename makeScreenshotFilename (string prefix)
 Synthesizes a suitable default filename for passing to save_screenshot().

Detailed Description

This is a special DisplayRegion wrapper that actually includes a pair of DisplayRegions internally: the left and right eyes.

The DisplayRegion represented here does not have a physical association with the window, but it pretends it does. Instead, it maintains a pointer to the left and right DisplayRegions separately.

Operations on the StereoDisplayRegion object affect both left and right eyes together. To access the left or right eyes independently, use get_left_eye() and get_right_eye().


Member Enumeration Documentation

enum RenderTexturePlane [inherited]
Enumerator:
RTPStencil 
RTPDepthStencil 
RTPColor 
RTPAuxRgba0 
RTPAuxRgba1 
RTPAuxRgba2 
RTPAuxRgba3 
RTPAuxHrgba0 
RTPAuxHrgba1 
RTPAuxHrgba2 
RTPAuxHrgba3 
RTPAuxFloat0 
RTPAuxFloat1 
RTPAuxFloat2 
RTPAuxFloat3 
RTPDepth 
RTPCOUNT 

Member Function Documentation

clearCullCallback ( ) [inherited]

Removes the callback set by an earlier call to set_cull_callback().

clearDrawCallback ( ) [inherited]

Removes the callback set by an earlier call to set_draw_callback().

disableClears ( ) [inherited]

Disables both the color and depth clear.

See set_clear_color_active and set_clear_depth_active.

float getBottom ( ) [inherited]

Retrieves the y coordinate of the bottom edge of the rectangle within its GraphicsOutput.

This number will be in the range [0..1].

NodePath getCamera ( Thread  current_thread) [inherited]

Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associated.

NodePath getCamera ( ) [inherited]

Returns the camera associated with this DisplayRegion, or an empty NodePath if no camera is associated.

static TypeHandle getClassType ( ) [static]

Reimplemented from DisplayRegion.

bool getClearActive ( int  n) [inherited]

Gets the clear-active flag for any bitplane.

VBase4 const getClearColor ( ) [inherited]

Returns the current clear color value.

This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless.

bool getClearColorActive ( ) [inherited]

Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.

See set_clear_color_active().

float getClearDepth ( ) [inherited]

Returns the current clear depth value.

This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless.

bool getClearDepthActive ( ) [inherited]

Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame.

See set_clear_depth_active().

unsigned int getClearStencil ( ) [inherited]

Returns the current clear stencil value.

This is the value that will be used to clear the stencil buffer every frame, but only if get_clear_stencil_active() returns true. If get_clear_stencil_active() returns false, this is meaningless.

bool getClearStencilActive ( ) [inherited]

Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame.

See set_clear_stencil_active().

VBase4 const getClearValue ( int  n) [inherited]

Returns the clear value for any bitplane.

int getCubeMapIndex ( ) [inherited]

Returns the cube map face index associated with this particular DisplayRegion, or -1 if it is not associated with a cube map.

See set_cube_map_index().

CallbackObject getCullCallback ( ) [inherited]

Returns the CallbackObject set by set_cull_callback().

CullTraverser getCullTraverser ( ) [inherited]

Returns the CullTraverser that will be used to draw the contents of this DisplayRegion.

CallbackObject getDrawCallback ( ) [inherited]

Returns the CallbackObject set by set_draw_callback().

bool getIncompleteRender ( ) [inherited]

Returns the incomplete_render flag.

See set_incomplete_render().

float getLeft ( ) [inherited]

Retrieves the x coordinate of the left edge of the rectangle within its GraphicsOutput.

This number will be in the range [0..1].

DisplayRegion getLeftEye ( )

Returns a pointer to the left DisplayRegion managed by this stereo object.

int getLensIndex ( ) [inherited]

Returns the specific lens of the associated Camera that will be used for rendering this scene.

Most Cameras hold only one lens, but for multiple lenses this method may be used to selected between them.

GraphicsPipe getPipe ( ) [inherited]

Returns the GraphicsPipe that this DisplayRegion is ultimately associated with, or NULL if no pipe is associated.

float getPixelFactor ( ) [inherited]

Returns the amount by which the height and width of the region will be scaled internally, based on the zoom factor set by set_pixel_zoom().

This will return 1.0 if the pixel_zoom was not set or if it is not being respected (for instance, because the underlying renderer doesn't support it--see supports_pixel_zoom).

int getPixelHeight ( ) [inherited]

Returns the height of the DisplayRegion in pixels.

int getPixelWidth ( ) [inherited]

Returns the width of the DisplayRegion in pixels.

float getPixelZoom ( ) [inherited]

Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not.

Also see get_pixel_factor().

int getRefCount ( ) [inherited]

Returns the current reference count.

static int getRenderbufferType ( int  plane) [static, inherited]

Returns the RenderBuffer.Type that corresponds to a RenderTexturePlane.

float getRight ( ) [inherited]

Retrieves the x coordinate of the right edge of the rectangle within its GraphicsOutput.

This number will be in the range [0..1].

DisplayRegion getRightEye ( )

Returns a pointer to the right DisplayRegion managed by this stereo object.

bool getScreenshot ( PNMImage  image) [inherited]

Captures the most-recently rendered image from the framebuffer into the indicated PNMImage.

Returns true on success, false on failure.

int getSort ( ) [inherited]

Returns the sort value associated with the DisplayRegion.

StereoChannel getStereoChannel ( ) [inherited]

Returns whether the DisplayRegion is specified as the left or right channel of a stereo pair, or whether it is a normal, monocular image.

See set_stereo_channel().

int getTextureReloadPriority ( ) [inherited]

Returns the priority which is assigned to asynchronous texture reload requests.

See set_texture_reload_priority().

float getTop ( ) [inherited]

Retrieves the y coordinate of the top edge of the rectangle within its GraphicsOutput.

This number will be in the range [0..1].

TypeHandle getType ( ) [inherited]

Reimplemented in AnimChannelBase.

int getTypeIndex ( ) [inherited]

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

GraphicsOutput getWindow ( ) [inherited]

Returns the GraphicsOutput that this DisplayRegion is ultimately associated with, or NULL if no window is associated.

bool isActive ( ) [inherited]

Returns the active flag associated with the DisplayRegion.

bool isAnyClearActive ( ) [inherited]

Returns true if any of the clear types (so far there are just color or depth) have been set active, or false if none of them are active and there is no need to clear.

bool isExactType ( TypeHandle  handle) [inherited]

Returns true if the current object is the indicated type exactly.

bool isOfType ( TypeHandle  handle) [inherited]

Returns true if the current object is or derives from the indicated type.

bool isStereo ( ) [inherited]

Returns true if this is a StereoDisplayRegion, false otherwise.

PandaNode makeCullResultGraph ( ) [inherited]

Returns a special scene graph constructed to represent the results of the last frame's cull operation.

This will be a hierarchy of nodes, one node for each bin, each of which will in term be a parent of a number of GeomNodes, representing the geometry drawn in each bin.

This is useful mainly for high-level debugging and abstraction tools; it should not be mistaken for the low-level cull result itself, which is constructed and maintained internally. No such scene graph is normally constructed during the rendering of a frame; this is an artificial construct created for the purpose of making it easy to analyze the results of the cull operation.

static Filename makeScreenshotFilename ( string  prefix) [static, inherited]

Synthesizes a suitable default filename for passing to save_screenshot().

The default filename is generated from the supplied prefix and from the Config variable screenshot-filename, which contains the following strings:

~p - the supplied prefix ~f - the frame count ~e - the value of screenshot-extension All other % strings in strftime().

static Filename makeScreenshotFilename ( ) [static, inherited]

Synthesizes a suitable default filename for passing to save_screenshot().

The default filename is generated from the supplied prefix and from the Config variable screenshot-filename, which contains the following strings:

~p - the supplied prefix ~f - the frame count ~e - the value of screenshot-extension All other % strings in strftime().

output ( ostream  out) [inherited]

Reimplemented from DisplayRegionBase.

ref ( ) [inherited]

Explicitly increments the reference count.

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

bool saveScreenshot ( Filename const  filename,
string  image_comment 
) [inherited]

Saves a screenshot of the region to the indicated filename.

Returns true on success, false on failure.

bool saveScreenshot ( Filename const  filename) [inherited]

Saves a screenshot of the region to the indicated filename.

Returns true on success, false on failure.

Filename saveScreenshotDefault ( string  prefix) [inherited]

Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed.

The filename is generated by make_screenshot_filename().

Filename saveScreenshotDefault ( ) [inherited]

Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed.

The filename is generated by make_screenshot_filename().

setActive ( bool  active) [inherited]

Sets the active flag associated with the DisplayRegion.

If the DisplayRegion is marked inactive, nothing is rendered.

setCamera ( NodePath const  camera) [inherited]

Sets the camera that is associated with this DisplayRegion.

There is a one-to-many association between cameras and DisplayRegions; one camera may be shared by multiple DisplayRegions.

The camera is actually set via a NodePath, which clarifies which instance of the camera (if there happen to be multiple instances) we should use.

setClearActive ( int  n,
bool  clear_aux_active 
) [inherited]

Sets the clear-active flag for any bitplane.

setClearColor ( VBase4 const  color) [inherited]

Sets the clear color to the indicated value.

This is the value that will be used to clear the color buffer every frame, but only if get_clear_color_active() returns true. If get_clear_color_active() returns false, this is meaningless.

setClearColorActive ( bool  clear_color_active) [inherited]

Toggles the flag that indicates whether the color buffer should be cleared every frame.

If this is true, the color buffer will be cleared to the color indicated by set_clear_color(); otherwise, it will be left alone.

setClearDepth ( float  depth) [inherited]

Sets the clear depth to the indicated value.

This is the value that will be used to clear the depth buffer every frame, but only if get_clear_depth_active() returns true. If get_clear_depth_active() returns false, this is meaningless.

setClearDepthActive ( bool  clear_depth_active) [inherited]

Toggles the flag that indicates whether the depth buffer should be cleared every frame.

If this is true, the depth buffer will be cleared to the depth value indicated by set_clear_depth(); otherwise, it will be left alone.

setClearStencil ( unsigned int  stencil) [inherited]
setClearStencilActive ( bool  clear_stencil_active) [inherited]

Toggles the flag that indicates whether the stencil buffer should be cleared every frame.

If this is true, the stencil buffer will be cleared to the value indicated by set_clear_stencil(); otherwise, it will be left alone.

setClearValue ( int  n,
VBase4 const  clear_value 
) [inherited]

Sets the clear value for any bitplane.

setCubeMapIndex ( int  cube_map_index) [inherited]

This is a special parameter that is only used when rendering the faces of a cube map.

Normally you should not need to set it directly. This sets up the DisplayRegion to render to the nth cube map face; the value must be between 0 and 5, inclusive. A normal DisplayRegion that is not associated with any particular cube map should be set to -1.

setCullCallback ( CallbackObject  object) [inherited]

Sets the CallbackObject that will be notified when the DisplayRegion is visited during the cull traversal.

This callback will be made during the cull thread.

The cull traversal is responsible for determining which nodes are visible and within the view frustum, and for accumulating state and transform, and generally building up the list of CullableObjects that are to be eventually passed to the draw traversal for rendering.

At the time the cull traversal callback is made, the traversal for this DisplayRegion has not yet started.

The callback is passed an instance of a DisplayRegionCullCallbackData, which contains pointers to the current scene information, as well as the current DisplayRegion and GSG. The callback replaces* the normal cull behavior, so if your callback does nothing, the scene graph will not be traversed and therefore nothing will be drawn. If you wish the normal cull traversal to be performed for this DisplayRegion, you must call cbdata->upcall() from your callback.

setCullTraverser ( CullTraverser  trav) [inherited]

Specifies the CullTraverser that will be used to draw the contents of this DisplayRegion.

Normally the default CullTraverser is sufficient, but this may be changed to change the default cull behavior.

setDimensions ( float  l,
float  r,
float  b,
float  t 
) [inherited]

Changes the portion of the framebuffer this DisplayRegion corresponds to.

The parameters range from 0 to 1, where 0,0 is the lower left corner and 1,1 is the upper right; (0, 1, 0, 1) represents the whole screen.

setDrawCallback ( CallbackObject  object) [inherited]

Sets the CallbackObject that will be notified when the contents of DisplayRegion is drawn during the draw traversal.

This callback will be made during the draw thread.

The draw traversal is responsible for actually issuing the commands to the graphics engine to draw primitives. Its job is to walk through the list of CullableObjects build up by the cull traversal, as quickly as possible, issuing the appropriate commands to draw each one.

At the time the draw traversal callback is made, the graphics state is in the initial state, and no projection matrix or modelview matrix is in effect. begin_scene() has not yet been called, and no objects have yet been drawn. However, the viewport has already been set to the appropriate part of the window, and the clear commands for this DisplayRegion (if any) have been issued.

The callback is passed an instance of a DisplayRegionDrawCallbackData, which contains pointers to the current scene information, as well as the current DisplayRegion and GSG. The callback replaces* the normal draw behavior, so if your callback does nothing, nothing in the DisplayRegion will be drawn. If you wish the draw traversal to continue to draw the contents of this DisplayRegion, you must call cbdata->upcall() from your callback.

setIncompleteRender ( bool  incomplete_render) [inherited]

Sets the incomplete_render flag.

When this is true, the frame will be rendered even if some of the geometry or textures in the scene are not available (e.g. they have been temporarily paged out). When this is false, the frame will be held up while this data is reloaded.

This flag may also be set on the GraphicsStateGuardian. It will be considered true for a given DisplayRegion only if it is true on both the GSG and on the DisplayRegion.

See GraphicsStateGuardian.set_incomplete_render() for more detail.

setLensIndex ( int  index) [inherited]

Sets the lens index, allows for multiple lenses to be attached to a camera.

This is useful for a variety of setups, such as fish eye rendering. The default is 0.

setPixelZoom ( float  pixel_zoom) [inherited]

Sets the amount by which the pixels of the region are scaled internally when filling the image interally.

Setting this number larger makes the pixels blockier, but may make the rendering faster, particularly for software renderers. Setting this number to 2.0 reduces the number of pixels that have to be filled by the renderer by a factor of 2.0. It doesn't make sense to set this lower than 1.0.

It is possible to set this on either individual DisplayRegions or on overall GraphicsWindows, but you will get better performance for setting it on the window rather than its individual DisplayRegions. Also, you may not set it on a DisplayRegion that doesn't have both clear_color() and clear_depth() enabled.

This property is only supported on renderers for which it is particularly useful--currently, this is the tinydisplay software renderer. Other kinds of renderers allow you to set this property, but ignore it.

setSort ( int  sort) [inherited]

Sets the sort value associated with the DisplayRegion.

Within a window, DisplayRegions will be rendered in order from the lowest sort value to the highest.

setStereoChannel ( StereoChannel  stereo_channel) [inherited]

Specifies whether the DisplayRegion represents the left or right channel of a stereo pair, or whether it is a normal, monocular image.

This automatically adjusts the lens that is used to render to this DisplayRegion to its left or right eye, according to the lens's stereo properties.

When the DisplayRegion is attached to a stereo window (one for which is_stereo() returns true), this also specifies which physical channel the DisplayRegion renders to.

Normally you would create at least two DisplayRegions for a stereo window, one for each of the left and right channels. The two DisplayRegions may share the same camera (and thus the same lens); this parameter is used to control the exact properties of the lens when it is used to render into this DisplayRegion.

Also see the StereoDisplayRegion, which automates managing a pair of left/right DisplayRegions.

An ordinary DisplayRegion may be set to SC_mono, SC_left, or SC_right. You may set SC_stereo only on a StereoDisplayRegion.

setTextureReloadPriority ( int  texture_reload_priority) [inherited]

Specifies an integer priority which is assigned to any asynchronous texture reload requests spawned while processing this DisplayRegion.

This controls which textures are loaded first when multiple textures need to be reloaded at once; it also controls the relative priority between asynchronous texture loads and asynchronous model or animation loads.

Specifying a larger number here makes the textures rendered by this DisplayRegion load up first. This may be particularly useful to do, for instance, for the DisplayRegion that renders the gui.

bool supportsPixelZoom ( ) [inherited]

Returns true if a call to set_pixel_zoom() will be respected, false if it will be ignored.

If this returns false, then get_pixel_factor() will always return 1.0, regardless of what value you specify for set_pixel_zoom().

This may return false if the underlying renderer doesn't support pixel zooming, or if you have called this on a DisplayRegion that doesn't have both set_clear_color() and set_clear_depth() enabled.

bool testRefCountIntegrity ( ) [inherited]

Does some easy checks to make sure that the reference count isn't completely bogus.

Returns true if ok, false otherwise.

Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.

bool testRefCountNonzero ( ) [inherited]

Does some easy checks to make sure that the reference count isn't zero, or completely bogus.

Returns true if ok, false otherwise.

bool unref ( ) [inherited]

Explicitly decrements the reference count.

Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete().

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is true if the new reference count is nonzero, false if it is zero.

Reimplemented in GeomVertexArrayFormat, and GeomVertexFormat.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties