diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-12-14 21:30:35 +0100 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-12-14 21:30:35 +0100 |
commit | 4811defca2eeea69e40346be6b1647f276db8c76 (patch) | |
tree | 52204202603817d09d93ed8a863b69f93ada74b2 /src/graphics/core/device.h | |
parent | 39ac36efda1f7c7b446886cf2508518f06e132ba (diff) | |
download | colobot-4811defca2eeea69e40346be6b1647f276db8c76.tar.gz colobot-4811defca2eeea69e40346be6b1647f276db8c76.tar.bz2 colobot-4811defca2eeea69e40346be6b1647f276db8c76.zip |
Static objects using OpenGL VBOs and display lists
Diffstat (limited to 'src/graphics/core/device.h')
-rw-r--r-- | src/graphics/core/device.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index 8e7d446..a0e44e4 100644 --- a/src/graphics/core/device.h +++ b/src/graphics/core/device.h @@ -313,9 +313,24 @@ public: //! Renders primitive composed of vertices with multitexturing (2 textures) virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) = 0; - //! Renders primitive composed of vertices with color information + //! Renders primitive composed of vertices with solid color virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices , int vertexCount) = 0; + //! Creates a static buffer composed of given primitives with single texture vertices + virtual unsigned int CreateStaticObject(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) = 0; + + //! Creates a static buffer composed of given primitives with multitexturing (2 textures) + virtual unsigned int CreateStaticObject(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) = 0; + + //! Creates a static buffer composed of given primitives with solid color + virtual unsigned int CreateStaticObject(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) = 0; + + //! Draws a static buffer + virtual void DrawStaticObject(unsigned int objectId) = 0; + + //! Deletes a static buffer + virtual void DestroyStaticObject(unsigned int objectId) = 0; + //! Tests whether a sphere is (partially) within the frustum volume //! Returns a mask of frustum planes for which the test is positive virtual int ComputeSphereVisibility(const Math::Vector ¢er, float radius) = 0; |