From: Brian Paul Date: Mon, 14 Sep 2009 23:48:17 +0000 (-0600) Subject: progs/vp: print program and error info when program does not compile X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=799631acb18be93afab29e27241cde3780672e98;p=mesa.git progs/vp: print program and error info when program does not compile --- diff --git a/progs/vp/vp-tris.c b/progs/vp/vp-tris.c index 97995accdd1..1356242d971 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)); }