aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-05-01 03:32:22 -0700
committerMcCabe Maxsted2010-09-25 08:15:11 -0700
commit88c0a4d7be265784aeb6010e42df8632dbf8f88b (patch)
treed7b65d6f12ae42c84173cd889707012e960d13d6 /linden/indra/llrender/llgl.cpp
parentFixed Windows compile bug in 721c25d8. Changed std::max to llmax since Window... (diff)
downloadmeta-impy-88c0a4d7be265784aeb6010e42df8632dbf8f88b.zip
meta-impy-88c0a4d7be265784aeb6010e42df8632dbf8f88b.tar.gz
meta-impy-88c0a4d7be265784aeb6010e42df8632dbf8f88b.tar.bz2
meta-impy-88c0a4d7be265784aeb6010e42df8632dbf8f88b.tar.xz
Applied patch by Aleric Inglewood for VWR-12984: Water flickers and disappears in patches, part 1
Diffstat (limited to 'linden/indra/llrender/llgl.cpp')
-rw-r--r--linden/indra/llrender/llgl.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/linden/indra/llrender/llgl.cpp b/linden/indra/llrender/llgl.cpp
index 61194c4..c08ad0d 100644
--- a/linden/indra/llrender/llgl.cpp
+++ b/linden/indra/llrender/llgl.cpp
@@ -552,41 +552,46 @@ extern LLCPUInfo gSysCPU;
552void LLGLManager::initExtensions() 552void LLGLManager::initExtensions()
553{ 553{
554#if LL_MESA_HEADLESS 554#if LL_MESA_HEADLESS
555# if GL_ARB_multitexture 555# ifdef GL_ARB_multitexture
556 mHasMultitexture = TRUE; 556 mHasMultitexture = TRUE;
557# else 557# else
558 mHasMultitexture = FALSE; 558 mHasMultitexture = FALSE;
559# endif 559# endif
560# if GL_ARB_texture_env_combine 560# ifdef GL_ARB_texture_env_combine
561 mHasARBEnvCombine = TRUE; 561 mHasARBEnvCombine = TRUE;
562# else 562# else
563 mHasARBEnvCombine = FALSE; 563 mHasARBEnvCombine = FALSE;
564# endif 564# endif
565# if GL_ARB_texture_compression 565# ifdef GL_ARB_texture_compression
566 mHasCompressedTextures = TRUE; 566 mHasCompressedTextures = TRUE;
567# else 567# else
568 mHasCompressedTextures = FALSE; 568 mHasCompressedTextures = FALSE;
569# endif 569# endif
570# if GL_ARB_vertex_buffer_object 570# ifdef GL_ARB_vertex_buffer_object
571 mHasVertexBufferObject = TRUE; 571 mHasVertexBufferObject = TRUE;
572# else 572# else
573 mHasVertexBufferObject = FALSE; 573 mHasVertexBufferObject = FALSE;
574# endif 574# endif
575# if GL_EXT_framebuffer_object 575# ifdef GL_EXT_framebuffer_object
576 mHasFramebufferObject = TRUE; 576 mHasFramebufferObject = TRUE;
577# else 577# else
578 mHasFramebufferObject = FALSE; 578 mHasFramebufferObject = FALSE;
579# endif 579# endif
580# if GL_EXT_framebuffer_multisample 580# ifdef GL_EXT_framebuffer_multisample
581 mHasFramebufferMultisample = TRUE; 581 mHasFramebufferMultisample = TRUE;
582# else 582# else
583 mHasFramebufferMultisample = FALSE; 583 mHasFramebufferMultisample = FALSE;
584# endif 584# endif
585# if GL_ARB_draw_buffers 585# ifdef GL_ARB_draw_buffers
586 mHasDrawBuffers = TRUE; 586 mHasDrawBuffers = TRUE;
587#else 587#else
588 mHasDrawBuffers = FALSE; 588 mHasDrawBuffers = FALSE;
589# endif 589# endif
590# if defined(GL_NV_depth_clamp) || defined(GL_ARB_depth_clamp)
591 mHasDepthClamp = TRUE;
592#else
593 mHasDepthClamp = FALSE;
594#endif
590 mHasMipMapGeneration = FALSE; 595 mHasMipMapGeneration = FALSE;
591 mHasSeparateSpecularColor = FALSE; 596 mHasSeparateSpecularColor = FALSE;
592 mHasAnisotropic = FALSE; 597 mHasAnisotropic = FALSE;
@@ -612,6 +617,7 @@ void LLGLManager::initExtensions()
612 && ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts); 617 && ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts);
613 mHasFramebufferMultisample = mHasFramebufferObject && ExtensionExists("GL_EXT_framebuffer_multisample", gGLHExts.mSysExts); 618 mHasFramebufferMultisample = mHasFramebufferObject && ExtensionExists("GL_EXT_framebuffer_multisample", gGLHExts.mSysExts);
614 mHasDrawBuffers = ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts); 619 mHasDrawBuffers = ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts);
620 mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts);
615#if !LL_DARWIN 621#if !LL_DARWIN
616 mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts); 622 mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts);
617#endif 623#endif
@@ -634,6 +640,7 @@ void LLGLManager::initExtensions()
634 mHasFramebufferObject = FALSE; 640 mHasFramebufferObject = FALSE;
635 mHasFramebufferMultisample = FALSE; 641 mHasFramebufferMultisample = FALSE;
636 mHasDrawBuffers = FALSE; 642 mHasDrawBuffers = FALSE;
643 mHasDepthClamp = FALSE;
637 mHasMipMapGeneration = FALSE; 644 mHasMipMapGeneration = FALSE;
638 mHasSeparateSpecularColor = FALSE; 645 mHasSeparateSpecularColor = FALSE;
639 mHasAnisotropic = FALSE; 646 mHasAnisotropic = FALSE;
@@ -685,10 +692,11 @@ void LLGLManager::initExtensions()
685 if (strchr(blacklist,'q')) mHasFramebufferObject = FALSE;//S 692 if (strchr(blacklist,'q')) mHasFramebufferObject = FALSE;//S
686 if (strchr(blacklist,'r')) mHasDrawBuffers = FALSE;//S 693 if (strchr(blacklist,'r')) mHasDrawBuffers = FALSE;//S
687 if (strchr(blacklist,'s')) mHasFramebufferMultisample = FALSE; 694 if (strchr(blacklist,'s')) mHasFramebufferMultisample = FALSE;
695 if (strchr(blacklist,'t')) mHasDepthClamp = FALSE;
688 696
689 } 697 }
690#endif // LL_LINUX || LL_SOLARIS 698#endif // LL_LINUX || LL_SOLARIS
691 699
692 if (!mHasMultitexture) 700 if (!mHasMultitexture)
693 { 701 {
694 LL_INFOS("RenderInit") << "Couldn't initialize multitexturing" << LL_ENDL; 702 LL_INFOS("RenderInit") << "Couldn't initialize multitexturing" << LL_ENDL;
@@ -1773,7 +1781,7 @@ LLGLDepthTest::~LLGLDepthTest()
1773 } 1781 }
1774} 1782}
1775 1783
1776LLGLClampToFarClip::LLGLClampToFarClip(glh::matrix4f P) 1784LLGLSquashToFarClip::LLGLSquashToFarClip(glh::matrix4f P)
1777{ 1785{
1778 for (U32 i = 0; i < 4; i++) 1786 for (U32 i = 0; i < 4; i++)
1779 { 1787 {
@@ -1786,7 +1794,7 @@ LLGLClampToFarClip::LLGLClampToFarClip(glh::matrix4f P)
1786 glMatrixMode(GL_MODELVIEW); 1794 glMatrixMode(GL_MODELVIEW);
1787} 1795}
1788 1796
1789LLGLClampToFarClip::~LLGLClampToFarClip() 1797LLGLSquashToFarClip::~LLGLSquashToFarClip()
1790{ 1798{
1791 glMatrixMode(GL_PROJECTION); 1799 glMatrixMode(GL_PROJECTION);
1792 glPopMatrix(); 1800 glPopMatrix();