[Xquartz-changes] [312] AppleSGLX/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 16 14:23:36 PDT 2009


Revision: 312
          http://trac.macosforge.org/projects/xquartz/changeset/312
Author:   jeremyhu at freedesktop.org
Date:     2009-03-16 14:23:36 -0700 (Mon, 16 Mar 2009)
Log Message:
-----------
Generate some #defines for the prototype typedefs, so our gl.h is closer to the Mesa API.

Modified Paths:
--------------
    AppleSGLX/trunk/Makefile

Added Paths:
-----------
    AppleSGLX/trunk/gen_gl_h.sh
    AppleSGLX/trunk/include/GL/gl.h.footer
    AppleSGLX/trunk/include/GL/gl.h.header

Removed Paths:
-------------
    AppleSGLX/trunk/include/GL/gl.h

Modified: AppleSGLX/trunk/Makefile
===================================================================
--- AppleSGLX/trunk/Makefile	2009-03-15 20:17:33 UTC (rev 311)
+++ AppleSGLX/trunk/Makefile	2009-03-16 21:23:36 UTC (rev 312)
@@ -48,39 +48,42 @@
 .c.o:
 	$(COMPILE) $<
 
-apple_glx_drawable.o: apple_glx_drawable.h apple_glx_drawable.c
-apple_xgl_api.o: apple_xgl_api.h apple_xgl_api.c apple_xgl_api_stereo.c
-apple_xgl_api_read.o: apple_xgl_api_read.h apple_xgl_api_read.c apple_xgl_api.h
-apple_xgl_api_viewport.o: apple_xgl_api_viewport.h apple_xgl_api_viewport.c apple_xgl_api.h
-glcontextmodes.o: glcontextmodes.c glcontextmodes.h
-glxext.o: glxext.c
-glxreply.o: glxreply.c
-glxcmds.o: glxcmds.c apple_glx_context.h
-glx_pbuffer.o: glx_pbuffer.c
-glx_error.o: glx_error.c
-glx_query.o: glx_query.c
-glxcurrent.o: glxcurrent.c
-glxextensions.o: glxextensions.h glxextensions.c
-glxhash.o: glxhash.h glxhash.c
-appledri.o: appledri.h appledristr.h appledri.c
-apple_glx_context.o: apple_glx_context.c apple_glx_context.h apple_glx_context.h
-apple_glx.o: apple_glx.h apple_glx.c apple_xgl_api.h
-apple_visual.o: apple_visual.h apple_visual.c
-apple_cgl.o: apple_cgl.h apple_cgl.c
-apple_glx_pbuffer.o: apple_glx_drawable.h apple_glx_pbuffer.c
-apple_glx_pixmap.o: apple_glx_drawable.h apple_glx_pixmap.c appledri.h
-apple_glx_surface.o: apple_glx_drawable.h apple_glx_surface.c appledri.h
-xfont.o: xfont.c glxclient.h
-compsize.o: compsize.c
-renderpix.o: renderpix.c
-singlepix.o: singlepix.c
-pixel.o: pixel.c
-glx_empty.o: glx_empty.c
+apple_glx_drawable.o: apple_glx_drawable.h apple_glx_drawable.c include/GL/gl.h
+apple_xgl_api.o: apple_xgl_api.h apple_xgl_api.c apple_xgl_api_stereo.c include/GL/gl.h
+apple_xgl_api_read.o: apple_xgl_api_read.h apple_xgl_api_read.c apple_xgl_api.h include/GL/gl.h
+apple_xgl_api_viewport.o: apple_xgl_api_viewport.h apple_xgl_api_viewport.c apple_xgl_api.h include/GL/gl.h
+glcontextmodes.o: glcontextmodes.c glcontextmodes.h include/GL/gl.h
+glxext.o: glxext.c include/GL/gl.h
+glxreply.o: glxreply.c include/GL/gl.h
+glxcmds.o: glxcmds.c apple_glx_context.h include/GL/gl.h
+glx_pbuffer.o: glx_pbuffer.c include/GL/gl.h
+glx_error.o: glx_error.c include/GL/gl.h
+glx_query.o: glx_query.c include/GL/gl.h
+glxcurrent.o: glxcurrent.c include/GL/gl.h
+glxextensions.o: glxextensions.h glxextensions.c include/GL/gl.h
+glxhash.o: glxhash.h glxhash.c include/GL/gl.h
+appledri.o: appledri.h appledristr.h appledri.c include/GL/gl.h
+apple_glx_context.o: apple_glx_context.c apple_glx_context.h apple_glx_context.h include/GL/gl.h
+apple_glx.o: apple_glx.h apple_glx.c apple_xgl_api.h include/GL/gl.h
+apple_visual.o: apple_visual.h apple_visual.c include/GL/gl.h
+apple_cgl.o: apple_cgl.h apple_cgl.c include/GL/gl.h
+apple_glx_pbuffer.o: apple_glx_drawable.h apple_glx_pbuffer.c include/GL/gl.h
+apple_glx_pixmap.o: apple_glx_drawable.h apple_glx_pixmap.c appledri.h include/GL/gl.h
+apple_glx_surface.o: apple_glx_drawable.h apple_glx_surface.c appledri.h include/GL/gl.h
+xfont.o: xfont.c glxclient.h include/GL/gl.h
+compsize.o: compsize.c include/GL/gl.h
+renderpix.o: renderpix.c include/GL/gl.h
+singlepix.o: singlepix.c include/GL/gl.h
+pixel.o: pixel.c include/GL/gl.h
+glx_empty.o: glx_empty.c include/GL/gl.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.header include/GL/gl.h.footer
+	./gen_gl_h.sh
+
 $(BUILD_DIR)/glxinfo: tests/glxinfo/glxinfo.c $(BUILD_DIR)/libGL.1.2.dylib
 	$(CC) tests/glxinfo/glxinfo.c $(INCLUDE) -L$(X11_DIR)/lib -lX11 $(BUILD_DIR)/libGL.1.2.dylib -o $@
 
