11 |
tvec[1] = tex_mat[5]; |
tvec[1] = tex_mat[5]; |
12 |
tvec[2] = tex_mat[6]; |
tvec[2] = tex_mat[6]; |
13 |
tvec[3] = tex_mat[7]; |
tvec[3] = tex_mat[7]; |
14 |
|
|
15 |
|
rvec[0] = tex_mat[8]; |
16 |
|
rvec[1] = tex_mat[9]; |
17 |
|
rvec[2] = tex_mat[10]; |
18 |
|
rvec[3] = tex_mat[11]; |
19 |
} |
} |
20 |
|
|
21 |
void TexGen::setUp(LightParam *param) { |
void TexGen::setUp(LightParam *param) { |
33 |
glTexGenfv(GL_S, GL_EYE_PLANE, svec); |
glTexGenfv(GL_S, GL_EYE_PLANE, svec); |
34 |
glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); |
glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); |
35 |
glTexGenfv(GL_T, GL_EYE_PLANE, tvec); |
glTexGenfv(GL_T, GL_EYE_PLANE, tvec); |
36 |
|
glTexGenf(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); |
37 |
|
glTexGenfv(GL_R, GL_EYE_PLANE, rvec); |
38 |
glEnable(GL_TEXTURE_GEN_S); |
glEnable(GL_TEXTURE_GEN_S); |
39 |
glEnable(GL_TEXTURE_GEN_T); |
glEnable(GL_TEXTURE_GEN_T); |
40 |
|
glEnable(GL_TEXTURE_GEN_R); |
41 |
glPopMatrix(); |
glPopMatrix(); |
42 |
} |
} |
43 |
|
|