In file libs/cs3d/direct3d6/g3d_d3d.h:

## class csGraphics3DDirect3DDx6 : public IGraphics3D

> the Direct3D implementation of the Graphics3D class.

## Inheritance:

### Public Methods

STDMETHODIMP BeginDraw(int DrawFlags)
  Start a new frame.
STDMETHODIMP CacheTexture(IPolygonTexture* texture)
  Give a texture to Graphics3D to cache it.
STDMETHODIMP ClearCache(void)
  Clear the texture cache.
STDMETHODIMP Close()
  closes Direct3D.
csGraphics3DDirect3DDx6(ISystem*)
  The constructor. It is passed an interface to the system using it.
STDMETHODIMP DrawFltLight(G3DFltLight& light)
  Draw a projected floating light on the screen.
STDMETHODIMP DrawLine(csVector3& v1, csVector3& v2, int color)
  Draw a Line.
STDMETHODIMP DrawPolygon(G3DPolygonDP& poly)
  Draw the projected polygon with light and texture.
STDMETHODIMP DrawPolygonDebug(G3DPolygonDP& poly)
  Draw debug poly
STDMETHODIMP DrawPolygonQuick(G3DPolygonDPQ& poly)
  Draw a projected (non-perspective correct) polygon.
STDMETHODIMP DumpCache(void)
  Dump the texture cache.
STDMETHODIMP FinishDraw()
  End the frame and do a page swap.
STDMETHODIMP Get2dDriver(IGraphics2D** pG2D)
STDMETHODIMP GetCaps(G3D_CAPS *caps)
  Get the capabilities of this driver: NOT IMPLEMENTED.
STDMETHODIMP GetColormapFormat( G3D_COLORMAPFORMAT& g3dFormat )
STDMETHODIMP GetHeight(int& nHeight)
STDMETHODIMP GetMaximumAspectRatio(int& ratio)
STDMETHODIMP GetRenderState(G3D_RENDERSTATEOPTION, long& nValue)
  Get a render state
STDMETHODIMP GetStringError( HRESULT hRes, char* szErrorString )
STDMETHODIMP GetWidth(int& nWidth)
  Get the width
STDMETHODIMP GetZBufPoint(int, int, unsigned long** retval)
  Get a z-buffer point
STDMETHODIMP NeedsPO2Maps(void)
STDMETHODIMP Open(char* Title)
  opens Direct3D.
STDMETHODIMP Print(csRect* rect)
  Print the screen.
STDMETHODIMP SetCamera( ICamera* pCamera )
  Set the camera object.
STDMETHODIMP SetDimensions(int width, int height)
  Change the dimensions of the display.
STDMETHODIMP SetRenderState(G3D_RENDERSTATEOPTION, long value)
  Set a render state
STDMETHODIMP SetWorld(IWorld* piWorld)
STDMETHODIMP SetZBufMode(G3DZBufMode mode)
  Set the mode for the Z buffer (functionality also exists in SetRenderState).
STDMETHODIMP UncacheTexture(IPolygonTexture* texture)
  Release a texture from the cache.
~csGraphics3DDirect3DDx6()
  the destructor.

### Private Fields

bool m_bIsHardware
  whether this is a hardware device.
bool m_bIsLocked
  whether the device is locked or not.
G3D_CAPS m_Caps
  Capabilities of the renderer.
DWORD m_dwDeviceBitDepth
  the bit-depth of this device.
GUID m_Guid
  the globally unique identifier for this device.
D3DMATERIALHANDLE m_hd3dBackMat
  D3D handle to the background material.
int m_iTypeLightmap
  supported lightmap type
IDirect3D3* m_lpD3D
  Direct3D class
IDirect3DMaterial3* m_lpd3dBackMat
  D3d Background material.
IDirect3DDevice3* m_lpd3dDevice
  D3D Device
IDirect3DViewport3* m_lpd3dViewport
  D3d Viewport
IDirectDraw4* m_lpDD
  Pointer to DirectDraw class
IDirectDrawSurface4* m_lpddDevice
  Offscreen Surface
IDirectDrawSurface4* m_lpddPrimary
  Primary Surface
IDirectDrawSurface4* m_lpddZBuffer
  ZBuffer surface
int m_nDrawMode
  The current drawing mode (2D/3D)
int m_nHalfWidth
  Half-dimensions of viewport.
int m_nWidth
  Dimensions of viewport.
ICamera* m_pCamera
  The camera object.
IDirectDetectionInternal* m_pDirectDevice
  The directdraw device description
IGraphics2D* m_piG2D
  the 2d graphics driver.
ISystem* m_piSystem
  The system driver
D3DLightMapCache* m_pLightmapCache
  the lightmap cache.
D3DTextureCache* m_pTextureCache
  the texture cache.
G3DZBufMode m_ZBufMode
  The current read/write settings for the Z-buffer.
bool rstate_dither
  DAN: render-states these override any other variable settings
bool use16BitTexture
  use 16 bit texture else 8 bit

### Private Methods

bool EnumDevices(void)
  used to get the appropriate device.
inline void SetupPolygon( G3DPolygonDP& poly, float& J1, float& J2, float& J3, float& K1, float& K2, float& K3, float& M, float& N, float& O )
  used to set up polygon geometry before rasterization.

## Documentation

> the Direct3D implementation of the Graphics3D class.

