osmesa: fix RGB565 rendering
authorAlex Galakhov <agalakhov@gmail.com>
Mon, 19 Dec 2011 14:40:07 +0000 (07:40 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 19 Dec 2011 14:41:06 +0000 (07:41 -0700)
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/osmesa/osmesa.c

index ecb7c63dab476678ad643da1b9b9821069eae25a..0e062f4fe60a918ddd50f5411a326f418ee87ad7 100644 (file)
@@ -989,6 +989,10 @@ new_osmesa_renderbuffer(struct gl_context *ctx, GLenum format, GLenum type)
       case GL_UNSIGNED_SHORT:
          rb->Format = MESA_FORMAT_RGBA_16;
          break;
+      case GL_UNSIGNED_SHORT_5_6_5:
+         rb->Format = MESA_FORMAT_RGB565;
+         type = GL_UNSIGNED_BYTE;
+         break;
       case GL_FLOAT:
          rb->Format = MESA_FORMAT_RGBA_FLOAT32;
          break;