diff options
author | Jacek Antonelli | 2011-05-08 15:13:37 -0500 |
---|---|---|
committer | Jacek Antonelli | 2011-05-08 15:50:49 -0500 |
commit | 7278f0254a3944bd2bcbf1e855fb0d90c3086a27 (patch) | |
tree | 5d7ecb81ebf1a07482f0a7d3d13acd7f18360c0b /linden/indra/llrender | |
parent | Imprudence 1.3.1 released. (diff) | |
parent | Changed version to Experimental 2011.04.19 (diff) | |
download | meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.zip meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.tar.gz meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.tar.bz2 meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.tar.xz |
Merged Experimental branch (exp) back into main line (next).
Git thought many files (almost 100) had merge conflicts. But, after
resolving the conflicts (which were mostly trivial), almost all the
files turned out to be the same as in the exp branch. So, the
conflicts are not listed here. Check the diff between commit 244ffe8
and this commit to see what really changed.
Diffstat (limited to 'linden/indra/llrender')
-rw-r--r-- | linden/indra/llrender/llfont.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llrender/llfontgl.cpp | 12 | ||||
-rw-r--r-- | linden/indra/llrender/llfontgl.h | 3 | ||||
-rw-r--r-- | linden/indra/llrender/llfontregistry.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llrender/llgl.cpp | 32 | ||||
-rw-r--r-- | linden/indra/llrender/llgl.h | 7 | ||||
-rw-r--r-- | linden/indra/llrender/llglheaders.h | 10 | ||||
-rw-r--r-- | linden/indra/llrender/llimagegl.cpp | 53 |
8 files changed, 78 insertions, 43 deletions
diff --git a/linden/indra/llrender/llfont.cpp b/linden/indra/llrender/llfont.cpp index dd33128..5ee3929 100644 --- a/linden/indra/llrender/llfont.cpp +++ b/linden/indra/llrender/llfont.cpp | |||
@@ -311,7 +311,7 @@ BOOL LLFont::addChar(const llwchar wch) const | |||
311 | // Try looking it up in the backup Unicode font | 311 | // Try looking it up in the backup Unicode font |
312 | if (mFallbackFontp) | 312 | if (mFallbackFontp) |
313 | { | 313 | { |
314 | //llinfos << "Trying to add glyph from fallback font!" << llendl | 314 | //llinfos << "Trying to add glyph from fallback font!" << llendl; |
315 | LLFontList::iterator iter; | 315 | LLFontList::iterator iter; |
316 | for(iter = mFallbackFontp->begin(); iter != mFallbackFontp->end(); iter++) | 316 | for(iter = mFallbackFontp->begin(); iter != mFallbackFontp->end(); iter++) |
317 | { | 317 | { |
diff --git a/linden/indra/llrender/llfontgl.cpp b/linden/indra/llrender/llfontgl.cpp index 5d3d6a7..306c6b9 100644 --- a/linden/indra/llrender/llfontgl.cpp +++ b/linden/indra/llrender/llfontgl.cpp | |||
@@ -42,6 +42,7 @@ | |||
42 | #include "llrender.h" | 42 | #include "llrender.h" |
43 | #include "v4color.h" | 43 | #include "v4color.h" |
44 | #include "llstl.h" | 44 | #include "llstl.h" |
45 | #include "llfasttimer.h" | ||
45 | 46 | ||
46 | const S32 BOLD_OFFSET = 1; | 47 | const S32 BOLD_OFFSET = 1; |
47 | 48 | ||
@@ -241,7 +242,8 @@ BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, | |||
241 | // This is primarily for error detection purposes. | 242 | // This is primarily for error detection purposes. |
242 | succ &= (NULL != getFontSansSerifSmall()); | 243 | succ &= (NULL != getFontSansSerifSmall()); |
243 | succ &= (NULL != getFontSansSerif()); | 244 | succ &= (NULL != getFontSansSerif()); |
244 | succ &= (NULL != getFontSansSerifBig()); | 245 | succ &= (NULL != getFontSansSerifBigger()); |
246 | succ &= (NULL != getFontSansSerifLarge()); | ||
245 | succ &= (NULL != getFontSansSerifHuge()); | 247 | succ &= (NULL != getFontSansSerifHuge()); |
246 | succ &= (NULL != getFontSansSerifBold()); | 248 | succ &= (NULL != getFontSansSerifBold()); |
247 | succ &= (NULL != getFontMonospace()); | 249 | succ &= (NULL != getFontMonospace()); |
@@ -312,7 +314,13 @@ LLFontGL* LLFontGL::getFontSansSerif() | |||
312 | } | 314 | } |
313 | 315 | ||
314 | //static | 316 | //static |
315 | LLFontGL* LLFontGL::getFontSansSerifBig() | 317 | LLFontGL* LLFontGL::getFontSansSerifBigger() |
318 | { | ||
319 | return getFont(LLFontDescriptor("SansSerif","Bigger",0)); | ||
320 | } | ||
321 | |||
322 | //static | ||
323 | LLFontGL* LLFontGL::getFontSansSerifLarge() | ||
316 | { | 324 | { |
317 | return getFont(LLFontDescriptor("SansSerif","Large",0)); | 325 | return getFont(LLFontDescriptor("SansSerif","Large",0)); |
318 | } | 326 | } |
diff --git a/linden/indra/llrender/llfontgl.h b/linden/indra/llrender/llfontgl.h index 6cb1727..e3a953b 100644 --- a/linden/indra/llrender/llfontgl.h +++ b/linden/indra/llrender/llfontgl.h | |||
@@ -233,7 +233,8 @@ public: | |||
233 | static LLFontGL* getFontMonospace(); | 233 | static LLFontGL* getFontMonospace(); |
234 | static LLFontGL* getFontSansSerifSmall(); | 234 | static LLFontGL* getFontSansSerifSmall(); |
235 | static LLFontGL* getFontSansSerif(); | 235 | static LLFontGL* getFontSansSerif(); |
236 | static LLFontGL* getFontSansSerifBig(); | 236 | static LLFontGL* getFontSansSerifBigger(); |
237 | static LLFontGL* getFontSansSerifLarge(); | ||
237 | static LLFontGL* getFontSansSerifHuge(); | 238 | static LLFontGL* getFontSansSerifHuge(); |
238 | static LLFontGL* getFontSansSerifBold(); | 239 | static LLFontGL* getFontSansSerifBold(); |
239 | static LLFontGL* getFontExtChar(); | 240 | static LLFontGL* getFontExtChar(); |
diff --git a/linden/indra/llrender/llfontregistry.cpp b/linden/indra/llrender/llfontregistry.cpp index 28e38ce..c5923cd 100644 --- a/linden/indra/llrender/llfontregistry.cpp +++ b/linden/indra/llrender/llfontregistry.cpp | |||
@@ -107,7 +107,7 @@ bool removeSubString(std::string& str, const std::string& substr) | |||
107 | size_t pos = str.find(substr); | 107 | size_t pos = str.find(substr); |
108 | if (pos != string::npos) | 108 | if (pos != string::npos) |
109 | { | 109 | { |
110 | str.replace(pos,substr.length(),(const char *)NULL, 0); | 110 | str.erase(pos,substr.length()); |
111 | return true; | 111 | return true; |
112 | } | 112 | } |
113 | return false; | 113 | return false; |
diff --git a/linden/indra/llrender/llgl.cpp b/linden/indra/llrender/llgl.cpp index 61194c4..4a4ff1b 100644 --- a/linden/indra/llrender/llgl.cpp +++ b/linden/indra/llrender/llgl.cpp | |||
@@ -547,46 +547,49 @@ void LLGLManager::shutdownGL() | |||
547 | // these are used to turn software blending on. They appear in the Debug/Avatar menu | 547 | // these are used to turn software blending on. They appear in the Debug/Avatar menu |
548 | // presence of vertex skinning/blending or vertex programs will set these to FALSE by default. | 548 | // presence of vertex skinning/blending or vertex programs will set these to FALSE by default. |
549 | 549 | ||
550 | extern LLCPUInfo gSysCPU; | ||
551 | |||
552 | void LLGLManager::initExtensions() | 550 | void LLGLManager::initExtensions() |
553 | { | 551 | { |
554 | #if LL_MESA_HEADLESS | 552 | #if LL_MESA_HEADLESS |
555 | # if GL_ARB_multitexture | 553 | # ifdef GL_ARB_multitexture |
556 | mHasMultitexture = TRUE; | 554 | mHasMultitexture = TRUE; |
557 | # else | 555 | # else |
558 | mHasMultitexture = FALSE; | 556 | mHasMultitexture = FALSE; |
559 | # endif | 557 | # endif |
560 | # if GL_ARB_texture_env_combine | 558 | # ifdef GL_ARB_texture_env_combine |
561 | mHasARBEnvCombine = TRUE; | 559 | mHasARBEnvCombine = TRUE; |
562 | # else | 560 | # else |
563 | mHasARBEnvCombine = FALSE; | 561 | mHasARBEnvCombine = FALSE; |
564 | # endif | 562 | # endif |
565 | # if GL_ARB_texture_compression | 563 | # ifdef GL_ARB_texture_compression |
566 | mHasCompressedTextures = TRUE; | 564 | mHasCompressedTextures = TRUE; |
567 | # else | 565 | # else |
568 | mHasCompressedTextures = FALSE; | 566 | mHasCompressedTextures = FALSE; |
569 | # endif | 567 | # endif |
570 | # if GL_ARB_vertex_buffer_object | 568 | # ifdef GL_ARB_vertex_buffer_object |
571 | mHasVertexBufferObject = TRUE; | 569 | mHasVertexBufferObject = TRUE; |
572 | # else | 570 | # else |
573 | mHasVertexBufferObject = FALSE; | 571 | mHasVertexBufferObject = FALSE; |
574 | # endif | 572 | # endif |
575 | # if GL_EXT_framebuffer_object | 573 | # ifdef GL_EXT_framebuffer_object |
576 | mHasFramebufferObject = TRUE; | 574 | mHasFramebufferObject = TRUE; |
577 | # else | 575 | # else |
578 | mHasFramebufferObject = FALSE; | 576 | mHasFramebufferObject = FALSE; |
579 | # endif | 577 | # endif |
580 | # if GL_EXT_framebuffer_multisample | 578 | # ifdef GL_EXT_framebuffer_multisample |
581 | mHasFramebufferMultisample = TRUE; | 579 | mHasFramebufferMultisample = TRUE; |
582 | # else | 580 | # else |
583 | mHasFramebufferMultisample = FALSE; | 581 | mHasFramebufferMultisample = FALSE; |
584 | # endif | 582 | # endif |
585 | # if GL_ARB_draw_buffers | 583 | # ifdef GL_ARB_draw_buffers |
586 | mHasDrawBuffers = TRUE; | 584 | mHasDrawBuffers = TRUE; |
587 | #else | 585 | #else |
588 | mHasDrawBuffers = FALSE; | 586 | mHasDrawBuffers = FALSE; |
589 | # endif | 587 | # endif |
588 | # if defined(GL_NV_depth_clamp) || defined(GL_ARB_depth_clamp) | ||
589 | mHasDepthClamp = TRUE; | ||
590 | #else | ||
591 | mHasDepthClamp = FALSE; | ||
592 | #endif | ||
590 | mHasMipMapGeneration = FALSE; | 593 | mHasMipMapGeneration = FALSE; |
591 | mHasSeparateSpecularColor = FALSE; | 594 | mHasSeparateSpecularColor = FALSE; |
592 | mHasAnisotropic = FALSE; | 595 | mHasAnisotropic = FALSE; |
@@ -612,6 +615,7 @@ void LLGLManager::initExtensions() | |||
612 | && ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts); | 615 | && ExtensionExists("GL_EXT_packed_depth_stencil", gGLHExts.mSysExts); |
613 | mHasFramebufferMultisample = mHasFramebufferObject && ExtensionExists("GL_EXT_framebuffer_multisample", gGLHExts.mSysExts); | 616 | mHasFramebufferMultisample = mHasFramebufferObject && ExtensionExists("GL_EXT_framebuffer_multisample", gGLHExts.mSysExts); |
614 | mHasDrawBuffers = ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts); | 617 | mHasDrawBuffers = ExtensionExists("GL_ARB_draw_buffers", gGLHExts.mSysExts); |
618 | mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts); | ||
615 | #if !LL_DARWIN | 619 | #if !LL_DARWIN |
616 | mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts); | 620 | mHasPointParameters = !mIsATI && ExtensionExists("GL_ARB_point_parameters", gGLHExts.mSysExts); |
617 | #endif | 621 | #endif |
@@ -634,6 +638,7 @@ void LLGLManager::initExtensions() | |||
634 | mHasFramebufferObject = FALSE; | 638 | mHasFramebufferObject = FALSE; |
635 | mHasFramebufferMultisample = FALSE; | 639 | mHasFramebufferMultisample = FALSE; |
636 | mHasDrawBuffers = FALSE; | 640 | mHasDrawBuffers = FALSE; |
641 | mHasDepthClamp = FALSE; | ||
637 | mHasMipMapGeneration = FALSE; | 642 | mHasMipMapGeneration = FALSE; |
638 | mHasSeparateSpecularColor = FALSE; | 643 | mHasSeparateSpecularColor = FALSE; |
639 | mHasAnisotropic = FALSE; | 644 | mHasAnisotropic = FALSE; |
@@ -685,10 +690,11 @@ void LLGLManager::initExtensions() | |||
685 | if (strchr(blacklist,'q')) mHasFramebufferObject = FALSE;//S | 690 | if (strchr(blacklist,'q')) mHasFramebufferObject = FALSE;//S |
686 | if (strchr(blacklist,'r')) mHasDrawBuffers = FALSE;//S | 691 | if (strchr(blacklist,'r')) mHasDrawBuffers = FALSE;//S |
687 | if (strchr(blacklist,'s')) mHasFramebufferMultisample = FALSE; | 692 | if (strchr(blacklist,'s')) mHasFramebufferMultisample = FALSE; |
693 | if (strchr(blacklist,'t')) mHasDepthClamp = FALSE; | ||
688 | 694 | ||
689 | } | 695 | } |
690 | #endif // LL_LINUX || LL_SOLARIS | 696 | #endif // LL_LINUX || LL_SOLARIS |
691 | 697 | ||
692 | if (!mHasMultitexture) | 698 | if (!mHasMultitexture) |
693 | { | 699 | { |
694 | LL_INFOS("RenderInit") << "Couldn't initialize multitexturing" << LL_ENDL; | 700 | LL_INFOS("RenderInit") << "Couldn't initialize multitexturing" << LL_ENDL; |
@@ -1773,7 +1779,7 @@ LLGLDepthTest::~LLGLDepthTest() | |||
1773 | } | 1779 | } |
1774 | } | 1780 | } |
1775 | 1781 | ||
1776 | LLGLClampToFarClip::LLGLClampToFarClip(glh::matrix4f P) | 1782 | LLGLSquashToFarClip::LLGLSquashToFarClip(glh::matrix4f P) |
1777 | { | 1783 | { |
1778 | for (U32 i = 0; i < 4; i++) | 1784 | for (U32 i = 0; i < 4; i++) |
1779 | { | 1785 | { |
@@ -1786,7 +1792,7 @@ LLGLClampToFarClip::LLGLClampToFarClip(glh::matrix4f P) | |||
1786 | glMatrixMode(GL_MODELVIEW); | 1792 | glMatrixMode(GL_MODELVIEW); |
1787 | } | 1793 | } |
1788 | 1794 | ||
1789 | LLGLClampToFarClip::~LLGLClampToFarClip() | 1795 | LLGLSquashToFarClip::~LLGLSquashToFarClip() |
1790 | { | 1796 | { |
1791 | glMatrixMode(GL_PROJECTION); | 1797 | glMatrixMode(GL_PROJECTION); |
1792 | glPopMatrix(); | 1798 | glPopMatrix(); |
diff --git a/linden/indra/llrender/llgl.h b/linden/indra/llrender/llgl.h index 00ff1e2..cc7ebff 100644 --- a/linden/indra/llrender/llgl.h +++ b/linden/indra/llrender/llgl.h | |||
@@ -88,6 +88,7 @@ public: | |||
88 | BOOL mHasOcclusionQuery; | 88 | BOOL mHasOcclusionQuery; |
89 | BOOL mHasPointParameters; | 89 | BOOL mHasPointParameters; |
90 | BOOL mHasDrawBuffers; | 90 | BOOL mHasDrawBuffers; |
91 | BOOL mHasDepthClamp; | ||
91 | 92 | ||
92 | // Other extensions. | 93 | // Other extensions. |
93 | BOOL mHasAnisotropic; | 94 | BOOL mHasAnisotropic; |
@@ -306,11 +307,11 @@ private: | |||
306 | leaves this class. | 307 | leaves this class. |
307 | Does not stack. | 308 | Does not stack. |
308 | */ | 309 | */ |
309 | class LLGLClampToFarClip | 310 | class LLGLSquashToFarClip |
310 | { | 311 | { |
311 | public: | 312 | public: |
312 | LLGLClampToFarClip(glh::matrix4f projection); | 313 | LLGLSquashToFarClip(glh::matrix4f projection); |
313 | ~LLGLClampToFarClip(); | 314 | ~LLGLSquashToFarClip(); |
314 | }; | 315 | }; |
315 | 316 | ||
316 | /* | 317 | /* |
diff --git a/linden/indra/llrender/llglheaders.h b/linden/indra/llrender/llglheaders.h index c7178a5..9e3ae9d 100644 --- a/linden/indra/llrender/llglheaders.h +++ b/linden/indra/llrender/llglheaders.h | |||
@@ -819,5 +819,15 @@ extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); | |||
819 | 819 | ||
820 | #endif // LL_MESA / LL_WINDOWS / LL_DARWIN | 820 | #endif // LL_MESA / LL_WINDOWS / LL_DARWIN |
821 | 821 | ||
822 | // Even when GL_ARB_depth_clamp is available in the driver, the (correct) | ||
823 | // headers, and therefore GL_DEPTH_CLAMP might not be defined. | ||
824 | // In that case GL_DEPTH_CLAMP_NV should be defined, but why not just | ||
825 | // use the known numeric. | ||
826 | // | ||
827 | // To avoid #ifdef's in the code. Just define this here. | ||
828 | #ifndef GL_DEPTH_CLAMP | ||
829 | // Probably (still) called GL_DEPTH_CLAMP_NV. | ||
830 | #define GL_DEPTH_CLAMP 0x864F | ||
831 | #endif | ||
822 | 832 | ||
823 | #endif // LL_LLGLHEADERS_H | 833 | #endif // LL_LLGLHEADERS_H |
diff --git a/linden/indra/llrender/llimagegl.cpp b/linden/indra/llrender/llimagegl.cpp index 7cd4dd7..c63d7ad 100644 --- a/linden/indra/llrender/llimagegl.cpp +++ b/linden/indra/llrender/llimagegl.cpp | |||
@@ -375,45 +375,54 @@ LLImageGL::~LLImageGL() | |||
375 | 375 | ||
376 | void LLImageGL::init(BOOL usemipmaps) | 376 | void LLImageGL::init(BOOL usemipmaps) |
377 | { | 377 | { |
378 | #ifdef DEBUG_MISS | 378 | // keep these members in the same order as declared in llimagehl.h |
379 | mMissed = FALSE; | 379 | // so that it is obvious by visual inspection if we forgot to |
380 | #endif | 380 | // init a field. |
381 | 381 | ||
382 | mPickMask = NULL; | 382 | mTextureMemory = 0; |
383 | mPickMaskSize = 0; | 383 | mLastBindTime = 0.f; |
384 | mTextureState = NO_DELETE ; | 384 | |
385 | mTextureMemory = 0; | 385 | mPickMask = NULL; |
386 | mLastBindTime = 0.f; | 386 | mPickMaskSize = 0; |
387 | mUseMipMaps = usemipmaps; | ||
388 | mHasExplicitFormat = FALSE; | ||
389 | mAutoGenMips = FALSE; | ||
390 | |||
391 | mIsMask = FALSE; | ||
392 | |||
393 | mGLTextureCreated = false; | ||
394 | mTexName = 0; | ||
395 | mWidth = 0; | ||
396 | mHeight = 0; | ||
397 | mCurrentDiscardLevel = -1; | ||
387 | 398 | ||
388 | mTarget = GL_TEXTURE_2D; | 399 | mTarget = GL_TEXTURE_2D; |
389 | mBindTarget = LLTexUnit::TT_TEXTURE; | 400 | mBindTarget = LLTexUnit::TT_TEXTURE; |
390 | mUseMipMaps = usemipmaps; | ||
391 | mHasMipMaps = false; | 401 | mHasMipMaps = false; |
392 | mAutoGenMips = FALSE; | 402 | |
393 | mTexName = 0; | 403 | mIsResident = 0; |
394 | mIsResident = 0; | 404 | |
405 | mComponents = 0; | ||
406 | mMaxDiscardLevel = MAX_DISCARD_LEVEL; | ||
395 | 407 | ||
396 | mTexOptionsDirty = true; | 408 | mTexOptionsDirty = true; |
397 | mAddressMode = LLTexUnit::TAM_WRAP; | 409 | mAddressMode = LLTexUnit::TAM_WRAP; |
398 | mFilterOption = LLTexUnit::TFO_ANISOTROPIC; | 410 | mFilterOption = LLTexUnit::TFO_ANISOTROPIC; |
399 | mWidth = 0; | ||
400 | mHeight = 0; | ||
401 | mComponents = 0; | ||
402 | |||
403 | mMaxDiscardLevel = MAX_DISCARD_LEVEL; | ||
404 | mCurrentDiscardLevel = -1; | ||
405 | mDontDiscard = FALSE; | ||
406 | 411 | ||
407 | mFormatInternal = -1; | 412 | mFormatInternal = -1; |
408 | mFormatPrimary = (LLGLenum) 0; | 413 | mFormatPrimary = (LLGLenum) 0; |
409 | mFormatType = GL_UNSIGNED_BYTE; | 414 | mFormatType = GL_UNSIGNED_BYTE; |
410 | mFormatSwapBytes = FALSE; | 415 | mFormatSwapBytes = FALSE; |
411 | mHasExplicitFormat = FALSE; | ||
412 | 416 | ||
413 | mGLTextureCreated = FALSE ; | 417 | #ifdef DEBUG_MISS |
418 | mMissed = FALSE; | ||
419 | #endif | ||
414 | 420 | ||
415 | mIsMask = FALSE; | ||
416 | mCategory = -1 ; | 421 | mCategory = -1 ; |
422 | |||
423 | //LLTexture stuff | ||
424 | mDontDiscard = FALSE; | ||
425 | mTextureState = NO_DELETE ; | ||
417 | } | 426 | } |
418 | 427 | ||
419 | void LLImageGL::cleanup() | 428 | void LLImageGL::cleanup() |