From 986dccbeafa3fe0ddd9a05e0916a414e4abc51d6 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 16 Nov 2011 15:08:17 -0600 Subject: SH-2690 Fix for spammy triangle death on GeForce 7800 Go when selecting flexi attachments. --- indra/llrender/llrender.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/llrender') diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 97aeae548a..010d3df9b7 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1887,6 +1887,17 @@ void LLRender::flush() void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z) { //the range of mVerticesp, mColorsp and mTexcoordsp is [0, 4095] + if (mCount > 2048) + { + switch (mMode) + { + case LLRender::POINTS: flush(); break; + case LLRender::TRIANGLES: if (mCount%3==0) flush(); break; + case LLRender::QUADS: if(mCount%4 == 0) flush(); break; + case LLRender::LINES: if (mCount%2 == 0) flush(); break; + } + } + if (mCount > 4094) { // llwarns << "GL immediate mode overflow. Some geometry not drawn." << llendl; -- cgit v1.2.3