From dbda49a9e65f684ca46c7af84cc52d63b0622978 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Tue, 20 Jan 2009 11:12:17 +0100 Subject: Add RGBA4444 and RGBA5551 texture formats. --- src/mesa/main/texformat.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'src/mesa/main/texformat.c') diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index 1dd7bdd9ce..08725846c6 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -871,6 +871,30 @@ const struct gl_texture_format _mesa_texformat_rgb565_rev = { store_texel_rgb565_rev /* StoreTexel */ }; +const struct gl_texture_format _mesa_texformat_rgba4444 = { + MESA_FORMAT_RGBA4444, /* MesaFormat */ + GL_RGBA, /* BaseFormat */ + GL_UNSIGNED_NORMALIZED_ARB, /* DataType */ + 4, /* RedBits */ + 4, /* GreenBits */ + 4, /* BlueBits */ + 4, /* AlphaBits */ + 0, /* LuminanceBits */ + 0, /* IntensityBits */ + 0, /* IndexBits */ + 0, /* DepthBits */ + 0, /* StencilBits */ + 2, /* TexelBytes */ + _mesa_texstore_rgba4444, /* StoreTexImageFunc */ + fetch_texel_1d_rgba4444, /* FetchTexel1D */ + fetch_texel_2d_rgba4444, /* FetchTexel2D */ + fetch_texel_3d_rgba4444, /* FetchTexel3D */ + NULL, /* FetchTexel1Df */ + NULL, /* FetchTexel2Df */ + NULL, /* FetchTexel3Df */ + store_texel_rgba4444 /* StoreTexel */ +}; + const struct gl_texture_format _mesa_texformat_argb4444 = { MESA_FORMAT_ARGB4444, /* MesaFormat */ GL_RGBA, /* BaseFormat */ @@ -919,6 +943,30 @@ const struct gl_texture_format _mesa_texformat_argb4444_rev = { store_texel_argb4444_rev /* StoreTexel */ }; +const struct gl_texture_format _mesa_texformat_rgba5551 = { + MESA_FORMAT_RGBA5551, /* MesaFormat */ + GL_RGBA, /* BaseFormat */ + GL_UNSIGNED_NORMALIZED_ARB, /* DataType */ + 5, /* RedBits */ + 5, /* GreenBits */ + 5, /* BlueBits */ + 1, /* AlphaBits */ + 0, /* LuminanceBits */ + 0, /* IntensityBits */ + 0, /* IndexBits */ + 0, /* DepthBits */ + 0, /* StencilBits */ + 2, /* TexelBytes */ + _mesa_texstore_rgba5551, /* StoreTexImageFunc */ + fetch_texel_1d_rgba5551, /* FetchTexel1D */ + fetch_texel_2d_rgba5551, /* FetchTexel2D */ + fetch_texel_3d_rgba5551, /* FetchTexel3D */ + NULL, /* FetchTexel1Df */ + NULL, /* FetchTexel2Df */ + NULL, /* FetchTexel3Df */ + store_texel_rgba5551 /* StoreTexel */ +}; + const struct gl_texture_format _mesa_texformat_argb1555 = { MESA_FORMAT_ARGB1555, /* MesaFormat */ GL_RGBA, /* BaseFormat */ -- cgit v1.2.3