Graphics Reference
In-Depth Information
class UWBD3D _ DrawHelper : public UWB _ DrawHelper {
// virtual function overrides
// draws D3D points
bool DrawPoint( vec3 position);
// draws a D3D line
bool DrawLine( vec3 start, vec3 end);
// approximates circle with Friangle Fan
bool DrawCircle( vec3 center, float radius);
.
// Sets D3D Render State
void SetShadeMode(eShadeMode mode);
void SetFillMode(eFillMode mode );
};
.
void UWBD3D _ DrawHelper::SetShadeMode(eShadeMode mode) {
LPDIRECT3DDEVICE9 pDevice = UWBD3D _ GraphicsSystem::GetSystem().GetD3DDevice();
.
if ( smGouraud == m _ ShadeMode )
pDevice->SetRenderState(D3DRS _ SHADEMODE, D3DSHADE _ GOURAUD);
.
void UWBD3D _ DrawHelper::SetFillMode(eFillMode mode) {
LPDIRECT3DDEVICE9 pDevice = UWBD3D _ GraphicsSystem::GetSystem().GetD3DDevice();
.
if ( fmSolid == m _ FillMode )
pDevice->SetRenderState(D3DRS _ FILLMODE, D3DFILL _ SOLID);
.
Source file.
uwbgl _ D3DDrawHelper1.h/
.cpp files in the D3D Files/-
DrawHelper subfolder of the
UWBGL _ D3D _ Lib4 project.
Listing 7.2. The UWBD3D _ DrawHelper class (Tutorial 7.1).
Search WWH ::




Custom Search