diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2008-10-01 15:51:56 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2008-10-01 20:38:10 -0700 |
commit | 4741dbcbbc2514de370a760f4b78a17491014555 (patch) | |
tree | edbc0a4d5585fd42da49f7d832173ec41508ec3b /src/mesa/main/teximage.c | |
parent | 17fdd1ab3b48da8dff742e626c3c59bc89cafeed (diff) |
Unify ARB_depth_texture and SGIX_depth_texture
The ARB extension is a superset of the older SGIX extension. Any
hardware that can support the SGIX version can also support the ARB
version. In Mesa, any driver that supports one also supports the
other. This unification just simplifies some bits of code.
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index b0a2d6ddb3d..4a419fde261 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -241,13 +241,12 @@ _mesa_base_tex_format( GLcontext *ctx, GLint internalFormat ) } } - if (ctx->Extensions.SGIX_depth_texture || - ctx->Extensions.ARB_depth_texture) { + if (ctx->Extensions.ARB_depth_texture) { switch (internalFormat) { case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT16_SGIX: - case GL_DEPTH_COMPONENT24_SGIX: - case GL_DEPTH_COMPONENT32_SGIX: + case GL_DEPTH_COMPONENT16: + case GL_DEPTH_COMPONENT24: + case GL_DEPTH_COMPONENT32: return GL_DEPTH_COMPONENT; default: ; /* fallthrough */ @@ -526,9 +525,9 @@ static GLboolean is_depth_format(GLenum format) { switch (format) { - case GL_DEPTH_COMPONENT16_ARB: - case GL_DEPTH_COMPONENT24_ARB: - case GL_DEPTH_COMPONENT32_ARB: + case GL_DEPTH_COMPONENT16: + case GL_DEPTH_COMPONENT24: + case GL_DEPTH_COMPONENT32: case GL_DEPTH_COMPONENT: return GL_TRUE; default: @@ -2297,8 +2296,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format, return; } - if (!ctx->Extensions.SGIX_depth_texture && - !ctx->Extensions.ARB_depth_texture && is_depth_format(format)) { + if (!ctx->Extensions.ARB_depth_texture && is_depth_format(format)) { _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); return; } |