diff options
author | SmileTheory <SmileTheory@gmail.com> | 2016-02-17 19:49:21 -0800 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2016-04-07 11:54:14 +0100 |
commit | 3043117bd95828ddc350a296f93489869474c4ea (patch) | |
tree | 27a2a749bceeaaa04443d7a27d36ce09ea30a327 /src/renderergl2/tr_image.c | |
parent | 93a760743f4949330e301ca6729c1d88ba8484c1 (diff) |
OpenGL2: Fix some GL errors and no sun shadows on older OpenGLs.
Diffstat (limited to 'src/renderergl2/tr_image.c')
-rw-r--r-- | src/renderergl2/tr_image.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/renderergl2/tr_image.c b/src/renderergl2/tr_image.c index 47843fe2..d567193b 100644 --- a/src/renderergl2/tr_image.c +++ b/src/renderergl2/tr_image.c @@ -116,7 +116,7 @@ void GL_TextureMode( const char *string ) { // change all the existing mipmap texture objects for ( i = 0 ; i < tr.numImages ; i++ ) { glt = tr.images[ i ]; - if ( glt->flags & IMGFLAG_MIPMAP ) { + if ( glt->flags & IMGFLAG_MIPMAP && !(glt->flags & IMGFLAG_CUBEMAP)) { qglTextureParameterf(glt->texnum, GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min); qglTextureParameterf(glt->texnum, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max); } @@ -2818,8 +2818,6 @@ void R_CreateBuiltinImages( void ) { for ( x = 0; x < 4; x++) { tr.sunShadowDepthImage[x] = R_CreateImage(va("*sunshadowdepth%i", x), NULL, r_shadowMapSize->integer, r_shadowMapSize->integer, IMGTYPE_COLORALPHA, IMGFLAG_NO_COMPRESSION | IMGFLAG_CLAMPTOEDGE, GL_DEPTH_COMPONENT24_ARB); - qglTextureParameterf(tr.sunShadowDepthImage[x]->texnum, GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); - qglTextureParameterf(tr.sunShadowDepthImage[x]->texnum, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); qglTextureParameterf(tr.sunShadowDepthImage[x]->texnum, GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); qglTextureParameterf(tr.sunShadowDepthImage[x]->texnum, GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); } |