mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
227 lines
5.8 KiB
Diff
227 lines
5.8 KiB
Diff
diff -NaurbE glew-1.5.7/config/Makefile.haiku glew-1.5.7-haiku/config/Makefile.haiku
|
|
--- glew-1.5.7/config/Makefile.haiku 1970-01-01 01:00:00.000000000 +0100
|
|
+++ glew-1.5.7-haiku/config/Makefile.haiku 2010-12-03 16:25:41.782499840 +0100
|
|
@@ -0,0 +1,24 @@
|
|
+NAME = $(GLEW_NAME)
|
|
+GLEW_DEST = /boot/common
|
|
+CC = cc
|
|
+LD = cc
|
|
+ifneq (undefined, $(origin GLEW_MX))
|
|
+ CFLAGS.EXTRA = -DGLEW_MX
|
|
+endif
|
|
+
|
|
+LDFLAGS.SO = -shared -Wl,-soname=$(LIB.SONAME)
|
|
+
|
|
+LDFLAGS.GL = -lGL
|
|
+LDFLAGS.STATIC = -Wl,-Bstatic
|
|
+LDFLAGS.DYNAMIC = -Wl,-Bdynamic
|
|
+
|
|
+NAME = GLEW
|
|
+WARN = -Wall -W
|
|
+POPT = -O2
|
|
+
|
|
+BIN.SUFFIX =
|
|
+
|
|
+LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
|
|
+LIB.DEVLNK = lib$(NAME).so
|
|
+LIB.SHARED = lib$(NAME).so.$(SO_VERSION)
|
|
+LIB.STATIC = lib$(NAME).a
|
|
diff -NaurbE glew-1.5.7/src/glew.c glew-1.5.7-haiku/src/glew.c
|
|
--- glew-1.5.7/src/glew.c 2010-11-03 21:55:35.016252928 +0100
|
|
+++ glew-1.5.7-haiku/src/glew.c 2010-12-03 16:24:32.925892608 +0100
|
|
@@ -32,7 +32,7 @@
|
|
#include <GL/glew.h>
|
|
#if defined(_WIN32)
|
|
# include <GL/wglew.h>
|
|
-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
|
+#elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
|
|
# include <GL/glxew.h>
|
|
#endif
|
|
|
|
@@ -110,7 +110,7 @@
|
|
#endif /* MAC_OS_X_VERSION_10_3 */
|
|
#endif /* __APPLE__ */
|
|
|
|
-#if defined(__sgi) || defined (__sun)
|
|
+#if defined(__sgi) || defined (__sun) || defined(__HAIKU__)
|
|
#include <dlfcn.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
@@ -142,7 +142,7 @@
|
|
# if defined(__APPLE__)
|
|
# define glewGetProcAddress(name) NSGLGetProcAddress(name)
|
|
# else
|
|
-# if defined(__sgi) || defined(__sun)
|
|
+# if defined(__sgi) || defined(__sun) || defined(__HAIKU__)
|
|
# define glewGetProcAddress(name) dlGetProcAddress(name)
|
|
# else /* __linux */
|
|
# define glewGetProcAddress(name) (*glXGetProcAddressARB)(name)
|
|
@@ -10308,7 +10308,7 @@
|
|
return GLEW_OK;
|
|
}
|
|
|
|
-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
|
+#elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
|
|
|
|
PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay = NULL;
|
|
|
|
@@ -11303,7 +11303,7 @@
|
|
return GLEW_OK;
|
|
}
|
|
|
|
-#endif /* !__APPLE__ || GLEW_APPLE_GLX */
|
|
+#endif /* !__APPLE__ && !__HAIKU__ || GLEW_APPLE_GLX */
|
|
|
|
/* ------------------------------------------------------------------------ */
|
|
|
|
diff -NaurbE glew-1.5.7/src/glewinfo.c glew-1.5.7-haiku/src/glewinfo.c
|
|
--- glew-1.5.7/src/glewinfo.c 2010-11-03 21:55:35.014680064 +0100
|
|
+++ glew-1.5.7-haiku/src/glewinfo.c 2010-12-03 16:36:44.346030080 +0100
|
|
@@ -35,7 +35,7 @@
|
|
#include <GL/glew.h>
|
|
#if defined(_WIN32)
|
|
#include <GL/wglew.h>
|
|
-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
|
+#elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
|
|
#include <GL/glxew.h>
|
|
#endif
|
|
|
|
@@ -47,7 +47,7 @@
|
|
#ifdef _WIN32
|
|
WGLEWContext _wglewctx;
|
|
#define wglewGetContext() (&_wglewctx)
|
|
-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
|
+#elif !defined(__APPLE__)&& !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
|
|
GLXEWContext _glxewctx;
|
|
#define glxewGetContext() (&_glxewctx)
|
|
#endif
|
|
@@ -55,7 +55,7 @@
|
|
|
|
#if defined(_WIN32)
|
|
GLboolean glewCreateContext (int* pixelformat);
|
|
-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
|
+#elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
|
|
GLboolean glewCreateContext (const char* display, int* visual);
|
|
#else
|
|
GLboolean glewCreateContext ();
|
|
@@ -8850,6 +8850,22 @@
|
|
|
|
/* ------------------------------------------------------------------------ */
|
|
|
|
+#elif defined(__HAIKU__)
|
|
+
|
|
+GLboolean glewCreateContext ()
|
|
+{
|
|
+ // TODO
|
|
+ return GL_FALSE;
|
|
+}
|
|
+
|
|
+void glewDestroyContext ()
|
|
+{
|
|
+ // TODO
|
|
+}
|
|
+
|
|
+
|
|
+/* ------------------------------------------------------------------------ */
|
|
+
|
|
#else /* __UNIX || (__APPLE__ && GLEW_APPLE_GLX) */
|
|
|
|
Display* dpy = NULL;
|
|
diff -NaurbE glew-1.5.7/src/visualinfo.c glew-1.5.7-haiku/src/visualinfo.c
|
|
--- glew-1.5.7/src/visualinfo.c 2010-11-03 21:55:35.016252928 +0100
|
|
+++ glew-1.5.7-haiku/src/visualinfo.c 2010-12-03 16:46:50.315621376 +0100
|
|
@@ -37,7 +37,7 @@
|
|
#include <GL/wglew.h>
|
|
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
|
|
#include <AGL/agl.h>
|
|
-#else
|
|
+#elif !defined(__HAIKU__)
|
|
#include <GL/glxew.h>
|
|
#endif
|
|
|
|
@@ -47,7 +47,7 @@
|
|
# ifdef _WIN32
|
|
WGLEWContext _wglewctx;
|
|
# define wglewGetContext() (&_wglewctx)
|
|
-# elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
|
+# elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
|
|
GLXEWContext _glxewctx;
|
|
# define glxewGetContext() (&_glxewctx)
|
|
# endif
|
|
@@ -61,7 +61,7 @@
|
|
HGLRC rc;
|
|
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
|
|
AGLContext ctx, octx;
|
|
-#else
|
|
+#elif !defined(__HAIKU__)
|
|
Display* dpy;
|
|
XVisualInfo* vi;
|
|
GLXContext ctx;
|
|
@@ -129,7 +129,7 @@
|
|
err = glewContextInit(glewGetContext());
|
|
# ifdef _WIN32
|
|
err = err || wglewContextInit(wglewGetContext());
|
|
-# elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
|
+# elif !defined(__APPLE__) && !defined(__HAIKU__) || defined(GLEW_APPLE_GLX)
|
|
err = err || glxewContextInit(glxewGetContext());
|
|
# endif
|
|
#else
|
|
@@ -179,6 +179,8 @@
|
|
}
|
|
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
|
|
|
|
+#elif defined(__HAIKU__)
|
|
+
|
|
#else
|
|
/* GLX extensions */
|
|
fprintf(file, "GLX extensions (GLX_): \n");
|
|
@@ -593,6 +595,16 @@
|
|
*/
|
|
}
|
|
|
|
+/* ---------------------------------------------------------------------- */
|
|
+
|
|
+#elif defined(__HAIKU__)
|
|
+
|
|
+void
|
|
+VisualInfo (GLContext* ctx)
|
|
+{
|
|
+ // TODO
|
|
+}
|
|
+
|
|
#else /* GLX */
|
|
|
|
void
|
|
@@ -1069,6 +1081,31 @@
|
|
|
|
/* ------------------------------------------------------------------------ */
|
|
|
|
+#elif defined(__HAIKU__)
|
|
+
|
|
+void
|
|
+InitContext (GLContext* ctx)
|
|
+{
|
|
+ // TODO
|
|
+}
|
|
+
|
|
+
|
|
+GLboolean
|
|
+CreateContext (GLContext* ctx)
|
|
+{
|
|
+ // TODO
|
|
+ return GL_FALSE;
|
|
+}
|
|
+
|
|
+
|
|
+void
|
|
+DestroyContext (GLContext* ctx)
|
|
+{
|
|
+ // TODO
|
|
+}
|
|
+
|
|
+/* ------------------------------------------------------------------------ */
|
|
+
|
|
#else /* __UNIX || (__APPLE__ && GLEW_APPLE_GLX) */
|
|
|
|
void InitContext (GLContext* ctx)
|