GL_ARB_multitexture on Solaris/Sparc OpenGL
vincent at cojot.name
vincent at cojot.name
Fri Oct 28 10:06:00 EDT 2005
Just something I stumbled on:
In quake3 (linux_glimp.c), there is:
if ( r_ext_multitexture->value )
{
qglMultiTexCoord2fARB = ( PFNGLMULTITEXCOORD2FARBPROC ) dlsym( glw_state.OpenGLLib, "glMultiTexCoord2fARB" );
qglActiveTextureARB = ( PFNGLACTIVETEXTUREARBPROC ) dlsym( glw_state.OpenGLLib, "glActiveTextureARB" );
qglClientActiveTextureARB = ( PFNGLCLIENTACTIVETEXTUREARBPROC ) dlsym( glw_state.OpenGLLib, "glClientActiveTextureARB" );
This currently doesn't compile on Solaris since OpenGL on Solaris doesn't
have PFNGLMULTITEXCOORD2FARBPROC, PFNGLACTIVETEXTUREARBPROC and
PFNGLCLIENTACTIVETEXTUREARBPROC.
In Quake2 we made it work/compile this way:
if ( gl_ext_multitexture->value )
{
ri.Con_Printf( PRINT_ALL, "...using GL_ARB_multitexture\n" );
qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMultiTexCoord2fARB" );
qglActiveTextureARB = ( void * ) qwglGetProcAddress( "glActiveTextureARB" );
qglClientActiveTextureARB = ( void * ) qwglGetProcAddress( "glClientActiveTextureARB" );
I don't think it would be a good idea to 'lose' information by replacing
'(PFNGLMULTITEXCOORD2FARBPROC)' stuff with '(void *)' in order to make
this compile on Solaris but what would you recommend that I choose?
1) "#ifdef __sun" some stuff in linux_glimp.c
2) #define PFNGLMULTITEXCOORD2FARBPROC et al for Solaris in qgl.h (ugly).
3) Create a solaris_glimp.c and work from there...
(Note: ioq2 already has some solaris-specific routines so I don't mind
creating a solaris_glimp.c)
Thanks for reading,
--
,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,
Vincent S. Cojot, Computer Engineering. STEP project. _.,-*~'`^`'~*-,._.,-*~
Ecole Polytechnique de Montreal, Comite Micro-Informatique. _.,-*~'`^`'~*-,.
Linux Xview/OpenLook resources page _.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'
http://step.polymtl.ca/~coyote _.,-*~'`^`'~*-,._ coyote at NOSPAM4cojot.name
They cannot scare me with their empty spaces
Between stars - on stars where no human race is
I have it in me so much nearer home
To scare myself with my own desert places. - Robert Frost
More information about the quake3
mailing list