OpenGL2: Fix some GL errors and no sun shadows on older OpenGLs.
This commit is contained in:
1 parent
0f6f2be155
commit
d11cfc88d5
3 files changed
+8
-6
No files matched your search
@@ -115,7 +115,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);
|
||||
}
|
||||
@@ -2817,8 +2817,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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user