Jump to content

  • Log In with Google      Sign In   
  • Create Account


Installing OpenGL (and SDL) for Ubuntu Linux


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Timoteo2010   Members   -  Reputation: 100

Like
0Likes
Like

Posted 27 June 2010 - 02:35 PM

This installation works for the gcc compiler that is installed with Ubuntu Linux, and will allow you to compile and run the NeHe tutorials that have been recoded for use under Linux/SDL by Ti Leggett (and others).

It will also work with SDL and OpenGL programs coded for gforth v7, using the libcc interface package.

I have just verified (06/27/2010) that this works on a fresh installation of Ubuntu Linux v10.04 LTS.

--- This does not install *everything* OpenGL, but I have worked through about half of the NeHe tutorials without having to add additional packages as yet.

*** *** ***

From the desktop of your Ubuntu Linux installation, run the Synaptic Package Manager (System->Administration->Synaptic Package Manager), enter your password, and enter 'libsdl' into the search box. You will get a listing of many possible packages, but these are the ones that you need to mark for installation:

libsdl-ttf2.0-0
libsdl-ttf2.0-dev
libsdl-image1.2
libsdl-image1.2-dev
libsdl-mixer1.2
libsdl-mixer1.2-dev
libsdl1.2-dev
libsdl1.2debian-all

If the checkbox for one of these is already green (installed), do not reinstall it.

Sometimes, when you mark an entry, a window will pop up with a list of multiple files that will also be included. Accept the additional files, and mark all for installation in the package. An example of this is that we marked seven packages above, but about 50 will have been marked for installation.

Once you have marked these, click on the Apply button on the top line menu, and the selected packages will be installed.

Next, enter 'libgl' into the search box, and select the entry for

libgl1-mesa-dev

Mark the entry for install, then click Apply to do so.

-- The libgl1-mesa-dev file can be loaded during the processing of the above SDL libraries, so if it is already marked, do not re-install it.

In the search box, enter 'libglu', and select the entries:

libglu1-mesa-dev
libglut3-dev

Mark the entries for install, then click Apply to do so.

The last graphical package to add is 'xorg' - enter this into the search box and select the following package:

xorg-dev

Mark the entry for install, then click Apply to do so.

*** *** ***

If you want to go ahead and install the gforth v7.0 system, do the following:


The next package to install is 'libtool' - enter this into the search window, mark the entry, and then Apply to install it.

libtool

The last package is the gforth system, so enter 'gforth' into the search box, select

gforth

Mark the entry for install, then click Apply to do so.


Sponsor:

#2 Caste   Moderators   -  Reputation: 969

Like
0Likes
Like

Posted 01 July 2010 - 09:34 AM

Thanks for the howto, but it is pretty much related to your gforth ports and thus should be shipped with these in the README or so.

Furthermore, Ubuntu users might want to install all the packages with only one call on the command line:
sudo apt-get install libsdl-ttf2.0-0 libsdl-ttf2.0-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-mixer1.2 libsdl-mixer1.2-dev libsdl1.2-dev libsdl1.2debian-all libgl1-mesa-dev libglu1-mesa-dev libglut3-dev xorg-dev libtool gforth


But be aware that this does only install the Mesa OpenGL software rasterizer, if you want to use shaders or ATI/NVIDIA extensions to OpenGL you need the dev packages that come from these vendors.

#3 swiftcoder   Senior Moderators   -  Reputation: 9856

Like
0Likes
Like

Posted 01 July 2010 - 12:20 PM

Quote:
Original post by Caste
But be aware that this does only install the Mesa OpenGL software rasterizer, if you want to use shaders or ATI/NVIDIA extensions to OpenGL you need the dev packages that come from these vendors.
Are you sure about that? I am using libgl1-mesa-dev with the proprietary ATI drivers without any issues...

Admittedly, I have to load OpenGL 2.x+ features via extension pointers, but I have to do that on Windows anyway, so no loss.

Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#4 Caste   Moderators   -  Reputation: 969

Like
0Likes
Like

Posted 01 July 2010 - 09:32 PM

Hmm okay, as the OpenGL dev packages (no matter whether mesa or nvidia) only contain the header files, this probably does not matter.

However, in my installation I use the nvidia dev driver which ships a pretty complete glext.h. Don't know how this looks like for mesa.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS