summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-05-12 22:54:47 +0000
committerBrian Paul <[email protected]>2004-05-12 22:54:47 +0000
commitdb862e4d4c575fa9ea306fd4d271b58d1b77e83b (patch)
treeed44cb76804c1fe96dedc3ba867d51275b443794 /src/mesa
parentf35b47fa623991b296b7a9a4e280956a5106f976 (diff)
GL_BGR can't be used with the packed types, according to the GL spec. Enforce such.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/image.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index db14e38c57c..03f6aff3391 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -377,7 +377,6 @@ _mesa_is_legal_format_and_type( GLcontext *ctx, GLenum format, GLenum type )
return GL_FALSE;
}
case GL_RGB:
- case GL_BGR:
switch (type) {
case GL_BYTE:
case GL_UNSIGNED_BYTE:
@@ -396,6 +395,21 @@ _mesa_is_legal_format_and_type( GLcontext *ctx, GLenum format, GLenum type )
default:
return GL_FALSE;
}
+ case GL_BGR:
+ switch (type) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ return GL_TRUE;
+ case GL_HALF_FLOAT_ARB:
+ return ctx->Extensions.ARB_half_float_pixel;
+ default:
+ return GL_FALSE;
+ }
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT: