FreeBSD + OpenGL

Jeremy W. Sheaffer jws9c at cs.virginia.edu
Wed Nov 3 08:15:10 PST 2004


On Wed, 3 Nov 2004, jason wrote:

> Jeremy W. Sheaffer wrote:
>
> >I just purchased an emachines laptop with an amd64 and an ati radeon 9600
> >which is now running FreeBSD 5.3-BETA4 beautifully.  I need to be able to
> >run OpenGL programs using, among others, the ARB_vertex_program,
> >ARB_fragment_program, and ARB_occlusion_query extensions.  These are all
> >part of OpenGL 1.5, which is implemented by the current version of Mesa,
> >Mesa-6.2.  Xorg, as shipped with FreeBSD uses Mesa-5.1 as the renderer,
> >so I upgraded from source to Xorg 6.8.1, which is current stable.  This
> >uses Mesa-6.1, which *should* give me the functionality I need--but it
> >doesn't.  glxinfo tells me my renderer version is OpenGL '1.2  (1.5 Mesa
> >6.1)'.  So I manually replaced the Mesa subtree in Xorg with Mesa-6.2.
> >6.2 is primarily a bugfix upgrade, but I hoped.  I also went through the
> >Mesa source and made certain that all conditionally compiled code that
> >involves the extensions I need are built, and then rebuilt Xorg.  Still no
> >dice.  Version string is '1.2 (1.5 Mesa 6.2)', and the extension I need
> >are not being exported.  I'm not certain that this is actually a FreeBSD
> >question, but it touches on three different systems, so I thought I would
> >try here first.  Does anyone have any experience with programmable
> >graphics under FreeBSD.  I realize, of course, that the drivers aren't
> >there to really support my card--I could care less if I get acceleration!
> >Mesa exports the functionality in software, and I need to be able to use
> >it.  Any suggestions?
> >
> >Jeremy
> >
> >
> >
> Using OpenGL depends on 3 things: program support, os, drivers.  FreeBSD
> does not have the newest port of Mesa, but you can get around that
> easily enough.  Ofcourse your software would have support.  This leaves
> drivers on FreeBSD.  I know for a fact the drivers are getting a little
> old, but I am not capable of updating them.  Here is an example(not that
> everyfile need to be days old to support what you have):
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/drm/radeon_cp.c ->9
> months, 4 weeks ago
> http://freedesktop.org/cgi-bin/viewcvs.cgi/dri/drm/shared/radeon_cp.c
> ->10 days, 23 hours ago
>
> Thats just half of it.  Forget about anything over the R200 core(radeon
> 8500, the low 9000s are just variations on the R200 and work too) if you
> can not use the precompiled ati linux drivers.  I hate to say it, but go
> to linux or windows since that is what you need to get yor work done.  I
> recommend Gentoo, its very BSD like.
>

Thanks for the input.  I solved the problem.  Read on:

Actually, it doesn't depend on OS or drivers if you are using a
unaccelerated software implementation.  E.G. Mesa w/o DRI.  I enquired on
the Mesa users mailing list and here is the answer I got from Brian Paul,
the author and primary maintainer of Mesa:

] The problem is libGL.so and the server-side GLX protocol dispatcher
] don't currently support the ARB extensions you mention above.
]
] The simplest solution would be for you to download/compile Mesa-6.2.
] This will result in a "stand-alone" libGL.so library that renders with
] Xlib, instead of going over the GLX protocol to the X server.

Unfortunately, I had already done this, but what I didn't notice at that
time was that the Mesa makefile with FreeBSD config has a broken install.
It wasn't symlinking libGL.so.1.5 to libGL.so, so I was still trying to
run programs against the old OpenGL libraries.  Making the links myself, I
now have the extensions I need.  Granted, I have zero acceleration, but I
have access to other machines to run the code fast.  The machine in
question only needs to be able to develop and run for debugging purposes.

As for Windows or Linux--I wouldn't be caught dead trying to do
development in Windows.  And ATI support under Linux is awful and not
worth the effort.  I would still either be unaccelerated or not have the
necessary extensions.  The machine in my office runs Slack with a high end
NV35 based card, and the NVIDIA drivers are great--only very slightly
behind the Windows ones.

Anyway, thanks again for the help.

Jeremy

-- 
Jeremy W. Sheaffer
jws9c at cs.virginia.edu
http://cs.virginia.edu/~jws9c/



             /*********************************************
             * The Moving Finger writes; and having writ, *
             *    Moves on: nor all thy piety nor wit     *
             *  Shall lure it back to cancel half a line  *
             *  Nor all thy tears wash out a word of it.  *
             *                                            *
             *                       -Omar Khayyam        *
             *********************************************/



More information about the freebsd-questions mailing list