# GraphicsWindow

from pandac.PandaModules import GraphicsWindow

Class : GraphicsWindow
Description : A window, fullscreen or on a desktop, into which a graphics device sends its output for interactive display.

## Inheritance:

GraphicsWindow: GraphicsOutput
GraphicsOutput: TypedWritableReferenceCount DrawableRegion
TypedWritableReferenceCount: TypedWritable ReferenceCount
TypedWritable: TypedObject
TypedObject: MemoryBase
MemoryBase:
ReferenceCount: MemoryBase
DrawableRegion:

## Methods of GraphicsWindow:

clearRejectedProperties
closeIme
disablePointerEvents
disablePointerMode
enablePointerEvents
enablePointerMode
getClassType
getCloseRequestEvent
getInputDeviceName
getNumInputDevices
getPointer
getProperties
getRejectedProperties
getRequestedProperties
getWindowEvent
hasKeyboard
hasPointer
isClosed
isFullscreen
movePointer
requestProperties
setCloseRequestEvent
setWindowEvent

## Methods of GraphicsOutput:

addRenderTexture
clearChildSort
clearDeleteFlag
clearRenderTextures
countTextures
getActiveDisplayRegion
getChildSort
getClassType
getDeleteFlag
getDisplayRegion
getEngine
getFbProperties
getFbXSize
getFbYSize
getGsg
getInverted
getLeftEyeColorMask
getName
getNumActiveDisplayRegions
getNumDisplayRegions
getOneShot
getPipe
getRedBlueStereo
getRightEyeColorMask
getRtmMode
getScreenshot
getSort
getTexture
getTextureCard
getTexturePlane
getXSize
getYSize
hasSize
hasTexture
isActive
isStereo
isValid
makeCubeMap
makeDisplayRegion
makeMonoDisplayRegion
makeScreenshotFilename
makeStereoDisplayRegion
makeTextureBuffer
removeAllDisplayRegions
removeDisplayRegion
saveScreenshot
saveScreenshotDefault
setActive
setChildSort
setInverted
setOneShot
setRedBlueStereo
setSort
setupRenderTexture
shareDepthBuffer
triggerCopy
unshareDepthBuffer

## Methods of TypedWritableReferenceCount:

getClassType

## Methods of TypedWritable:

getClassType

## Methods of TypedObject:

getClassType
getType
getTypeIndex
isExactType
isOfType

## Methods of ReferenceCount:

getClassType
getRefCount
ref
testRefCountIntegrity
testRefCountNonzero
unref

## Methods of DrawableRegion:

disableClears
getClearActive
getClearColor
getClearColorActive
getClearDepth
getClearDepthActive
getClearStencil
getClearStencilActive
getClearValue
getPixelFactor
getPixelZoom
getRenderbufferType
isAnyClearActive
setClearActive
setClearColor
setClearColorActive
setClearDepth
setClearDepthActive
setClearStencil
setClearStencilActive
setClearValue
setPixelZoom
supportsPixelZoom

## Constants in GraphicsOutput:

RTMNone | (RenderTextureMode)
RTMBindOrCopy | (RenderTextureMode)
RTMCopyTexture | (RenderTextureMode)
RTMCopyRam | (RenderTextureMode)
RTMTriggeredCopyTexture | (RenderTextureMode)
RTMTriggeredCopyRam | (RenderTextureMode)
FMRender | (FrameMode)
FMParasite | (FrameMode)
FMRefresh | (FrameMode)

## Constants in DrawableRegion:

RTPStencil | (RenderTexturePlane)
RTPDepthStencil | (RenderTexturePlane)
RTPColor | (RenderTexturePlane)
RTPAuxRgba0 | (RenderTexturePlane)
RTPAuxRgba1 | (RenderTexturePlane)
RTPAuxRgba2 | (RenderTexturePlane)
RTPAuxRgba3 | (RenderTexturePlane)
RTPAuxHrgba0 | (RenderTexturePlane)
RTPAuxHrgba1 | (RenderTexturePlane)
RTPAuxHrgba2 | (RenderTexturePlane)
RTPAuxHrgba3 | (RenderTexturePlane)
RTPAuxFloat0 | (RenderTexturePlane)
RTPAuxFloat1 | (RenderTexturePlane)
RTPAuxFloat2 | (RenderTexturePlane)
RTPAuxFloat3 | (RenderTexturePlane)
RTPDepth | (RenderTexturePlane)
RTPCOUNT | (RenderTexturePlane)

