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

texformat.h File Reference


Detailed Description

Texture formats definitions.

Author:
Gareth Hughes

#include "mtypes.h"

Enumerations

enum  _format {
  MESA_FORMAT_RGBA8888, MESA_FORMAT_RGBA8888_REV, MESA_FORMAT_ARGB8888, MESA_FORMAT_ARGB8888_REV,
  MESA_FORMAT_RGB888, MESA_FORMAT_BGR888, MESA_FORMAT_RGB565, MESA_FORMAT_RGB565_REV,
  MESA_FORMAT_RGBA4444, MESA_FORMAT_ARGB4444, MESA_FORMAT_ARGB4444_REV, MESA_FORMAT_RGBA5551,
  MESA_FORMAT_ARGB1555, MESA_FORMAT_ARGB1555_REV, MESA_FORMAT_AL88, MESA_FORMAT_AL88_REV,
  MESA_FORMAT_RGB332, MESA_FORMAT_A8, MESA_FORMAT_L8, MESA_FORMAT_I8,
  MESA_FORMAT_CI8, MESA_FORMAT_YCBCR, MESA_FORMAT_YCBCR_REV, MESA_FORMAT_Z24_S8,
  MESA_FORMAT_S8_Z24, MESA_FORMAT_Z16, MESA_FORMAT_Z32, MESA_FORMAT_RGBA,
  MESA_FORMAT_RGB, MESA_FORMAT_ALPHA, MESA_FORMAT_LUMINANCE, MESA_FORMAT_LUMINANCE_ALPHA,
  MESA_FORMAT_INTENSITY, MESA_FORMAT_RGBA_FLOAT32, MESA_FORMAT_RGBA_FLOAT16, MESA_FORMAT_RGB_FLOAT32,
  MESA_FORMAT_RGB_FLOAT16, MESA_FORMAT_ALPHA_FLOAT32, MESA_FORMAT_ALPHA_FLOAT16, MESA_FORMAT_LUMINANCE_FLOAT32,
  MESA_FORMAT_LUMINANCE_FLOAT16, MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, MESA_FORMAT_INTENSITY_FLOAT32,
  MESA_FORMAT_INTENSITY_FLOAT16, MESA_FORMAT_DUDV8, MESA_FORMAT_SIGNED_RGBA8888, MESA_FORMAT_SIGNED_RGBA8888_REV
}
 Mesa internal texture image formats. More...

Functions

struct gl_texture_format_mesa_choose_tex_format (GLcontext *ctx, GLint internalFormat, GLenum format, GLenum type)
 Choose an appropriate texture format given the format, type and internalFormat parameters passed to glTexImage().
void _mesa_format_to_type_and_comps (const struct gl_texture_format *format, GLenum *datatype, GLuint *comps)
 Return datatype and number of components per texel for the given gl_texture_format.

Variables

struct gl_texture_format _mesa_texformat_rgba
 GLchan-valued formats.
struct gl_texture_format _mesa_texformat_rgb
struct gl_texture_format _mesa_texformat_alpha
struct gl_texture_format _mesa_texformat_luminance
struct gl_texture_format _mesa_texformat_luminance_alpha
struct gl_texture_format _mesa_texformat_intensity
struct gl_texture_format _mesa_texformat_rgba_float32
 Floating point texture formats.
struct gl_texture_format _mesa_texformat_rgba_float16
struct gl_texture_format _mesa_texformat_rgb_float32
struct gl_texture_format _mesa_texformat_rgb_float16
struct gl_texture_format _mesa_texformat_alpha_float32
struct gl_texture_format _mesa_texformat_alpha_float16
struct gl_texture_format _mesa_texformat_luminance_float32
struct gl_texture_format _mesa_texformat_luminance_float16
struct gl_texture_format _mesa_texformat_luminance_alpha_float32
struct gl_texture_format _mesa_texformat_luminance_alpha_float16
struct gl_texture_format _mesa_texformat_intensity_float32
struct gl_texture_format _mesa_texformat_intensity_float16
struct gl_texture_format _mesa_texformat_dudv8
 Signed fixed point texture formats.
