Changeset View
Changeset View
Standalone View
Standalone View
source/gui/ObjectTypes/CMiniMap.cpp
Show First 20 Lines • Show All 378 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
// TODO: render the minimap in a framebuffer and just draw the frambuffer texture | // TODO: render the minimap in a framebuffer and just draw the frambuffer texture | ||||
// most of the time, updating the framebuffer twice a frame. | // most of the time, updating the framebuffer twice a frame. | ||||
// Here it updates as ping-pong either texture or vertex array each sec to lower gpu stalling | // Here it updates as ping-pong either texture or vertex array each sec to lower gpu stalling | ||||
// (those operations cause a gpu sync, which slows down the way gpu works) | // (those operations cause a gpu sync, which slows down the way gpu works) | ||||
void CMiniMap::Draw() | void CMiniMap::Draw() | ||||
{ | { | ||||
PROFILE3("render minimap"); | OGL_SCOPED_DEBUG_GROUP("Draw MiniMap"); | ||||
PROFILE3("Draw MiniMap"); | |||||
// The terrain isn't actually initialized until the map is loaded, which | // The terrain isn't actually initialized until the map is loaded, which | ||||
// happens when the game is started, so abort until then. | // happens when the game is started, so abort until then. | ||||
if (!g_Game || !g_Game->IsGameStarted()) | if (!g_Game || !g_Game->IsGameStarted()) | ||||
return; | return; | ||||
CSimulation2* sim = g_Game->GetSimulation2(); | CSimulation2* sim = g_Game->GetSimulation2(); | ||||
CmpPtr<ICmpRangeManager> cmpRangeManager(*sim, SYSTEM_ENTITY); | CmpPtr<ICmpRangeManager> cmpRangeManager(*sim, SYSTEM_ENTITY); | ||||
▲ Show 20 Lines • Show All 358 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator