tags:

views:

60

answers:

1

I have been tinkering with SDL for a few days now and I have hit a roadblock. It seems that rotating 2D sprites is very costly and, in a practical sense impossible with just plain SDL. After a great deal of reading, it seems that OpenGL, utilizing the hardware (as opposed to just a pure software solution) is the correct tool for the job.

Where can I download OpenGL to use in my SDL project and what steps do I need to take so that it compiles properly?

A: 

Most compilers ship with the openGL headers and libs. You don't need to recompile anything.

#include <GL/gl.h>

On linux, link with -lGL (and optionnaly -lGLU)

On windows, link with opengl32.lib (glu32.lib)

There are plenty of tutorials to get you started, but you can google this :

DL_Surface* pScreen = SDL_SetVideoMode(640, 480, 32, SDL_OPENGL | SDL_FULLSCREEN);
Calvin1602