Work in glGetTexImage() to return GL_COLOR_INDEX images.

Prototype code for GL_SGIX_depth_texture / more flexible teximage code.
This commit is contained in:
Brian Paul
2001-02-17 00:15:39 +00:00
parent 23e8d46e07
commit f7e1dfeaef
5 changed files with 302 additions and 38 deletions

View File

@@ -1,10 +1,10 @@
/* $Id: texstate.c,v 1.30 2001/02/06 21:42:48 brianp Exp $ */
/* $Id: texstate.c,v 1.31 2001/02/17 00:15:39 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -921,6 +921,15 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
case GL_TEXTURE_INDEX_SIZE_EXT:
*params = img->IndexBits;
return;
case GL_DEPTH_BITS:
/* XXX this isn't in the GL_SGIX_depth_texture spec
* but seems appropriate.
*/
if (ctx->Extensions.SGIX_depth_texture)
*params = img->DepthBits;
else
gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)");
return;
/* GL_ARB_texture_compression */
case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB: