mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Updated glew (glewinfo working, visualinfo still missing)
This commit is contained in:
@@ -5,39 +5,40 @@ C/C++ extension loading library. GLEW provides efficient run-time mechanisms \
|
||||
for determining which OpenGL extensions are supported on the target platform.
|
||||
"
|
||||
LICENSE="BSD (3-clause)"
|
||||
COPYRIGHT="2007 The Kronos Group Inc.
|
||||
2002-2007 Milan Ikits
|
||||
2002-2007 Marcelo E. Magallon
|
||||
COPYRIGHT="2007 The Kronos Group Inc.
|
||||
2002-2007 Milan Ikits
|
||||
2002-2007 Marcelo E. Magallon
|
||||
2002 Lev Povalahev"
|
||||
HOMEPAGE="http://glew.sourceforge.net"
|
||||
HOMEPAGE="http://glew.sourceforge.net"
|
||||
SRC_URI="http://downloads.sourceforge.net/project/glew/glew/${portVersion}/glew-${portVersion}.tgz"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
CHECKSUM_SIZE="567605"
|
||||
CHECKSUM_MD5="2f09e5e6cb1b9f3611bcac79bc9c2d5d"
|
||||
CHECKSUM_RMD160="cd9772b37e4f48fe2e25a55303eb89363ce91467"
|
||||
CHECKSUM_SHA512="0c998fda9fe01c9296a3453966c0449c9968f4f5f989065ca65f0da3830ae8d805699d0ee0362c3b18765420222ba18842b9db20986212afceb36c971ae1bdca"
|
||||
|
||||
ARCHITECTURES="x86 ?x86_gcc2 ?x86_64"
|
||||
|
||||
PATCHES="glew-1.10.0.patch"
|
||||
PATCHES="glew-1.10.0.patchset"
|
||||
|
||||
PROVIDES="
|
||||
glew$secondaryArchSuffix = $portVersion
|
||||
lib:libGLEW
|
||||
lib:libGLEW = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
lib:libGL
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libGL
|
||||
"
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
@@ -46,24 +47,41 @@ SOURCE_DIR="glew-${portVersion}"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make GLEW_DEST=$prefix BINDIR=$binDir LIBDIR=$libDir INCDIR=$includeDir
|
||||
make $jobArgs GLEW_DEST=$prefix BINDIR=$binDir LIBDIR=$libDir INCDIR=$includeDir
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install GLEW_DEST=$prefix BINDIR=$binDir LIBDIR=$libDir INCDIR=$includeDir
|
||||
make install.bin GLEW_DEST=$prefix BINDIR=$binDir LIBDIR=$libDir INCDIR=$includeDir
|
||||
|
||||
prepareInstalledDevelLib libGLEW
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
packageEntries devel $developDir
|
||||
packageEntries util $binDir
|
||||
}
|
||||
|
||||
# ----- devel package -------------------------------------
|
||||
PROVIDES_devel="
|
||||
libGLEW${secondaryArchSuffix}_devel = $portVersion
|
||||
"
|
||||
glew${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libGLEW = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES_devel="
|
||||
libGLEW$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
glew$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
# ----- util package --------------------------------------
|
||||
PROVIDES_util="
|
||||
glew${secondaryArchSuffix}_util = $portVersion
|
||||
cmd:glewinfo
|
||||
# cmd:visualinfo
|
||||
"
|
||||
|
||||
REQUIRES_util="
|
||||
glew$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libGLEW$secondaryArchSuffix
|
||||
"
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
diff -Naur glew-1.10.0/config/Makefile.haiku glew-1.10.0-haiku/config/Makefile.haiku
|
||||
--- glew-1.10.0/config/Makefile.haiku 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ glew-1.10.0-haiku/config/Makefile.haiku 2013-10-30 22:18:49.161480704 +0000
|
||||
@@ -0,0 +1,29 @@
|
||||
+NAME = $(GLEW_NAME)
|
||||
+CC = cc
|
||||
+LD = cc
|
||||
+ifneq (undefined, $(origin GLEW_MX))
|
||||
+ CFLAGS.EXTRA = -DGLEW_MX
|
||||
+endif
|
||||
+
|
||||
+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
|
||||
+LDFLAGS.SO = -shared -Wl,-soname=$(LIB.SONAME)
|
||||
+
|
||||
+LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
|
||||
+LIB.DEVLNK.MX = lib$(NAME)mx.so
|
||||
+LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
|
||||
+LIB.STATIC.MX = lib$(NAME)mx.a
|
||||
+LDFLAGS.SO.MX = -shared -Wl,-soname=$(LIB.SONAME.MX)
|
||||
+
|
||||
diff -Naur glew-1.10.0/src/glew.c glew-1.10.0-haiku/src/glew.c
|
||||
--- glew-1.10.0/src/glew.c 2013-07-22 14:11:22.008912896 +0000
|
||||
+++ glew-1.10.0-haiku/src/glew.c 2013-10-30 23:18:58.931135488 +0000
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
# include <GL/wglew.h>
|
||||
-#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
+#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
# include <GL/glxew.h>
|
||||
#endif
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
# define GLXEW_CONTEXT_ARG_DEF_LIST void
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
-#if defined(__sgi) || defined (__sun) || defined(GLEW_APPLE_GLX)
|
||||
+#if defined(__sgi) || defined (__sun) || defined(GLEW_APPLE_GLX) || defined(__HAIKU__)
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -162,7 +162,7 @@
|
||||
# define glewGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
|
||||
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
|
||||
# define glewGetProcAddress(name) NSGLGetProcAddress(name)
|
||||
-#elif defined(__sgi) || defined(__sun)
|
||||
+#elif defined(__sgi) || defined(__sun) || defined(__HAIKU__)
|
||||
# define glewGetProcAddress(name) dlGetProcAddress(name)
|
||||
#elif defined(__ANDROID__)
|
||||
# define glewGetProcAddress(name) NULL /* TODO */
|
||||
@@ -12324,7 +12324,7 @@
|
||||
return GLEW_OK;
|
||||
}
|
||||
|
||||
-#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
+#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
|
||||
PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay = NULL;
|
||||
|
||||
@@ -13432,7 +13432,7 @@
|
||||
return GLEW_OK;
|
||||
}
|
||||
|
||||
-#endif /* !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */
|
||||
+#endif /* !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
@@ -13472,7 +13472,7 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
extern GLenum GLEWAPIENTRY wglewContextInit (void);
|
||||
-#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
+#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
extern GLenum GLEWAPIENTRY glxewContextInit (void);
|
||||
#endif /* _WIN32 */
|
||||
|
||||
@@ -13483,7 +13483,7 @@
|
||||
if ( r != 0 ) return r;
|
||||
#if defined(_WIN32)
|
||||
return wglewContextInit();
|
||||
-#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */
|
||||
+#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */
|
||||
return glxewContextInit();
|
||||
#else
|
||||
return r;
|
||||
@@ -17616,7 +17616,7 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
||||
+#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
||||
|
||||
#if defined(GLEW_MX)
|
||||
GLboolean glxewContextIsSupported (const GLXEWContext* ctx, const char* name)
|
||||
diff -Naur glew-1.10.0/src/glewinfo.c glew-1.10.0-haiku/src/glewinfo.c
|
||||
--- glew-1.10.0/src/glewinfo.c 2013-07-22 14:11:22.009699328 +0000
|
||||
+++ glew-1.10.0-haiku/src/glewinfo.c 2013-10-30 23:39:14.891551744 +0000
|
||||
@@ -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
|
||||
|
||||
@@ -51,7 +51,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
|
||||
@@ -59,7 +59,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 ();
|
||||
@@ -10613,6 +10613,22 @@
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
+GLboolean glewCreateContext ()
|
||||
+{
|
||||
+ // TODO: Haiku: We need to call C++ code here :-/
|
||||
+ return GL_FALSE;
|
||||
+}
|
||||
+
|
||||
+void glewDestroyContext ()
|
||||
+{
|
||||
+ // TODO: Haiku: We need to call C++ code here :-/
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* ------------------------------------------------------------------------ */
|
||||
+
|
||||
#else /* __UNIX || (__APPLE__ && GLEW_APPLE_GLX) */
|
||||
|
||||
Display* dpy = NULL;
|
||||
diff -Naur glew-1.10.0/src/visualinfo.c glew-1.10.0-haiku/src/visualinfo.c
|
||||
--- glew-1.10.0/src/visualinfo.c 2013-07-22 14:11:22.007340032 +0000
|
||||
+++ glew-1.10.0-haiku/src/visualinfo.c 2013-10-30 21:54:43.389808128 +0000
|
||||
@@ -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
|
||||
@@ -182,6 +182,8 @@
|
||||
}
|
||||
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
|
||||
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
#else
|
||||
/* GLX extensions */
|
||||
fprintf(file, "GLX extensions (GLX_): \n");
|
||||
@@ -598,6 +600,16 @@
|
||||
*/
|
||||
}
|
||||
|
||||
+/* ---------------------------------------------------------------------- */
|
||||
+
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
+void
|
||||
+VisualInfo (GLContext* ctx)
|
||||
+{
|
||||
+ // TODO
|
||||
+}
|
||||
+
|
||||
#else /* GLX */
|
||||
|
||||
void
|
||||
@@ -1074,6 +1086,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)
|
||||
529
media-libs/glew/patches/glew-1.10.0.patchset
Normal file
529
media-libs/glew/patches/glew-1.10.0.patchset
Normal file
@@ -0,0 +1,529 @@
|
||||
From 00fdc98132634a72cf5b3f6b2f1fd3088374c5d8 Mon Sep 17 00:00:00 2001
|
||||
From: Kacper Kasper <kacperkasper@gmail.com>
|
||||
Date: Mon, 7 Apr 2014 07:04:04 +0200
|
||||
Subject: Haiku support
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index e6f08a7..1e57596 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -4,24 +4,24 @@
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002, Lev Povalahev
|
||||
## All rights reserved.
|
||||
-##
|
||||
-## Redistribution and use in source and binary forms, with or without
|
||||
+##
|
||||
+## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions are met:
|
||||
-##
|
||||
-## * Redistributions of source code must retain the above copyright notice,
|
||||
+##
|
||||
+## * Redistributions of source code must retain the above copyright notice,
|
||||
## this list of conditions and the following disclaimer.
|
||||
-## * Redistributions in binary form must reproduce the above copyright notice,
|
||||
-## this list of conditions and the following disclaimer in the documentation
|
||||
+## * Redistributions in binary form must reproduce the above copyright notice,
|
||||
+## this list of conditions and the following disclaimer in the documentation
|
||||
## and/or other materials provided with the distribution.
|
||||
-## * The name of the author may be used to endorse or promote products
|
||||
+## * The name of the author may be used to endorse or promote products
|
||||
## derived from this software without specific prior written permission.
|
||||
##
|
||||
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
-## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
+## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
-## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
-## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
-## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
+## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
+## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
+## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
@@ -179,12 +179,15 @@ glewmx.pc: glew.pc.in
|
||||
|
||||
# GLEW utility programs
|
||||
|
||||
-BIN.LIBS = -Llib $(LDFLAGS.DYNAMIC) -l$(NAME) $(LDFLAGS.EXTRA) $(LDFLAGS.GL)
|
||||
+BIN.LIBS = -Llib $(LDFLAGS.DYNAMIC) -l$(NAME) $(LDFLAGS.EXTRA) $(LDFLAGS.GL) -lbe -lstdc++
|
||||
|
||||
GLEWINFO.BIN := glewinfo$(BIN.SUFFIX)
|
||||
GLEWINFO.BIN.SRC := src/glewinfo.c
|
||||
+GLEWINFO.BIN.HAIKU := src/glewinfo_haiku.cpp
|
||||
GLEWINFO.BIN.OBJ := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(GLEWINFO.BIN.SRC)))
|
||||
GLEWINFO.BIN.OBJ := $(GLEWINFO.BIN.OBJ:.c=.o)
|
||||
+GLEWINFO.BIN.HAIKU_OBJ := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(GLEWINFO.BIN.HAIKU)))
|
||||
+GLEWINFO.BIN.HAIKU_OBJ := $(GLEWINFO.BIN.HAIKU_OBJ:.cpp=.o)
|
||||
|
||||
VISUALINFO.BIN := visualinfo$(BIN.SUFFIX)
|
||||
VISUALINFO.BIN.SRC := src/visualinfo.c
|
||||
@@ -196,14 +199,14 @@ VISUALINFO.BIN.OBJ := $(VISUALINFO.BIN.OBJ:.c=.o)
|
||||
ifneq ($(filter nacl%,$(SYSTEM)),)
|
||||
glew.bin: glew.lib bin
|
||||
else
|
||||
-glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
|
||||
+glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
|
||||
endif
|
||||
|
||||
bin:
|
||||
mkdir bin
|
||||
|
||||
-bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJ) lib/$(LIB.SHARED)
|
||||
- $(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJ) $(BIN.LIBS)
|
||||
+bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJ) $(GLEWINFO.BIN.HAIKU_OBJ) lib/$(LIB.SHARED)
|
||||
+ $(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJ) $(GLEWINFO.BIN.HAIKU_OBJ) $(BIN.LIBS)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) -x $@
|
||||
endif
|
||||
@@ -218,6 +221,10 @@ $(GLEWINFO.BIN.OBJ): $(GLEWINFO.BIN.SRC) include/GL/glew.h include/GL/wglew.h in
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|
||||
|
||||
+$(GLEWINFO.BIN.HAIKU_OBJ): $(GLEWINFO.BIN.HAIKU) include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
||||
+ @mkdir -p $(dir $@)
|
||||
+ $(CXX) -DGLEW_NO_GLU $(CXXFLAGS) $(CXXFLAGS.SO) -o $@ -c $<
|
||||
+
|
||||
$(VISUALINFO.BIN.OBJ): $(VISUALINFO.BIN.SRC) include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
|
||||
@@ -328,7 +335,7 @@ dist-win32:
|
||||
cp -a bin $(DIST_DIR)
|
||||
cp -a lib $(DIST_DIR)
|
||||
$(RM) -f $(DIST_DIR)/bin/*/*/*.pdb $(DIST_DIR)/bin/*/*/*.exp
|
||||
- $(RM) -f $(DIST_DIR)/bin/*/*/glewinfo-*.exe $(DIST_DIR)/bin/*/*/visualinfo-*.exe
|
||||
+ $(RM) -f $(DIST_DIR)/bin/*/*/glewinfo-*.exe $(DIST_DIR)/bin/*/*/visualinfo-*.exe
|
||||
$(RM) -f $(DIST_DIR)/lib/*/*/*.pdb $(DIST_DIR)/lib/*/*/*.exp
|
||||
unix2dos $(DIST_DIR)/include/GL/*.h
|
||||
unix2dos $(DIST_DIR)/doc/*.txt
|
||||
diff --git a/config/Makefile.haiku b/config/Makefile.haiku
|
||||
new file mode 100644
|
||||
index 0000000..57bf3d6
|
||||
--- /dev/null
|
||||
+++ b/config/Makefile.haiku
|
||||
@@ -0,0 +1,30 @@
|
||||
+NAME = $(GLEW_NAME)
|
||||
+CC = cc
|
||||
+CXX = g++
|
||||
+LD = cc
|
||||
+ifneq (undefined, $(origin GLEW_MX))
|
||||
+ CFLAGS.EXTRA = -DGLEW_MX
|
||||
+endif
|
||||
+
|
||||
+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
|
||||
+LDFLAGS.SO = -shared -Wl,-soname=$(LIB.SONAME)
|
||||
+
|
||||
+LIB.SONAME.MX = lib$(NAME)mx.so.$(SO_MAJOR)
|
||||
+LIB.DEVLNK.MX = lib$(NAME)mx.so
|
||||
+LIB.SHARED.MX = lib$(NAME)mx.so.$(SO_VERSION)
|
||||
+LIB.STATIC.MX = lib$(NAME)mx.a
|
||||
+LDFLAGS.SO.MX = -shared -Wl,-soname=$(LIB.SONAME.MX)
|
||||
+
|
||||
diff --git a/src/glew.c b/src/glew.c
|
||||
index d075b52..daff07d 100644
|
||||
--- a/src/glew.c
|
||||
+++ b/src/glew.c
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
# include <GL/wglew.h>
|
||||
-#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
+#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
# include <GL/glxew.h>
|
||||
#endif
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
# define GLXEW_CONTEXT_ARG_DEF_LIST void
|
||||
#endif /* GLEW_MX */
|
||||
|
||||
-#if defined(__sgi) || defined (__sun) || defined(GLEW_APPLE_GLX)
|
||||
+#if defined(__sgi) || defined (__sun) || defined(GLEW_APPLE_GLX) || defined(__HAIKU__)
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -162,7 +162,7 @@ void* NSGLGetProcAddress (const GLubyte *name)
|
||||
# define glewGetProcAddress(name) wglGetProcAddress((LPCSTR)name)
|
||||
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
|
||||
# define glewGetProcAddress(name) NSGLGetProcAddress(name)
|
||||
-#elif defined(__sgi) || defined(__sun)
|
||||
+#elif defined(__sgi) || defined(__sun) || defined(__HAIKU__)
|
||||
# define glewGetProcAddress(name) dlGetProcAddress(name)
|
||||
#elif defined(__ANDROID__)
|
||||
# define glewGetProcAddress(name) NULL /* TODO */
|
||||
@@ -12324,7 +12324,7 @@ GLenum GLEWAPIENTRY wglewContextInit (WGLEW_CONTEXT_ARG_DEF_LIST)
|
||||
return GLEW_OK;
|
||||
}
|
||||
|
||||
-#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
+#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
|
||||
PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay = NULL;
|
||||
|
||||
@@ -13432,7 +13432,7 @@ GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST)
|
||||
return GLEW_OK;
|
||||
}
|
||||
|
||||
-#endif /* !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */
|
||||
+#endif /* !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
@@ -13472,7 +13472,7 @@ GLboolean glewExperimental = GL_FALSE;
|
||||
|
||||
#if defined(_WIN32)
|
||||
extern GLenum GLEWAPIENTRY wglewContextInit (void);
|
||||
-#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
+#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
extern GLenum GLEWAPIENTRY glxewContextInit (void);
|
||||
#endif /* _WIN32 */
|
||||
|
||||
@@ -13483,7 +13483,7 @@ GLenum GLEWAPIENTRY glewInit (void)
|
||||
if ( r != 0 ) return r;
|
||||
#if defined(_WIN32)
|
||||
return wglewContextInit();
|
||||
-#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */
|
||||
+#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */
|
||||
return glxewContextInit();
|
||||
#else
|
||||
return r;
|
||||
@@ -17616,7 +17616,7 @@ GLboolean GLEWAPIENTRY wglewIsSupported (const char* name)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
||||
+#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
||||
|
||||
#if defined(GLEW_MX)
|
||||
GLboolean glxewContextIsSupported (const GLXEWContext* ctx, const char* name)
|
||||
diff --git a/src/glewinfo.c b/src/glewinfo.c
|
||||
index ad44f72..ca065d1 100644
|
||||
--- a/src/glewinfo.c
|
||||
+++ b/src/glewinfo.c
|
||||
@@ -4,24 +4,24 @@
|
||||
** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
** Copyright (C) 2002, Lev Povalahev
|
||||
** All rights reserved.
|
||||
-**
|
||||
-** Redistribution and use in source and binary forms, with or without
|
||||
+**
|
||||
+** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are met:
|
||||
-**
|
||||
-** * Redistributions of source code must retain the above copyright notice,
|
||||
+**
|
||||
+** * Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
-** * Redistributions in binary form must reproduce the above copyright notice,
|
||||
-** this list of conditions and the following disclaimer in the documentation
|
||||
+** * Redistributions in binary form must reproduce the above copyright notice,
|
||||
+** this list of conditions and the following disclaimer in the documentation
|
||||
** and/or other materials provided with the distribution.
|
||||
-** * The name of the author may be used to endorse or promote products
|
||||
+** * The name of the author may be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
-** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
+** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
-** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
-** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
-** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
+** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
+** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
+** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
@@ -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
|
||||
|
||||
@@ -51,7 +51,7 @@ GLEWContext _glewctx;
|
||||
#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
|
||||
@@ -59,7 +59,7 @@ GLXEWContext _glxewctx;
|
||||
|
||||
#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 ();
|
||||
@@ -10468,10 +10468,10 @@ int main (void)
|
||||
#if defined(_WIN32)
|
||||
fprintf(f, "Reporting capabilities of pixelformat %d\n", visual);
|
||||
#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX)
|
||||
- fprintf(f, "Reporting capabilities of display %s, visual 0x%x\n",
|
||||
+ fprintf(f, "Reporting capabilities of display %s, visual 0x%x\n",
|
||||
display == NULL ? getenv("DISPLAY") : display, visual);
|
||||
#endif
|
||||
- fprintf(f, "Running on a %s from %s\n",
|
||||
+ fprintf(f, "Running on a %s from %s\n",
|
||||
glGetString(GL_RENDERER), glGetString(GL_VENDOR));
|
||||
fprintf(f, "OpenGL version %s is supported\n", glGetString(GL_VERSION));
|
||||
glewInfo();
|
||||
@@ -10540,7 +10540,7 @@ GLboolean glewCreateContext (int* pixelformat)
|
||||
wc.lpszClassName = "GLEW";
|
||||
if (0 == RegisterClass(&wc)) return GL_TRUE;
|
||||
/* create window */
|
||||
- wnd = CreateWindow("GLEW", "GLEW", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
+ wnd = CreateWindow("GLEW", "GLEW", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
CW_USEDEFAULT, NULL, NULL, GetModuleHandle(NULL), NULL);
|
||||
if (NULL == wnd) return GL_TRUE;
|
||||
/* get the device context */
|
||||
@@ -10613,6 +10613,13 @@ void glewDestroyContext ()
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
+extern GLboolean glewCreateContext ();
|
||||
+extern void glewDestroyContext ();
|
||||
+
|
||||
+/* ------------------------------------------------------------------------ */
|
||||
+
|
||||
#else /* __UNIX || (__APPLE__ && GLEW_APPLE_GLX) */
|
||||
|
||||
Display* dpy = NULL;
|
||||
@@ -10658,8 +10665,8 @@ GLboolean glewCreateContext (const char* display, int* visual)
|
||||
cmap = XCreateColormap(dpy, RootWindow(dpy, vi->screen), vi->visual, AllocNone);
|
||||
swa.border_pixel = 0;
|
||||
swa.colormap = cmap;
|
||||
- wnd = XCreateWindow(dpy, RootWindow(dpy, vi->screen),
|
||||
- 0, 0, 1, 1, 0, vi->depth, InputOutput, vi->visual,
|
||||
+ wnd = XCreateWindow(dpy, RootWindow(dpy, vi->screen),
|
||||
+ 0, 0, 1, 1, 0, vi->depth, InputOutput, vi->visual,
|
||||
CWBorderPixel | CWColormap, &swa);
|
||||
/* make context current */
|
||||
if (!glXMakeCurrent(dpy, wnd, ctx)) return GL_TRUE;
|
||||
diff --git a/src/glewinfo_haiku.cpp b/src/glewinfo_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..3d32d00
|
||||
--- /dev/null
|
||||
+++ b/src/glewinfo_haiku.cpp
|
||||
@@ -0,0 +1,93 @@
|
||||
+/*
|
||||
+ * glewinfo Haiku glue code
|
||||
+ * Copyright 2013 Kacper Kasper <kacperkasper@gmail.com>
|
||||
+ * All rights reserved. Distributed under the terms of the MIT license.
|
||||
+ */
|
||||
+
|
||||
+#include <Application.h>
|
||||
+#include <Window.h>
|
||||
+#include <GLView.h>
|
||||
+
|
||||
+class GLEWInfoView : public BGLView {
|
||||
+public:
|
||||
+ GLEWInfoView(BRect frame, uint32 type);
|
||||
+ virtual void AttachedToWindow(void);
|
||||
+
|
||||
+ void ContextInit() { LockGL(); }
|
||||
+ void ContextDestroy() { UnlockGL(); }
|
||||
+};
|
||||
+
|
||||
+GLEWInfoView::GLEWInfoView(BRect frame, uint32 type)
|
||||
+ : BGLView(frame, "GLEWInfoView", B_FOLLOW_ALL_SIDES, 0, type)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+void GLEWInfoView::AttachedToWindow(void)
|
||||
+{
|
||||
+ LockGL();
|
||||
+ BGLView::AttachedToWindow();
|
||||
+ UnlockGL();
|
||||
+}
|
||||
+
|
||||
+class GLEWInfoWindow : public BWindow {
|
||||
+public:
|
||||
+ GLEWInfoWindow(BRect frame, uint32 type);
|
||||
+ virtual bool QuitRequested();
|
||||
+
|
||||
+private:
|
||||
+ GLEWInfoView *view;
|
||||
+};
|
||||
+
|
||||
+GLEWInfoWindow::GLEWInfoWindow(BRect frame, uint32 type)
|
||||
+ : BWindow(frame, "GLEWInfoWindow", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE)
|
||||
+{
|
||||
+ AddChild(view = new GLEWInfoView(Bounds(), type));
|
||||
+ view->ContextInit();
|
||||
+}
|
||||
+
|
||||
+bool GLEWInfoWindow::QuitRequested()
|
||||
+{
|
||||
+ view->ContextDestroy();
|
||||
+
|
||||
+ view->RemoveSelf();
|
||||
+
|
||||
+ delete view;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+class GLEWInfoApp : public BApplication
|
||||
+{
|
||||
+public:
|
||||
+ GLEWInfoApp();
|
||||
+ ~GLEWInfoApp();
|
||||
+
|
||||
+private:
|
||||
+ GLEWInfoWindow *window;
|
||||
+};
|
||||
+
|
||||
+GLEWInfoApp::GLEWInfoApp()
|
||||
+ : BApplication("application/x-vnd.glew-GLEWInfo")
|
||||
+{
|
||||
+ BRect rect = BRect(0, 0, 1, 1);
|
||||
+ window = new GLEWInfoWindow(rect, BGL_RGB | BGL_DOUBLE);
|
||||
+}
|
||||
+
|
||||
+GLEWInfoApp::~GLEWInfoApp()
|
||||
+{
|
||||
+ window->Quit();
|
||||
+}
|
||||
+
|
||||
+GLEWInfoApp *app;
|
||||
+
|
||||
+extern "C" GLboolean glewCreateContext ()
|
||||
+{
|
||||
+ app = new GLEWInfoApp();
|
||||
+
|
||||
+ return GL_FALSE;
|
||||
+}
|
||||
+
|
||||
+extern "C" void glewDestroyContext ()
|
||||
+{
|
||||
+ delete app;
|
||||
+}
|
||||
diff --git a/src/visualinfo.c b/src/visualinfo.c
|
||||
index b8bb59e..742fdd6 100644
|
||||
--- a/src/visualinfo.c
|
||||
+++ b/src/visualinfo.c
|
||||
@@ -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 @@ GLEWContext _glewctx;
|
||||
# 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 @@ typedef struct GLContextStruct
|
||||
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 @@ main (int argc, char** argv)
|
||||
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
|
||||
@@ -182,6 +182,8 @@ main (int argc, char** argv)
|
||||
}
|
||||
#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX)
|
||||
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
#else
|
||||
/* GLX extensions */
|
||||
fprintf(file, "GLX extensions (GLX_): \n");
|
||||
@@ -598,6 +600,16 @@ VisualInfo (GLContext* ctx)
|
||||
*/
|
||||
}
|
||||
|
||||
+/* ---------------------------------------------------------------------- */
|
||||
+
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
+void
|
||||
+VisualInfo (GLContext* ctx)
|
||||
+{
|
||||
+ // TODO
|
||||
+}
|
||||
+
|
||||
#else /* GLX */
|
||||
|
||||
void
|
||||
@@ -1074,6 +1086,31 @@ void DestroyContext (GLContext* ctx)
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
+#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)
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user