forked from mirrors/0ad
Removes unnecessary z-level from GUI sprite rendering.
Tested By: Imarok Differential Revision: https://code.wildfiregames.com/D4003 This was SVN commit r25524.
This commit is contained in:
@@ -428,7 +428,7 @@ bool CGUIText::AssembleCalls(
|
||||
return done;
|
||||
}
|
||||
|
||||
void CGUIText::Draw(CGUI& pGUI, const CGUIColor& DefaultColor, const CVector2D& pos, const float z, const CRect& clipping) const
|
||||
void CGUIText::Draw(CGUI& pGUI, const CGUIColor& DefaultColor, const CVector2D& pos, const CRect& clipping) const
|
||||
{
|
||||
CShaderTechniquePtr tech = g_Renderer.GetShaderManager().LoadEffect(str_gui_text);
|
||||
|
||||
@@ -447,7 +447,7 @@ void CGUIText::Draw(CGUI& pGUI, const CGUIColor& DefaultColor, const CVector2D&
|
||||
|
||||
CTextRenderer textRenderer(tech->GetShader());
|
||||
textRenderer.SetClippingRect(clipping);
|
||||
textRenderer.Translate(0.0f, 0.0f, z);
|
||||
textRenderer.Translate(0.0f, 0.0f, 0.0f);
|
||||
|
||||
for (const STextCall& tc : m_TextCalls)
|
||||
{
|
||||
@@ -463,7 +463,7 @@ void CGUIText::Draw(CGUI& pGUI, const CGUIColor& DefaultColor, const CVector2D&
|
||||
textRenderer.Render();
|
||||
|
||||
for (const SSpriteCall& sc : m_SpriteCalls)
|
||||
pGUI.DrawSprite(sc.m_Sprite, z, sc.m_Area + pos);
|
||||
pGUI.DrawSprite(sc.m_Sprite, sc.m_Area + pos);
|
||||
|
||||
if (isClipped)
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
|
||||
Reference in New Issue
Block a user