summaryrefslogtreecommitdiff
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-05-30 12:38:45 -0700
committerJosé Fonseca <jfonseca@vmware.com>2009-05-30 20:29:02 -0700
commit29c6c8eb18ace95b9af6dcf34e02c2b8db0ffda8 (patch)
tree26b81b1e057228fac66d3932822f7df26eee0a4e /src/mesa/main/context.c
parenta59575d8fbe8b0ca053cc8366ce7a42bc660158a (diff)
mesa: Add success/failures return value to _mesa_make_current.
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index ec0dc12a3e..884b6ad282 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1259,7 +1259,7 @@ initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb)
* \param drawBuffer the drawing framebuffer
* \param readBuffer the reading framebuffer
*/
-void
+GLboolean
_mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
GLframebuffer *readBuffer )
{
@@ -1272,14 +1272,14 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
if (!check_compatible(newCtx, drawBuffer)) {
_mesa_warning(newCtx,
"MakeCurrent: incompatible visuals for context and drawbuffer");
- return;
+ return GL_FALSE;
}
}
if (newCtx && readBuffer && newCtx->WinSysReadBuffer != readBuffer) {
if (!check_compatible(newCtx, readBuffer)) {
_mesa_warning(newCtx,
"MakeCurrent: incompatible visuals for context and readbuffer");
- return;
+ return GL_FALSE;
}
}
@@ -1384,6 +1384,8 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
newCtx->FirstTimeCurrent = GL_FALSE;
}
}
+
+ return GL_TRUE;
}