Oh and another note, you cannot load your gl function such as (glClear in
my previous reply, this time I use glGenTextures):

var glGenTextures: procedure(n: GLsizei; var textures: GLuint); cdecl;

Until you create and make current your OpenGL context.
SDL_GL_MakeCurrent(window, context); // after this is done the first time
you can then load the OpenGL functions matching your requested version

So the order is

SDL_Init()
SDL_GL_SetAttribute() multiple times
SDL_CreateWindow() returns your window
SDL_GL_CreateContext() returns your context
SDL_GL_MakeCurrent() makes gl functions available
SDL_GL_GetProcAddress() for every gl function in your requested version

Then you are done initializing everything and can write a
game/demo/whatever thing you want.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to