[Mesa-dev] [PATCH] mesa: allow FBO attachments of formats LUMINANCE, LUMINANCE_ALPHA, and INTENSITY
Marek Olšák
maraeo at gmail.com
Sat Oct 2 14:20:54 PDT 2010
As per the GL_ARB_framebuffer_object specification.
Signed-off-by: Marek Olšák <maraeo at gmail.com>
---
src/mesa/main/fbobject.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index f28846c..016df1d 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -452,6 +452,12 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
baseFormat != GL_RGBA &&
(!ctx->Extensions.ARB_framebuffer_object ||
baseFormat != GL_ALPHA) &&
+ (!ctx->Extensions.ARB_framebuffer_object ||
+ baseFormat != GL_LUMINANCE) &&
+ (!ctx->Extensions.ARB_framebuffer_object ||
+ baseFormat != GL_LUMINANCE_ALPHA) &&
+ (!ctx->Extensions.ARB_framebuffer_object ||
+ baseFormat != GL_INTENSITY) &&
(!ctx->Extensions.ARB_texture_rg ||
baseFormat != GL_RED) &&
(!ctx->Extensions.ARB_texture_rg ||
@@ -636,6 +642,10 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
if (f != GL_RGB && f != GL_RGBA && f != GL_DEPTH_COMPONENT
&& f != GL_DEPTH_STENCIL_EXT
&& (!ctx->Extensions.ARB_framebuffer_object || f != GL_ALPHA)
+ && (!ctx->Extensions.ARB_framebuffer_object || f != GL_LUMINANCE)
+ && (!ctx->Extensions.ARB_framebuffer_object ||
+ f != GL_LUMINANCE_ALPHA)
+ && (!ctx->Extensions.ARB_framebuffer_object || f != GL_INTENSITY)
&& (!ctx->Extensions.ARB_texture_rg || f != GL_RED)
&& (!ctx->Extensions.ARB_texture_rg || f != GL_RG)) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
--
1.7.0.4
More information about the mesa-dev
mailing list