#include <OgreD3D7RenderWindow.h>
Inheritance diagram for Ogre::D3D7RenderWindow:
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 | |
D3D7RenderWindow (HINSTANCE instance, DDDriver *driver) | |
~D3D7RenderWindow () | |
void | create (const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams) |
Creates & displays the new window. | |
void | destroy (void) |
Overridden - see RenderWindow. | |
bool | isActive (void) const |
Overridden - see RenderWindow. | |
bool | isClosed (void) const |
Overridden - see RenderWindow. | |
void | reposition (int left, int top) |
Overridden - see RenderWindow. | |
void | resize (unsigned int width, unsigned int height) |
Overridden - see RenderWindow. | |
void | swapBuffers (bool waitForVSync) |
Overridden - see RenderWindow. | |
HWND | getWindowHandle (void) const |
Retrieves a handle to the window (Win32 specific). | |
HWND | getParentWindowHandle (void) const |
Retrieves a handle to the window's parent, or 0 if there is no parent. | |
bool | isUsingDirectDraw (void) const |
Returns true if this window is using DirectDraw. | |
DDDriver * | getDirectDrawDriver (void) |
Retrieves a pointer to the DirectDraw wrapper object used to manage the window's surface. | |
LPDIRECTDRAWSURFACE7 | getDDFrontBuffer (void) |
Returns a pointer to a DirectDraw surface containing the front buffer. | |
LPDIRECTDRAWSURFACE7 | getDDBackBuffer (void) |
Returns a pointer to a DirectDraw surface containing the back buffer. | |
LPDIRECT3DDEVICE7 | getD3DDevice (void) |
Returns a pointer to the Direct3D device that works with this window. | |
bool | requiresTextureFlipping () const |
void | getCustomAttribute (const String &name, void *pData) |
Overridden - see RenderTarget. | |
void | writeContentsToFile (const String &filename) |
Overridden - see RenderTarget. | |
void | createDDSurfaces (void) |
void | releaseDDSurfaces (void) |
void | restoreDDSurfaces (void) |
void | createDepthBuffer (void) |
virtual bool | isVisible (void) const |
Indicates whether the window is visible (not minimized or obscured). | |
virtual bool | isPrimary (void) const |
Indicates wether the window is the primary window. | |
virtual void | update (void) |
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 void | getMetrics (unsigned int &width, unsigned int &height, unsigned int &colourDepth) |
Retrieve information about the render target. | |
virtual const String & | getName (void) const |
Retrieve target's name. | |
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 | 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 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 String | writeContentsToTimestampedFile (const String &filenamePrefix, const String &filenameSuffix) |
Writes the current contents of the render target to the (PREFIX)(time-stamp)(SUFFIX) file. | |
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. | |
Protected Types | |
typedef std::map< int, Viewport *, std::less< int > > | ViewportList |
typedef std::vector< RenderTargetListener * > | RenderTargetListenerList |
Protected Member Functions | |
void | windowMovedOrResized (void) |
Notify that the window has been resized externally. | |
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 | |
Static Protected Member Functions | |
LRESULT CALLBACK | WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
Protected Attributes | |
HINSTANCE | mInstance |
DDDriver * | mDriver |
bool | mIsUsingDirectDraw |
HWND | mHWnd |
HWND | mParentHWnd |
bool | mActive |
bool | mReady |
bool | mClosed |
RECT | rcBlitDest |
DDDriver * | mlpDDDriver |
LPDIRECTDRAWSURFACE7 | mlpDDSFront |
LPDIRECTDRAWSURFACE7 | mlpDDSBack |
LPDIRECT3DDEVICE7 | mlpD3DDevice |
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 |
String | mDebugText |
unsigned long | mLastSecond |
unsigned long | mLastTime |
size_t | mFrameCount |
bool | mAutoUpdate |
ViewportList | mViewportList |
List of viewports, map on Z-order. | |
RenderTargetListenerList | mListeners |
Friends | |
class | Root |
Definition at line 42 of file OgreD3D7RenderWindow.h.
|
Definition at line 319 of file OgreRenderTarget.h. |
|
Definition at line 315 of file OgreRenderTarget.h. |
|
Definition at line 58 of file OgreRenderTarget.h. |
|
|
|
|
|
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 176 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.
Implements Ogre::RenderWindow. |
|
|
|
|
|
Overridden - see RenderWindow.
Implements Ogre::RenderWindow. |
|
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.
|
|
|
|
Overridden - see RenderTarget.
Reimplemented from Ogre::RenderTarget. |
|
Returns a pointer to the Direct3D device that works with this window.
|
|
Returns a pointer to a DirectDraw surface containing the back buffer. Only applicable if using DirectDraw. |
|
Returns a pointer to a DirectDraw surface containing the front buffer.
|
|
Returns the debug text.
|
|
Retrieves a pointer to the DirectDraw wrapper object used to manage the window's surface. (Win32 specific)
|
|
|
|
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.
|
|
Retrieves a handle to the window's parent, or 0 if there is no parent.
|
|
Gets the priority of a render target.
Definition at line 239 of file OgreRenderTarget.h. References Ogre::uchar. |
|
|
|
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.
|
|
|
|
Retrieves a handle to the window (Win32 specific).
|
|
Individual stats access - gets the worst frames per second (FPS) since call to Root::startRendering.
|
|
Individual stats access - gets the worst frame time.
|
|
Overridden - see RenderWindow.
Reimplemented from Ogre::RenderWindow. |
|
Gets whether this target is automatically updated if Ogre's rendering loop or Root::_updateAllRenderTargets is being used.
|
|
Overridden - see RenderWindow.
Implements Ogre::RenderWindow. |
|
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. |
|
Returns true if this window is using DirectDraw.
|
|
Indicates whether the window is visible (not minimized or obscured).
Reimplemented in Ogre::D3D9RenderWindow, and Ogre::Win32Window. Definition at line 109 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.
|
|
Overridden - see RenderWindow.
Implements Ogre::RenderWindow. |
|
Implements Ogre::RenderTarget. Definition at line 112 of file OgreD3D7RenderWindow.h. |
|
Resets saved frame-rate statistices.
|
|
Overridden - see RenderWindow.
Implements Ogre::RenderWindow. |
|
|
|
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.
|
|
Adds debug text to this window.
|
|
Sets the priority of this render target in relation to the others.
Definition at line 237 of file OgreRenderTarget.h. References Ogre::uchar. |
|
Overridden - see RenderWindow.
Implements Ogre::RenderWindow. |
|
Updates the window contents.
Reimplemented from Ogre::RenderTarget. Reimplemented in Ogre::D3D9RenderWindow. |
|
|
|
Notify that the window has been resized externally.
Reimplemented from Ogre::RenderWindow. |
|
|
|
Overridden - see RenderTarget.
Implements Ogre::RenderTarget. |
|
Writes the current contents of the render target to the (PREFIX)(time-stamp)(SUFFIX) file.
|
|
Definition at line 178 of file OgreRenderWindow.h. |
|
Reimplemented from Ogre::RenderTarget. Definition at line 134 of file OgreD3D7RenderWindow.h. |
|
Definition at line 311 of file OgreRenderTarget.h. |
|
Definition at line 136 of file OgreD3D7RenderWindow.h. |
|
Definition at line 298 of file OgreRenderTarget.h. |
|
Definition at line 305 of file OgreRenderTarget.h. |
|
Definition at line 129 of file OgreD3D7RenderWindow.h. |
|
Definition at line 308 of file OgreRenderTarget.h. |
|
Definition at line 297 of file OgreRenderTarget.h. |
|
Definition at line 132 of file OgreD3D7RenderWindow.h. |
|
Definition at line 128 of file OgreD3D7RenderWindow.h. |
|
Definition at line 299 of file OgreRenderTarget.h. |
|
Definition at line 168 of file OgreRenderWindow.h. |
|
Definition at line 169 of file OgreRenderWindow.h. |
|
Definition at line 131 of file OgreD3D7RenderWindow.h. |
|
Definition at line 306 of file OgreRenderTarget.h. |
|
Definition at line 307 of file OgreRenderTarget.h. |
|
Definition at line 170 of file OgreRenderWindow.h. |
|
Definition at line 320 of file OgreRenderTarget.h. |
|
Definition at line 160 of file OgreD3D7RenderWindow.h. |
|
Definition at line 153 of file OgreD3D7RenderWindow.h. |
|
Definition at line 157 of file OgreD3D7RenderWindow.h. |
|
Definition at line 156 of file OgreD3D7RenderWindow.h. |
|
The name of this target.
Definition at line 292 of file OgreRenderTarget.h. |
|
Definition at line 133 of file OgreD3D7RenderWindow.h. |
|
The priority of the render target.
Definition at line 294 of file OgreRenderTarget.h. |
|
Definition at line 135 of file OgreD3D7RenderWindow.h. |
|
Definition at line 302 of file OgreRenderTarget.h. |
|
Definition at line 304 of file OgreRenderTarget.h. |
|
Definition at line 171 of file OgreRenderWindow.h. |
|
List of viewports, map on Z-order.
Definition at line 317 of file OgreRenderTarget.h. |
|
Definition at line 296 of file OgreRenderTarget.h. |
|
Definition at line 138 of file OgreD3D7RenderWindow.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 13:08:12 2006