summaryrefslogtreecommitdiff
path: root/src/mesa/es/main/es_fbo.c
blob: 545c46ca99cb1d0f018ebf499fa6adf619de13b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**************************************************************************
 *
 * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
 * All Rights Reserved.
 *
 **************************************************************************/


#include "GLES2/gl2.h"
#include "GLES2/gl2ext.h"


extern void GL_APIENTRY _es_RenderbufferStorage(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height);

extern void GL_APIENTRY _mesa_RenderbufferStorageEXT(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height);


void GL_APIENTRY
_es_RenderbufferStorage(GLenum target, GLenum internalFormat,
                        GLsizei width, GLsizei height)
{
   switch (internalFormat) {
   case GL_RGBA4:
   case GL_RGB5_A1:
   case GL_RGB565:
      internalFormat = GL_RGBA;
      break;
   case GL_STENCIL_INDEX1_OES:
   case GL_STENCIL_INDEX4_OES:
   case GL_STENCIL_INDEX8:
      internalFormat = GL_STENCIL_INDEX;
      break;
   default:
      ; /* no op */
   }
   _mesa_RenderbufferStorageEXT(target, internalFormat, width, height);
}