Mac OSX (10.5) & wine w/ OpenGL - Info & Issues

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
netherby
Newbie
Newbie
Posts: 2
Joined: Fri Aug 22, 2008 9:17 am

Mac OSX (10.5) & wine w/ OpenGL - Info & Issues

Post by netherby »

Firstly, hello everyone!

I'v been using wine under OSX for some time, using macports to install it and it works quite nicely (except for an issue with windows sliding down the screen, which can be fixed by setting a desktop area in winecfg). Sadly I'v not been able to get OpenGL support working.

(I am using OSX 10.5.4 with XQuartz 2.3.0, which is based on X.org)

There are currently 3 issues I am aware of using OpenGL with wine on OSX.

1) Linker Error
When building wine the linker is unable to find the libGL.dylib, this can be fixed by passing "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" to the linker, if you are using macports run "sudo port edit wine" and add that line to the "configure.ldflags-append" section of the port file. The build should now succeed.

2) dlopen() does not search /usr/X11/lib
Wine will try to load libGL.dylib using dlopen(), unfortunately it will not be able to find the library. This is easily fixed by supplying the FULL path to the library instead of just the name (if you are using macports, run "sudo port configure wine" before doing the following), edit the ./include/config.h file in your wine build and find the line "#define SONAME_LIBGL "libGL.1.dylib"", change the last part to include the full path the libGL (it should be in "/usr/X11/lib/"). Wine will now load the library dynamically when needed. (note to macport users: the wine build is located in /opt/local/var/macports/build/ with a really long directory name after that ends with wine/work)

3) glx_version < 1.3
Now the final issue I have come to, is that the version of glx is only 1.2, which wine says "GLX_SGIX_fbconfig extension is unsupported" in. At which point none of the library functions will be looked up and set, causing any calls to those pointers to result in reading of unallocated memory, which is usually a bad thing™

I have not been able to solve problem 3.. I looked at what functions are actually required in ./dlls/winex11.drv/opengl.c, if the version of glx returns okay:

glXChooseFBConfig
glXGetFBConfigAttrib
glXGetVisualFromFBConfig
glXQueryDrawable


The second possibility if the version check fails, is that a call to glxRequireExtension("GLX_SGIX_fbconfig") is true. In which case the same functions listed above are loaded, but have SGIX on the end of them.

So I ran nm on libGL.dylib and it reports there are symbols for both sets of the above functions, with and without SGIX on them. How ever the RequireExtension call is failing and the version check returns 1.2 and also fails. I decided to disable the checks and just try to map the functions, which appears to work, or at least the pointers are not NULL and there are no run-time errors when they load. Unfortunately in my tests the OpenGL context still failed to be set current (I'm guessing it didn't get created at all?)..

At this point I'm out of ideas.. Will the version of glx provided simply not work with wine, even though it has the required function symbols? I'm hoping someone that knows what I'm talking about can provide some insight and ideas =)

Cheers!
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Mac OSX (10.5) & wine w/ OpenGL - Info & Issues

Post by vitamin »

netherby wrote:At this point I'm out of ideas.. Will the version of glx provided simply not work with wine, even though it has the required function symbols? I'm hoping someone that knows what I'm talking about can provide some insight and ideas =)
That's right Mac's OpenGL (or more precisely X server) doesn't work with Wine. You need Xorg's version of X. http://wiki.winehq.org/MacOSX/FAQs
James Mckenzie

Mac OSX (10.5) & wine w/ OpenGL - Info & Issues

Post by James Mckenzie »

vitamin <[email protected]> at Aug 22, 2008 1:20 PM (MST) wrote about [Wine] Re: Mac OSX (10.5) & wine w/ OpenGL - Info & Issues

