Patch for windows
Michael Dürig <[email protected]> Fri, 01 Sep 2006 02:34:39 +0200
| Newsgroups | gmane.comp.graphics.chromium.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------080705000207060405010902
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Please find attached a patch with some fixes for the OpenGL stub on windows:
1. The functions wglGetCurrentContext() and wglGetCurrentDC() return
NULL in the current implementation. I changed them to return the proper
GL context and device context respectively.
2. In wglChoosePixelFormat() okayFlags should include
PFD_GENERIC_FORMAT. The flag basically says that there is no hardware
acceleration at all [1], [2].
[1]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_73jm.asp
[2] http://www.microsoft.com/msj/archive/S2085.aspx
Michael
--------------080705000207060405010902
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.38
diff -u -r1.38 wgl.c
--- opengl_stub/wgl.c 28 Apr 2006 22:35:12 -0000 1.38
+++ opengl_stub/wgl.c 31 Aug 2006 23:54:58 -0000
@@ -71,6 +71,7 @@
}
okayFlags = ( PFD_DRAW_TO_WINDOW |
+ PFD_GENERIC_FORMAT |
PFD_SUPPORT_GDI |
PFD_SUPPORT_OPENGL |
PFD_DOUBLEBUFFER |
@@ -171,12 +172,15 @@
HGLRC WINAPI wglGetCurrentContext_prox( void )
{
- return (HGLRC) NULL; /*__wiregl_globals.context; */
+ return (HGLRC) stub.currentContext;
}
HDC WINAPI wglGetCurrentDC_prox( void )
{
- return (HDC) NULL; /*__wiregl_globals.client_hdc; */
+ if (stub.currentContext && stub.currentContext->currentDrawable)
+ return (HDC) stub.currentContext->currentDrawable->drawable;
+ else
+ return (HDC) NULL;
}
int WINAPI wglGetPixelFormat_prox( HDC hdc )
--------------080705000207060405010902
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
--------------080705000207060405010902
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
--------------080705000207060405010902--