#include <OgreRenderTargetTexture.h>
Inheritance diagram for Ogre::RenderTargetTexture:
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 } |
Public Member Functions | |
virtual bool | isRenderTarget () const |
| |
void | setTextureType (TextureType ttype) |
Sets the type of texture; can only be changed before load(). | |
TextureType | getTextureType (void) const |
Gets the type of texture. | |
size_t | getNumMipmaps (void) const |
Gets the number of mipmaps to be used for this texture. | |
void | setNumMipmaps (size_t num) |
Sets the number of mipmaps to be used for this texture. | |
float | getGamma (void) const |
Returns the gamma adjustment factor applied to this texture. | |
void | setGamma (float g) |
Sets the gamma adjustment factor applied to this texture. | |
unsigned int | getHeight (void) const |
Returns the height of the texture. | |
unsigned int | getWidth (void) const |
Returns the width of the texture. | |
unsigned int | getDepth (void) const |
Returns the depth of the texture (only applicable for 3D textures). | |
void | setHeight (unsigned int h) |
Set the height of the texture; can only do this before load();. | |
void | setWidth (unsigned int w) |
Set the width of the texture; can only do this before load();. | |
void | setDepth (unsigned int d) |
Set the depth of the texture (only applicable for 3D textures); ; can only do this before load();. | |
int | getUsage () const |
Returns the TextureUsage indentifier for this Texture. | |
void | setUsage (int u) |
Sets the TextureUsage indentifier for this Texture; only useful before load(). | |
virtual void | createInternalResources (void)=0 |
Creates the internal texture resources for this texture. | |
virtual void | copyToTexture (TexturePtr &target) |
Copies (and maybe scales to fit) the contents of this texture to another texture. | |
virtual void | loadImage (const Image &img)=0 |
Loads the data from an image. | |
virtual void | loadRawData (DataStreamPtr &stream, ushort uWidth, ushort uHeight, PixelFormat eFormat) |
Loads the data from a raw stream. | |
void | enable32Bit (bool setting=true) |
virtual PixelFormat | getFormat () const |
Returns the pixel format for the texture surface. | |
virtual void | setFormat (PixelFormat pf) |
Sets the pixel format for the texture surface; can only be set before load(). | |
virtual bool | hasAlpha (void) const |
Returns true if the texture has an alpha layer. | |
virtual size_t | getNumFaces () const |
Return the number of faces this texture has. | |
virtual HardwarePixelBufferSharedPtr | getBuffer (size_t face=0, size_t mipmap=0)=0 |
Return hardware pixel buffer for a surface. | |
virtual void | load (void) |
Loads the resource, if it is not already. | |
virtual void | reload (void) |
Reloads the resource, if it is already loaded. | |
bool | isManuallyLoaded (void) const |
Is this resource manually loaded? | |
virtual void | unload (void) |
Unloads the resource; this is not permanent, the resource can be reloaded later if required. | |
size_t | getSize (void) const |
Retrieves info about the size of the resource. | |
virtual void | touch (void) |
'Touches' the resource to indicate it has been used. | |
const String & | getName (void) const |
Gets resource name. | |
ResourceHandle | getHandle (void) const |
bool | isLoaded (void) const |
Returns true if the Resource has been loaded, false otherwise. | |
const String & | getGroup (void) |
Gets the group which this resource is a member of. | |
ResourceManager * | getCreator (void) |
Gets the manager which created this resource. | |
const String & | getOrigin (void) const |
Get the origin of this resource, e.g. | |
void | _notifyOrigin (const String &origin) |
Notify this resource of it's origin. | |
ParamDictionary * | getParamDictionary (void) |
Retrieves the parameter dictionary for this class. | |
const ParamDictionary * | getParamDictionary (void) const |
const ParameterList & | getParameters (void) const |
Retrieves a list of parameters valid for this object. | |
virtual bool | setParameter (const String &name, const String &value) |
Generic parameter setting method. | |
virtual void | setParameterList (const NameValuePairList ¶mList) |
Generic multiple parameter setting method. | |
virtual String | getParameter (const String &name) const |
Generic parameter retrieval method. | |
virtual void | copyParametersTo (StringInterface *dest) const |
Method for copying this object's parameters to another object. | |
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 (void) |
Tells the target to update it's contents. | |
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 | setDebugText (const String &text) |
Adds debug text to this window. | |
const String & | getDebugText () const |
Returns the debug text. | |
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. | |
virtual void | writeContentsToFile (const String &filename)=0 |
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 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. | |
Static Public Member Functions | |
void | cleanupDictionary () |
Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. | |
Protected Types | |
typedef std::map< int, Viewport *, std::less< int > > | ViewportList |
typedef std::vector< RenderTargetListener * > | RenderTargetListenerList |
Protected Member Functions | |
size_t | calculateSize (void) const |
| |
void | _loadImages (const std::vector< const Image * > &images) |
Generic method to load the texture from a set of images. | |
virtual void | loadImpl (void)=0 |
Internal implementation of the 'load' action, only called if this resource is not being loaded from a ManualResourceLoader. | |
virtual void | unloadImpl (void)=0 |
Internal implementation of the 'unload' action; called regardless of whether this resource is being loaded from a ManualResourceLoader. | |
bool | createParamDictionary (const String &className) |
Internal method for creating a parameter dictionary for the class, if it does not already exist. | |
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 | |
Protected Attributes | |
unsigned long | mHeight |
unsigned long | mWidth |
unsigned long | mDepth |
size_t | mNumMipmaps |
float | mGamma |
TextureType | mTextureType |
PixelFormat | mFormat |
int | mUsage |
unsigned short | mSrcBpp |
unsigned long | mSrcWidth |
unsigned long | mSrcHeight |
unsigned short | mFinalBpp |
bool | mHasAlpha |
ResourceManager * | mCreator |
Creator. | |
String | mName |
Unique name of the resource. | |
String | mGroup |
The name of the resource group. | |
ResourceHandle | mHandle |
Numeric handle for more efficient look up than name. | |
bool | mIsLoaded |
Is the resource currently loaded? | |
size_t | mSize |
The size of the resource in bytes. | |
bool | mIsManual |
Is this file manually loaded? | |
String | mOrigin |
Origin of this resource (e.g. script name) - optional. | |
ManualResourceLoader * | mLoader |
Optional manual loader; if provided, data is loaded from here instead of a file. | |
String | mParamDictName |
Class name for this instance to be used as a lookup (must be initialised by subclasses). | |
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 |
String | mDebugText |
unsigned long | mLastSecond |
unsigned long | mLastTime |
size_t | mFrameCount |
bool | mActive |
bool | mAutoUpdate |
ViewportList | mViewportList |
List of viewports, map on Z-order. | |
RenderTargetListenerList | mListeners |
Static Protected Attributes | |
ParamDictionaryMap | msDictionary |
Dictionary of parameters. |
|
Definition at line 311 of file OgreRenderTarget.h. |
|
Definition at line 307 of file OgreRenderTarget.h. |
|
Definition at line 58 of file OgreRenderTarget.h. |
|
Generic method to load the texture from a set of images. This can be used by the specific implementation for convience. Implementations might decide not to use this function if they can use their own image loading functions.
|
|
Utility method to notify a render target that a camera has been removed, incase it was referring to it as a viewer.
|
|
Notify this resource of it's origin.
Definition at line 207 of file OgreResource.h. References Ogre::String. |
|
Add a listener to this RenderTarget which will be called back before & after rendering.
|
|
Adds a viewport to the rendering target.
|
|
Implements Ogre::Resource. |
|
Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. MaterialManager) initializes. |
|
Method for copying this object's parameters to another object.
Definition at line 294 of file OgreStringInterface.h. References Ogre::ParamDictionary::mParamDefs, and Ogre::StringInterface::setParameter(). |
|
Copies (and maybe scales to fit) the contents of this texture to another texture.
Reimplemented in Ogre::D3DTexture, and Ogre::D3D9Texture. Definition at line 180 of file OgreTexture.h. |
|
Creates the internal texture resources for this texture.
Implemented in Ogre::D3DTexture, Ogre::D3D9Texture, and Ogre::GLTexture. |
|
Internal method for creating a parameter dictionary for the class, if it does not already exist.
Definition at line 170 of file OgreStringInterface.h. References Ogre::String. |
|
Definition at line 191 of file OgreTexture.h. |
|
internal method for firing events
Reimplemented in Ogre::RenderTexture. |
|
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.
|
|
Individual stats access - gets the best frames per second (FPS) since call to Root::startRendering.
|
|
Individual stats access - gets the best frame time.
|
|
Return hardware pixel buffer for a surface. This buffer can then be used to copy data from and to a particular level of the texture.
Implemented in Ogre::D3DTexture, Ogre::D3D9Texture, and Ogre::GLTexture. |
|
|
|
Gets the manager which created this resource.
Definition at line 198 of file OgreResource.h. |
|
Gets a custom (maybe platform-specific) attribute.
Reimplemented in Ogre::D3D7RenderWindow, Ogre::D3D7RenderTexture, Ogre::D3D9RenderWindow, Ogre::D3D9RenderTexture, Ogre::GLXWindow, Ogre::GTKWindow, and Ogre::Win32Window. |
|
Returns the debug text.
|
|
Returns the depth of the texture (only applicable for 3D textures).
Definition at line 134 of file OgreTexture.h. |
|
Returns the pixel format for the texture surface.
Definition at line 197 of file OgreTexture.h. References Ogre::PixelFormat. |
|
Returns the gamma adjustment factor applied to this texture.
Definition at line 116 of file OgreTexture.h. |
|
Gets the group which this resource is a member of.
Definition at line 195 of file OgreResource.h. References Ogre::String. |
|
Definition at line 181 of file OgreResource.h. References Ogre::ResourceHandle. |
|
|
|
Returns the height of the texture.
Definition at line 126 of file OgreTexture.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.
|
|
Gets resource name.
Definition at line 176 of file OgreResource.h. References Ogre::String. |
|
Return the number of faces this texture has. This will be 6 for a cubemap texture and 1 for a 1D, 2D or 3D one. |
|
Gets the number of mipmaps to be used for this texture.
Definition at line 106 of file OgreTexture.h. |
|
Returns the number of viewports attached to this target.
|
|
Get the origin of this resource, e.g. a script file name.
Definition at line 205 of file OgreResource.h. References Ogre::String. |
|
Definition at line 207 of file OgreStringInterface.h. |
|
Retrieves the parameter dictionary for this class.
Definition at line 194 of file OgreStringInterface.h. |
|
Generic parameter retrieval method.
Definition at line 263 of file OgreStringInterface.h. References Ogre::ParamCommand::doGet(), Ogre::ParamDictionary::getParamCommand(), and Ogre::String. |
|
Retrieves a list of parameters valid for this object.
|
|
Gets the priority of a render target.
Definition at line 239 of file OgreRenderTarget.h. References Ogre::uchar. |
|
Retrieves info about the size of the resource.
Definition at line 165 of file OgreResource.h. |
|
|
|
Retieves details of current rendering performance.
|
|
Gets the type of texture.
Definition at line 102 of file OgreTexture.h. References Ogre::TextureType. |
|
Gets the number of triangles rendered in the last update() call.
|
|
Returns the TextureUsage indentifier for this Texture.
Definition at line 151 of file OgreTexture.h. |
|
Retrieves a pointer to the viewport with the given index.
|
|
|
|
Returns the width of the texture.
Definition at line 130 of file OgreTexture.h. |
|
Individual stats access - gets the worst frames per second (FPS) since call to Root::startRendering.
|
|
Individual stats access - gets the worst frame time.
|
|
Returns true if the texture has an alpha layer.
Definition at line 206 of file OgreTexture.h. |
|
Used to retrieve or set the active state of the render target.
Reimplemented in Ogre::D3D7RenderWindow, Ogre::D3D9RenderWindow, Ogre::GLXWindow, Ogre::GTKWindow, Ogre::SDLWindow, and Ogre::Win32Window. |
|
Gets whether this target is automatically updated if Ogre's rendering loop or Root::_updateAllRenderTargets is being used.
|
|
Returns true if the Resource has been loaded, false otherwise.
Definition at line 188 of file OgreResource.h. References OGRE_LOCK_AUTO_MUTEX. |
|
Is this resource manually loaded?
Definition at line 153 of file OgreResource.h. |
|
Definition at line 14 of file OgreRenderTargetTexture.h. |
|
Loads the resource, if it is not already.
Reimplemented in Ogre::Mesh, and Ogre::GLSLGpuProgram. |
|
Loads the data from an image.
Implemented in Ogre::D3DTexture, Ogre::D3D9Texture, and Ogre::GLTexture. |
|
Internal implementation of the 'load' action, only called if this resource is not being loaded from a ManualResourceLoader.
Implemented in Ogre::Font, Ogre::GpuProgram, Ogre::HighLevelGpuProgram, Ogre::Material, Ogre::Mesh, Ogre::PatchMesh, Ogre::Skeleton, Ogre::SkeletonInstance, Ogre::BspLevel, Ogre::D3DTexture, Ogre::D3D9GpuProgram, Ogre::D3D9Texture, and Ogre::GLTexture. |
|
Loads the data from a raw stream.
|
|
Reloads the resource, if it is already loaded.
|
|
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.
Reimplemented in Ogre::D3D9RenderWindow, and Ogre::Win32Window. |
|
Sets whether this target should be automatically updated if Ogre's rendering loop or Root::_updateAllRenderTargets is being used.
|
|
Adds debug text to this window.
|
|
Set the depth of the texture (only applicable for 3D textures); ; can only do this before load();.
Definition at line 147 of file OgreTexture.h. |
|
Sets the pixel format for the texture surface; can only be set before load().
|
|
Sets the gamma adjustment factor applied to this texture.
Definition at line 122 of file OgreTexture.h. |
|
Set the height of the texture; can only do this before load();.
Definition at line 138 of file OgreTexture.h. |
|
Sets the number of mipmaps to be used for this texture.
Definition at line 112 of file OgreTexture.h. |
|
Generic parameter setting method.
Referenced by Ogre::StringInterface::copyParametersTo(). |
|
Generic multiple parameter setting method.
|
|
Sets the priority of this render target in relation to the others.
Definition at line 237 of file OgreRenderTarget.h. References Ogre::uchar. |
|
Sets the type of texture; can only be changed before load().
Definition at line 98 of file OgreTexture.h. |
|
Sets the TextureUsage indentifier for this Texture; only useful before load().
Definition at line 163 of file OgreTexture.h. |
|
Set the width of the texture; can only do this before load();.
Definition at line 142 of file OgreTexture.h. |
|
'Touches' the resource to indicate it has been used.
Reimplemented in Ogre::Material. |
|
Unloads the resource; this is not permanent, the resource can be reloaded later if required.
Reimplemented in Ogre::GLSLGpuProgram. |
|
Internal implementation of the 'unload' action; called regardless of whether this resource is being loaded from a ManualResourceLoader.
Implemented in Ogre::Font, Ogre::HighLevelGpuProgram, Ogre::Material, Ogre::Mesh, Ogre::Skeleton, Ogre::SkeletonInstance, Ogre::BspLevel, Ogre::D3D7GpuProgram, Ogre::D3DTexture, Ogre::D3D9GpuVertexProgram, Ogre::D3D9GpuFragmentProgram, Ogre::D3D9Texture, Ogre::GLGpuNvparseProgram, Ogre::GLGpuProgram, Ogre::GLArbGpuProgram, and Ogre::GLTexture. |
|
Tells the target to update it's contents.
Reimplemented in Ogre::RenderWindow, and Ogre::D3D9RenderWindow. |
|
|
|
Writes the current contents of the render target to the named file.
Implemented in Ogre::D3D7RenderWindow, Ogre::D3D7RenderTexture, Ogre::D3D9RenderWindow, Ogre::D3D9RenderTexture, Ogre::GLXWindow, Ogre::GTKWindow, Ogre::GLRenderTexture, Ogre::SDLWindow, and Ogre::Win32Window. |
|
Writes the current contents of the render target to the (PREFIX)(time-stamp)(SUFFIX) file.
|
|
Reimplemented in Ogre::D3D7RenderWindow, Ogre::D3D9RenderWindow, Ogre::GLXWindow, Ogre::SDLWindow, and Ogre::Win32Window. Definition at line 302 of file OgreRenderTarget.h. |
|
Definition at line 303 of file OgreRenderTarget.h. |
|
Definition at line 290 of file OgreRenderTarget.h. |
|
Creator.
Definition at line 73 of file OgreResource.h. |
|
Definition at line 297 of file OgreRenderTarget.h. |
|
Definition at line 231 of file OgreTexture.h. |
|
Definition at line 242 of file OgreTexture.h. |
|
Definition at line 237 of file OgreTexture.h. |
|
Definition at line 300 of file OgreRenderTarget.h. |
|
Definition at line 234 of file OgreTexture.h. |
|
The name of the resource group.
Definition at line 77 of file OgreResource.h. |
|
Numeric handle for more efficient look up than name.
Definition at line 79 of file OgreResource.h. |
|
Definition at line 243 of file OgreTexture.h. |
|
Definition at line 289 of file OgreRenderTarget.h. |
|
Definition at line 229 of file OgreTexture.h. |
|
Definition at line 291 of file OgreRenderTarget.h. |
|
Is the resource currently loaded?
Definition at line 81 of file OgreResource.h. |
|
Is this file manually loaded?
Definition at line 85 of file OgreResource.h. |
|
Definition at line 298 of file OgreRenderTarget.h. |
|
Definition at line 299 of file OgreRenderTarget.h. |
|
Definition at line 312 of file OgreRenderTarget.h. |
|
Optional manual loader; if provided, data is loaded from here instead of a file.
Definition at line 89 of file OgreResource.h. |
|
The name of this target.
Definition at line 284 of file OgreRenderTarget.h. |
|
Unique name of the resource.
Definition at line 75 of file OgreResource.h. |
|
Definition at line 233 of file OgreTexture.h. |
|
Origin of this resource (e.g. script name) - optional.
Definition at line 87 of file OgreResource.h. |
|
Class name for this instance to be used as a lookup (must be initialised by subclasses).
Definition at line 158 of file OgreStringInterface.h. |
|
The priority of the render target.
Definition at line 286 of file OgreRenderTarget.h. |
|
Dictionary of parameters.
Definition at line 155 of file OgreStringInterface.h. |
|
The size of the resource in bytes.
Definition at line 83 of file OgreResource.h. |
|
Definition at line 240 of file OgreTexture.h. |
|
Definition at line 241 of file OgreTexture.h. |
|
Definition at line 241 of file OgreTexture.h. |
|
Definition at line 294 of file OgreRenderTarget.h. |
|
Definition at line 236 of file OgreTexture.h. |
|
Definition at line 296 of file OgreRenderTarget.h. |
|
Definition at line 238 of file OgreTexture.h. |
|
List of viewports, map on Z-order.
Definition at line 309 of file OgreRenderTarget.h. |
|
Definition at line 288 of file OgreRenderTarget.h. |
|
Definition at line 230 of file OgreTexture.h. |
Copyright © 2000-2005 by The OGRE Team
Last modified Wed Feb 23 00:22:28 2005