"L. Spiro Engine"
|
00001 00017 #ifndef __LSG_DIRECTX9INDEXBUFFER_H__ 00018 #define __LSG_DIRECTX9INDEXBUFFER_H__ 00019 00020 #include "../LSGGraphicsLib.h" 00021 00022 #ifdef LSG_DX9 00023 00024 #include "../DirectX/LSGDirectX9LosableResource.h" 00025 #include "../IndexBuffer/LSGIndexBufferBase.h" 00026 00027 namespace lsg { 00028 00037 class CDirectX9IndexBuffer : protected CIndexBufferBase, public CDirectX9LosableResource { 00038 public : 00039 // == Various constructors. 00040 LSE_CALLCTOR CDirectX9IndexBuffer(); 00041 LSE_CALLCTOR ~CDirectX9IndexBuffer(); 00042 00043 00044 // == Functions. 00048 virtual LSVOID LSE_CALL OnDeviceLost(); 00049 00055 virtual LSBOOL LSE_CALL OnDeviceReset(); 00056 00057 00058 protected : 00059 // == Members. 00063 IDirect3DIndexBuffer9 * m_pibIndexBuffer; 00064 00068 D3DPRIMITIVETYPE m_ptPrimitiveType; 00069 00070 00071 // == Functions. 00077 LSG_IB_INTERFACE LSVOID LSE_CALL InitApi( CAllocator * _paAllocator ); 00078 00086 LSG_IB_INTERFACE LSBOOL LSE_CALL CreateApiIndexBuffer(); 00087 00092 LSG_IB_INTERFACE LSVOID LSE_CALL ResetApi(); 00093 00100 LSG_IB_INTERFACE LSVOID LSE_CALL RenderApi( const CVertexBuffer &_vbBuffer, LSUINT32 _ui32TotalPrimitives ) const; 00101 00107 LSG_IB_INTERFACE LSVOID LSE_CALL SetApiStripType( LSG_VERTEX_BUFFER_PRIMITIVES _vbpType ); 00108 }; 00109 00110 00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00112 // DEFINITIONS 00113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00114 00115 00116 } // namespace lsg 00117 00118 #endif // #ifdef LSG_DX9 00119 00120 #endif // __LSG_DIRECTX9INDEXBUFFER_H__