-/* $Id: teximage.c,v 1.73 2001/02/07 03:27:41 brianp Exp $ */
+/* $Id: teximage.c,v 1.74 2001/02/07 16:27:41 brianp Exp $ */
/*
* Mesa 3-D graphics library
format, type, 1,
postConvWidth, 1, 1, border);
if (!error) {
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_image *texImage;
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
+ init_teximage_fields(ctx, texImage, postConvWidth, 1, 1,
+ border, internalFormat);
ASSERT(ctx->Driver.TestProxyTexImage);
error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level,
internalFormat, format, type,
format, type, 2,
postConvWidth, postConvHeight, 1, border);
if (!error) {
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_image *texImage;
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
+ init_teximage_fields(ctx, texImage, postConvWidth, postConvHeight, 1,
+ border, internalFormat);
ASSERT(ctx->Driver.TestProxyTexImage);
error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level,
internalFormat, format, type,
GLenum error = texture_error_check(ctx, target, level, internalFormat,
format, type, 3, width, height, depth, border);
if (!error) {
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_image *texImage;
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
+ init_teximage_fields(ctx, texImage, width, height, 1,
+ border, internalFormat);
ASSERT(ctx->Driver.TestProxyTexImage);
error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level,
internalFormat, format, type,
GLenum error = texture_error_check(ctx, target, level, internalFormat,
GL_NONE, GL_NONE, 1, width, 1, 1, border);
if (!error) {
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_image *texImage;
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
+ init_teximage_fields(ctx, texImage, width, 1, 1,
+ border, internalFormat);
ASSERT(ctx->Driver.TestProxyTexImage);
error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level,
internalFormat, GL_NONE, GL_NONE,
GLenum error = texture_error_check(ctx, target, level, internalFormat,
GL_NONE, GL_NONE, 2, width, height, 1, border);
if (!error) {
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_image *texImage;
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
+ init_teximage_fields(ctx, texImage, width, height, 1,
+ border, internalFormat);
ASSERT(ctx->Driver.TestProxyTexImage);
error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level,
internalFormat, GL_NONE, GL_NONE,
GLenum error = texture_error_check(ctx, target, level, internalFormat,
GL_NONE, GL_NONE, 1, width, height, depth, border);
if (!error) {
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_image *texImage;
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
+ init_teximage_fields(ctx, texImage, width, height, depth,
+ border, internalFormat);
ASSERT(ctx->Driver.TestProxyTexImage);
error = !(*ctx->Driver.TestProxyTexImage)(ctx, target, level,
internalFormat, GL_NONE, GL_NONE,
GLsizei width, GLenum format,
GLsizei imageSize, const GLvoid *data)
{
- GET_CURRENT_CONTEXT(ctx);
struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
+ GET_CURRENT_CONTEXT(ctx);
if (subtexture_error_check(ctx, 1, target, level, xoffset, 0, 0,
width, 1, 1, format, GL_NONE)) {
GLenum format, GLsizei imageSize,
const GLvoid *data)
{
- GET_CURRENT_CONTEXT(ctx);
struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
+ GET_CURRENT_CONTEXT(ctx);
if (subtexture_error_check(ctx, 2, target, level, xoffset, yoffset, 0,
width, height, 1, format, GL_NONE)) {
GLsizei height, GLsizei depth, GLenum format,
GLsizei imageSize, const GLvoid *data)
{
- GET_CURRENT_CONTEXT(ctx);
struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
+ GET_CURRENT_CONTEXT(ctx);
if (subtexture_error_check(ctx, 3, target, level, xoffset, yoffset, zoffset,
width, height, depth, format, GL_NONE)) {
void
_mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
{
- GET_CURRENT_CONTEXT(ctx);
const struct gl_texture_unit *texUnit;
const struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
+ GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);