views:

3653

answers:

5

I'm trying to learn OpenGL and improve my C++ skills by going through the Nehe guides, but all of the examples are for Windows and I'm currently on Linux. I don't really have any idea how to get things to work under Linux, and the code on the site that has been ported for Linux has way more code in it that's not explained (so far, the only one I've gotten to work is the SDL example: http://nehe.gamedev.net/data/lessons/linuxsdl/lesson01.tar.gz). Is there any other resource out there that's a bit more specific towards OpenGL under Linux?

+1  A: 

This seems to be a pretty good starting point.

The OpenGL code to do the actual rendering should be the same, regardless of the platform, so I'm assuming you're just trying to get it up and running. You can literally rip out all of the code that the NeHe tutorials have as functions and put it into your code once you get your environment set up.

Hooray Im Helping
+1  A: 

You should be able to download a linux version of all his lessons. Extract them and use "make"

sparks
A: 

Have you tried the GLUT versions of NeHe's lessons? GLUT is OS-independent, so you should be able to get all his lesson code working on Linux without changing it.

GLUT hasn't been actively developed for over 10 years. There is freeglut which is more recent, but I would recommend SDL for simply opening a window, and then getting out of your way.
Borbus
A: 

Maybe you would like to use Qt to draw the windows and widgets.

Here's a tutorial based on the Nehe guides to show you how to create OpenGL images with Qt.

To learn OpenGL, the OpenGL Red Book is a must read. There's an online version. It has very good explanations and examples.

Gastón
+2  A: 
Ned