summaryrefslogtreecommitdiffstats
path: root/zoomedit.cpp
blob: 580e224d21f3a822d4356a3e96707af75e53ec14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <gtk/gtk.h>
#include <gtk/gtkgl.h>
#include <stdlib.h>
#include "Level.h"
#include "window.h"
#include "edit.h"


int main(int argc, char *argv[]) {
  GdkGLConfig *glconfig;
  GtkWidget *window;
  
  setLevel(new Level());
  
  gtk_init(&argc, &argv);
  gtk_gl_init(&argc, &argv);
  
  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);
  
  gtk_main();
  
  delete getLevel();
  
  return 0;
}