I need help setting up OpenGL and SDL on Ubuntu. Is Ubuntu ideal for this kind of graphics development? I have CodeBlocks IDE for C/C++ and I have downloaded the SDL 1.2 libraries. What I am having a hard time to do is to install OpenGL. What are the step that I have to follow?
To setup OpenGL and SDL you should open the terminal and issue the command:
sudo apt-get update && sudo apt-get install libgl sdl
This will install the basic libraries you need to run OGL/SDL applications, after entering the root password. I suggest you to google for synaptic and learn how to use it.
Linux is always a good place to develop something.
-
2
-
1
What I am having a hard time to do is to install OpenGL
Technically OpenGL is just a specification, implemented by your graphics driver. There's no such thing like a OpenGL SDK library. There's just libGL.so coming with your driver. To use it, you need bindings for your programming language of choise. If that is C, the "bindings" consist of just the header files. However you'll probably also want to use OpenGL extensions, which a easiest used using GLEW.
So I suggest you install the GLEW development files, all the other dependencies (including the OpenGL headers) will be pulled in by the package manager:
apt-get install libglew1.5-dev
-
1+1 Answer works with Ubuntu 14.04 guest OS in VMWare workstation! Thanks. – Stephen Quan Jun 19 '14 at 4:15
-
1Worked for me too, I'm compiling VTK. Although I said
sudo apt-get install libglew-dev. Now it's at version 1.6 or so. – Csaba Toth Jan 3 '15 at 8:29