clearRejectedProperties void GraphicsWindow::clear_rejected_properties(void); Description: Empties the set of failed properties that will be returned by get_rejected_properties().

closeIme virtual void GraphicsWindow::close_ime(void); Description: Forces the ime window to close if any

disablePointerEvents void GraphicsWindow::disable_pointer_events(int device); Description: Turn off the generation of pointer events.

disablePointerMode void GraphicsWindow::disable_pointer_mode(int device); Description: See GraphicsWindowInputDevice::disable_pointer_mode

enablePointerEvents void GraphicsWindow::enable_pointer_events(int device); Description: Turn on the generation of pointer events.

enablePointerMode void GraphicsWindow::enable_pointer_mode(int device, double speed); Description: See GraphicsWindowInputDevice::enable_pointer_mode

getClassType static TypeHandle GraphicsWindow::get_class_type(void); Undocumented function.

getCloseRequestEvent string GraphicsWindow::get_close_request_event(void) const; Description: Returns the name of the event set via set_close_request_event(). If this string is nonempty, then when the user requests to close window, this event will be generated instead. See set_close_request_event().

getInputDeviceName string GraphicsWindow::get_input_device_name(int device) const; Mouse and keyboard routines Description: Returns the name of the nth input device.

getNumInputDevices int GraphicsWindow::get_num_input_devices(void) const; Mouse and keyboard routines Description: Returns the number of separate input devices associated with the window. Typically, a window will have exactly one input device: the keyboard/mouse pair. However, some windows may have no input devices, and others may add additional devices, for instance for a joystick.

getPointer MouseData GraphicsWindow::get_pointer(int device) const; Description: Returns the MouseData associated with the nth input device's pointer.

getProperties WindowProperties const GraphicsWindow::get_properties(void) const; Description: Returns the current properties of the window.

getRejectedProperties WindowProperties GraphicsWindow::get_rejected_properties(void) const; Description: Returns the set of properties that have recently been requested, but could not be applied to the window for some reason. This set of properties will remain unchanged until they are changed by a new failed request, or clear_rejected_properties() is called.

getRequestedProperties WindowProperties const GraphicsWindow::get_requested_properties(void) const; Description: Returns the properties of the window that are currently requested. These properties will be applied to the window (if valid) at the next execution of process_events().

getWindowEvent string GraphicsWindow::get_window_event(void) const; Description: Returns the name of the event that is generated when this window is modified externally, e.g. to be resized or closed by the user. See set_window_event().

hasKeyboard bool GraphicsWindow::has_keyboard(int device) const; Description: Returns true if the nth input device has a keyboard, false otherwise.

hasPointer bool GraphicsWindow::has_pointer(int device) const; Description: Returns true if the nth input device has a screen-space pointer (for instance, a mouse), false otherwise.

isClosed bool GraphicsWindow::is_closed(void) const; Description: Returns true if the window has not yet been opened, or has been fully closed, false if it is open. The window is not opened immediately after GraphicsEngine::make_window() is called; nor is it closed immediately after GraphicsEngine::remove_window() is called. Either operation may take a frame or two.

isFullscreen bool GraphicsWindow::is_fullscreen(void) const; Description: Returns true if the window has been opened as a fullscreen window, false otherwise.

movePointer virtual bool GraphicsWindow::move_pointer(int device, int x, int y); Description: Forces the pointer to the indicated position within the window, if possible. Returns true if successful, false on failure. This may fail if the mouse is not currently within the window, or if the API doesn't support this operation.

requestProperties void GraphicsWindow::request_properties(WindowProperties const &requested_properties); Description: Requests a property change on the window. For example, use this method to request a window change size or minimize or something. The change is not made immediately; rather, the request is saved and will be applied the next time the window task is run (probably at the next frame).

setCloseRequestEvent void GraphicsWindow::set_close_request_event(string const &close_request_event); Description: Sets the event that is triggered when the user requests to close the window, e.g. via alt-F4, or clicking on the close box. The default for each window is for this event to be the empty string, which means the window-close request is handled immediately by Panda (and the window will be closed without the app getting a chance to intervene). If you set this to a nonempty string, then the window is not closed, but instead the event is thrown. It is then up to the app to respond appropriately, for instance by presenting an "are you sure?" dialog box, and eventually calling close_window() when the user is sure. It is considered poor form to set this string and then not handle the event. This can frustrate the user by making it difficult for him to cleanly shut down the application (and may force the user to hard-kill the app, or reboot the machine).

