summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-01 15:01:33 -0600
committerBrian Paul <brianp@vmware.com>2009-06-01 15:01:33 -0600
commit9f6ec50f8c79283583eeebdebd16bf7dcd134816 (patch)
treefe3e906dda57e8ad35137af941b0a86aa79c7031 /src/mesa/main
parent1fa023ae48c31176434f5ad4691eae347e7a395f (diff)
parent0e8a5a84742adf6e99236f246c77325fad174204 (diff)
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c8
-rw-r--r--src/mesa/main/context.h2
-rw-r--r--src/mesa/main/imports.c10
3 files changed, 16 insertions, 4 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index ff9dd488c7..ad47e22580 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;
}
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 5b57d88029..6b3e1b2b97 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -130,7 +130,7 @@ extern void
_mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
-extern void
+extern GLboolean
_mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer,
GLframebuffer *readBuffer );
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 615f7c9a6d..3fb67083a2 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -1008,6 +1008,16 @@ output_if_debug(const char *prefixString, const char *outputString,
fprintf(stderr, "%s: %s", prefixString, outputString);
if (newline)
fprintf(stderr, "\n");
+
+#if defined(_WIN32) && !defined(_WIN32_WCE)
+ /* stderr from windows applications without console is not usually
+ * visible, so communicate with the debugger instead */
+ {
+ char buf[4096];
+ _mesa_snprintf(buf, sizeof(buf), "%s: %s%s", prefixString, outputString, newline ? "\n" : "");
+ OutputDebugStringA(buf);
+ }
+#endif
}
}