adapt the q3a unix backend to c++ and JO

This commit is contained in:
Jonathan Gray 2013-04-28 15:41:07 +10:00
parent e926318ae5
commit cf987264f9
6 changed files with 561 additions and 643 deletions

View file

@ -24,7 +24,7 @@
#include "macosx_glimp.h" #include "macosx_glimp.h"
#elif defined( __linux__ ) #else
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glx.h> #include <GL/glx.h>
@ -33,18 +33,6 @@
#include <GL/fxmesa.h> #include <GL/fxmesa.h>
#endif #endif
#elif defined( __FreeBSD__ ) // rb010123
#include <GL/gl.h>
#include <GL/glx.h>
#if defined(__FX__)
#include <GL/fxmesa.h>
#endif
#else
#include <gl.h>
#endif #endif
#ifndef APIENTRY #ifndef APIENTRY
@ -133,12 +121,7 @@ extern void ( APIENTRY * qglPointParameterfvEXT)( GLenum, GLfloat *);
//=========================================================================== //===========================================================================
// non-windows systems will just redefine qgl* to gl* #if defined(MACOS_X)
#if !defined( _WIN32 ) && !defined(MACOS_X) && !defined( __linux__ ) && !defined( __FreeBSD__ ) // rb010123
#include "qgl_linked.h"
#elif defined(MACOS_X)
// This includes #ifdefs for optional logging and GL error checking after every GL call as well as #defines to prevent incorrect usage of the non-'qgl' versions of the GL API. // This includes #ifdefs for optional logging and GL error checking after every GL call as well as #defines to prevent incorrect usage of the non-'qgl' versions of the GL API.
#include "macosx_qgl.h" #include "macosx_qgl.h"
@ -510,9 +493,7 @@ extern BOOL ( WINAPI * qwglSwapLayerBuffers)(HDC, UINT);
extern BOOL ( WINAPI * qwglSwapIntervalEXT)( int interval ); extern BOOL ( WINAPI * qwglSwapIntervalEXT)( int interval );
#endif // _WIN32 #elif !defined(MACOS_X)
#if ( (defined __linux__ ) || (defined __FreeBSD__ ) ) // rb010123
//FX Mesa Functions //FX Mesa Functions
// bk001129 - from cvs1.17 (mkv) // bk001129 - from cvs1.17 (mkv)

View file

