3dphotoshoot
diff src/sdr.c @ 17:aef7f51f6397
resource loading works
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 10 Jun 2015 06:56:27 +0300 |
parents | c71c477521ca |
children | 4ca4e3c5a754 |
line diff
1.1 --- a/src/sdr.c Tue Jun 09 18:38:33 2015 +0300 1.2 +++ b/src/sdr.c Wed Jun 10 06:56:27 2015 +0300 1.3 @@ -233,10 +233,13 @@ 1.4 1.5 void attach_shader(unsigned int prog, unsigned int sdr) 1.6 { 1.7 + int err; 1.8 + 1.9 if(prog && sdr) { 1.10 + assert(glGetError() == GL_NO_ERROR); 1.11 glAttachShader(prog, sdr); 1.12 - if(glGetError() != GL_NO_ERROR) { 1.13 - fprintf(stderr, "failed to attach shader %u to program %u\n", sdr, prog); 1.14 + if((err = glGetError()) != GL_NO_ERROR) { 1.15 + fprintf(stderr, "failed to attach shader %u to program %u (err: 0x%x)\n", sdr, prog, err); 1.16 abort(); 1.17 } 1.18 }