setWindowEvent void GraphicsWindow::set_window_event(string const &window_event); Description: Changes the name of the event that is generated when this window is modified externally, e.g. to be resized or closed by the user. By default, all windows have the same window event unless they are explicitly changed. When the event is generated, it includes one parameter: the window itself.

addRenderTexture void GraphicsOutput::add_render_texture(Texture *tex, GraphicsOutput::RenderTextureMode mode, DrawableRegion::RenderTexturePlane bitplane = (RTP_COUNT)); Description: Creates a new Texture object, suitable for rendering the contents of this buffer into, and appends it to the list of render textures. If tex is not NULL, it is the texture that will be set up for rendering into; otherwise, a new Texture object will be created, in which case you may call get_texture() to retrieve the new texture pointer. You can specify a bitplane to attach the texture to. the legal choices are: * RTP_depth * RTP_depth_stencil * RTP_color * RTP_aux_rgba_0 * RTP_aux_rgba_1 * RTP_aux_rgba_2 * RTP_aux_rgba_3 If you do not specify a bitplane to attach the texture to, this routine will use a default based on the texture's format: * F_depth_component attaches to RTP_depth * F_depth_stencil attaches to RTP_depth_stencil * all other formats attach to RTP_color. The texture's format will be changed to match the format of the bitplane to which it is attached. For example, if you pass in an F_rgba texture and order that it be attached to RTP_depth_stencil, it will turn into an F_depth_stencil texture. Also see make_texture_buffer(), which is a higher-level interface for preparing render-to-a-texture mode.

clearChildSort void GraphicsOutput::clear_child_sort(void); Description: Resets the sort value of future offscreen buffers created by make_texture_sort() to the default value. See set_child_sort().

clearDeleteFlag void GraphicsOutput::clear_delete_flag(void); Description: Resets the delete flag, so the GraphicsOutput will not be automatically deleted before the beginning of the next frame.

clearRenderTextures void GraphicsOutput::clear_render_textures(void); Description: If the GraphicsOutput is currently rendering to a texture, then all textures are dissociated from the GraphicsOuput.

countTextures int GraphicsOutput::count_textures(void) const; Description: If the GraphicsOutput is set to render into a texture, returns the number of textures that are being rendered into. Normally, the textures would be associated with different buffers - a color texture, a depth texture, and a stencil texture.

getActiveDisplayRegion PointerTo< DisplayRegion > GraphicsOutput::get_active_display_region(int n) const; Description: Returns the nth active DisplayRegion of those that have been created within the window. This may return NULL if n is out of bounds; particularly likely if the number of display regions has changed since the last call to get_num_active_display_regions().

getChildSort int GraphicsOutput::get_child_sort(void) const; Description: Returns the sort value of future offscreen buffers created by make_texture_sort(). See set_child_sort().

getClassType static TypeHandle GraphicsOutput::get_class_type(void); Undocumented function.

getDeleteFlag bool GraphicsOutput::get_delete_flag(void) const; Description: Returns the current setting of the delete flag. When this is true, the GraphicsOutput will automatically be removed before the beginning of the next frame by the GraphicsEngine.

getDisplayRegion PointerTo< DisplayRegion > GraphicsOutput::get_display_region(int n) const; Description: Returns the nth DisplayRegion of those that have been created within the window. This may return NULL if n is out of bounds; particularly likely if the number of display regions has changed since the last call to get_num_display_regions().

getEngine GraphicsEngine *GraphicsOutput::get_engine(void) const; Description: Returns the graphics engine that created this output. Since there is normally only one GraphicsEngine object in an application, this is usually the same as the global GraphicsEngine.

getFbProperties FrameBufferProperties const &GraphicsOutput::get_fb_properties(void) const; Description: Returns the framebuffer properties of the window.

getFbXSize int GraphicsOutput::get_fb_x_size(void) const; Description: Returns the internal width of the window or buffer. This is almost always the same as get_x_size(), except when a pixel_zoom is in effect--see set_pixel_zoom().

getFbYSize int GraphicsOutput::get_fb_y_size(void) const; Description: Returns the internal height of the window or buffer. This is almost always the same as get_y_size(), except when a pixel_zoom is in effect--see set_pixel_zoom().

