I just compiled 1.3.21 on OSX using the osxwinebuilder script. It's the first time I try wine on the Mac. I've tried some short OpenGL demos and they work, but others fail. Remarkable ones that fail are wxWidgets OpenGL demos (remarkable because the source is available, so I guess it should be easy to fix). I run OSX 10.6.7. While running the wxWidgets "penguin" demo, the OpenGL view remains blank, and this is printed in the terminal: wine[592] <Error>: unknown error code: invalid drawable wine[592] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged. set off screen: invalid drawable Any hint about the cause for this issue? Any workaround? (the source for wxWidgets is available, but I also have some inhouse apps that fail with this very same problem, and I don't have access to their source). TIA
Rendering to OpenGL 'child windows' (small OpenGL views like in Google Earth) is a tricky operation for Wine. It has to do between differences between X11 and Windows. Anyway, the way this type of GL rendering works is that we render to an 'offscreen window' and we copy the result back to the main window of the application. This 'offscreen window' rendering mechanism uses the X Composite extension and GLX. Not all drivers support this properly (it is essentially the functionality needed to run compiz well). On Linux, the drivers from Nvidia and AMD support it and drivers which support DRI2 (DRI2 is a hard requirement). I don't think it is supported on OSX yet.
It depends on how the program is doing its rendering. If the OpenGL area is a true win32 client area then it is fine, but I doubt that's the case for WxWidgets.
Charles Davis wrote:> On 6/4/11 3:23 PM, asiga wrote: > > > Sat Jun 4 23:12:07 mba-cbu.local wine[613] <Error>: unknown error code: invalid drawable > > Sat Jun 4 23:12:07 mba-cbu.local wine[613] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged. > > set off screen: invalid drawable > > > Looks like it tried to wglMakeCurrent() a bitmap context. For some > reason, bitmap contexts don't work very well under Wine. > > ChipAFAIK it's not a bitmap context, but an OpenGL window... Btw, where is pwglMakeCurrent() initialized? What function does it point to? I'm trying to diagnose the problem, but I'm unable to find the code of the function it points to.
Create a log running with '+wgl'. Though I still think the application triggers our child window rendering code. There are two ways we can do that: - if wine was compiled with X Composite, we create an offscreen X11 window and when a new frame is ready we copy the contents over to the application window through XCopyArea (there is only 1 X11 window, any other win32 windows are not actual X11 windows hence why child window rendering is hard) - if X composite is not available we try to fall back to pixmap rendering (this is single buffered only). The same XCopyArea stuff is used