@ -44,10 +44,10 @@
#include <X11/keysym.h> #include <X11/keysym.h>
#include <X11/cursorfont.h> #include <X11/cursorfont.h>
#include <X11/extensions/xf86dga.h> #include <X11/extensions/Xxf86dga.h>
#include <X11/extensions/xf86vmode.h> #include <X11/extensions/xf86vmode.h>
#define WINDOW_CLASS_NAME "Quake 3: Arena" #define WINDOW_CLASS_NAME "Jedi Outcast"
typedef enum { typedef enum {
RSERR_OK, RSERR_OK,
@ -158,100 +158,102 @@ static char *XLateKey(XKeyEvent *ev, int *key)
switch(keysym) switch(keysym)
{ {
case XK_KP_Page_Up: case XK_KP_Page_Up:
case XK_KP_9: *key = K_KP_PGUP; break; case XK_KP_9: *key = A_KP_9; break;
case XK_Page_Up: *key = K_PGUP; break; case XK_Page_Up: *key = A_PAGE_UP; break;
case XK_KP_Page_Down: case XK_KP_Page_Down:
case XK_KP_3: *key = K_KP_PGDN; break; case XK_KP_3: *key = A_KP_3; break;
case XK_Page_Down: *key = K_PGDN; break; case XK_Page_Down: *key = A_PAGE_DOWN; break;
case XK_KP_Home: *key = K_KP_HOME; break; case XK_KP_Home:
case XK_KP_7: *key = K_KP_HOME; break; case XK_KP_7: *key = A_KP_7; break;
case XK_Home: *key = K_HOME; break; case XK_Home: *key = A_HOME; break;
case XK_KP_End: case XK_KP_End:
case XK_KP_1: *key = K_KP_END; break; case XK_KP_1: *key = A_KP_1; break;
case XK_End: *key = K_END; break; case XK_End: *key = A_END; break;
case XK_KP_Left: *key = K_KP_LEFTARROW; break; case XK_KP_Left:
case XK_KP_4: *key = K_KP_LEFTARROW; break; case XK_KP_4: *key = A_KP_4; break;
case XK_Left: *key = K_LEFTARROW; break; case XK_Left: *key = A_CURSOR_LEFT; break;
case XK_KP_Right: *key = K_KP_RIGHTARROW; break; case XK_KP_Right:
case XK_KP_6: *key = K_KP_RIGHTARROW; break; case XK_KP_6: *key = A_KP_6; break;
case XK_Right: *key = K_RIGHTARROW; break; case XK_Right: *key = A_CURSOR_RIGHT; break;
case XK_KP_Down: case XK_KP_Down:
case XK_KP_2: *key = K_KP_DOWNARROW; break; case XK_KP_2: *key = A_KP_2; break;
case XK_Down: *key = K_DOWNARROW; break; case XK_Down: *key = A_CURSOR_DOWN; break;
case XK_KP_Up: case XK_KP_Up:
case XK_KP_8: *key = K_KP_UPARROW; break; case XK_KP_8: *key = A_KP_8; break;
case XK_Up: *key = K_UPARROW; break; case XK_Up: *key = A_CURSOR_UP; break;
case XK_Escape: *key = K_ESCAPE; break; case XK_Escape: *key = A_ESCAPE; break;
case XK_KP_Enter: *key = K_KP_ENTER; break; case XK_KP_Enter: *key = A_KP_ENTER; break;
case XK_Return: *key = K_ENTER; break; case XK_Return: *key = A_ENTER; break;
case XK_Tab: *key = K_TAB; break; case XK_Tab: *key = A_TAB; break;
case XK_F1: *key = K_F1; break; case XK_F1: *key = A_F1; break;
case XK_F2: *key = K_F2; break; case XK_F2: *key = A_F2; break;
case XK_F3: *key = K_F3; break; case XK_F3: *key = A_F3; break;
case XK_F4: *key = K_F4; break; case XK_F4: *key = A_F4; break;
case XK_F5: *key = K_F5; break; case XK_F5: *key = A_F5; break;
case XK_F6: *key = K_F6; break; case XK_F6: *key = A_F6; break;
case XK_F7: *key = K_F7; break; case XK_F7: *key = A_F7; break;
case XK_F8: *key = K_F8; break; case XK_F8: *key = A_F8; break;
case XK_F9: *key = K_F9; break; case XK_F9: *key = A_F9; break;
case XK_F10: *key = K_F10; break; case XK_F10: *key = A_F10; break;
case XK_F11: *key = K_F11; break; case XK_F11: *key = A_F11; break;
case XK_F12: *key = K_F12; break; case XK_F12: *key = A_F12; break;
// bk001206 - from Ryan's Fakk2 // bk001206 - from Ryan's Fakk2
//case XK_BackSpace: *key = 8; break; // ctrl-h //case XK_BackSpace: *key = 8; break; // ctrl-h
case XK_BackSpace: *key = K_BACKSPACE; break; // ctrl-h case XK_BackSpace: *key = A_BACKSPACE; break; // ctrl-h
case XK_KP_Delete: case XK_KP_Delete:
case XK_KP_Decimal: *key = K_KP_DEL; break; case XK_KP_Decimal: *key = A_KP_PERIOD; break;
case XK_Delete: *key = K_DEL; break; case XK_Delete: *key = A_DELETE; break;
case XK_Pause: *key = K_PAUSE; break; case XK_Pause: *key = A_PAUSE; break;
case XK_Shift_L: case XK_Shift_L:
case XK_Shift_R: *key = K_SHIFT; break; case XK_Shift_R: *key = A_SHIFT; break;
case XK_Execute: case XK_Execute:
case XK_Control_L: case XK_Control_L:
case XK_Control_R: *key = K_CTRL; break; case XK_Control_R: *key = A_CTRL; break;
case XK_Alt_L: case XK_Alt_L:
case XK_Meta_L: case XK_Meta_L:
case XK_Alt_R: case XK_Alt_R:
case XK_Meta_R: *key = K_ALT; break; case XK_Meta_R: *key = A_ALT; break;
case XK_KP_Begin: *key = K_KP_5; break; case XK_KP_Begin: *key = A_KP_5; break;
case XK_Insert: *key = K_INS; break; case XK_Insert: *key = A_INSERT; break;
case XK_KP_Insert: case XK_KP_Insert:
case XK_KP_0: *key = K_KP_INS; break; case XK_KP_0: *key = A_KP_0; break;
case XK_KP_Multiply: *key = '*'; break; case XK_KP_Multiply: *key = '*'; break;
case XK_KP_Add: *key = K_KP_PLUS; break; case XK_KP_Add: *key = A_KP_PLUS; break;
case XK_KP_Subtract: *key = K_KP_MINUS; break; case XK_KP_Subtract: *key = A_KP_MINUS; break;
case XK_KP_Divide: *key = K_KP_SLASH; break; #if 0
case XK_KP_Divide: *key = A_KP_SLASH; break;
#endif
// bk001130 - from cvs1.17 (mkv) // bk001130 - from cvs1.17 (mkv)
case XK_exclam: *key = '1'; break; case XK_exclam: *key = '1'; break;
@ -411,7 +413,10 @@ static qboolean X11_PendingInput(void) {
FD_ZERO(&fdset); FD_ZERO(&fdset);
FD_SET(x11_fd, &fdset); FD_SET(x11_fd, &fdset);
if ( select(x11_fd+1, &fdset, NULL, NULL, &zero_time) == 1 ) { if ( select(x11_fd+1, &fdset, NULL, NULL, &zero_time) == 1 ) {
return(XPending(dpy)); if (XPending(dpy))
return qtrue;
else
return qfalse;
} }
} }
@ -540,9 +545,9 @@ static void HandleEvents(void)
case ButtonPress: case ButtonPress:
if (event.xbutton.button == 4) { if (event.xbutton.button == 4) {
Sys_QueEvent( 0, SE_KEY, K_MWHEELUP, qtrue, 0, NULL ); Sys_QueEvent( 0, SE_KEY, A_MWHEELUP, qtrue, 0, NULL );
} else if (event.xbutton.button == 5) { } else if (event.xbutton.button == 5) {
Sys_QueEvent( 0, SE_KEY, K_MWHEELDOWN, qtrue, 0, NULL ); Sys_QueEvent( 0, SE_KEY, A_MWHEELDOWN, qtrue, 0, NULL );
} else { } else {
b=-1; b=-1;
if (event.xbutton.button == 1) { if (event.xbutton.button == 1) {
@ -553,15 +558,15 @@ static void HandleEvents(void)
b = 1; b = 1;
} }
Sys_QueEvent( 0, SE_KEY, K_MOUSE1 + b, qtrue, 0, NULL ); Sys_QueEvent( 0, SE_KEY, A_MOUSE1 + b, qtrue, 0, NULL );
} }
break; break;
case ButtonRelease: case ButtonRelease:
if (event.xbutton.button == 4) { if (event.xbutton.button == 4) {
Sys_QueEvent( 0, SE_KEY, K_MWHEELUP, qfalse, 0, NULL ); Sys_QueEvent( 0, SE_KEY, A_MWHEELUP, qfalse, 0, NULL );
} else if (event.xbutton.button == 5) { } else if (event.xbutton.button == 5) {
Sys_QueEvent( 0, SE_KEY, K_MWHEELDOWN, qfalse, 0, NULL ); Sys_QueEvent( 0, SE_KEY, A_MWHEELDOWN, qfalse, 0, NULL );
} else { } else {
b=-1; b=-1;
if (event.xbutton.button == 1) { if (event.xbutton.button == 1) {
@ -571,7 +576,7 @@ static void HandleEvents(void)
} else if (event.xbutton.button == 3) { } else if (event.xbutton.button == 3) {
b = 1; b = 1;
} }
Sys_QueEvent( 0, SE_KEY, K_MOUSE1 + b, qfalse, 0, NULL ); Sys_QueEvent( 0, SE_KEY, A_MOUSE1 + b, qfalse, 0, NULL );
} }
break; break;
@ -730,7 +735,7 @@ static qboolean GLW_StartDriverAndSetMode( const char *drivername,
} }
#endif #endif
err = GLW_SetMode( drivername, mode, fullscreen ); err = (rserr_t) GLW_SetMode( drivername, mode, fullscreen );
switch ( err ) switch ( err )
{ {
@ -861,7 +866,7 @@ int GLW_SetMode( const char *drivername, int mode, qboolean fullscreen )
actualWidth, actualHeight); actualWidth, actualHeight);
} else { } else {
fullscreen = 0; fullscreen = qfalse;
ri.Printf(PRINT_ALL, "XFree86-VidModeExtension: No acceptable modes found\n"); ri.Printf(PRINT_ALL, "XFree86-VidModeExtension: No acceptable modes found\n");
} }
} else { } else {
@ -875,9 +880,6 @@ int GLW_SetMode( const char *drivername, int mode, qboolean fullscreen )
else else
colorbits = r_colorbits->value; colorbits = r_colorbits->value;
if ( !Q_stricmp( r_glDriver->string, _3DFX_DRIVER_NAME ) )
colorbits = 16;
if (!r_depthbits->value) if (!r_depthbits->value)
depthbits = 24; depthbits = 24;
else else
@ -1002,7 +1004,7 @@ int GLW_SetMode( const char *drivername, int mode, qboolean fullscreen )
qglXMakeCurrent(dpy, win, ctx); qglXMakeCurrent(dpy, win, ctx);
// bk001130 - from cvs1.17 (mkv) // bk001130 - from cvs1.17 (mkv)
glstring = qglGetString (GL_RENDERER); glstring = (const char *) qglGetString (GL_RENDERER);
ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glstring ); ri.Printf( PRINT_ALL, "GL_RENDERER: %s\n", glstring );
// bk010122 - new software token (Indirect) // bk010122 - new software token (Indirect)
@ -1149,10 +1151,13 @@ static void GLW_InitExtensions( void )
** GLimp_win.c internal function that that attempts to load and use ** GLimp_win.c internal function that that attempts to load and use
** a specific OpenGL DLL. ** a specific OpenGL DLL.
*/ */
static qboolean GLW_LoadOpenGL( const char *name ) static qboolean GLW_LoadOpenGL()
{ {
char name[1024];
qboolean fullscreen; qboolean fullscreen;
strcpy( name, OPENGL_DRIVER_NAME );
ri.Printf( PRINT_ALL, "...loading %s: ", name ); ri.Printf( PRINT_ALL, "...loading %s: ", name );
// disable the 3Dfx splash screen and set gamma // disable the 3Dfx splash screen and set gamma
@ -1166,7 +1171,7 @@ static qboolean GLW_LoadOpenGL( const char *name )
// load the QGL layer // load the QGL layer
if ( QGL_Init( name ) ) if ( QGL_Init( name ) )
{ {
fullscreen = r_fullscreen->integer; fullscreen = (r_fullscreen->integer) ? qtrue : qfalse;
// create the window and set up the context // create the window and set up the context
if ( !GLW_StartDriverAndSetMode( name, r_mode->integer, fullscreen ) ) if ( !GLW_StartDriverAndSetMode( name, r_mode->integer, fullscreen ) )
@ -1192,6 +1197,17 @@ fail:
return qfalse; return qfalse;
} }
static void GLW_StartOpenGL( void )
{
//
// load and initialize the specific OpenGL driver
//
if ( !GLW_LoadOpenGL() )
{
Com_Error( ERR_FATAL, "GLW_StartOpenGL() - could not load OpenGL subsystem\n" );
}
}
/* /*
** GLimp_Init ** GLimp_Init
** **
@ -1215,69 +1231,41 @@ void GLimp_Init( void )
InitSig(); InitSig();
// Hack here so that if the UI
if ( *r_previousglDriver->string ) {
// The UI changed it on us, hack it back
// This means the renderer can't be changed on the fly
ri.Cvar_Set( "r_glDriver", r_previousglDriver->string );
}
// //
// load and initialize the specific OpenGL driver // load and initialize the specific OpenGL driver
// //
if ( !GLW_LoadOpenGL( r_glDriver->string ) ) GLW_StartOpenGL();
{
if ( !Q_stricmp( r_glDriver->string, OPENGL_DRIVER_NAME ) )
{
attemptedlibGL = qtrue;
}
else if ( !Q_stricmp( r_glDriver->string, _3DFX_DRIVER_NAME ) )
{
attempted3Dfx = qtrue;
}
if ( !attempted3Dfx && !success )
{
attempted3Dfx = qtrue;
if ( GLW_LoadOpenGL( _3DFX_DRIVER_NAME ) )
{
ri.Cvar_Set( "r_glDriver", _3DFX_DRIVER_NAME );
r_glDriver->modified = qfalse;
success = qtrue;
}
}
// try ICD before trying 3Dfx standalone driver
if ( !attemptedlibGL && !success )
{
attemptedlibGL = qtrue;
if ( GLW_LoadOpenGL( OPENGL_DRIVER_NAME ) )
{
ri.Cvar_Set( "r_glDriver", OPENGL_DRIVER_NAME );
r_glDriver->modified = qfalse;
success = qtrue;
}
}
if (!success)
ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem\n" );
}
// Save it in case the UI stomps it
ri.Cvar_Set( "r_previousglDriver", r_glDriver->string );
// This values force the UI to disable driver selection
glConfig.driverType = GLDRV_ICD;
glConfig.hardwareType = GLHW_GENERIC;
// get our config strings // get our config strings
Q_strncpyz( glConfig.vendor_string, qglGetString (GL_VENDOR), sizeof( glConfig.vendor_string ) ); const char* glstring;
Q_strncpyz( glConfig.renderer_string, qglGetString (GL_RENDERER), sizeof( glConfig.renderer_string ) ); glstring = (const char *)qglGetString (GL_VENDOR);
if (*glConfig.renderer_string && glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] == '\n') if (!glstring) {
glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] = 0; glstring = "invalid driver";
Q_strncpyz( glConfig.version_string, qglGetString (GL_VERSION), sizeof( glConfig.version_string ) ); }
Q_strncpyz( glConfig.extensions_string, qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) ); Q_strncpyz( glConfig.vendor_string, glstring, sizeof( glConfig.vendor_string ) );
glstring = (const char *)qglGetString (GL_RENDERER);
if (!glstring) {
glstring = "invalid driver";
}
Q_strncpyz( glConfig.renderer_string, glstring, sizeof( glConfig.renderer_string ) );
glstring = (const char *)qglGetString (GL_VERSION);
if (!glstring) {
glstring = "invalid driver";
}
Q_strncpyz( glConfig.version_string, glstring, sizeof( glConfig.version_string ) );
glstring = (const char *)qglGetString (GL_EXTENSIONS);
if (!glstring) {
glstring = "invalid driver";
}
Q_strncpyz( glConfig.extensions_string, glstring, sizeof( glConfig.extensions_string ) );
// OpenGL driver constants
qglGetIntegerv( GL_MAX_TEXTURE_SIZE, &glConfig.maxTextureSize );
// stubbed or broken drivers may have reported 0...
if ( glConfig.maxTextureSize <= 0 )
{
glConfig.maxTextureSize = 0;
}
// //
// chipset specific configuration // chipset specific configuration
@ -1292,54 +1280,8 @@ void GLimp_Init( void )
// //
if ( Q_stricmp( lastValidRenderer->string, glConfig.renderer_string ) ) if ( Q_stricmp( lastValidRenderer->string, glConfig.renderer_string ) )
{ {
glConfig.hardwareType = GLHW_GENERIC;
ri.Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" ); ri.Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" );
// VOODOO GRAPHICS w/ 2MB
if ( Q_stristr( buf, "voodoo graphics/1 tmu/2 mb" ) )
{
ri.Cvar_Set( "r_picmip", "2" );
ri.Cvar_Get( "r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH );
}
else
{
ri.Cvar_Set( "r_picmip", "1" ); ri.Cvar_Set( "r_picmip", "1" );
if ( Q_stristr( buf, "rage 128" ) || Q_stristr( buf, "rage128" ) )
{
ri.Cvar_Set( "r_finish", "0" );
}
// Savage3D and Savage4 should always have trilinear enabled
else if ( Q_stristr( buf, "savage3d" ) || Q_stristr( buf, "s3 savage4" ) )
{
ri.Cvar_Set( "r_texturemode", "GL_LINEAR_MIPMAP_LINEAR" );
}
}
}
//
// this is where hardware specific workarounds that should be
// detected/initialized every startup should go.
//
if ( Q_stristr( buf, "banshee" ) || Q_stristr( buf, "Voodoo_Graphics" ) )
{
glConfig.hardwareType = GLHW_3DFX_2D3D;
}
else if ( Q_stristr( buf, "rage pro" ) || Q_stristr( buf, "RagePro" ) )
{
glConfig.hardwareType = GLHW_RAGEPRO;
}
else if ( Q_stristr( buf, "permedia2" ) )
{
glConfig.hardwareType = GLHW_PERMEDIA2;
}
else if ( Q_stristr( buf, "riva 128" ) )
{
glConfig.hardwareType = GLHW_RIVA128;
}
else if ( Q_stristr( buf, "riva tnt " ) )
{
} }
ri.Cvar_Set( "r_lastValidRenderer", glConfig.renderer_string ); ri.Cvar_Set( "r_lastValidRenderer", glConfig.renderer_string );
@ -1500,8 +1442,7 @@ void IN_Frame (void) {
// temporarily deactivate if not in the game and // temporarily deactivate if not in the game and
// running on the desktop // running on the desktop
// voodoo always counts as full screen // voodoo always counts as full screen
if (Cvar_VariableValue ("r_fullscreen") == 0 if (Cvar_VariableValue ("r_fullscreen") == 0) {
&& strcmp( Cvar_VariableString("r_glDriver"), _3DFX_DRIVER_NAME ) ) {
IN_DeactivateMouse (); IN_DeactivateMouse ();
return; return;
} }
@ -1537,7 +1478,7 @@ void Sys_SendKeyEvents (void) {
// bk010216 - added stubs for non-Linux UNIXes here // bk010216 - added stubs for non-Linux UNIXes here
// FIXME - use NO_JOYSTICK or something else generic // FIXME - use NO_JOYSTICK or something else generic
#if defined( __FreeBSD__ ) // rb010123 #if 1
void IN_StartupJoystick( void ) {} void IN_StartupJoystick( void ) {}
void IN_JoyMove( void ) {} void IN_JoyMove( void ) {}
#endif #endif

View file

@ -8,34 +8,21 @@
** QGL_Init() - loads libraries, assigns function pointers, etc. ** QGL_Init() - loads libraries, assigns function pointers, etc.
** QGL_Shutdown() - unloads libraries, NULLs function pointers ** QGL_Shutdown() - unloads libraries, NULLs function pointers
*/ */
// bk001204
#include <unistd.h>
#include <sys/types.h>
#include <float.h> #include <float.h>
#include "../game/q_shared.h"
#include "../renderer/tr_local.h" #include "../renderer/tr_local.h"
#include "unix_glw.h" #include "unix_glw.h"
#include "../client/client.h"
// bk001129 - from cvs1.17 (mkv) #include <GL/glx.h>
//#if defined(__FX__)
//#include <GL/fxmesa.h>
//#endif
//#include <GL/glx.h> // bk010216 - FIXME: all of the above redundant? renderer/qgl.h
#include <dlfcn.h> #include <dlfcn.h>
#include <sys/types.h>
#include <unistd.h>
// bk001129 - from cvs1.17 (mkv) #ifndef __stdcall
#if defined(__FX__) #define __stdcall
//FX Mesa Functions
fxMesaContext (*qfxMesaCreateContext)(GLuint win, GrScreenResolution_t, GrScreenRefresh_t, const GLint attribList[]);
fxMesaContext (*qfxMesaCreateBestContext)(GLuint win, GLint width, GLint height, const GLint attribList[]);
void (*qfxMesaDestroyContext)(fxMesaContext ctx);
void (*qfxMesaMakeCurrent)(fxMesaContext ctx);
fxMesaContext (*qfxMesaGetCurrentContext)(void);
void (*qfxMesaSwapBuffers)(void);
#endif #endif
//GLX Functions //GLX Functions
@ -383,15 +370,6 @@ void ( APIENTRY * qglVertex4sv )(const GLshort *v);
void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height); void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t );
void ( APIENTRY * qglActiveTextureARB )( GLenum texture );
void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture );
void ( APIENTRY * qglLockArraysEXT)( int, int);
void ( APIENTRY * qglUnlockArraysEXT) ( void );
void ( APIENTRY * qglPointParameterfEXT)( GLenum param, GLfloat value );
void ( APIENTRY * qglPointParameterfvEXT)( GLenum param, const GLfloat *value );
void ( APIENTRY * qglColorTableEXT)( int, int, int, int, int, const void * ); void ( APIENTRY * qglColorTableEXT)( int, int, int, int, int, const void * );
void ( APIENTRY * qgl3DfxSetPaletteEXT)( GLuint * ); void ( APIENTRY * qgl3DfxSetPaletteEXT)( GLuint * );
void ( APIENTRY * qglSelectTextureSGIS)( GLenum ); void ( APIENTRY * qglSelectTextureSGIS)( GLenum );
@ -2973,16 +2951,6 @@ void QGL_Shutdown( void )
qglVertexPointer = NULL; qglVertexPointer = NULL;
qglViewport = NULL; qglViewport = NULL;
// bk001129 - from cvs1.17 (mkv)
#if defined(__FX__)
qfxMesaCreateContext = NULL;
qfxMesaCreateBestContext = NULL;
qfxMesaDestroyContext = NULL;
qfxMesaMakeCurrent = NULL;
qfxMesaGetCurrentContext = NULL;
qfxMesaSwapBuffers = NULL;
#endif
qglXChooseVisual = NULL; qglXChooseVisual = NULL;
qglXCreateContext = NULL; qglXCreateContext = NULL;
qglXDestroyContext = NULL; qglXDestroyContext = NULL;
@ -3013,12 +2981,28 @@ void *qwglGetProcAddress(char *symbol)
qboolean QGL_Init( const char *dllname ) qboolean QGL_Init( const char *dllname )
{ {
if ( ( glw_state.OpenGLLib = dlopen( dllname, RTLD_LAZY|RTLD_GLOBAL ) ) == 0 ) #if 0 //FIXME
// update 3Dfx gamma irrespective of underlying DLL
{
char envbuffer[1024];
float g;
g = 2.00 * ( 0.8 - ( vid_gamma->value - 0.5 ) ) + 1.0F;
Com_sprintf( envbuffer, sizeof(envbuffer), "SSTV2_GAMMA=%f", g );
putenv( envbuffer );
Com_sprintf( envbuffer, sizeof(envbuffer), "SST_GAMMA=%f", g );
putenv( envbuffer );
}
#endif
if ( ( glw_state.OpenGLLib = dlopen( dllname, RTLD_LAZY ) ) == 0 )
{ {
char fn[1024]; char fn[1024];
// FILE *fp; // bk001204 - unused FILE *fp;
extern uid_t saved_euid; // unix_main.c extern uid_t saved_euid; // unix_main.c
//fprintf(stdout, "uid=%d,euid=%d\n", getuid(), geteuid()); fflush(stdout);
// if we are not setuid, try current directory // if we are not setuid, try current directory
if (getuid() == saved_euid) { if (getuid() == saved_euid) {
getcwd(fn, sizeof(fn)); getcwd(fn, sizeof(fn));
@ -3026,366 +3010,359 @@ qboolean QGL_Init( const char *dllname )
Q_strcat(fn, sizeof(fn), dllname); Q_strcat(fn, sizeof(fn), dllname);
if ( ( glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ) ) == 0 ) { if ( ( glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ) ) == 0 ) {
ri.Printf(PRINT_ALL, "QGL_Init: Can't load %s from /etc/ld.so.conf or current dir: %s\n", dllname, dlerror()); Com_Printf("QGL_Init: Can't load %s from /etc/ld.so.conf or current dir: %s\n", dllname, dlerror());
return qfalse; return qfalse;
} }
} else { } else {
ri.Printf(PRINT_ALL, "QGL_Init: Can't load %s from /etc/ld.so.conf: %s\n", dllname, dlerror()); Com_Printf("QGL_Init: Can't load %s from /etc/ld.so.conf: %s\n", dllname, dlerror());
return qfalse; return qfalse;
} }
} }
qglAccum = dllAccum = GPA( "glAccum" ); qglAccum = dllAccum = (void (__stdcall *)(unsigned int,float))GPA( "glAccum" );
qglAlphaFunc = dllAlphaFunc = GPA( "glAlphaFunc" ); qglAlphaFunc = dllAlphaFunc = (void (__stdcall *)(unsigned int,float))GPA( "glAlphaFunc" );
qglAreTexturesResident = dllAreTexturesResident = GPA( "glAreTexturesResident" ); qglAreTexturesResident = dllAreTexturesResident = (unsigned char (__stdcall *)(int,const unsigned int *,unsigned char *))GPA( "glAreTexturesResident" );
qglArrayElement = dllArrayElement = GPA( "glArrayElement" ); qglArrayElement = dllArrayElement = (void (__stdcall *)(int))GPA( "glArrayElement" );
qglBegin = dllBegin = GPA( "glBegin" ); qglBegin = dllBegin = (void (__stdcall *)(unsigned int))GPA( "glBegin" );
qglBindTexture = dllBindTexture = GPA( "glBindTexture" ); qglBindTexture = dllBindTexture = (void (__stdcall *)(unsigned int,unsigned int))GPA( "glBindTexture" );
qglBitmap = dllBitmap = GPA( "glBitmap" ); qglBitmap = dllBitmap = (void (__stdcall *)(int,int,float,float,float,float,const unsigned char *))GPA( "glBitmap" );
qglBlendFunc = dllBlendFunc = GPA( "glBlendFunc" ); qglBlendFunc = dllBlendFunc = (void (__stdcall *)(unsigned int,unsigned int))GPA( "glBlendFunc" );
qglCallList = dllCallList = GPA( "glCallList" ); qglCallList = dllCallList = (void (__stdcall *)(unsigned int))GPA( "glCallList" );
qglCallLists = dllCallLists = GPA( "glCallLists" ); qglCallLists = dllCallLists = (void (__stdcall *)(int,unsigned int,const void *))GPA( "glCallLists" );
qglClear = dllClear = GPA( "glClear" ); qglClear = dllClear = (void (__stdcall *)(unsigned int))GPA( "glClear" );
qglClearAccum = dllClearAccum = GPA( "glClearAccum" ); qglClearAccum = dllClearAccum = (void (__stdcall *)(float,float,float,float))GPA( "glClearAccum" );
qglClearColor = dllClearColor = GPA( "glClearColor" ); qglClearColor = dllClearColor = (void (__stdcall *)(float,float,float,float))GPA( "glClearColor" );
qglClearDepth = dllClearDepth = GPA( "glClearDepth" ); qglClearDepth = dllClearDepth = (void (__stdcall *)(double))GPA( "glClearDepth" );
qglClearIndex = dllClearIndex = GPA( "glClearIndex" ); qglClearIndex = dllClearIndex = (void (__stdcall *)(float))GPA( "glClearIndex" );
qglClearStencil = dllClearStencil = GPA( "glClearStencil" ); qglClearStencil = dllClearStencil = (void (__stdcall *)(int))GPA( "glClearStencil" );
qglClipPlane = dllClipPlane = GPA( "glClipPlane" ); qglClipPlane = dllClipPlane = (void (__stdcall *)(unsigned int,const double *))GPA( "glClipPlane" );
qglColor3b = dllColor3b = GPA( "glColor3b" ); qglColor3b = dllColor3b = (void (__stdcall *)(signed char,signed char,signed char))GPA( "glColor3b" );
qglColor3bv = dllColor3bv = GPA( "glColor3bv" ); qglColor3bv = dllColor3bv = (void (__stdcall *)(const signed char *))GPA( "glColor3bv" );
qglColor3d = dllColor3d = GPA( "glColor3d" ); qglColor3d = dllColor3d = (void (__stdcall *)(double,double,double))GPA( "glColor3d" );
qglColor3dv = dllColor3dv = GPA( "glColor3dv" ); qglColor3dv = dllColor3dv = (void (__stdcall *)(const double *))GPA( "glColor3dv" );
qglColor3f = dllColor3f = GPA( "glColor3f" ); qglColor3f = dllColor3f = (void (__stdcall *)(float,float,float))GPA( "glColor3f" );
qglColor3fv = dllColor3fv = GPA( "glColor3fv" ); qglColor3fv = dllColor3fv = (void (__stdcall *)(const float *))GPA( "glColor3fv" );
qglColor3i = dllColor3i = GPA( "glColor3i" ); qglColor3i = dllColor3i = (void (__stdcall *)(int,int,int))GPA( "glColor3i" );
qglColor3iv = dllColor3iv = GPA( "glColor3iv" ); qglColor3iv = dllColor3iv = (void (__stdcall *)(const int *))GPA( "glColor3iv" );
qglColor3s = dllColor3s = GPA( "glColor3s" ); qglColor3s = dllColor3s =(void (__stdcall *)(short,short,short))GPA( "glColor3s" );
qglColor3sv = dllColor3sv = GPA( "glColor3sv" ); qglColor3sv = dllColor3sv =(void (__stdcall *)(const short *))GPA( "glColor3sv" );
qglColor3ub = dllColor3ub = GPA( "glColor3ub" ); qglColor3ub = dllColor3ub =(void (__stdcall *)(unsigned char,unsigned char,unsigned char))GPA( "glColor3ub" );
qglColor3ubv = dllColor3ubv = GPA( "glColor3ubv" ); qglColor3ubv = dllColor3ubv =(void (__stdcall *)(const unsigned char *))GPA( "glColor3ubv" );
qglColor3ui = dllColor3ui = GPA( "glColor3ui" ); qglColor3ui = dllColor3ui =(void (__stdcall *)(unsigned int,unsigned int,unsigned int))GPA( "glColor3ui" );
qglColor3uiv = dllColor3uiv = GPA( "glColor3uiv" ); qglColor3uiv = dllColor3uiv =(void (__stdcall *)(const unsigned int *))GPA( "glColor3uiv" );
qglColor3us = dllColor3us = GPA( "glColor3us" ); qglColor3us = dllColor3us =(void (__stdcall *)(unsigned short,unsigned short,unsigned short))GPA( "glColor3us" );
qglColor3usv = dllColor3usv = GPA( "glColor3usv" ); qglColor3usv = dllColor3usv =(void (__stdcall *)(const unsigned short *))GPA( "glColor3usv" );
qglColor4b = dllColor4b = GPA( "glColor4b" ); qglColor4b = dllColor4b =(void (__stdcall *)(signed char,signed char,signed char,signed char))GPA( "glColor4b" );
qglColor4bv = dllColor4bv = GPA( "glColor4bv" ); qglColor4bv = dllColor4bv =(void (__stdcall *)(const signed char *))GPA( "glColor4bv" );
qglColor4d = dllColor4d = GPA( "glColor4d" ); qglColor4d = dllColor4d =(void (__stdcall *)(double,double,double,double))GPA( "glColor4d" );
qglColor4dv = dllColor4dv = GPA( "glColor4dv" ); qglColor4dv = dllColor4dv =(void (__stdcall *)(const double *))GPA( "glColor4dv" );
qglColor4f = dllColor4f = GPA( "glColor4f" ); qglColor4f = dllColor4f =(void (__stdcall *)(float,float,float,float))GPA( "glColor4f" );
qglColor4fv = dllColor4fv = GPA( "glColor4fv" ); qglColor4fv = dllColor4fv =(void (__stdcall *)(const float *))GPA( "glColor4fv" );
qglColor4i = dllColor4i = GPA( "glColor4i" ); qglColor4i = dllColor4i =(void (__stdcall *)(int,int,int,int))GPA( "glColor4i" );
qglColor4iv = dllColor4iv = GPA( "glColor4iv" ); qglColor4iv = dllColor4iv =(void (__stdcall *)(const int *))GPA( "glColor4iv" );
qglColor4s = dllColor4s = GPA( "glColor4s" ); qglColor4s = dllColor4s =(void (__stdcall *)(short,short,short,short))GPA( "glColor4s" );
qglColor4sv = dllColor4sv = GPA( "glColor4sv" ); qglColor4sv = dllColor4sv =(void (__stdcall *)(const short *))GPA( "glColor4sv" );
qglColor4ub = dllColor4ub = GPA( "glColor4ub" ); qglColor4ub = dllColor4ub =(void (__stdcall *)(unsigned char,unsigned char,unsigned char,unsigned char))GPA( "glColor4ub" );
qglColor4ubv = dllColor4ubv = GPA( "glColor4ubv" ); qglColor4ubv = dllColor4ubv =(void (__stdcall *)(const unsigned char *))GPA( "glColor4ubv" );
qglColor4ui = dllColor4ui = GPA( "glColor4ui" ); qglColor4ui = dllColor4ui =(void (__stdcall *)(unsigned int,unsigned int,unsigned int,unsigned int))GPA( "glColor4ui" );
qglColor4uiv = dllColor4uiv = GPA( "glColor4uiv" ); qglColor4uiv = dllColor4uiv =(void (__stdcall *)(const unsigned int *))GPA( "glColor4uiv" );
qglColor4us = dllColor4us = GPA( "glColor4us" ); qglColor4us = dllColor4us =(void (__stdcall *)(unsigned short,unsigned short,unsigned short,unsigned short))GPA( "glColor4us" );
qglColor4usv = dllColor4usv = GPA( "glColor4usv" ); qglColor4usv = dllColor4usv =(void (__stdcall *)(const unsigned short *))GPA( "glColor4usv" );
qglColorMask = dllColorMask = GPA( "glColorMask" ); qglColorMask = dllColorMask =(void (__stdcall *)(unsigned char,unsigned char,unsigned char,unsigned char))GPA( "glColorMask" );
qglColorMaterial = dllColorMaterial = GPA( "glColorMaterial" ); qglColorMaterial = dllColorMaterial =(void (__stdcall *)(unsigned int,unsigned int))GPA( "glColorMaterial" );
qglColorPointer = dllColorPointer = GPA( "glColorPointer" ); qglColorPointer = dllColorPointer =(void (__stdcall *)(int,unsigned int,int,const void *))GPA( "glColorPointer" );
qglCopyPixels = dllCopyPixels = GPA( "glCopyPixels" ); qglCopyPixels = dllCopyPixels =(void (__stdcall *)(int,int,int,int,unsigned int))GPA( "glCopyPixels" );
qglCopyTexImage1D = dllCopyTexImage1D = GPA( "glCopyTexImage1D" ); qglCopyTexImage1D = dllCopyTexImage1D =(void (__stdcall *)(unsigned int,int,unsigned int,int,int,int,int))GPA( "glCopyTexImage1D" );
qglCopyTexImage2D = dllCopyTexImage2D = GPA( "glCopyTexImage2D" ); qglCopyTexImage2D = dllCopyTexImage2D =(void (__stdcall *)(unsigned int,int,unsigned int,int,int,int,int,int))GPA( "glCopyTexImage2D" );
qglCopyTexSubImage1D = dllCopyTexSubImage1D = GPA( "glCopyTexSubImage1D" ); qglCopyTexSubImage1D = dllCopyTexSubImage1D =(void (__stdcall *)(unsigned int,int,int,int,int,int))GPA( "glCopyTexSubImage1D" );
qglCopyTexSubImage2D = dllCopyTexSubImage2D = GPA( "glCopyTexSubImage2D" ); qglCopyTexSubImage2D = dllCopyTexSubImage2D =(void (__stdcall *)(unsigned int,int,int,int,int,int,int,int))GPA( "glCopyTexSubImage2D" );
qglCullFace = dllCullFace = GPA( "glCullFace" ); qglCullFace = dllCullFace =(void (__stdcall *)(unsigned int))GPA( "glCullFace" );
qglDeleteLists = dllDeleteLists = GPA( "glDeleteLists" ); qglDeleteLists = dllDeleteLists =(void (__stdcall *)(unsigned int,int))GPA( "glDeleteLists" );
qglDeleteTextures = dllDeleteTextures = GPA( "glDeleteTextures" ); qglDeleteTextures = dllDeleteTextures =(void (__stdcall *)(int,const unsigned int *))GPA( "glDeleteTextures" );
qglDepthFunc = dllDepthFunc = GPA( "glDepthFunc" ); qglDepthFunc = dllDepthFunc =(void (__stdcall *)(unsigned int))GPA( "glDepthFunc" );
qglDepthMask = dllDepthMask = GPA( "glDepthMask" ); qglDepthMask = dllDepthMask =(void (__stdcall *)(unsigned char))GPA( "glDepthMask" );
qglDepthRange = dllDepthRange = GPA( "glDepthRange" ); qglDepthRange = dllDepthRange =(void (__stdcall *)(double,double))GPA( "glDepthRange" );
qglDisable = dllDisable = GPA( "glDisable" ); qglDisable = dllDisable =(void (__stdcall *)(unsigned int))GPA( "glDisable" );
qglDisableClientState = dllDisableClientState = GPA( "glDisableClientState" ); qglDisableClientState = dllDisableClientState =(void (__stdcall *)(unsigned int))GPA( "glDisableClientState" );
qglDrawArrays = dllDrawArrays = GPA( "glDrawArrays" ); qglDrawArrays = dllDrawArrays =(void (__stdcall *)(unsigned int,int,int))GPA( "glDrawArrays" );
qglDrawBuffer = dllDrawBuffer = GPA( "glDrawBuffer" ); qglDrawBuffer = dllDrawBuffer =(void (__stdcall *)(unsigned int))GPA( "glDrawBuffer" );
qglDrawElements = dllDrawElements = GPA( "glDrawElements" ); qglDrawElements = dllDrawElements =(void (__stdcall *)(unsigned int,int,unsigned int,const void *))GPA( "glDrawElements" );
qglDrawPixels = dllDrawPixels = GPA( "glDrawPixels" ); qglDrawPixels = dllDrawPixels =(void (__stdcall *)(int,int,unsigned int,unsigned int,const void *))GPA( "glDrawPixels" );
qglEdgeFlag = dllEdgeFlag = GPA( "glEdgeFlag" ); qglEdgeFlag = dllEdgeFlag =(void (__stdcall *)(unsigned char))GPA( "glEdgeFlag" );
qglEdgeFlagPointer = dllEdgeFlagPointer = GPA( "glEdgeFlagPointer" ); qglEdgeFlagPointer = dllEdgeFlagPointer =(void (__stdcall *)(int,const void *))GPA( "glEdgeFlagPointer" );
qglEdgeFlagv = dllEdgeFlagv = GPA( "glEdgeFlagv" ); qglEdgeFlagv = dllEdgeFlagv =(void (__stdcall *)(const unsigned char *))GPA( "glEdgeFlagv" );
qglEnable = dllEnable = GPA( "glEnable" ); qglEnable = dllEnable =(void (__stdcall *)(unsigned int))GPA( "glEnable" );
qglEnableClientState = dllEnableClientState = GPA( "glEnableClientState" ); qglEnableClientState = dllEnableClientState =(void (__stdcall *)(unsigned int))GPA( "glEnableClientState" );
qglEnd = dllEnd = GPA( "glEnd" ); qglEnd = dllEnd =(void (__stdcall *)(void))GPA( "glEnd" );
qglEndList = dllEndList = GPA( "glEndList" ); qglEndList = dllEndList =(void (__stdcall *)(void))GPA( "glEndList" );
qglEvalCoord1d = dllEvalCoord1d = GPA( "glEvalCoord1d" ); qglEvalCoord1d = dllEvalCoord1d =(void (__stdcall *)(double))GPA( "glEvalCoord1d" );
qglEvalCoord1dv = dllEvalCoord1dv = GPA( "glEvalCoord1dv" ); qglEvalCoord1dv = dllEvalCoord1dv =(void (__stdcall *)(const double *))GPA( "glEvalCoord1dv" );
qglEvalCoord1f = dllEvalCoord1f = GPA( "glEvalCoord1f" ); qglEvalCoord1f = dllEvalCoord1f =(void (__stdcall *)(float))GPA( "glEvalCoord1f" );
qglEvalCoord1fv = dllEvalCoord1fv = GPA( "glEvalCoord1fv" ); qglEvalCoord1fv = dllEvalCoord1fv =(void (__stdcall *)(const float *))GPA( "glEvalCoord1fv" );
qglEvalCoord2d = dllEvalCoord2d = GPA( "glEvalCoord2d" ); qglEvalCoord2d = dllEvalCoord2d =(void (__stdcall *)(double,double))GPA( "glEvalCoord2d" );
qglEvalCoord2dv = dllEvalCoord2dv = GPA( "glEvalCoord2dv" ); qglEvalCoord2dv = dllEvalCoord2dv =(void (__stdcall *)(const double *))GPA( "glEvalCoord2dv" );
qglEvalCoord2f = dllEvalCoord2f = GPA( "glEvalCoord2f" ); qglEvalCoord2f = dllEvalCoord2f =(void (__stdcall *)(float,float))GPA( "glEvalCoord2f" );
qglEvalCoord2fv = dllEvalCoord2fv = GPA( "glEvalCoord2fv" ); qglEvalCoord2fv = dllEvalCoord2fv =(void (__stdcall *)(const float *))GPA( "glEvalCoord2fv" );
qglEvalMesh1 = dllEvalMesh1 = GPA( "glEvalMesh1" ); qglEvalMesh1 = dllEvalMesh1 =(void (__stdcall *)(unsigned int,int,int))GPA( "glEvalMesh1" );
qglEvalMesh2 = dllEvalMesh2 = GPA( "glEvalMesh2" ); qglEvalMesh2 = dllEvalMesh2 =(void (__stdcall *)(unsigned int,int,int,int,int))GPA( "glEvalMesh2" );
qglEvalPoint1 = dllEvalPoint1 = GPA( "glEvalPoint1" ); qglEvalPoint1 = dllEvalPoint1 =(void (__stdcall *)(int))GPA( "glEvalPoint1" );
qglEvalPoint2 = dllEvalPoint2 = GPA( "glEvalPoint2" ); qglEvalPoint2 = dllEvalPoint2 =(void (__stdcall *)(int,int))GPA( "glEvalPoint2" );
qglFeedbackBuffer = dllFeedbackBuffer = GPA( "glFeedbackBuffer" ); qglFeedbackBuffer = dllFeedbackBuffer =(void (__stdcall *)(int,unsigned int,float *))GPA( "glFeedbackBuffer" );
qglFinish = dllFinish = GPA( "glFinish" ); qglFinish = dllFinish =(void (__stdcall *)(void))GPA( "glFinish" );
qglFlush = dllFlush = GPA( "glFlush" ); qglFlush = dllFlush =(void (__stdcall *)(void))GPA( "glFlush" );
qglFogf = dllFogf = GPA( "glFogf" ); qglFogf = dllFogf =(void (__stdcall *)(unsigned int,float))GPA( "glFogf" );
qglFogfv = dllFogfv = GPA( "glFogfv" ); qglFogfv = dllFogfv =(void (__stdcall *)(unsigned int,const float *))GPA( "glFogfv" );
qglFogi = dllFogi = GPA( "glFogi" ); qglFogi = dllFogi =(void (__stdcall *)(unsigned int,int))GPA( "glFogi" );
qglFogiv = dllFogiv = GPA( "glFogiv" ); qglFogiv = dllFogiv =(void (__stdcall *)(unsigned int,const int *))GPA( "glFogiv" );
qglFrontFace = dllFrontFace = GPA( "glFrontFace" ); qglFrontFace = dllFrontFace =(void (__stdcall *)(unsigned int))GPA( "glFrontFace" );
qglFrustum = dllFrustum = GPA( "glFrustum" ); qglFrustum = dllFrustum =(void (__stdcall *)(double,double,double,double,double,double))GPA( "glFrustum" );
qglGenLists = dllGenLists = GPA( "glGenLists" ); qglGenLists = dllGenLists =(unsigned int (__stdcall *)(int))GPA( "glGenLists" );
qglGenTextures = dllGenTextures = GPA( "glGenTextures" ); qglGenTextures = dllGenTextures =(void (__stdcall *)(int,unsigned int *))GPA( "glGenTextures" );
qglGetBooleanv = dllGetBooleanv = GPA( "glGetBooleanv" ); qglGetBooleanv = dllGetBooleanv =(void (__stdcall *)(unsigned int,unsigned char *))GPA( "glGetBooleanv" );
qglGetClipPlane = dllGetClipPlane = GPA( "glGetClipPlane" ); qglGetClipPlane = dllGetClipPlane =(void (__stdcall *)(unsigned int,double *))GPA( "glGetClipPlane" );
qglGetDoublev = dllGetDoublev = GPA( "glGetDoublev" ); qglGetDoublev = dllGetDoublev =(void (__stdcall *)(unsigned int,double *))GPA( "glGetDoublev" );
qglGetError = dllGetError = GPA( "glGetError" ); qglGetError = dllGetError =(unsigned int (__stdcall *)(void))GPA( "glGetError" );
qglGetFloatv = dllGetFloatv = GPA( "glGetFloatv" ); qglGetFloatv = dllGetFloatv =(void (__stdcall *)(unsigned int,float *))GPA( "glGetFloatv" );
qglGetIntegerv = dllGetIntegerv = GPA( "glGetIntegerv" ); qglGetIntegerv = dllGetIntegerv =(void (__stdcall *)(unsigned int,int *))GPA( "glGetIntegerv" );
qglGetLightfv = dllGetLightfv = GPA( "glGetLightfv" ); qglGetLightfv = dllGetLightfv =(void (__stdcall *)(unsigned int,unsigned int,float *))GPA( "glGetLightfv" );
qglGetLightiv = dllGetLightiv = GPA( "glGetLightiv" ); qglGetLightiv = dllGetLightiv =(void (__stdcall *)(unsigned int,unsigned int,int *))GPA( "glGetLightiv" );
qglGetMapdv = dllGetMapdv = GPA( "glGetMapdv" ); qglGetMapdv = dllGetMapdv =(void (__stdcall *)(unsigned int,unsigned int,double *))GPA( "glGetMapdv" );
qglGetMapfv = dllGetMapfv = GPA( "glGetMapfv" ); qglGetMapfv = dllGetMapfv =(void (__stdcall *)(unsigned int,unsigned int,float *))GPA( "glGetMapfv" );
qglGetMapiv = dllGetMapiv = GPA( "glGetMapiv" ); qglGetMapiv = dllGetMapiv =(void (__stdcall *)(unsigned int,unsigned int,int *))GPA( "glGetMapiv" );
qglGetMaterialfv = dllGetMaterialfv = GPA( "glGetMaterialfv" ); qglGetMaterialfv = dllGetMaterialfv =(void (__stdcall *)(unsigned int,unsigned int,float *))GPA( "glGetMaterialfv" );
qglGetMaterialiv = dllGetMaterialiv = GPA( "glGetMaterialiv" ); qglGetMaterialiv = dllGetMaterialiv =(void (__stdcall *)(unsigned int,unsigned int,int *))GPA( "glGetMaterialiv" );
qglGetPixelMapfv = dllGetPixelMapfv = GPA( "glGetPixelMapfv" ); qglGetPixelMapfv = dllGetPixelMapfv =(void (__stdcall *)(unsigned int,float *))GPA( "glGetPixelMapfv" );
qglGetPixelMapuiv = dllGetPixelMapuiv = GPA( "glGetPixelMapuiv" ); qglGetPixelMapuiv = dllGetPixelMapuiv =(void (__stdcall *)(unsigned int,unsigned int *))GPA( "glGetPixelMapuiv" );
qglGetPixelMapusv = dllGetPixelMapusv = GPA( "glGetPixelMapusv" ); qglGetPixelMapusv = dllGetPixelMapusv =(void (__stdcall *)(unsigned int,unsigned short *))GPA( "glGetPixelMapusv" );
qglGetPointerv = dllGetPointerv = GPA( "glGetPointerv" ); qglGetPointerv = dllGetPointerv =(void (__stdcall *)(unsigned int,void ** ))GPA( "glGetPointerv" );
qglGetPolygonStipple = dllGetPolygonStipple = GPA( "glGetPolygonStipple" ); qglGetPolygonStipple = dllGetPolygonStipple =(void (__stdcall *)(unsigned char *))GPA( "glGetPolygonStipple" );
qglGetString = dllGetString = GPA( "glGetString" ); qglGetString = dllGetString =(const unsigned char *(__stdcall *)(unsigned int))GPA( "glGetString" );
qglGetTexEnvfv = dllGetTexEnvfv = GPA( "glGetTexEnvfv" ); qglGetTexEnvfv = dllGetTexEnvfv =(void (__stdcall *)(unsigned int,unsigned int,float *))GPA( "glGetTexEnvfv" );
qglGetTexEnviv = dllGetTexEnviv = GPA( "glGetTexEnviv" ); qglGetTexEnviv = dllGetTexEnviv =(void (__stdcall *)(unsigned int,unsigned int,int *))GPA( "glGetTexEnviv" );
qglGetTexGendv = dllGetTexGendv = GPA( "glGetTexGendv" ); qglGetTexGendv = dllGetTexGendv =(void (__stdcall *)(unsigned int,unsigned int,double *))GPA( "glGetTexGendv" );
qglGetTexGenfv = dllGetTexGenfv = GPA( "glGetTexGenfv" ); qglGetTexGenfv = dllGetTexGenfv =(void (__stdcall *)(unsigned int,unsigned int,float *))GPA( "glGetTexGenfv" );
qglGetTexGeniv = dllGetTexGeniv = GPA( "glGetTexGeniv" ); qglGetTexGeniv = dllGetTexGeniv =(void (__stdcall *)(unsigned int,unsigned int,int *))GPA( "glGetTexGeniv" );
qglGetTexImage = dllGetTexImage = GPA( "glGetTexImage" ); qglGetTexImage = dllGetTexImage =(void (__stdcall *)(unsigned int,int,unsigned int,unsigned int,void *))GPA( "glGetTexImage" );
qglGetTexParameterfv = dllGetTexParameterfv = GPA( "glGetTexParameterfv" ); // qglGetTexLevelParameterfv = dllGetTexLevelParameterfv =(void (__stdcall *)(unsigned int,int,unsigned int,float *))GPA( "glGetTexLevelParameterfv" );
qglGetTexParameteriv = dllGetTexParameteriv = GPA( "glGetTexParameteriv" ); // qglGetTexLevelParameteriv = dllGetTexLevelParameteriv =(void (__stdcall *)(unsigned int,int,unsigned int,int *))GPA( "glGetTexLevelParameteriv" );
qglHint = dllHint = GPA( "glHint" ); qglGetTexParameterfv = dllGetTexParameterfv =(void (__stdcall *)(unsigned int,unsigned int,float *))GPA( "glGetTexParameterfv" );
qglIndexMask = dllIndexMask = GPA( "glIndexMask" ); qglGetTexParameteriv = dllGetTexParameteriv =(void (__stdcall *)(unsigned int,unsigned int,int *))GPA( "glGetTexParameteriv" );
qglIndexPointer = dllIndexPointer = GPA( "glIndexPointer" ); qglHint = dllHint =(void (__stdcall *)(unsigned int,unsigned int))GPA( "glHint" );
qglIndexd = dllIndexd = GPA( "glIndexd" ); qglIndexMask = dllIndexMask =(void (__stdcall *)(unsigned int))GPA( "glIndexMask" );
qglIndexdv = dllIndexdv = GPA( "glIndexdv" ); qglIndexPointer = dllIndexPointer =(void (__stdcall *)(unsigned int,int,const void *))GPA( "glIndexPointer" );
qglIndexf = dllIndexf = GPA( "glIndexf" ); qglIndexd = dllIndexd =(void (__stdcall *)(double))GPA( "glIndexd" );
qglIndexfv = dllIndexfv = GPA( "glIndexfv" ); qglIndexdv = dllIndexdv =(void (__stdcall *)(const double *))GPA( "glIndexdv" );
qglIndexi = dllIndexi = GPA( "glIndexi" ); qglIndexf = dllIndexf =(void (__stdcall *)(float))GPA( "glIndexf" );
qglIndexiv = dllIndexiv = GPA( "glIndexiv" ); qglIndexfv = dllIndexfv =(void (__stdcall *)(const float *))GPA( "glIndexfv" );
qglIndexs = dllIndexs = GPA( "glIndexs" ); qglIndexi = dllIndexi =(void (__stdcall *)(int))GPA( "glIndexi" );
qglIndexsv = dllIndexsv = GPA( "glIndexsv" ); qglIndexiv = dllIndexiv =(void (__stdcall *)(const int *))GPA( "glIndexiv" );
qglIndexub = dllIndexub = GPA( "glIndexub" ); qglIndexs = dllIndexs =(void (__stdcall *)(short))GPA( "glIndexs" );
qglIndexubv = dllIndexubv = GPA( "glIndexubv" ); qglIndexsv = dllIndexsv =(void (__stdcall *)(const short *))GPA( "glIndexsv" );
qglInitNames = dllInitNames = GPA( "glInitNames" ); qglIndexub = dllIndexub =(void (__stdcall *)(unsigned char))GPA( "glIndexub" );
qglInterleavedArrays = dllInterleavedArrays = GPA( "glInterleavedArrays" ); qglIndexubv = dllIndexubv =(void (__stdcall *)(const unsigned char *))GPA( "glIndexubv" );
qglIsEnabled = dllIsEnabled = GPA( "glIsEnabled" ); qglInitNames = dllInitNames =(void (__stdcall *)(void))GPA( "glInitNames" );
qglIsList = dllIsList = GPA( "glIsList" ); qglInterleavedArrays = dllInterleavedArrays =(void (__stdcall *)(unsigned int,int,const void *))GPA( "glInterleavedArrays" );
qglIsTexture = dllIsTexture = GPA( "glIsTexture" ); qglIsEnabled = dllIsEnabled =(unsigned char (__stdcall *)(unsigned int))GPA( "glIsEnabled" );
qglLightModelf = dllLightModelf = GPA( "glLightModelf" ); qglIsList = dllIsList =(unsigned char (__stdcall *)(unsigned int))GPA( "glIsList" );
qglLightModelfv = dllLightModelfv = GPA( "glLightModelfv" ); qglIsTexture = dllIsTexture =(unsigned char (__stdcall *)(unsigned int))GPA( "glIsTexture" );
qglLightModeli = dllLightModeli = GPA( "glLightModeli" ); qglLightModelf = dllLightModelf =(void (__stdcall *)(unsigned int,float))GPA( "glLightModelf" );
qglLightModeliv = dllLightModeliv = GPA( "glLightModeliv" ); qglLightModelfv = dllLightModelfv =(void (__stdcall *)(unsigned int,const float *))GPA( "glLightModelfv" );
qglLightf = dllLightf = GPA( "glLightf" ); qglLightModeli = dllLightModeli =(void (__stdcall *)(unsigned int,int))GPA( "glLightModeli" );
qglLightfv = dllLightfv = GPA( "glLightfv" ); qglLightModeliv = dllLightModeliv =(void (__stdcall *)(unsigned int,const int *))GPA( "glLightModeliv" );
qglLighti = dllLighti = GPA( "glLighti" ); qglLightf = dllLightf =(void (__stdcall *)(unsigned int,unsigned int,float))GPA( "glLightf" );
qglLightiv = dllLightiv = GPA( "glLightiv" ); qglLightfv = dllLightfv =(void (__stdcall *)(unsigned int,unsigned int,const float *))GPA( "glLightfv" );
qglLineStipple = dllLineStipple = GPA( "glLineStipple" ); qglLighti = dllLighti =(void (__stdcall *)(unsigned int,unsigned int,int))GPA( "glLighti" );
qglLineWidth = dllLineWidth = GPA( "glLineWidth" ); qglLightiv = dllLightiv =(void (__stdcall *)(unsigned int,unsigned int,const int *))GPA( "glLightiv" );
qglListBase = dllListBase = GPA( "glListBase" ); qglLineStipple = dllLineStipple =(void (__stdcall *)(int,unsigned short))GPA( "glLineStipple" );
qglLoadIdentity = dllLoadIdentity = GPA( "glLoadIdentity" ); qglLineWidth = dllLineWidth =(void (__stdcall *)(float))GPA( "glLineWidth" );
qglLoadMatrixd = dllLoadMatrixd = GPA( "glLoadMatrixd" ); qglListBase = dllListBase =(void (__stdcall *)(unsigned int))GPA( "glListBase" );
qglLoadMatrixf = dllLoadMatrixf = GPA( "glLoadMatrixf" ); qglLoadIdentity = dllLoadIdentity =(void (__stdcall *)(void))GPA( "glLoadIdentity" );
qglLoadName = dllLoadName = GPA( "glLoadName" ); qglLoadMatrixd = dllLoadMatrixd =(void (__stdcall *)(const double *))GPA( "glLoadMatrixd" );
qglLogicOp = dllLogicOp = GPA( "glLogicOp" ); qglLoadMatrixf = dllLoadMatrixf =(void (__stdcall *)(const float *))GPA( "glLoadMatrixf" );
qglMap1d = dllMap1d = GPA( "glMap1d" ); qglLoadName = dllLoadName =(void (__stdcall *)(unsigned int))GPA( "glLoadName" );
qglMap1f = dllMap1f = GPA( "glMap1f" ); qglLogicOp = dllLogicOp =(void (__stdcall *)(unsigned int))GPA( "glLogicOp" );
qglMap2d = dllMap2d = GPA( "glMap2d" ); qglMap1d = dllMap1d =(void (__stdcall *)(unsigned int,double,double,int,int,const double *))GPA( "glMap1d" );
qglMap2f = dllMap2f = GPA( "glMap2f" ); qglMap1f = dllMap1f =(void (__stdcall *)(unsigned int,float,float,int,int,const float *))GPA( "glMap1f" );
qglMapGrid1d = dllMapGrid1d = GPA( "glMapGrid1d" ); qglMap2d = dllMap2d =(void (__stdcall *)(unsigned int,double,double,int,int,double,double,int,int,const double *))GPA( "glMap2d" );
qglMapGrid1f = dllMapGrid1f = GPA( "glMapGrid1f" ); qglMap2f = dllMap2f =(void (__stdcall *)(unsigned int,float,float,int,int,float,float,int,int,const float *))GPA( "glMap2f" );
qglMapGrid2d = dllMapGrid2d = GPA( "glMapGrid2d" ); qglMapGrid1d = dllMapGrid1d =(void (__stdcall *)(int,double,double))GPA( "glMapGrid1d" );
qglMapGrid2f = dllMapGrid2f = GPA( "glMapGrid2f" ); qglMapGrid1f = dllMapGrid1f =(void (__stdcall *)(int,float,float))GPA( "glMapGrid1f" );
qglMaterialf = dllMaterialf = GPA( "glMaterialf" ); qglMapGrid2d = dllMapGrid2d =(void (__stdcall *)(int,double,double,int,double,double))GPA( "glMapGrid2d" );
qglMaterialfv = dllMaterialfv = GPA( "glMaterialfv" ); qglMapGrid2f = dllMapGrid2f =(void (__stdcall *)(int,float,float,int,float,float))GPA( "glMapGrid2f" );
qglMateriali = dllMateriali = GPA( "glMateriali" ); qglMaterialf = dllMaterialf =(void (__stdcall *)(unsigned int,unsigned int,float))GPA( "glMaterialf" );
qglMaterialiv = dllMaterialiv = GPA( "glMaterialiv" ); qglMaterialfv = dllMaterialfv =(void (__stdcall *)(unsigned int,unsigned int,const float *))GPA( "glMaterialfv" );
qglMatrixMode = dllMatrixMode = GPA( "glMatrixMode" ); qglMateriali = dllMateriali =(void (__stdcall *)(unsigned int,unsigned int,int))GPA( "glMateriali" );
qglMultMatrixd = dllMultMatrixd = GPA( "glMultMatrixd" ); qglMaterialiv = dllMaterialiv =(void (__stdcall *)(unsigned int,unsigned int,const int *))GPA( "glMaterialiv" );
qglMultMatrixf = dllMultMatrixf = GPA( "glMultMatrixf" ); qglMatrixMode = dllMatrixMode =(void (__stdcall *)(unsigned int))GPA( "glMatrixMode" );
qglNewList = dllNewList = GPA( "glNewList" ); qglMultMatrixd = dllMultMatrixd =(void (__stdcall *)(const double *))GPA( "glMultMatrixd" );
qglNormal3b = dllNormal3b = GPA( "glNormal3b" ); qglMultMatrixf = dllMultMatrixf =(void (__stdcall *)(const float *))GPA( "glMultMatrixf" );
qglNormal3bv = dllNormal3bv = GPA( "glNormal3bv" ); qglNewList = dllNewList =(void (__stdcall *)(unsigned int,unsigned int))GPA( "glNewList" );
qglNormal3d = dllNormal3d = GPA( "glNormal3d" ); qglNormal3b = dllNormal3b =(void (__stdcall *)(signed char,signed char,signed char))GPA( "glNormal3b" );
qglNormal3dv = dllNormal3dv = GPA( "glNormal3dv" ); qglNormal3bv = dllNormal3bv =(void (__stdcall *)(const signed char *))GPA( "glNormal3bv" );
qglNormal3f = dllNormal3f = GPA( "glNormal3f" ); qglNormal3d = dllNormal3d =(void (__stdcall *)(double,double,double))GPA( "glNormal3d" );
qglNormal3fv = dllNormal3fv = GPA( "glNormal3fv" ); qglNormal3dv = dllNormal3dv =(void (__stdcall *)(const double *))GPA( "glNormal3dv" );
qglNormal3i = dllNormal3i = GPA( "glNormal3i" ); qglNormal3f = dllNormal3f =(void (__stdcall *)(float,float,float))GPA( "glNormal3f" );
qglNormal3iv = dllNormal3iv = GPA( "glNormal3iv" ); qglNormal3fv = dllNormal3fv =(void (__stdcall *)(const float *))GPA( "glNormal3fv" );
qglNormal3s = dllNormal3s = GPA( "glNormal3s" ); qglNormal3i = dllNormal3i =(void (__stdcall *)(int,int,int))GPA( "glNormal3i" );
qglNormal3sv = dllNormal3sv = GPA( "glNormal3sv" ); qglNormal3iv = dllNormal3iv =(void (__stdcall *)(const int *))GPA( "glNormal3iv" );
qglNormalPointer = dllNormalPointer = GPA( "glNormalPointer" ); qglNormal3s = dllNormal3s =(void (__stdcall *)(short,short,short))GPA( "glNormal3s" );
qglOrtho = dllOrtho = GPA( "glOrtho" ); qglNormal3sv = dllNormal3sv =(void (__stdcall *)(const short *))GPA( "glNormal3sv" );
qglPassThrough = dllPassThrough = GPA( "glPassThrough" ); qglNormalPointer = dllNormalPointer =(void (__stdcall *)(unsigned int,int,const void *))GPA( "glNormalPointer" );
qglPixelMapfv = dllPixelMapfv = GPA( "glPixelMapfv" ); qglOrtho = dllOrtho =(void (__stdcall *)(double,double,double,double,double,double))GPA( "glOrtho" );
qglPixelMapuiv = dllPixelMapuiv = GPA( "glPixelMapuiv" ); qglPassThrough = dllPassThrough =(void (__stdcall *)(float))GPA( "glPassThrough" );
qglPixelMapusv = dllPixelMapusv = GPA( "glPixelMapusv" ); qglPixelMapfv = dllPixelMapfv =(void (__stdcall *)(unsigned int,int,const float *))GPA( "glPixelMapfv" );
qglPixelStoref = dllPixelStoref = GPA( "glPixelStoref" ); qglPixelMapuiv = dllPixelMapuiv =(void (__stdcall *)(unsigned int,int,const unsigned int *))GPA( "glPixelMapuiv" );
qglPixelStorei = dllPixelStorei = GPA( "glPixelStorei" ); qglPixelMapusv = dllPixelMapusv =(void (__stdcall *)(unsigned int,int,const unsigned short *))GPA( "glPixelMapusv" );
qglPixelTransferf = dllPixelTransferf = GPA( "glPixelTransferf" ); qglPixelStoref = dllPixelStoref =(void (__stdcall *)(unsigned int,float))GPA( "glPixelStoref" );
qglPixelTransferi = dllPixelTransferi = GPA( "glPixelTransferi" ); qglPixelStorei = dllPixelStorei =(void (__stdcall *)(unsigned int,int))GPA( "glPixelStorei" );
qglPixelZoom = dllPixelZoom = GPA( "glPixelZoom" ); qglPixelTransferf = dllPixelTransferf =(void (__stdcall *)(unsigned int,float))GPA( "glPixelTransferf" );
qglPointSize = dllPointSize = GPA( "glPointSize" ); qglPixelTransferi = dllPixelTransferi =(void (__stdcall *)(unsigned int,int))GPA( "glPixelTransferi" );
qglPolygonMode = dllPolygonMode = GPA( "glPolygonMode" ); qglPixelZoom = dllPixelZoom =(void (__stdcall *)(float,float))GPA( "glPixelZoom" );
qglPolygonOffset = dllPolygonOffset = GPA( "glPolygonOffset" ); qglPointSize = dllPointSize =(void (__stdcall *)(float))GPA( "glPointSize" );
qglPolygonStipple = dllPolygonStipple = GPA( "glPolygonStipple" ); qglPolygonMode = dllPolygonMode =(void (__stdcall *)(unsigned int,unsigned int))GPA( "glPolygonMode" );
qglPopAttrib = dllPopAttrib = GPA( "glPopAttrib" ); qglPolygonOffset = dllPolygonOffset =(void (__stdcall *)(float,float))GPA( "glPolygonOffset" );
qglPopClientAttrib = dllPopClientAttrib = GPA( "glPopClientAttrib" ); qglPolygonStipple = dllPolygonStipple =(void (__stdcall *)(const unsigned char *))GPA( "glPolygonStipple" );
qglPopMatrix = dllPopMatrix = GPA( "glPopMatrix" ); qglPopAttrib = dllPopAttrib =(void (__stdcall *)(void))GPA( "glPopAttrib" );
qglPopName = dllPopName = GPA( "glPopName" ); qglPopClientAttrib = dllPopClientAttrib =(void (__stdcall *)(void))GPA( "glPopClientAttrib" );
qglPrioritizeTextures = dllPrioritizeTextures = GPA( "glPrioritizeTextures" ); qglPopMatrix = dllPopMatrix =(void (__stdcall *)(void))GPA( "glPopMatrix" );
qglPushAttrib = dllPushAttrib = GPA( "glPushAttrib" ); qglPopName = dllPopName =(void (__stdcall *)(void))GPA( "glPopName" );
qglPushClientAttrib = dllPushClientAttrib = GPA( "glPushClientAttrib" ); qglPrioritizeTextures = dllPrioritizeTextures =(void (__stdcall *)(int,const unsigned int *,const float *))GPA( "glPrioritizeTextures" );
qglPushMatrix = dllPushMatrix = GPA( "glPushMatrix" ); qglPushAttrib = dllPushAttrib =(void (__stdcall *)(unsigned int))GPA( "glPushAttrib" );
qglPushName = dllPushName = GPA( "glPushName" ); qglPushClientAttrib = dllPushClientAttrib =(void (__stdcall *)(unsigned int))GPA( "glPushClientAttrib" );
qglRasterPos2d = dllRasterPos2d = GPA( "glRasterPos2d" ); qglPushMatrix = dllPushMatrix =(void (__stdcall *)(void))GPA( "glPushMatrix" );
qglRasterPos2dv = dllRasterPos2dv = GPA( "glRasterPos2dv" ); qglPushName = dllPushName =(void (__stdcall *)(unsigned int))GPA( "glPushName" );
qglRasterPos2f = dllRasterPos2f = GPA( "glRasterPos2f" ); qglRasterPos2d = dllRasterPos2d =(void (__stdcall *)(double,double))GPA( "glRasterPos2d" );
qglRasterPos2fv = dllRasterPos2fv = GPA( "glRasterPos2fv" ); qglRasterPos2dv = dllRasterPos2dv =(void (__stdcall *)(const double *))GPA( "glRasterPos2dv" );
qglRasterPos2i = dllRasterPos2i = GPA( "glRasterPos2i" ); qglRasterPos2f = dllRasterPos2f =(void (__stdcall *)(float,float))GPA( "glRasterPos2f" );
qglRasterPos2iv = dllRasterPos2iv = GPA( "glRasterPos2iv" ); qglRasterPos2fv = dllRasterPos2fv =(void (__stdcall *)(const float *))GPA( "glRasterPos2fv" );
qglRasterPos2s = dllRasterPos2s = GPA( "glRasterPos2s" ); qglRasterPos2i = dllRasterPos2i =(void (__stdcall *)(int,int))GPA( "glRasterPos2i" );
qglRasterPos2sv = dllRasterPos2sv = GPA( "glRasterPos2sv" ); qglRasterPos2iv = dllRasterPos2iv =(void (__stdcall *)(const int *))GPA( "glRasterPos2iv" );
qglRasterPos3d = dllRasterPos3d = GPA( "glRasterPos3d" ); qglRasterPos2s = dllRasterPos2s =(void (__stdcall *)(short,short))GPA( "glRasterPos2s" );
qglRasterPos3dv = dllRasterPos3dv = GPA( "glRasterPos3dv" ); qglRasterPos2sv = dllRasterPos2sv =(void (__stdcall *)(const short *))GPA( "glRasterPos2sv" );
qglRasterPos3f = dllRasterPos3f = GPA( "glRasterPos3f" ); qglRasterPos3d = dllRasterPos3d =(void (__stdcall *)(double,double,double))GPA( "glRasterPos3d" );
qglRasterPos3fv = dllRasterPos3fv = GPA( "glRasterPos3fv" ); qglRasterPos3dv = dllRasterPos3dv =(void (__stdcall *)(const double *))GPA( "glRasterPos3dv" );
qglRasterPos3i = dllRasterPos3i = GPA( "glRasterPos3i" ); qglRasterPos3f = dllRasterPos3f =(void (__stdcall *)(float,float,float))GPA( "glRasterPos3f" );
qglRasterPos3iv = dllRasterPos3iv = GPA( "glRasterPos3iv" ); qglRasterPos3fv = dllRasterPos3fv =(void (__stdcall *)(const float *))GPA( "glRasterPos3fv" );
qglRasterPos3s = dllRasterPos3s = GPA( "glRasterPos3s" ); qglRasterPos3i = dllRasterPos3i =(void (__stdcall *)(int,int,int))GPA( "glRasterPos3i" );
qglRasterPos3sv = dllRasterPos3sv = GPA( "glRasterPos3sv" ); qglRasterPos3iv = dllRasterPos3iv =(void (__stdcall *)(const int *))GPA( "glRasterPos3iv" );
qglRasterPos4d = dllRasterPos4d = GPA( "glRasterPos4d" ); qglRasterPos3s = dllRasterPos3s =(void (__stdcall *)(short,short,short))GPA( "glRasterPos3s" );
qglRasterPos4dv = dllRasterPos4dv = GPA( "glRasterPos4dv" ); qglRasterPos3sv = dllRasterPos3sv =(void (__stdcall *)(const short *))GPA( "glRasterPos3sv" );
qglRasterPos4f = dllRasterPos4f = GPA( "glRasterPos4f" ); qglRasterPos4d = dllRasterPos4d =(void (__stdcall *)(double,double,double,double))GPA( "glRasterPos4d" );
qglRasterPos4fv = dllRasterPos4fv = GPA( "glRasterPos4fv" ); qglRasterPos4dv = dllRasterPos4dv =(void (__stdcall *)(const double *))GPA( "glRasterPos4dv" );
qglRasterPos4i = dllRasterPos4i = GPA( "glRasterPos4i" ); qglRasterPos4f = dllRasterPos4f =(void (__stdcall *)(float,float,float,float))GPA( "glRasterPos4f" );
qglRasterPos4iv = dllRasterPos4iv = GPA( "glRasterPos4iv" ); qglRasterPos4fv = dllRasterPos4fv =(void (__stdcall *)(const float *))GPA( "glRasterPos4fv" );
qglRasterPos4s = dllRasterPos4s = GPA( "glRasterPos4s" ); qglRasterPos4i = dllRasterPos4i =(void (__stdcall *)(int,int,int,int))GPA( "glRasterPos4i" );
qglRasterPos4sv = dllRasterPos4sv = GPA( "glRasterPos4sv" ); qglRasterPos4iv = dllRasterPos4iv =(void (__stdcall *)(const int *))GPA( "glRasterPos4iv" );
qglReadBuffer = dllReadBuffer = GPA( "glReadBuffer" ); qglRasterPos4s = dllRasterPos4s =(void (__stdcall *)(short,short,short,short))GPA( "glRasterPos4s" );
qglReadPixels = dllReadPixels = GPA( "glReadPixels" ); qglRasterPos4sv = dllRasterPos4sv =(void (__stdcall *)(const short *))GPA( "glRasterPos4sv" );
qglRectd = dllRectd = GPA( "glRectd" ); qglReadBuffer = dllReadBuffer =(void (__stdcall *)(unsigned int))GPA( "glReadBuffer" );
qglRectdv = dllRectdv = GPA( "glRectdv" ); qglReadPixels = dllReadPixels =(void (__stdcall *)(int,int,int,int,unsigned int,unsigned int,void *))GPA( "glReadPixels" );
qglRectf = dllRectf = GPA( "glRectf" ); qglRectd = dllRectd =(void (__stdcall *)(double,double,double,double))GPA( "glRectd" );
qglRectfv = dllRectfv = GPA( "glRectfv" ); qglRectdv = dllRectdv =(void (__stdcall *)(const double *,const double *))GPA( "glRectdv" );
qglRecti = dllRecti = GPA( "glRecti" ); qglRectf = dllRectf =(void (__stdcall *)(float,float,float,float))GPA( "glRectf" );
qglRectiv = dllRectiv = GPA( "glRectiv" ); qglRectfv = dllRectfv =(void (__stdcall *)(const float *,const float *))GPA( "glRectfv" );
qglRects = dllRects = GPA( "glRects" ); qglRecti = dllRecti =(void (__stdcall *)(int,int,int,int))GPA( "glRecti" );
qglRectsv = dllRectsv = GPA( "glRectsv" ); qglRectiv = dllRectiv =(void (__stdcall *)(const int *,const int *))GPA( "glRectiv" );
qglRenderMode = dllRenderMode = GPA( "glRenderMode" ); qglRects = dllRects =(void (__stdcall *)(short,short,short,short))GPA( "glRects" );
qglRotated = dllRotated = GPA( "glRotated" ); qglRectsv = dllRectsv =(void (__stdcall *)(const short *,const short *))GPA( "glRectsv" );
qglRotatef = dllRotatef = GPA( "glRotatef" ); qglRenderMode = dllRenderMode =(int (__stdcall *)(unsigned int))GPA( "glRenderMode" );
qglScaled = dllScaled = GPA( "glScaled" ); qglRotated = dllRotated =(void (__stdcall *)(double,double,double,double))GPA( "glRotated" );
qglScalef = dllScalef = GPA( "glScalef" ); qglRotatef = dllRotatef =(void (__stdcall *)(float,float,float,float))GPA( "glRotatef" );
qglScissor = dllScissor = GPA( "glScissor" ); qglScaled = dllScaled =(void (__stdcall *)(double,double,double))GPA( "glScaled" );
qglSelectBuffer = dllSelectBuffer = GPA( "glSelectBuffer" ); qglScalef = dllScalef =(void (__stdcall *)(float,float,float))GPA( "glScalef" );
qglShadeModel = dllShadeModel = GPA( "glShadeModel" ); qglScissor = dllScissor =(void (__stdcall *)(int,int,int,int))GPA( "glScissor" );
qglStencilFunc = dllStencilFunc = GPA( "glStencilFunc" ); qglSelectBuffer = dllSelectBuffer =(void (__stdcall *)(int,unsigned int *))GPA( "glSelectBuffer" );
qglStencilMask = dllStencilMask = GPA( "glStencilMask" ); qglShadeModel = dllShadeModel =(void (__stdcall *)(unsigned int))GPA( "glShadeModel" );
qglStencilOp = dllStencilOp = GPA( "glStencilOp" ); qglStencilFunc = dllStencilFunc =(void (__stdcall *)(unsigned int,int,unsigned int))GPA( "glStencilFunc" );
qglTexCoord1d = dllTexCoord1d = GPA( "glTexCoord1d" ); qglStencilMask = dllStencilMask =(void (__stdcall *)(unsigned int))GPA( "glStencilMask" );
qglTexCoord1dv = dllTexCoord1dv = GPA( "glTexCoord1dv" ); qglStencilOp = dllStencilOp =(void (__stdcall *)(unsigned int,unsigned int,unsigned int))GPA( "glStencilOp" );
qglTexCoord1f = dllTexCoord1f = GPA( "glTexCoord1f" ); qglTexCoord1d = dllTexCoord1d =(void (__stdcall *)(double))GPA( "glTexCoord1d" );
qglTexCoord1fv = dllTexCoord1fv = GPA( "glTexCoord1fv" ); qglTexCoord1dv = dllTexCoord1dv =(void (__stdcall *)(const double *))GPA( "glTexCoord1dv" );
qglTexCoord1i = dllTexCoord1i = GPA( "glTexCoord1i" ); qglTexCoord1f = dllTexCoord1f =(void (__stdcall *)(float))GPA( "glTexCoord1f" );
qglTexCoord1iv = dllTexCoord1iv = GPA( "glTexCoord1iv" ); qglTexCoord1fv = dllTexCoord1fv =(void (__stdcall *)(const float *))GPA( "glTexCoord1fv" );
qglTexCoord1s = dllTexCoord1s = GPA( "glTexCoord1s" ); qglTexCoord1i = dllTexCoord1i =(void (__stdcall *)(int))GPA( "glTexCoord1i" );
qglTexCoord1sv = dllTexCoord1sv = GPA( "glTexCoord1sv" ); qglTexCoord1iv = dllTexCoord1iv =(void (__stdcall *)(const int *))GPA( "glTexCoord1iv" );
qglTexCoord2d = dllTexCoord2d = GPA( "glTexCoord2d" ); qglTexCoord1s = dllTexCoord1s =(void (__stdcall *)(short))GPA( "glTexCoord1s" );
qglTexCoord2dv = dllTexCoord2dv = GPA( "glTexCoord2dv" ); qglTexCoord1sv = dllTexCoord1sv =(void (__stdcall *)(const short *))GPA( "glTexCoord1sv" );
qglTexCoord2f = dllTexCoord2f = GPA( "glTexCoord2f" ); qglTexCoord2d = dllTexCoord2d =(void (__stdcall *)(double,double))GPA( "glTexCoord2d" );
qglTexCoord2fv = dllTexCoord2fv = GPA( "glTexCoord2fv" ); qglTexCoord2dv = dllTexCoord2dv =(void (__stdcall *)(const double *))GPA( "glTexCoord2dv" );
qglTexCoord2i = dllTexCoord2i = GPA( "glTexCoord2i" ); qglTexCoord2f = dllTexCoord2f =(void (__stdcall *)(float,float))GPA( "glTexCoord2f" );
qglTexCoord2iv = dllTexCoord2iv = GPA( "glTexCoord2iv" ); qglTexCoord2fv = dllTexCoord2fv =(void (__stdcall *)(const float *))GPA( "glTexCoord2fv" );
qglTexCoord2s = dllTexCoord2s = GPA( "glTexCoord2s" ); qglTexCoord2i = dllTexCoord2i =(void (__stdcall *)(int,int))GPA( "glTexCoord2i" );
qglTexCoord2sv = dllTexCoord2sv = GPA( "glTexCoord2sv" ); qglTexCoord2iv = dllTexCoord2iv =(void (__stdcall *)(const int *))GPA( "glTexCoord2iv" );
qglTexCoord3d = dllTexCoord3d = GPA( "glTexCoord3d" ); qglTexCoord2s = dllTexCoord2s =(void (__stdcall *)(short,short))GPA( "glTexCoord2s" );
qglTexCoord3dv = dllTexCoord3dv = GPA( "glTexCoord3dv" ); qglTexCoord2sv = dllTexCoord2sv =(void (__stdcall *)(const short *))GPA( "glTexCoord2sv" );
qglTexCoord3f = dllTexCoord3f = GPA( "glTexCoord3f" ); qglTexCoord3d = dllTexCoord3d =(void (__stdcall *)(double,double,double))GPA( "glTexCoord3d" );
qglTexCoord3fv = dllTexCoord3fv = GPA( "glTexCoord3fv" ); qglTexCoord3dv = dllTexCoord3dv =(void (__stdcall *)(const double *))GPA( "glTexCoord3dv" );
qglTexCoord3i = dllTexCoord3i = GPA( "glTexCoord3i" ); qglTexCoord3f = dllTexCoord3f =(void (__stdcall *)(float,float,float))GPA( "glTexCoord3f" );
qglTexCoord3iv = dllTexCoord3iv = GPA( "glTexCoord3iv" ); qglTexCoord3fv = dllTexCoord3fv =(void (__stdcall *)(const float *))GPA( "glTexCoord3fv" );
qglTexCoord3s = dllTexCoord3s = GPA( "glTexCoord3s" ); qglTexCoord3i = dllTexCoord3i =(void (__stdcall *)(int,int,int))GPA( "glTexCoord3i" );
qglTexCoord3sv = dllTexCoord3sv = GPA( "glTexCoord3sv" ); qglTexCoord3iv = dllTexCoord3iv =(void (__stdcall *)(const int *))GPA( "glTexCoord3iv" );
qglTexCoord4d = dllTexCoord4d = GPA( "glTexCoord4d" ); qglTexCoord3s = dllTexCoord3s =(void (__stdcall *)(short,short,short))GPA( "glTexCoord3s" );
qglTexCoord4dv = dllTexCoord4dv = GPA( "glTexCoord4dv" ); qglTexCoord3sv = dllTexCoord3sv =(void (__stdcall *)(const short *))GPA( "glTexCoord3sv" );
qglTexCoord4f = dllTexCoord4f = GPA( "glTexCoord4f" ); qglTexCoord4d = dllTexCoord4d =(void (__stdcall *)(double,double,double,double))GPA( "glTexCoord4d" );
qglTexCoord4fv = dllTexCoord4fv = GPA( "glTexCoord4fv" ); qglTexCoord4dv = dllTexCoord4dv =(void (__stdcall *)(const double *))GPA( "glTexCoord4dv" );
qglTexCoord4i = dllTexCoord4i = GPA( "glTexCoord4i" ); qglTexCoord4f = dllTexCoord4f =(void (__stdcall *)(float,float,float,float))GPA( "glTexCoord4f" );
qglTexCoord4iv = dllTexCoord4iv = GPA( "glTexCoord4iv" ); qglTexCoord4fv = dllTexCoord4fv =(void (__stdcall *)(const float *))GPA( "glTexCoord4fv" );
qglTexCoord4s = dllTexCoord4s = GPA( "glTexCoord4s" ); qglTexCoord4i = dllTexCoord4i =(void (__stdcall *)(int,int,int,int))GPA( "glTexCoord4i" );
qglTexCoord4sv = dllTexCoord4sv = GPA( "glTexCoord4sv" ); qglTexCoord4iv = dllTexCoord4iv =(void (__stdcall *)(const int *))GPA( "glTexCoord4iv" );
qglTexCoordPointer = dllTexCoordPointer = GPA( "glTexCoordPointer" ); qglTexCoord4s = dllTexCoord4s =(void (__stdcall *)(short,short,short,short))GPA( "glTexCoord4s" );
qglTexEnvf = dllTexEnvf = GPA( "glTexEnvf" ); qglTexCoord4sv = dllTexCoord4sv =(void (__stdcall *)(const short *))GPA( "glTexCoord4sv" );
qglTexEnvfv = dllTexEnvfv = GPA( "glTexEnvfv" ); qglTexCoordPointer = dllTexCoordPointer =(void (__stdcall *)(int,unsigned int,int,const void *))GPA( "glTexCoordPointer" );
qglTexEnvi = dllTexEnvi = GPA( "glTexEnvi" ); qglTexEnvf = dllTexEnvf =(void (__stdcall *)(unsigned int,unsigned int,float))GPA( "glTexEnvf" );
qglTexEnviv = dllTexEnviv = GPA( "glTexEnviv" ); qglTexEnvfv = dllTexEnvfv =(void (__stdcall *)(unsigned int,unsigned int,const float *))GPA( "glTexEnvfv" );
qglTexGend = dllTexGend = GPA( "glTexGend" ); qglTexEnvi = dllTexEnvi =(void (__stdcall *)(unsigned int,unsigned int,int))GPA( "glTexEnvi" );
qglTexGendv = dllTexGendv = GPA( "glTexGendv" ); qglTexEnviv = dllTexEnviv =(void (__stdcall *)(unsigned int,unsigned int,const int *))GPA( "glTexEnviv" );
qglTexGenf = dllTexGenf = GPA( "glTexGenf" ); qglTexGend = dllTexGend =(void (__stdcall *)(unsigned int,unsigned int,double))GPA( "glTexGend" );
qglTexGenfv = dllTexGenfv = GPA( "glTexGenfv" ); qglTexGendv = dllTexGendv =(void (__stdcall *)(unsigned int,unsigned int,const double *))GPA( "glTexGendv" );
qglTexGeni = dllTexGeni = GPA( "glTexGeni" ); qglTexGenf = dllTexGenf =(void (__stdcall *)(unsigned int,unsigned int,float))GPA( "glTexGenf" );
qglTexGeniv = dllTexGeniv = GPA( "glTexGeniv" ); qglTexGenfv = dllTexGenfv =(void (__stdcall *)(unsigned int,unsigned int,const float *))GPA( "glTexGenfv" );
qglTexImage1D = dllTexImage1D = GPA( "glTexImage1D" ); qglTexGeni = dllTexGeni =(void (__stdcall *)(unsigned int,unsigned int,int))GPA( "glTexGeni" );
qglTexImage2D = dllTexImage2D = GPA( "glTexImage2D" ); qglTexGeniv = dllTexGeniv =(void (__stdcall *)(unsigned int,unsigned int,const int *))GPA( "glTexGeniv" );
qglTexParameterf = dllTexParameterf = GPA( "glTexParameterf" ); qglTexImage1D = dllTexImage1D =(void (__stdcall *)(unsigned int,int,int,int,int,unsigned int,unsigned int,const void *))GPA( "glTexImage1D" );
qglTexParameterfv = dllTexParameterfv = GPA( "glTexParameterfv" ); qglTexImage2D = dllTexImage2D =(void (__stdcall *)(unsigned int,int,int,int,int,int,unsigned int,unsigned int,const void *))GPA( "glTexImage2D" );
qglTexParameteri = dllTexParameteri = GPA( "glTexParameteri" ); qglTexParameterf = dllTexParameterf =(void (__stdcall *)(unsigned int,unsigned int,float))GPA( "glTexParameterf" );
qglTexParameteriv = dllTexParameteriv = GPA( "glTexParameteriv" ); qglTexParameterfv = dllTexParameterfv =(void (__stdcall *)(unsigned int,unsigned int,const float *))GPA( "glTexParameterfv" );
qglTexSubImage1D = dllTexSubImage1D = GPA( "glTexSubImage1D" ); qglTexParameteri = dllTexParameteri =(void (__stdcall *)(unsigned int,unsigned int,int))GPA( "glTexParameteri" );
qglTexSubImage2D = dllTexSubImage2D = GPA( "glTexSubImage2D" ); qglTexParameteriv = dllTexParameteriv =(void (__stdcall *)(unsigned int,unsigned int,const int *))GPA( "glTexParameteriv" );
qglTranslated = dllTranslated = GPA( "glTranslated" ); qglTexSubImage1D = dllTexSubImage1D =(void (__stdcall *)(unsigned int,int,int,int,unsigned int,unsigned int,const void *))GPA( "glTexSubImage1D" );
qglTranslatef = dllTranslatef = GPA( "glTranslatef" ); qglTexSubImage2D = dllTexSubImage2D =(void (__stdcall *)(unsigned int,int,int,int,int,int,unsigned int,unsigned int,const void *))GPA( "glTexSubImage2D" );
qglVertex2d = dllVertex2d = GPA( "glVertex2d" ); qglTranslated = dllTranslated =(void (__stdcall *)(double,double,double))GPA( "glTranslated" );
qglVertex2dv = dllVertex2dv = GPA( "glVertex2dv" ); qglTranslatef = dllTranslatef =(void (__stdcall *)(float,float,float))GPA( "glTranslatef" );
qglVertex2f = dllVertex2f = GPA( "glVertex2f" ); qglVertex2d = dllVertex2d =(void (__stdcall *)(double,double))GPA( "glVertex2d" );
qglVertex2fv = dllVertex2fv = GPA( "glVertex2fv" ); qglVertex2dv = dllVertex2dv =(void (__stdcall *)(const double *))GPA( "glVertex2dv" );
qglVertex2i = dllVertex2i = GPA( "glVertex2i" ); qglVertex2f = dllVertex2f =(void (__stdcall *)(float,float))GPA( "glVertex2f" );
qglVertex2iv = dllVertex2iv = GPA( "glVertex2iv" ); qglVertex2fv = dllVertex2fv =(void (__stdcall *)(const float *))GPA( "glVertex2fv" );
qglVertex2s = dllVertex2s = GPA( "glVertex2s" ); qglVertex2i = dllVertex2i =(void (__stdcall *)(int,int))GPA( "glVertex2i" );
qglVertex2sv = dllVertex2sv = GPA( "glVertex2sv" ); qglVertex2iv = dllVertex2iv =(void (__stdcall *)(const int *))GPA( "glVertex2iv" );
qglVertex3d = dllVertex3d = GPA( "glVertex3d" ); qglVertex2s = dllVertex2s =(void (__stdcall *)(short,short))GPA( "glVertex2s" );
qglVertex3dv = dllVertex3dv = GPA( "glVertex3dv" ); qglVertex2sv = dllVertex2sv =(void (__stdcall *)(const short *))GPA( "glVertex2sv" );
qglVertex3f = dllVertex3f = GPA( "glVertex3f" ); qglVertex3d = dllVertex3d =(void (__stdcall *)(double,double,double))GPA( "glVertex3d" );
qglVertex3fv = dllVertex3fv = GPA( "glVertex3fv" ); qglVertex3dv = dllVertex3dv =(void (__stdcall *)(const double *))GPA( "glVertex3dv" );
qglVertex3i = dllVertex3i = GPA( "glVertex3i" ); qglVertex3f = dllVertex3f =(void (__stdcall *)(float,float,float))GPA( "glVertex3f" );
qglVertex3iv = dllVertex3iv = GPA( "glVertex3iv" ); qglVertex3fv = dllVertex3fv =(void (__stdcall *)(const float *))GPA( "glVertex3fv" );
qglVertex3s = dllVertex3s = GPA( "glVertex3s" ); qglVertex3i = dllVertex3i =(void (__stdcall *)(int,int,int))GPA( "glVertex3i" );
qglVertex3sv = dllVertex3sv = GPA( "glVertex3sv" ); qglVertex3iv = dllVertex3iv =(void (__stdcall *)(const int *))GPA( "glVertex3iv" );
qglVertex4d = dllVertex4d = GPA( "glVertex4d" ); qglVertex3s = dllVertex3s =(void (__stdcall *)(short,short,short))GPA( "glVertex3s" );
qglVertex4dv = dllVertex4dv = GPA( "glVertex4dv" ); qglVertex3sv = dllVertex3sv =(void (__stdcall *)(const short *))GPA( "glVertex3sv" );
qglVertex4f = dllVertex4f = GPA( "glVertex4f" ); qglVertex4d = dllVertex4d =(void (__stdcall *)(double,double,double,double))GPA( "glVertex4d" );
qglVertex4fv = dllVertex4fv = GPA( "glVertex4fv" ); qglVertex4dv = dllVertex4dv =(void (__stdcall *)(const double *))GPA( "glVertex4dv" );
qglVertex4i = dllVertex4i = GPA( "glVertex4i" ); qglVertex4f = dllVertex4f =(void (__stdcall *)(float,float,float,float))GPA( "glVertex4f" );
qglVertex4iv = dllVertex4iv = GPA( "glVertex4iv" ); qglVertex4fv = dllVertex4fv =(void (__stdcall *)(const float *))GPA( "glVertex4fv" );
qglVertex4s = dllVertex4s = GPA( "glVertex4s" ); qglVertex4i = dllVertex4i =(void (__stdcall *)(int,int,int,int))GPA( "glVertex4i" );
qglVertex4sv = dllVertex4sv = GPA( "glVertex4sv" ); qglVertex4iv = dllVertex4iv =(void (__stdcall *)(const int *))GPA( "glVertex4iv" );
qglVertexPointer = dllVertexPointer = GPA( "glVertexPointer" ); qglVertex4s = dllVertex4s =(void (__stdcall *)(short,short,short,short))GPA( "glVertex4s" );
qglViewport = dllViewport = GPA( "glViewport" ); qglVertex4sv = dllVertex4sv =(void (__stdcall *)(const short *))GPA( "glVertex4sv" );
qglVertexPointer = dllVertexPointer =(void (__stdcall *)(int,unsigned int,int,const void *))GPA( "glVertexPointer" );
qglViewport = dllViewport =(void (__stdcall *)(int,int,int,int))GPA( "glViewport" );
// bk001129 - from cvs1.17 (mkv)
#if defined(__FX__)
qfxMesaCreateContext = GPA("fxMesaCreateContext");
qfxMesaCreateBestContext = GPA("fxMesaCreateBestContext");
qfxMesaDestroyContext = GPA("fxMesaDestroyContext");
qfxMesaMakeCurrent = GPA("fxMesaMakeCurrent");
qfxMesaGetCurrentContext = GPA("fxMesaGetCurrentContext");
qfxMesaSwapBuffers = GPA("fxMesaSwapBuffers");
#endif
qglXChooseVisual = GPA("glXChooseVisual"); qglXChooseVisual = (XVisualInfo *(__stdcall *)(Display *,int, int *))GPA("glXChooseVisual");
qglXCreateContext = GPA("glXCreateContext"); qglXCreateContext = (__GLXcontextRec *(__stdcall *)(Display *, XVisualInfo *,GLXContext, Bool))GPA("glXCreateContext");
qglXDestroyContext = GPA("glXDestroyContext"); qglXDestroyContext = (void (__stdcall *)(Display *, GLXContext))GPA("glXDestroyContext");
qglXMakeCurrent = GPA("glXMakeCurrent"); qglXMakeCurrent = (int (__stdcall *)(Display *, GLXDrawable, GLXContext))GPA("glXMakeCurrent");
qglXCopyContext = GPA("glXCopyContext"); qglXCopyContext = (void (__stdcall *)(Display *, GLXContext, GLXContext,GLuint))GPA("glXCopyContext");
qglXSwapBuffers = GPA("glXSwapBuffers"); qglXSwapBuffers = (void (__stdcall *)(Display *, GLXDrawable))GPA("glXSwapBuffers");
qglLockArraysEXT = 0; qglLockArraysEXT = 0;
qglUnlockArraysEXT = 0; qglUnlockArraysEXT = 0;
@ -3402,29 +3379,12 @@ qboolean QGL_Init( const char *dllname )
return qtrue; return qtrue;
} }
void QGL_EnableLogging( qboolean enable ) { void QGL_EnableLogging( qboolean enable )
// bk001205 - fixed for new countdown {
static qboolean isEnabled = qfalse; // init if ( enable )
{
// return if we're already active if ( !glw_state.log_fp )
if ( isEnabled && enable ) { {
// decrement log counter and stop if it has reached 0
ri.Cvar_Set( "r_logFile", va("%d", r_logFile->integer - 1 ) );
if ( r_logFile->integer ) {
return;
}
enable = qfalse;
}
// return if we're already disabled
if ( !enable && !isEnabled )
return;
isEnabled = enable;
// bk001205 - old code starts here
if ( enable ) {
if ( !glw_state.log_fp ) {
struct tm *newtime; struct tm *newtime;
time_t aclock; time_t aclock;
char buffer[1024]; char buffer[1024];
@ -3435,12 +3395,9 @@ void QGL_EnableLogging( qboolean enable ) {
asctime( newtime ); asctime( newtime );
basedir = ri.Cvar_Get( "fs_basepath", "", 0 ); // FIXME: userdir? basedir = Cvar_Get( "basedir", "", 0 );
assert(basedir);
Com_sprintf( buffer, sizeof(buffer), "%s/gl.log", basedir->string ); Com_sprintf( buffer, sizeof(buffer), "%s/gl.log", basedir->string );
glw_state.log_fp = fopen( buffer, "wt" ); glw_state.log_fp = fopen( buffer, "wt" );
assert(glw_state.log_fp);
ri.Printf(PRINT_ALL, "QGL_EnableLogging(%d): writing %s\n", r_logFile->integer, buffer );
fprintf( glw_state.log_fp, "%s\n", asctime( newtime ) ); fprintf( glw_state.log_fp, "%s\n", asctime( newtime ) );
} }

13
CODE-mp/unix/unix_glw.h Normal file
View file

@ -0,0 +1,13 @@
#ifndef __GLW_LINUX_H__
#define __GLW_LINUX_H__
typedef struct
{
void *OpenGLLib; // instance of OpenGL library
FILE *log_fp;
} glwstate_t;
extern glwstate_t glw_state;
#endif

View file

@ -35,7 +35,9 @@
cvar_t *nostdout; cvar_t *nostdout;
// Structure containing functions exported from refresh DLL // Structure containing functions exported from refresh DLL
#if 0
refexport_t re; refexport_t re;
#endif
unsigned sys_frame_time; unsigned sys_frame_time;
@ -114,11 +116,11 @@ void Sys_ConsoleOutput (char *string)
void Sys_Printf (char *fmt, ...) void Sys_Printf (char *fmt, ...)
{ {
va_list argptr; va_list argptr;
char text[1024]; char text[4096];
unsigned char *p; unsigned char *p;
va_start (argptr,fmt); va_start (argptr,fmt);
vsprintf (text,fmt,argptr); vsnprintf (text,sizeof(text),fmt,argptr);
va_end (argptr); va_end (argptr);
if (strlen(text) > sizeof(text)) if (strlen(text) > sizeof(text))
@ -164,12 +166,24 @@ void Sys_Init(void)
#if defined __linux__ #if defined __linux__
#if defined __i386__ #if defined __i386__
Cvar_Set( "arch", "linux i386" ); Cvar_Set( "arch", "linux i386" );
#elif defined(__amd64__) || defined(__x86_64__)
Cvar_Set( "arch", "linux amd64" );
#elif defined __alpha__ #elif defined __alpha__
Cvar_Set( "arch", "linux alpha" ); Cvar_Set( "arch", "linux alpha" );
#elif defined __sparc__ #elif defined __sparc__
Cvar_Set( "arch", "linux sparc" ); Cvar_Set( "arch", "linux sparc" );
#else
Cvar_Set( "arch", "linux unknown" );
#endif
#elif defined __OpenBSD__
#if defined __i386__
Cvar_Set( "arch", "openbsd i386" );
#elif defined(__amd64__) || defined(__x86_64__)
Cvar_Set( "arch", "openbsd amd64" );
#else
Cvar_Set( "arch", "openbsd unknown" );
#endif
#elif defined __FreeBSD__ #elif defined __FreeBSD__
#if defined __i386__ // FreeBSD #if defined __i386__ // FreeBSD
Cvar_Set( "arch", "freebsd i386" ); Cvar_Set( "arch", "freebsd i386" );
#elif defined __alpha__ #elif defined __alpha__
@ -177,10 +191,6 @@ void Sys_Init(void)
#else #else
Cvar_Set( "arch", "freebsd unknown" ); Cvar_Set( "arch", "freebsd unknown" );
#endif // FreeBSD #endif // FreeBSD
#else
Cvar_Set( "arch", "linux unknown" );
#endif
#elif defined __sun__ #elif defined __sun__
#if defined __i386__ #if defined __i386__
Cvar_Set( "arch", "solaris x86" ); Cvar_Set( "arch", "solaris x86" );
@ -341,10 +351,12 @@ void *Sys_LoadDll( const char *name,
getcwd(curpath, sizeof(curpath)); getcwd(curpath, sizeof(curpath));
#if defined __i386__ #if defined __i386__
#ifndef NDEBUG #ifndef NDEBUG
snprintf (fname, sizeof(fname), "%si386-debug.so", name); // bk010205 - different DLL name snprintf (fname, sizeof(fname), "%sx86-debug.so", name); // bk010205 - different DLL name
#else #else
snprintf (fname, sizeof(fname), "%si386.so", name); snprintf (fname, sizeof(fname), "%sx86.so", name);
#endif #endif
#elif defined(__amd64__) || defined(__x86_64__)
snprintf (fname, sizeof(fname), "%samd64.so", name);
#elif defined __powerpc__ //rcg010207 - PPC support. #elif defined __powerpc__ //rcg010207 - PPC support.
snprintf (fname, sizeof(fname), "%sppc.so", name); snprintf (fname, sizeof(fname), "%sppc.so", name);
#elif defined __axp__ #elif defined __axp__
@ -442,7 +454,9 @@ void *Sys_LoadDll( const char *name,
static void *game_library; static void *game_library;
#ifdef __i386__ #ifdef __i386__
const char *gamename = "qagamei386.so"; const char *gamename = "qagamex86.so";
#elif defined(__amd64__) || defined(__x86_64__)
const char *gamename = "qagameamd64.so";
#elif defined __alpha__ #elif defined __alpha__
const char *gamename = "qagameaxp.so"; const char *gamename = "qagameaxp.so";
#elif defined __mips__ #elif defined __mips__
@ -545,7 +559,9 @@ void *Sys_GetCGameAPI (void)
char name[MAX_OSPATH]; char name[MAX_OSPATH];
char curpath[MAX_OSPATH]; char curpath[MAX_OSPATH];
#ifdef __i386__ #ifdef __i386__
const char *cgamename = "cgamei386.so"; const char *cgamename = "cgamex86.so";
#elif defined(__amd64__) || defined(__x86_64__)
const char *cgamename = "cgameamd64.so";
#elif defined __alpha__ #elif defined __alpha__
const char *cgamename = "cgameaxp.so"; const char *cgamename = "cgameaxp.so";
#elif defined __mips__ #elif defined __mips__
@ -612,7 +628,9 @@ void *Sys_GetUIAPI (void)
char name[MAX_OSPATH]; char name[MAX_OSPATH];
char curpath[MAX_OSPATH]; char curpath[MAX_OSPATH];
#ifdef __i386__ #ifdef __i386__
const char *uiname = "uii386.so"; const char *uiname = "uix86.so";
#elif defined(__amd64__) || defined(__x86_64__)
const char *uiname = "uiamd64.so";
#elif defined __alpha__ #elif defined __alpha__
const char *uiname = "uiaxp.so"; const char *uiname = "uiaxp.so";
#elif defined __mips__ #elif defined __mips__
@ -671,13 +689,16 @@ Sys_GetGameAPI
Loads the game dll Loads the game dll
================= =================
*/ */
#if 0
void *Sys_GetBotLibAPI (void *parms ) void *Sys_GetBotLibAPI (void *parms )
{ {
void *(*GetBotLibAPI) (void *); void *(*GetBotLibAPI) (void *);
char name[MAX_OSPATH]; char name[MAX_OSPATH];
char curpath[MAX_OSPATH]; char curpath[MAX_OSPATH];
#ifdef __i386__ #ifdef __i386__
const char *botlibname = "qaboti386.so"; const char *botlibname = "qabotx86.so";
#elif defined(__amd64__) || defined(__x86_64__)
const char *botlibname = "qabotamd64.so";
#elif defined __alpha__ #elif defined __alpha__
const char *botlibname = "qabotaxp.so"; const char *botlibname = "qabotaxp.so";
#elif defined __mips__ #elif defined __mips__
@ -713,6 +734,7 @@ void *Sys_GetBotLibAPI (void *parms )
// bk001129 - this is a signature mismatch // bk001129 - this is a signature mismatch
return GetBotLibAPI (parms); return GetBotLibAPI (parms);
} }
#endif
void *Sys_GetBotAIAPI (void *parms ) { void *Sys_GetBotAIAPI (void *parms ) {
return NULL; return NULL;
@ -1092,9 +1114,9 @@ void Sys_PrintBinVersion( const char* name ) {
char* sep = "=============================================================="; char* sep = "==============================================================";
fprintf( stdout, "\n\n%s\n", sep ); fprintf( stdout, "\n\n%s\n", sep );
#ifdef DEDICATED #ifdef DEDICATED
fprintf( stdout, "Linux Quake3 Dedicated Server [%s %s]\n", date, time ); fprintf( stdout, "Jedi Outcast Dedicated Server [%s %s]\n", date, time );
#else #else
fprintf( stdout, "Linux Quake3 Full Executable [%s %s]\n", date, time ); fprintf( stdout, "Jedi Outcast Full Executable [%s %s]\n", date, time );
#endif #endif
fprintf( stdout, " local install: %s\n", name ); fprintf( stdout, " local install: %s\n", name );
fprintf( stdout, "%s\n\n", sep ); fprintf( stdout, "%s\n\n", sep );

View file

@ -322,3 +322,7 @@ char *Sys_GetCurrentUser( void )
} }
return p->pw_name; return p->pw_name;
} }
void QuickMemTest( void )
{
}