QT 4.0 (Windows) compatibility patch
Michael Dürig <[email protected]> Tue, 12 Sep 2006 15:49:16 +0200
| Newsgroups | gmane.comp.graphics.chromium.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------040403060005000203030202
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
The attached patch enhances compatibility with QT 4.0 on Windows. QT
implements an abstraction of an OpenGL context in its QGLContext class.
To create a context QGLContext always calls wglCreateLayerContext() even
though a call to wglCreateContext() would do. To account for this I
changed the implementation of wglCreateLayirContext_prox() in
opengl_stub/wgl.c such that it forwards the call to
wglCreateContext_prox() if layerPlane == 0.
Michael
--------------040403060005000203030202
Content-Type: text/plain;
name="cr.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="cr.patch"
Index: opengl_stub/wgl.c
===================================================================
RCS file: /cvsroot/chromium/cr/opengl_stub/wgl.c,v
retrieving revision 1.39
diff -u -r1.39 wgl.c
--- opengl_stub/wgl.c 1 Sep 2006 12:57:59 -0000 1.39
+++ opengl_stub/wgl.c 12 Sep 2006 10:55:31 -0000
@@ -283,9 +284,16 @@
HGLRC WINAPI wglCreateLayerContext_prox( HDC hdc, int layerPlane )
{
+ /* We return a standard context if layerPlane == 0. This enhances compatibility
+ for applications which always call CreateLayerContext() even though a call to
+ CreateContext() will do (i.e. qt 4.0). */
stubInit();
- crWarning( "wglCreateLayerContext: unsupported" );
- return 0;
+ if (layerPlane) {
+ crWarning( "wglCreateLayerContext: unsupported" );
+ return 0;
+ }
+ else
+ return wglCreateContext_prox(hdc);
}
PROC WINAPI wglGetProcAddress_prox( LPCSTR name )
--------------040403060005000203030202
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--------------040403060005000203030202
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
--------------040403060005000203030202--