From 3893e638e6521b9c070e01c0b31d22754ff97a88 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 May 2001 16:41:03 +0000 Subject: initial support for GL_SGIS_generate_mipmap extension --- src/mesa/swrast/s_texstore.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/mesa/swrast/s_texstore.c') diff --git a/src/mesa/swrast/s_texstore.c b/src/mesa/swrast/s_texstore.c index b7ca0abf35..e1adeded7f 100644 --- a/src/mesa/swrast/s_texstore.c +++ b/src/mesa/swrast/s_texstore.c @@ -1,4 +1,4 @@ -/* $Id: s_texstore.c,v 1.4 2001/05/03 22:13:32 brianp Exp $ */ +/* $Id: s_texstore.c,v 1.5 2001/05/21 16:41:04 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -46,6 +46,7 @@ #include "mem.h" #include "texformat.h" #include "teximage.h" +#include "texstore.h" #include "s_context.h" #include "s_depth.h" @@ -190,6 +191,11 @@ _swrast_copy_teximage1d( GLcontext *ctx, GLenum target, GLint level, &_mesa_native_packing, texObj, texImage); FREE(image); } + + /* GL_SGIS_generate_mipmap */ + if (level == texObj->BaseLevel && texObj->GenerateMipmap) { + _mesa_generate_mipmap(ctx, texUnit, texObj); + } } @@ -244,6 +250,11 @@ _swrast_copy_teximage2d( GLcontext *ctx, GLenum target, GLint level, &_mesa_native_packing, texObj, texImage); FREE(image); } + + /* GL_SGIS_generate_mipmap */ + if (level == texObj->BaseLevel && texObj->GenerateMipmap) { + _mesa_generate_mipmap(ctx, texUnit, texObj); + } } @@ -311,6 +322,11 @@ _swrast_copy_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, &_mesa_native_packing, texObj, texImage); FREE(image); } + + /* GL_SGIS_generate_mipmap */ + if (level == texObj->BaseLevel && texObj->GenerateMipmap) { + _mesa_generate_mipmap(ctx, texUnit, texObj); + } } @@ -382,6 +398,11 @@ _swrast_copy_texsubimage2d( GLcontext *ctx, &_mesa_native_packing, texObj, texImage); FREE(image); } + + /* GL_SGIS_generate_mipmap */ + if (level == texObj->BaseLevel && texObj->GenerateMipmap) { + _mesa_generate_mipmap(ctx, texUnit, texObj); + } } @@ -452,4 +473,9 @@ _swrast_copy_texsubimage3d( GLcontext *ctx, &_mesa_native_packing, texObj, texImage); FREE(image); } + + /* GL_SGIS_generate_mipmap */ + if (level == texObj->BaseLevel && texObj->GenerateMipmap) { + _mesa_generate_mipmap(ctx, texUnit, texObj); + } } -- cgit v1.2.3