Last time I used OpenGL was in a University project. By that time, I had to connect using telnet (and xterm, I think, but I barely remember) to a SUN sparc station running probably Solaris. I remember it was really exciting being able to view those simple 3D models on the screen and running in real time!
Lately I was reading some DirectX 10 and sudendly I was wondering what happened to OpenGL? Did It die? Is it there any develoment going on? Surprisingly I found that these libraries are alive and well. It's been used in several platforms including the iPhone so ... you can imagine the future of a technology installed in more than 5 million of devices! (Also, this library is used in both PS 3 and wii (add some other million).
After this brief introduction I decided to build a program under linux, c++ and OpenGL. The IDE of choice Code::Blocks. I used this IDE to build an embedded application so I recommend it. It runs really well with no complains.
One cool thing I found is that Code::Blocks already includes templates to create OpenGL applications using GLUT or using OpenGL with direct access to the X windows libraries.
Now, let's go to the practice. Select File->New->Project. This will pop up the following screen:
OpenGL Library with X-windows access:
OpenGL project is straightforward. You only have to follow the wizard. The project will be ready and you will be able to run it immediately:
As you can see, the wizard is clear and people from code::blocks really did a great job! Below, you can see the simple program running. After finishing the wizard, I just hit F9, and Voila!
OpenGL Library using GLUT:
In order yo have GLUT libraries (and of course, the code::blocks template) you will have to install the following packages:
Lately I was reading some DirectX 10 and sudendly I was wondering what happened to OpenGL? Did It die? Is it there any develoment going on? Surprisingly I found that these libraries are alive and well. It's been used in several platforms including the iPhone so ... you can imagine the future of a technology installed in more than 5 million of devices! (Also, this library is used in both PS 3 and wii (add some other million).
After this brief introduction I decided to build a program under linux, c++ and OpenGL. The IDE of choice Code::Blocks. I used this IDE to build an embedded application so I recommend it. It runs really well with no complains.
One cool thing I found is that Code::Blocks already includes templates to create OpenGL applications using GLUT or using OpenGL with direct access to the X windows libraries.
Now, let's go to the practice. Select File->New->Project. This will pop up the following screen:
OpenGL Library with X-windows access:
OpenGL project is straightforward. You only have to follow the wizard. The project will be ready and you will be able to run it immediately:
As you can see, the wizard is clear and people from code::blocks really did a great job! Below, you can see the simple program running. After finishing the wizard, I just hit F9, and Voila!
OpenGL Library using GLUT:
In order yo have GLUT libraries (and of course, the code::blocks template) you will have to install the following packages:
freeglut3 being selected in Synaptics Manager
Please note I have installed the freeglut version of GLUT. You can see in the screen above the following message: "This package has been replaced by freeglut3'. Hmm, It looks like there are some restrictions in the GLUT license. (and glut seem to be out of date).
With these packages installed you can run code::blocks and go through the GLUT wizard.
First step is to let code::blocks where is GLUT installed. Usually all installed libraries in Linux are located in /usr.
Follow the wizard to create your project. Finish it and hit F9. Again, you will be able to see this cool screen: solid and wireframe models.
And .. that's all by now.
ps. I also suggest using SDL (Simple DirectMedia Layer). This library controls also Audio and Keyboard. You should install the following libraries in order to have SDL applications working:
Please note I have installed the freeglut version of GLUT. You can see in the screen above the following message: "This package has been replaced by freeglut3'. Hmm, It looks like there are some restrictions in the GLUT license. (and glut seem to be out of date).
With these packages installed you can run code::blocks and go through the GLUT wizard.
First step is to let code::blocks where is GLUT installed. Usually all installed libraries in Linux are located in /usr.
Follow the wizard to create your project. Finish it and hit F9. Again, you will be able to see this cool screen: solid and wireframe models.
And .. that's all by now.
ps. I also suggest using SDL (Simple DirectMedia Layer). This library controls also Audio and Keyboard. You should install the following libraries in order to have SDL applications working:
Comments
i'm a new linux user
i did as you say and i get the message sh:..../debug/project name permission denied
i also cant't find the libxxf86vm library into my synaptics manager. can i download it from somewhere else?
regarding the libxxf86vm library, it should be libxxf86vm1. It can be downloaded from this alternate location:
https://launchpad.net/ubuntu/+source/libxxf86vm/1:1.0.1-2
I was playing around with it before I found you site and thought it was more complicated than it was.
JT
I use F14 and i install this :
# yum install mesa-libGL-devel.i686
# yum install mesa-libGLw-devel.i686
# yum install mesa-libGL.i686
# yum install mesa-libGLU.i686
# yum install mesa-libGLw.i686
# yum install mesa-libOSMesa.i686
I don't see mesa_wgl.h
Any idea ?
Thank you .