Panda3D
|
This is a special GraphicsOutput type that acts a lot like a GraphicsBuffer, effectively allowing rendering to an offscreen buffer, except it does not create any framebuffer space for itself. Instead, it renders into the framebuffer owned by some other GraphicsOutput. More...
Public Member Functions | |
setSize (int x, int y) | |
This is called by the GraphicsEngine to request that the buffer resize itself. Although calls to get the size will return the new value, much of the actual resizing work doesn't take place until the next begin_frame. Not all buffers are resizeable. More... | |
![]() | |
addRenderTexture (Texture tex, GraphicsOutput::RenderTextureMode mode, DrawableRegion::RenderTexturePlane bitplane) | |
Creates a new Texture object, suitable for rendering the contents of this buffer into, and appends it to the list of render textures. More... | |
clearChildSort () | |
Resets the sort value of future offscreen buffers created by make_texture_sort() to the default value. See set_child_sort(). More... | |
clearDeleteFlag () | |
Resets the delete flag, so the GraphicsOutput will not be automatically deleted before the beginning of the next frame. More... | |
clearRenderTextures () | |
If the GraphicsOutput is currently rendering to a texture, then all textures are dissociated from the GraphicsOuput. More... | |
int | countTextures () |
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. More... | |
bool | flipReady () |
Returns true if a frame has been rendered and needs to be flipped, false otherwise. More... | |
DisplayRegion | getActiveDisplayRegion (int n) |
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(). More... | |
list | getActiveDisplayRegions () |
int | getChildSort () |
Returns the sort value of future offscreen buffers created by make_texture_sort(). See set_child_sort(). More... | |
bool | getDeleteFlag () |
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. More... | |
DisplayRegion | getDisplayRegion (int n) |
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(). More... | |
list | getDisplayRegions () |
GraphicsEngine | getEngine () |
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. More... | |
const FrameBufferProperties | getFbProperties () |
Returns the framebuffer properties of the window. More... | |
LVecBase2i | getFbSize () |
Returns the internal size of the window or buffer. This is almost always the same as get_size(), except when a pixel_zoom is in effect–see set_pixel_zoom(). More... | |
int | getFbXSize () |
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(). More... | |
int | getFbYSize () |
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(). More... | |
GraphicsStateGuardian | getGsg () |
Returns the GSG that is associated with this window. There is a one-to-one association between windows and GSG's. More... | |
GraphicsOutput | getHost () |
This is normally called only from within make_texture_buffer(). When called on a ParasiteBuffer, it returns the host of that buffer; but when called on some other buffer, it returns the buffer itself. More... | |
bool | getInverted () |
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(). More... | |
unsigned int | getLeftEyeColorMask () |
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(). More... | |
str | getName () |
Returns the name that was passed to the GraphicsOutput constructor. More... | |
int | getNumActiveDisplayRegions () |
Returns the number of active DisplayRegions that have been created within the window. More... | |
int | getNumDisplayRegions () |
Returns the number of DisplayRegions that have been created within the window, active or otherwise. More... | |
bool | getOneShot () |
Returns the current setting of the one-shot flag. When this is true, the GraphicsOutput will automatically set itself inactive after the next frame. More... | |
DisplayRegion | getOverlayDisplayRegion () |
Returns the special "overlay" DisplayRegion that is created for each window or buffer. This DisplayRegion covers the entire window, but cannot be used for rendering. It is a placeholder only, to indicate the dimensions of the window, and is usually used internally for purposes such as clearing the window, or grabbing a screenshot of the window. More... | |
GraphicsPipe | getPipe () |
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. More... | |
bool | getRedBlueStereo () |
Returns whether red-blue stereo mode is in effect for this particular window. See set_red_blue_stereo(). More... | |
unsigned int | getRightEyeColorMask () |
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(). More... | |
GraphicsOutput::RenderTextureMode | getRtmMode (int i) |
Returns the RenderTextureMode associated with the nth render-texture. Returns RTM_none if there is no such texture. More... | |
const LVecBase4 | getSbsLeftDimensions () |
Returns the effective sub-region of the window for displaying the left channel, if side-by-side stereo mode is in effect for the window. See set_side_by_side_stereo(). More... | |
LVecBase2i | getSbsLeftSize () |
If side-by-side stereo is enabled, this returns the pixel size of the left eye, based on scaling get_size() by get_sbs_left_dimensions(). If side-by-side stereo is not enabled, this returns the same as get_size(). More... | |
int | getSbsLeftXSize () |
If side-by-side stereo is enabled, this returns the pixel width of the left eye, based on scaling get_x_size() by get_sbs_left_dimensions(). If side-by-side stereo is not enabled, this returns the same as get_x_size(). More... | |
int | getSbsLeftYSize () |
If side-by-side stereo is enabled, this returns the pixel height of the left eye, based on scaling get_y_size() by get_sbs_left_dimensions(). If side-by-side stereo is not enabled, this returns the same as get_y_size(). More... | |
const LVecBase4 | getSbsRightDimensions () |
Returns the effective sub-region of the window for displaying the right channel, if side-by-side stereo mode is in effect for the window. See set_side_by_side_stereo(). More... | |
LVecBase2i | getSbsRightSize () |
If side-by-side stereo is enabled, this returns the pixel size of the right eye, based on scaling get_size() by get_sbs_right_dimensions(). If side-by-side stereo is not enabled, this returns the same as get_size(). More... | |
int | getSbsRightXSize () |
If side-by-side stereo is enabled, this returns the pixel width of the right eye, based on scaling get_x_size() by get_sbs_right_dimensions(). If side-by-side stereo is not enabled, this returns the same as get_x_size(). More... | |
int | getSbsRightYSize () |
If side-by-side stereo is enabled, this returns the pixel height of the right eye, based on scaling get_y_size() by get_sbs_right_dimensions(). If side-by-side stereo is not enabled, this returns the same as get_y_size(). More... | |
Texture | getScreenshot () |
Captures the most-recently rendered image from the framebuffer and returns it as Texture, or NULL on failure. More... | |
bool | getScreenshot (PNMImage image) |
Captures the most-recently rendered image from the framebuffer into the indicated PNMImage. Returns true on success, false on failure. More... | |
bool | getSideBySideStereo () |
Returns whether side-by-side stereo mode is in effect for this particular window. See set_side_by_side_stereo(). More... | |
const LVecBase2i | getSize () |
Returns the visible size 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. More... | |
int | getSort () |
Returns the sorting order of this particular GraphicsOutput. The various GraphicsOutputs within a particular thread will be rendered in the indicated order. More... | |
bool | getSupportsRenderTexture () |
Returns true if this particular GraphicsOutput can render directly into a texture, or false if it must always copy-to-texture at the end of each frame to achieve this effect. More... | |
bool | getSwapEyes () |
Returns the current setting of the "swap eyes" flag. See set_swap_eyes(). More... | |
Texture | getTexture (int i) |
Returns the nth texture into which the GraphicsOutput renders. Returns NULL if there is no such texture. More... | |
NodePath | getTextureCard () |
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. More... | |
DrawableRegion::RenderTexturePlane | getTexturePlane (int i) |
Returns the RenderTexturePlane associated with the nth render-texture. Returns 0 if there is no such texture. More... | |
int | getXSize () |
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. More... | |
int | getYSize () |
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. More... | |
bool | hasSize () |
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. More... | |
bool | hasTexture () |
Returns true if the GraphicsOutput is rendering into any textures at all. More... | |
bool | isActive () |
Returns true if the window is ready to be rendered into, false otherwise. More... | |
bool | isNonzeroSize () |
Returns true if the output has a nonzero size in both X and Y, or false if it is zero (and therefore invalid). More... | |
bool | isStereo () |
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. More... | |
bool | isValid () |
Returns true if the output is fully created and ready for rendering, false otherwise. More... | |
GraphicsOutput | makeCubeMap (str name, int size, NodePath camera_rig, DrawMask camera_mask, bool to_ram, FrameBufferProperties fbp) |
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. More... | |
DisplayRegion | makeDisplayRegion () |
Creates a new DisplayRegion that covers the entire window. More... | |
DisplayRegion | makeDisplayRegion (const LVecBase4 dimensions) |
Creates a new DisplayRegion that covers the indicated sub-rectangle within the window. The range on all parameters is 0..1. More... | |
DisplayRegion | makeDisplayRegion (float l, float r, float b, float t) |
Creates a new DisplayRegion that covers the indicated sub-rectangle within the window. The range on all parameters is 0..1. More... | |
DisplayRegion | makeMonoDisplayRegion () |
Creates a new DisplayRegion that covers the entire window. More... | |
DisplayRegion | makeMonoDisplayRegion (const LVecBase4 dimensions) |
Creates a new DisplayRegion that covers the indicated sub-rectangle within the window. The range on all parameters is 0..1. More... | |
DisplayRegion | makeMonoDisplayRegion (float l, float r, float b, float t) |
Creates a new DisplayRegion that covers the entire window. More... | |
StereoDisplayRegion | makeStereoDisplayRegion () |
Creates a new DisplayRegion that covers the entire window. More... | |
StereoDisplayRegion | makeStereoDisplayRegion (const LVecBase4 dimensions) |
Creates a new DisplayRegion that covers the indicated sub-rectangle within the window. The range on all parameters is 0..1. More... | |
StereoDisplayRegion | makeStereoDisplayRegion (float l, float r, float b, float t) |
Creates a new DisplayRegion that covers the entire window. More... | |
GraphicsOutput | makeTextureBuffer (str name, int x_size, int y_size, Texture tex, bool to_ram, FrameBufferProperties fbp) |
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. More... | |
removeAllDisplayRegions () | |
Removes all display regions from the window, except the default one that is created with the window. More... | |
bool | removeDisplayRegion (DisplayRegion display_region) |
Removes the indicated DisplayRegion from the window, and destructs it if there are no other references. More... | |
bool | saveScreenshot (const Filename filename, str image_comment) |
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. More... | |
Filename | saveScreenshotDefault (str prefix) |
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(). More... | |
setActive (bool active) | |
Sets the active flag associated with the GraphicsOutput. If the GraphicsOutput is marked inactive, nothing is rendered. More... | |
setChildSort (int child_sort) | |
Specifies the sort value of future offscreen buffers created by make_texture_sort(). More... | |
setInverted (bool inverted) | |
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. More... | |
setOneShot (bool one_shot) | |
Changes the current setting of the one-shot flag. When this is true, the GraphicsOutput will render the current 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. More... | |
setOverlayDisplayRegion (DisplayRegion display_region) | |
Replaces the special "overlay" DisplayRegion that is created for each window or buffer. See get_overlay_display_region(). This must be a new DisplayRegion that has already been created for this window, for instance via a call to make_mono_display_region(). You are responsible for ensuring that the new DisplayRegion covers the entire window. The previous overlay display region is not automatically removed; you must explicitly call remove_display_region() on it after replacing it with this method, if you wish it to be removed. More... | |
setRedBlueStereo (bool red_blue_stereo, unsigned int left_eye_color_mask, unsigned int right_eye_color_mask) | |
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. More... | |
setSideBySideStereo (bool side_by_side_stereo) | |
Enables side-by-side stereo mode on this particular window. When side-by-side stereo mode is in effect, DisplayRegions that have the "left" channel set will render on the part of the window specified by sbs_left_dimensions (typically the left half: (0, 0.5, 0, 1)), while DisplayRegions that have the "right" channel set will render on the part of the window specified by sbs_right_dimensions (typically the right half: (0.5, 1, 0, 1)). More... | |
setSideBySideStereo (bool side_by_side_stereo, const LVecBase4 sbs_left_dimensions, const LVecBase4 sbs_right_dimensions) | |
Enables side-by-side stereo mode on this particular window. When side-by-side stereo mode is in effect, DisplayRegions that have the "left" channel set will render on the part of the window specified by sbs_left_dimensions (typically the left half: (0, 0.5, 0, 1)), while DisplayRegions that have the "right" channel set will render on the part of the window specified by sbs_right_dimensions (typically the right half: (0.5, 1, 0, 1)). More... | |
setSort (int sort) | |
Adjusts the sorting order of this particular GraphicsOutput, relative to other GraphicsOutputs. More... | |
setSwapEyes (bool swap_eyes) | |
Changes the "swap eyes" flag. This flag is normally false. When it is true, the left and right channels of a stereo DisplayRegion are sent to the opposite channels in the rendering backend. This is meant to work around hardware that inadvertently swaps the output channels, or hardware for which it cannot be determined which channel is which until runtime. More... | |
setupRenderTexture (Texture tex, bool allow_bind, bool to_ram) | |
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. More... | |
bool | shareDepthBuffer (GraphicsOutput graphics_output) |
Will attempt to use the depth buffer of the input graphics_output. The buffer sizes must be exactly the same. More... | |
triggerCopy () | |
When the GraphicsOutput is in triggered copy mode, this function triggers the copy (at the end of the next frame). More... | |
unshareDepthBuffer () | |
Discontinue sharing the depth buffer. More... | |
![]() | |
Texture | getTexture (int i) |
setSort (int sort) | |
![]() | |
object | __reduce__ () |
object | __reduce_persist__ (object pickler) |
str | encodeToBamStream () |
Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string. Returns empty string on failure. More... | |
bool | encodeToBamStream (String data, BamWriter writer) |
Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string. Returns true on success, false on failure. More... | |
UpdateSeq | getBamModified () |
Returns the current bam_modified counter. This counter is normally incremented automatically whenever the object is modified. More... | |
markBamModified () | |
Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams. This should normally not need to be called by user code; it should be called internally when the object has been changed in a way that legitimately requires its retransmission to any connected clients. More... | |
![]() | |
TypeHandle | getType () |
Derived classes should override this function to return get_class_type(). More... | |
int | getTypeIndex () |
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(). More... | |
bool | isExactType (TypeHandle handle) |
Returns true if the current object is the indicated type exactly. More... | |
bool | isOfType (TypeHandle handle) |
Returns true if the current object is or derives from the indicated type. More... | |
![]() | |
int | getRefCount () |
Returns the current reference count. More... | |
ref () | |
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. More... | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise. More... | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise. More... | |
bool | unref () |
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(). More... | |
![]() | |
disableClears () | |
Disables both the color and depth clear. See set_clear_color_active and set_clear_depth_active. More... | |
bool | getClearActive (int n) |
Gets the clear-active flag for any bitplane. More... | |
const LColor | getClearColor () |
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. More... | |
bool | getClearColorActive () |
Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. See set_clear_color_active(). More... | |
float | getClearDepth () |
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. More... | |
bool | getClearDepthActive () |
Returns the current setting of the flag that indicates whether the depth buffer should be cleared every frame. See set_clear_depth_active(). More... | |
unsigned int | getClearStencil () |
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. More... | |
bool | getClearStencilActive () |
Returns the current setting of the flag that indicates whether the color buffer should be cleared every frame. See set_clear_stencil_active(). More... | |
const LColor | getClearValue (int n) |
Returns the clear value for any bitplane. More... | |
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(). 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). More... | |
float | getPixelZoom () |
Returns the value set by set_pixel_zoom(), regardless of whether it is being respected or not. Also see get_pixel_factor(). More... | |
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. More... | |
setClearActive (int n, bool clear_aux_active) | |
Sets the clear-active flag for any bitplane. More... | |
setClearColor (const LColor color) | |
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. More... | |
setClearColorActive (bool clear_color_active) | |
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. More... | |
setClearDepth (float depth) | |
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. More... | |
setClearDepthActive (bool clear_depth_active) | |
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. More... | |
setClearStencil (unsigned int stencil) | |
setClearStencilActive (bool clear_stencil_active) | |
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. More... | |
setClearValue (int n, const LColor clear_value) | |
Sets the clear value for any bitplane. More... | |
setPixelZoom (float pixel_zoom) | |
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. More... | |
bool | supportsPixelZoom () |
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(). More... | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
static Filename | makeScreenshotFilename (str prefix) |
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: More... | |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypedWritableReferenceCount | decodeFromBamStream (str data, BamReader reader) |
Reads the string created by a previous call to encode_to_bam_stream(), and extracts and returns the single object on that string. Returns NULL on error. More... | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static int | getRenderbufferType (int plane) |
Returns the RenderBuffer::Type that corresponds to a RenderTexturePlane. More... | |
Additional Inherited Members | |
![]() | |
enum | FrameMode { FM_render = 0, FM_parasite = 1, FM_refresh = 2 } |
There are many reasons to call begin_frame/end_frame. More... | |
enum | RenderTextureMode { RTM_none = 0, RTM_bind_or_copy = 1, RTM_copy_texture = 2, RTM_copy_ram = 3, RTM_triggered_copy_texture = 4, RTM_triggered_copy_ram = 5, RTM_bind_layered = 6 } |
![]() | |
enum | RenderTexturePlane { RTP_stencil = 0, RTP_depth_stencil = 1, RTP_color = 2, RTP_aux_rgba_0 = 3, RTP_aux_rgba_1 = 4, RTP_aux_rgba_2 = 5, RTP_aux_rgba_3 = 6, RTP_aux_hrgba_0 = 7, RTP_aux_hrgba_1 = 8, RTP_aux_hrgba_2 = 9, RTP_aux_hrgba_3 = 10, RTP_aux_float_0 = 11, RTP_aux_float_1 = 12, RTP_aux_float_2 = 13, RTP_aux_float_3 = 14, RTP_depth = 15, RTP_COUNT = 16 } |
It seems awkward to have this type, and also RenderBuffer::Type. However, the fact that RenderBuffer::Type is a bitmask makes it awfully awkward to work with. More... | |
This is a special GraphicsOutput type that acts a lot like a GraphicsBuffer, effectively allowing rendering to an offscreen buffer, except it does not create any framebuffer space for itself. Instead, it renders into the framebuffer owned by some other GraphicsOutput.
The x_size and y_size must therefore fit within the bounds of the source GraphicsOutput.
Since the framebuffer will be subsequently cleared when the actual owner draws in it later, this only makes sense if we are going to copy the contents of the framebuffer to a texture immediately after we draw it. Thus, has_texture() is implicitly true for a ParasiteBuffer.
This class is useful to render offscreen to a texture while preventing the waste of framebuffer memory for API's that are unable to render directly into a texture (and must render into a separate framebuffer first and then copy to texture). It is also the only way to render to a texture on API's that do not support offscreen rendering.
|
static |
setSize | ( | int | x, |
int | y | ||
) |
This is called by the GraphicsEngine to request that the buffer resize itself. Although calls to get the size will return the new value, much of the actual resizing work doesn't take place until the next begin_frame. Not all buffers are resizeable.