summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r--indra/llrender/llvertexbuffer.cpp24
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