Use GLUT for detecting errors.

Rather than polling for errors, let GLUT do it. Can be enabled with the
"-gldebug" CLI flag.
This commit is contained in:
2018-04-13 13:21:30 +02:00
parent 018148efef
commit d20f568836
5 changed files with 32 additions and 25 deletions

View File

@@ -3,6 +3,7 @@
#include <glog/logging.h>
#include <GL/glut.h>
#include <map>
#include <cstdarg>
#include "LayerData.hpp"
#include "Options.hpp"
@@ -54,6 +55,8 @@ int main(int argc, char *argv[])
google::InitGoogleLogging(argv[0]);
google::InstallFailureSignalHandler();
registerErrorCallbacks();
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA);
glutCreateWindow(argv[0]);