diff options
author | Leslie Linden <leslie@lindenlab.com> | 2012-01-23 13:40:20 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2012-01-23 13:40:20 -0800 |
commit | ca9f000289f93068386835d7040e5a574507f859 (patch) | |
tree | e41904b9f9a2e5f48b2da0509c8ecee3ea24a818 | |
parent | 7595d8432d7f49797b0a68bd9cbd638d65d54f25 (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.cpp | 4 |
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; |