diff --git a/code/renderergl2/tr_backend.c b/code/renderergl2/tr_backend.c index b8314039..35423086 100644 --- a/code/renderergl2/tr_backend.c +++ b/code/renderergl2/tr_backend.c @@ -77,6 +77,9 @@ void GL_SelectTexture( int unit ) if (!(unit >= 0 && unit <= 31)) ri.Error( ERR_DROP, "GL_SelectTexture: unit = %i", unit ); + if (!qglActiveTextureARB) + ri.Error( ERR_DROP, "GL_SelectTexture: multitexture disabled" ); + qglActiveTextureARB( GL_TEXTURE0_ARB + unit ); glState.currenttmu = unit; @@ -1653,7 +1656,7 @@ const void *RB_PostProcess(const void *data) if (srcFbo) { - if (r_hdr->integer && (r_toneMap->integer || r_forceToneMap->integer)) + if (r_hdr->integer && (r_toneMap->integer || r_forceToneMap->integer) && qglActiveTextureARB) { autoExposure = r_autoExposure->integer || r_forceAutoExposure->integer; RB_ToneMap(srcFbo, srcBox, NULL, dstBox, autoExposure); diff --git a/code/renderergl2/tr_shader.c b/code/renderergl2/tr_shader.c index 98d45ebe..a8b13787 100644 --- a/code/renderergl2/tr_shader.c +++ b/code/renderergl2/tr_shader.c @@ -2370,7 +2370,7 @@ static void CollapseStagesToLightall(shaderStage_t *diffuse, } -static qboolean CollapseStagesToGLSL(void) +static int CollapseStagesToGLSL(void) { int i, j, numStages; qboolean skip = qfalse; @@ -3107,7 +3107,9 @@ static shader_t *FinishShader( void ) { // // look for multitexture potential // - stage = CollapseStagesToGLSL(); + if ( qglActiveTextureARB ) { + stage = CollapseStagesToGLSL(); + } if ( shader.lightmapIndex >= 0 && !hasLightmapStage ) { if (vertexLightmap) {