mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
progs/vp: print program and error info when program does not compile
This commit is contained in:
parent
ac3c8e3b53
commit
799631acb1
1 changed files with 6 additions and 0 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue