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

texcompress.h File Reference

#include "mtypes.h"

Functions

GLuint _mesa_get_compressed_formats (GLcontext *ctx, GLint *formats, GLboolean all)
 Return list of (and count of) all specific texture compression formats that are supported.
GLuint _mesa_compressed_texture_size (GLcontext *ctx, GLsizei width, GLsizei height, GLsizei depth, GLuint mesaFormat)
 Return number of bytes needed to store a texture of the given size using the specified compressed format.
GLuint _mesa_compressed_texture_size_glenum (GLcontext *ctx, GLsizei width, GLsizei height, GLsizei depth, GLenum glformat)
 As above, but format is specified by a GLenum (GL_COMPRESSED_*) token.
GLint _mesa_compressed_row_stride (GLuint mesaFormat, GLsizei width)
GLubyte * _mesa_compressed_image_address (GLint col, GLint row, GLint img, GLuint mesaFormat, GLsizei width, const GLubyte *image)
void _mesa_init_texture_s3tc (GLcontext *ctx)
void _mesa_init_texture_fxt1 (GLcontext *ctx)
 Called during context initialization.


Function Documentation

GLubyte* _mesa_compressed_image_address ( GLint  col,
GLint  row,
GLint  img,
GLuint  mesaFormat,
GLsizei  width,
const GLubyte *  image 
)

GLint _mesa_compressed_row_stride ( GLuint  mesaFormat,
GLsizei  width 
)

GLuint _mesa_compressed_texture_size ( GLcontext ctx,
GLsizei  width,
GLsizei  height,
GLsizei  depth,
GLuint  mesaFormat 
)

Return number of bytes needed to store a texture of the given size using the specified compressed format.

This is called via the ctx->Driver.CompressedTextureSize function, unless a device driver overrides it.

Parameters:
width texture width in texels.
height texture height in texels.
depth texture depth in texels.
mesaFormat one of the MESA_FORMAT_* compressed formats
Returns:
size in bytes, or zero if bad format

GLuint _mesa_compressed_texture_size_glenum ( GLcontext ctx,
GLsizei  width,
GLsizei  height,
GLsizei  depth,
GLenum  glformat 
)

As above, but format is specified by a GLenum (GL_COMPRESSED_*) token.

Note: This function CAN NOT return a padded hardware texture size. That's why we don't call the ctx->Driver.CompressedTextureSize() function.

We use this function to validate the <imageSize> parameter of glCompressedTex[Sub]Image1/2/3D(), which must be an exact match.

GLuint _mesa_get_compressed_formats ( GLcontext ctx,
GLint *  formats,
GLboolean  all 
)

Return list of (and count of) all specific texture compression formats that are supported.

Parameters:
ctx the GL context
formats the resulting format list (may be NULL).
all if true return all formats, even those with some kind of restrictions/limitations (See GL_ARB_texture_compression spec for more info).
Returns:
number of formats.

void _mesa_init_texture_fxt1 ( GLcontext ctx  ) 

Called during context initialization.

void _mesa_init_texture_s3tc ( GLcontext ctx  ) 


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