Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
DX8Wrapper Class Reference

#include <dx8wrapper.h>

Static Public Member Functions

static bool Init (void *hwnd, bool lite=false)
 
static void Shutdown (void)
 
static void SetCleanupHook (DX8_CleanupHook *pCleanupHook)
 
static void Do_Onetime_Device_Dependent_Inits (void)
 
static void Do_Onetime_Device_Dependent_Shutdowns (void)
 
static bool Is_Device_Lost ()
 
static bool Is_Initted (void)
 
static bool Has_Stencil (void)
 
static void Get_Format_Name (unsigned int format, StringClass *tex_format)
 
static void Begin_Scene (void)
 
static void End_Scene (bool flip_frame=true)
 
static void Flip_To_Primary (void)
 
static void Clear (bool clear_color, bool clear_z_stencil, const Vector3 &color, float dest_alpha=0.0f, float z=1.0f, unsigned int stencil=0)
 Clear current render device.
 
static void Set_Viewport (CONST D3DVIEWPORT8 *pViewport)
 
static void Set_Vertex_Buffer (const VertexBufferClass *vb, unsigned stream=0)
 
static void Set_Vertex_Buffer (const DynamicVBAccessClass &vba)
 
static void Set_Index_Buffer (const IndexBufferClass *ib, unsigned short index_base_offset)
 
static void Set_Index_Buffer (const DynamicIBAccessClass &iba, unsigned short index_base_offset)
 
static void Set_Index_Buffer_Index_Offset (unsigned offset)
 
static void Get_Render_State (RenderStateStruct &state)
 
static void Set_Render_State (const RenderStateStruct &state)
 
static void Release_Render_State ()
 
static void Set_DX8_Material (const D3DMATERIAL8 *mat)
 
static void Set_Gamma (float gamma, float bright, float contrast, bool calibrate=true, bool uselimit=true)
 
static void Set_DX8_ZBias (int zbias)
 
static void Set_Projection_Transform_With_Z_Bias (const Matrix4x4 &matrix, float znear, float zfar)
 
static void Set_Transform (D3DTRANSFORMSTATETYPE transform, const Matrix4x4 &m)
 
static void Set_Transform (D3DTRANSFORMSTATETYPE transform, const Matrix3D &m)
 
static void Get_Transform (D3DTRANSFORMSTATETYPE transform, Matrix4x4 &m)
 
static void Set_World_Identity ()
 
static void Set_View_Identity ()
 
static bool Is_World_Identity ()
 
static bool Is_View_Identity ()
 
static void _Set_DX8_Transform (D3DTRANSFORMSTATETYPE transform, const Matrix4x4 &m)
 
static void _Set_DX8_Transform (D3DTRANSFORMSTATETYPE transform, const Matrix3D &m)
 
static void _Get_DX8_Transform (D3DTRANSFORMSTATETYPE transform, Matrix4x4 &m)
 
static void Set_DX8_Light (int index, D3DLIGHT8 *light)
 
static void Set_DX8_Render_State (D3DRENDERSTATETYPE state, unsigned value)
 
static void Set_DX8_Clip_Plane (DWORD Index, CONST float *pPlane)
 
static void Set_DX8_Texture_Stage_State (unsigned stage, D3DTEXTURESTAGESTATETYPE state, unsigned value)
 
static void Set_DX8_Texture (unsigned int stage, IDirect3DBaseTexture8 *texture)
 
static void Set_Light_Environment (LightEnvironmentClass *light_env)
 Set the light environment. This is a lighting model which used up to four directional lights to produce the lighting.
 
static LightEnvironmentClassGet_Light_Environment ()
 
static void Set_Fog (bool enable, const Vector3 &color, float start, float end)
 
static WWINLINE const D3DLIGHT8 & Peek_Light (unsigned index)
 
static WWINLINE bool Is_Light_Enabled (unsigned index)
 
static bool Validate_Device (void)
 
static void Set_Shader (const ShaderClass &shader)
 
static void Get_Shader (ShaderClass &shader)
 
static void Set_Texture (unsigned stage, TextureBaseClass *texture)
 
static void Set_Material (const VertexMaterialClass *material)
 
static void Set_Light (unsigned index, const D3DLIGHT8 *light)
 
static void Set_Light (unsigned index, const LightClass &light)
 
static void Apply_Render_State_Changes ()
 
static void Draw_Triangles (unsigned buffer_type, unsigned short start_index, unsigned short polygon_count, unsigned short min_vertex_index, unsigned short vertex_count)
 
static void Draw_Triangles (unsigned short start_index, unsigned short polygon_count, unsigned short min_vertex_index, unsigned short vertex_count)
 
static void Draw_Strip (unsigned short start_index, unsigned short index_count, unsigned short min_vertex_index, unsigned short vertex_count)
 
static IDirect3DVolumeTexture8 * _Create_DX8_Volume_Texture (unsigned int width, unsigned int height, unsigned int depth, WW3DFormat format, MipCountType mip_level_count, D3DPOOL pool=D3DPOOL_MANAGED)
 
static IDirect3DCubeTexture8 * _Create_DX8_Cube_Texture (unsigned int width, unsigned int height, WW3DFormat format, MipCountType mip_level_count, D3DPOOL pool=D3DPOOL_MANAGED, bool rendertarget=false)
 
static IDirect3DTexture8 * _Create_DX8_ZTexture (unsigned int width, unsigned int height, WW3DZFormat zformat, MipCountType mip_level_count, D3DPOOL pool=D3DPOOL_MANAGED)
 
static IDirect3DTexture8 * _Create_DX8_Texture (unsigned int width, unsigned int height, WW3DFormat format, MipCountType mip_level_count, D3DPOOL pool=D3DPOOL_MANAGED, bool rendertarget=false)
 
static IDirect3DTexture8 * _Create_DX8_Texture (const char *filename, MipCountType mip_level_count)
 
static IDirect3DTexture8 * _Create_DX8_Texture (IDirect3DSurface8 *surface, MipCountType mip_level_count)
 
static IDirect3DSurface8 * _Create_DX8_Surface (unsigned int width, unsigned int height, WW3DFormat format)
 
static IDirect3DSurface8 * _Create_DX8_Surface (const char *filename)
 
static IDirect3DSurface8 * _Get_DX8_Front_Buffer ()
 
static SurfaceClass_Get_DX8_Back_Buffer (unsigned int num=0)
 
static void _Copy_DX8_Rects (IDirect3DSurface8 *pSourceSurface, CONST RECT *pSourceRectsArray, UINT cRects, IDirect3DSurface8 *pDestinationSurface, CONST POINT *pDestPointsArray)
 
static void _Update_Texture (TextureClass *system, TextureClass *video)
 
static void Flush_DX8_Resource_Manager (unsigned int bytes=0)
 
static unsigned int Get_Free_Texture_RAM ()
 
static unsigned _Get_Main_Thread_ID ()
 
static const D3DADAPTER_IDENTIFIER8 & Get_Current_Adapter_Identifier ()
 
static void Begin_Statistics ()
 
static void End_Statistics ()
 
static unsigned Get_Last_Frame_Matrix_Changes ()
 
static unsigned Get_Last_Frame_Material_Changes ()
 
static unsigned Get_Last_Frame_Vertex_Buffer_Changes ()
 
static unsigned Get_Last_Frame_Index_Buffer_Changes ()
 
static unsigned Get_Last_Frame_Light_Changes ()
 
static unsigned Get_Last_Frame_Texture_Changes ()
 
static unsigned Get_Last_Frame_Render_State_Changes ()
 
static unsigned Get_Last_Frame_Texture_Stage_State_Changes ()
 
static unsigned Get_Last_Frame_DX8_Calls ()
 
static unsigned Get_Last_Frame_Draw_Calls ()
 
static unsigned long Get_FrameCount (void)
 
static bool Get_Fog_Enable ()
 
static D3DCOLOR Get_Fog_Color ()
 
static Vector4 Convert_Color (unsigned color)
 
static unsigned int Convert_Color (const Vector4 &color)
 
static unsigned int Convert_Color (const Vector3 &color, const float alpha)
 
static void Clamp_Color (Vector4 &color)
 
static unsigned int Convert_Color_Clamp (const Vector4 &color)
 
static void Set_Alpha (const float alpha, unsigned int &color)
 
static void _Enable_Triangle_Draw (bool enable)
 
static bool _Is_Triangle_Draw_Enabled ()
 
static IDirect3DSwapChain8 * Create_Additional_Swap_Chain (HWND render_window)
 
