font rendering and redraw fixes
[retroray] / src / modern / main.c
index 65b5eed..ea10805 100644 (file)
@@ -22,6 +22,7 @@ along with this program.  If not, see <https://www.gnu.org/licenses/>.
 #include "app.h"
 #include "logger.h"
 
+static void display(void);
 static void reshape(int x, int y);
 static void keydown(unsigned char key, int x, int y);
 static void keyup(unsigned char key, int x, int y);
@@ -53,7 +54,7 @@ int main(int argc, char **argv)
        glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
        glutCreateWindow("RetroRay");
 
-       glutDisplayFunc(app_display);
+       glutDisplayFunc(display);
        glutReshapeFunc(reshape);
        glutKeyboardFunc(keydown);
        glutKeyboardUpFunc(keyup);
@@ -178,6 +179,11 @@ void app_vsync(int vsync)
 #endif
 
 
+static void display(void)
+{
+       app_display();
+       app_swap_buffers();
+}
 
 static void reshape(int x, int y)
 {