getGsg GraphicsStateGuardian *GraphicsOutput::get_gsg(void) const; Description: Returns the GSG that is associated with this window. There is a one-to-one association between windows and GSG's. This may return NULL if the graphics context has not yet been created for the window, e.g. before the first frame has rendered; or after the window has been closed.

getInverted bool GraphicsOutput::get_inverted(void) const; Description: Returns the current setting of the inverted flag. When this is true, the scene is rendered into the window upside-down, flipped like a mirror along the X axis. See set_inverted().

getLeftEyeColorMask unsigned int GraphicsOutput::get_left_eye_color_mask(void) const; Description: Returns the color mask in effect when rendering a left-eye view in red_blue stereo mode. This is one or more bits defined in ColorWriteAttrib::Channels. See set_red_blue_stereo().

getName string const &GraphicsOutput::get_name(void) const; Description: Returns the name that was passed to the GraphicsOutput constructor.

getNumActiveDisplayRegions int GraphicsOutput::get_num_active_display_regions(void) const; Description: Returns the number of active DisplayRegions that have been created within the window.

getNumDisplayRegions int GraphicsOutput::get_num_display_regions(void) const; Description: Returns the number of DisplayRegions that have been created within the window, active or otherwise.

getOneShot bool GraphicsOutput::get_one_shot(void) const; Description: Returns the current setting of the one-shot flag. When this is true, the GraphicsOutput will automatically detach its texture (if it has one) and remove itself from the GraphicsEngine after it renders the next frame.

getPipe GraphicsPipe *GraphicsOutput::get_pipe(void) const; Description: Returns the GraphicsPipe that this window is associated with. It is possible that the GraphicsPipe might have been deleted while an outstanding PT(GraphicsOutput) prevented all of its children windows from also being deleted; in this unlikely case, get_pipe() may return NULL.

getRedBlueStereo bool GraphicsOutput::get_red_blue_stereo(void) const; Description: Returns whether red-blue stereo mode is in effect for this particular window. See set_red_blue_stereo().

getRightEyeColorMask unsigned int GraphicsOutput::get_right_eye_color_mask(void) const; Description: Returns the color mask in effect when rendering a right-eye view in red_blue stereo mode. This is one or more bits defined in ColorWriteAttrib::Channels. See set_red_blue_stereo().

getRtmMode GraphicsOutput::RenderTextureMode GraphicsOutput::get_rtm_mode(int i = (0)) const; Description: Returns the RenderTextureMode associated with the nth render-texture. Returns RTM_none if there is no such texture.

getScreenshot bool GraphicsOutput::get_screenshot(PNMImage &image); Description: Captures the most-recently rendered image from the framebuffer into the indicated PNMImage. Returns true on success, false on failure.

getSort int GraphicsOutput::get_sort(void) const; Description: Returns the sorting order of this particular GraphicsOutput. The various GraphicsOutputs within a particular thread will be rendered in the indicated order.

getTexture Texture *GraphicsOutput::get_texture(int i = (0)) const; Description: Returns the nth texture into which the GraphicsOutput renders. Returns NULL if there is no such texture. If the texture is non-NULL, it may be applied to geometry to be rendered for any other windows or outputs that share the same GSG as this GraphicsOutput. The effect is undefined for windows that share a different GSG; usually in these cases the texture will be invalid.

getTextureCard NodePath GraphicsOutput::get_texture_card(void); Description: Returns a PandaNode containing a square polygon. The dimensions are (-1,0,-1) to (1,0,1). The texture coordinates are such that the texture of this GraphicsOutput is aligned properly to the polygon. The GraphicsOutput promises to surgically update the Geom inside the PandaNode if necessary to maintain this invariant. Each invocation of this function returns a freshly- allocated PandaNode. You can therefore safely modify the RenderAttribs of the PandaNode. The PandaNode is initially textured with the texture of this GraphicOutput.

getTexturePlane DrawableRegion::RenderTexturePlane GraphicsOutput::get_texture_plane(int i = (0)) const; Description: Returns the RenderTexturePlane associated with the nth render-texture. Returns 0 if there is no such texture.

getXSize int GraphicsOutput::get_x_size(void) const; Description: Returns the visible width of the window or buffer, if it is known. In certain cases (e.g. fullscreen windows), the size may not be known until after the object has been fully created. Check has_size() first. Certain objects (like windows) may change size spontaneously; this method is not thread-safe. To get the size of a window in a thread-safe manner, query get_properties().

