Help building/running SDL/OpenGL code

Pieter de Goeje pieter at degoeje.nl
Wed Dec 23 02:20:42 UTC 2009


On Tuesday 22 December 2009 22:00:51 Roland Smith wrote:
> On Tue, Dec 22, 2009 at 09:57:57PM +0200, Richard Mace wrote:
> > In the end, as a last resort, I de-installed the nvidia driver and
> > started X with an empty /etc/X11/xorg.conf (which presumably loads the
> > "nv" driver). I re-built my code and it runs, albeit without the
> > smoothest of graphics.
>
> On a recent core2 duo or quad, even software rendering isn't that bad.
True, until you press the full screen(s) button of your program running on 
your dual 1920x1200 monitor setup like I do ;-) Suddenly you're watching a 
slideshow...
>
> > I guess that that proves that the problem lies with the NVIDIA driver and
> > its inter-relationship with the Mesa libraries, which one has to use if
> > one builds one's own "OpenGL" programs.
>
> Yes.
Agreed. It's quite annoying that the nvidia drivers replace the existing mesa 
GL libs, which breaks OpenGL when you switch back to mesa rendering. However, 
because the library is implemented by nvidia for their hardware, it is also 
blazingly fast.
>
> > It is a pity that FreeBSD has not sorted that out, but I hasten to add
> > that I'm new to FBSD and it could be my error.
>
> It was nvidia's decision to drop support for older cards from their recent
> drivers. Nothing that the FreeBSD project can do about that.
The oldest cards that the new drivers support are the GeForce 6xxx series, 
which are over 5 years old. I'm not saying that I approve dropping support 
but frankly I don't really care for 3D acceleration on graphics cards that 
old. 

The latest nvidia drivers are actually built using a more recent version of 
FreeBSD so you won't have that linking problem. Which is indeed the most 
likely cause of the problem. I don't understand why glxgears does run and 
your simulation does not though... I would've expected both too fail or work.
>
> > It does beg the question, though, how one would develop OpenGL apps on
> > FBSD? I'll revisit this soon, after some careful googling.

Personally I use a recent nvidia card with the latest nvidia drivers. This has 
worked well for me, but I don't use SDL. My programs tend to use the simple 
GLUT/GLU/GL combo or wxGTK/GLU/GL if I need more controls. Loading textures 
is done using DevIL. Unfortunately my old GeForce 4 is broken so I can't test 
the legacy drivers any more.

>
> Get a card that is well-supported by the drivers in the FreeBSD kernel and
> Xorg/Mesa. Currently that means Intel's on-board graphics or boards with
If you're going with intel you might as well use software rendering :-)

> ATI/AMD radeon chips, except for the latest chips. AMD released docs for
> those chips some months ago, and the drivers for accellerated 3D are still
> evolving.

Yes, AMD's efforts are very commendable.
>
> Accellerated 3D works fine on my Radeon X1650 equipped card with the
> xf86-video-ati driver and the drm.ko and radeon.ko kernel modules.
>
> Roland

-- 
Pieter de Goeje


More information about the freebsd-questions mailing list