Platform_3D.h
Go to the documentation of this file.00001 00011 #ifndef __Platform_3D_H__ 00012 #define __Platform_3D_H__ 00013 00014 // Includes 00015 #include "Platform.h" 00016 #include "Platform_3D_VertexBuffer.h" 00017 00018 // Forward declares 00019 class Platform_3D_IndexBuffer; 00020 class Platform_3D_Texture; 00021 class Platform_3D_VertexBuffer; 00022 class Asset; 00023 class Image; 00024 00025 // Platform_3D 00026 class Platform_3D 00027 { 00028 public: 00029 virtual ~Platform_3D() { }; 00030 00031 virtual void SetFullscreen(bool fullscreen) = 0; 00032 00033 virtual bool GetFullscreen() = 0; 00034 00035 virtual void SetSize(int width, int height) = 0; 00036 00037 virtual int GetWidth() = 0; 00038 00039 virtual int GetHeight() = 0; 00040 00041 virtual void BeginScene( 00042 unsigned int color, 00043 float z, 00044 unsigned int stencil 00045 ) = 0; 00046 00047 virtual void EndScene() = 0; 00048 00049 virtual Platform_3D_VertexBuffer* CreateVertexBuffer( 00050 int vertexFormat, 00051 int vertexCount, 00052 bool dynamic 00053 ) = 0; 00054 00055 virtual Platform_3D_IndexBuffer* CreateIndexBuffer( 00056 int indexCount, 00057 bool dynamic 00058 ) = 0; 00059 00060 virtual Platform_3D_Texture* CreateTexture( 00061 const Asset& asset 00062 ) = 0; 00063 00064 virtual Platform_3D_Texture* CreateTexture( 00065 const Image& image 00066 ) = 0; 00067 00068 virtual void Render( 00069 int startVertex, 00070 int vertexCount, 00071 int startIndex, 00072 int indexCount 00073 ) = 0; 00074 00075 00076 virtual void Render( 00077 int startVertex, 00078 int vertexCount 00079 ) = 0; 00080 00081 00082 virtual void SetWorldMatrix( 00083 const float worldMatrix[16] 00084 ) = 0; 00085 00086 virtual void SetViewMatrix( 00087 const float viewMatrix[16] 00088 ) = 0; 00089 00090 virtual void SetProjectionMatrix( 00091 const float projectionMatrix[16] 00092 ) = 0; 00093 00094 virtual int GetLightCount() = 0; 00095 00096 virtual void EnableDirectionalLight( 00097 int lightIndex, 00098 float colorR, 00099 float colorG, 00100 float colorB, 00101 float directionX, 00102 float directionY, 00103 float directionZ 00104 ) = 0; 00105 00106 virtual void DisableLight( 00107 int lightIndex 00108 ) = 0; 00109 00110 virtual void SetAmbientLight( 00111 unsigned int color 00112 ) = 0; 00113 00114 virtual void EnableLighting( 00115 bool enabled 00116 ) = 0; 00117 00118 virtual void EnableZRead( 00119 bool enabled 00120 ) = 0; 00121 00122 virtual void EnableZWrite( 00123 bool enabled 00124 ) = 0; 00125 00126 00127 private: 00128 }; 00129 00130 00131 #endif /* __Platform_3D_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
