Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 264 vs 268 for /trunk/Source Code/Hardware/Video/Buffers/VertexBuffer/Headers/VertexBuffer.h

Diff revisions: vs.
  @@ -37,7 +37,26 @@
37 37 /// This class does NOT represent an API-level VB, such as: GL_ARRAY_BUFFER / D3DVERTEXBUFFER
38 38 /// It is only a "buffer" for "vertex info" abstract of implementation. (e.g.: OGL uses a vertex array object for this)
39 39 class VertexBuffer : public GUIDWrapper {
40 + protected:
41 + struct IndirectDrawCommand {
42 + IndirectDrawCommand() : count(0), instanceCount(0), firstIndex(0), baseVertex(0), baseInstance(0) {}
43 + U32 count;
44 + U32 instanceCount;
45 + U32 firstIndex;
46 + U32 baseVertex;
47 + U32 baseInstance;
48 + };
49 +
40 50 public:
51 + struct DeferredDrawCommand {
52 + DeferredDrawCommand() : _signedData(0), _unsignedData(0), _floatData(0.0f) {}
53 +
54 + IndirectDrawCommand _cmd;
55 + I32 _signedData;
56 + U32 _unsignedData;
57 + F32 _floatData;
58 + };
59 +
41 60 VertexBuffer(const PrimitiveType& type) : GUIDWrapper(),
42 61 _type(type),
43 62 _computeTriangles(true),
  @@ -70,6 +89,7 @@
70 89
71 90 virtual void Draw(bool skipBind = false, const U8 LODindex = 0) = 0;
72 91 virtual void DrawRange(bool skipBind = false) = 0;
92 + virtual void DrawCommands(const vectorImpl<DeferredDrawCommand>& commands, bool skipBind = false) = 0;
73 93
74 94 virtual void setShaderProgram(ShaderProgram* const shaderProgram) = 0;
75 95 inline ShaderProgram* const currentShader() {return _currentShader;}