summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-04-22 21:11:56 -0400
committerKristian Høgsberg <[email protected]>2010-04-27 19:28:10 -0400
commit61d94dd207459e0c42d98c9d6eb7df5eabdfd8a4 (patch)
treeb21d77a10847f7aa383075af2ea1e419522c1c9a /src/mesa/main/fbobject.c
parent44f9aef9ee9ceda0659e882afbac4d877267c4fd (diff)
mesa: Move GL_RGB565 workaround into fbobject.c
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 8d442466187..201a0232464 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1110,7 +1110,22 @@ _mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples,
renderbuffer_storage(target, internalFormat, width, height, samples);
}
+void GLAPIENTRY
+_es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
+ GLsizei width, GLsizei height)
+{
+ switch (internalFormat) {
+ case GL_RGB565:
+ /* XXX this confuses GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
+ /* choose a closest format */
+ internalFormat = GL_RGB5;
+ break;
+ default:
+ break;
+ }
+ renderbuffer_storage(target, internalFormat, width, height, 0);
+}
void GLAPIENTRY
_mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params)