Hi, few months ago I started a thread about running PWGL under wine. PWGL is a " free cross-platform visual language based on Common Lisp, CLOS and OpenGL, specialized in computer aided composition and sound synthesis. " http://www2.siba.fi/PWGL/index.html However, because I had to use winetricks to install Microsoft Visual C++ 2005 (it's needed by PWGL), and the many errors that I got running PWGL, I stopped investigating further. However, today I installed wine 1.1.8 under Ubuntu 8.04 and the situation looks promising: I could install Visual C++ Redistributable without winetricks, and PWGL runs much better (with almost no error messages). In fact everything seems to work, the program loads correctly, but the screen looks still completely broken (black with few random colored lines). Anyway, the mouse react correctly to the objects (even if I cannot see them), and, exporting the screen to EPS (from the software), I can see that PWGL works. Saving the terminal output to a log.txt file, shows only 2 errors related to wine: fixme:reg:GetNativeSystemInfo (0x5422c8) using GetSystemInfo() ... (here lots of pwgl loading infos) err:wgl:X11DRV_wglShareLists Could not share display lists, context already created ! I also ran WINEDEBUG=+relay,+seh,+tid wine PWGL-1-0b.exe &> /tmp/output.txt as suggested in the FAQ, should I attach it to this mailing list? It would be really nice to have this app working under linux, I made today a submission for this application in the AppDB, and asked to be a maintainer. Unfortunately I'm not a programmer so I cannot help providing any code, but I can test and provide reports. Thanks for your attention, Best regards, Libero Mureddu -- View this message in context: http://www.nabble.com/PWGL%2C-some-improvements-tp20540662p20540662.html Sent from the Wine - Users mailing list archive at Nabble.com.
Hi, this sounds very much like the same bug like in for example GameTap. Could you try if the patch at http://www.winehq.org/pipermail/wine-patches/2008-October/062880.html works? If I remember correctly it worked OK for GameTap, maybe you might be lucky as well ;)
Sorry, this was the patch that made gametap work, rediffed against curretn git: diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index b4845ad..06c20ea 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1863,27 +1863,35 @@ BOOL X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) { if (!has_opengl()) return FALSE; if (NULL != dest && dest->ctx != NULL) { - ERR("Could not share display lists, context already created !\n"); - return FALSE; - } else { - if (org->ctx == NULL) { - int indirect = (GetObjectType(org->hdc) == OBJ_MEMDC); - wine_tsx11_lock(); - describeContext(org); + WARN("Destination context already created, destroying it\n"); + pglXDestroyContext(gdi_display, dest->ctx); + dest->ctx = NULL; + } + if (org->ctx == NULL) { + int indirect = (GetObjectType(org->hdc) == OBJ_MEMDC); + wine_tsx11_lock(); + describeContext(org); + + if(org->vis) + org->ctx = pglXCreateContext(gdi_display, org->vis, NULL, !indirect); + else /* Create a GLX Context for a pbuffer */ + org->ctx = pglXCreateNewContext(gdi_display, org->fmt->fbconfig, org->fmt->render_type, NULL, True); + wine_tsx11_unlock(); + TRACE(" created a delayed OpenGL context (%p) for Wine context %p\n", org->ctx, org); + } + if (NULL != dest) { + int indirect = (GetObjectType(dest->hdc) == OBJ_MEMDC); + wine_tsx11_lock(); + describeContext(dest); + /* Create the destination context with display lists shared */ + if(dest->vis) + dest->ctx = pglXCreateContext(gdi_display, dest->vis, org->ctx, !indirect); + else /* Create a GLX Context for a pbuffer */ + dest->ctx = pglXCreateNewContext(gdi_display, dest->fmt->fbconfig, dest->fmt->render_type, org->ctx, True); + wine_tsx11_unlock(); + TRACE(" created a delayed OpenGL context (%p) for Wine context %p sharing lists with OpenGL ctx %p\n", dest->ctx, dest, org->ctx); + return TRUE; - org->ctx = create_glxcontext(gdi_display, org, NULL, !indirect); - wine_tsx11_unlock(); - TRACE(" created a delayed OpenGL context (%p) for Wine context %p\n", org->ctx, org); - } - if (NULL != dest) { - int indirect = (GetObjectType(dest->hdc) == OBJ_MEMDC); - wine_tsx11_lock(); - describeContext(dest); - dest->ctx = create_glxcontext(gdi_display, dest, org->ctx, !indirect); - wine_tsx11_unlock(); - TRACE(" created a delayed OpenGL context (%p) for Wine context %p sharing lists with OpenGL ctx %p\n", dest->ctx, dest, org->ctx); - return TRUE; - } } return FALSE; } [/code]
Could you attach a screenshot of the problem? Note that patch is very hacky and is very likely not to work for you. The problem is that on Linux and Windows there is a slight difference in GLX and WGL on how to set up OpenGL. When an app wants to use OpenGL it needs to create a so called 'opengl context'. In its most simple form you use one context for each window (though they can be shared if the pixel formats are the same). Most of the time you want to share resources (e.g. textures) between contexts and for that purpose you use 'wglShareLists' on Windows. In case of GLX sharing 'display lists' between context needs to be done at context creation time. So Windows does: ctx1 = wglCreateContext(..) ctx2 = wglCreateContext(..) wglShareLists(ctx1, ctx2) On Linux you do: ctx1 = glxCreateContext(NULL) ctx2 = glXCreateContext(ctx1) In order to emulate wglShareLists we don't directly create a GLX context when wglCreateContext is called but delay this until it is used or when wglShareLists is called. This makes most apps happy but if a program uses a bad 'pattern' it can cause drawing issues in programs. Assuming your issue is opengl related, the program is likely using a bad pattern.
Let me guess you are using a non-Nvidia driver? The program uses child window opengl rendering and for that we use X features which are not all implemented properly by all drivers yet. When intel/ati drivers move to DRI2 they should also work fine.
It would be nice if the PWGL guys rewrite their code to behave properly as this code is very dangerous. I expect they are doing: src = wglCreateContext(..) dest = wglCreateContext(..) wglMakeCurrent(dest) do_some_gl_rendering wglShareLists(src, dest) A requirement for the call is that you didn't do anything with the destination context before calling wglShareLists. If they would swap around the parameters in the call it would work fine or even better directly call share lists after creating the contexts.
Hi, I've got the same problem here. I've been talking with Libero by mail, and we've got the same problem. My video card is also intel: Mobile Intel Graphic Media Accelerator X3100 (GMA X3100). Saw the screenshots: my screen looks almost the same. I've tried Wine 0.9.5 untill 1.1.9 versions, with Directx, then with Directx and winetricks, trying to do the same configuration required by some powerful games, but nothing really changed... Now I'm using a Ubuntu 8.04, but before I was in a 7.10 version. Last time I've tried this: http://howto.landure.fr/gnu-linux/install-directx-9-0c-on-linux-using-wine I also saw this, but didn't tried (don't feel this is the problem, but..): http://wiki.winehq.org/UsefulRegistryKeys []s Alexandre Ficagna Libero Mureddu wrote:> > Hi, > few months ago I started a thread about running PWGL under wine. PWGL is a > " free cross-platform visual language based on Common Lisp, CLOS and > OpenGL, specialized in computer aided composition and sound synthesis. " > http://www2.siba.fi/PWGL/index.html > However, because I had to use winetricks to install Microsoft Visual C++ > 2005 (it's needed by PWGL), and the many errors that I got running PWGL, I > stopped investigating further. > > However, today I installed wine 1.1.8 under Ubuntu 8.04 and the situation > looks promising: I could install Visual C++ Redistributable without > winetricks, and PWGL runs much better (with almost no error messages). > In fact everything seems to work, the program loads correctly, but the > screen looks still completely broken (black with few random colored > lines). Anyway, the mouse react correctly to the objects (even if I cannot > see them), and, exporting the screen to EPS (from the software), I can see > that PWGL works. > > Saving the terminal output to a log.txt file, shows only 2 errors related > to wine: > fixme:reg:GetNativeSystemInfo (0x5422c8) using GetSystemInfo() > ... (here lots of pwgl loading infos) > err:wgl:X11DRV_wglShareLists Could not share display lists, context > already created ! > > I also ran WINEDEBUG=+relay,+seh,+tid wine PWGL-1-0b.exe &> > /tmp/output.txt as suggested in the FAQ, should I attach it to this > mailing list? > > It would be really nice to have this app working under linux, I made today > a submission for this application in the AppDB, and asked to be a > maintainer. > > Unfortunately I'm not a programmer so I cannot help providing any code, > but I can test and provide reports. > Thanks for your attention, > Best regards, > > Libero Mureddu > >-- View this message in context: http://www.nabble.com/PWGL%2C-some-improvements-tp20540662p20672128.html Sent from the Wine - Users mailing list archive at Nabble.com.