summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2010-05-24 16:56:12 -0400
committerKristian Høgsberg <[email protected]>2010-05-24 16:56:56 -0400
commite88cef3c9d5de2a5dccd9ad770952a9d2347ba0d (patch)
tree8723391529f74d662cfe99cde82197204f1ccc33 /src/mesa/main/fbobject.c
parentc10154a2988c30ce8e20c16e66be434a0e5c37a4 (diff)
mesa: Reenable check for GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT
The check was disabled when FEATURE_OES_framebuffer_object was enabled, since that used to mean we weren't implementing regular OpenGL semantics. Now that we can compile in support for multiple APIs, change the #ifdef to compile the check in when FEATURE_GL is enabled and enable the check for contexts that implement OpenGL at runtime.
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 2376e7f1a54..bf445d2b299 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -629,30 +629,32 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
}
}
-#if !FEATURE_OES_framebuffer_object
- /* Check that all DrawBuffers are present */
- for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
- if (fb->ColorDrawBuffer[j] != GL_NONE) {
- const struct gl_renderbuffer_attachment *att
- = _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[j]);
- assert(att);
- if (att->Type == GL_NONE) {
- fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT;
- fbo_incomplete("missing drawbuffer", j);
- return;
- }
+#if FEATURE_GL
+ if (ctx->API == API_OPENGL) {
+ /* Check that all DrawBuffers are present */
+ for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
+ if (fb->ColorDrawBuffer[j] != GL_NONE) {
+ const struct gl_renderbuffer_attachment *att
+ = _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[j]);
+ assert(att);
+ if (att->Type == GL_NONE) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT;
+ fbo_incomplete("missing drawbuffer", j);
+ return;
+ }
+ }
}
- }
- /* Check that the ReadBuffer is present */
- if (fb->ColorReadBuffer != GL_NONE) {
- const struct gl_renderbuffer_attachment *att
- = _mesa_get_attachment(ctx, fb, fb->ColorReadBuffer);
- assert(att);
- if (att->Type == GL_NONE) {
- fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT;
+ /* Check that the ReadBuffer is present */
+ if (fb->ColorReadBuffer != GL_NONE) {
+ const struct gl_renderbuffer_attachment *att
+ = _mesa_get_attachment(ctx, fb, fb->ColorReadBuffer);
+ assert(att);
+ if (att->Type == GL_NONE) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT;
fbo_incomplete("missing readbuffer", -1);
- return;
+ return;
+ }
}
}
#else