From 7d58f44f73be59bd3583e6dfeedf56c43f7fbd55 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 4 Apr 2001 21:54:20 +0000 Subject: More texture image changes. 1. Added ctx->Driver.ChooseTextureFormat() function. Examines user's internalFormat, format, type params and returns a gl_texture_format. 2. _mesa_store_teximage[123]d() calls ctx->Driver.ChooseTextureFormat(), allocates storage and transfers the image into the desired format. 3. _mesa_transfer_teximage() now takes a gl_texture_format to describe the destination format. Any combination of input format/type and output gl_texture_format is accepted. Uses optimized _mesa_convert_- texsubimage[123]d() functions when possible. 3. DRI driver's TexImage[123]D functions should be a lot simpler now. --- src/mesa/main/texformat.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/texformat.h') diff --git a/src/mesa/main/texformat.h b/src/mesa/main/texformat.h index 6f686265ef..ac6dbc0cb7 100644 --- a/src/mesa/main/texformat.h +++ b/src/mesa/main/texformat.h @@ -1,4 +1,4 @@ -/* $Id: texformat.h,v 1.5 2001/03/22 06:26:18 gareth Exp $ */ +/* $Id: texformat.h,v 1.6 2001/04/04 21:54:21 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -83,9 +83,12 @@ enum _format { }; -extern void -_mesa_init_tex_format( GLcontext *ctx, GLenum internalFormat, - struct gl_texture_image *texImage ); +extern GLboolean +_mesa_is_hardware_tex_format( const struct gl_texture_format *format ); + +extern const struct gl_texture_format * +_mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat, + GLenum format, GLenum type ); /* The default formats, GLchan per component: -- cgit v1.2.3