summaryrefslogtreecommitdiff
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-04-20 16:46:04 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-04-20 16:46:04 +0000
commit1c85aa33321821b44bea83d3dee702ab4e05f406 (patch)
tree567f84afc974e718489a64860e7625eb18dcf0f2 /src/mesa/main/texformat.c
parent3518a7950f3d1d57edb0a5d346c28bccade6fb61 (diff)
Fixed a texture conversion problem: sometimes need to produce an intermediate
texture image in the base internal format between user->Mesa format conversion. See comments in texstore.c
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 1700eee4b5..d9ec9376ae 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -1,4 +1,4 @@
-/* $Id: texformat.c,v 1.9 2001/04/04 23:56:33 brianp Exp $ */
+/* $Id: texformat.c,v 1.10 2001/04/20 16:46:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -74,7 +74,7 @@ static void fetch_null_texel( const struct gl_texture_image *texImage,
const struct gl_texture_format _mesa_texformat_rgba = {
MESA_FORMAT_RGBA, /* MesaFormat */
- GL_RGBA, /* IntFormat */
+ GL_RGBA, /* BaseFormat */
CHAN_TYPE, /* Type */
CHAN_BITS, /* RedBits */
CHAN_BITS, /* GreenBits */
@@ -92,7 +92,7 @@ const struct gl_texture_format _mesa_texformat_rgba = {
const struct gl_texture_format _mesa_texformat_rgb = {
MESA_FORMAT_RGB, /* MesaFormat */
- GL_RGB, /* IntFormat */
+ GL_RGB, /* BaseFormat */
CHAN_TYPE, /* Type */
CHAN_BITS, /* RedBits */
CHAN_BITS, /* GreenBits */
@@ -110,7 +110,7 @@ const struct gl_texture_format _mesa_texformat_rgb = {
const struct gl_texture_format _mesa_texformat_alpha = {
MESA_FORMAT_ALPHA, /* MesaFormat */
- GL_ALPHA, /* IntFormat */
+ GL_ALPHA, /* BaseFormat */
CHAN_TYPE, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -128,7 +128,7 @@ const struct gl_texture_format _mesa_texformat_alpha = {
const struct gl_texture_format _mesa_texformat_luminance = {
MESA_FORMAT_LUMINANCE, /* MesaFormat */
- GL_LUMINANCE, /* IntFormat */
+ GL_LUMINANCE, /* BaseFormat */
CHAN_TYPE, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -146,7 +146,7 @@ const struct gl_texture_format _mesa_texformat_luminance = {
const struct gl_texture_format _mesa_texformat_luminance_alpha = {
MESA_FORMAT_LUMINANCE_ALPHA, /* MesaFormat */
- GL_LUMINANCE_ALPHA, /* IntFormat */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
CHAN_TYPE, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -164,7 +164,7 @@ const struct gl_texture_format _mesa_texformat_luminance_alpha = {
const struct gl_texture_format _mesa_texformat_intensity = {
MESA_FORMAT_INTENSITY, /* MesaFormat */
- GL_INTENSITY, /* IntFormat */
+ GL_INTENSITY, /* BaseFormat */
CHAN_TYPE, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -182,7 +182,7 @@ const struct gl_texture_format _mesa_texformat_intensity = {
const struct gl_texture_format _mesa_texformat_color_index = {
MESA_FORMAT_COLOR_INDEX, /* MesaFormat */
- GL_COLOR_INDEX, /* IntFormat */
+ GL_COLOR_INDEX, /* BaseFormat */
CHAN_TYPE, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -200,7 +200,7 @@ const struct gl_texture_format _mesa_texformat_color_index = {
const struct gl_texture_format _mesa_texformat_depth_component = {
MESA_FORMAT_DEPTH_COMPONENT, /* MesaFormat */
- GL_DEPTH_COMPONENT, /* IntFormat */
+ GL_DEPTH_COMPONENT, /* BaseFormat */
GL_FLOAT, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -223,7 +223,7 @@ const struct gl_texture_format _mesa_texformat_depth_component = {
const struct gl_texture_format _mesa_texformat_rgba8888 = {
MESA_FORMAT_RGBA8888, /* MesaFormat */
- GL_RGBA, /* IntFormat */
+ GL_RGBA, /* BaseFormat */
GL_UNSIGNED_INT_8_8_8_8, /* Type */
8, /* RedBits */
8, /* GreenBits */
@@ -241,7 +241,7 @@ const struct gl_texture_format _mesa_texformat_rgba8888 = {
const struct gl_texture_format _mesa_texformat_argb8888 = {
MESA_FORMAT_ARGB8888, /* MesaFormat */
- GL_RGBA, /* IntFormat */
+ GL_RGBA, /* BaseFormat */
GL_UNSIGNED_INT_8_8_8_8_REV, /* Type */
8, /* RedBits */
8, /* GreenBits */
@@ -259,7 +259,7 @@ const struct gl_texture_format _mesa_texformat_argb8888 = {
const struct gl_texture_format _mesa_texformat_rgb888 = {
MESA_FORMAT_RGB888, /* MesaFormat */
- GL_BGR, /* IntFormat */
+ GL_RGB, /* BaseFormat */
GL_UNSIGNED_BYTE, /* Type */
8, /* RedBits */
8, /* GreenBits */
@@ -277,7 +277,7 @@ const struct gl_texture_format _mesa_texformat_rgb888 = {
const struct gl_texture_format _mesa_texformat_rgb565 = {
MESA_FORMAT_RGB565, /* MesaFormat */
- GL_RGB, /* IntFormat */
+ GL_RGB, /* BaseFormat */
GL_UNSIGNED_SHORT_5_6_5, /* Type */
5, /* RedBits */
6, /* GreenBits */
@@ -295,7 +295,7 @@ const struct gl_texture_format _mesa_texformat_rgb565 = {
const struct gl_texture_format _mesa_texformat_argb4444 = {
MESA_FORMAT_ARGB4444, /* MesaFormat */
- GL_RGBA, /* IntFormat */
+ GL_RGBA, /* BaseFormat */
GL_UNSIGNED_SHORT_4_4_4_4_REV, /* Type */
4, /* RedBits */
4, /* GreenBits */
@@ -313,7 +313,7 @@ const struct gl_texture_format _mesa_texformat_argb4444 = {
const struct gl_texture_format _mesa_texformat_argb1555 = {
MESA_FORMAT_ARGB1555, /* MesaFormat */
- GL_RGBA, /* IntFormat */
+ GL_RGBA, /* BaseFormat */
GL_UNSIGNED_SHORT_1_5_5_5_REV, /* Type */
5, /* RedBits */
5, /* GreenBits */
@@ -331,7 +331,7 @@ const struct gl_texture_format _mesa_texformat_argb1555 = {
const struct gl_texture_format _mesa_texformat_al88 = {
MESA_FORMAT_AL88, /* MesaFormat */
- GL_LUMINANCE_ALPHA, /* IntFormat */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
GL_UNSIGNED_BYTE, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -349,7 +349,7 @@ const struct gl_texture_format _mesa_texformat_al88 = {
const struct gl_texture_format _mesa_texformat_rgb332 = {
MESA_FORMAT_RGB332, /* MesaFormat */
- GL_RGB, /* IntFormat */
+ GL_RGB, /* BaseFormat */
GL_UNSIGNED_BYTE_3_3_2, /* Type */
3, /* RedBits */
3, /* GreenBits */
@@ -367,7 +367,7 @@ const struct gl_texture_format _mesa_texformat_rgb332 = {
const struct gl_texture_format _mesa_texformat_a8 = {
MESA_FORMAT_A8, /* MesaFormat */
- GL_ALPHA, /* IntFormat */
+ GL_ALPHA, /* BaseFormat */
GL_UNSIGNED_BYTE, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -385,7 +385,7 @@ const struct gl_texture_format _mesa_texformat_a8 = {
const struct gl_texture_format _mesa_texformat_l8 = {
MESA_FORMAT_L8, /* MesaFormat */
- GL_LUMINANCE, /* IntFormat */
+ GL_LUMINANCE, /* BaseFormat */
GL_UNSIGNED_BYTE, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -403,7 +403,7 @@ const struct gl_texture_format _mesa_texformat_l8 = {
const struct gl_texture_format _mesa_texformat_i8 = {
MESA_FORMAT_I8, /* MesaFormat */
- GL_INTENSITY, /* IntFormat */
+ GL_INTENSITY, /* BaseFormat */
GL_UNSIGNED_BYTE, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -421,7 +421,7 @@ const struct gl_texture_format _mesa_texformat_i8 = {
const struct gl_texture_format _mesa_texformat_ci8 = {
MESA_FORMAT_CI8, /* MesaFormat */
- GL_COLOR_INDEX, /* IntFormat */
+ GL_COLOR_INDEX, /* BaseFormat */
GL_UNSIGNED_BYTE, /* Type */
0, /* RedBits */
0, /* GreenBits */
@@ -444,7 +444,7 @@ const struct gl_texture_format _mesa_texformat_ci8 = {
const struct gl_texture_format _mesa_null_texformat = {
-1, /* MesaFormat */
- 0, /* IntFormat */
+ 0, /* BaseFormat */
0, /* Type */
0, /* RedBits */
0, /* GreenBits */