Good OpenGL tutorial for Linux/Ubuntu?

19,047

Solution 1

OpenGL is the same in Linux, Windows and MacOSX, the difference is the windowing system. If you just want to get quickly into building multi-platform OpenGL applications, take a look at GLUT (open-source alternatives, Ubuntu comes with freeglut). GLUT is source-compatible between operating systems, so you can compile the same code, without modifications (theoretically), in Windows and Linux.

If you need something more elaborate, you should start using either GTK+ or Qt to build your application GUI. GTK+ has a GtkGLExt extension that creates a widget that contains a OpenGL context you can draw. Qt comes with the QtOpenGL module, which provides the QGLWidget widget.

Solution 2

there is not much to know, just how to compile.

install mesa lib, and add the appropriate(s) flags to gcc, such as -lGL -lGLU.

I can't find my bookmarks on the subject, but he can easily find how to compile, and all the rest should be just the same.

Solution 3

There are a few tutorials here which might be helpful: http://www.opengl.org/wiki/Getting_started#Tutorials_and_How_To_Guides

Solution 4

hm, if your friend is familiar with opengl in windows, one solution could be to get him 'used' with cross-platform libraries, first in windows environment..

Make him download one of the frameworks (sdl,qt,glfw,glut.. etc. there are plenty these around (id recommend http://www.glfw.org/ , really easy and good framework with enough documentation in pdf format)) and port his old 'windows only code' to use the chosen library. After he is comfortable with the framework, switching to another platform will be less painful.

Share:
19,047
dieki
Author by

dieki

Updated on June 05, 2022

Comments

  • dieki
    dieki almost 2 years

    I'm looking for a good Ubuntu OpenGL tutorial for a friend who already knows how to use OpenGL in Windows. Can anyone recommend any?

  • dieki
    dieki almost 14 years
    Really? It's just compiling? I thought that window creation was different as well.
  • Ali Hidim
    Ali Hidim almost 14 years
    It is - as Juliano says, the GLUT library can handle creating the window in the same way between platforms. Assuming this is games-related, and games typically have more than just graphics, you could also look at SDL as a cross-platform layer for handling OpenGL, sound and input. Other cross-platform frameworks are available.
  • Juliano
    Juliano almost 14 years
    Nehe tutorials are not very good (when you have access to the red book: glprogramming.com/red ), and they are Windows-based.