diff options
author | Brian Paul <[email protected]> | 2011-01-24 19:38:52 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-01-24 19:38:52 -0700 |
commit | d30156525f869d11445575767298900fb6121c6a (patch) | |
tree | 0c4cd6a5721ee443c0a43962996dfc1901291b5f /src/mesa/main/fbobject.c | |
parent | 62c66b34303303e6786652efa611a100ae64439a (diff) |
mesa: add red, red/green formats in _mesa_base_fbo_format()
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 17b768dc847..2fe84754b13 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -390,6 +390,8 @@ _mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) case GL_LUMINANCE_ALPHA: case GL_LUMINANCE: case GL_INTENSITY: + case GL_RED: + case GL_RG: fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; return; default: @@ -1075,7 +1077,15 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) return GL_DEPTH_STENCIL_EXT; else return 0; - /* XXX add floating point formats eventually */ + case GL_RED: + case GL_R8: + case GL_R16: + return ctx->Extensions.ARB_texture_rg ? GL_RED : 0; + case GL_RG: + case GL_RG8: + case GL_RG16: + return ctx->Extensions.ARB_texture_rg ? GL_RG : 0; + /* XXX add floating point and integer formats eventually */ default: return 0; } |