mirror of
https://github.com/ioquake/ioq3.git
synced 2025-02-21 11:11:20 +00:00
OpenGL2: GL_DEPTH_TEXTURE_MODE was removed from OpenGL 3.0/Core
GL_DEPTH_TEXTURE_MODE defaults to GL_LUMINANCE. Code sets it here as part of a workaround old nvidia drivers (apparently? the URL in comment is dead). GL_DEPTH_TEXTURE_MODE was removed in OpenGL 3.0 / 3.2 Core contexts and may be treated as an error.
This commit is contained in:
parent
1c8b1122c5
commit
d1d5a89aad
1 changed files with 3 additions and 1 deletions
|
@ -2215,7 +2215,9 @@ image_t *R_CreateImage2( const char *name, byte *pic, int width, int height, GLe
|
|||
case GL_DEPTH_COMPONENT32_ARB:
|
||||
// Fix for sampling depth buffer on old nVidia cards.
|
||||
// from http://www.idevgames.com/forums/thread-4141-post-34844.html#pid34844
|
||||
qglTextureParameterfEXT(image->texnum, textureTarget, GL_DEPTH_TEXTURE_MODE, GL_LUMINANCE);
|
||||
if ( !QGL_VERSION_ATLEAST( 3, 0 ) ) {
|
||||
qglTextureParameterfEXT(image->texnum, textureTarget, GL_DEPTH_TEXTURE_MODE, GL_LUMINANCE);
|
||||
}
|
||||
qglTextureParameterfEXT(image->texnum, textureTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
qglTextureParameterfEXT(image->texnum, textureTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue