Add debug info in the top left corner.
This commit is contained in:
11
src/main.cpp
11
src/main.cpp
@@ -63,6 +63,15 @@ static void loadSimulationData(const Options &options)
|
||||
|
||||
static void renderLayerName(const LayerData &data);
|
||||
|
||||
static void renderDebugInfo()
|
||||
{
|
||||
glLoadIdentity();
|
||||
setOrthographicProjection();
|
||||
glColor3f(1, 1, 0);
|
||||
renderText(Camera::instance().infoLine(), 2, 10);
|
||||
restorePerspectiveProjection();
|
||||
}
|
||||
|
||||
static void render()
|
||||
{
|
||||
// Clear Color and Depth Buffers
|
||||
@@ -92,6 +101,8 @@ static void render()
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
renderDebugInfo();
|
||||
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user