Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up OpenGL on Ubuntu

Tags:

ubuntu

opengl

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?

like image 841
Trt Trt Avatar asked Oct 20 '11 21:10

Trt Trt


2 Answers

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:

sudo apt-get install libglew-dev
like image 137
datenwolf Avatar answered Nov 13 '22 22:11

datenwolf


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.

like image 35
moongoal Avatar answered Nov 13 '22 22:11

moongoal