diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-12-26 20:58:02 +0100 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-12-26 20:58:02 +0100 |
commit | 5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4 (patch) | |
tree | b742447d1b3262c1541e9c0fe037ad35be467dff /src/graphics/core/device.h | |
parent | f9f15a2f3f80f968a64e76141b1e6fa5e28c7232 (diff) | |
download | colobot-5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4.tar.gz colobot-5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4.tar.bz2 colobot-5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4.zip |
Engine optimization - rewritten model management
- new class CModelManager
- rewritten engine object structure in CEngine
- created shared model data instead of separate objects per each
model instance
- minor refactoring
Diffstat (limited to 'src/graphics/core/device.h')
-rw-r--r-- | src/graphics/core/device.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index a0e44e4..618d21a 100644 --- a/src/graphics/core/device.h +++ b/src/graphics/core/device.h @@ -317,19 +317,28 @@ public: 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; + virtual unsigned int CreateStaticBuffer(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 multitexturing + virtual unsigned int CreateStaticBuffer(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; + virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) = 0; + + //! Updates the static buffer composed of given primitives with single texture vertices + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) = 0; + + //! Updates the static buffer composed of given primitives with multitexturing + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) = 0; + + //! Updates the static buffer composed of given primitives with solid color + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) = 0; //! Draws a static buffer - virtual void DrawStaticObject(unsigned int objectId) = 0; + virtual void DrawStaticBuffer(unsigned int bufferId) = 0; //! Deletes a static buffer - virtual void DestroyStaticObject(unsigned int objectId) = 0; + virtual void DestroyStaticBuffer(unsigned int bufferId) = 0; //! Tests whether a sphere is (partially) within the frustum volume //! Returns a mask of frustum planes for which the test is positive |