diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-08-12 17:29:50 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-08-12 17:29:50 +0000 |
commit | 80be4c1d2d73982ea2df6dd7ef3fc3465416c882 (patch) | |
tree | 9c5958572368be494b6302db8b03967a2c67b7ad /indra/llrender | |
parent | a09f7d41efdb945755efaeb07f7418c1f6e2a78b (diff) |
QAR-767 Combined maint-render-7 and maint-viewer-9 merge
merge release@93398 viewer-merge-1@94007 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llgl.cpp | 16 | ||||
-rw-r--r-- | indra/llrender/llgl.h | 1 | ||||
-rw-r--r-- | indra/llrender/llrender.cpp | 6 | ||||
-rw-r--r-- | indra/llrender/llrender.h | 1 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 3 |
5 files changed, 27 insertions, 0 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 8c63122cb8..bd7cdf3d70 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -284,6 +284,7 @@ LLGLManager::LLGLManager() : mIsGF3(FALSE), mIsGFFX(FALSE), mATIOffsetVerticalLines(FALSE), + mATIOldDriver(FALSE), mHasRequirements(TRUE), @@ -381,6 +382,17 @@ bool LLGLManager::initGL() mATIOffsetVerticalLines = TRUE; } #endif // LL_WINDOWS + +#if (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS + // release 7277 is a point at which we verify that ATI OpenGL + // drivers get pretty stable with SL, ~Catalyst 8.2, + // for both Win32 and Linux. + if (mDriverVersionRelease < 7277 && + mDriverVersionRelease != 0) // 0 == Undetectable driver version - these get to pretend to be new ATI drivers, though that decision may be revisited. + { + mATIOldDriver = TRUE; + } +#endif // (LL_WINDOWS || LL_LINUX) && !LL_MESA_HEADLESS } else if (mGLVendor.find("NVIDIA ") != std::string::npos) { @@ -988,6 +1000,10 @@ void LLGLState::initClass() { sStateMap[GL_DITHER] = GL_TRUE; sStateMap[GL_TEXTURE_2D] = GL_TRUE; + + //make sure multisample defaults to disabled + sStateMap[GL_MULTISAMPLE_ARB] = GL_FALSE; + glDisable(GL_MULTISAMPLE_ARB); } //static diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index e9b4c7929e..f387b7b179 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -100,6 +100,7 @@ public: BOOL mIsGF3; BOOL mIsGFFX; BOOL mATIOffsetVerticalLines; + BOOL mATIOldDriver; // Whether this version of GL is good enough for SL to use BOOL mHasRequirements; diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index fc911de46b..4a87424bb8 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -451,6 +451,12 @@ void LLRender::translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z) glTranslatef(x,y,z); } +void LLRender::scalef(const GLfloat& x, const GLfloat& y, const GLfloat& z) +{ + flush(); + glScalef(x,y,z); +} + void LLRender::pushMatrix() { flush(); diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index a0a492bc73..2d512ab543 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -178,6 +178,7 @@ public: ~LLRender(); void translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z); + void scalef(const GLfloat& x, const GLfloat& y, const GLfloat& z); void pushMatrix(); void popMatrix(); diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 2e827ed442..3f2eb61641 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -190,6 +190,7 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi if (mode > NUM_MODES) { llerrs << "Invalid draw mode: " << mode << llendl; + return; } glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT, @@ -217,6 +218,7 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const if (mode > NUM_MODES) { llerrs << "Invalid draw mode: " << mode << llendl; + return; } glDrawElements(sGLMode[mode], count, GL_UNSIGNED_SHORT, @@ -240,6 +242,7 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const if (mode > NUM_MODES) { llerrs << "Invalid draw mode: " << mode << llendl; + return; } glDrawArrays(sGLMode[mode], first, count); |