00001 /* 00002 * Direct3D9 index buffer file 00003 * 00004 * This file is part of the "SoftPixel Engine" (Copyright (c) 2008 by Lukas Hermanns) 00005 * See "SoftPixelEngine.hpp" for license information. 00006 */ 00007 00008 #ifndef __SP_D3D9_INDEX_BUFFER_H__ 00009 #define __SP_D3D9_INDEX_BUFFER_H__ 00010 00011 00012 #include "Base/spStandard.hpp" 00013 00014 #if defined(SP_COMPILE_WITH_DIRECT3D9) 00015 00016 00017 #include "Base/spDimensionUniversalBuffer.hpp" 00018 #include "Base/spMaterialConfigTypes.hpp" 00019 00020 #include <d3d9.h> 00021 00022 00023 namespace sp 00024 { 00025 namespace video 00026 { 00027 00028 00029 class IndexFormat; 00030 00032 class D3D9IndexBuffer 00033 { 00034 00035 private: 00036 00037 friend class Direct3D9RenderSystem; 00038 00039 /* Functions */ 00040 00041 D3D9IndexBuffer(); 00042 ~D3D9IndexBuffer(); 00043 00044 void update( 00045 IDirect3DDevice9* D3DDevice, const dim::UniversalBuffer &BufferData, 00046 const IndexFormat* Format, const EHWBufferUsage Usage 00047 ); 00048 00049 void update( 00050 IDirect3DDevice9* D3DDevice, const dim::UniversalBuffer &BufferData, u32 Index 00051 ); 00052 00053 /* Members */ 00054 00055 D3DFORMAT FormatFlags_; 00056 00057 u32 IndexCount_; 00058 u32 BufferSize_; 00059 00060 IDirect3DIndexBuffer9* HWBuffer_; 00061 00062 }; 00063 00064 00065 } // /namespace video 00066 00067 } // /namespace sp 00068 00069 00070 #endif 00071 00072 #endif 00073 00074 00075 00076 // ================================================================================