]> Pileus Git - grits/commitdiff
Move OpenGL includes to a common place
authorAndy Spencer <andy753421@gmail.com>
Mon, 12 Dec 2011 05:37:20 +0000 (05:37 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 12 Dec 2011 05:39:27 +0000 (05:39 +0000)
Apple seems to think the should put GL.h in OpenGL instead of GL..
putting it all gtkgl.h makes it a little easier, but requires gtkgl.h to
be included in the install and by grits.h.

15 files changed:
src/Makefile.am
src/grits-opengl.c
src/grits.h
src/gtkgl.h
src/objects/grits-marker.c
src/objects/grits-object.c
src/objects/grits-poly.c
src/objects/grits-tile.c
src/objects/grits-volume.c
src/plugins/elev.c
src/plugins/env.c
src/plugins/map.c
src/plugins/sat.c
src/plugins/test.c
src/roam.c

index 18659d3df686f0e17a3060c989e530933636dd46..ed3db864219340946ccdcd2cb895b007a7b59768 100644 (file)
@@ -17,6 +17,7 @@ grits_include_HEADERS = \
        grits-opengl.h  \
        grits-plugin.h  \
        grits-util.h    \
+       gtkgl.h         \
        gpqueue.h       \
        roam.h
 
index 59fea09edccd9443b5bb1a25dc47aa29bf20d668..a39fbda1733f87d8f55c9c8b1b354b00cabeb8ba 100644 (file)
@@ -32,8 +32,6 @@
 #include <string.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
-#include <GL/gl.h>
-#include <GL/glu.h>
 
 #include "grits-opengl.h"
 #include "grits-util.h"
index 84ae7edbbdfcac66ffb9a6749a6402caa4139207..523d87c9c3802efc58c0d03776e28ccfaa554f89 100644 (file)
@@ -40,4 +40,7 @@
 /* Plugins */
 #include <grits-plugin.h>
 
+/* Misc */
+#include <gtkgl.h>
+
 #endif
index 174fc7674dda93d0128e4d9f805f737f518d2236..71ad67a7739c3426e2d80df535e233d906c88e13 100644 (file)
 #ifndef __GTK_GL_H__
 #define __GTK_GL_H__
 
+#include <gtk/gtk.h>
+
+/* Platform dependant OpenGL includes */
+#ifdef USE_MAC
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+#else
+#include <GL/gl.h>
+#include <GL/glu.h>
+#endif
+
 /* Call before widget is realized */
 void gtk_gl_enable(GtkWidget *widget);
 
index a5cb9c719e3c6d7753bd04c98b15a3eb7ff7a13c..3946775d22932dc593d75bca547f80f1f562884b 100644 (file)
@@ -31,7 +31,7 @@
  */
 
 #include <config.h>
-#include <GL/gl.h>
+#include "gtkgl.h"
 #include "grits-marker.h"
 
 /**
index 30f79f9412850d1f828503cf4e56ce55460945a9..fc8cddf2789135b52110e415bd1fe209c3d2df40 100644 (file)
@@ -30,8 +30,8 @@
 
 #include <config.h>
 #include <math.h>
-#include <GL/gl.h>
 
+#include "gtkgl.h"
 #include "grits-object.h"
 
 /* Constants */
index 67dca9a9156302f1fe84c83f55c376dfc0529d60..5d54a70da80d06d6f22ff2939c03d97af2421f44 100644 (file)
@@ -23,8 +23,7 @@
  */
 
 #include <config.h>
-#include <GL/gl.h>
-#include <GL/glu.h>
+#include "gtkgl.h"
 #include "grits-poly.h"
 
 /* Drawing */
index bceb2a3dd1eeeb399ffe4519683c92ab1fe2042d..c8326daeb5ec998d17694c96e288d115e7abce7e 100644 (file)
@@ -33,7 +33,7 @@
  */
 
 #include <config.h>
-#include <GL/gl.h>
+#include "gtkgl.h"
 #include "grits-tile.h"
 
 gchar *grits_tile_path_table[2][2] = {
index 2579600046dc1575afb0f95aa01d9a1582d20686..f972fe5c2255c5340447dcaa6694a4d7213740af 100644 (file)
@@ -29,7 +29,7 @@
 #include <config.h>
 #include <math.h>
 #include <glib.h>
-#include <GL/gl.h>
+#include "gtkgl.h"
 #include "grits-volume.h"
 
 /* Drawing */
index cf3f3fbe0b677b3d6b1d584a5a40bec83af22cc2..d8c645610a1ce6c0418a4b2c14a7140ab0177766 100644 (file)
@@ -26,7 +26,6 @@
  */
 
 #include <glib/gstdio.h>
-#include <GL/gl.h>
 
 #include <grits.h>
 
index cdafb5c2d249223daabc5525a251ad9fcf2ef94e..75e41d3899de350c9817483d03c3e7ec6b10869b 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 #include <math.h>
-#include <GL/gl.h>
 
 #include <grits.h>
 
index 31412d2dc249e8f99a5cfd13ad30f3dbefd72ee3..0e8a656eca7a10a344a232ba03276a4f8e16daa2 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <time.h>
 #include <glib/gstdio.h>
-#include <GL/gl.h>
 
 #include <grits.h>
 
index 0640c52660530f3084e1d13af795c532d64cb1a7..1c738d90c620ad0f31caacb65b567bee71b1e20a 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <time.h>
 #include <glib/gstdio.h>
-#include <GL/gl.h>
 
 #include <grits.h>
 
index 2c11ea9ec28e4ec2cfa1f017692b0d9a0833eb3f..d0315bd7f6e9552b65002213fce49d17f9486772 100644 (file)
@@ -25,9 +25,6 @@
 
 #include <string.h>
 
-#include <GL/gl.h>
-#include <GL/glu.h>
-
 #include <gdk/gdkkeysyms.h>
 #include <grits.h>
 
index 69c75f2c332a6c326dd02f6322de2f57bf8b4018..cfcdd54d0328be9d8258cca25ba92df293581287 100644 (file)
@@ -31,9 +31,8 @@
 #include <glib.h>
 #include <math.h>
 #include <string.h>
-#include <GL/gl.h>
-#include <GL/glu.h>
 
+#include "gtkgl.h"
 #include "gpqueue.h"
 #include "grits-util.h"
 #include "roam.h"