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

# Ogre::D3DDevice Class Reference

Encapsulates a Direct3D Device. More...

`#include <OgreD3D7Device.h>`

List of all members.

## Public Methods

| D3DDevice ()
| D3DDevice (const D3DDevice &ob)
| D3DDevice (LPDIRECT3D7 lpDirect3D, LPSTR lpDeviceDesc, LPSTR lpDeviceName, LPD3DDEVICEDESC7 lpD3DDeviceDesc)
| ~D3DDevice ()
void | Cleanup (void)
void | logCaps (void) const
LPDIRECT3DDEVICE7 | createDevice (LPDIRECTDRAWSURFACE7 renderTarget)
| Creates a new per-rendering surface device.
LPDIRECT3D7 | getID3D (void)
D3DDevice | operator= (const D3DDevice &orig)
String | DeviceName (void) const
String | DeviceDescription (void) const
bool | HardwareAccelerated (void) const
bool | NeedsZBuffer (void) const
void | createDepthBuffer (LPDIRECTDRAWSURFACE7 renderTarget)
void | setViewMatrix (D3DMATRIX *mat)
void | setProjectionMatrix (D3DMATRIX *mat)
void | setWorldMatrix (D3DMATRIX *mat)
void | beginScene (void)
void | endScene (void)
void | setAmbientLight (float r, float g, float b)
bool | CanMipMap (void) const
bool | CanBilinearFilter (void) const
bool | CanTrilinearFilter (void) const
unsigned int | RenderBitDepth (void) const
unsigned int | ZBufferBitDepth (void) const
bool | CanHWTransformAndLight (void) const
unsigned int | MaxSinglePassTextureLayers (void) const
ushort | StencilBufferBitDepth (void) const

## Private Methods

void | createViewport (void)
void | setViewportSize (void)

## Private Attributes

String | mDeviceName
String | mDeviceDescription
D3DDEVICEDESC7 | mD3DDeviceDesc
bool | mIsHardwareAccelerated
bool | mNeedsZBuffer
std::vector< DDPIXELFORMAT > | mDepthBufferFormats
ushort | mStencilBufferDepth
LPDIRECT3D7 | lpD3D
D3DVIEWPORT7 | mViewport
D3DRECT | rcViewportRect
DDDriver * | mParentDriver

## Friends

HRESULT CALLBACK | EnumZBuffersCallback (DDPIXELFORMAT *pddpf, VOID *pFormats)

## Detailed Description

Encapsulates a Direct3D Device.

Utility class for D3DRenderSystem.

Definition at line 36 of file OgreD3D7Device.h.

## Constructor & Destructor Documentation

Ogre::D3DDevice::D3DDevice | ( |  | ) |

| Definition at line 68 of file OgreD3D7Device.cpp. References lpD3D.

Ogre::D3DDevice::D3DDevice | ( | const D3DDevice & | ob | ) |

| Definition at line 76 of file OgreD3D7Device.cpp. References lpD3D, mD3DDeviceDesc, mDeviceDescription, mDeviceName, mIsHardwareAccelerated, mNeedsZBuffer, and mViewport.

Ogre::D3DDevice::D3DDevice | ( | LPDIRECT3D7 | lpDirect3D,
|  | LPSTR | lpDeviceDesc,
|  | LPSTR | lpDeviceName,
|  | LPD3DDEVICEDESC7 | lpD3DDeviceDesc
| ) |

| Definition at line 89 of file OgreD3D7Device.cpp. References logCaps(), lpD3D, mD3DDeviceDesc, mDeviceDescription, mDeviceName, mIsHardwareAccelerated, and mNeedsZBuffer.

Ogre::D3DDevice::~D3DDevice | ( |  | ) |

| Definition at line 130 of file OgreD3D7Device.cpp.

## Member Function Documentation

void Ogre::D3DDevice::beginScene | ( | void |  | ) |

| Definition at line 306 of file OgreD3D7Device.cpp.

bool Ogre::D3DDevice::CanBilinearFilter | ( | void |  | ) | const

| Definition at line 458 of file OgreD3D7Device.cpp. References mD3DDeviceDesc. Referenced by logCaps().

