After my previous post I decided to play with SDL and try to setup code::blocks with both OpenGL and SDL.
I found it pretty simple (with code::blocks, so many things are easy, forget about gdb). Open your SDL project created previously, and set the link libraries as follow:
(In case you are lost: project->Build Options->Linker Settings
That's all, then you have to include the OpenGL headers or SDL headers:
If you want to include only OpenGL files, you can do the following:
#include <GL/gl.h>
#include <GL/glu.h>
SDL also includes a wrapper for OpenGL in the following file
#include <SDL_opengl.h>
Both should work with code generated by the Template. I have to stop here. If you need more information you can find several tutorials about SDL and OpenGL.
I found it pretty simple (with code::blocks, so many things are easy, forget about gdb). Open your SDL project created previously, and set the link libraries as follow:
(In case you are lost: project->Build Options->Linker Settings
That's all, then you have to include the OpenGL headers or SDL headers:
If you want to include only OpenGL files, you can do the following:
#include
#include
SDL also includes a wrapper for OpenGL in the following file
#include
Both should work with code generated by the Template. I have to stop here. If you need more information you can find several tutorials about SDL and OpenGL.
Comments