summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2013-09-18 15:58:54 -0700
committerdolphin <dolphin@lindenlab.com>2013-09-18 15:58:54 -0700
commitd9ad2d3a13b4bb15ab5e56fd04970abc03e100e7 (patch)
tree39178dd2b0ab11d754b57b492b4835b926a538c6 /indra/llrender/llrender.cpp
parentc8144f7405178621f779b814fd4cb3e632786e0a (diff)
parentad777b46d0fe5d790e43efb1771e9f64f3ad3dfb (diff)
Merge with 3.6.6-release
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rwxr-xr-xindra/llrender/llrender.cpp43
1 files changed, 22 insertions, 21 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index c60eb8d9d9..f2f1b62be0 100755
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1849,35 +1849,36 @@ void LLRender::flush()
sUIVerts += mCount;
}
- if (gDebugGL)
+ //store mCount in a local variable to avoid re-entrance (drawArrays may call flush)
+ U32 count = mCount;
+
+ if (mMode == LLRender::QUADS && !sGLCoreProfile)
{
- if (mMode == LLRender::QUADS && !sGLCoreProfile)
+ if (mCount%4 != 0)
{
- if (mCount%4 != 0)
- {
- llerrs << "Incomplete quad rendered." << llendl;
- }
+ count -= (mCount % 4);
+ llwarns << "Incomplete quad requested." << llendl;
}
-
- if (mMode == LLRender::TRIANGLES)
+ }
+
+ if (mMode == LLRender::TRIANGLES)
+ {
+ if (mCount%3 != 0)
{
- if (mCount%3 != 0)
- {
- llerrs << "Incomplete triangle rendered." << llendl;
- }
+ count -= (mCount % 3);
+ llwarns << "Incomplete triangle requested." << llendl;
}
-
- if (mMode == LLRender::LINES)
+ }
+
+ if (mMode == LLRender::LINES)
+ {
+ if (mCount%2 != 0)
{
- if (mCount%2 != 0)
- {
- llerrs << "Incomplete line rendered." << llendl;
- }
+ count -= (mCount % 2);
+ llwarns << "Incomplete line requested." << llendl;
}
}
-
- //store mCount in a local variable to avoid re-entrance (drawArrays may call flush)
- U32 count = mCount;
+
mCount = 0;
if (mBuffer->useVBOs() && !mBuffer->isLocked())