bool Ogre::D3DDevice::CanHWTransformAndLight | ( | void |  | ) | const

| Definition at line 505 of file OgreD3D7Device.cpp. References mD3DDeviceDesc. Referenced by logCaps().

bool Ogre::D3DDevice::CanMipMap | ( | void |  | ) | const

| Definition at line 453 of file OgreD3D7Device.cpp. References mD3DDeviceDesc. Referenced by logCaps().

bool Ogre::D3DDevice::CanTrilinearFilter | ( | void |  | ) | const

| Definition at line 463 of file OgreD3D7Device.cpp. References mD3DDeviceDesc. Referenced by logCaps().

void Ogre::D3DDevice::Cleanup | ( | void |  | ) |

| Definition at line 198 of file OgreD3D7Device.cpp. References lpD3D. Referenced by Ogre::DDDriver::Cleanup(), and Ogre::D3DDeviceList::~D3DDeviceList().

void Ogre::D3DDevice::createDepthBuffer | ( | LPDIRECTDRAWSURFACE7 | renderTarget | ) |

| Definition at line 355 of file OgreD3D7Device.cpp. References EnumZBuffersCallback, Except, Ogre::LML_NORMAL, lpD3D, mD3DDeviceDesc, mDepthBufferFormats, and mStencilBufferDepth. Referenced by Ogre::D3D7RenderWindow::createDepthBuffer().

LPDIRECT3DDEVICE7 Ogre::D3DDevice::createDevice | ( | LPDIRECTDRAWSURFACE7 | renderTarget | ) |

| Creates a new per-rendering surface device. Definition at line 134 of file OgreD3D7Device.cpp. References lpD3D, and mD3DDeviceDesc. Referenced by Ogre::D3D7RenderWindow::create().

void Ogre::D3DDevice::createViewport | ( | void |  | ) | `[private]`

| Definition at line 206 of file OgreD3D7Device.cpp.

String Ogre::D3DDevice::DeviceDescription | ( | void |  | ) | const

| Definition at line 349 of file OgreD3D7Device.cpp. References mDeviceDescription, and Ogre::String.

String Ogre::D3DDevice::DeviceName | ( | void |  | ) | const

| Definition at line 344 of file OgreD3D7Device.cpp. References mDeviceName, and Ogre::String.

void Ogre::D3DDevice::endScene | ( | void |  | ) |

| Definition at line 327 of file OgreD3D7Device.cpp.

LPDIRECT3D7 Ogre::D3DDevice::getID3D | ( | void |  | ) |

| Definition at line 148 of file OgreD3D7Device.cpp. References lpD3D.

bool Ogre::D3DDevice::HardwareAccelerated | ( | void |  | ) | const

| Definition at line 154 of file OgreD3D7Device.cpp. References mIsHardwareAccelerated. Referenced by logCaps().

void Ogre::D3DDevice::logCaps | ( | void |  | ) | const

| Definition at line 159 of file OgreD3D7Device.cpp. References CanBilinearFilter(), CanHWTransformAndLight(), CanMipMap(), CanTrilinearFilter(), HardwareAccelerated(), MaxSinglePassTextureLayers(), mD3DDeviceDesc, and RenderBitDepth(). Referenced by D3DDevice().

unsigned int Ogre::D3DDevice::MaxSinglePassTextureLayers | ( | void |  | ) | const

| Definition at line 510 of file OgreD3D7Device.cpp. References mD3DDeviceDesc. Referenced by logCaps().

bool Ogre::D3DDevice::NeedsZBuffer | ( | void |  | ) | const

| Definition at line 500 of file OgreD3D7Device.cpp. References mNeedsZBuffer. Referenced by Ogre::D3D7RenderWindow::createDepthBuffer().

D3DDevice Ogre::D3DDevice::operator= | ( | const D3DDevice & | orig | ) |

| Definition at line 52 of file OgreD3D7Device.cpp. References mD3DDeviceDesc, mDeviceDescription, mDeviceName, mIsHardwareAccelerated, and mNeedsZBuffer.

unsigned int Ogre::D3DDevice::RenderBitDepth | ( | void |  | ) | const

