aboutsummaryrefslogtreecommitdiffstats
path: root/code/sdl
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-09-10 22:28:58 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-09-10 22:28:58 +0000
commit33d0f20bb57a17ffe51b337a3d353fc6a18ce72e (patch)
treedbf5139a63bb05f3f8ef306af0c29101b05332cb /code/sdl
parenta5692b8d3f5757e9feb502c448183275de16f3bc (diff)
downloadioquake3-aero-33d0f20bb57a17ffe51b337a3d353fc6a18ce72e.tar.gz
ioquake3-aero-33d0f20bb57a17ffe51b337a3d353fc6a18ce72e.zip
* Remove use of GL_ARB_multitexture since this has been part of the
core API for many years now git-svn-id: svn://svn.icculus.org/quake3/trunk@1176 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/sdl')
-rw-r--r--code/sdl/sdl_glimp.c51
1 files changed, 6 insertions, 45 deletions
diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c
index b75380b..bd2dc24 100644
--- a/code/sdl/sdl_glimp.c
+++ b/code/sdl/sdl_glimp.c
@@ -70,10 +70,6 @@ static SDL_Surface *screen = NULL;
cvar_t *r_allowSoftwareGL; // Don't abort out if a hardware visual can't be obtained
-PFNGLMULTITEXCOORD2FARBPROC qglMultiTexCoord2fARB;
-PFNGLACTIVETEXTUREARBPROC qglActiveTextureARB;
-PFNGLCLIENTACTIVETEXTUREARBPROC qglClientActiveTextureARB;
-
PFNGLLOCKARRAYSEXTPROC qglLockArraysEXT;
PFNGLUNLOCKARRAYSEXTPROC qglUnlockArraysEXT;
@@ -380,46 +376,6 @@ static void GLimp_InitExtensions( void )
ri.Printf( PRINT_ALL, "...GL_EXT_texture_env_add not found\n" );
}
- // GL_ARB_multitexture
- qglMultiTexCoord2fARB = NULL;
- qglActiveTextureARB = NULL;
- qglClientActiveTextureARB = NULL;
- if ( Q_stristr( glConfig.extensions_string, "GL_ARB_multitexture" ) )
- {
- if ( r_ext_multitexture->value )
- {
- qglMultiTexCoord2fARB = ( PFNGLMULTITEXCOORD2FARBPROC ) SDL_GL_GetProcAddress( "glMultiTexCoord2fARB" );
- qglActiveTextureARB = ( PFNGLACTIVETEXTUREARBPROC ) SDL_GL_GetProcAddress( "glActiveTextureARB" );
- qglClientActiveTextureARB = ( PFNGLCLIENTACTIVETEXTUREARBPROC ) SDL_GL_GetProcAddress( "glClientActiveTextureARB" );
-
- if ( qglActiveTextureARB )
- {
- GLint glint = 0;
- qglGetIntegerv( GL_MAX_TEXTURE_UNITS_ARB, &glint );
- glConfig.maxActiveTextures = (int) glint;
- if ( glConfig.maxActiveTextures > 1 )
- {
- ri.Printf( PRINT_ALL, "...using GL_ARB_multitexture\n" );
- }
- else
- {
- qglMultiTexCoord2fARB = NULL;
- qglActiveTextureARB = NULL;
- qglClientActiveTextureARB = NULL;
- ri.Printf( PRINT_ALL, "...not using GL_ARB_multitexture, < 2 texture units\n" );
- }
- }
- }
- else
- {
- ri.Printf( PRINT_ALL, "...ignoring GL_ARB_multitexture\n" );
- }
- }
- else
- {
- ri.Printf( PRINT_ALL, "...GL_ARB_multitexture not found\n" );
- }
-
// GL_EXT_compiled_vertex_array
if ( Q_stristr( glConfig.extensions_string, "GL_EXT_compiled_vertex_array" ) )
{
@@ -490,7 +446,7 @@ void GLimp_Init( void )
{
if( r_mode->integer != R_MODE_FALLBACK )
{
- ri.Printf( PRINT_ALL, "Setting r_mode %d failed, falling back on r_mode %d",
+ ri.Printf( PRINT_ALL, "Setting r_mode %d failed, falling back on r_mode %d\n",
r_mode->integer, R_MODE_FALLBACK );
if( !GLimp_StartDriverAndSetMode( R_MODE_FALLBACK, r_fullscreen->integer ) )
success = qfalse;
@@ -515,6 +471,11 @@ void GLimp_Init( void )
Q_strncpyz( glConfig.version_string, (char *) qglGetString (GL_VERSION), sizeof( glConfig.version_string ) );
Q_strncpyz( glConfig.extensions_string, (char *) qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) );
+ // multitexturing
+ qglGetIntegerv( GL_MAX_TEXTURE_UNITS, (GLint *)&glConfig.numTextureUnits );
+ if( glConfig.numTextureUnits < 2 )
+ ri.Printf( PRINT_ALL, "Insufficient texture units for multitexturing\n" );
+
// initialize extensions
GLimp_InitExtensions( );