chromium and glx
IOhannes m zmoelnig <[email protected]> Mon, 10 Mar 2008 16:26:01 +0100
| Newsgroups | gmane.comp.graphics.chromium.devel |
|---|---|
| Organization | Institute of Electronic Music and Acoustics, Graz |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------010001070701070907090406
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
as shown on the chromium-users list, i had some "problems" with chromium
not exposing glx-functions properly (well, it's not exposing them at
all) via the crGetProcAddress() which gives me weird errors when using glew.
i decided to just add these functions to chromium myself.
since there is no "patches-tracker" at the sourceforge project page, i
guess i post my changes to this list.
according to alan, i put all the changes directly into getprocaddress.py
(i also tried to put it into glapi_parser/APIspec_glx.txt (following the
APIspec.txt scheme) but since i found now way to reset
apiutil.GetAllFunctions() i went the easy route...)
i don't know whether this is a good idea to do at all, but at least my
error goes away :-)
gfmasd.r
IOhannes
--------------010001070701070907090406
Content-Type: text/plain;
name="chromium_glx.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="chromium_glx.diff"
Index: include/cr_version.h
===================================================================
RCS file: /cvsroot/chromium/cr/include/cr_version.h,v
retrieving revision 1.26
diff -u -r1.26 cr_version.h
--- include/cr_version.h 1 May 2006 14:40:00 -0000 1.26
+++ include/cr_version.h 10 Mar 2008 14:53:47 -0000
@@ -104,4 +104,12 @@
#define CR_SGIS_texture_edge_clamp 1
#define CR_SGIS_generate_mipmap 1
+#ifdef GLX
+# define CR_GLX_VERSION_1_0 1
+# define CR_GLX_VERSION_1_1 1
+# define CR_GLX_VERSION_1_2 1
+# define CR_GLX_VERSION_1_3 1
+# define CR_GLX_VERSION_1_4 1
+#endif /* GLX */
+
#endif /* CR_VERSION_H */
Index: opengl_stub/getprocaddress.py
===================================================================
RCS file: /cvsroot/chromium/cr/opengl_stub/getprocaddress.py,v
retrieving revision 1.29
diff -u -r1.29 getprocaddress.py
--- opengl_stub/getprocaddress.py 29 Sep 2006 22:41:08 -0000 1.29
+++ opengl_stub/getprocaddress.py 10 Mar 2008 14:53:47 -0000
@@ -55,6 +55,65 @@
if apiutil.Category(func_name) == "Chromium":
print '\t{ "cr%s", (CR_PROC) cr%s },' % (func_name, func_name)
+print """
+\t/* GLX functions */
+#ifdef CR_GLX_VERSION_1_0
+\t/* GLX 1.0 */
+\t{ "glXChooseVisual", (CR_PROC) glXChooseVisual },
+\t{ "glXCopyContext", (CR_PROC) glXCopyContext },
+\t{ "glXCreateContext", (CR_PROC) glXCreateContext },
+\t{ "glXCreateGLXPixmap", (CR_PROC) glXCreateGLXPixmap },
+\t{ "glXDestroyContext", (CR_PROC) glXDestroyContext },
+\t{ "glXDestroyGLXPixmap", (CR_PROC) glXDestroyGLXPixmap },
+\t{ "glXGetConfig", (CR_PROC) glXGetConfig },
+\t{ "glXGetCurrentContext", (CR_PROC) glXGetCurrentContext },
+\t{ "glXGetCurrentDrawable", (CR_PROC) glXGetCurrentDrawable },
+\t{ "glXIsDirect", (CR_PROC) glXIsDirect },
+\t{ "glXMakeCurrent", (CR_PROC) glXMakeCurrent },
+\t{ "glXQueryExtension", (CR_PROC) glXQueryExtension },
+\t{ "glXQueryVersion", (CR_PROC) glXQueryVersion },
+\t{ "glXSwapBuffers", (CR_PROC) glXSwapBuffers },
+\t{ "glXUseXFont", (CR_PROC) glXUseXFont },
+\t{ "glXWaitGL", (CR_PROC) glXWaitGL },
+\t{ "glXWaitX", (CR_PROC) glXWaitX },
+#endif
+#ifdef CR_GLX_VERSION_1_1
+\t/* GLX 1.1 */
+\t{ "glXGetClientString", (CR_PROC) glXGetClientString },
+\t{ "glXQueryServerString", (CR_PROC) glXQueryServerString },
+\t{ "glXQueryExtensionsString", (CR_PROC) glXQueryExtensionsString },
+#endif
+#ifdef CR_GLX_VERSION_1_2
+\t/* GLX 1.2 */
+\t{ "glXGetCurrentDisplay", (CR_PROC) glXGetCurrentDisplay },
+#endif
+#ifdef CR_GLX_VERSION_1_3
+\t/* GLX 1.3 */
+\t{ "glXChooseFBConfig", (CR_PROC) glXChooseFBConfig },
+\t{ "glXCreateNewContext", (CR_PROC) glXCreateNewContext },
+\t{ "glXCreatePbuffer", (CR_PROC) glXCreatePbuffer },
+\t{ "glXCreatePixmap", (CR_PROC) glXCreatePixmap },
+\t{ "glXCreateWindow", (CR_PROC) glXCreateWindow },
+\t{ "glXDestroyPbuffer", (CR_PROC) glXDestroyPbuffer },
+\t{ "glXDestroyPixmap", (CR_PROC) glXDestroyPixmap },
+\t{ "glXDestroyWindow", (CR_PROC) glXDestroyWindow },
+\t{ "glXGetCurrentReadDrawable", (CR_PROC) glXGetCurrentReadDrawable },
+\t{ "glXGetFBConfigAttrib", (CR_PROC) glXGetFBConfigAttrib },
+\t{ "glXGetFBConfigs", (CR_PROC) glXGetFBConfigs },
+\t{ "glXGetSelectedEvent", (CR_PROC) glXGetSelectedEvent },
+\t{ "glXGetVisualFromFBConfig", (CR_PROC) glXGetVisualFromFBConfig },
+\t{ "glXMakeContextCurrent", (CR_PROC) glXMakeContextCurrent },
+\t{ "glXQueryContext", (CR_PROC) glXQueryContext },
+\t{ "glXQueryDrawable", (CR_PROC) glXQueryDrawable },
+\t{ "glXSelectEvent", (CR_PROC) glXSelectEvent },
+#endif
+#ifdef CR_GLX_VERSION_1_4
+\t/* GLX 1.4 */
+\t/* nothing */
+#endif
+"""
+
+
print """
{ NULL, NULL }
--------------010001070701070907090406
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--------------010001070701070907090406
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Chromium-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chromium-dev
--------------010001070701070907090406--