Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::DDDriver Class Reference

Encapsulates a DirectDraw driver. More...

#include <OgreDDDriver.h>

List of all members.

Public Methods

 DDDriver ()
 DDDriver (const DDDriver &ob)
 DDDriver (GUID FAR *lpGuid, LPSTR lpDriverDescription, LPSTR lpDriverName)
 ~DDDriver ()
void createWindowSurfaces (HWND hWnd, unsigned int width, unsigned int height, unsigned int colourDepth, bool fullScreen, LPDIRECTDRAWSURFACE7 *front, LPDIRECTDRAWSURFACE7 *back)
 Creates DirectDraw surfaces appropriate for a render window.

void Cleanup (void)
void CheckWindow (void)
DDDriver operator= (const DDDriver &orig)
String DriverName (void) const
String DriverDescription (void) const
LPDIRECTDRAW7 directDraw ()
D3DDeviceListget3DDeviceList (void)
DDVideoModeListgetVideoModeList (void)
DDVideoModegetActiveVideoMode (void)
D3DDeviceget3DDevice (void)
void OutputText (int x, int y, char *text)
void FlipBuffers (void)
bool RunningFullScreen (void) const
RECT ViewportRect (void) const
bool Has3DAcceleration (void) const
bool CanRenderWindowed (void) const
void GetDisplayDetails (unsigned int &width, unsigned int &height, unsigned int &colourDepth)

Private Methods

void logCaps (void) const
void RestoreSurfaces (void)

Private Attributes

String mDriverName
String mDriverDesc
GUID mGuid
bool mPrimaryDisplay
LPDIRECTDRAW7 lpDD7
LPDIRECT3D7 lpD3D
D3DDeviceListmDeviceList
DDVideoModeListmVideoModeList
D3DDeviceactive3DDevice
DDVideoModeactiveVideoMode
HWND activeHWnd
DDCAPS mSWCaps
DDCAPS mHWCaps
LPDIRECTDRAWSURFACE7 lpDDSPrimary
LPDIRECTDRAWSURFACE7 lpDDSBack
bool runningFullScreen
bool using3DMode
RECT rcViewport
LPDIRECTDRAWCLIPPER lpDDClipper


Detailed Description

Encapsulates a DirectDraw driver.

Utility class for D3DRenderSystem.

Definition at line 45 of file OgreDDDriver.h.


Constructor & Destructor Documentation

Ogre::DDDriver::DDDriver  
 

Definition at line 65 of file OgreDDDriver.cpp.

References active3DDevice, activeHWnd, activeVideoMode, lpD3D, lpDD7, lpDDClipper, lpDDSBack, lpDDSPrimary, mDeviceList, and mVideoModeList.

Ogre::DDDriver::DDDriver const DDDriver &    ob
 

Definition at line 94 of file OgreDDDriver.cpp.

References active3DDevice, activeVideoMode, lpD3D, lpDD7, lpDDClipper, lpDDSBack, lpDDSPrimary, mDeviceList, mDriverDesc, mDriverName, mGuid, mHWCaps, mPrimaryDisplay, mSWCaps, and mVideoModeList.

Ogre::DDDriver::DDDriver GUID FAR *    lpGuid,
LPSTR    lpDriverDescription,
LPSTR    lpDriverName
 

Definition at line 121 of file OgreDDDriver.cpp.

References active3DDevice, activeHWnd, activeVideoMode, directDraw(), lpD3D, lpDD7, lpDDClipper, lpDDSBack, lpDDSPrimary, mDeviceList, mDriverDesc, mDriverName, mGuid, mHWCaps, mPrimaryDisplay, mSWCaps, and mVideoModeList.

Ogre::DDDriver::~DDDriver  
 

Definition at line 82 of file OgreDDDriver.cpp.

References mDeviceList, and mVideoModeList.


Member Function Documentation

bool Ogre::DDDriver::CanRenderWindowed void    const
 

Definition at line 522 of file OgreDDDriver.cpp.

References mHWCaps.

Referenced by logCaps(), and Ogre::D3DRenderSystem::refreshDDSettings().

void Ogre::DDDriver::CheckWindow void   
 

Definition at line 407 of file OgreDDDriver.cpp.

References activeHWnd, rcViewport, and RunningFullScreen().

void Ogre::DDDriver::Cleanup void   
 

Definition at line 364 of file OgreDDDriver.cpp.

References active3DDevice, activeHWnd, Ogre::D3DDevice::Cleanup(), lpD3D, lpDD7, lpDDSBack, and lpDDSPrimary.

