aboutsummaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-27 17:05:56 -0600
committerBrian Paul <[email protected]>2010-04-27 17:05:56 -0600
commit29fc97606b13edb20fd1fc5351a066ba85968c77 (patch)
tree1cdc0c13a73bb94398e96746eb252fef6f2b1eb8 /progs
parentc5bf13c537e55ef04deec8226924cf9ab17d9538 (diff)
osdemos: replace assertion with error handler
Diffstat (limited to 'progs')
-rw-r--r--progs/osdemos/ostest1.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/progs/osdemos/ostest1.c b/progs/osdemos/ostest1.c
index 000b8c4a781..5a00fdb246e 100644
--- a/progs/osdemos/ostest1.c
+++ b/progs/osdemos/ostest1.c
@@ -399,7 +399,11 @@ test(GLenum type, GLint bits, const char *filename)
/* sanity checks */
glGetIntegerv(GL_RED_BITS, &cBits);
- assert(cBits == bits);
+ if (cBits != bits) {
+ fprintf(stderr, "Unable to create %d-bit/channel renderbuffer.\n", bits);
+ fprintf(stderr, "May need to recompile Mesa with CHAN_BITS=16 or 32.\n");
+ return 0;
+ }
glGetIntegerv(GL_GREEN_BITS, &cBits);
assert(cBits == bits);
glGetIntegerv(GL_BLUE_BITS, &cBits);