Browse code

Merge branch 'includes' into cpp

Robert Cranston authored on 27/02/2024 02:27:48
Showing 8 changed files

... ...
@@ -16,8 +16,7 @@ COMMON = \
16 16
 	common/$(OS)/$(MICROGLUT)
17 17
 CPPFLAGS += \
18 18
 	-Icommon \
19
-	-Icommon/$(OS) \
20
-	-DGL_GLEXT_PROTOTYPES
19
+	-Icommon/$(OS)
21 20
 CXXFLAGS += \
22 21
 	-g \
23 22
 	-Wall \
... ...
@@ -5,17 +5,16 @@
5 5
 extern "C" {
6 6
 #endif
7 7
 
8
-#ifdef __APPLE__
8
+#if defined(__APPLE__)
9 9
 	#define GL_SILENCE_DEPRECATION
10 10
 	#include <OpenGL/gl3.h>
11
+#elif defined(_WIN32)
12
+	#include "glew.h"
11 13
 #else
12
-	#if defined(_WIN32)
13
-		#include "glew.h"
14
-		#include <GL/gl.h>
15
-	#else
16
-		#include <GL/gl.h>
17
-	#endif
14
+	#define GL_GLEXT_PROTOTYPES
15
+	#include <GL/gl.h>
18 16
 #endif
17
+
19 18
 #include <stdlib.h>
20 19
 
21 20
 void printError(const char *functionName);
... ...
@@ -42,9 +42,8 @@
42 42
 #include <stdlib.h>
43 43
 #include <stdio.h>
44 44
 #include <string.h>
45
+#define GL_GLEXT_PROTOTYPES
45 46
 #include <GL/gl.h>
46
-#define GLX_GLXEXT_PROTOTYPES
47
-#include <GL/glext.h>
48 47
 #include <X11/Xlib.h>
49 48
 #include <X11/keysym.h>
50 49
 #include <GL/glx.h>
... ...
@@ -1,12 +1,13 @@
1 1
 #ifndef loadobj_h
2 2
 #define loadobj_h
3 3
 
4
-#ifdef __APPLE__
4
+#if defined(__APPLE__)
5
+	#define GL_SILENCE_DEPRECATION
5 6
 	#include <OpenGL/gl3.h>
7
+#elif defined(_WIN32)
8
+	#include "glew.h"
6 9
 #else
7
-	#if defined(_WIN32)
8
-		#include "glew.h"
9
-	#endif
10
+	#define GL_GLEXT_PROTOTYPES
10 11
 	#include <GL/gl.h>
11 12
 #endif
12 13
 
... ...
@@ -5,15 +5,16 @@
5 5
 extern "C" {
6 6
 #endif
7 7
 
8
-#ifdef __APPLE__
8
+#if defined(__APPLE__)
9 9
 	#define GL_SILENCE_DEPRECATION
10 10
 	#include <OpenGL/gl3.h>
11
+#elif defined(_WIN32)
12
+	#include "glew.h"
11 13
 #else
12
-	#if defined(_WIN32)
13
-		#include "glew.h"
14
-	#endif
14
+	#define GL_GLEXT_PROTOTYPES
15 15
 	#include <GL/gl.h>
16 16
 #endif
17
+
17 18
 #include <stdio.h>
18 19
 #include <stdlib.h>
19 20
 #include <string.h>
... ...
@@ -9,7 +9,6 @@ extern "C" {
9 9
 #ifndef __APPLE__
10 10
 	ERROR! This is the Mac version of the MicroGlut header which will not work on other platforms!
11 11
 #endif
12
-#define GL_SILENCE_DEPRECATION
13 12
 
14 13
 // Same or similar to old GLUT calls
15 14
 void glutMainLoop();
... ...
@@ -69,7 +69,7 @@
69 69
 #define GL_SILENCE_DEPRECATION
70 70
 
71 71
 #import <Cocoa/Cocoa.h>
72
-#include <OpenGL/gl.h>
72
+#include <OpenGL/gl3.h>
73 73
 #include <stdlib.h>
74 74
 #include <stdio.h>
75 75
 #include <stddef.h>
... ...
@@ -99,15 +99,16 @@
99 99
 #ifndef VECTORUTILS4
100 100
 #define VECTORUTILS4
101 101
 
102
-#ifdef __APPLE__
102
+#if defined(__APPLE__)
103 103
 	#define GL_SILENCE_DEPRECATION
104 104
 	#include <OpenGL/gl3.h>
105
+#elif defined(_WIN32)
106
+	#include "glew.h"
105 107
 #else
106
-	#if defined(_WIN32)
107
-		#include "glew.h"
108
-	#endif
108
+	#define GL_GLEXT_PROTOTYPES
109 109
 	#include <GL/gl.h>
110 110
 #endif
111
+
111 112
 #include <math.h>
112 113
 #include <stdio.h>
113 114