#include <OgreRenderWindow.h>
Inheritance diagram for Ogre::RenderWindow:
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 | |
RenderWindow () | |
Default constructor. | |
virtual void | create (const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams)=0 |
Creates & displays the new window. | |
virtual void | setFullscreen (bool fullScreen, unsigned int width, unsigned int height) |
Alter fullscreen mode options. | |
virtual void | destroy (void)=0 |
Destroys the window. | |
virtual void | resize (unsigned int width, unsigned int height)=0 |
Alter the size of the window. | |
virtual void | windowMovedOrResized () |
Notify that the window has been resized. | |
virtual void | reposition (int left, int top)=0 |
Reposition the window. | |
virtual bool | isVisible (void) const |
Indicates whether the window is visible (not minimized or obscured). | |
virtual void | setVisible (bool visible) |
Set the visibility state. | |
virtual bool | isActive (void) const |
Overridden from RenderTarget, flags invisible windows as inactive. | |
virtual bool | isClosed (void) const =0 |
Indicates whether the window has been closed by the user. | |
virtual bool | isPrimary (void) const |
Indicates wether the window is the primary window. | |
virtual void | swapBuffers (bool waitForVSync=true)=0 |
Swaps the frame buffers to display the next frame. | |
virtual void | update (void) |
| |
virtual void | update (bool swapBuffers) |
Updates the window contents. | |
virtual bool | isFullScreen (void) const |
Returns true if window is running in fullscreen mode. | |
virtual void | getMetrics (unsigned int &width, unsigned int &height, unsigned int &colourDepth, int &left, int &top) |
Overloaded version of getMetrics from RenderTarget, including extra details specific to windowing systems. | |
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 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 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 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 Impl * | _getImpl () |
Get rendersystem specific interface for this RenderTarget. | |
Protected Types | |
typedef std::map< int, Viewport *, std::less< int > > | ViewportList |
typedef std::vector< RenderTargetListener * > | RenderTargetListenerList |
Protected Member Functions | |
void | _setPrimary () |
Indicates that this is the primary window. | |
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 | |
Protected Attributes | |
bool | mIsFullScreen |
bool | mIsPrimary |
int | mLeft |
int | mTop |
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 |
ViewportList | mViewportList |
List of viewports, map on Z-order. | |
RenderTargetListenerList | mListeners |
Friends | |
class | Root |
Instances are created and communicated with by the render system although client programs can get a reference to it from the render system if required for resizing or moving. Note that you can have multiple viewpoints in the window for effects like rear-view mirrors and picture-in-picture views (see Viewport and Camera).
Definition at line 55 of file OgreRenderWindow.h.
|
Definition at line 339 of file OgreRenderTarget.h. |
|
Definition at line 335 of file OgreRenderTarget.h. |
|
Definition at line 62 of file OgreRenderTarget.h. |
|
Default constructor.
|
|
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.
|
|
Indicates that this is the primary window. Only to be called by Ogre::Root Definition at line 199 of file OgreRenderWindow.h. |
|
Add a listener to this RenderTarget which will be called back before & after rendering.
|
|
Adds a viewport to the rendering target.
|
|
Creates & displays the new window.
|
|
Destroys the window.
|
|
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.
|
|
|
|
Individual stats access - gets the number of frames per second (FPS) based on the last frame rendered.
|
|
Retrieve information about the render target.
|
|
Overloaded version of getMetrics from RenderTarget, including extra details specific to windowing systems.
|
|
Retrieve target's name.
|
|
Returns the number of viewports attached to this target.
|
|
Gets the priority of a render target.
Definition at line 238 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.
|
|
Overridden from RenderTarget, flags invisible windows as inactive.
Reimplemented from Ogre::RenderTarget. Definition at line 126 of file OgreRenderWindow.h. |
|
Gets whether this target is automatically updated if Ogre's rendering loop or Root::_updateAllRenderTargets is being used.
|
|
Indicates whether the window has been closed by the user.
|
|
Returns true if window is running in fullscreen mode.
|
|
Indicates wether the window 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 from Ogre::RenderTarget. |
|
Indicates whether the window is visible (not minimized or obscured).
Definition at line 118 of file OgreRenderWindow.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.
|
|
Reposition the window.
|
|
|
|
Resets saved frame-rate statistices.
|
|
Alter the size of the window.
|
|
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.
|
|
Alter fullscreen mode options.
Definition at line 96 of file OgreRenderWindow.h. |
|
Sets the priority of this render target in relation to the others.
Definition at line 236 of file OgreRenderTarget.h. |
|
Set the visibility state.
Definition at line 122 of file OgreRenderWindow.h. |
|
Swaps the frame buffers to display the next frame.
|
|
Updates the window contents.
|
|
Reimplemented from Ogre::RenderTarget. |
|
|
|
Notify that the window has been resized.
Definition at line 110 of file OgreRenderWindow.h. |
|
Writes the current contents of the render target to the named file.
Implemented in Ogre::RenderTexture, and Ogre::MultiRenderTarget. |
|
Writes the current contents of the render target to the (PREFIX)(time-stamp)(SUFFIX) file.
|
|
Definition at line 201 of file OgreRenderWindow.h. |
|
Definition at line 330 of file OgreRenderTarget.h. |
|
Definition at line 331 of file OgreRenderTarget.h. |
|
Definition at line 319 of file OgreRenderTarget.h. |
|
Definition at line 328 of file OgreRenderTarget.h. |
|
Definition at line 318 of file OgreRenderTarget.h. |
|
Definition at line 320 of file OgreRenderTarget.h. |
|
Definition at line 191 of file OgreRenderWindow.h. |
|
Definition at line 192 of file OgreRenderWindow.h. |
|
Definition at line 326 of file OgreRenderTarget.h. |
|
Definition at line 327 of file OgreRenderTarget.h. |
|
Definition at line 193 of file OgreRenderWindow.h. |
|
Definition at line 340 of file OgreRenderTarget.h. |
|
The name of this target.
Definition at line 313 of file OgreRenderTarget.h. |
|
The priority of the render target.
Definition at line 315 of file OgreRenderTarget.h. |
|
Definition at line 323 of file OgreRenderTarget.h. |
|
Definition at line 325 of file OgreRenderTarget.h. |
|
Definition at line 194 of file OgreRenderWindow.h. |
|
List of viewports, map on Z-order.
Definition at line 337 of file OgreRenderTarget.h. |
|
Definition at line 317 of file OgreRenderTarget.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 30 10:52:40 2007