Graphics Reference
In-Depth Information
//—————————————————————————————————————————————————————————————————————————
//Global variables
//—————————————————————————————————————————————————————————————————————————
IDirect3DDevice9* g_pd3dDevice; //Direct3D device
LPCWSTR
g_Models[6] = { L”Models\\dragon.x”,
L”Models\\engine.x”,
L”Models\\audi.x”,
L”Models\\skull.x”};
DWORD g_ModelCount = 6;
DWORD g_DwShaderFlags = 0;
DWORD g_CurrentModel = 0;
CSkybox g_Skybox;
ID3DXFont* g_pFont = NULL; //Font for drawing text
ID3DXSprite* g_pTextSprite = NULL; //Sprite for batching draw
text calls
ID3DXEffect* g_pEffect = NULL; //D3DX effect interface
CModelViewerCamera g_Camera; //A model viewing camera
IDirect3DTexture9* g_pDefaultTex = NULL; //Default texture for
texture-less material
bool g_bShowHelp = true; //If true, it renders the UI
control text
CDXUTDialogResourceManager g_DialogResourceManager;//manager for
shared resources of dialogs
CD3DSettingsDlg g_SettingsDlg; //Device settings dialog
CDXUTDialog g_HUD; //dialog for standard
controls
CDXUTDialog g_SampleUI; //dialog for sample specific
controls
ID3DXMesh* g_pMeshSysMem = NULL; //system memory version of
mesh, lives through
resise's
ID3DXMesh* g_pMeshEnhanced = NULL; //vid mem version of mesh
that is enhanced
UINT g_dwNumSegs = 1; //number of segments per edge
(tesselation level)
D3DXMATERIAL* g_pMaterials = NULL; //pointer to material info in
m_pbufMaterials
LPDIRECT3DTEXTURE9* g_ppTextures = NULL; //array of textures, entries
are NULL if no texture
specified
DWORD g_dwNumMaterials = NULL; //number of materials
D3DXVECTOR3 g_vObjectCenter; //Center of bounding sphere
of object
FLOAT g_fObjectRadius; //Radius of bounding sphere
of object
D3DXMATRIXA16 g_mCenterWorld; //World matrix to center the
mesh
ID3DXBuffer* g_pbufMaterials = NULL; //contains both the
materials data and the
filename strings
ID3DXBuffer* g_pbufAdjacency = NULL; //Contains the adjacency
info loaded with the mesh
bool g_bUseHWNPatches = true;
bool g_bWireframe = false;
PDIRECT3DSURFACE9 g_pMSRT = NULL;
//Multi-Sample float render
target
Search WWH ::




Custom Search