Using multi-texture in SDL

I included <glext.h> in my opengl demo but still got this error:

error: `glActiveTextureARB’ undeclared (first use this
function)

I checked glext.h and found the definition of glActiveTextureARB there!

Somebody mentioned using SDL_GetProcAddress() but I couldn’t find anything about
this function in SDL’s API documentation. Can anyone give a hint? Thanks.

Will Childman wrote:

I included <glext.h> in my opengl demo but still got this error:

error: `glActiveTextureARB’ undeclared (first use this
function)

I checked glext.h and found the definition of glActiveTextureARB there!

Somebody mentioned using SDL_GetProcAddress() but I couldn’t find anything about
this function in SDL’s API documentation. Can anyone give a hint? Thanks.

There are two ways to use the multitexture extension :

  • if you have OpenGL 1.2 or better, it’s part of the core OpenGL
    functions so you can use glActiveTexture. Trouble is, windows is still
    on OpenGL 1.1 so you lose portability to this platform

  • choose OpenGL 1.1 as a common base and query the function pointers
    using SDL_GL_GetProcAddress :
    http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fGL_5fGetProcAddress

Stephane

Or you can use an extensition manager like GLee or glew to handle it for
you.

I don’t know if any of them work with SDL but I don’t see why they
shouldn’t work.

/Jakob Eklund

Den 2005-01-30 18:25:15 skrev Stephane Marchesin
<stephane.marchesin at wanadoo.fr>:> There are two ways to use the multitexture extension :

  • if you have OpenGL 1.2 or better, it’s part of the core OpenGL
    functions so you can use glActiveTexture. Trouble is, windows is still
    on OpenGL 1.1 so you lose portability to this platform

  • choose OpenGL 1.1 as a common base and query the function pointers
    using SDL_GL_GetProcAddress :
    http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fGL_5fGetProcAddress

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

FYI,

I’m using glew in my java sdl binding and it works fine. GLee also worked.

-Ivan/

Jakob EKlund wrote:> Or you can use an extensition manager like GLee or glew to handle it

for you.

I don’t know if any of them work with SDL but I don’t see why they
shouldn’t work.

/Jakob Eklund

Den 2005-01-30 18:25:15 skrev Stephane Marchesin
<stephane.marchesin at wanadoo.fr>:

There are two ways to use the multitexture extension :

  • if you have OpenGL 1.2 or better, it’s part of the core OpenGL
    functions so you can use glActiveTexture. Trouble is, windows is
    still on OpenGL 1.1 so you lose portability to this platform

  • choose OpenGL 1.1 as a common base and query the function pointers
    using SDL_GL_GetProcAddress :
    http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fGL_5fGetProcAddress

Stephane


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl