summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2017-03-21 07:10:11 -0700
committerGlenn Glazer <coyot@lindenlab.com>2017-03-21 07:10:11 -0700
commit0f245dea042f7443e9208ef7106da716a44539c5 (patch)
tree75cb94a32d6c8a055e2c0bbef7da1f4d5882837f /indra/llrender
parent4992654682255a6cace1c5ee86b4b8bf28fde15d (diff)
parent71ffed27c77e787cafe04ddf19df27495255cae5 (diff)
pull from V64 gate
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llrender.cpp49
1 files changed, 5 insertions, 44 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 77c5921c9c..76f28bb43f 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1829,48 +1829,6 @@ void LLRender::flush()
{
if (mCount > 0)
{
-#if 0
- if (!glIsEnabled(GL_VERTEX_ARRAY))
- {
- LL_ERRS() << "foo 1" << LL_ENDL;
- }
-
- if (!glIsEnabled(GL_COLOR_ARRAY))
- {
- LL_ERRS() << "foo 2" << LL_ENDL;
- }
-
- if (!glIsEnabled(GL_TEXTURE_COORD_ARRAY))
- {
- LL_ERRS() << "foo 3" << LL_ENDL;
- }
-
- if (glIsEnabled(GL_NORMAL_ARRAY))
- {
- LL_ERRS() << "foo 7" << LL_ENDL;
- }
-
- GLvoid* pointer;
-
- glGetPointerv(GL_VERTEX_ARRAY_POINTER, &pointer);
- if (pointer != &(mBuffer[0].v))
- {
- LL_ERRS() << "foo 4" << LL_ENDL;
- }
-
- glGetPointerv(GL_COLOR_ARRAY_POINTER, &pointer);
- if (pointer != &(mBuffer[0].c))
- {
- LL_ERRS() << "foo 5" << LL_ENDL;
- }
-
- glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER, &pointer);
- if (pointer != &(mBuffer[0].uv))
- {
- LL_ERRS() << "foo 6" << LL_ENDL;
- }
-#endif
-
if (!mUIOffset.empty())
{
sUICalls++;
@@ -2104,8 +2062,11 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 v
}
}
- mVerticesp[mCount] = mVerticesp[mCount-1];
- mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
+ if (mCount > 0)
+ {
+ mVerticesp[mCount] = mVerticesp[mCount - 1];
+ mTexcoordsp[mCount] = mTexcoordsp[mCount - 1];
+ }
}
void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLColor4U* colors, S32 vert_count)