getYSize int GraphicsOutput::get_y_size(void) const; Description: Returns the visible height of the window or buffer, if it is known. In certain cases (e.g. fullscreen windows), the size may not be known until after the object has been fully created. Check has_size() first. Certain objects (like windows) may change size spontaneously; this method is not thread-safe. To get the size of a window in a thread-safe manner, query get_properties().

hasSize bool GraphicsOutput::has_size(void) const; Description: Returns true if the size of the window/frame buffer is known, false otherwise. In certain cases the size may not be known until after the object has been fully created. Also, certain objects (like windows) may change size spontaneously.

hasTexture bool GraphicsOutput::has_texture(void) const; Description: Returns true if the GraphicsOutput is rendering into any textures at all.

isActive virtual bool GraphicsOutput::is_active(void) const; Description: Returns true if the window is ready to be rendered into, false otherwise.

isStereo bool GraphicsOutput::is_stereo(void) const; Description: Returns Returns true if this window can render stereo DisplayRegions, either through red-blue stereo (see set_red_blue_stereo()) or through true hardware stereo rendering.

isValid bool GraphicsOutput::is_valid(void) const; Description: Returns true if the output is fully created and ready for rendering, false otherwise.

makeCubeMap GraphicsOutput *GraphicsOutput::make_cube_map(string const &name, int size, NodePath &camera_rig, BitMask< unsigned int, 32 > camera_mask = ((get_all_camera_mask())), bool to_ram = (0), FrameBufferProperties *fbp = ((void *)(0))); Description: This is similar to make_texture_buffer() in that it allocates a separate buffer suitable for rendering to a texture that can be assigned to geometry in this window, but in this case, the buffer is set up to render the six faces of a cube map. The buffer is automatically set up with six display regions and six cameras, each of which are assigned the indicated draw_mask and parented to the given camera_rig node (which you should then put in your scene to render the cube map from the appropriate point of view). You may take the texture associated with the buffer and apply it to geometry, particularly with TexGenAttrib::M_world_cube_map also in effect, to apply a reflection of everything seen by the camera rig.

makeDisplayRegion DisplayRegion *GraphicsOutput::make_display_region(void); Description: Creates a new DisplayRegion that covers the entire window. If is_stereo() is true for this window, and default-stereo-camera is configured true, this actually makes a StereoDisplayRegion. Call make_mono_display_region() or make_stereo_display_region() if you want to insist on one or the other. Description: Creates a new DisplayRegion that covers the indicated sub-rectangle within the window. The range on all parameters is 0..1.

makeMonoDisplayRegion DisplayRegion *GraphicsOutput::make_mono_display_region(void); Description: Creates a new DisplayRegion that covers the entire window. This always returns a mono DisplayRegion, even if is_stereo() is true. Description: Creates a new DisplayRegion that covers the indicated sub-rectangle within the window. The range on all parameters is 0..1.

makeScreenshotFilename static Filename GraphicsOutput::make_screenshot_filename(string const &prefix = ("screenshot")); Description: Saves a screenshot of the region to a default filename, and returns the filename, or empty string if the screenshot failed. 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().

makeStereoDisplayRegion StereoDisplayRegion *GraphicsOutput::make_stereo_display_region(void); Description: Creates a new DisplayRegion that covers the entire window. This always returns a stereo DisplayRegion, even if is_stereo() is false. Description: Creates a new DisplayRegion that covers the indicated sub-rectangle within the window. The range on all parameters is 0..1.

makeTextureBuffer GraphicsOutput *GraphicsOutput::make_texture_buffer(string const &name, int x_size, int y_size, Texture *tex = ((void *)(0)), bool to_ram = (0), FrameBufferProperties *fbp = ((void *)(0))); Description: Creates and returns an offscreen buffer for rendering into, the result of which will be a texture suitable for applying to geometry within the scene rendered into this window. If tex is not NULL, it is the texture that will be set up for rendering into; otherwise, a new Texture object will be created. In either case, the target texture can be retrieved from the return value with buffer->get_texture() (assuming the return value is not NULL). If to_ram is true, the buffer will be set up to download its contents to the system RAM memory associated with the Texture object, instead of keeping it strictly within texture memory; this is much slower, but it allows using the texture with any GSG. This will attempt to be smart about maximizing render performance while minimizing framebuffer waste. It might return a GraphicsBuffer set to render directly into a texture, if possible; or it might return a ParasiteBuffer that renders into this window. The return value is NULL if the buffer could not be created for some reason. When you are done using the buffer, you should remove it with a call to GraphicsEngine::remove_window() (or set the one_shot flag so it removes itself after one frame).