static TextureClassCreate_Render_Target (int width, int height, WW3DFormat format=WW3D_FORMAT_UNKNOWN)
 
static void Set_Render_Target (IDirect3DSurface8 *render_target, bool use_default_depth_buffer=false)
 
static void Set_Render_Target (IDirect3DSurface8 *render_target, IDirect3DSurface8 *dpeth_buffer)
 Set render target with depth stencil buffer.
 
static void Set_Render_Target (IDirect3DSwapChain8 *swap_chain)
 
static bool Is_Render_To_Texture (void)
 
static void Create_Render_Target (int width, int height, WW3DFormat format, WW3DZFormat zformat, TextureClass **target, ZTextureClass **depth_buffer)
 Create render target with associated depth stencil buffer.
 
static void Set_Render_Target_With_Z (TextureClass *texture, ZTextureClass *ztexture=NULL)
 
static void Set_Shadow_Map (int idx, ZTextureClass *ztex)
 
static ZTextureClassGet_Shadow_Map (int idx)
 
static void Apply_Default_State ()
 Resets render device to default state.
 
static void Set_Vertex_Shader (DWORD vertex_shader)
 
static void Set_Pixel_Shader (DWORD pixel_shader)
 
static void Set_Vertex_Shader_Constant (int reg, const void *data, int count)
 
static void Set_Pixel_Shader_Constant (int reg, const void *data, int count)
 
static DWORD Get_Vertex_Processing_Behavior ()
 
static void Set_Ambient (const Vector3 &color)
 
static const Vector3Get_Ambient ()
 
static IDirect3DDevice8 * _Get_D3D_Device8 ()
 
static IDirect3D8 * _Get_D3D8 ()
 
static WW3DFormat getBackBufferFormat (void)
 Returns the display format - added by TR for video playback - not part of W3D.
 
static bool Reset_Device (bool reload_assets=true)
 
static const DX8CapsGet_Current_Caps ()
 
static bool Registry_Save_Render_Device (const char *sub_key)
 
static bool Registry_Load_Render_Device (const char *sub_key, bool resize_window)
 
static const char * Get_DX8_Render_State_Name (D3DRENDERSTATETYPE state)
 
static const char * Get_DX8_Texture_Stage_State_Name (D3DTEXTURESTAGESTATETYPE state)
 
static unsigned Get_DX8_Render_State (D3DRENDERSTATETYPE state)
 
static void Get_DX8_Texture_Stage_State_Value_Name (StringClass &name, D3DTEXTURESTAGESTATETYPE state, unsigned value)
 
static void Get_DX8_Render_State_Value_Name (StringClass &name, D3DRENDERSTATETYPE state, unsigned value)
 
static const char * Get_DX8_Texture_Address_Name (unsigned value)
 
static const char * Get_DX8_Texture_Filter_Name (unsigned value)
 
static const char * Get_DX8_Texture_Arg_Name (unsigned value)
 
static const char * Get_DX8_Texture_Op_Name (unsigned value)
 
static const char * Get_DX8_Texture_Transform_Flag_Name (unsigned value)
 
static const char * Get_DX8_ZBuffer_Type_Name (unsigned value)
 
static const char * Get_DX8_Fill_Mode_Name (unsigned value)
 
static const char * Get_DX8_Shade_Mode_Name (unsigned value)
 
static const char * Get_DX8_Blend_Name (unsigned value)
 
static const char * Get_DX8_Cull_Mode_Name (unsigned value)
 
static const char * Get_DX8_Cmp_Func_Name (unsigned value)
 
static const char * Get_DX8_Fog_Mode_Name (unsigned value)
 
static const char * Get_DX8_Stencil_Op_Name (unsigned value)
 
static const char * Get_DX8_Material_Source_Name (unsigned value)
 
static const char * Get_DX8_Vertex_Blend_Flag_Name (unsigned value)
 
static const char * Get_DX8_Patch_Edge_Style_Name (unsigned value)
 
static const char * Get_DX8_Debug_Monitor_Token_Name (unsigned value)
 
static const char * Get_DX8_Blend_Op_Name (unsigned value)
 
static void Invalidate_Cached_Render_States (void)
 
static void Set_Draw_Polygon_Low_Bound_Limit (unsigned n)
 

Static Protected Member Functions

static bool Create_Device (void)
 
static void Release_Device (void)
 
static void Reset_Statistics ()
 
static void Enumerate_Devices ()
 
static void Set_Default_Global_Render_States (void)
 
static bool Set_Any_Render_Device (void)
 
static bool Set_Render_Device (const char *dev_name, int width=-1, int height=-1, int bits=-1, int windowed=-1, bool resize_window=false)
 
static bool Set_Render_Device (int dev=-1, int resx=-1, int resy=-1, int bits=-1, int windowed=-1, bool resize_window=false, bool reset_device=false, bool restore_assets=true)
 
static bool Set_Next_Render_Device (void)
 
static bool Toggle_Windowed (void)
 
static int Get_Render_Device_Count (void)
 
static int Get_Render_Device (void)
 
static const RenderDeviceDescClassGet_Render_Device_Desc (int deviceidx)
 
static const char * Get_Render_Device_Name (int device_index)
 
static bool Set_Device_Resolution (int width=-1, int height=-1, int bits=-1, int windowed=-1, bool resize_window=false)
 
static void Get_Device_Resolution (int &set_w, int &set_h, int &set_bits, bool &set_windowed)
 
static void Get_Render_Target_Resolution (int &set_w, int &set_h, int &set_bits, bool &set_windowed)
 
static int Get_Device_Resolution_Width (void)
 
static int Get_Device_Resolution_Height (void)
 
static bool Registry_Save_Render_Device (const char *sub_key, int device, int width, int height, int depth, bool windowed, int texture_depth)
 
static bool Registry_Load_Render_Device (const char *sub_key, char *device, int device_len, int &width, int &height, int &depth, int &windowed, int &texture_depth)
 
static bool Is_Windowed (void)
 
static void Set_Texture_Bitdepth (int depth)
 
static int Get_Texture_Bitdepth (void)
 
static void Set_Swap_Interval (int swap)
 
static int Get_Swap_Interval (void)
 
static void Set_Polygon_Mode (int mode)
 
static bool Find_Color_And_Z_Mode (int resx, int resy, int bitdepth, D3DFORMAT *set_colorbuffer, D3DFORMAT *set_backbuffer, D3DFORMAT *set_zmode)
 
static bool Find_Color_Mode (D3DFORMAT colorbuffer, int resx, int resy, UINT *mode)
 
static bool Find_Z_Mode (D3DFORMAT colorbuffer, D3DFORMAT backbuffer, D3DFORMAT *zmode)
 
static bool Test_Z_Mode (D3DFORMAT colorbuffer, D3DFORMAT backbuffer, D3DFORMAT zmode)
 
static void Compute_Caps (WW3DFormat display_format)
 

Static Protected Attributes

static DX8_CleanupHookm_pCleanupHook =NULL
 
static RenderStateStruct render_state
 
static unsigned render_state_changed
 
static Matrix4x4 DX8Transforms [D3DTS_WORLD+1]
 
static bool IsInitted = false
 
static bool IsDeviceLost
 
static void * Hwnd
 
static unsigned _MainThreadID = 0
 
static bool _EnableTriangleDraw = true
 
static int CurRenderDevice = -1
 
static int ResolutionWidth = DEFAULT_RESOLUTION_WIDTH
 
static int ResolutionHeight = DEFAULT_RESOLUTION_HEIGHT
 
static int BitDepth = DEFAULT_BIT_DEPTH
 
static int TextureBitDepth = DEFAULT_TEXTURE_BIT_DEPTH
 
static bool IsWindowed = false
 
static D3DFORMAT DisplayFormat = D3DFMT_UNKNOWN
 
static D3DMATRIX old_world
 
static D3DMATRIX old_view
 
static D3DMATRIX old_prj
 
static DWORD Vertex_Shader = 0
 
static DWORD Pixel_Shader = 0
 
static Vector4 Vertex_Shader_Constants [MAX_VERTEX_SHADER_CONSTANTS]
 
static Vector4 Pixel_Shader_Constants [MAX_PIXEL_SHADER_CONSTANTS]
 
static LightEnvironmentClassLight_Environment = NULL
 
static RenderInfoClassRender_Info = NULL
 
static DWORD Vertex_Processing_Behavior = 0
 
static ZTextureClassShadow_Map [MAX_SHADOW_MAPS]
 
