Isle
Loading...
Searching...
No Matches
TglImpl::DeviceImpl Class Reference

[AI] Implements the Tgl::Device interface, encapsulates Direct3DRMDevice2 and provides rendering device operations. More...

#include <impl.h>

Inheritance diagram for TglImpl::DeviceImpl:
Collaboration diagram for TglImpl::DeviceImpl:

Public Types

typedef IDirect3DRMDevice2 * DeviceDataType
 [AI] Internal data type for device (Direct3DRMDevice2*) [AI] More...
 

Public Member Functions

 DeviceImpl ()
 [AI] Initializes device data to null [AI] More...
 
 ~DeviceImpl () override
 [AI] Destructor releases resources [AI] More...
 
void * ImplementationDataPtr () override
 Returns Direct3DRMDevice2 pointer as a generic implementation data pointer [AI]. More...
 
unsigned long GetWidth () override
 Returns the current device width in pixels [AI]. More...
 
unsigned long GetHeight () override
 Returns the current device height in pixels [AI]. More...
 
Result SetColorModel (ColorModel) override
 Sets the color model used for rendering [AI]. More...
 
Result SetShadingModel (ShadingModel) override
 Sets the shading model (flat, Gouraud, etc.) [AI]. More...
 
Result SetShadeCount (unsigned long) override
 Sets number of shades [AI]. More...
 
Result SetDither (int) override
 Enables or disables dithering [AI]. More...
 
Result Update () override
 Submits any pending updates to the device [AI]. More...
 
void HandleActivate (WORD) override
 Handles application/window activation event [AI]. More...
 
void HandlePaint (HDC) override
 Handles window paint event [AI]. More...
 
const DeviceDataTypeImplementationData () const
 Retrieves the device pointer (const) [AI]. More...
 
DeviceDataTypeImplementationData ()
 Retrieves the device pointer (mutable) [AI]. More...
 
void SetImplementationData (IDirect3DRMDevice2 *device)
 Replaces the implementation pointer [AI]. More...
 
void Destroy ()
 Frees device resources [AI]. More...
 
virtual unsigned long GetWidth ()=0
 [AI] Gets the output width in pixels. More...
 
virtual unsigned long GetHeight ()=0
 [AI] Gets the output height in pixels. More...
 
virtual Result SetColorModel (ColorModel)=0
 [AI] Sets the color model for rendering. More...
 
virtual Result SetShadingModel (ShadingModel)=0
 [AI] Sets the shading model (e.g., Gouraud, flat). More...
 
virtual Result SetShadeCount (unsigned long)=0
 [AI] Specifies the number of shades for rendering (possibly for palette/ramp mode). More...
 
virtual Result SetDither (int)=0
 [AI] Enables/disables dithering in the renderer. More...
 
virtual Result Update ()=0
 [AI] Performs a device update/synchronization. More...
 
virtual void HandleActivate (WORD)=0
 [AI] Handles window activation events (e.g., WM_ACTIVATE). More...
 
virtual void HandlePaint (HDC)=0
 [AI] Handles window repaint events (e.g., WM_PAINT) with a device context. More...
 
- Public Member Functions inherited from Tgl::Object
virtual ~Object ()
 [AI] Destructor; releases resources. More...
 
virtual void * ImplementationDataPtr ()=0
 [AI] Returns a pointer to internal/implementation data, if any. More...
 

Friends

class RendererImpl
 

Detailed Description

[AI] Implements the Tgl::Device interface, encapsulates Direct3DRMDevice2 and provides rendering device operations.

[AI]

Definition at line 322 of file impl.h.

Member Typedef Documentation

◆ DeviceDataType

typedef IDirect3DRMDevice2* TglImpl::DeviceImpl::DeviceDataType

[AI] Internal data type for device (Direct3DRMDevice2*) [AI]

Definition at line 390 of file impl.h.

Constructor & Destructor Documentation

◆ DeviceImpl()

TglImpl::DeviceImpl::DeviceImpl ( )
inline

[AI] Initializes device data to null [AI]

Definition at line 325 of file impl.h.