| Definition at line 468 of file OgreD3D7Device.cpp. References mD3DDeviceDesc. Referenced by logCaps().

void Ogre::D3DDevice::setAmbientLight | ( | float | r,
|  | float | g,
|  | float | b
| ) |

| Definition at line 333 of file OgreD3D7Device.cpp.

void Ogre::D3DDevice::setProjectionMatrix | ( | D3DMATRIX * | mat | ) |

| Definition at line 282 of file OgreD3D7Device.cpp.

void Ogre::D3DDevice::setViewMatrix | ( | D3DMATRIX * | mat | ) |

| Definition at line 269 of file OgreD3D7Device.cpp.

void Ogre::D3DDevice::setViewportSize | ( | void |  | ) | `[private]`

| Definition at line 235 of file OgreD3D7Device.cpp.

void Ogre::D3DDevice::setWorldMatrix | ( | D3DMATRIX * | mat | ) |

| Definition at line 294 of file OgreD3D7Device.cpp.

ushort Ogre::D3DDevice::StencilBufferBitDepth | ( | void |  | ) | const

| Definition at line 517 of file OgreD3D7Device.cpp. References mStencilBufferDepth, and Ogre::ushort.

unsigned int Ogre::D3DDevice::ZBufferBitDepth | ( | void |  | ) | const

| Definition at line 483 of file OgreD3D7Device.cpp. References mD3DDeviceDesc.

## Friends And Related Function Documentation

HRESULT CALLBACK EnumZBuffersCallback | ( | DDPIXELFORMAT * | pddpf,
|  | VOID * | pFormats
| ) | `[friend]`

| Definition at line 36 of file OgreD3D7Device.cpp. Referenced by createDepthBuffer().

## Member Data Documentation

LPDIRECT3D7 Ogre::D3DDevice::lpD3D`[private]`

| Definition at line 51 of file OgreD3D7Device.h. Referenced by Cleanup(), createDepthBuffer(), createDevice(), D3DDevice(), and getID3D().

D3DDEVICEDESC7 Ogre::D3DDevice::mD3DDeviceDesc`[private]`

| Definition at line 43 of file OgreD3D7Device.h. Referenced by CanBilinearFilter(), CanHWTransformAndLight(), CanMipMap(), CanTrilinearFilter(), createDepthBuffer(), createDevice(), D3DDevice(), logCaps(), MaxSinglePassTextureLayers(), operator=(), RenderBitDepth(), and ZBufferBitDepth().

std::vector<DDPIXELFORMAT> Ogre::D3DDevice::mDepthBufferFormats`[private]`

| Definition at line 46 of file OgreD3D7Device.h. Referenced by createDepthBuffer().

String Ogre::D3DDevice::mDeviceDescription`[private]`

| Definition at line 42 of file OgreD3D7Device.h. Referenced by D3DDevice(), DeviceDescription(), and operator=().

String Ogre::D3DDevice::mDeviceName`[private]`

| Definition at line 41 of file OgreD3D7Device.h. Referenced by D3DDevice(), DeviceName(), and operator=().

bool Ogre::D3DDevice::mIsHardwareAccelerated`[private]`

| Definition at line 44 of file OgreD3D7Device.h. Referenced by D3DDevice(), HardwareAccelerated(), and operator=().

bool Ogre::D3DDevice::mNeedsZBuffer`[private]`

| Definition at line 45 of file OgreD3D7Device.h. Referenced by D3DDevice(), NeedsZBuffer(), and operator=().

DDDriver* Ogre::D3DDevice::mParentDriver`[private]`

| Definition at line 55 of file OgreD3D7Device.h.

ushort Ogre::D3DDevice::mStencilBufferDepth`[private]`

| Definition at line 47 of file OgreD3D7Device.h. Referenced by createDepthBuffer(), and StencilBufferBitDepth().

D3DVIEWPORT7 Ogre::D3DDevice::mViewport`[private]`

| Definition at line 52 of file OgreD3D7Device.h. Referenced by D3DDevice().

D3DRECT Ogre::D3DDevice::rcViewportRect`[private]`

| Definition at line 53 of file OgreD3D7Device.h.

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

- OgreD3D7Device.h
- OgreD3D7Device.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:49:29 2004