core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

texcompress_s3tc.c File Reference


Detailed Description

GL_EXT_texture_compression_s3tc support.

#include "glheader.h"
#include "imports.h"
#include "colormac.h"
#include "context.h"
#include "convolve.h"
#include "dlopen.h"
#include "image.h"
#include "texcompress.h"
#include "texformat.h"
#include "texstore.h"

Defines

#define USE_EXTERNAL_DXTN_LIB   1
#define DXTN_LIBNAME   "libtxc_dxtn.so"

Typedefs

typedef void(* dxtFetchTexelFuncExt )(GLint srcRowstride, GLubyte *pixdata, GLint col, GLint row, GLvoid *texelOut)
typedef void(* dxtCompressTexFuncExt )(GLint srccomps, GLint width, GLint height, const GLchan *srcPixData, GLenum destformat, GLubyte *dest, GLint dstRowStride)

Functions

void _mesa_init_texture_s3tc (GLcontext *ctx)
static GLboolean texstore_rgb_dxt1 (TEXSTORE_PARAMS)
 Called via TexFormat->StoreImage to store an RGB_DXT1 texture.
static GLboolean texstore_rgba_dxt1 (TEXSTORE_PARAMS)
 Called via TexFormat->StoreImage to store an RGBA_DXT1 texture.
static GLboolean texstore_rgba_dxt3 (TEXSTORE_PARAMS)
 Called via TexFormat->StoreImage to store an RGBA_DXT3 texture.
static GLboolean texstore_rgba_dxt5 (TEXSTORE_PARAMS)
 Called via TexFormat->StoreImage to store an RGBA_DXT5 texture.
static void fetch_texel_2d_rgb_dxt1 (const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLchan *texel)
static void fetch_texel_2d_f_rgb_dxt1 (const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel)
static void fetch_texel_2d_rgba_dxt1 (const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLchan *texel)
static void fetch_texel_2d_f_rgba_dxt1 (const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel)
static void fetch_texel_2d_rgba_dxt3 (const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLchan *texel)
static void fetch_texel_2d_f_rgba_dxt3 (const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel)
static void fetch_texel_2d_rgba_dxt5 (const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLchan *texel)
static void fetch_texel_2d_f_rgba_dxt5 (const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel)

Variables

dxtFetchTexelFuncExt fetch_ext_rgb_dxt1 = NULL
dxtFetchTexelFuncExt fetch_ext_rgba_dxt1 = NULL
dxtFetchTexelFuncExt fetch_ext_rgba_dxt3 = NULL
dxtFetchTexelFuncExt fetch_ext_rgba_dxt5 = NULL
static dxtCompressTexFuncExt ext_tx_compress_dxtn = NULL
static void * dxtlibhandle = NULL
struct gl_texture_format _mesa_texformat_rgb_dxt1
struct gl_texture_format _mesa_texformat_rgba_dxt1
struct gl_texture_format _mesa_texformat_rgba_dxt3
struct gl_texture_format _mesa_texformat_rgba_dxt5


Define Documentation

#define DXTN_LIBNAME   "libtxc_dxtn.so"

#define USE_EXTERNAL_DXTN_LIB   1


Typedef Documentation

typedef void(* dxtCompressTexFuncExt)(GLint srccomps, GLint width, GLint height, const GLchan *srcPixData, GLenum destformat, GLubyte *dest, GLint dstRowStride)

typedef void(* dxtFetchTexelFuncExt)(GLint srcRowstride, GLubyte *pixdata, GLint col, GLint row, GLvoid *texelOut)


Function Documentation

void _mesa_init_texture_s3tc ( GLcontext ctx  ) 

static void fetch_texel_2d_f_rgb_dxt1 ( const struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
GLfloat *  texel 
) [static]

static void fetch_texel_2d_f_rgba_dxt1 ( const struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
GLfloat *  texel 
) [static]

