qvolray

diff src/sdr.c @ 13:17d9dc2edc91

first qt version
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 10 Apr 2012 06:11:16 +0300
parents b050ce167ff1
children
line diff
     1.1 --- a/src/sdr.c	Mon Apr 09 23:43:13 2012 +0300
     1.2 +++ b/src/sdr.c	Tue Apr 10 06:11:16 2012 +0300
     1.3 @@ -249,13 +249,13 @@
     1.4  #define BEGIN_UNIFORM_CODE \
     1.5  	int loc, curr_prog; \
     1.6  	glGetIntegerv(GL_CURRENT_PROGRAM, &curr_prog); \
     1.7 -	if(curr_prog != prog && bind_program(prog) == -1) { \
     1.8 +	if((unsigned int)curr_prog != prog && bind_program(prog) == -1) { \
     1.9  		return -1; \
    1.10  	} \
    1.11  	if((loc = glGetUniformLocation(prog, name)) != -1)
    1.12  
    1.13  #define END_UNIFORM_CODE \
    1.14 -	if(curr_prog != prog) { \
    1.15 +	if((unsigned int)curr_prog != prog) { \
    1.16  		bind_program(curr_prog); \
    1.17  	} \
    1.18  	return loc == -1 ? -1 : 0
    1.19 @@ -313,13 +313,13 @@
    1.20  	int loc, curr_prog;
    1.21  
    1.22  	glGetIntegerv(GL_CURRENT_PROGRAM, &curr_prog);
    1.23 -	if(curr_prog != prog && bind_program(prog) == -1) {
    1.24 +	if((unsigned int)curr_prog != prog && bind_program(prog) == -1) {
    1.25  		return -1;
    1.26  	}
    1.27  
    1.28  	loc = glGetAttribLocation(prog, (char*)name);
    1.29  
    1.30 -	if(curr_prog != prog) {
    1.31 +	if((unsigned int)curr_prog != prog) {
    1.32  		bind_program(curr_prog);
    1.33  	}
    1.34  	return loc;