-/* $Id: texobj.c,v 1.28 2000/10/24 01:13:58 brianp Exp $ */
+/* $Id: texobj.c,v 1.29 2000/10/24 02:53:18 brianp Exp $ */
/*
* Mesa 3-D graphics library
FREE( t );
}
+#if 0
+static void
+incomplete(const struct gl_texture_object *t, const char *why)
+{
+ printf("Texture Obj %d incomplete because: %s\n", t->Name, why);
+}
+#else
+#define incomplete(a, b)
+#endif
/*
/* Always need level zero image */
if (!t->Image[baseLevel]) {
+ incomplete(t, "Image[baseLevel] == NULL");
t->Complete = GL_FALSE;
return;
}
t->NegZ[baseLevel]->Width2 != w ||
t->NegZ[baseLevel]->Height2 != h) {
t->Complete = GL_FALSE;
+ incomplete(t, "Non-quare cubemap image");
return;
}
}
if (minLevel > maxLevel) {
t->Complete = GL_FALSE;
+ incomplete(t, "minLevel > maxLevel");
return;
}
if (t->Image[i]) {
if (t->Image[i]->Format != t->Image[baseLevel]->Format) {
t->Complete = GL_FALSE;
+ incomplete(t, "Format[i] != Format[baseLevel]");
return;
}
if (t->Image[i]->Border != t->Image[baseLevel]->Border) {
t->Complete = GL_FALSE;
+ incomplete(t, "Border[i] != Border[baseLevel]");
return;
}
}
if (i >= minLevel && i <= maxLevel) {
if (!t->Image[i]) {
t->Complete = GL_FALSE;
+ incomplete(t, "1D Image[i] == NULL");
return;
}
if (t->Image[i]->Width2 != width ) {
t->Complete = GL_FALSE;
+ incomplete(t, "1D Image[i] bad width");
return;
}
}
if (i >= minLevel && i <= maxLevel) {
if (!t->Image[i]) {
t->Complete = GL_FALSE;
+ incomplete(t, "2D Image[i] == NULL");
return;
}
if (t->Image[i]->Width2 != width) {
t->Complete = GL_FALSE;
+ incomplete(t, "2D Image[i] bad width");
return;
}
if (t->Image[i]->Height2 != height) {
t->Complete = GL_FALSE;
+ incomplete(t, "2D Image[i] bad height");
return;
}
if (width==1 && height==1) {
}
if (i >= minLevel && i <= maxLevel) {
if (!t->Image[i]) {
+ incomplete(t, "3D Image[i] == NULL");
t->Complete = GL_FALSE;
return;
}
if (t->Image[i]->Width2 != width) {
t->Complete = GL_FALSE;
+ incomplete(t, "3D Image[i] bad width");
return;
}
if (t->Image[i]->Height2 != height) {
t->Complete = GL_FALSE;
+ incomplete(t, "3D Image[i] bad height");
return;
}
if (t->Image[i]->Depth2 != depth) {
t->Complete = GL_FALSE;
+ incomplete(t, "3D Image[i] bad depth");
return;
}
}
!t->PosY[i] || !t->NegY[i] ||
!t->PosZ[i] || !t->NegZ[i]) {
t->Complete = GL_FALSE;
+ incomplete(t, "CubeMap Image[i] == NULL");
return;
}
/* check that all six images have same size */
t->PosZ[i]->Width2!=width || t->PosZ[i]->Height2!=height ||
t->NegZ[i]->Width2!=width || t->NegZ[i]->Height2!=height) {
t->Complete = GL_FALSE;
+ incomplete(t, "CubeMap Image[i] bad size");
return;
}
}