#include <OgreRenderTexture.h>
Inheritance diagram for Ogre::RenderTexture:
Public Types | |
enum | StatFlags { SF_NONE = 0, SF_FPS = 1, SF_AVG_FPS = 2, SF_BEST_FPS = 4, SF_WORST_FPS = 8, SF_TRIANGLE_COUNT = 16, SF_ALL = 0xFFFF } |
enum | FrameBuffer { FB_FRONT, FB_BACK, FB_AUTO } |
Public Member Functions | |
RenderTexture (HardwarePixelBuffer *buffer, size_t zoffset) | |
virtual | ~RenderTexture () |
virtual void | copyContentsToMemory (const PixelBox &dst, FrameBuffer buffer) |
Copies the current contents of the render target to a pixelbox. | |
PixelFormat | suggestPixelFormat () const |
Suggests a pixel format to use for extracting the data in this target, when calling copyContentsToMemory. | |
virtual const String & | getName (void) const |
Retrieve target's name. | |
virtual void | getMetrics (unsigned int &width, unsigned int &height, unsigned int &colourDepth) |
Retrieve information about the render target. | |
virtual unsigned int | getWidth (void) const |
virtual unsigned int | getHeight (void) const |
virtual unsigned int | getColourDepth (void) const |
virtual void | update (bool swapBuffers=true) |
Tells the target to update it's contents. | |
virtual void | swapBuffers (bool waitForVSync=true) |
Swaps the frame buffers to display the next frame. | |
virtual Viewport * | addViewport (Camera *cam, int ZOrder=0, float left=0.0f, float top=0.0f, float width=1.0f, float height=1.0f) |
Adds a viewport to the rendering target. | |
virtual unsigned short | getNumViewports (void) const |
Returns the number of viewports attached to this target. | |
virtual Viewport * | getViewport (unsigned short index) |
Retrieves a pointer to the viewport with the given index. | |
virtual void | removeViewport (int ZOrder) |
Removes a viewport at a given ZOrder. | |
virtual void | removeAllViewports (void) |
Removes all viewports on this target. | |
virtual void | getStatistics (float &lastFPS, float &avgFPS, float &bestFPS, float &worstFPS) const |
Retieves details of current rendering performance. | |
virtual const FrameStats & | getStatistics (void) const |
virtual float | getLastFPS () const |
Individual stats access - gets the number of frames per second (FPS) based on the last frame rendered. | |
virtual float | getAverageFPS () const |
Individual stats access - gets the average frames per second (FPS) since call to Root::startRendering. | |
virtual float | getBestFPS () const |
Individual stats access - gets the best frames per second (FPS) since call to Root::startRendering. | |
virtual float | getWorstFPS () const |
Individual stats access - gets the worst frames per second (FPS) since call to Root::startRendering. | |
virtual float | getBestFrameTime () const |
Individual stats access - gets the best frame time. | |
virtual float | getWorstFrameTime () const |
Individual stats access - gets the worst frame time. | |
virtual void | resetStatistics (void) |
Resets saved frame-rate statistices. | |
virtual void | getCustomAttribute (const String &name, void *pData) |
Gets a custom (maybe platform-specific) attribute. | |
virtual void | addListener (RenderTargetListener *listener) |
Add a listener to this RenderTarget which will be called back before & after rendering. | |
virtual void | removeListener (RenderTargetListener *listener) |
Removes a RenderTargetListener previously registered using addListener. | |
virtual void | removeAllListeners (void) |
Removes all listeners from this instance. | |
virtual void | setPriority (uchar priority) |
Sets the priority of this render target in relation to the others. | |
virtual uchar | getPriority () const |
Gets the priority of a render target. | |
virtual bool | isActive () const |
Used to retrieve or set the active state of the render target. | |
virtual void | setActive (bool state) |
Used to set the active state of the render target. | |
virtual void | setAutoUpdated (bool autoupdate) |
Sets whether this target should be automatically updated if Ogre's rendering loop or Root::_updateAllRenderTargets is being used. | |
virtual bool | isAutoUpdated (void) const |
Gets whether this target is automatically updated if Ogre's rendering loop or Root::_updateAllRenderTargets is being used. | |
void | writeContentsToFile (const String &filename) |
Writes the current contents of the render target to the named file. | |
virtual String | writeContentsToTimestampedFile (const String &filenamePrefix, const String &filenameSuffix) |
Writes the current contents of the render target to the (PREFIX)(time-stamp)(SUFFIX) file. | |
virtual bool | requiresTextureFlipping () const =0 |
virtual size_t | getTriangleCount (void) const |
Gets the number of triangles rendered in the last update() call. | |
virtual size_t | getBatchCount (void) const |
Gets the number of batches rendered in the last update() call. | |
virtual void | _notifyCameraRemoved (const Camera *cam) |
Utility method to notify a render target that a camera has been removed, incase it was referring to it as a viewer. | |
virtual bool | isPrimary (void) const |
Indicates whether this target is the primary window. | |
virtual bool | isHardwareGammaEnabled () const |
Indicates whether on rendering, linear colour space is converted to sRGB gamma colour space. | |
virtual uint | getFSAA () const |
Indicates whether multisampling is performed on rendering and at what level. | |
virtual Impl * | _getImpl () |
Get rendersystem specific interface for this RenderTarget. | |
AllocatedObject () | |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
void * | operator new[] (size_t sz) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
Protected Types | |
typedef std::map< int, Viewport *, std::less< int > > | ViewportList |
typedef std::vector< RenderTargetListener * > | RenderTargetListenerList |
Protected Member Functions | |
void | updateStats (void) |
virtual void | firePreUpdate (void) |
internal method for firing events | |
virtual void | firePostUpdate (void) |
internal method for firing events | |
virtual void | fireViewportPreUpdate (Viewport *vp) |
internal method for firing events | |
virtual void | fireViewportPostUpdate (Viewport *vp) |
internal method for firing events | |
virtual void | fireViewportAdded (Viewport *vp) |
internal method for firing events | |
virtual void | fireViewportRemoved (Viewport *vp) |
internal method for firing events | |
virtual void | updateImpl () |
Internal implementation of update(). | |
Protected Attributes | |
HardwarePixelBuffer * | mBuffer |
size_t | mZOffset |
String | mName |
The name of this target. | |
uchar | mPriority |
The priority of the render target. | |
unsigned int | mWidth |
unsigned int | mHeight |
unsigned int | mColourDepth |
bool | mIsDepthBuffered |
FrameStats | mStats |
Timer * | mTimer |
unsigned long | mLastSecond |
unsigned long | mLastTime |
size_t | mFrameCount |
bool | mActive |
bool | mAutoUpdate |
bool | mHwGamma |
uint | mFSAA |
ViewportList | mViewportList |
List of viewports, map on Z-order. | |
RenderTargetListenerList | mListeners |
There is no 1 on 1 relation between Textures and RenderTextures, as there can be multiple RenderTargets rendering to different mipmaps, faces (for cubemaps) or slices (for 3D textures) of the same Texture.
Definition at line 43 of file OgreRenderTexture.h.
|
Definition at line 405 of file OgreRenderTarget.h. |
|
Definition at line 401 of file OgreRenderTarget.h. |
|
Definition at line 85 of file OgreRenderTarget.h. |
|
Definition at line 62 of file OgreRenderTarget.h. |
|
|
|
|
|
Get rendersystem specific interface for this RenderTarget. This is used by the RenderSystem to (un)bind this target, and to get specific information like surfaces and framebuffer objects. |
|
Utility method to notify a render target that a camera has been removed, incase it was referring to it as a viewer.
|
|
Add a listener to this RenderTarget which will be called back before & after rendering.
|
|
Adds a viewport to the rendering target.
|
|
Definition at line 55 of file OgreMemoryAllocatedObject.h. |
|
Copies the current contents of the render target to a pixelbox.
Implements Ogre::RenderTarget. |
|
internal method for firing events
|
|
internal method for firing events
|
|
internal method for firing events
|
|
internal method for firing events
|
|
internal method for firing events
|
|
internal method for firing events
|
|
Individual stats access - gets the average frames per second (FPS) since call to Root::startRendering.
|
|
Gets the number of batches rendered in the last update() call.
|
|
Individual stats access - gets the best frames per second (FPS) since call to Root::startRendering.
|
|
Individual stats access - gets the best frame time.
|
|
|
|
Gets a custom (maybe platform-specific) attribute.
|
|
Indicates whether multisampling is performed on rendering and at what level.
Definition at line 351 of file OgreRenderTarget.h. |
|
|
|
Individual stats access - gets the number of frames per second (FPS) based on the last frame rendered.
|
|
Retrieve information about the render target.
|
|
Retrieve target's name.
|
|
Returns the number of viewports attached to this target.
|
|
Gets the priority of a render target.
Definition at line 275 of file OgreRenderTarget.h. |
|
|
|
Retieves details of current rendering performance.
|
|
Gets the number of triangles rendered in the last update() call.
|
|
Retrieves a pointer to the viewport with the given index.
|
|
|
|
Individual stats access - gets the worst frames per second (FPS) since call to Root::startRendering.
|
|
Individual stats access - gets the worst frame time.
|
|
Used to retrieve or set the active state of the render target.
Reimplemented in Ogre::RenderWindow. |
|
Gets whether this target is automatically updated if Ogre's rendering loop or Root::_updateAllRenderTargets is being used.
|
|
Indicates whether on rendering, linear colour space is converted to sRGB gamma colour space. This is the exact opposite conversion of what is indicated by Texture::isHardwareGammaEnabled, and can only be enabled on creation of the render target. For render windows, it's enabled through the 'gamma' creation misc parameter. For textures, it is enabled through the hwGamma parameter to the create call. Definition at line 347 of file OgreRenderTarget.h. |
|
Indicates whether this target is the primary window. The primary window is special in that it is destroyed when ogre is shut down, and cannot be destroyed directly. This is the case because it holds the context for vertex, index buffers and textures. Reimplemented in Ogre::RenderWindow. |
|
Definition at line 101 of file OgreMemoryAllocatedObject.h. |
|
Definition at line 95 of file OgreMemoryAllocatedObject.h. |
|
Definition at line 89 of file OgreMemoryAllocatedObject.h. |
|
Definition at line 112 of file OgreMemoryAllocatedObject.h. |
|
Definition at line 106 of file OgreMemoryAllocatedObject.h. |
|
placement operator new
Definition at line 73 of file OgreMemoryAllocatedObject.h. |
|
Definition at line 67 of file OgreMemoryAllocatedObject.h. |
|
operator new, with debug line info
Definition at line 62 of file OgreMemoryAllocatedObject.h. |
|
Definition at line 84 of file OgreMemoryAllocatedObject.h. |
|
array operator new, with debug line info
Definition at line 79 of file OgreMemoryAllocatedObject.h. |
|
Removes all listeners from this instance.
|
|
Removes all viewports on this target.
|
|
Removes a RenderTargetListener previously registered using addListener.
|
|
Removes a viewport at a given ZOrder.
|
|
|
|
Resets saved frame-rate statistices.
|
|
Used to set the active state of the render target.
|
|
Sets whether this target should be automatically updated if Ogre's rendering loop or Root::_updateAllRenderTargets is being used.
|
|
Sets the priority of this render target in relation to the others.
Definition at line 273 of file OgreRenderTarget.h. |
|
Suggests a pixel format to use for extracting the data in this target, when calling copyContentsToMemory.
Reimplemented from Ogre::RenderTarget. |
|
Swaps the frame buffers to display the next frame.
Definition at line 148 of file OgreRenderTarget.h. |
|
Tells the target to update it's contents.
|
|
Internal implementation of update().
|
|
|
|
Writes the current contents of the render target to the named file.
|
|
Writes the current contents of the render target to the (PREFIX)(time-stamp)(SUFFIX) file.
|
|
Definition at line 392 of file OgreRenderTarget.h. |
|
Definition at line 393 of file OgreRenderTarget.h. |
|
Definition at line 53 of file OgreRenderTexture.h. |
|
Definition at line 381 of file OgreRenderTarget.h. |
|
Definition at line 390 of file OgreRenderTarget.h. |
|
Definition at line 397 of file OgreRenderTarget.h. |
|
Definition at line 380 of file OgreRenderTarget.h. |
|
Definition at line 395 of file OgreRenderTarget.h. |
|
Definition at line 382 of file OgreRenderTarget.h. |
|
Definition at line 388 of file OgreRenderTarget.h. |
|
Definition at line 389 of file OgreRenderTarget.h. |
|
Definition at line 406 of file OgreRenderTarget.h. |
|
The name of this target.
Definition at line 375 of file OgreRenderTarget.h. |
|
The priority of the render target.
Definition at line 377 of file OgreRenderTarget.h. |
|
Definition at line 385 of file OgreRenderTarget.h. |
|
Definition at line 387 of file OgreRenderTarget.h. |
|
List of viewports, map on Z-order.
Definition at line 403 of file OgreRenderTarget.h. |
|
Definition at line 379 of file OgreRenderTarget.h. |
|
Definition at line 54 of file OgreRenderTexture.h. |
Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sat Apr 11 13:51:52 2009