Mesa (7.8): apple: Use mesa gl.h rather than generating one.

2010-04-27 Thread Jeremy Huddleston
Module: Mesa
Branch: 7.8
Commit: f5aa5377a52c50c94b6a6d6d48c0057dbe874692
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f5aa5377a52c50c94b6a6d6d48c0057dbe874692

Author: Jeremy Huddleston jerem...@freedesktop.org
Date:   Sat Jan  2 00:03:53 2010 -0500

apple: Use mesa gl.h rather than generating one.

Signed-off-by: Jeremy Huddleston jerem...@freedesktop.org

---

 src/glx/apple/GL_aliases |4 +-
 src/glx/apple/Makefile   |   11 +--
 src/glx/apple/apple_glx_pbuffer.c|1 +
 src/glx/apple/apple_xgl_api_additional.c |   37 +
 src/glx/apple/gen_funcs.tcl  |   13 +--
 src/glx/apple/gen_gl_h.sh|   33 
 src/glx/apple/include/GL/gl.h.template   |  130 --
 7 files changed, 48 insertions(+), 181 deletions(-)

diff --git a/src/glx/apple/GL_aliases b/src/glx/apple/GL_aliases
index a8390d2..8de2238 100644
--- a/src/glx/apple/GL_aliases
+++ b/src/glx/apple/GL_aliases
@@ -5,4 +5,6 @@ alias DeleteTexturesEXT DeleteTextures
 alias GenTexturesEXT GenTextures
 alias IsTextureEXT IsTexture
 alias PrioritizeTexturesEXT PrioritizeTextures
-alias TexImage3DEXT TexImage3D
+
+# Due to type conflicts, we handle this differently
+#alias TexImage3DEXT TexImage3D
diff --git a/src/glx/apple/Makefile b/src/glx/apple/Makefile
index 8fa5b01..279f7ad 100644
--- a/src/glx/apple/Makefile
+++ b/src/glx/apple/Makefile
@@ -31,6 +31,7 @@ SOURCES = \
apple_glx_surface.c \
apple_visual.c \
apple_xgl_api.c \
+   apple_xgl_api_additional.c \
apple_xgl_api_read.c \
apple_xgl_api_stereo.c \
apple_xgl_api_viewport.c \
@@ -71,16 +72,13 @@ INCLUDES = -I. -Iinclude -I..\
 
 # RULES #
 
-$(OBJECTS) : include/GL/gl.h apple_xgl_api.h
+$(OBJECTS) : apple_xgl_api.h
 
 apple_xgl_api.c : apple_xgl_api.h
 
 apple_xgl_api.h : gen_api_header.tcl  gen_api_library.tcl  gen_code.tcl  
gen_defs.tcl  gen_exports.tcl  gen_funcs.tcl  gen_types.tcl
$(TCLSH) gen_code.tcl
 
-include/GL/gl.h: include/GL/gl.h.template gen_gl_h.sh
-   ./gen_gl_h.sh include/GL/gl.h.template $@
-
 .c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $ -o $@
 
@@ -115,10 +113,7 @@ install_headers: include/GL/gl.h
 install_libraries: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
$(MAKE) -C $(TOP)/src/mesa install-libgl
 
-install: install_headers install_libraries
-
-#%.c : ../%.c
-#  ln -s $
+install: install_libraries
 
 # Remove .o and backup files
 clean:
diff --git a/src/glx/apple/apple_glx_pbuffer.c 
b/src/glx/apple/apple_glx_pbuffer.c
index 3dfdc54..fb56b75 100644
--- a/src/glx/apple/apple_glx_pbuffer.c
+++ b/src/glx/apple/apple_glx_pbuffer.c
@@ -30,6 +30,7 @@
 #include stdlib.h
 #include pthread.h
 #include assert.h
+#include GL/glew.h
 #include apple_glx.h
 #include glcontextmodes.h
 #include apple_glx_context.h
diff --git a/src/glx/apple/apple_xgl_api_additional.c 
b/src/glx/apple/apple_xgl_api_additional.c
new file mode 100644
index 000..7d40afe
--- /dev/null
+++ b/src/glx/apple/apple_xgl_api_additional.c
@@ -0,0 +1,37 @@
+/*
+ Copyright (c) 2008, 2009 Apple Inc.
+ 
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the Software), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT.  IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+ 
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software without
+ prior written authorization.
+*/
+
+#define GL_GLEXT_PROTOTYPES
+#include GL/gl.h
+
+GLAPI void APIENTRY glTexImage3DEXT(GLenum target, GLint level, GLenum 
internalformat, GLsizei width, GLsizei height, GLsizei
+ depth, GLint border, GLenum format, GLenum type, const void * pixels) {
+ glTexImage3D(target, level, (GLint)internalformat, width, height, 
depth, border, format, type, pixels);
+}
+
diff --git a/src/glx/apple/gen_funcs.tcl b/src/glx/apple/gen_funcs.tcl
index ff314dc..e78eb32 100644
--- a/src/glx/apple/gen_funcs.tcl
+++ b/src/glx/apple/gen_funcs.tcl
@@ 

Mesa (7.8): apple: Use mesa gl.h rather than generating one.

