1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
public void tackleAutomaticTexture(GL gl)
{
float ObjPlaneS[] = { 1.0f, 0.0f, 1.0f, 0.0f };
float ObjPlaneT[] = { 0.0f, 1.0f, 0.0f, 0.0f };
float ObjPlaneR[] = { 0.0f, 0.0f, 1.0f, 0.0f };
float ObjPlaneQ[] = { 0.0f, 0.0f, 0.0f, 1.0f };
gl.glEnable(GL.GL_TEXTURE_GEN_S); // Auto Texture Generation
gl.glEnable(GL.GL_TEXTURE_GEN_T);
gl.glTexGeni( GL.GL_S, GL.GL_TEXTURE_GEN_MODE, GL.GL_OBJECT_LINEAR );
gl.glTexGeni( GL.GL_T, GL.GL_TEXTURE_GEN_MODE, GL.GL_OBJECT_LINEAR );
gl.glTexGenfv(GL.GL_S, GL.GL_OBJECT_PLANE, ObjPlaneS,0);
gl.glTexGenfv(GL.GL_T, GL.GL_OBJECT_PLANE, ObjPlaneT,0);
} |
Partager