static Vector3 Ambient_Color
 
static bool world_identity
 
static unsigned RenderStates [256]
 
static unsigned TextureStageStates [MAX_TEXTURE_STAGES][32]
 
static IDirect3DBaseTexture8 * Textures [MAX_TEXTURE_STAGES]
 
static bool FogEnable = false
 
static D3DCOLOR FogColor = 0
 
static unsigned matrix_changes = 0
 
static unsigned material_changes = 0
 
static unsigned vertex_buffer_changes = 0
 
static unsigned index_buffer_changes = 0
 
static unsigned light_changes = 0
 
static unsigned texture_changes = 0
 
static unsigned render_state_changes = 0
 
static unsigned texture_stage_state_changes = 0
 
static unsigned draw_calls = 0
 
static bool CurrentDX8LightEnables [4]
 
static unsigned long FrameCount = 0
 
static DX8CapsCurrentCaps = 0
 
static D3DADAPTER_IDENTIFIER8 CurrentAdapterIdentifier
 
static IDirect3D8 * D3DInterface = NULL
 
static IDirect3DDevice8 * D3DDevice = NULL
 
static IDirect3DSurface8 * CurrentRenderTarget = NULL
 
static IDirect3DSurface8 * CurrentDepthBuffer = NULL
 
static IDirect3DSurface8 * DefaultRenderTarget = NULL
 
static IDirect3DSurface8 * DefaultDepthBuffer = NULL
 
static unsigned DrawPolygonLowBoundLimit =0
 
static bool IsRenderToTexture = false
 
static int ZBias
 
static float ZNear
 
static float ZFar
 
static Matrix4x4 ProjectionMatrix
 

Friends

class WW3D
 
class DX8IndexBufferClass
 
class DX8VertexBufferClass
 
void DX8_Assert ()
 

Detailed Description

DX8Wrapper

DX8 interface wrapper class. This encapsulates the DX8 interface; adding redundant state detection, stat tracking, etc etc. In general, we will wrap all DX8 calls with at least an WWINLINE function so that we can add stat tracking, etc if needed. Direct access to the D3D device will require "friend" status and should be granted only in extreme circumstances :-)

Definition at line 213 of file dx8wrapper.h.

Member Function Documentation

◆ _Copy_DX8_Rects()

WWINLINE void DX8Wrapper::_Copy_DX8_Rects ( IDirect3DSurface8 * pSourceSurface,
CONST RECT * pSourceRectsArray,
UINT cRects,
IDirect3DSurface8 * pDestinationSurface,
CONST POINT * pDestPointsArray )
static

Definition at line 942 of file dx8wrapper.h.

◆ _Create_DX8_Cube_Texture()

IDirect3DCubeTexture8 * DX8Wrapper::_Create_DX8_Cube_Texture ( unsigned int width,
unsigned int height,
WW3DFormat format,
MipCountType mip_level_count,
D3DPOOL pool = D3DPOOL_MANAGED,
bool rendertarget = false )
static

KJM create cube map texture

Definition at line 2665 of file dx8wrapper.cpp.

◆ _Create_DX8_Surface() [1/2]

IDirect3DSurface8 * DX8Wrapper::_Create_DX8_Surface ( const char * filename)
static

Definition at line 2895 of file dx8wrapper.cpp.

◆ _Create_DX8_Surface() [2/2]

IDirect3DSurface8 * DX8Wrapper::_Create_DX8_Surface ( unsigned int width,
unsigned int height,
WW3DFormat format )
static

Definition at line 2880 of file dx8wrapper.cpp.

◆ _Create_DX8_Texture() [1/3]

IDirect3DTexture8 * DX8Wrapper::_Create_DX8_Texture ( const char * filename,
MipCountType mip_level_count )
static

Definition at line 2501 of file dx8wrapper.cpp.

◆ _Create_DX8_Texture() [2/3]

IDirect3DTexture8 * DX8Wrapper::_Create_DX8_Texture ( IDirect3DSurface8 * surface,
MipCountType mip_level_count )
static

Definition at line 2546 of file dx8wrapper.cpp.

◆ _Create_DX8_Texture() [3/3]

IDirect3DTexture8 * DX8Wrapper::_Create_DX8_Texture ( unsigned int width,
unsigned int height,
WW3DFormat format,
MipCountType mip_level_count,
D3DPOOL pool = D3DPOOL_MANAGED,
bool rendertarget = false )
static

Definition at line 2380 of file dx8wrapper.cpp.

◆ _Create_DX8_Volume_Texture()

IDirect3DVolumeTexture8 * DX8Wrapper::_Create_DX8_Volume_Texture ( unsigned int width,
unsigned int height,
unsigned int depth,
WW3DFormat format,
MipCountType mip_level_count,
D3DPOOL pool = D3DPOOL_MANAGED )
static

KJM create volume texture

Definition at line 2803 of file dx8wrapper.cpp.

◆ _Create_DX8_ZTexture()

IDirect3DTexture8 * DX8Wrapper::_Create_DX8_ZTexture ( unsigned int width,
unsigned int height,
WW3DZFormat zformat,
MipCountType mip_level_count,
D3DPOOL pool = D3DPOOL_MANAGED )
static

KJM create depth stencil texture

Definition at line 2584 of file dx8wrapper.cpp.

◆ _Enable_Triangle_Draw()

static void DX8Wrapper::_Enable_Triangle_Draw ( bool enable)
inlinestatic

Definition at line 461 of file dx8wrapper.h.

◆ _Get_D3D8()

static IDirect3D8 * DX8Wrapper::_Get_D3D8 ( )
inlinestatic

Definition at line 531 of file dx8wrapper.h.

◆ _Get_D3D_Device8()

static IDirect3DDevice8 * DX8Wrapper::_Get_D3D_Device8 ( )
inlinestatic

Definition at line 530 of file dx8wrapper.h.

◆ _Get_DX8_Back_Buffer()

SurfaceClass * DX8Wrapper::_Get_DX8_Back_Buffer ( unsigned int num = 0)
static

Definition at line 3161 of file dx8wrapper.cpp.

◆ _Get_DX8_Front_Buffer()

IDirect3DSurface8 * DX8Wrapper::_Get_DX8_Front_Buffer ( )
static

Definition at line 3146 of file dx8wrapper.cpp.

◆ _Get_DX8_Transform()

WWINLINE void DX8Wrapper::_Get_DX8_Transform ( D3DTRANSFORMSTATETYPE transform,
Matrix4x4 & m )
static

Definition at line 793 of file dx8wrapper.h.

◆ _Get_Main_Thread_ID()

static unsigned DX8Wrapper::_Get_Main_Thread_ID ( )
inlinestatic

Definition at line 427 of file dx8wrapper.h.

◆ _Is_Triangle_Draw_Enabled()

static bool DX8Wrapper::_Is_Triangle_Draw_Enabled ( )
inlinestatic

Definition at line 462 of file dx8wrapper.h.

◆ _Set_DX8_Transform() [1/2]

WWINLINE void DX8Wrapper::_Set_DX8_Transform ( D3DTRANSFORMSTATETYPE transform,
const Matrix3D & m )
static

Definition at line 778 of file dx8wrapper.h.

◆ _Set_DX8_Transform() [2/2]

WWINLINE void DX8Wrapper::_Set_DX8_Transform ( D3DTRANSFORMSTATETYPE transform,
const Matrix4x4 & m )
static

Definition at line 763 of file dx8wrapper.h.

◆ _Update_Texture()

void DX8Wrapper::_Update_Texture ( TextureClass * system,
TextureClass * video )
static

Definition at line 2960 of file dx8wrapper.cpp.

◆ Apply_Default_State()

void DX8Wrapper::Apply_Default_State ( )
static

Resets render device to default state.

Definition at line 3715 of file dx8wrapper.cpp.

◆ Apply_Render_State_Changes()

void DX8Wrapper::Apply_Render_State_Changes ( )
static

Definition at line 2236 of file dx8wrapper.cpp.

◆ Begin_Scene()

void DX8Wrapper::Begin_Scene ( void )
static

Definition at line 1682 of file dx8wrapper.cpp.

◆ Begin_Statistics()

void DX8Wrapper::Begin_Statistics ( )
static

Definition at line 1636 of file dx8wrapper.cpp.

◆ Clamp_Color()

WWINLINE void DX8Wrapper::Clamp_Color ( Vector4 & color)
static

Definition at line 1081 of file dx8wrapper.h.

◆ Clear()

