summaryrefslogtreecommitdiff
path: root/src/mesa/main/framebuffer.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-25 08:00:51 -0700
committerEric Anholt <eric@anholt.net>2010-06-10 00:22:01 -0700
commit262cdbd957b68878adf1fb3edcf478604ed9f171 (patch)
tree1e31420a9d64ecd66309e4ff36db0aa016d42598 /src/mesa/main/framebuffer.c
parentceba688cb54016a9f6ff70761b2c459698bfd7f0 (diff)
mesa: Allow GL_ALPHA FBOs with ARB_framebuffer_object.
Drivers still reject them today, but cairo would like to use these.
Diffstat (limited to 'src/mesa/main/framebuffer.c')
-rw-r--r--src/mesa/main/framebuffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 31689c8fe8..01f84180af 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -544,7 +544,8 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb)
const GLenum baseFormat = _mesa_get_format_base_format(rb->Format);
const gl_format fmt = rb->Format;
- if (baseFormat == GL_RGBA || baseFormat == GL_RGB) {
+ if (baseFormat == GL_RGBA || baseFormat == GL_RGB ||
+ baseFormat == GL_ALPHA) {
fb->Visual.redBits = _mesa_get_format_bits(fmt, GL_RED_BITS);
fb->Visual.greenBits = _mesa_get_format_bits(fmt, GL_GREEN_BITS);
fb->Visual.blueBits = _mesa_get_format_bits(fmt, GL_BLUE_BITS);