2010-04-01 Thread Jeremy Huddleston
Module: Mesa
Branch: 7.8
Commit: 69ea4e7718efb60b6b0d795a355cebd6712ceac1
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=69ea4e7718efb60b6b0d795a355cebd6712ceac1

Author: Jeremy Huddleston jerem...@freedesktop.org
Date:   Sat Jan  2 00:03:53 2010 -0500

apple: Use mesa gl.h rather than generating one.

Signed-off-by: Jeremy Huddleston jerem...@freedesktop.org

---

 src/glx/apple/GL_aliases |4 +-
 src/glx/apple/Makefile   |   11 +--
 src/glx/apple/apple_glx_pbuffer.c|1 +
 src/glx/apple/apple_xgl_api_additional.c |   37 +
 src/glx/apple/gen_funcs.tcl  |   13 +--
 src/glx/apple/gen_gl_h.sh|   33 
 src/glx/apple/include/GL/gl.h.template   |  130 --
 7 files changed, 48 insertions(+), 181 deletions(-)

diff --git a/src/glx/apple/GL_aliases b/src/glx/apple/GL_aliases
index a8390d2..8de2238 100644
--- a/src/glx/apple/GL_aliases
+++ b/src/glx/apple/GL_aliases
@@ -5,4 +5,6 @@ alias DeleteTexturesEXT DeleteTextures
 alias GenTexturesEXT GenTextures
 alias IsTextureEXT IsTexture
 alias PrioritizeTexturesEXT PrioritizeTextures
-alias TexImage3DEXT TexImage3D
+
+# Due to type conflicts, we handle this differently
+#alias TexImage3DEXT TexImage3D
diff --git a/src/glx/apple/Makefile b/src/glx/apple/Makefile
index 8fa5b01..279f7ad 100644
--- a/src/glx/apple/Makefile
+++ b/src/glx/apple/Makefile
@@ -31,6 +31,7 @@ SOURCES = \
apple_glx_surface.c \
apple_visual.c \
apple_xgl_api.c \
+   apple_xgl_api_additional.c \
apple_xgl_api_read.c \
apple_xgl_api_stereo.c \
apple_xgl_api_viewport.c \
@@ -71,16 +72,13 @@ INCLUDES = -I. -Iinclude -I..\
 
 # RULES #
 
-$(OBJECTS) : include/GL/gl.h apple_xgl_api.h
+$(OBJECTS) : apple_xgl_api.h
 
 apple_xgl_api.c : apple_xgl_api.h
 
 apple_xgl_api.h : gen_api_header.tcl  gen_api_library.tcl  gen_code.tcl  
gen_defs.tcl  gen_exports.tcl  gen_funcs.tcl  gen_types.tcl
$(TCLSH) gen_code.tcl
 
-include/GL/gl.h: include/GL/gl.h.template gen_gl_h.sh
-   ./gen_gl_h.sh include/GL/gl.h.template $@
-
 .c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $ -o $@
 
@@ -115,10 +113,7 @@ install_headers: include/GL/gl.h
 install_libraries: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
$(MAKE) -C $(TOP)/src/mesa install-libgl
 
-install: install_headers install_libraries
-
-#%.c : ../%.c
-#  ln -s $
+install: install_libraries
 
 # Remove .o and backup files
 clean:
diff --git a/src/glx/apple/apple_glx_pbuffer.c 
b/src/glx/apple/apple_glx_pbuffer.c
index 3dfdc54..fb56b75 100644
--- a/src/glx/apple/apple_glx_pbuffer.c
+++ b/src/glx/apple/apple_glx_pbuffer.c
@@ -30,6 +30,7 @@
 #include stdlib.h
 #include pthread.h
 #include assert.h
+#include GL/glew.h
 #include apple_glx.h
 #include glcontextmodes.h
 #include apple_glx_context.h
diff --git a/src/glx/apple/apple_xgl_api_additional.c 
b/src/glx/apple/apple_xgl_api_additional.c
new file mode 100644
index 000..7d40afe
--- /dev/null
+++ b/src/glx/apple/apple_xgl_api_additional.c
@@ -0,0 +1,37 @@
+/*
+ Copyright (c) 2008, 2009 Apple Inc.
+ 
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation files
+ (the Software), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge,
+ publish, distribute, sublicense, and/or sell copies of the Software,
+ and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT.  IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+ 
+ Except as contained in this notice, the name(s) of the above
+ copyright holders shall not be used in advertising or otherwise to
+ promote the sale, use or other dealings in this Software without
+ prior written authorization.
+*/
+
+#define GL_GLEXT_PROTOTYPES
+#include GL/gl.h
+
+GLAPI void APIENTRY glTexImage3DEXT(GLenum target, GLint level, GLenum 
internalformat, GLsizei width, GLsizei height, GLsizei
+ depth, GLint border, GLenum format, GLenum type, const void * pixels) {
+ glTexImage3D(target, level, (GLint)internalformat, width, height, 
depth, border, format, type, pixels);
+}
+
diff --git a/src/glx/apple/gen_funcs.tcl b/src/glx/apple/gen_funcs.tcl
index ff314dc..e78eb32 100644
--- a/src/glx/apple/gen_funcs.tcl
+++ b/src/glx/apple/gen_funcs.tcl
@@