summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-02-17 00:15:39 +0000
committerBrian Paul <[email protected]>2001-02-17 00:15:39 +0000
commitf7e1dfeaefda8865252513bc4d880ea8640efe4d (patch)
tree12fa38278c6ea1d73d9f27f8c5222791953f7809 /src/mesa/main/texstate.c
parent23e8d46e072669e0974d7b2c168d4770183106bd (diff)
Work in glGetTexImage() to return GL_COLOR_INDEX images.
Prototype code for GL_SGIX_depth_texture / more flexible teximage code.
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 33b7da06041..ecfd5c59b31 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -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: