Replaced some opengl fixed functions with shaders. Temporary ShyotlUseLegacyRenderPath setting to debug if this change actually improves framerate at all (setting not tied to callbacks. Have to toggle shaders to have stuff pick up the setting change)

This commit is contained in:
Shyotl
2011-08-10 03:53:49 -05:00
parent 896b7146e7
commit ca328aec72
41 changed files with 1037 additions and 273 deletions

View File

@@ -487,8 +487,15 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
if (solid_color)
{
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA);
if (LLGLSLShader::sNoFixedFunction)
{
gSolidColorProgram.bind();
}
else
{
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA);
}
}
gGL.pushMatrix();
@@ -624,7 +631,14 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
if (solid_color)
{
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
if (LLGLSLShader::sNoFixedFunction)
{
gUIProgram.bind();
}
else
{
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
}
}
}