From d334a0fb8cbb368c337858b16cb567a28a35f688 Mon Sep 17 00:00:00 2001 From: Alex Galakhov Date: Mon, 19 Dec 2011 07:40:07 -0700 Subject: [PATCH] osmesa: fix RGB565 rendering Signed-off-by: Brian Paul --- src/mesa/drivers/osmesa/osmesa.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index ecb7c63dab4..0e062f4fe60 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -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; -- 2.30.2