summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-14 17:48:17 -0600
committerBrian Paul <brianp@vmware.com>2009-09-14 17:48:17 -0600
commit799631acb18be93afab29e27241cde3780672e98 (patch)
treec2fd9fd09a23e0b0cc62f2819c964843fca53319
parentac3c8e3b53564b659e2ccaf8274b888f1e254511 (diff)
downloadexternal_mesa3d-799631acb18be93afab29e27241cde3780672e98.zip
external_mesa3d-799631acb18be93afab29e27241cde3780672e98.tar.gz
external_mesa3d-799631acb18be93afab29e27241cde3780672e98.tar.bz2
progs/vp: print program and error info when program does not compile
-rw-r--r--progs/vp/vp-tris.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/progs/vp/vp-tris.c b/progs/vp/vp-tris.c
index 97995ac..1356242 100644
--- 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));
}