#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 } |
Public Methods | |
RenderTexture (const String &name, uint width, uint height, TextureType texType=TEX_TYPE_2D) | |
~RenderTexture () | |
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 | setStatsDisplay (StatFlags sf) |
DEPRECATED Set what kind of statistics display (if any) should be displayed by the system about 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 | outputText (int x, int y, const String &text)=0 |
DEPRECATED Outputs text to the target at the specified co-ordinates. | |
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 retrieve the active state of the render target. | |
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. | |
Protected Types | |
typedef std::map< int, Viewport *, std::less< int > > | ViewportList |
typedef std::vector< RenderTargetListener * > | RenderTargetListenerList |
Protected Methods | |
RenderTexture () | |
virtual void | firePostUpdate () |
internal method for firing events | |
virtual void | _copyToTexture ()=0 |
void | updateStats (void) |
virtual void | firePreUpdate (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 | |
Texture * | mTexture |
The texture that gets accesses by the rest of the API. | |
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 |
StatFlags | mStatFlags |
FrameStats | mStats |
Timer * | mTimer |
String | mDebugText |
unsigned long | mLastSecond |
unsigned long | mLastTime |
size_t | mFrameCount |
bool | mActive |
ViewportList | mViewportList |
List of viewports, map on Z-order. | |
RenderTargetListenerList | mListeners |
|
Definition at line 307 of file OgreRenderTarget.h. |
|
Definition at line 303 of file OgreRenderTarget.h. |
|
Definition at line 58 of file OgreRenderTarget.h. |
|
Definition at line 32 of file OgreRenderTexture.cpp. References Except, Ogre::RenderTarget::mHeight, Ogre::RenderTarget::mName, Ogre::RenderTarget::mPriority, mTexture, Ogre::RenderTarget::mWidth, OGRE_REND_TO_TEX_RT_GROUP, Ogre::PF_R8G8B8, Ogre::TEX_TYPE_2D, Ogre::TEX_TYPE_CUBE_MAP, Ogre::TextureType, Ogre::TU_RENDERTARGET, and Ogre::uint. |
|
Definition at line 51 of file OgreRenderTexture.cpp. References Ogre::RenderTarget::mName, and mTexture. |
|
Definition at line 40 of file OgreRenderTexture.h. |
|
Implemented in Ogre::D3D7RenderTexture, Ogre::D3D9RenderTexture, and Ogre::GLRenderTexture. Referenced by firePostUpdate(). |
|
Add a listener to this RenderTarget which will be called back before & after rendering.
Definition at line 286 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mListeners. |
|
Adds a viewport to the rendering target.
Definition at line 122 of file OgreRenderTarget.cpp. References Except, and Ogre::RenderTarget::mViewportList. |
|
internal method for firing events
Reimplemented from Ogre::RenderTarget. Definition at line 57 of file OgreRenderTexture.cpp. References _copyToTexture(). |
|
internal method for firing events
Definition at line 310 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mListeners, and Ogre::RenderTargetEvent::source. Referenced by Ogre::RenderTarget::update(). |
|
internal method for firing events
Definition at line 380 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mListeners, and Ogre::RenderTargetViewportEvent::source. Referenced by Ogre::RenderTarget::update(). |
|
internal method for firing events
Definition at line 366 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mListeners, and Ogre::RenderTargetViewportEvent::source. Referenced by Ogre::RenderTarget::update(). |
|
Individual stats access - gets the average frames per second (FPS) since call to Root::startRendering.
Definition at line 195 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::FrameStats::avgFPS, and Ogre::RenderTarget::mStats. |
|
Individual stats access - gets the best frames per second (FPS) since call to Root::startRendering.
Definition at line 199 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::FrameStats::bestFPS, and Ogre::RenderTarget::mStats. |
|
Individual stats access - gets the best frame time.
Definition at line 213 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::FrameStats::bestFrameTime, and Ogre::RenderTarget::mStats. |
|
Definition at line 89 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mColourDepth. |
|
Gets a custom (maybe platform-specific) attribute.
Reimplemented in Ogre::D3D7RenderWindow, Ogre::D3D7RenderTexture, Ogre::D3D9RenderWindow, and Ogre::D3D9RenderTexture. Definition at line 271 of file OgreRenderTarget.cpp. References Except. Referenced by Ogre::D3D9RenderSystem::_setViewport(), Ogre::D3DRenderSystem::_setViewport(), Ogre::D3D9RenderSystem::createRenderWindow(), and Ogre::D3DRenderSystem::createRenderWindow(). |
|
Returns the debug text.
Definition at line 281 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mDebugText. |
|
Definition at line 85 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mHeight. Referenced by Ogre::GLRenderSystem::_setViewport(), and Ogre::Viewport::_updateDimensions(). |
|
Individual stats access - gets the number of frames per second (FPS) based on the last frame rendered.
Definition at line 191 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::FrameStats::lastFPS, and Ogre::RenderTarget::mStats. |
|
Retrieve information about the render target.
Definition at line 74 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mColourDepth, Ogre::RenderTarget::mHeight, and Ogre::RenderTarget::mWidth. |
|
Retrieve target's name.
Definition at line 68 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mName. Referenced by Ogre::RenderSystem::attachRenderTarget(), Ogre::Root::detachRenderTarget(), Ogre::D3D9RenderWindow::WndProc(), and Ogre::D3D7RenderWindow::WndProc(). |
|
Returns the number of viewports attached to this target.
Definition at line 340 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mViewportList. |
|
Gets the priority of a render target.
Definition at line 256 of file OgreRenderTarget.h. References Ogre::uchar. Referenced by Ogre::RenderSystem::attachRenderTarget(). |
|
Definition at line 186 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mStats. |
|
Retieves details of current rendering performance.
Definition at line 173 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::FrameStats::avgFPS, Ogre::RenderTarget::FrameStats::bestFPS, Ogre::RenderTarget::FrameStats::lastFPS, Ogre::RenderTarget::mStats, and Ogre::RenderTarget::FrameStats::worstFPS. |
|
Gets the number of triangles rendered in the last update() call.
Definition at line 208 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mStats, and Ogre::RenderTarget::FrameStats::triangleCount. |
|
Retrieves a pointer to the viewport with the given index.
Definition at line 346 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mViewportList. |
|
Definition at line 81 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mWidth. Referenced by Ogre::Viewport::_updateDimensions(). |
|
Individual stats access - gets the worst frames per second (FPS) since call to Root::startRendering.
Definition at line 203 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mStats, and Ogre::RenderTarget::FrameStats::worstFPS. |
|
Individual stats access - gets the worst frame time.
Definition at line 218 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mStats, and Ogre::RenderTarget::FrameStats::worstFrameTime. |
|
Used to retrieve or set the active state of the render target.
Reimplemented in Ogre::D3D7RenderWindow, Ogre::D3D9RenderWindow, Ogre::SDLWindow, and Ogre::Win32Window. Definition at line 356 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mActive. |
|
DEPRECATED Outputs text to the target at the specified co-ordinates.
Implemented in Ogre::D3D7RenderWindow, Ogre::D3D7RenderTexture, Ogre::D3D9RenderWindow, Ogre::D3D9RenderTexture, Ogre::GLRenderTexture, Ogre::SDLWindow, and Ogre::Win32Window. |
|
Removes all listeners from this instance.
Definition at line 305 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mListeners. |
|
Removes all viewports on this target.
Definition at line 156 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mViewportList. |
|
Removes a RenderTargetListener previously registered using addListener.
Definition at line 291 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mListeners. |
|
Removes a viewport at a given ZOrder.
Definition at line 145 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mViewportList. |
|
|
|
Used to retrieve the active state of the render target.
Reimplemented in Ogre::D3D9RenderWindow, and Ogre::Win32Window. Definition at line 361 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mActive. |
|
Adds debug text to this window.
Definition at line 276 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mDebugText. |
|
Sets the priority of this render target in relation to the others.
Definition at line 254 of file OgreRenderTarget.h. References Ogre::uchar. |
|
DEPRECATED Set what kind of statistics display (if any) should be displayed by the system about this target.
Definition at line 168 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::mStatFlags. |
|
Tells the target to update it's contents.
Reimplemented in Ogre::RenderWindow. Definition at line 94 of file OgreRenderTarget.cpp. References Ogre::RenderTarget::firePostUpdate(), Ogre::RenderTarget::firePreUpdate(), Ogre::RenderTarget::fireViewportPostUpdate(), Ogre::RenderTarget::fireViewportPreUpdate(), Ogre::RenderTarget::mStats, Ogre::RenderTarget::mViewportList, Ogre::RenderTarget::FrameStats::triangleCount, and Ogre::RenderTarget::updateStats(). |
|
|
Writes the current contents of the render target to the named file.
Implemented in Ogre::D3D7RenderWindow, Ogre::D3D7RenderTexture, Ogre::D3D9RenderWindow, Ogre::D3D9RenderTexture, Ogre::GLRenderTexture, Ogre::SDLWindow, and Ogre::Win32Window. Referenced by Ogre::RenderTarget::writeContentsToTimestampedFile(). |
|
Writes the current contents of the render target to the (PREFIX)(time-stamp)(SUFFIX) file.
Definition at line 394 of file OgreRenderTarget.cpp. References Ogre::Timer::getMilliseconds(), Ogre::RenderTarget::mTimer, and Ogre::RenderTarget::writeContentsToFile(). |
|
Reimplemented in Ogre::D3D7RenderWindow, Ogre::D3D9RenderWindow, Ogre::SDLWindow, and Ogre::Win32Window. Definition at line 299 of file OgreRenderTarget.h. Referenced by Ogre::RenderTarget::isActive(), Ogre::RenderTarget::RenderTarget(), and Ogre::RenderTarget::setActive(). |
|
Definition at line 286 of file OgreRenderTarget.h. Referenced by Ogre::Win32Window::create(), Ogre::D3D9RenderWindow::create(), Ogre::D3D7RenderWindow::create(), Ogre::D3D7RenderWindow::createDDSurfaces(), Ogre::D3D7RenderWindow::createDepthBuffer(), Ogre::RenderTarget::getColourDepth(), Ogre::RenderWindow::getMetrics(), and Ogre::RenderTarget::getMetrics(). |
|
Definition at line 294 of file OgreRenderTarget.h. Referenced by Ogre::RenderTarget::getDebugText(), and Ogre::RenderTarget::setDebugText(). |
|
Definition at line 297 of file OgreRenderTarget.h. Referenced by Ogre::RenderTarget::resetStatistics(), and Ogre::RenderTarget::updateStats(). |
|
|
Definition at line 287 of file OgreRenderTarget.h. Referenced by Ogre::Win32Window::create(), Ogre::D3D9RenderWindow::create(), Ogre::D3D7RenderWindow::create(), and Ogre::D3D7RenderWindow::createDepthBuffer(). |
|
Definition at line 295 of file OgreRenderTarget.h. Referenced by Ogre::RenderTarget::resetStatistics(), and Ogre::RenderTarget::updateStats(). |
|
Definition at line 296 of file OgreRenderTarget.h. Referenced by Ogre::RenderTarget::resetStatistics(), and Ogre::RenderTarget::updateStats(). |
|
Definition at line 308 of file OgreRenderTarget.h. Referenced by Ogre::RenderTarget::addListener(), Ogre::RenderTarget::firePostUpdate(), Ogre::RenderTarget::firePreUpdate(), Ogre::RenderTarget::fireViewportPostUpdate(), Ogre::RenderTarget::fireViewportPreUpdate(), Ogre::RenderTarget::removeAllListeners(), and Ogre::RenderTarget::removeListener(). |
|
The name of this target.
Definition at line 280 of file OgreRenderTarget.h. Referenced by Ogre::Win32Window::create(), Ogre::SDLWindow::create(), Ogre::D3D9RenderWindow::create(), Ogre::D3D7RenderWindow::create(), Ogre::D3D7RenderTexture::D3D7RenderTexture(), Ogre::D3D9RenderTexture::D3D9RenderTexture(), Ogre::RenderTarget::getName(), RenderTexture(), Ogre::RenderTarget::~RenderTarget(), and ~RenderTexture(). |
|
The priority of the render target.
Definition at line 282 of file OgreRenderTarget.h. Referenced by Ogre::RenderTarget::RenderTarget(), and RenderTexture(). |
|
Definition at line 290 of file OgreRenderTarget.h. Referenced by Ogre::RenderTarget::RenderTarget(), and Ogre::RenderTarget::setStatsDisplay(). |
|
|
The texture that gets accesses by the rest of the API.
Definition at line 47 of file OgreRenderTexture.h. Referenced by Ogre::GLRenderTexture::_copyToTexture(), Ogre::D3D9RenderTexture::_copyToTexture(), Ogre::D3D7RenderTexture::_copyToTexture(), RenderTexture(), and ~RenderTexture(). |
|
Definition at line 293 of file OgreRenderTarget.h. Referenced by Ogre::RenderTarget::RenderTarget(), Ogre::RenderTarget::resetStatistics(), Ogre::RenderTarget::updateStats(), and Ogre::RenderTarget::writeContentsToTimestampedFile(). |
|
List of viewports, map on Z-order.
Definition at line 305 of file OgreRenderTarget.h. Referenced by Ogre::RenderTarget::addViewport(), Ogre::RenderTarget::getNumViewports(), Ogre::RenderTarget::getViewport(), Ogre::RenderTarget::removeAllViewports(), Ogre::RenderTarget::removeViewport(), Ogre::Win32Window::resize(), Ogre::SDLWindow::resize(), Ogre::D3D9RenderWindow::resize(), Ogre::D3D7RenderWindow::resize(), Ogre::RenderTarget::update(), Ogre::D3D7RenderWindow::windowMovedOrResized(), and Ogre::RenderTarget::~RenderTarget(). |
|
Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:19:38 2004