struct gl_texture_format _mesa_texformat_signed_rgba8888
struct gl_texture_format _mesa_texformat_signed_rgba8888_rev
Assorted hardware-friendly formats
struct gl_texture_format _mesa_texformat_rgba8888
struct gl_texture_format _mesa_texformat_rgba8888_rev
struct gl_texture_format _mesa_texformat_argb8888
struct gl_texture_format _mesa_texformat_argb8888_rev
struct gl_texture_format _mesa_texformat_rgb888
struct gl_texture_format _mesa_texformat_bgr888
struct gl_texture_format _mesa_texformat_rgb565
struct gl_texture_format _mesa_texformat_rgb565_rev
struct gl_texture_format _mesa_texformat_rgba4444
struct gl_texture_format _mesa_texformat_argb4444
struct gl_texture_format _mesa_texformat_argb4444_rev
struct gl_texture_format _mesa_texformat_argb1555
struct gl_texture_format _mesa_texformat_argb1555_rev
struct gl_texture_format _mesa_texformat_rgba5551
struct gl_texture_format _mesa_texformat_al88
struct gl_texture_format _mesa_texformat_al88_rev
struct gl_texture_format _mesa_texformat_rgb332
struct gl_texture_format _mesa_texformat_a8
struct gl_texture_format _mesa_texformat_l8
struct gl_texture_format _mesa_texformat_i8
struct gl_texture_format _mesa_texformat_ci8
struct gl_texture_format _mesa_texformat_z24_s8
struct gl_texture_format _mesa_texformat_s8_z24
struct gl_texture_format _mesa_texformat_z16
struct gl_texture_format _mesa_texformat_z32
YCbCr formats
struct gl_texture_format _mesa_texformat_ycbcr
struct gl_texture_format _mesa_texformat_ycbcr_rev
The null format
struct gl_texture_format _mesa_null_texformat


Enumeration Type Documentation

enum _format

Mesa internal texture image formats.

All texture images are stored in one of these formats.

NOTE: when you add a new format, be sure to update the do_row() function in texstore.c used for auto mipmap generation.

Enumerator:
MESA_FORMAT_RGBA8888 
MESA_FORMAT_RGBA8888_REV 
MESA_FORMAT_ARGB8888 
MESA_FORMAT_ARGB8888_REV 
MESA_FORMAT_RGB888 
MESA_FORMAT_BGR888 
MESA_FORMAT_RGB565 
MESA_FORMAT_RGB565_REV 
MESA_FORMAT_RGBA4444 
MESA_FORMAT_ARGB4444 
MESA_FORMAT_ARGB4444_REV 
MESA_FORMAT_RGBA5551 
MESA_FORMAT_ARGB1555 
MESA_FORMAT_ARGB1555_REV 
MESA_FORMAT_AL88 
MESA_FORMAT_AL88_REV 
MESA_FORMAT_RGB332 
MESA_FORMAT_A8 
MESA_FORMAT_L8 
MESA_FORMAT_I8 
MESA_FORMAT_CI8 
MESA_FORMAT_YCBCR 
MESA_FORMAT_YCBCR_REV 
MESA_FORMAT_Z24_S8 
MESA_FORMAT_S8_Z24 
MESA_FORMAT_Z16 
MESA_FORMAT_Z32 
MESA_FORMAT_RGBA 
MESA_FORMAT_RGB 
MESA_FORMAT_ALPHA 
MESA_FORMAT_LUMINANCE 
MESA_FORMAT_LUMINANCE_ALPHA 
MESA_FORMAT_INTENSITY 
MESA_FORMAT_RGBA_FLOAT32 
MESA_FORMAT_RGBA_FLOAT16 
MESA_FORMAT_RGB_FLOAT32 
MESA_FORMAT_RGB_FLOAT16 
MESA_FORMAT_ALPHA_FLOAT32 
MESA_FORMAT_ALPHA_FLOAT16 
MESA_FORMAT_LUMINANCE_FLOAT32 
MESA_FORMAT_LUMINANCE_FLOAT16 
MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32 
MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16 
MESA_FORMAT_INTENSITY_FLOAT32 
MESA_FORMAT_INTENSITY_FLOAT16 
MESA_FORMAT_DUDV8 
MESA_FORMAT_SIGNED_RGBA8888 
MESA_FORMAT_SIGNED_RGBA8888_REV 


