diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-10-31 13:08:40 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-10-31 13:08:40 +0800 |
commit | 76d31ddf9a4f8bdd94dd86053dd1296912f9c9ac (patch) | |
tree | ca0842e1c6a8ce85cfb0e0e4094651731f19d8c7 /indra/llrender/llvertexbuffer.cpp | |
parent | c7714fb31915b70af4ca24cde61751484dd967e9 (diff) | |
parent | 4b5fa5349e06ce3471875e0c401f9119831ed887 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.09-ExtraFPS' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 6f4828397a..12ae36f4bb 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -604,7 +604,7 @@ public: static LLVBOPool* sVBOPool = nullptr; -void LLVertexBufferData::draw() +void LLVertexBufferData::drawWithMatrix() { if (!mVB) { @@ -642,6 +642,28 @@ void LLVertexBufferData::draw() gGL.popMatrix(); } +void LLVertexBufferData::draw() +{ + if (!mVB) + { + llassert(false); + // Not supposed to happen, check buffer generation + return; + } + + if (mTexName) + { + gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mTexName); + } + else + { + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + } + + mVB->setBuffer(); + mVB->drawArrays(mMode, 0, mCount); +} + //============================================================================ //static |