removeAllDisplayRegions void GraphicsOutput::remove_all_display_regions(void); Description: Removes all display regions from the window, except the default one that is created with the window.

removeDisplayRegion bool GraphicsOutput::remove_display_region(DisplayRegion *display_region); Description: Removes the indicated DisplayRegion from the window, and destructs it if there are no other references. Returns true if the DisplayRegion is found and removed, false if it was not a part of the window.

saveScreenshot bool GraphicsOutput::save_screenshot(Filename const &filename, string const &image_comment = ("")); Description: Saves a screenshot of the region to the indicated filename. The image comment is an optional user readable string that will be saved with the header of the image (if the file format supports embedded data; for example jpg allows comments). Returns true on success, false on failure.

saveScreenshotDefault Filename GraphicsOutput::save_screenshot_default(string const &prefix = ("screenshot")); Description: 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 void GraphicsOutput::set_active(bool active); Description: Sets the active flag associated with the GraphicsOutput. If the GraphicsOutput is marked inactive, nothing is rendered.

setChildSort void GraphicsOutput::set_child_sort(int child_sort); Description: Specifies the sort value of future offscreen buffers created by make_texture_sort(). The purpose of this method is to allow the user to limit the sort value chosen for a buffer created via make_texture_buffer(). Normally, this buffer will be assigned a value of get_sort() - 1, so that it will be rendered before this window is rendered; but sometimes this isn't sufficiently early, especially if other buffers also have a view into the same scene. If you specify a value here, then new buffers created via make_texture_buffer() will be given that sort value instead of get_sort() - 1.

setInverted void GraphicsOutput::set_inverted(bool inverted); Description: Changes the current setting of the inverted flag. When this is true, the scene is rendered into the window upside-down and backwards, that is, inverted as if viewed through a mirror placed on the floor. This is primarily intended to support DirectX (and a few buggy OpenGL graphics drivers) that perform a framebuffer-to-texture copy upside-down from the usual OpenGL (and Panda) convention. Panda will automatically set this flag for offscreen buffers on hardware that is known to do this, to compensate when rendering offscreen into a texture.

setOneShot void GraphicsOutput::set_one_shot(bool one_shot); Description: Changes the current setting of the one-shot flag. When this is true, the GraphicsOutput will render one frame and then automatically set itself inactive. This is particularly useful for buffers that are created for the purposes of render-to-texture, for static textures that don't need to be continually re-rendered once they have been rendered the first time. Setting the buffer inactive is not the same thing as destroying it. You are still responsible for passing this buffer to GraphicsEngine::remove_window() when you no longer need the texture, in order to clean up fully. (However, you should not call remove_window() on this buffer while the texture is still needed, because depending on the render-to-texture mechanism in use, this may invalidate the texture contents.)

setRedBlueStereo void GraphicsOutput::set_red_blue_stereo(bool red_blue_stereo, unsigned int left_eye_color_mask, unsigned int right_eye_color_mask); Description: Enables red-blue stereo mode on this particular window. When red-blue stereo mode is in effect, DisplayRegions that have the "left" channel set will render in the red (or specified) channel only, while DisplayRegions that have the "right" channel set will render in the blue (or specified) channel only. The remaining two parameters specify the particular color channel(s) to associate with each eye. Use the bits defined in ColorWriteAttrib::Channels. This can be used to achieve a cheesy stereo mode in the absence of hardware-supported stereo.

setSort void GraphicsOutput::set_sort(int sort); Description: Adjusts the sorting order of this particular GraphicsOutput, relative to other GraphicsOutputs.

setupRenderTexture void GraphicsOutput::setup_render_texture(Texture *tex, bool allow_bind, bool to_ram); Description: This is a deprecated interface that made sense back when GraphicsOutputs could only render into one texture at a time. From now on, use clear_render_textures and add_render_texture instead.

shareDepthBuffer virtual bool GraphicsOutput::share_depth_buffer(GraphicsOutput *graphics_output); Description: Will attempt to use the depth buffer of the input graphics_output. The buffer sizes must be exactly the same.