Referenced by Ogre::D3DRenderSystem::shutdown(), and Ogre::DDDriverList::~DDDriverList().

void Ogre::DDDriver::createWindowSurfaces HWND    hWnd,
unsigned int    width,
unsigned int    height,
unsigned int    colourDepth,
bool    fullScreen,
LPDIRECTDRAWSURFACE7 *    front,
LPDIRECTDRAWSURFACE7 *    back
 

Creates DirectDraw surfaces appropriate for a render window.

Remarks:
This method creates double-buffered surfaces for a window. Note that in this case the metrics supplied (width, height) must be of the CLIENT area of a window only if fullScreen = false; i.e. the metrics must be ignoring title bar, menu bar etc.
Parameters:
hWnd  Window handle to the window for which the surfaces are created.
width  The width of the surfaces required (see note above).
height  The height of the surfaces required (see note above).
colourDepth  The colour depth in bits per pixel. Only relevant if fullScreen = true.
fullScreen  Specify true to make these surfaces full screen exclusive.
front  Pointer to a pointer which will be filled with the interface to the front buffer on return.
back  Pointer to a pointer which will be filled with the interface to the back buffer on return. Only relevant if fullScreen = false.

Definition at line 171 of file OgreDDDriver.cpp.

References directDraw(), and lpDD7.

Referenced by Ogre::D3D7RenderWindow::createDDSurfaces().

LPDIRECTDRAW7 Ogre::DDDriver::directDraw  
 

Definition at line 339 of file OgreDDDriver.cpp.

References lpD3D, lpDD7, and mGuid.

Referenced by createWindowSurfaces(), DDDriver(), and Ogre::D3D7RenderWindow::writeContentsToFile().

String Ogre::DDDriver::DriverDescription void    const
 

Definition at line 306 of file OgreDDDriver.cpp.

References mDriverDesc.

Referenced by Ogre::D3DRenderSystem::initConfigOptions(), Ogre::D3DRenderSystem::initialise(), Ogre::D3DRenderSystem::refreshDDSettings(), and Ogre::D3DRenderSystem::validateConfigOptions().

String Ogre::DDDriver::DriverName void    const
 

Definition at line 301 of file OgreDDDriver.cpp.

References mDriverName.

void Ogre::DDDriver::FlipBuffers void   
 

Definition at line 441 of file OgreDDDriver.cpp.

References lpDDSBack, lpDDSPrimary, rcViewport, and RestoreSurfaces().

D3DDevice * Ogre::DDDriver::get3DDevice void   
 

Definition at line 333 of file OgreDDDriver.cpp.

References active3DDevice.

D3DDeviceList * Ogre::DDDriver::get3DDeviceList void   
 

Definition at line 311 of file OgreDDDriver.cpp.

References lpD3D, and mDeviceList.

Referenced by Ogre::D3D7RenderWindow::create(), and Ogre::D3D7RenderWindow::createDepthBuffer().

DDVideoMode * Ogre::DDDriver::getActiveVideoMode void   
 

Definition at line 327 of file OgreDDDriver.cpp.

References activeVideoMode.

void Ogre::DDDriver::GetDisplayDetails unsigned int &    width,
unsigned int &    height,
unsigned int &    colourDepth
 

Definition at line 535 of file OgreDDDriver.cpp.

References lpDDSPrimary.

DDVideoModeList * Ogre::DDDriver::getVideoModeList void   
 

Definition at line 319 of file OgreDDDriver.cpp.

References lpDD7, and mVideoModeList.

Referenced by Ogre::D3DRenderSystem::initialise(), and Ogre::D3DRenderSystem::refreshDDSettings().

bool Ogre::DDDriver::Has3DAcceleration void    const
 

Definition at line 528 of file OgreDDDriver.cpp.

References mHWCaps.

Referenced by logCaps().

void Ogre::DDDriver::logCaps void    const [private]
 

Definition at line 555 of file OgreDDDriver.cpp.

References CanRenderWindowed(), and Has3DAcceleration().

DDDriver Ogre::DDDriver::operator= const DDDriver &    orig
 

Definition at line 35 of file OgreDDDriver.cpp.

References active3DDevice, activeVideoMode, lpD3D, lpDD7, lpDDClipper, lpDDSBack, lpDDSPrimary, mDeviceList, mDriverDesc, mDriverName, mGuid, mHWCaps, mPrimaryDisplay, mSWCaps, and mVideoModeList.

void Ogre::DDDriver::OutputText int    x,
int    y,
char *    text
 

Definition at line 495 of file OgreDDDriver.cpp.

References lpDDSBack.