◆ ~DeviceImpl()

TglImpl::DeviceImpl::~DeviceImpl ( )
inlineoverride

[AI] Destructor releases resources [AI]

Definition at line 328 of file impl.h.

Member Function Documentation

◆ Destroy()

void TglImpl::DeviceImpl::Destroy ( )
inline

Frees device resources [AI].

Frees Direct3DRMDevice2 resources [AI].

Definition at line 437 of file impl.h.

◆ GetHeight()

unsigned long DeviceImpl::GetHeight ( )
overridevirtual

Returns the current device height in pixels [AI].

Implements Tgl::Device.

Definition at line 22 of file device.cpp.

◆ GetWidth()

unsigned long DeviceImpl::GetWidth ( )
overridevirtual

Returns the current device width in pixels [AI].

Implements Tgl::Device.

Definition at line 16 of file device.cpp.

◆ HandleActivate()

void DeviceImpl::HandleActivate ( WORD  wParam)
overridevirtual

Handles application/window activation event [AI].

Parameters
wParamActivation parameter (from WM_ACTIVATE) [AI]

Implements Tgl::Device.

Definition at line 62 of file device.cpp.

◆ HandlePaint()

void DeviceImpl::HandlePaint ( HDC  p_dc)
overridevirtual

Handles window paint event [AI].

Parameters
hdcDevice context handle [AI]

Implements Tgl::Device.

Definition at line 73 of file device.cpp.

◆ ImplementationData() [1/2]

DeviceDataType & TglImpl::DeviceImpl::ImplementationData ( )
inline

Retrieves the device pointer (mutable) [AI].

Returns
Reference to Direct3DRMDevice2 pointer [AI]

Definition at line 404 of file impl.h.

◆ ImplementationData() [2/2]

const DeviceDataType & TglImpl::DeviceImpl::ImplementationData ( ) const
inline

Retrieves the device pointer (const) [AI].

Returns
Reference to Direct3DRMDevice2 pointer [AI]

Definition at line 397 of file impl.h.

◆ ImplementationDataPtr()

void * DeviceImpl::ImplementationDataPtr ( )
overridevirtual

Returns Direct3DRMDevice2 pointer as a generic implementation data pointer [AI].

Returns
Implementation pointer [AI]

Implements Tgl::Object.

Definition at line 10 of file device.cpp.

◆ SetColorModel()

Result DeviceImpl::SetColorModel ( ColorModel  )
overridevirtual

Sets the color model used for rendering [AI].

Parameters
modelColor model (RGB, etc.) [AI]

Implements Tgl::Device.

Definition at line 28 of file device.cpp.

◆ SetDither()

Result DeviceImpl::SetDither ( int  dither)
overridevirtual

Enables or disables dithering [AI].

Parameters
valueDither enabled or not [AI]

Implements Tgl::Device.

Definition at line 56 of file device.cpp.

◆ SetImplementationData()

void TglImpl::DeviceImpl::SetImplementationData ( IDirect3DRMDevice2 *  device)
inline

Replaces the implementation pointer [AI].

Parameters
deviceDirect3DRMDevice2* to assign [AI]

Definition at line 410 of file impl.h.

◆ SetShadeCount()

Result DeviceImpl::SetShadeCount ( unsigned long  shadeCount)
overridevirtual

Sets number of shades [AI].

Parameters
countShade count [AI]

Implements Tgl::Device.

Definition at line 50 of file device.cpp.

◆ SetShadingModel()

Result DeviceImpl::SetShadingModel ( ShadingModel  model)
overridevirtual

Sets the shading model (flat, Gouraud, etc.) [AI].

Parameters
modelShading model [AI]

Implements Tgl::Device.

Definition at line 42 of file device.cpp.

◆ Update()

Result DeviceImpl::Update ( )
overridevirtual

Submits any pending updates to the device [AI].

Implements Tgl::Device.

Definition at line 83 of file device.cpp.

Friends And Related Function Documentation

◆ RendererImpl

friend class RendererImpl
friend

Definition at line 417 of file impl.h.


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