Changeset View
Changeset View
Standalone View
Standalone View
source/gui/GUIRenderer.cpp
Show First 20 Lines • Show All 313 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
void GUIRenderer::Draw(DrawCalls& Calls, CCanvas2D& canvas) | void GUIRenderer::Draw(DrawCalls& Calls, CCanvas2D& canvas) | ||||
{ | { | ||||
if (Calls.empty()) | if (Calls.empty()) | ||||
return; | return; | ||||
// Called every frame, to draw the object (based on cached calculations) | // Called every frame, to draw the object (based on cached calculations) | ||||
OGL_SCOPED_DEBUG_GROUP("Draw GUI element"); | |||||
// Iterate through each DrawCall, and execute whatever drawing code is being called | // Iterate through each DrawCall, and execute whatever drawing code is being called | ||||
for (DrawCalls::const_iterator cit = Calls.begin(); cit != Calls.end(); ++cit) | for (DrawCalls::const_iterator cit = Calls.begin(); cit != Calls.end(); ++cit) | ||||
{ | { | ||||
// A hack to preload the handle to get a correct texture size. | // A hack to preload the handle to get a correct texture size. | ||||
GLuint h; | GLuint h; | ||||
ogl_tex_get_texture_id(cit->m_Texture->GetHandle(), &h); | ogl_tex_get_texture_id(cit->m_Texture->GetHandle(), &h); | ||||
Show All 20 Lines |
Wildfire Games · Phabricator