void Ogre::DDDriver::RestoreSurfaces void    [private]
 

Definition at line 475 of file OgreDDDriver.cpp.

References lpDDSBack, and lpDDSPrimary.

Referenced by FlipBuffers().

bool Ogre::DDDriver::RunningFullScreen void    const
 

Definition at line 512 of file OgreDDDriver.cpp.

References runningFullScreen.

Referenced by CheckWindow().

RECT Ogre::DDDriver::ViewportRect void    const
 

Definition at line 517 of file OgreDDDriver.cpp.

References rcViewport.


Member Data Documentation

D3DDevice* Ogre::DDDriver::active3DDevice [private]
 

Definition at line 58 of file OgreDDDriver.h.

Referenced by Cleanup(), DDDriver(), get3DDevice(), and operator=().

HWND Ogre::DDDriver::activeHWnd [private]
 

Definition at line 60 of file OgreDDDriver.h.

Referenced by CheckWindow(), Cleanup(), and DDDriver().

DDVideoMode* Ogre::DDDriver::activeVideoMode [private]
 

Definition at line 59 of file OgreDDDriver.h.

Referenced by DDDriver(), getActiveVideoMode(), and operator=().

LPDIRECT3D7 Ogre::DDDriver::lpD3D [private]
 

Definition at line 55 of file OgreDDDriver.h.

Referenced by Cleanup(), DDDriver(), directDraw(), get3DDeviceList(), and operator=().

LPDIRECTDRAW7 Ogre::DDDriver::lpDD7 [private]
 

Definition at line 54 of file OgreDDDriver.h.

Referenced by Cleanup(), createWindowSurfaces(), DDDriver(), directDraw(), getVideoModeList(), and operator=().

LPDIRECTDRAWCLIPPER Ogre::DDDriver::lpDDClipper [private]
 

Definition at line 73 of file OgreDDDriver.h.

Referenced by DDDriver(), and operator=().

LPDIRECTDRAWSURFACE7 Ogre::DDDriver::lpDDSBack [private]
 

Definition at line 67 of file OgreDDDriver.h.

Referenced by Cleanup(), DDDriver(), FlipBuffers(), operator=(), OutputText(), and RestoreSurfaces().

LPDIRECTDRAWSURFACE7 Ogre::DDDriver::lpDDSPrimary [private]
 

Definition at line 66 of file OgreDDDriver.h.

Referenced by Cleanup(), DDDriver(), FlipBuffers(), GetDisplayDetails(), operator=(), and RestoreSurfaces().

D3DDeviceList* Ogre::DDDriver::mDeviceList [private]
 

Definition at line 56 of file OgreDDDriver.h.

Referenced by DDDriver(), get3DDeviceList(), operator=(), and ~DDDriver().

String Ogre::DDDriver::mDriverDesc [private]
 

Definition at line 50 of file OgreDDDriver.h.

Referenced by DDDriver(), DriverDescription(), and operator=().

String Ogre::DDDriver::mDriverName [private]
 

Definition at line 49 of file OgreDDDriver.h.

Referenced by DDDriver(), DriverName(), and operator=().

GUID Ogre::DDDriver::mGuid [private]
 

Definition at line 51 of file OgreDDDriver.h.

Referenced by DDDriver(), directDraw(), and operator=().

DDCAPS Ogre::DDDriver::mHWCaps [private]
 

Definition at line 63 of file OgreDDDriver.h.

Referenced by CanRenderWindowed(), DDDriver(), Has3DAcceleration(), and operator=().

bool Ogre::DDDriver::mPrimaryDisplay [private]
 

Definition at line 52 of file OgreDDDriver.h.

Referenced by DDDriver(), and operator=().

DDCAPS Ogre::DDDriver::mSWCaps [private]
 

Definition at line 62 of file OgreDDDriver.h.

Referenced by DDDriver(), and operator=().

DDVideoModeList* Ogre::DDDriver::mVideoModeList [private]
 

Definition at line 57 of file OgreDDDriver.h.

Referenced by DDDriver(), getVideoModeList(), operator=(), and ~DDDriver().

RECT Ogre::DDDriver::rcViewport [private]
 

Definition at line 72 of file OgreDDDriver.h.

Referenced by CheckWindow(), FlipBuffers(), and ViewportRect().

bool Ogre::DDDriver::runningFullScreen [private]
 

Definition at line 69 of file OgreDDDriver.h.

Referenced by RunningFullScreen().

bool Ogre::DDDriver::using3DMode [private]
 

Definition at line 70 of file OgreDDDriver.h.


The documentation for this class was generated from the following files:

Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:23:59 2004