Add debug info in the top left corner.

This commit is contained in:
2018-02-26 15:39:53 +01:00
parent 604d302627
commit 2dec364b1b
4 changed files with 72 additions and 4 deletions

View File

@@ -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();
}