We use glXGetProcAddress to load glXCreateContextAttribsARB ourselves,
so GLX_GLXEXT_PROTOTYPES is not needed.
| ... | ... |
@@ -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> |
| ... | ... |
@@ -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 |
|