[SDL] howto use opengl extensions in sdl?

Sam Lantinga slouken at devolution.com
Sun Jan 5 13:38:01 PST 2003


> A/
> setting up
> -------
> #include "glext.h"
> PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = 0;
> glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) 
> SDL_GL_GetProcAddress("glActiveTextureARB");

> usage
> -------
> glActiveTextureARB( GL_TEXTURE0_ARB );

Try this:

C/
setting up
-------
#include "SDL_opengl.h"
PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = 0;
glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) 
SDL_GL_GetProcAddress("glActiveTextureARB");

usage
-------
glActiveTextureARB( GL_TEXTURE0_ARB );

SDL_opengl.h tries to do the right thing.  Please let me know if this works.

See ya,
	-Sam Lantinga, Software Engineer, Blizzard Entertainment




More information about the SDL mailing list