netherby wrote:
At this point I'm out of ideas.. Will the version of glx provided simply not work with wine, even though it has the required function symbols? I'm hoping someone that knows what I'm talking about can provide some insight and ideas =)
That's right Mac's OpenGL (or more precisely X server) doesn't work with Wine. You need Xorg's version of X. http://wiki.winehq.org/MacOSX/FAQs
This is very true if you have the stock Leopard's X11 installed. You need to get the version produced by the XQuartz for MacForge version. Their home page is at http://xquartz.macosforge.org

Get the latest/greatest version and install it AFTER installing or verifying that X11 is installed on your Mac.

This may help in clearing up and OpenGL problems you are having.

James McKenzie
netherby
Newbie
Newbie
Posts: 2
Joined: Fri Aug 22, 2008 9:17 am

Re: Mac OSX (10.5) & wine w/ OpenGL - Info & Issues

Post by netherby »

netherby wrote:(I am using OSX 10.5.4 with XQuartz 2.3.0, which is based on X.org)
James McKenzie

Mac OSX (10.5) & wine w/ OpenGL - Info & Issues

Post by James McKenzie »

netherby wrote:
Firstly, hello everyone!

Hello back as a fellow MacOSX user.
3) glx_version < 1.3
Now the final issue I have come to, is that the version of glx is only 1.2, which wine says "GLX_SGIX_fbconfig extension is unsupported" in. At which point none of the library functions will be looked up and set, causing any calls to those pointers to result in reading of unallocated memory, which is usually a bad thing™

This is not nor can it be a Wine issue. This needs to be brought up with
the MacOSXForge XQuartz team. They need to implement glx_version => 1.3.
Even if the functions exist, they are not the 'proper' version and will
cause problems.

James McKenzie
applewine
Newbie
Newbie
Posts: 1
Joined: Mon Sep 01, 2008 6:11 pm

Post by applewine »

I'm trying to understand the wine osx situation. I want to know all the software that is needed for wine to work with os x. So far I know about this.

1. Wine 1.0 for osx
2. x11 from apple
3. xQuartz x11 upgrade

Is there any more? From what I understand xQuartz is also not done yet to allow opengl and some other (even simple 2d windows utility applications) to run. I tried a program called "Exact Audio Copy" (EAC) as a test because it was said to work flawlessly in wine. Well I ran wine on osx and started EAC and all I got was a frozen image of the EAC gui that you couldn't click on and had no curser.

Is anybody working with the xQuartz team to tell them this stuff is not working or getting them error messages for programs? Have they been informed of the above mentioned opengl issues from the posts above?

Thank you.
James Mckenzie

Mac OSX (10.5) & wine w/ OpenGL - Info & Issues

Post by James Mckenzie »

applewine <[email protected]> at Sep 1, 2008 7:52 PM (MST) wrote about [Wine] Re: Mac OSX (10.5) & wine w/ OpenGL - Info & Issues
I'm trying to understand the wine osx situation. I want to know all the software that is needed for wine to work with os x. So far I know about this.

1. Wine 1.0 for osx
This does support OpenGL if it is compiled into the package. I don't know if this is true because I do not run any games under Wine. I may install dOOm to see what happens.
2. x11 from apple
OpenGL is definitely broken with this release. However, you need to install this before installing the XQuartz updates.
3. xQuartz x11 upgrade
Get the latest, 2.3.0.
Is there any more? From what I understand xQuartz is also not done yet to allow opengl and thus >games to run. Are the remaining problems being worked on by xQuartz, or do these need to be >addressed by the wine distro? What else do I need to know?
Broken OpenGL on MacOSX has to be addressed by the XQuartz team. I remember a bug report being submitted to address this problem.

James McKenzie
jlev
Newbie
Newbie
Posts: 1
Joined: Fri Sep 05, 2008 3:50 pm

Post by jlev »

If this is the correct bug, it looks like it's not going to be fixed anytime soon.
http://xquartz.macosforge.org/trac/ticket/122

It has been assigned to the 2.4.0 milestone, which is probably a few months out. Seems we'll just have to wait...
Locked