@@ -112,3 +115,4 @@
 	rm -f *.c~ *.h~
 	rm -f apple_xgl_api.h apple_xgl_api.c
 	rm -f *.dylib
+	rm -f include/GL/gl.h

Added: AppleSGLX/trunk/gen_gl_h.sh
===================================================================
--- AppleSGLX/trunk/gen_gl_h.sh	                        (rev 0)
+++ AppleSGLX/trunk/gen_gl_h.sh	2009-03-16 21:23:36 UTC (rev 312)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+{
+  cat include/GL/gl.h.header 
+  grep gl.*ProcPtr /System/Library/Frameworks/OpenGL.framework/Headers/gl{,ext}.h | sed 's:^.*\(gl.*Ptr\).*$:\1:' | sort -u | perl -ne 'chomp($_); $s = "PFN".uc($_); $s =~ s/PROCPTR/PROC/; print "#define ".$_." ".$s."\n"'
+  cat include/GL/gl.h.footer
+} > include/GL/gl.h


Property changes on: AppleSGLX/trunk/gen_gl_h.sh
___________________________________________________________________
Added: svn:executable
   + *

Deleted: AppleSGLX/trunk/include/GL/gl.h
===================================================================
--- AppleSGLX/trunk/include/GL/gl.h	2009-03-15 20:17:33 UTC (rev 311)
+++ AppleSGLX/trunk/include/GL/gl.h	2009-03-16 21:23:36 UTC (rev 312)
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
- * Copyright (C) 2009 Apple Inc.  All Rights Reserved.
- *
- * 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
- * BRIAN PAUL 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.
- */
-
-#ifndef __X_GL_H
-#define __X_GL_H
-
-#ifdef GL_GLEXT_LEGACY 
-/* The user has requested the exclusion of glext.h. */
-#include "/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"
-#else
-#define GL_GLEXT_LEGACY 1
-#include "/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"
-#undef GL_GLEXT_LEGACY
-/* Our glext.h is based on a version from the registry that is newer. */
-#include <GL/glext.h>
-#endif
-
-/* 
- * This is needed for building apple_glx_pbuffer.c, the latest
- * glext.h from the registry lacks it, so it's from the Leopard glext.h: 
- */
-#ifndef GL_TEXTURE_RECTANGLE_EXT
-#define GL_TEXTURE_RECTANGLE_EXT          0x84F5
-#endif
-
-/* This is needed for building the X server: */
-/*
- * GL_MESA_packed_depth_stencil
- */
-#ifndef GL_MESA_packed_depth_stencil
-#define GL_MESA_packed_depth_stencil 1
-
-#define GL_DEPTH_STENCIL_MESA                   0x8750
-#define GL_UNSIGNED_INT_24_8_MESA               0x8751
-#define GL_UNSIGNED_INT_8_24_REV_MESA           0x8752
-#define GL_UNSIGNED_SHORT_15_1_MESA             0x8753
-#define GL_UNSIGNED_SHORT_1_15_REV_MESA         0x8754
-
-#endif /* GL_MESA_packed_depth_stencil */
-
-/* Various other OS projects expect to get these macros from Mesa's gl.h */
-#ifndef GLAPI
-#define GLAPI extern
-#endif
-
-#ifndef GLAPIENTRY
-#define GLAPIENTRY
-#endif
-
-#ifndef APIENTRY
-#define APIENTRY GLAPIENTRY
-#endif
-
-/* "P" suffix to be used for a pointer to a function */
-#ifndef APIENTRYP
-#define APIENTRYP APIENTRY *
-#endif
-
-#ifndef GLAPIENTRYP
-#define GLAPIENTRYP GLAPIENTRY *
-#endif
-
-#endif /*__X_GL_H*/

