projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac3c8e3
)
progs/vp: print program and error info when program does not compile
author
Brian Paul
<brianp@vmware.com>
Mon, 14 Sep 2009 23:48:17 +0000
(17:48 -0600)
committer
Brian Paul
<brianp@vmware.com>
Mon, 14 Sep 2009 23:48:17 +0000
(17:48 -0600)
progs/vp/vp-tris.c
patch
|
blob
|
history
diff --git
a/progs/vp/vp-tris.c
b/progs/vp/vp-tris.c
index 97995accdd180012563df4919c34e9361c38d16a..1356242d971d9c57405d4c1a898fa9fa8e0048f6 100644
(file)
--- a/
progs/vp/vp-tris.c
+++ b/
progs/vp/vp-tris.c
@@
-119,6
+119,12
@@
static void Init( void )
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
sz, (const GLubyte *) buf);
+ if (glGetError()) {
+ printf("Program failed to compile:\n%s\n", buf);
+ printf("Error: %s\n",
+ (char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
+ exit(1);
+ }
assert(glIsProgramARB(prognum));
}