On 2009-04-26, Fabian Groffen <grobian@g.o> wrote:
> On 08-04-2009 15:13:53 +0000, Dirk Tilger wrote:
>> On 2009-04-07, Fabian Groffen <grobian@g.o> wrote:
>> > Is there anything that would break if we remove this symlink? And does
>> > it make sense to have both mesa and apple-opengl installed? I thought
>> > mesa provides an opengl implementation? I'm not to familiar with this
>> > stuff, so please tell me if I'm wrong.
>>
>> Hi Grobian,
>>
>> well, to be honest, I'm not deep into this either. "osmesa.h" declares
>> functions in /usr/X11R6/lib/libOSMesa.dylib, which is not currently
>> included in apple-opengl, so it wouldn't really change something if we
>> omitted it. Both header and library are not part of the OpenGL standard
>> and but provide additional functionality (offscreen rendering).
>
> Ok, have you tried if stuff works with modified apple-opengl not to
> provide osmesa.h? If so, I'm happy to remove the file from the ebuild.
No, in fact I haven't any OpenGL application coming with an ebuild that
compiles on my box. ;) But I can provide strong evidence:
| dirk@Snake ~ $ for PROC in `grep ^OSMesa /usr/X11R6/include/GL/osmesa.h|sed 's!(.*!!'`; do for LIB in `equery f apple-opengl|grep dylib`; do grep -H ${PROC} ${LIB}; done; done
| dirk@Snake ~ $
None of the methods defined in /usr/X11R6/include/GL/osmesa.h are
used or provided in any of the libraries in apple-opengl. ;)
I think the ebuild needs a few more changes: It's symlinking GL dylib's
from /System/Library/Frameworks, which might have side-effects.
As I came to understand OpenGL, it is a setup of platform independent
graphics routines that is used together with a set of platform dependent
setup routines. GLX provides the setup routines when OpenGL is used with
X11, AGL provides the setup routines when OpenGL is used with Quartz.
There are others for all kinds of other environments including Windows.
/usr/X11R6/README says on my system:
| Direct rendering has exactly the same performance as the native Mac
| OS X OpenGL framework. Indirect rendering also uses the native GL
| implementation, but incurs the penalty of marshalling, transmitting
| and unmarshalling all GL primitives.
I take from that paragraph is what they do is they are translating the
X11 OpenGL calls into Quartz OpenGL calls. That's probably why `otool -L
/usr/X11R6/lib/libGL.dylib` shows it has linked
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
When I look at the symlinks of media-libs/apple-opengl-2, I see some
pointing to /System/Library/Frameworks. I believe since GLX is the
classical Un*x way of doing OpenGL, we should probably take all OpenGL
files from within /usr/X11R6. For the ones that are actually running on
Quartz natively (let's say a OpenGL extension for vim ^^), I would
expect that they pick the OpenGL using '-framework OpenGL' and then they
get the files from /System/Library/Frameworks/OpenGL.framework
automatically..
Hope I could shed some more light on this.
Dirk.
|