OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5bf13c
)
osdemos: replace assertion with error handler
author
Brian Paul
<brianp@vmware.com>
Tue, 27 Apr 2010 23:05:56 +0000
(17:05 -0600)
committer
Brian Paul
<brianp@vmware.com>
Tue, 27 Apr 2010 23:05:56 +0000
(17:05 -0600)
progs/osdemos/ostest1.c
patch
|
blob
|
history
diff --git
a/progs/osdemos/ostest1.c
b/progs/osdemos/ostest1.c
index
000b8c4
..
5a00fdb
100644
(file)
--- 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);