diff options
| author | Dave Parks <davep@lindenlab.com> | 2012-01-18 12:40:11 -0600 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2012-01-18 12:40:11 -0600 |
| commit | 0c1fc78bd94014ee19da690f16cef64c13e50771 (patch) | |
| tree | 0db5e6d30fd283d33a24200165c6de825827f9ca /indra/llrender/llvertexbuffer.h | |
| parent | 5546041301a67da6e471a433b29374bc75a4f0d0 (diff) | |
SH-2794 Map buffer now performs as well as buffersubdata
Diffstat (limited to 'indra/llrender/llvertexbuffer.h')
| -rw-r--r-- | indra/llrender/llvertexbuffer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index 5b93a0389f..dde2b7e152 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -254,6 +254,7 @@ public: volatile U8* getMappedIndices() const { return mMappedIndexData; } S32 getOffset(S32 type) const { return mOffsets[type]; } S32 getUsage() const { return mUsage; } + BOOL isWriteable() const { return (sDisableVBOMapping || mMappable || mUsage == GL_STREAM_DRAW_ARB) ? TRUE : FALSE; } void draw(U32 mode, U32 count, U32 indices_offset) const; void drawArrays(U32 mode, U32 offset, U32 count) const; @@ -284,6 +285,7 @@ protected: BOOL mIndexLocked; // if TRUE, index buffer is being or has been written to in client memory BOOL mFinal; // if TRUE, buffer can not be mapped again BOOL mEmpty; // if TRUE, client buffer is empty (or NULL). Old values have been discarded. + mutable BOOL mMappable; // if TRUE, use memory mapping to upload data (otherwise doublebuffer and use glBufferSubData) S32 mOffsets[TYPE_MAX]; std::vector<MappedRegion> mMappedVertexRegions; |