void DX8Wrapper::Clear ( bool clear_color,
bool clear_z_stencil,
const Vector3 & color,
float dest_alpha = 0.0f,
float z = 1.0f,
unsigned int stencil = 0 )
static

Clear current render device.

KM /* 5/17/02 KM Fixed support for render to texture with depth/stencil buffers

Definition at line 1805 of file dx8wrapper.cpp.

◆ Compute_Caps()

void DX8Wrapper::Compute_Caps ( WW3DFormat display_format)
staticprotected

Definition at line 2969 of file dx8wrapper.cpp.

◆ Convert_Color() [1/3]

WWINLINE unsigned int DX8Wrapper::Convert_Color ( const Vector3 & color,
const float alpha )
static

Definition at line 1005 of file dx8wrapper.h.

◆ Convert_Color() [2/3]

WWINLINE unsigned int DX8Wrapper::Convert_Color ( const Vector4 & color)
static

Definition at line 1141 of file dx8wrapper.h.

◆ Convert_Color() [3/3]

WWINLINE Vector4 DX8Wrapper::Convert_Color ( unsigned color)
static

Definition at line 958 of file dx8wrapper.h.

◆ Convert_Color_Clamp()

WWINLINE unsigned int DX8Wrapper::Convert_Color_Clamp ( const Vector4 & color)
static

Definition at line 1146 of file dx8wrapper.h.

◆ Create_Additional_Swap_Chain()

IDirect3DSwapChain8 * DX8Wrapper::Create_Additional_Swap_Chain ( HWND render_window)
static

Definition at line 3617 of file dx8wrapper.cpp.

◆ Create_Device()

bool DX8Wrapper::Create_Device ( void )
staticprotected

Definition at line 501 of file dx8wrapper.cpp.

◆ Create_Render_Target() [1/2]

void DX8Wrapper::Create_Render_Target ( int width,
int height,
WW3DFormat format,
WW3DZFormat zformat,
TextureClass ** target,
ZTextureClass ** depth_buffer )
static

Create render target with associated depth stencil buffer.

KJM

Definition at line 3237 of file dx8wrapper.cpp.

◆ Create_Render_Target() [2/2]

TextureClass * DX8Wrapper::Create_Render_Target ( int width,
int height,
WW3DFormat format = WW3D_FORMAT_UNKNOWN )
static

Definition at line 3179 of file dx8wrapper.cpp.

◆ Do_Onetime_Device_Dependent_Inits()

void DX8Wrapper::Do_Onetime_Device_Dependent_Inits ( void )
static

Definition at line 370 of file dx8wrapper.cpp.

◆ Do_Onetime_Device_Dependent_Shutdowns()

void DX8Wrapper::Do_Onetime_Device_Dependent_Shutdowns ( void )
static

Definition at line 465 of file dx8wrapper.cpp.

◆ Draw_Strip()

void DX8Wrapper::Draw_Strip ( unsigned short start_index,
unsigned short index_count,
unsigned short min_vertex_index,
unsigned short vertex_count )
static

Definition at line 2221 of file dx8wrapper.cpp.

◆ Draw_Triangles() [1/2]

void DX8Wrapper::Draw_Triangles ( unsigned buffer_type,
unsigned short start_index,
unsigned short polygon_count,
unsigned short min_vertex_index,
unsigned short vertex_count )
static

Definition at line 2185 of file dx8wrapper.cpp.

◆ Draw_Triangles() [2/2]

void DX8Wrapper::Draw_Triangles ( unsigned short start_index,
unsigned short polygon_count,
unsigned short min_vertex_index,
unsigned short vertex_count )
static

Definition at line 2206 of file dx8wrapper.cpp.

◆ End_Scene()

void DX8Wrapper::End_Scene ( bool flip_frame = true)
static

Definition at line 1695 of file dx8wrapper.cpp.

◆ End_Statistics()

void DX8Wrapper::End_Statistics ( )
static

Definition at line 1650 of file dx8wrapper.cpp.

◆ Enumerate_Devices()

void DX8Wrapper::Enumerate_Devices ( )
staticprotected

Definition at line 711 of file dx8wrapper.cpp.

◆ Find_Color_And_Z_Mode()

bool DX8Wrapper::Find_Color_And_Z_Mode ( int resx,
int resy,
int bitdepth,
D3DFORMAT * set_colorbuffer,
D3DFORMAT * set_backbuffer,
D3DFORMAT * set_zmode )
staticprotected

Definition at line 1425 of file dx8wrapper.cpp.

◆ Find_Color_Mode()

bool DX8Wrapper::Find_Color_Mode ( D3DFORMAT colorbuffer,
int resx,
int resy,
UINT * mode )
staticprotected

Definition at line 1486 of file dx8wrapper.cpp.

◆ Find_Z_Mode()

bool DX8Wrapper::Find_Z_Mode ( D3DFORMAT colorbuffer,
D3DFORMAT backbuffer,
D3DFORMAT * zmode )
staticprotected

Definition at line 1540 of file dx8wrapper.cpp.

◆ Flip_To_Primary()

void DX8Wrapper::Flip_To_Primary ( void )
static

Definition at line 1749 of file dx8wrapper.cpp.

◆ Flush_DX8_Resource_Manager()

void DX8Wrapper::Flush_DX8_Resource_Manager ( unsigned int bytes = 0)
static

Definition at line 3645 of file dx8wrapper.cpp.

◆ Get_Ambient()

static const Vector3 & DX8Wrapper::Get_Ambient ( )
inlinestatic

Definition at line 524 of file dx8wrapper.h.

◆ Get_Current_Adapter_Identifier()

static const D3DADAPTER_IDENTIFIER8 & DX8Wrapper::Get_Current_Adapter_Identifier ( )
inlinestatic

Definition at line 428 of file dx8wrapper.h.

◆ Get_Current_Caps()

static const DX8Caps * DX8Wrapper::Get_Current_Caps ( )
inlinestatic

Definition at line 536 of file dx8wrapper.h.

◆ Get_Device_Resolution()

void DX8Wrapper::Get_Device_Resolution ( int & set_w,
int & set_h,
int & set_bits,
bool & set_windowed )
staticprotected

Definition at line 1246 of file dx8wrapper.cpp.

◆ Get_Device_Resolution_Height()

static int DX8Wrapper::Get_Device_Resolution_Height ( void )
inlinestaticprotected

Definition at line 600 of file dx8wrapper.h.

◆ Get_Device_Resolution_Width()

static int DX8Wrapper::Get_Device_Resolution_Width ( void )
inlinestaticprotected

Definition at line 599 of file dx8wrapper.h.

◆ Get_DX8_Blend_Name()

const char * DX8Wrapper::Get_DX8_Blend_Name ( unsigned value)
static

Definition at line 4319 of file dx8wrapper.cpp.

◆ Get_DX8_Blend_Op_Name()

const char * DX8Wrapper::Get_DX8_Blend_Op_Name ( unsigned value)
static

Definition at line 4431 of file dx8wrapper.cpp.

◆ Get_DX8_Cmp_Func_Name()

const char * DX8Wrapper::Get_DX8_Cmp_Func_Name ( unsigned value)
static

Definition at line 4349 of file dx8wrapper.cpp.

◆ Get_DX8_Cull_Mode_Name()

const char * DX8Wrapper::Get_DX8_Cull_Mode_Name ( unsigned value)
static

Definition at line 4339 of file dx8wrapper.cpp.

◆ Get_DX8_Debug_Monitor_Token_Name()

const char * DX8Wrapper::Get_DX8_Debug_Monitor_Token_Name ( unsigned value)
static

Definition at line 4422 of file dx8wrapper.cpp.

◆ Get_DX8_Fill_Mode_Name()

const char * DX8Wrapper::Get_DX8_Fill_Mode_Name ( unsigned value)
static

Definition at line 4299 of file dx8wrapper.cpp.

◆ Get_DX8_Fog_Mode_Name()

const char * DX8Wrapper::Get_DX8_Fog_Mode_Name ( unsigned value)
static

Definition at line 4364 of file dx8wrapper.cpp.

◆ Get_DX8_Material_Source_Name()

const char * DX8Wrapper::Get_DX8_Material_Source_Name ( unsigned value)
static

Definition at line 4390 of file dx8wrapper.cpp.

◆ Get_DX8_Patch_Edge_Style_Name()

const char * DX8Wrapper::Get_DX8_Patch_Edge_Style_Name ( unsigned value)
static

Definition at line 4413 of file dx8wrapper.cpp.

◆ Get_DX8_Render_State()

static unsigned DX8Wrapper::Get_DX8_Render_State ( D3DRENDERSTATETYPE state)
inlinestatic

Definition at line 543 of file dx8wrapper.h.

◆ Get_DX8_Render_State_Name()

const char * DX8Wrapper::Get_DX8_Render_State_Name ( D3DRENDERSTATETYPE state)
static

Definition at line 3862 of file dx8wrapper.cpp.

◆ Get_DX8_Render_State_Value_Name()

void DX8Wrapper::Get_DX8_Render_State_Value_Name ( StringClass & name,
D3DRENDERSTATETYPE state,
unsigned value )
static

Definition at line 3979 of file dx8wrapper.cpp.

◆ Get_DX8_Shade_Mode_Name()

const char * DX8Wrapper::Get_DX8_Shade_Mode_Name ( unsigned value)
static

Definition at line 4309 of file dx8wrapper.cpp.

◆ Get_DX8_Stencil_Op_Name()

const char * DX8Wrapper::Get_DX8_Stencil_Op_Name ( unsigned value)
static

Definition at line 4375 of file dx8wrapper.cpp.

◆ Get_DX8_Texture_Address_Name()

const char * DX8Wrapper::Get_DX8_Texture_Address_Name ( unsigned value)
static

Definition at line 4264 of file dx8wrapper.cpp.

◆ Get_DX8_Texture_Arg_Name()

const char * DX8Wrapper::Get_DX8_Texture_Arg_Name ( unsigned value)
static

Definition at line 4235 of file dx8wrapper.cpp.

◆ Get_DX8_Texture_Filter_Name()

const char * DX8Wrapper::Get_DX8_Texture_Filter_Name ( unsigned value)
static

Definition at line 4251 of file dx8wrapper.cpp.

◆ Get_DX8_Texture_Op_Name()

const char * DX8Wrapper::Get_DX8_Texture_Op_Name ( unsigned value)
static

Definition at line 4202 of file dx8wrapper.cpp.

◆ Get_DX8_Texture_Stage_State_Name()

const char * DX8Wrapper::Get_DX8_Texture_Stage_State_Name ( D3DTEXTURESTAGESTATETYPE state)
static

Definition at line 3945 of file dx8wrapper.cpp.

◆ Get_DX8_Texture_Stage_State_Value_Name()

void DX8Wrapper::Get_DX8_Texture_Stage_State_Value_Name ( StringClass & name,
D3DTEXTURESTAGESTATETYPE state,
unsigned value )
static

Definition at line 4127 of file dx8wrapper.cpp.

◆ Get_DX8_Texture_Transform_Flag_Name()

const char * DX8Wrapper::Get_DX8_Texture_Transform_Flag_Name ( unsigned value)
static

Definition at line 4276 of file dx8wrapper.cpp.

◆ Get_DX8_Vertex_Blend_Flag_Name()

const char * DX8Wrapper::Get_DX8_Vertex_Blend_Flag_Name ( unsigned value)
static

Definition at line 4400 of file dx8wrapper.cpp.

◆ Get_DX8_ZBuffer_Type_Name()

const char * DX8Wrapper::Get_DX8_ZBuffer_Type_Name ( unsigned value)
static

Definition at line 4289 of file dx8wrapper.cpp.

◆ Get_Fog_Color()

static D3DCOLOR DX8Wrapper::Get_Fog_Color ( )
inlinestatic

Definition at line 450 of file dx8wrapper.h.

◆ Get_Fog_Enable()

static bool DX8Wrapper::Get_Fog_Enable ( )
inlinestatic

Definition at line 449 of file dx8wrapper.h.

◆ Get_Format_Name()

void DX8Wrapper::Get_Format_Name ( unsigned int format,
StringClass * tex_format )
static

Definition at line 844 of file dx8wrapper.cpp.

◆ Get_FrameCount()

unsigned long DX8Wrapper::Get_FrameCount ( void )
static

Definition at line 1674 of file dx8wrapper.cpp.

◆ Get_Free_Texture_RAM()

unsigned int DX8Wrapper::Get_Free_Texture_RAM ( )
static

Definition at line 3651 of file dx8wrapper.cpp.

◆ Get_Last_Frame_Draw_Calls()

unsigned DX8Wrapper::Get_Last_Frame_Draw_Calls ( )
static

Definition at line 1673 of file dx8wrapper.cpp.

◆ Get_Last_Frame_DX8_Calls()

unsigned DX8Wrapper::Get_Last_Frame_DX8_Calls ( )
static

Definition at line 1672 of file dx8wrapper.cpp.

◆ Get_Last_Frame_Index_Buffer_Changes()

unsigned DX8Wrapper::Get_Last_Frame_Index_Buffer_Changes ( )
static

Definition at line 1667 of file dx8wrapper.cpp.

◆ Get_Last_Frame_Light_Changes()

unsigned DX8Wrapper::Get_Last_Frame_Light_Changes ( )
static

Definition at line 1668 of file dx8wrapper.cpp.

◆ Get_Last_Frame_Material_Changes()

unsigned DX8Wrapper::Get_Last_Frame_Material_Changes ( )
static

Definition at line 1665 of file dx8wrapper.cpp.

◆ Get_Last_Frame_Matrix_Changes()

unsigned DX8Wrapper::Get_Last_Frame_Matrix_Changes ( )
static

Definition at line 1664 of file dx8wrapper.cpp.

◆ Get_Last_Frame_Render_State_Changes()

unsigned DX8Wrapper::Get_Last_Frame_Render_State_Changes ( )
static

Definition at line 1670 of file dx8wrapper.cpp.

◆ Get_Last_Frame_Texture_Changes()

unsigned DX8Wrapper::Get_Last_Frame_Texture_Changes ( )
static

Definition at line 1669 of file dx8wrapper.cpp.

◆ Get_Last_Frame_Texture_Stage_State_Changes()

unsigned DX8Wrapper::Get_Last_Frame_Texture_Stage_State_Changes ( )
static

Definition at line 1671 of file dx8wrapper.cpp.

◆ Get_Last_Frame_Vertex_Buffer_Changes()

unsigned DX8Wrapper::Get_Last_Frame_Vertex_Buffer_Changes ( )
static

Definition at line 1666 of file dx8wrapper.cpp.

◆ Get_Light_Environment()

static LightEnvironmentClass * DX8Wrapper::Get_Light_Environment ( )
inlinestatic

Definition at line 327 of file dx8wrapper.h.

◆ Get_Render_Device()

int DX8Wrapper::Get_Render_Device ( void )
staticprotected

Definition at line 1161 of file dx8wrapper.cpp.

◆ Get_Render_Device_Count()

int DX8Wrapper::Get_Render_Device_Count ( void )
staticprotected

Definition at line 1156 of file dx8wrapper.cpp.

◆ Get_Render_Device_Desc()

const RenderDeviceDescClass & DX8Wrapper::Get_Render_Device_Desc ( int deviceidx)
staticprotected

Definition at line 1167 of file dx8wrapper.cpp.

◆ Get_Render_Device_Name()

const char * DX8Wrapper::Get_Render_Device_Name ( int device_index)
staticprotected

Definition at line 1189 of file dx8wrapper.cpp.

◆ Get_Render_State()

WWINLINE void DX8Wrapper::Get_Render_State ( RenderStateStruct & state)
static

Definition at line 1163 of file dx8wrapper.h.

◆ Get_Render_Target_Resolution()

void DX8Wrapper::Get_Render_Target_Resolution ( int & set_w,
int & set_h,
int & set_bits,
bool & set_windowed )
staticprotected

Definition at line 1258 of file dx8wrapper.cpp.

◆ Get_Shader()

WWINLINE void DX8Wrapper::Get_Shader ( ShaderClass & shader)
static

Definition at line 1168 of file dx8wrapper.h.

◆ Get_Shadow_Map()

static ZTextureClass * DX8Wrapper::Get_Shadow_Map ( int idx)
inlinestatic

Definition at line 508 of file dx8wrapper.h.

◆ Get_Swap_Interval()

int DX8Wrapper::Get_Swap_Interval ( void )
staticprotected

Definition at line 1144 of file dx8wrapper.cpp.

◆ Get_Texture_Bitdepth()

static int DX8Wrapper::Get_Texture_Bitdepth ( void )
inlinestaticprotected

Definition at line 607 of file dx8wrapper.h.

◆ Get_Transform()

WWINLINE void DX8Wrapper::Get_Transform ( D3DTRANSFORMSTATETYPE transform,
Matrix4x4 & m )
static

Definition at line 1324 of file dx8wrapper.h.

◆ Get_Vertex_Processing_Behavior()

static DWORD DX8Wrapper::Get_Vertex_Processing_Behavior ( )
inlinestatic

Definition at line 520 of file dx8wrapper.h.

◆ getBackBufferFormat()

WW3DFormat DX8Wrapper::getBackBufferFormat ( void )
static

Returns the display format - added by TR for video playback - not part of W3D.

Definition at line 4448 of file dx8wrapper.cpp.

◆ Has_Stencil()

bool DX8Wrapper::Has_Stencil ( void )
static

Definition at line 1149 of file dx8wrapper.cpp.

◆ Init()

bool DX8Wrapper::Init ( void * hwnd,
bool lite = false )
static

Definition at line 247 of file dx8wrapper.cpp.

◆ Invalidate_Cached_Render_States()

void DX8Wrapper::Invalidate_Cached_Render_States ( void )
static

Definition at line 426 of file dx8wrapper.cpp.

◆ Is_Device_Lost()

static bool DX8Wrapper::Is_Device_Lost ( )
inlinestatic

Definition at line 269 of file dx8wrapper.h.

◆ Is_Initted()

static bool DX8Wrapper::Is_Initted ( void )
inlinestatic

Definition at line 270 of file dx8wrapper.h.

◆ Is_Light_Enabled()

WWINLINE bool DX8Wrapper::Is_Light_Enabled ( unsigned index)
static

Definition at line 1350 of file dx8wrapper.h.

◆ Is_Render_To_Texture()

static bool DX8Wrapper::Is_Render_To_Texture ( void )
inlinestatic

Definition at line 493 of file dx8wrapper.h.

◆ Is_View_Identity()

WWINLINE bool DX8Wrapper::Is_View_Identity ( )
static

Definition at line 1319 of file dx8wrapper.h.

◆ Is_Windowed()

static bool DX8Wrapper::Is_Windowed ( void )
inlinestaticprotected

Definition at line 604 of file dx8wrapper.h.

◆ Is_World_Identity()

WWINLINE bool DX8Wrapper::Is_World_Identity ( )
static

Definition at line 1314 of file dx8wrapper.h.

◆ Peek_Light()

WWINLINE const D3DLIGHT8 & DX8Wrapper::Peek_Light ( unsigned index)
static

Definition at line 1345 of file dx8wrapper.h.

◆ Registry_Load_Render_Device() [1/2]

bool DX8Wrapper::Registry_Load_Render_Device ( const char * sub_key,
bool resize_window )
static

Definition at line 1309 of file dx8wrapper.cpp.

◆ Registry_Load_Render_Device() [2/2]

bool DX8Wrapper::Registry_Load_Render_Device ( const char * sub_key,
char * device,
int device_len,
int & width,
int & height,
int & depth,
int & windowed,
int & texture_depth )
staticprotected

Definition at line 1400 of file dx8wrapper.cpp.

◆ Registry_Save_Render_Device() [1/2]

bool DX8Wrapper::Registry_Save_Render_Device ( const char * sub_key)
static

Definition at line 1278 of file dx8wrapper.cpp.

◆ Registry_Save_Render_Device() [2/2]

bool DX8Wrapper::Registry_Save_Render_Device ( const char * sub_key,
int device,
int width,
int height,
int depth,
bool windowed,
int texture_depth )
staticprotected

Definition at line 1286 of file dx8wrapper.cpp.

◆ Release_Device()

void DX8Wrapper::Release_Device ( void )
staticprotected

Definition at line 673 of file dx8wrapper.cpp.

◆ Release_Render_State()

WWINLINE void DX8Wrapper::Release_Render_State ( )
static

Definition at line 1388 of file dx8wrapper.h.

◆ Reset_Device()

bool DX8Wrapper::Reset_Device ( bool reload_assets = true)
static

Definition at line 620 of file dx8wrapper.cpp.

◆ Reset_Statistics()

void DX8Wrapper::Reset_Statistics ( )
staticprotected

Definition at line 1611 of file dx8wrapper.cpp.

◆ Set_Alpha()

WWINLINE void DX8Wrapper::Set_Alpha ( const float alpha,
unsigned int & color )
static

Definition at line 1156 of file dx8wrapper.h.

◆ Set_Ambient()

WWINLINE void DX8Wrapper::Set_Ambient ( const Vector3 & color)
static

Definition at line 835 of file dx8wrapper.h.

◆ Set_Any_Render_Device()

bool DX8Wrapper::Set_Any_Render_Device ( void )
staticprotected

Definition at line 803 of file dx8wrapper.cpp.

◆ Set_Default_Global_Render_States()

void DX8Wrapper::Set_Default_Global_Render_States ( void )
staticprotected

Definition at line 394 of file dx8wrapper.cpp.

◆ Set_Device_Resolution()

bool DX8Wrapper::Set_Device_Resolution ( int width = -1,
int height = -1,
int bits = -1,
int windowed = -1,
bool resize_window = false )
staticprotected

Definition at line 1195 of file dx8wrapper.cpp.

◆ Set_Draw_Polygon_Low_Bound_Limit()

static void DX8Wrapper::Set_Draw_Polygon_Low_Bound_Limit ( unsigned n)
inlinestatic

Definition at line 570 of file dx8wrapper.h.

◆ Set_DX8_Clip_Plane()

WWINLINE void DX8Wrapper::Set_DX8_Clip_Plane ( DWORD Index,
CONST float * pPlane )
static

Definition at line 894 of file dx8wrapper.h.

◆ Set_DX8_Light()

WWINLINE void DX8Wrapper::Set_DX8_Light ( int index,
D3DLIGHT8 * light )
static

Definition at line 857 of file dx8wrapper.h.

◆ Set_DX8_Material()

WWINLINE void DX8Wrapper::Set_DX8_Material ( const D3DMATERIAL8 * mat)
static

Definition at line 849 of file dx8wrapper.h.

◆ Set_DX8_Render_State()

WWINLINE void DX8Wrapper::Set_DX8_Render_State ( D3DRENDERSTATETYPE state,
unsigned value )
static

Definition at line 874 of file dx8wrapper.h.

◆ Set_DX8_Texture()

WWINLINE void DX8Wrapper::Set_DX8_Texture ( unsigned int stage,
IDirect3DBaseTexture8 * texture )
static

Definition at line 924 of file dx8wrapper.h.

◆ Set_DX8_Texture_Stage_State()

WWINLINE void DX8Wrapper::Set_DX8_Texture_Stage_State ( unsigned stage,
D3DTEXTURESTAGESTATETYPE state,
unsigned value )
static

Definition at line 899 of file dx8wrapper.h.

◆ Set_DX8_ZBias()

WWINLINE void DX8Wrapper::Set_DX8_ZBias ( int zbias)
static

Definition at line 1229 of file dx8wrapper.h.

◆ Set_Fog()

WWINLINE void DX8Wrapper::Set_Fog ( bool enable,
const Vector3 & color,
float start,
float end )
static

Definition at line 819 of file dx8wrapper.h.

◆ Set_Gamma()

void DX8Wrapper::Set_Gamma ( float gamma,
float bright,
float contrast,
bool calibrate = true,
bool uselimit = true )
static

Definition at line 3662 of file dx8wrapper.cpp.

◆ Set_Index_Buffer() [1/2]

void DX8Wrapper::Set_Index_Buffer ( const DynamicIBAccessClass & iba,
unsigned short index_base_offset )
static

Definition at line 1933 of file dx8wrapper.cpp.

◆ Set_Index_Buffer() [2/2]

void DX8Wrapper::Set_Index_Buffer ( const IndexBufferClass * ib,
unsigned short index_base_offset )
static

Definition at line 1885 of file dx8wrapper.cpp.

◆ Set_Index_Buffer_Index_Offset()

WWINLINE void DX8Wrapper::Set_Index_Buffer_Index_Offset ( unsigned offset)
static

Definition at line 804 of file dx8wrapper.h.

◆ Set_Light() [1/2]

void DX8Wrapper::Set_Light ( unsigned index,
const D3DLIGHT8 * light )
static

Definition at line 2978 of file dx8wrapper.cpp.

◆ Set_Light() [2/2]

void DX8Wrapper::Set_Light ( unsigned index,
const LightClass & light )
static

Definition at line 2990 of file dx8wrapper.cpp.

◆ Set_Light_Environment()

void DX8Wrapper::Set_Light_Environment ( LightEnvironmentClass * light_env)
static

Set the light environment. This is a lighting model which used up to four directional lights to produce the lighting.

5/27/02 KJM Added shader light environment support

Definition at line 3067 of file dx8wrapper.cpp.

◆ Set_Material()

WWINLINE void DX8Wrapper::Set_Material ( const VertexMaterialClass * material)
static

Definition at line 1181 of file dx8wrapper.h.

◆ Set_Next_Render_Device()

bool DX8Wrapper::Set_Next_Render_Device ( void )
staticprotected

Definition at line 1078 of file dx8wrapper.cpp.

◆ Set_Pixel_Shader()

WWINLINE void DX8Wrapper::Set_Pixel_Shader ( DWORD pixel_shader)
static

Definition at line 730 of file dx8wrapper.h.

◆ Set_Pixel_Shader_Constant()

WWINLINE void DX8Wrapper::Set_Pixel_Shader_Constant ( int reg,
const void * data,
int count )
static

Definition at line 750 of file dx8wrapper.h.

◆ Set_Polygon_Mode()

static void DX8Wrapper::Set_Polygon_Mode ( int mode)
staticprotected

◆ Set_Projection_Transform_With_Z_Bias()

WWINLINE void DX8Wrapper::Set_Projection_Transform_With_Z_Bias ( const Matrix4x4 & matrix,
float znear,
float zfar )
static

Definition at line 1210 of file dx8wrapper.h.

◆ Set_Render_Device() [1/2]

bool DX8Wrapper::Set_Render_Device ( const char * dev_name,
int width = -1,
int height = -1,
int bits = -1,
int windowed = -1,
bool resize_window = false )
staticprotected

Definition at line 822 of file dx8wrapper.cpp.

◆ Set_Render_Device() [2/2]

bool DX8Wrapper::Set_Render_Device ( int dev = -1,
int resx = -1,
int resy = -1,
int bits = -1,
int windowed = -1,
bool resize_window = false,
bool reset_device = false,
bool restore_assets = true )
staticprotected

Definition at line 888 of file dx8wrapper.cpp.

◆ Set_Render_State()

WWINLINE void DX8Wrapper::Set_Render_State ( const RenderStateStruct & state)
static

Definition at line 1356 of file dx8wrapper.h.

◆ Set_Render_Target() [1/3]

void DX8Wrapper::Set_Render_Target ( IDirect3DSurface8 * render_target,
bool use_default_depth_buffer = false )
static

Definition at line 3381 of file dx8wrapper.cpp.

◆ Set_Render_Target() [2/3]

void DX8Wrapper::Set_Render_Target ( IDirect3DSurface8 * render_target,
IDirect3DSurface8 * depth_buffer )
static

Set render target with depth stencil buffer.

KJM

Definition at line 3506 of file dx8wrapper.cpp.

◆ Set_Render_Target() [3/3]

void DX8Wrapper::Set_Render_Target ( IDirect3DSwapChain8 * swap_chain)
static

Definition at line 3351 of file dx8wrapper.cpp.

◆ Set_Render_Target_With_Z()

void DX8Wrapper::Set_Render_Target_With_Z ( TextureClass * texture,
ZTextureClass * ztexture = NULL )
static

Set render target KM Added optional custom z target

Definition at line 3322 of file dx8wrapper.cpp.

◆ Set_Shader()

WWINLINE void DX8Wrapper::Set_Shader ( const ShaderClass & shader)
static

Definition at line 1197 of file dx8wrapper.h.

◆ Set_Shadow_Map()

static void DX8Wrapper::Set_Shadow_Map ( int idx,
ZTextureClass * ztex )
inlinestatic

Definition at line 507 of file dx8wrapper.h.

◆ Set_Swap_Interval()

void DX8Wrapper::Set_Swap_Interval ( int swap)
staticprotected

Definition at line 1131 of file dx8wrapper.cpp.

◆ Set_Texture()

WWINLINE void DX8Wrapper::Set_Texture ( unsigned stage,
TextureBaseClass * texture )
static

Definition at line 1173 of file dx8wrapper.h.

◆ Set_Texture_Bitdepth()

static void DX8Wrapper::Set_Texture_Bitdepth ( int depth)
inlinestaticprotected

Definition at line 606 of file dx8wrapper.h.

◆ Set_Transform() [1/2]

WWINLINE void DX8Wrapper::Set_Transform ( D3DTRANSFORMSTATETYPE transform,
const Matrix3D & m )
static

Definition at line 1278 of file dx8wrapper.h.

◆ Set_Transform() [2/2]

WWINLINE void DX8Wrapper::Set_Transform ( D3DTRANSFORMSTATETYPE transform,
const Matrix4x4 & m )
static

Definition at line 1249 of file dx8wrapper.h.

◆ Set_Vertex_Buffer() [1/2]

void DX8Wrapper::Set_Vertex_Buffer ( const DynamicVBAccessClass & vba)
static

Definition at line 1909 of file dx8wrapper.cpp.

◆ Set_Vertex_Buffer() [2/2]

void DX8Wrapper::Set_Vertex_Buffer ( const VertexBufferClass * vb,
unsigned stream = 0 )
static

Definition at line 1859 of file dx8wrapper.cpp.

◆ Set_Vertex_Shader()

WWINLINE void DX8Wrapper::Set_Vertex_Shader ( DWORD vertex_shader)
static

Definition at line 719 of file dx8wrapper.h.

◆ Set_Vertex_Shader_Constant()

WWINLINE void DX8Wrapper::Set_Vertex_Shader_Constant ( int reg,
const void * data,
int count )
static

Definition at line 739 of file dx8wrapper.h.

◆ Set_View_Identity()

WWINLINE void DX8Wrapper::Set_View_Identity ( )
static

Definition at line 1307 of file dx8wrapper.h.

◆ Set_Viewport()

void DX8Wrapper::Set_Viewport ( CONST D3DVIEWPORT8 * pViewport)
static

Definition at line 1845 of file dx8wrapper.cpp.

◆ Set_World_Identity()

WWINLINE void DX8Wrapper::Set_World_Identity ( )
static

Definition at line 1300 of file dx8wrapper.h.

◆ SetCleanupHook()

static void DX8Wrapper::SetCleanupHook ( DX8_CleanupHook * pCleanupHook)
inlinestatic

Definition at line 261 of file dx8wrapper.h.

◆ Shutdown()

void DX8Wrapper::Shutdown ( void )
static

Definition at line 325 of file dx8wrapper.cpp.

◆ Test_Z_Mode()

bool DX8Wrapper::Test_Z_Mode ( D3DFORMAT colorbuffer,
D3DFORMAT backbuffer,
D3DFORMAT zmode )
staticprotected

Definition at line 1590 of file dx8wrapper.cpp.

◆ Toggle_Windowed()

bool DX8Wrapper::Toggle_Windowed ( void )
staticprotected

Definition at line 1084 of file dx8wrapper.cpp.

◆ Validate_Device()

bool DX8Wrapper::Validate_Device ( void )
static

Definition at line 417 of file dx8wrapper.cpp.

Friends And Related Symbol Documentation

◆ DX8_Assert

void DX8_Assert ( )
friend

Definition at line 1676 of file dx8wrapper.cpp.

◆ DX8IndexBufferClass

friend class DX8IndexBufferClass
friend

Definition at line 714 of file dx8wrapper.h.

◆ DX8VertexBufferClass

friend class DX8VertexBufferClass
friend

Definition at line 715 of file dx8wrapper.h.

◆ WW3D

friend class WW3D
friend

Definition at line 713 of file dx8wrapper.h.

Member Data Documentation

◆ _EnableTriangleDraw

bool DX8Wrapper::_EnableTriangleDraw = true
staticprotected

Definition at line 637 of file dx8wrapper.h.

◆ _MainThreadID

unsigned DX8Wrapper::_MainThreadID = 0
staticprotected

Definition at line 635 of file dx8wrapper.h.

◆ Ambient_Color

Vector3 DX8Wrapper::Ambient_Color
staticprotected

Definition at line 665 of file dx8wrapper.h.

◆ BitDepth

int DX8Wrapper::BitDepth = DEFAULT_BIT_DEPTH
staticprotected

Definition at line 642 of file dx8wrapper.h.

◆ CurRenderDevice

int DX8Wrapper::CurRenderDevice = -1
staticprotected

Definition at line 639 of file dx8wrapper.h.

◆ CurrentAdapterIdentifier

D3DADAPTER_IDENTIFIER8 DX8Wrapper::CurrentAdapterIdentifier
staticprotected

Definition at line 693 of file dx8wrapper.h.

◆ CurrentCaps

DX8Caps * DX8Wrapper::CurrentCaps = 0
staticprotected

Definition at line 691 of file dx8wrapper.h.

◆ CurrentDepthBuffer

IDirect3DSurface8 * DX8Wrapper::CurrentDepthBuffer = NULL
staticprotected

Definition at line 699 of file dx8wrapper.h.

◆ CurrentDX8LightEnables

bool DX8Wrapper::CurrentDX8LightEnables
staticprotected

Definition at line 687 of file dx8wrapper.h.

◆ CurrentRenderTarget

IDirect3DSurface8 * DX8Wrapper::CurrentRenderTarget = NULL
staticprotected

Definition at line 698 of file dx8wrapper.h.

◆ D3DDevice

IDirect3DDevice8 * DX8Wrapper::D3DDevice = NULL
staticprotected

Definition at line 696 of file dx8wrapper.h.

◆ D3DInterface

IDirect3D8 * DX8Wrapper::D3DInterface = NULL
staticprotected

Definition at line 695 of file dx8wrapper.h.

◆ DefaultDepthBuffer

IDirect3DSurface8 * DX8Wrapper::DefaultDepthBuffer = NULL
staticprotected

Definition at line 701 of file dx8wrapper.h.

◆ DefaultRenderTarget

IDirect3DSurface8 * DX8Wrapper::DefaultRenderTarget = NULL
staticprotected

Definition at line 700 of file dx8wrapper.h.

◆ DisplayFormat

D3DFORMAT DX8Wrapper::DisplayFormat = D3DFMT_UNKNOWN
staticprotected

Definition at line 645 of file dx8wrapper.h.

◆ draw_calls

unsigned DX8Wrapper::draw_calls = 0
staticprotected

Definition at line 686 of file dx8wrapper.h.

◆ DrawPolygonLowBoundLimit

unsigned DX8Wrapper::DrawPolygonLowBoundLimit =0
staticprotected

Definition at line 703 of file dx8wrapper.h.

◆ DX8Transforms

Matrix4x4 DX8Wrapper::DX8Transforms
staticprotected

Definition at line 630 of file dx8wrapper.h.

◆ FogColor

D3DCOLOR DX8Wrapper::FogColor = 0
staticprotected

Definition at line 676 of file dx8wrapper.h.

◆ FogEnable

bool DX8Wrapper::FogEnable = false
staticprotected

Definition at line 675 of file dx8wrapper.h.

◆ FrameCount

unsigned long DX8Wrapper::FrameCount = 0
staticprotected

Definition at line 689 of file dx8wrapper.h.

◆ Hwnd

void* DX8Wrapper::Hwnd
staticprotected

Definition at line 634 of file dx8wrapper.h.

◆ index_buffer_changes

unsigned DX8Wrapper::index_buffer_changes = 0
staticprotected

Definition at line 681 of file dx8wrapper.h.

◆ IsDeviceLost

bool DX8Wrapper::IsDeviceLost
staticprotected

Definition at line 633 of file dx8wrapper.h.

◆ IsInitted

bool DX8Wrapper::IsInitted = false
staticprotected

Definition at line 632 of file dx8wrapper.h.

◆ IsRenderToTexture

bool DX8Wrapper::IsRenderToTexture = false
staticprotected

Definition at line 705 of file dx8wrapper.h.

◆ IsWindowed

bool DX8Wrapper::IsWindowed = false
staticprotected

Definition at line 644 of file dx8wrapper.h.

◆ light_changes

unsigned DX8Wrapper::light_changes = 0
staticprotected

Definition at line 682 of file dx8wrapper.h.

◆ Light_Environment

LightEnvironmentClass * DX8Wrapper::Light_Environment = NULL
staticprotected

Definition at line 658 of file dx8wrapper.h.

◆ m_pCleanupHook

DX8_CleanupHook * DX8Wrapper::m_pCleanupHook =NULL
staticprotected

Definition at line 626 of file dx8wrapper.h.

◆ material_changes

unsigned DX8Wrapper::material_changes = 0
staticprotected

Definition at line 679 of file dx8wrapper.h.

◆ matrix_changes

unsigned DX8Wrapper::matrix_changes = 0
staticprotected

Definition at line 678 of file dx8wrapper.h.

◆ old_prj

D3DMATRIX DX8Wrapper::old_prj
staticprotected

Definition at line 649 of file dx8wrapper.h.

◆ old_view

D3DMATRIX DX8Wrapper::old_view
staticprotected

Definition at line 648 of file dx8wrapper.h.

◆ old_world

D3DMATRIX DX8Wrapper::old_world
staticprotected

Definition at line 647 of file dx8wrapper.h.

◆ Pixel_Shader

DWORD DX8Wrapper::Pixel_Shader = 0
staticprotected

Definition at line 653 of file dx8wrapper.h.

◆ Pixel_Shader_Constants

Vector4 DX8Wrapper::Pixel_Shader_Constants
staticprotected

Definition at line 656 of file dx8wrapper.h.

◆ ProjectionMatrix

Matrix4x4 DX8Wrapper::ProjectionMatrix
staticprotected

Definition at line 710 of file dx8wrapper.h.

◆ Render_Info

RenderInfoClass * DX8Wrapper::Render_Info = NULL
staticprotected

Definition at line 659 of file dx8wrapper.h.

◆ render_state

RenderStateStruct DX8Wrapper::render_state
staticprotected

Definition at line 628 of file dx8wrapper.h.

◆ render_state_changed

unsigned DX8Wrapper::render_state_changed
staticprotected

Definition at line 629 of file dx8wrapper.h.

◆ render_state_changes

unsigned DX8Wrapper::render_state_changes = 0
staticprotected

Definition at line 684 of file dx8wrapper.h.

◆ RenderStates

unsigned DX8Wrapper::RenderStates
staticprotected

Definition at line 669 of file dx8wrapper.h.

◆ ResolutionHeight

int DX8Wrapper::ResolutionHeight = DEFAULT_RESOLUTION_HEIGHT
staticprotected

Definition at line 641 of file dx8wrapper.h.

◆ ResolutionWidth

int DX8Wrapper::ResolutionWidth = DEFAULT_RESOLUTION_WIDTH
staticprotected

Definition at line 640 of file dx8wrapper.h.

◆ Shadow_Map

ZTextureClass * DX8Wrapper::Shadow_Map
staticprotected

Definition at line 663 of file dx8wrapper.h.

◆ texture_changes

unsigned DX8Wrapper::texture_changes = 0
staticprotected

Definition at line 683 of file dx8wrapper.h.

◆ texture_stage_state_changes

unsigned DX8Wrapper::texture_stage_state_changes = 0
staticprotected

Definition at line 685 of file dx8wrapper.h.

◆ TextureBitDepth

int DX8Wrapper::TextureBitDepth = DEFAULT_TEXTURE_BIT_DEPTH
staticprotected

Definition at line 643 of file dx8wrapper.h.

◆ Textures

IDirect3DBaseTexture8 * DX8Wrapper::Textures
staticprotected

Definition at line 671 of file dx8wrapper.h.

◆ TextureStageStates

unsigned DX8Wrapper::TextureStageStates
staticprotected

Definition at line 670 of file dx8wrapper.h.

◆ vertex_buffer_changes

unsigned DX8Wrapper::vertex_buffer_changes = 0
staticprotected

Definition at line 680 of file dx8wrapper.h.

◆ Vertex_Processing_Behavior

DWORD DX8Wrapper::Vertex_Processing_Behavior = 0
staticprotected

Definition at line 661 of file dx8wrapper.h.

◆ Vertex_Shader

DWORD DX8Wrapper::Vertex_Shader = 0
staticprotected

Definition at line 652 of file dx8wrapper.h.

◆ Vertex_Shader_Constants

Vector4 DX8Wrapper::Vertex_Shader_Constants
staticprotected

Definition at line 655 of file dx8wrapper.h.

◆ world_identity

bool DX8Wrapper::world_identity
staticprotected

Definition at line 668 of file dx8wrapper.h.

◆ ZBias

int DX8Wrapper::ZBias
staticprotected

Definition at line 707 of file dx8wrapper.h.

◆ ZFar

float DX8Wrapper::ZFar
staticprotected

Definition at line 709 of file dx8wrapper.h.

◆ ZNear

float DX8Wrapper::ZNear
staticprotected

Definition at line 708 of file dx8wrapper.h.


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