summaryrefslogtreecommitdiff
path: root/src/renderergl2
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderergl2')
-rw-r--r--src/renderergl2/tr_backend.c5
-rw-r--r--src/renderergl2/tr_shader.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/renderergl2/tr_backend.c b/src/renderergl2/tr_backend.c
index 964da39a..2ba52f69 100644
--- a/src/renderergl2/tr_backend.c
+++ b/src/renderergl2/tr_backend.c
@@ -78,6 +78,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;
@@ -1654,7 +1657,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/src/renderergl2/tr_shader.c b/src/renderergl2/tr_shader.c
index 867f0a47..689df052 100644
--- a/src/renderergl2/tr_shader.c
+++ b/src/renderergl2/tr_shader.c
@@ -2371,7 +2371,7 @@ static void CollapseStagesToLightall(shaderStage_t *diffuse,
}
-static qboolean CollapseStagesToGLSL(void)
+static int CollapseStagesToGLSL(void)
{
int i, j, numStages;
qboolean skip = qfalse;
@@ -3108,7 +3108,9 @@ static shader_t *FinishShader( void ) {
//
// look for multitexture potential
//
- stage = CollapseStagesToGLSL();
+ if ( qglActiveTextureARB ) {
+ stage = CollapseStagesToGLSL();
+ }
if ( shader.lightmapIndex >= 0 && !hasLightmapStage ) {
if (vertexLightmap) {