I made an SDL/OpenGL template a few years ago. It doesn't check the result of the SDL functions (which is recommended, by the way) or have any error catching code, but it should work fine otherwise. Compile it in Free Pascal using the command: fpc -Mobjfpc sdlglsimple.pp