Copied: AppleSGLX/trunk/include/GL/gl.h.footer (from rev 311, AppleSGLX/trunk/include/GL/gl.h)
===================================================================
--- AppleSGLX/trunk/include/GL/gl.h.footer	                        (rev 0)
+++ AppleSGLX/trunk/include/GL/gl.h.footer	2009-03-16 21:23:36 UTC (rev 312)
@@ -0,0 +1,58 @@
+
+#ifdef GL_GLEXT_LEGACY 
+/* The user has requested the exclusion of glext.h. */
+#include "/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"
+#else
+#define GL_GLEXT_LEGACY 1
+#include "/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"
+#undef GL_GLEXT_LEGACY
+/* Our glext.h is based on a version from the registry that is newer. */
+#include <GL/glext.h>
+#endif
+
+/* 
+ * This is needed for building apple_glx_pbuffer.c, the latest
+ * glext.h from the registry lacks it, so it's from the Leopard glext.h: 
+ */
+#ifndef GL_TEXTURE_RECTANGLE_EXT
+#define GL_TEXTURE_RECTANGLE_EXT          0x84F5
+#endif
+
+/* This is needed for building the X server: */
+/*
+ * GL_MESA_packed_depth_stencil
+ */
+#ifndef GL_MESA_packed_depth_stencil
+#define GL_MESA_packed_depth_stencil 1
+
+#define GL_DEPTH_STENCIL_MESA                   0x8750
+#define GL_UNSIGNED_INT_24_8_MESA               0x8751
+#define GL_UNSIGNED_INT_8_24_REV_MESA           0x8752
+#define GL_UNSIGNED_SHORT_15_1_MESA             0x8753
+#define GL_UNSIGNED_SHORT_1_15_REV_MESA         0x8754
+
+#endif /* GL_MESA_packed_depth_stencil */
+
+/* Various other OS projects expect to get these macros from Mesa's gl.h */
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY GLAPIENTRY
+#endif
+
+/* "P" suffix to be used for a pointer to a function */
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+
+#ifndef GLAPIENTRYP
+#define GLAPIENTRYP GLAPIENTRY *
+#endif
+
+#endif /*__X_GL_H*/

Copied: AppleSGLX/trunk/include/GL/gl.h.header (from rev 311, AppleSGLX/trunk/include/GL/gl.h)
===================================================================
--- AppleSGLX/trunk/include/GL/gl.h.header	                        (rev 0)
+++ AppleSGLX/trunk/include/GL/gl.h.header	2009-03-16 21:23:36 UTC (rev 312)
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ * Copyright (C) 2009 Apple Inc.  All Rights Reserved.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+#ifndef __X_GL_H
+#define __X_GL_H
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090316/dbc3d3d9/attachment-0001.html>


More information about the Xquartz-changes mailing list