Advertisement

bugs in lesson22 examples

Started by July 31, 2006 01:28 PM
-1 comments, last by Dimak_XXZZ 18 years, 3 months ago
Hi all. I read this lesson and tryed to run examples (Linux/SDL, GLUT and Linux). First of all i think there is error in function VMatMult. With bumps in example all looks fine, but if you try more contrast bump (for example black circles on white) You can see that light position for bump calculations moves in random way. With such matrix multiplication function all works fine.

void VMatMult(GLfloat *M, GLfloat *v) {
	GLfloat res[3];
	res[0]=M[ 0]*v[0]+M[ 4]*v[1]+M[ 8]*v[2]+M[ 12]*v[3];
	res[1]=M[ 1]*v[0]+M[ 5]*v[1]+M[ 9]*v[2]+M[ 13]*v[3];
	res[2]=M[ 2]*v[0]+M[ 6]*v[1]+M[10]*v[2]+M[ 14]*v[3];;
	v[0]=res[0];
	v[1]=res[1];
	v[2]=res[2];
	v[3]=M[15];											// 
}
In my system (Gentoo linux, Xorg 7.0, nvidia drivers) for using ARB function it's needed define GL_GLEXT_PROTOTYPES, in glut and linux exapmles it's not defined. In glut example texture filenames and filenames in code differs (in symbol register). In Linux/SDL example bumps with multitexturing doesn't work at all, i don't know why. (first method works).

This topic is closed to new replies.

Advertisement