diff options
author | Oz Linden <oz@lindenlab.com> | 2017-03-16 14:32:12 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2017-03-16 14:32:12 -0400 |
commit | 2d921e00634c593c15776727e513a2d0f9795f21 (patch) | |
tree | 6ad74651d30ef7ce27f4914a398bb4b9d5cb04b6 /indra/llrender/llrender.cpp | |
parent | d7f5122ee9e12b5aec14b15517c3a4c0021544ce (diff) | |
parent | bdecc9cce982ab35ce1d74444515f536e66d4356 (diff) |
merge CEF update and fixes from callum
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r-- | indra/llrender/llrender.cpp | 49 |
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) |