Function Documentation

struct gl_texture_format* _mesa_choose_tex_format ( GLcontext ctx,
GLint  internalFormat,
GLenum  format,
GLenum  type 
) [read]

Choose an appropriate texture format given the format, type and internalFormat parameters passed to glTexImage().

Parameters:
ctx the GL context.
internalFormat user's prefered internal texture format.
format incoming image pixel format.
type incoming image data type.
Returns:
a pointer to a gl_texture_format object which describes the choosen texture format, or NULL on failure.
This is called via dd_function_table::ChooseTextureFormat. Hardware drivers will typically override this function with a specialized version.

void _mesa_format_to_type_and_comps ( const struct gl_texture_format format,
GLenum *  datatype,
GLuint *  comps 
)

Return datatype and number of components per texel for the given gl_texture_format.


Variable Documentation

struct gl_texture_format _mesa_null_texformat

struct gl_texture_format _mesa_texformat_a8

struct gl_texture_format _mesa_texformat_al88

struct gl_texture_format _mesa_texformat_al88_rev

struct gl_texture_format _mesa_texformat_alpha

struct gl_texture_format _mesa_texformat_alpha_float16

struct gl_texture_format _mesa_texformat_alpha_float32

struct gl_texture_format _mesa_texformat_argb1555

struct gl_texture_format _mesa_texformat_argb1555_rev

struct gl_texture_format _mesa_texformat_argb4444

struct gl_texture_format _mesa_texformat_argb4444_rev

struct gl_texture_format _mesa_texformat_argb8888

struct gl_texture_format _mesa_texformat_argb8888_rev

struct gl_texture_format _mesa_texformat_bgr888

struct gl_texture_format _mesa_texformat_ci8

struct gl_texture_format _mesa_texformat_dudv8

Signed fixed point texture formats.

struct gl_texture_format _mesa_texformat_i8

struct gl_texture_format _mesa_texformat_intensity

struct gl_texture_format _mesa_texformat_intensity_float16

struct gl_texture_format _mesa_texformat_intensity_float32

struct gl_texture_format _mesa_texformat_l8

struct gl_texture_format _mesa_texformat_luminance

struct gl_texture_format _mesa_texformat_luminance_alpha

struct gl_texture_format _mesa_texformat_luminance_alpha_float16

struct gl_texture_format _mesa_texformat_luminance_alpha_float32

struct gl_texture_format _mesa_texformat_luminance_float16

struct gl_texture_format _mesa_texformat_luminance_float32

struct gl_texture_format _mesa_texformat_rgb

struct gl_texture_format _mesa_texformat_rgb332

struct gl_texture_format _mesa_texformat_rgb565

struct gl_texture_format _mesa_texformat_rgb565_rev

struct gl_texture_format _mesa_texformat_rgb888

struct gl_texture_format _mesa_texformat_rgb_float16

struct gl_texture_format _mesa_texformat_rgb_float32

struct gl_texture_format _mesa_texformat_rgba

GLchan-valued formats.

struct gl_texture_format _mesa_texformat_rgba4444

struct gl_texture_format _mesa_texformat_rgba5551

struct gl_texture_format _mesa_texformat_rgba8888

struct gl_texture_format _mesa_texformat_rgba8888_rev

struct gl_texture_format _mesa_texformat_rgba_float16

struct gl_texture_format _mesa_texformat_rgba_float32

Floating point texture formats.

struct gl_texture_format _mesa_texformat_s8_z24

struct gl_texture_format _mesa_texformat_signed_rgba8888

struct gl_texture_format _mesa_texformat_signed_rgba8888_rev

struct gl_texture_format _mesa_texformat_ycbcr

struct gl_texture_format _mesa_texformat_ycbcr_rev

struct gl_texture_format _mesa_texformat_z16

struct gl_texture_format _mesa_texformat_z24_s8

struct gl_texture_format _mesa_texformat_z32


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