summaryrefslogtreecommitdiffstats
path: root/zoomedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zoomedit.cpp')
-rw-r--r--zoomedit.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/zoomedit.cpp b/zoomedit.cpp
index 37b6159..580e224 100644
--- a/zoomedit.cpp
+++ b/zoomedit.cpp
@@ -1,4 +1,5 @@
#include <gtk/gtk.h>
+#include <gtk/gtkgl.h>
#include <stdlib.h>
#include "Level.h"
#include "window.h"
@@ -6,13 +7,22 @@
int main(int argc, char *argv[]) {
+ GdkGLConfig *glconfig;
GtkWidget *window;
setLevel(new Level());
gtk_init(&argc, &argv);
+ gtk_gl_init(&argc, &argv);
- window = createMainWindow();
+ glconfig = gdk_gl_config_new_by_mode((GdkGLConfigMode)(GDK_GL_MODE_RGB | GDK_GL_MODE_DOUBLE));
+ if(!glconfig) glconfig = gdk_gl_config_new_by_mode(GDK_GL_MODE_RGB);
+ if(!glconfig) {
+ g_print ("*** No appropriate OpenGL-capable visual found.\n");
+ exit (1);
+ }
+
+ window = createMainWindow(glconfig);
gtk_widget_show(window);