just a question, ive used glee and glux for loading OGL extensions,
is it just as easy to use
SDL_GL_GetProcAddress
to load the extensions i need so i can remove glee/glux from my project?
but then i also have to do some defines for the parameters, is there a
website you can goto that lists the function prototypes and defines you need
to load the appropriate extensions?-------------------------------
Fabian “SupaGu” Mathews
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
Fabian Mathews wrote:
just a question, ive used glee and glux for loading OGL extensions,
is it just as easy to use SDL_GL_GetProcAddress
No, it’s not as easy.
is there a website you can goto that lists the function prototypes
and defines you need to load the appropriate extensions?
http://oss.sgi.com/projects/ogl-sample/registry/
- get both the glext.h and glxext.h/wglext.h depending on which OS you use.
You can ease the work by using define-directives (I got this one from an
nvidia-paper somewhere)
#define INIT_ENTRY_POINT( funcname , type ) funcname = (type)
SDL_GL_GetProcAddress(#funcname);
if(!funcname) cerr << “#funcname() not initialized” << endl;
- working like this
INIT_ENTRY_POINT( glMultiTexCoord1dARB , PFNGLMULTITEXCOORD1DARBPROC );
Regards,
\Mikkel Gjoel
hi Fabian,
Before using any extension or to bind gl functions from extensions, try using
this in you C/C++ code, it worked for me. (still you have to insure you have
glext.h in your /usr/include/GL directory or elsewhere under windows). If you
don’t find glext.h, or your glext.h is too old, get it from www.opengl.org
#define GL_GLEXT_PROTOTYPES 1
#include <GL/glext.h>
this will declare typedefs for all gl extensions functions
for example :
PFNGLACTIVETEXTUREARBPROC is a typedef for glActiveTextureARB() function.
so you may use :
PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
(void*)&glActiveTextureARB = SDL_GL_GetProcAddress(“glActiveTextureARB”);
to bind your functions.
Regards,
William.On Thursday 08 April 2004 11:04, Fabian Mathews wrote:
just a question, ive used glee and glux for loading OGL extensions,
is it just as easy to use
SDL_GL_GetProcAddress
to load the extensions i need so i can remove glee/glux from my project?
but then i also have to do some defines for the parameters, is there a
website you can goto that lists the function prototypes and defines you
need to load the appropriate extensions?
Fabian “SupaGu” Mathews
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
Hi Fabian
Perhaps you should have a look to http://www.levp.de/3d/ ; you can find
here a extension loading library, very useful.
Florent