In file libs/cs3d/direct3d5/d3d_g3d.h:

class csGraphics3DDirect3DDx5 : public IGraphics3D, public IHaloRasterizer

the Direct3D implementation of the Graphics3D class.

Inheritance:


Public Classes

struct csG3DHardwareHaloInfo
Our internal representation of halos.
class csHaloDrawer
Actually draws a halo the the screen.
csHaloDrawer(IGraphics2D* piG2D, float r, float g, float b)
~csHaloDrawer()
int mWidth
the width and height of the graphics context
IGraphics2D* mpiG2D
the 2D graphics context.
int mDim
the size to be drawn (the diameter of the halo)
float mRed
the color of the halo
float mRatioRed
the ratio of the color intensity vs the radius
int mx
the center coords.
unsigned long* mpBuffer
the buffer.
int mBufferWidth
the width of the buffer.

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.
csGraphics3DDirect3DDx5(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, float fov, int color)
Draw a Line.
STDMETHODIMP DrawPolygon(G3DPolygonDP& poly)
Draw the projected polygon with light and texture.
STDMETHODIMP DrawPolygonDebug(G3DPolygonDP& )
Draw debug poly
STDMETHODIMP DrawPolygonFX(G3DPolygonDPFX& poly)
Draw a polygon wit special effects.
STDMETHODIMP DumpCache(void)
Dump the texture cache.
STDMETHODIMP FinishDraw()
End the frame and do a page swap.
STDMETHODIMP FinishPolygonFX()
Finish a series of DrawPolygonFX
STDMETHODIMP Get2dDriver(IGraphics2D** pG2D)
STDMETHODIMP GetCaps(G3D_CAPS *caps)
Get the capabilities of this driver: NOT IMPLEMENTED.
STDMETHODIMP GetColormapFormat( G3D_COLORMAPFORMAT& g3dFormat )
STDMETHODIMP GetFogMode(G3D_FOGMETHOD& retval)
Get the fog mode.
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 GetTextureManager(ITextureManager** pi)
Get the ITextureManager.
STDMETHODIMP GetWidth(int& nWidth)
Get the width
STDMETHODIMP GetZBufPoint(int, int, unsigned long** retval)
Get a z-buffer point
STDMETHODIMP Initialize()
STDMETHODIMP NeedsPO2Maps(void)
STDMETHODIMP Open(char* Title)
opens Direct3D.
STDMETHODIMP Print(csRect* rect)
Print the screen.
STDMETHODIMP SetDimensions(int width, int height)
Change the dimensions of the display.
STDMETHODIMP SetFogMode(G3D_FOGMETHOD fogm)
Get the fog mode.
STDMETHODIMP SetRenderState(G3D_RENDERSTATEOPTION, long)
Set a render state
STDMETHODIMP SetZBufMode(G3DZBufMode mode)
Set the mode for the Z buffer (functionality also exists in SetRenderState).
STDMETHODIMP StartPolygonFX(ITextureHandle* handle, UInt mode)
Start a series of DrawPolygonFX
STDMETHODIMP UncacheTexture(IPolygonTexture* texture)
Release a texture from the cache.
~csGraphics3DDirect3DDx5()
the destructor.

Public

struct csG3DHardwareHaloInfo
Our internal representation of halos.

Private Fields

bool m_bHaloEffect
support halo.
bool m_bIsHardware
whether this is a hardware device.
bool m_bIsLocked
whether the device is locked or not.
bool m_bVerbose
Verbose mode
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
IDirect3D2* m_lpD3D
Direct3D class
IDirect3DMaterial2* m_lpd3dBackMat
D3d Background material.
IDirect3DDevice2* m_lpd3dDevice
D3D Device
IDirect3DViewport2* m_lpd3dViewport
D3d Viewport
IDirectDraw* m_lpDD
Pointer to DirectDraw class
IDirectDrawSurface* m_lpddDevice
Offscreen Surface
IDirectDrawSurface* m_lpddPrimary
Primary Surface
IDirectDrawSurface* 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.
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
csTextureManagerDirect3D* txtmgr
The texture manager
float zdist_mipmap1
Option variables: mipmap distances

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.
IDirectDraw* m_lpDD
Pointer to DirectDraw class

IDirectDrawSurface* m_lpddPrimary
Primary Surface

IDirectDrawSurface* m_lpddDevice
Offscreen Surface

IDirect3D2* m_lpD3D
Direct3D class

IDirectDrawSurface* m_lpddZBuffer
ZBuffer surface

IDirect3DDevice2* m_lpd3dDevice
D3D Device

IDirect3DViewport2* m_lpd3dViewport
D3d Viewport

IDirect3DMaterial2* 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.

csTextureManagerDirect3D* txtmgr
The texture manager

D3DTextureCache* m_pTextureCache
the texture cache.

D3DLightMapCache* m_pLightmapCache
the lightmap cache.

int m_iTypeLightmap
supported lightmap type

bool m_bHaloEffect
support halo.

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)

float zdist_mipmap1
Option variables: mipmap distances

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

G3D_CAPS m_Caps
Capabilities of the renderer.

IGraphics2D* m_piG2D
the 2d graphics driver.

IDirectDetectionInternal* m_pDirectDevice
The directdraw device description

ISystem* m_piSystem
The system driver

bool m_bVerbose
Verbose mode

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

~csGraphics3DDirect3DDx5()
the destructor.

STDMETHODIMP Initialize()

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& )
Draw debug poly

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

STDMETHODIMP StartPolygonFX(ITextureHandle* handle, UInt mode)
Start a series of DrawPolygonFX

STDMETHODIMP FinishPolygonFX()
Finish a series of DrawPolygonFX

STDMETHODIMP DrawPolygonFX(G3DPolygonDPFX& poly)
Draw a polygon wit special effects.

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 Print(csRect* rect)
Print the screen.

STDMETHODIMP SetRenderState(G3D_RENDERSTATEOPTION, long)
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 NeedsPO2Maps(void)

STDMETHODIMP GetMaximumAspectRatio(int& ratio)

STDMETHODIMP GetFogMode(G3D_FOGMETHOD& retval)
Get the fog mode.

STDMETHODIMP SetFogMode(G3D_FOGMETHOD fogm)
Get the fog mode.

STDMETHODIMP GetTextureManager(ITextureManager** pi)
Get the ITextureManager.

STDMETHODIMP Get2dDriver(IGraphics2D** pG2D)

struct csG3DHardwareHaloInfo
Our internal representation of halos.

class csHaloDrawer
Actually draws a halo the the screen.

csHaloDrawer(IGraphics2D* piG2D, float r, float g, float b)

~csHaloDrawer()

int mWidth
the width and height of the graphics context

IGraphics2D* mpiG2D
the 2D graphics context.

int mDim
the size to be drawn (the diameter of the halo)

float mRed
the color of the halo

float mRatioRed
the ratio of the color intensity vs the radius

int mx
the center coords.

unsigned long* mpBuffer
the buffer.

int mBufferWidth
the width of the buffer.

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