Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

# Keos::CD3D9Window Class Reference

Direct3D9 IRenderWindow implementation. More...

`#include <KeosD3D9Window.h>`

Inheritance diagram for Keos::CD3D9Window:

List of all members.

## Public Member Functions

| CD3D9Window ()
| Constructor.
| CD3D9Window (CD3D9 *pD3D9)
| Constructor.
| ~CD3D9Window ()
| Destructor.
void | Create (const String &strName, uint nWidth, uint nHeight, uint nColourDepth, bool bFullScreen)
| See IRenderWindow.
void | Destroy (void)
| See IRenderWindow.
bool | IsClosed (void) const
| See IRenderWindow.
void | Reposition (int nLeft, int nTop)
| See IRenderWindow.
void | Resize (uint nWidth, uint nHeight)
| See IRenderWindow.
void | SwapBuffers (bool bWaitForVSync)
| See IRenderWindow.
HWND | GetWindowHandle () const
| Return the Win32 window handle.
virtual void | WindowMovedOrResized (void)
| Method for dealing with resize / move & 3d library.
bool | IsReady () const
void | SetReady (bool bSet)
void | SetActive (bool bSet)
| Used to set the active state of the render target.
void | CreateD3DResources ()
| Create (or recreate) the D3D device for this window.
virtual void | Update (void)
| See IRenderTarget.
D3DPRESENT_PARAMETERS * | GetPresentationParameters (void)
| Get the presentation parameters used with this window.

## Static Protected Member Functions

static LRESULT CALLBACK | WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
| Window procedure callback.

## Protected Attributes

HWND | m_HWnd
| Win32 Window handle.
bool | m_bReady
| Is ready i.e. available for update.
bool | m_bClosed
| Indicates whether the window has been closed by the user.
bool | m_bSizing
| Indicates whether the window is (re)sizing.
CD3D9 * | m_pD3D9
D3DPRESENT_PARAMETERS | m_d3dpp
LPDIRECT3DSURFACE9 | m_pRenderSurface
LPDIRECT3DSURFACE9 | m_pRenderZBuffer
D3DMULTISAMPLE_TYPE | m_FSAAType
DWORD | m_FSAAQuality
bool | m_bVSync

## Detailed Description

Direct3D9 IRenderWindow implementation.

Definition at line 33 of file KeosD3D9Window.h.

## Constructor & Destructor Documentation

Keos::CD3D9Window::CD3D9Window | ( |  | ) |

| Constructor.

Keos::CD3D9Window::CD3D9Window | ( | CD3D9 * | pD3D9 | ) |

| Constructor.

Parameters:

  | pD3D9 | CD3D9 object from CD3D9RenderSystem.

Definition at line 36 of file KeosD3D9Window.cpp.

References m_bClosed, m_bReady, m_bSizing, m_HWnd, and m_pD3D9.

Keos::CD3D9Window::~CD3D9Window | ( |  | ) |

| Destructor. Definition at line 49 of file KeosD3D9Window.cpp. References Destroy().

## Member Function Documentation

void Keos::CD3D9Window::Create | ( | const String & | strName,
|  | uint | nWidth,
|  | uint | nHeight,
|  | uint | nColourDepth,
|  | bool | bFullScreen
| ) | `[virtual]`

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 55 of file KeosD3D9Window.cpp. References CreateD3DResources(), Destroy(), KEOS_D3D9_LIB, m_bVSync, m_FSAAQuality, m_FSAAType, m_HWnd, and WndProc().

void Keos::CD3D9Window::CreateD3DResources | ( |  | ) |

| Create (or recreate) the D3D device for this window. Definition at line 156 of file KeosD3D9Window.cpp. References D3D9_EXCEPT, Destroy(), m_bVSync, m_d3dpp, m_FSAAQuality, m_FSAAType, m_HWnd, m_pD3D9, m_pRenderSurface, m_pRenderZBuffer, Keos::CD3D9::pD3D, and Keos::CD3D9::pD3DDevice.

Referenced by Create().

void Keos::CD3D9Window::Destroy | ( | void |  | ) | `[virtual]`

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 254 of file KeosD3D9Window.cpp. References m_HWnd, m_pD3D9, m_pRenderSurface, m_pRenderZBuffer, and Keos::CD3D9::ReleaseDevice(). Referenced by Create(), CreateD3DResources(), WndProc(), and ~CD3D9Window().

D3DPRESENT_PARAMETERS* Keos::CD3D9Window::GetPresentationParameters | ( | void |  | ) | `[inline]`

| Get the presentation parameters used with this window. Definition at line 96 of file KeosD3D9Window.h. References m_d3dpp.

HWND Keos::CD3D9Window::GetWindowHandle | ( |  | ) | const`[inline]`

| Return the Win32 window handle. Definition at line 76 of file KeosD3D9Window.h. References m_HWnd. Referenced by WindowMovedOrResized().

bool Keos::CD3D9Window::IsClosed | ( | void |  | ) | const`[virtual]`

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 267 of file KeosD3D9Window.cpp. References m_bClosed.

bool Keos::CD3D9Window::IsReady | ( |  | ) | const`[inline]`

