OpenGL windowing and wglMakeCurrent

Marcus Meissner meissner at suse.de
Thu Aug 25 04:44:21 CDT 2005


On Wed, Aug 24, 2005 at 02:40:48PM -0700, Russ wrote:
> Trying to get my 3-D app to run under WINE using the same binary with the odd
> workaround or two. It uses OpenGL in various subwindows of the main window as
> needed. Under WINE, the subwindow graphics all get drawn in the lower left
> corner of the overall X11 window, and the entire X11 window's redraw is
> mangled---OpenGL is affecting the entire X11 Window. 
> 
> In Win32, when you call wglMakeCurrent, the opengl context is configured to
> match the size/position of the HWND for the HDC, even if it is only a small
> child window, so drawing openGL goes just into the desired subwindow. However,
> the WINE implementation of wglMakeCurrent just calls glXMakeCurrent (and
> glXCreateContext), which produces the entire size of the X11 window, resulting
> in the incorrect behavior observed. 
> 
> In my Mac OS X port, I have a similar issue, resolved by calling
> aglSetInteger(glContext, AGL_BUFFER_RECT,... I'm not sure what a glX equivalent
> would be to try. It is possible that glScissor might be used. A more accurate
> wglMakeCurrent emulation is necessary for a usable port. Suggestions welcome. 

No need to repeat it ... I have seen the same, but no ideas. ;)

Ciao, Marcus



More information about the wine-devel mailing list