`IDirectDraw4* m_lpDD`
  Pointer to DirectDraw class

`IDirectDrawSurface4* m_lpddPrimary`
  Primary Surface

`IDirectDrawSurface4* m_lpddDevice`
  Offscreen Surface

`IDirect3D3* m_lpD3D`
  Direct3D class

`IDirectDrawSurface4* m_lpddZBuffer`
  ZBuffer surface

`IDirect3DDevice3* m_lpd3dDevice`
  D3D Device

`IDirect3DViewport3* m_lpd3dViewport`
  D3d Viewport

`IDirect3DMaterial3* m_lpd3dBackMat`
  D3d Background material.

`D3DMATERIALHANDLE m_hd3dBackMat`
  D3D handle to the background material.

`bool m_bIsHardware`
  whether this is a hardware device.

`DWORD m_dwDeviceBitDepth`
  the bit-depth of this device.

`GUID m_Guid`
  the globally unique identifier for this device.

`D3DTextureCache* m_pTextureCache`
  the texture cache.

`D3DLightMapCache* m_pLightmapCache`
  the lightmap cache.

`int m_iTypeLightmap`
  supported lightmap type

`int m_nWidth`
  Dimensions of viewport.

`int m_nHalfWidth`
  Half-dimensions of viewport.

`G3DZBufMode m_ZBufMode`
  The current read/write settings for the Z-buffer.

`int m_nDrawMode`
  The current drawing mode (2D/3D)

`bool rstate_dither`
  DAN: render-states these override any other variable settings

`G3D_CAPS m_Caps`
  Capabilities of the renderer.

`ICamera* m_pCamera`
  The camera object.

`IGraphics2D* m_piG2D`
  the 2d graphics driver.

`IDirectDetectionInternal* m_pDirectDevice`
  The directdraw device description

`ISystem* m_piSystem`
  The system driver

`bool use16BitTexture`
  use 16 bit texture else 8 bit

`csGraphics3DDirect3DDx6(ISystem*)`
  The constructor. It is passed an interface to the system using it.

`~csGraphics3DDirect3DDx6()`
  the destructor.

`STDMETHODIMP Open(char* Title)`
  opens Direct3D.

`STDMETHODIMP Close()`
  closes Direct3D.

`STDMETHODIMP SetDimensions(int width, int height)`
  Change the dimensions of the display.

`STDMETHODIMP BeginDraw(int DrawFlags)`
  Start a new frame.

`STDMETHODIMP FinishDraw()`
  End the frame and do a page swap.

`STDMETHODIMP SetZBufMode(G3DZBufMode mode)`
  Set the mode for the Z buffer (functionality also exists in SetRenderState).

`STDMETHODIMP DrawPolygon(G3DPolygonDP& poly)`
  Draw the projected polygon with light and texture.

`STDMETHODIMP DrawPolygonDebug(G3DPolygonDP& poly)`
  Draw debug poly

`STDMETHODIMP DrawLine(csVector3& v1, csVector3& v2, int color)`
  Draw a Line.

`STDMETHODIMP DrawPolygonQuick(G3DPolygonDPQ& poly)`
  Draw a projected (non-perspective correct) polygon.

`STDMETHODIMP DrawFltLight(G3DFltLight& light)`
  Draw a projected floating light on the screen.

`STDMETHODIMP CacheTexture(IPolygonTexture* texture)`
  Give a texture to Graphics3D to cache it.

`STDMETHODIMP UncacheTexture(IPolygonTexture* texture)`
  Release a texture from the cache.

`STDMETHODIMP GetCaps(G3D_CAPS *caps)`
  Get the capabilities of this driver: NOT IMPLEMENTED.

`STDMETHODIMP DumpCache(void)`
  Dump the texture cache.

`STDMETHODIMP ClearCache(void)`
  Clear the texture cache.

`STDMETHODIMP GetColormapFormat( G3D_COLORMAPFORMAT& g3dFormat )`

`STDMETHODIMP GetStringError( HRESULT hRes, char* szErrorString )`

`STDMETHODIMP SetCamera( ICamera* pCamera )`
  Set the camera object.

`STDMETHODIMP Print(csRect* rect)`
  Print the screen.

`STDMETHODIMP SetRenderState(G3D_RENDERSTATEOPTION, long value)`
  Set a render state

`STDMETHODIMP GetRenderState(G3D_RENDERSTATEOPTION, long& nValue)`
  Get a render state

`STDMETHODIMP GetZBufPoint(int, int, unsigned long** retval)`
  Get a z-buffer point

`STDMETHODIMP GetWidth(int& nWidth)`
  Get the width

`STDMETHODIMP GetHeight(int& nHeight)`

`STDMETHODIMP SetWorld(IWorld* piWorld)`

`STDMETHODIMP NeedsPO2Maps(void)`

`STDMETHODIMP GetMaximumAspectRatio(int& ratio)`

`STDMETHODIMP Get2dDriver(IGraphics2D** pG2D)`

`bool EnumDevices(void)`
  used to get the appropriate device.

`bool m_bIsLocked`
  whether the device is locked or not.

`inline void SetupPolygon( G3DPolygonDP& poly, float& J1, float& J2, float& J3, float& K1, float& K2, float& K3, float& M, float& N, float& O )`
  used to set up polygon geometry before rasterization.

This class has no child classes.

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de