triggerCopy void GraphicsOutput::trigger_copy(void); Description: When the GraphicsOutput is in triggered copy mode, this function triggers the copy (at the end of the next frame).

unshareDepthBuffer virtual void GraphicsOutput::unshare_depth_buffer(void); Description: Discontinue sharing the depth buffer.

getClassType static TypeHandle TypedWritableReferenceCount::get_class_type(void); Undocumented function.

getClassType static TypeHandle TypedWritable::get_class_type(void); Undocumented function.

getClassType static TypeHandle TypedObject::get_class_type(void); Undocumented function.

getType virtual TypeHandle TypedObject::get_type(void) const = 0; Derived classes should override this function to return get_class_type().

getTypeIndex int TypedObject::get_type_index(void) const; Description: 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().

isExactType bool TypedObject::is_exact_type(TypeHandle handle) const; Description: Returns true if the current object is the indicated type exactly.

isOfType bool TypedObject::is_of_type(TypeHandle handle) const; Description: Returns true if the current object is or derives from the indicated type.

getClassType static TypeHandle ReferenceCount::get_class_type(void); Undocumented function.

getRefCount int ReferenceCount::get_ref_count(void) const; Description: Returns the current reference count.

ref void ReferenceCount::ref(void) const; Description: 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.

testRefCountIntegrity bool ReferenceCount::test_ref_count_integrity(void) const; Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise.

testRefCountNonzero bool ReferenceCount::test_ref_count_nonzero(void) const; Description: Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise.

unref bool ReferenceCount::unref(void) const; Description: 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; plus, we don't have a virtual destructor anyway.) 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.

disableClears virtual void DrawableRegion::disable_clears(void); Description: Disables both the color and depth clear. See set_clear_color_active and set_clear_depth_active.

getClearActive virtual bool DrawableRegion::get_clear_active(int n) const; Description: Gets the clear-active flag for any bitplane.

getClearColor LVecBase4f const &DrawableRegion::get_clear_color(void) const; Description: 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.

getClearColorActive bool DrawableRegion::get_clear_color_active(void) const; Description: Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. See set_clear_color_active().

getClearDepth float DrawableRegion::get_clear_depth(void) const; Description: 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.

getClearDepthActive bool DrawableRegion::get_clear_depth_active(void) const; Description: Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame. See set_clear_depth_active().

getClearStencil unsigned int DrawableRegion::get_clear_stencil(void) const; Description: 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.

getClearStencilActive bool DrawableRegion::get_clear_stencil_active(void) const; Description: Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. See set_clear_stencil_active().

getClearValue virtual LVecBase4f const &DrawableRegion::get_clear_value(int n) const; Description: Returns the clear value for any bitplane.

getPixelFactor float DrawableRegion::get_pixel_factor(void) const; Description: 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).

getPixelZoom float DrawableRegion::get_pixel_zoom(void) const; Description: Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not. Also see get_pixel_factor().

getRenderbufferType static int DrawableRegion::get_renderbuffer_type(int plane); Description: Returns the RenderBuffer::Type that corresponds to a RenderTexturePlane.

isAnyClearActive virtual bool DrawableRegion::is_any_clear_active(void) const; Description: 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.

setClearActive virtual void DrawableRegion::set_clear_active(int n, bool clear_aux_active); Description: Sets the clear-active flag for any bitplane.

setClearColor void DrawableRegion::set_clear_color(LVecBase4f const &color); Description: 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 void DrawableRegion::set_clear_color_active(bool clear_color_active); Description: 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 void DrawableRegion::set_clear_depth(float depth); Description: 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 void DrawableRegion::set_clear_depth_active(bool clear_depth_active); Description: 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 void DrawableRegion::set_clear_stencil(unsigned int stencil); Description: Sets the clear stencil to the indicated value. This is the value that will be used to clear the stencil buffer every frame, but only if get_clear_color_active() returns true. If get_clear_stencil_active() returns false, this is meaningless.

setClearStencilActive void DrawableRegion::set_clear_stencil_active(bool clear_stencil_active); Description: 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 virtual void DrawableRegion::set_clear_value(int n, LVecBase4f const &clear_value); Description: Sets the clear value for any bitplane.

setPixelZoom virtual void DrawableRegion::set_pixel_zoom(float pixel_zoom); Description: 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.

supportsPixelZoom virtual bool DrawableRegion::supports_pixel_zoom(void) const; Description: 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.