www.pudn.com > Direct3D_ZBuffer.zip > Game.h
// Game.h: interface for the CGame class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_GAME_H__687221F3_ACFF_4D66_97DB_88AB70E0CA59__INCLUDED_) #define AFX_GAME_H__687221F3_ACFF_4D66_97DB_88AB70E0CA59__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include#include #include "Helper.h" #include "Cuboid.h" class CGame { public: void EnableLogging(); bool Initialise(HWND hWnd, UINT nWidth, UINT nHeight); void GameLoop(); LPDIRECT3DDEVICE8 GetDevice(); CGame(); virtual ~CGame(); private: bool m_fEnableLogging; D3DFORMAT CheckDisplayMode(UINT nWidth, UINT nHeight, UINT nDepth); bool InitialiseGame(); HRESULT InitialiseD3D(HWND hWnd, UINT nWidth, UINT nHeight); void Render(); LPDIRECT3D8 m_pD3D; LPDIRECT3DDEVICE8 m_pD3DDevice; void SetupRotation(); void SetupCamera(); void SetupPerspective(); void WriteToLog(char *lpszText, ...); DWORD m_dwFrames; DWORD m_dwStartTime; DWORD m_dwEndTime; CCuboid* m_pCube1; CCuboid* m_pCube2; CCuboid* m_pCube3; CCuboid* m_pCube4; CCuboid* m_pCube5; CCuboid* m_pCube6; }; #endif // !defined(AFX_GAME_H__687221F3_ACFF_4D66_97DB_88AB70E0CA59__INCLUDED_)