Browse Source

GL_BGR can't be used with the packed types, according to the GL spec. Enforce such.

tags/R300_DRIVER_0
Brian Paul 21 years ago
parent
commit
db862e4d4c
1 changed files with 15 additions and 1 deletions
  1. 15
    1
      src/mesa/main/image.c

+ 15
- 1
src/mesa/main/image.c View File

@@ -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:

Loading…
Cancel
Save