[SDL] SDL + GL2.0 GLSL Cross Compiling Problem

Pasi Kärkkäinen pasik at iki.fi
Thu Jan 20 04:06:07 PST 2005

On Thu, Jan 20, 2005 at 02:05:09PM +0800, Eric Vidal wrote:
> Chris Nelson wrote:
> >I seem to have a version of libopengl32.a, which doesn't seem to support 
> >the OpenGL 2.0 GLSL extension function calls. Cross compiling my program 
> The problem is that the Windows OpenGL library doesn't have the 2.0 
> functions.  It only supports up to 1.1.
> What I do is to create pointers to the functions that are only for 1.2+ 
> OpenGL versions, and then use SDL_GL_GetProcAddress to resolve them. 
> More info can be found in the manpage or the HTML docs.  You should also 
> get the glext.h and wglext.h header files from 
> http://oss.sgi.com/projects/ogl-sample/registry/ to get the OpenGL 2.0 
> constants, if you need them.
> Theoretically you can link instead with a third-party OpenGL library, 
> but I've never been consistently successful with that.  :)

Use glew (http://glew.sf.net). It has opengl 2.0 compatible header file with
all the defs and function prototypes, and it loads the function pointers
during startup for you.. in windows, linux, osx, freebsd etc.

And it's simple to use.

-- Pasi Kärkkäinen
                                .     .
                              /    -    \

More information about the SDL mailing list