static void fetch_texel_2d_f_rgba_dxt3 ( const struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
GLfloat *  texel 
) [static]

static void fetch_texel_2d_f_rgba_dxt5 ( const struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
GLfloat *  texel 
) [static]

static void fetch_texel_2d_rgb_dxt1 ( const struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
GLchan *  texel 
) [static]

static void fetch_texel_2d_rgba_dxt1 ( const struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
GLchan *  texel 
) [static]

static void fetch_texel_2d_rgba_dxt3 ( const struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
GLchan *  texel 
) [static]

static void fetch_texel_2d_rgba_dxt5 ( const struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
GLchan *  texel 
) [static]

static GLboolean texstore_rgb_dxt1 ( TEXSTORE_PARAMS   )  [static]

Called via TexFormat->StoreImage to store an RGB_DXT1 texture.

static GLboolean texstore_rgba_dxt1 ( TEXSTORE_PARAMS   )  [static]

Called via TexFormat->StoreImage to store an RGBA_DXT1 texture.

static GLboolean texstore_rgba_dxt3 ( TEXSTORE_PARAMS   )  [static]

Called via TexFormat->StoreImage to store an RGBA_DXT3 texture.

static GLboolean texstore_rgba_dxt5 ( TEXSTORE_PARAMS   )  [static]

Called via TexFormat->StoreImage to store an RGBA_DXT5 texture.


Variable Documentation

struct gl_texture_format _mesa_texformat_rgb_dxt1

Initial value:

 {
   MESA_FORMAT_RGB_DXT1,                
   GL_RGB,                              
   GL_UNSIGNED_NORMALIZED_ARB,          
   4,                   
   4,                   
   4,                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   texstore_rgb_dxt1,                   
   NULL,                
   fetch_texel_2d_rgb_dxt1,             
   NULL,                
   NULL,                
   fetch_texel_2d_f_rgb_dxt1,           
   NULL,                
   NULL                                 
}

struct gl_texture_format _mesa_texformat_rgba_dxt1

Initial value:

 {
   MESA_FORMAT_RGBA_DXT1,               
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   4,                   
   4,                   
   4,                   
   1,                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   texstore_rgba_dxt1,                  
   NULL,                
   fetch_texel_2d_rgba_dxt1,            
   NULL,                
   NULL,                
   fetch_texel_2d_f_rgba_dxt1,          
   NULL,                
   NULL                                 
}

struct gl_texture_format _mesa_texformat_rgba_dxt3

Initial value:

 {
   MESA_FORMAT_RGBA_DXT3,               
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   4,                   
   4,                   
   4,                   
   4,                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   texstore_rgba_dxt3,                  
   NULL,                
   fetch_texel_2d_rgba_dxt3,            
   NULL,                
   NULL,                
   fetch_texel_2d_f_rgba_dxt3,          
   NULL,                
   NULL                                 
}

struct gl_texture_format _mesa_texformat_rgba_dxt5

Initial value:

 {
   MESA_FORMAT_RGBA_DXT5,               
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   4,                           
   4,                           
   4,                           
   4,                           
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   texstore_rgba_dxt5,                  
   NULL,                
   fetch_texel_2d_rgba_dxt5,            
   NULL,                
   NULL,                
   fetch_texel_2d_f_rgba_dxt5,          
   NULL,                
   NULL                                 
}

void* dxtlibhandle = NULL [static]

dxtCompressTexFuncExt ext_tx_compress_dxtn = NULL [static]

dxtFetchTexelFuncExt fetch_ext_rgb_dxt1 = NULL

dxtFetchTexelFuncExt fetch_ext_rgba_dxt1 = NULL

dxtFetchTexelFuncExt fetch_ext_rgba_dxt3 = NULL

dxtFetchTexelFuncExt fetch_ext_rgba_dxt5 = NULL


Generated on Sun Sep 27 06:47:46 2009 for Mesa Main by  doxygen 1.5.4