-/* $Id: teximage.c,v 1.101 2001/07/16 15:54:23 brianp Exp $ */
+/* $Id: teximage.c,v 1.102 2001/07/23 16:18:18 brianp Exp $ */
/*
* Mesa 3-D graphics library
+#if 000 /* not used anymore */
/*
* glTexImage[123]D can accept a NULL image pointer. In this case we
* create a texture image with unspecified image contents per the OpenGL
return data;
}
+#endif
_mesa_update_state(ctx);
ASSERT(ctx->Driver.TexImage1D);
+
+#if 0 /* don't make default teximage anymore */
if (pixels) {
(*ctx->Driver.TexImage1D)(ctx, target, level, internalFormat,
width, border, format, type, pixels,
FREE(dummy);
}
}
+#else
+ /* <pixels> may be null! */
+ (*ctx->Driver.TexImage1D)(ctx, target, level, internalFormat,
+ width, border, format, type, pixels,
+ &ctx->Unpack, texObj, texImage);
+#endif
ASSERT(texImage->TexFormat);
if (!texImage->FetchTexel) {
_mesa_update_state(ctx);
ASSERT(ctx->Driver.TexImage2D);
+
+#if 0 /* don't make default teximage anymore */
if (pixels) {
(*ctx->Driver.TexImage2D)(ctx, target, level, internalFormat,
width, height, border, format, type, pixels,
FREE(dummy);
}
}
+#else
+ /* <pixels> may be null! */
+ (*ctx->Driver.TexImage2D)(ctx, target, level, internalFormat,
+ width, height, border, format, type, pixels,
+ &ctx->Unpack, texObj, texImage);
+#endif
ASSERT(texImage->TexFormat);
if (!texImage->FetchTexel) {
_mesa_update_state(ctx);
ASSERT(ctx->Driver.TexImage3D);
+
+#if 0 /* don't make default teximage anymore */
if (pixels) {
(*ctx->Driver.TexImage3D)(ctx, target, level, (GLint) internalFormat,
width, height, depth, border,
FREE(dummy);
}
}
+#else
+ /* <pixels> may be null! */
+ (*ctx->Driver.TexImage3D)(ctx, target, level, internalFormat,
+ width, height, depth, border, format, type,
+ pixels, &ctx->Unpack, texObj, texImage);
+#endif
ASSERT(texImage->TexFormat);
if (!texImage->FetchTexel) {