Platform_Win32_3D_VertexBuffer.h
Go to the documentation of this file.00001 00011 #ifndef __Platform_Win32_3D_VertexBuffer_H__ 00012 #define __Platform_Win32_3D_VertexBuffer_H__ 00013 00014 // Includes 00015 #include "Platform_3D_VertexBuffer.h" 00016 00017 // Forward declares 00018 class Platform_Win32_3D; 00019 class Platform_Win32_3D_Technology; 00020 00021 // Platform_Win32_3D_VertexBuffer 00022 class Platform_Win32_3D_VertexBuffer: public Platform_3D_VertexBuffer 00023 { 00024 public: 00025 Platform_Win32_3D_VertexBuffer( 00026 Platform_Win32_3D* win32_3d, 00027 int vertexFormat, 00028 int vertexCount, 00029 bool dynamic 00030 ); 00031 00032 virtual ~Platform_Win32_3D_VertexBuffer(); 00033 00034 void Reset(Platform_Win32_3D_Technology* technology); 00035 00036 virtual void Lock(int startVertex = 0, int vertexCount = 0); 00037 00038 virtual void Unlock(); 00039 00040 virtual float* GetPositionData(); 00041 00042 virtual int GetPositionStride(); 00043 00044 virtual float* GetScreenPositionData(); 00045 00046 virtual int GetScreenPositionStride(); 00047 00048 virtual float* GetNormalData(); 00049 00050 virtual int GetNormalStride(); 00051 00052 virtual unsigned int* GetDiffuseData(); 00053 00054 virtual int GetDiffuseStride(); 00055 00056 virtual unsigned int* GetSpecularData(); 00057 00058 virtual int GetSpecularStride(); 00059 00060 virtual float* GetUVData(int textureSet); 00061 00062 virtual int GetUVStride(int textureSet); 00063 00064 virtual void Bind(); 00065 00066 private: 00067 bool ValidateVertexFormat( 00068 int vertexFormat 00069 ); 00070 00071 unsigned long CalculateFVF( 00072 int vertexFormat 00073 ); 00074 00075 int CalculateSize( 00076 int vertexFormat 00077 ); 00078 00079 int GetNumberOfTextureSets( 00080 int vertexFormat 00081 ); 00082 00083 private: 00084 Platform_Win32_3D* win32_3d_; 00085 int vertexFormat_; 00086 int vertexCount_; 00087 bool dynamic_; 00088 int vertexSize_; 00089 unsigned char* vertexData_; 00090 bool locked_; 00091 Platform_3D_VertexBuffer* technologyVertexBuffer_; 00092 }; 00093 00094 #endif /* __Platform_Win32_3D_VertexBuffer_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
