Results 1 to 5 of 5

Thread: OpenGL, SDL, graphics, games

  1. #1
    Join Date
    Jul 2005

    OpenGL, SDL, graphics, games


    wondering if someone could tell me whats a good way to learn graphics programming on Linux, like OpenGL, SDL and whatever else there is; i've got a few books for OpenGL but they are for windows, eventually it shouldn't matter of course but WinMain.cpp is not very Linux friendly;

    thank for replies;

  2. #2
    Join Date
    Jun 2007
    Tacoma, WA
    Ubuntu 9.10 Karmic Koala

    Re: OpenGL, SDL, graphics, games

    MIT open courseware has a great introduction to computer graphics:

    The class uses openGL.

  3. #3
    Join Date
    Jan 2006

    Re: OpenGL, SDL, graphics, games

    This forum has a good list of OpenGL resources and samples. Have you checked ?
    Read also the Note 5) of this page.
    GLUT library (packages freeglut3 and freeglut3-dev) makes OpenGL graphics programming very easy in Linux. OpenGL and glut are multiplatform libraries!

    How to run the lessons?

    Let's have an example:
    a) Browse to website and move on to the "Lessons 01 - 05" page.

    b) Then browse down to "Your First Polygon:" section and clik on the picture. It will take you to the code.
    Read and study the explanation.

    c) Then scroll down to the bottom of the page and click on the "DOWNLOAD Linux Code For This Lesson. ( Conversion by Richard Campbell )" link. It will download (most likely a GLUT based) code for Linux. There is also a special "GLUT" link but it is a GLUT sample for Windows. The difference is not so big but take the "Linux" code instead.

    d) Create a "lesson2" directory, untar and put the files there.

    e) Start gnome-terminal (menu selection: Applications -> Accessories -> Terminal) and cd into your lesson2 directory.
    $ cd lesson2

    f) Compile the sample code
    $ make

    g) Run it.
    $ ./lesson2

    Notice: The above example requires GLUT Library (in Linux: freeglut3-dev package) and OpenGL (which in Linux is the mesa packages).
    Use the Synaptic Package Manager or run the following command on the command line and install freeglut3 and freeglut3-dev packages. All necessary packages are in your distro's package well (=repository).

    $ sudo apt-get install freeglut3 freeglut3-dev

    Other important packages
    $ sudo apt-get install build-essential gdb subversion
    $ sudo apt-get install automake autoconf libtool
    $ sudo apt-get install libgtk2.0-dev libxmu-dev libxxf86vm-dev
    Last edited by moma; May 23rd, 2009 at 11:48 AM.

  4. #4
    Join Date
    Apr 2006
    Ubuntu 12.04 Precise Pangolin

    Re: OpenGL, SDL, graphics, games

    Lovely link, thanks.

  5. #5
    Join Date
    Mar 2006
    Philadelphia, PA

    Re: OpenGL, SDL, graphics, games

    Here's a very very good beginning game programming tutorial series linked to on the website. Keep in mind though that SDL is 2D only but intergrates with OpenGL very well if you want to use them interchangably. But SDL tends to be much much easier to learn in understand. So heres the link, check it out:
    Ubuntu User #: 0x2695 | Banshee 1.8/2.0 Pidgin Plugin

    Intel Q6600 @3.21, 4GB, GTX260, ArchLinux
    Lenovo IdeaPad S10, 1.6GHz Intel Atom, ArchLinux


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts