summaryrefslogtreecommitdiff
path: root/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-02-15 16:32:06 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-02-15 16:32:06 +0000
commit4182cf60d96a077a66675e89694529b5f9e4b329 (patch)
treec2782ab1c645d9bba43de21873e069c3f7b22520 /src/mesa/main/texobj.c
parentc9ceef41fe89f5ba6e16ec51c1f9b7bfd8119c64 (diff)
Finished up GL_ARB_depth_texture and GL_ARB_shadow.
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r--src/mesa/main/texobj.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index a8a27ef3ed..39f65940b5 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1,10 +1,10 @@
-/* $Id: texobj.c,v 1.51 2001/12/04 23:44:56 brianp Exp $ */
+/* $Id: texobj.c,v 1.52 2002/02/15 16:32:06 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 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"),
@@ -84,7 +84,7 @@ _mesa_alloc_texture_object( struct gl_shared_state *shared,
obj->CompareOperator = GL_TEXTURE_LEQUAL_R_SGIX; /* SGIX_shadow */
obj->CompareMode = GL_LUMINANCE; /* ARB_shadow */
obj->CompareFunc = GL_LEQUAL; /* ARB_shadow */
- obj->CompareResult = GL_LUMINANCE; /* ARB_shadow */
+ obj->DepthMode = GL_LUMINANCE; /* ARB_depth_texture */
obj->ShadowAmbient = 0; /* ARB/SGIX_shadow_ambient */
_mesa_init_colortable(&obj->Palette);
@@ -360,6 +360,11 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
t->Complete = GL_FALSE;
return;
}
+ if (t->Image[i]->Format == GL_DEPTH_COMPONENT) {
+ t->Complete = GL_FALSE;
+ incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex");
+ return;
+ }
if (t->Image[i]->Width2 != width) {
t->Complete = GL_FALSE;
incomplete(t, "3D Image[i] bad width");
@@ -393,6 +398,12 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
height /= 2;
}
if (i >= minLevel && i <= maxLevel) {
+ /* Don't support GL_DEPTH_COMPONENT for cube maps */
+ if (t->Image[i]->Format == GL_DEPTH_COMPONENT) {
+ t->Complete = GL_FALSE;
+ incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex");
+ return;
+ }
/* check that we have images defined */
if (!t->Image[i] || !t->NegX[i] ||
!t->PosY[i] || !t->NegY[i] ||