Archived

This topic is now archived and is closed to further replies.

Ecthelion

SuSE 7.3 OpenGL development

Recommended Posts

I''ve been trying to get OpenGL acceleration working on Linux for some time now. Yesterday I installed SuSE 7.3 personal and noticed that 3d acceleration worked straight out of the box. The 3d games included (tuxracer, chromium) ran smoothly, but I was unable to compile any OpenGL applications (NeHe tutorials). I noticed that I didnt have the OpenGL headers installed, so after doing some research I downloaded and installed mesa-devel, mesaglut-devel and xf86glu-devel rpms from the SuSE ftp. Now I could compile some of the OpenGL programs, for example SDLgears, but they wouldn''t run. SDLgears just prints out: Couldn''t set 300x300 GL video mode: X11 driver not configured with OpenGL which means that SDL_SetVideoMode(300, 300, 16, SDL_OPENGL|SDL_RESIZABLE) failed. I''ve been searching the net for couple of hours now to find out what I should do next but haven''t found anything. Can someone here point me to the right direction?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Reinstall the NVidia drivers: the Mesa RPM probably overwrote the NVidia headers.

If you ever remove the mesa-devel package, it will likely remove some of your NVidia headers too.

Welcome to the wonderful world of RPM, the very tool that made me install all my systems from source.

Share this post


Link to post
Share on other sites
Thanks for the reply, but I didn't have any headers in the first place so there was nothing to overwrite..

I should have mentioned this in the original message, but I have a ATI Radeon, so installing anything from Nvidia isn´t going to help.

Edited by - Ecthelion on February 18, 2002 4:41:38 AM

Share this post


Link to post
Share on other sites
You seems confused . OK, let''s try to clear things.

1) OpenGL and SDL are 2 completely different beasts.
SDL is an API that handles 2D graphics, sound, gamepads and CDROM. If you just wants to run 2D games you only needs to install the SDL runtime libraries ( SDL RPM ).
If you want to compile programs using the SDL libraries, you needs to install the RPM development package too.
I use Redhat 7.2 and the runtime libraries are automaticaly installed. The SDL development package is included on one of the CDROM.
Now, I don''t know about the Suse distro.
The SDL website is a goldmine of information.You can download the SDL RPM packages from there if they are not included in your distribution.While you are there, download SDL-Image ( for manipulating graphics files ) and SDL mixer ( for sound ).

2)3D games require 3D libraries ( OpenGL or in the case of Linux the Mesa equivalent ) to run and mesa Development libraries if you want to compile programs. They should be included in your Linux distro, they are on redhat 7.2

3) Of course, if you run 3D games this way, they will be extremely slow, because they are rendered in software but they should work.So you need to use hardware accelerated rendering.
The hardare acceleration is already included in the most recent Kernel via DRI. That explains why Tuxracer runs OK on your system.DRI supports 3dfx, Nvidia, Matrox and ATI videoboards.
But if you have an Nvidia board, you have to download and install the closed source driver from Nvidia website.

4) SDL can interact with OpenGl ( Mesa )

I hope this helps

Share this post


Link to post
Share on other sites
I admit that I´m confused, but thankfully not that much

Suse includes SDL development and runtime packages, but I chose to install the latest version from source. I can compile and run SDL programs just fine.

Apparently SuSE 7.3 personal only installs runtime OpenGL libraries, not the development libraries. I couldn´t find them from the CDs either so I browsed around the SuSE web&ftp sites and found this:

quote:

Package: "mesa-devel" (x)
This is the development package for 'mesasoft' (GL library). Recommended packages for OpenGL development are also the packages 'xf86glu/xf86glu-devel' (GLU library) and 'mesaglut/mesaglut-devel' (glut library).



So I downloaded those packages and installed them, after of which I could compile but not run the compiled OpenGL programs. Precompiled programs like Tuxracer ran just fine. The problem might be that the packages are for SuSE 7.3 professional edition.

After that I also tried to install Mesa from source (configure, make, make install) but the only thing that changed was that 3d acceleration was turned off. (I could turn it back on easily with the SuSE setup programs)

I quess the easiest way to solve this would be if someone could tell me exactly what programs/libraries I must install (preferably from source) on top of a system that already supports 3d acceleration but doesn´t have the OpenGL headers.

But thanks for the help anyway

Edited by - Ecthelion on February 18, 2002 11:46:41 AM

Share this post


Link to post
Share on other sites
I managed to solve the problem myself, but thanks for trying to help.

Incase anyone ever has the same problem, here´s what I did:

1. Reinstall SuSE
2. Download mesa tarballs from sourceforge ( http://sourceforge.net/projects/mesa3d/ , MesaLib and MesaDemos )
3. Don´t insall them, but copy the contents of the "include" directories inside them to your /usr/include

Edited by - Ecthelion on February 19, 2002 3:06:59 PM

Share this post


Link to post
Share on other sites