www.pudn.com > 3D_Tank.rar > d3dUtility.h
#ifndef __d3dUtilityH__ #define __d3dUtilityH__ #include#include namespace d3d { bool InitD3D( HINSTANCE hInstance, int width, int height, bool windowed, D3DDEVTYPE deviceType, IDirect3DDevice9** device, HWND *hWindow, HINSTANCE *instance); int EnterMsgLoop( bool (*ptr_display)(float timeDelta)); LRESULT CALLBACK WndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); template void Release(T t) { if( t ) { t->Release(); t = 0; } } template void Delete(T t) { if( t ) { delete t; t = 0; } } } #endif // __d3dUtilityH__