Browse Source

Some hack to get OSX gl to build

Roger Hughston 20 years ago
parent
commit
f0e9f34908

+ 1 - 1
panda/src/glstuff/Sources.pp

@@ -1,5 +1,5 @@
 #define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
-                   dtoolutil:c dtoolbase:c dtool:m
+                   dtoolutil:c dtoolbase:c dtool:m prc:c
 #define USE_PACKAGES gl cggl
 // Most of the files here are not actually compiled into anything;
 // they're just included by various other directories.

+ 7 - 0
panda/src/glstuff/glGraphicsStateGuardian_src.h

@@ -59,6 +59,13 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, const GLfloat
 typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
 typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
 typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
+
 class CLP(GeomContext);
 
 ////////////////////////////////////////////////////////////////////

+ 3 - 0
panda/src/glstuff/glstuff_src.h

@@ -43,11 +43,14 @@
 #if defined(GL_GLEXT_VERSION) && GL_GLEXT_VERSION < 29
   #undef GL_GLEXT_VERSION
   #undef GL_GLEXT_PROTOTYPES
+#ifndef IS_OSX
   #undef GL_VERSION_1_2
   #undef GL_VERSION_1_3
   #undef GL_VERSION_1_4
   #undef GL_VERSION_1_5
 #endif
+#endif
+
 #include "panda_glext.h"
 
 #include "glmisc_src.h"