Changeset View
Changeset View
Standalone View
Standalone View
source/gui/GUIRenderer.cpp
Show First 20 Lines • Show All 333 Lines • ▼ Show 20 Lines | |||||
void GUIRenderer::Draw(DrawCalls& Calls, float Z) | void GUIRenderer::Draw(DrawCalls& Calls, float Z) | ||||
{ | { | ||||
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) | ||||
// TODO: batching by shader/texture/etc would be nice | // TODO: batching by shader/texture/etc would be nice | ||||
OGL_SCOPED_DEBUG_GROUP("Draw GUI element"); | |||||
CMatrix3D matrix = GetDefaultGuiMatrix(); | CMatrix3D matrix = GetDefaultGuiMatrix(); | ||||
glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||||
// 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) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator