1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#pragma once
#include "Runtime/Shaders/BufferedVBO.h"
class GfxNullVBO : public BufferedVBO
{
public:
inline GfxNullVBO(void) {}
virtual ~GfxNullVBO(void) {}
virtual void UpdateVertexData( const VertexBufferData& buffer );
virtual void UpdateIndexData (const IndexBufferData& buffer);
virtual void DrawVBO (const ChannelAssigns& channels, UInt32 firstIndexByte, UInt32 indexCount, GfxPrimitiveType topology, UInt32 firstVertex, UInt32 vertexCount );
#if GFX_ENABLE_DRAW_CALL_BATCHING
virtual void DrawCustomIndexed( const ChannelAssigns& channels, void* indices, UInt32 indexCount,
GfxPrimitiveType topology, UInt32 vertexRangeBegin, UInt32 vertexRangeEnd, UInt32 drawVertexCount );
#endif
virtual bool IsVertexBufferLost() const { return false; }
virtual int GetRuntimeMemorySize() const { return 0; }
};
class GfxDynamicNullVBO :
public DynamicVBO
{
private:
UInt8 *vertexBuffer;
UInt32 vertexBufferSize;
UInt8 *indexBuffer;
UInt32 indexBufferSize;
public:
inline GfxDynamicNullVBO(void) :
vertexBuffer(NULL),
vertexBufferSize(0),
indexBuffer(NULL),
indexBufferSize(0)
{
}
virtual ~GfxDynamicNullVBO(void)
{
delete[] this->vertexBuffer;
delete[] this->indexBuffer;
}
virtual bool GetChunk( UInt32 shaderChannelMask, UInt32 maxVertices, UInt32 maxIndices, RenderMode renderMode, void** outVB, void** outIB );
virtual void ReleaseChunk( UInt32 actualVertices, UInt32 actualIndices );
virtual void DrawChunk (const ChannelAssigns& channels);
};
|