summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2012-01-23 13:40:20 -0800
committerLeslie Linden <leslie@lindenlab.com>2012-01-23 13:40:20 -0800
commitca9f000289f93068386835d7040e5a574507f859 (patch)
treee41904b9f9a2e5f48b2da0509c8ecee3ea24a818
parent7595d8432d7f49797b0a68bd9cbd638d65d54f25 (diff)
* Optimization to not waste some time doing std::string assignment all over the graphics code.
Reviewed by davep.
-rw-r--r--indra/newview/pipeline.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index df8f8793d1..50adbad140 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1217,10 +1217,12 @@ void LLPipeline::restoreGL()
BOOL LLPipeline::canUseVertexShaders()
{
+ static const std::string vertex_shader_enable_feature_string = "VertexShaderEnable";
+
if (sDisableShaders ||
!gGLManager.mHasVertexShader ||
!gGLManager.mHasFragmentShader ||
- !LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable") ||
+ !LLFeatureManager::getInstance()->isFeatureAvailable(vertex_shader_enable_feature_string) ||
(assertInitialized() && mVertexShadersLoaded != 1) )
{
return FALSE;