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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user