1
0
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:
vladislavbelov
2021-05-22 18:06:18 +00:00
parent 2111f864d4
commit 0728c58a4d
27 changed files with 125 additions and 175 deletions
+3 -3
View File
@@ -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);