| Definition at line 82 of file KeosD3D9Window.h. References m_bReady.

void Keos::CD3D9Window::Reposition | ( | int | nLeft,
|  | int | nTop
| ) | `[virtual]`

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 273 of file KeosD3D9Window.cpp.

void Keos::CD3D9Window::Resize | ( | uint | nWidth,
|  | uint | nHeight
| ) | `[virtual]`

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 279 of file KeosD3D9Window.cpp. Referenced by WindowMovedOrResized().

void Keos::CD3D9Window::SetActive | ( | bool | bSet | ) | `[inline, virtual]`

| Used to set the active state of the render target. Reimplemented from Keos::IRenderTarget. Definition at line 84 of file KeosD3D9Window.h.

void Keos::CD3D9Window::SetReady | ( | bool | bSet | ) | `[inline]`

| Definition at line 83 of file KeosD3D9Window.h. References m_bReady.

void Keos::CD3D9Window::SwapBuffers | ( | bool | bWaitForVSync | ) | `[virtual]`

| See IRenderWindow. Implements Keos::IRenderWindow. Definition at line 296 of file KeosD3D9Window.cpp. References D3D9_EXCEPT, m_pD3D9, and Keos::CD3D9::pD3DDevice.

void Keos::CD3D9Window::Update | ( | void |  | ) | `[virtual]`

| See IRenderTarget. Reimplemented from Keos::IRenderTarget. Definition at line 316 of file KeosD3D9Window.cpp. References Keos::CD3D9RenderSystem::IsDeviceLost(), m_pD3D9, m_pRenderSurface, m_pRenderZBuffer, Keos::CD3D9::pD3DDevice, and Keos::CD3D9RenderSystem::RestoreLostDevice().

void Keos::CD3D9Window::WindowMovedOrResized | ( | void |  | ) | `[virtual]`

| Method for dealing with resize / move & 3d library. Definition at line 288 of file KeosD3D9Window.cpp. References GetWindowHandle(), and Resize(). Referenced by WndProc().

LRESULT Keos::CD3D9Window::WndProc | ( | HWND | hWnd,
|  | UINT | uMsg,
|  | WPARAM | wParam,
|  | LPARAM | lParam
| ) | `[static, protected]`

| Window procedure callback. Definition at line 360 of file KeosD3D9Window.cpp. References Destroy(), Keos::IRenderTarget::m_bActive, m_bClosed, m_bSizing, and WindowMovedOrResized(). Referenced by Create().

## Member Data Documentation

bool Keos::CD3D9Window::m_bClosed`[protected]`

| Indicates whether the window has been closed by the user. Definition at line 110 of file KeosD3D9Window.h. Referenced by CD3D9Window(), IsClosed(), and WndProc().

bool Keos::CD3D9Window::m_bReady`[protected]`

| Is ready i.e. available for update. Definition at line 108 of file KeosD3D9Window.h. Referenced by CD3D9Window(), IsReady(), and SetReady().

bool Keos::CD3D9Window::m_bSizing`[protected]`

| Indicates whether the window is (re)sizing. Definition at line 112 of file KeosD3D9Window.h. Referenced by CD3D9Window(), and WndProc().

bool Keos::CD3D9Window::m_bVSync`[protected]`

| Definition at line 121 of file KeosD3D9Window.h. Referenced by Create(), and CreateD3DResources().

D3DPRESENT_PARAMETERS Keos::CD3D9Window::m_d3dpp`[protected]`

| Definition at line 116 of file KeosD3D9Window.h. Referenced by CreateD3DResources(), and GetPresentationParameters().

DWORD Keos::CD3D9Window::m_FSAAQuality`[protected]`

| Definition at line 120 of file KeosD3D9Window.h. Referenced by Create(), and CreateD3DResources().

D3DMULTISAMPLE_TYPE Keos::CD3D9Window::m_FSAAType`[protected]`

| Definition at line 119 of file KeosD3D9Window.h. Referenced by Create(), and CreateD3DResources().

HWND Keos::CD3D9Window::m_HWnd`[protected]`

| Win32 Window handle. Definition at line 106 of file KeosD3D9Window.h. Referenced by CD3D9Window(), Create(), CreateD3DResources(), Destroy(), and GetWindowHandle().

CD3D9* Keos::CD3D9Window::m_pD3D9`[protected]`

| Definition at line 115 of file KeosD3D9Window.h. Referenced by CD3D9Window(), CreateD3DResources(), Destroy(), SwapBuffers(), and Update().

LPDIRECT3DSURFACE9 Keos::CD3D9Window::m_pRenderSurface`[protected]`

| Definition at line 117 of file KeosD3D9Window.h. Referenced by CreateD3DResources(), Destroy(), and Update().

LPDIRECT3DSURFACE9 Keos::CD3D9Window::m_pRenderZBuffer`[protected]`

| Definition at line 118 of file KeosD3D9Window.h. Referenced by CreateD3DResources(), Destroy(), and Update().

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

- RenderSystems/Direct3D9/KeosD3D9Window.h
- RenderSystems/Direct3D9/KeosD3D9Window.cpp