diff options
Diffstat (limited to 'indra/llrender/llvertexbuffer.h')
-rw-r--r-- | indra/llrender/llvertexbuffer.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index 2a4affdc60..9fe468f89e 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -120,6 +120,9 @@ public: // indexed by the following enum static U32 calcOffsets(const U32& typemask, U32* offsets, U32 num_vertices); + // flush any pending mapped buffers + static void flushBuffers(); + //WARNING -- when updating these enums you MUST // 1 - update LLVertexBuffer::sTypeSize // 2 - update LLVertexBuffer::vb_type_name @@ -190,6 +193,8 @@ public: // map for data access (see also getFooStrider below) U8* mapVertexBuffer(AttributeType type, U32 index, S32 count = -1); U8* mapIndexBuffer(U32 index, S32 count = -1); + + // synonym for flushBuffers void unmapBuffer(); // set for rendering @@ -312,6 +317,13 @@ private: bool allocateBuffer(S32 nverts, S32 nindices, bool create) { return allocateBuffer(nverts, nindices); } + // actually unmap buffer + void _unmapBuffer(); + + // add to set of mapped buffers + void _mapBuffer(); + bool mMapped = false; + public: static U64 getBytesAllocated(); |