Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CGUIText.cpp
Show First 20 Lines • Show All 423 Lines • ▼ Show 20 Lines | if (j == static_cast<int>(string.m_Words.size()) - 2) | ||||
done = true; | done = true; | ||||
} | } | ||||
return done; | return done; | ||||
} | } | ||||
void CGUIText::Draw(CGUI& pGUI, const CGUIColor& DefaultColor, const CPos& pos, const float z, const CRect& clipping) const | void CGUIText::Draw(CGUI& pGUI, const CGUIColor& DefaultColor, const CPos& pos, const float z, const CRect& clipping) const | ||||
{ | { | ||||
ogl_DebugGroup group("Draw GUI text"); | |||||
vladislavbelov: I'd prefer single name macro instead of duplicating. And the `group` word is too common and… | |||||
Not Done Inline ActionsShould be removed, the GUI code shouldn't have GL related stuff. The same for other GUI changes. vladislavbelov: Should be removed, the GUI code shouldn't have GL related stuff. The same for other GUI changes. | |||||
CShaderTechniquePtr tech = g_Renderer.GetShaderManager().LoadEffect(str_gui_text); | CShaderTechniquePtr tech = g_Renderer.GetShaderManager().LoadEffect(str_gui_text); | ||||
tech->BeginPass(); | tech->BeginPass(); | ||||
bool isClipped = clipping != CRect(); | bool isClipped = clipping != CRect(); | ||||
if (isClipped) | if (isClipped) | ||||
{ | { | ||||
glEnable(GL_SCISSOR_TEST); | glEnable(GL_SCISSOR_TEST); | ||||
Show All 32 Lines |
Wildfire Games · Phabricator
I'd prefer single name macro instead of duplicating. And the group word is too common and might be used in the code.