Hi
My question is, how to use multiple textures in one display list. My english is not the best, perhaps because of this i couldnt find any solution here. Sorry if i repaeted a thread
To my Problem:
If i call Display List there is only first texture shown on all faces
Here’s the code that creates a List. :-\
public class GLList {
public int name;
public int glid;
public GLList(int name){
this.name = name;
}
public boolean drawGroundRect(GL2 gl, GLTexture textureTop, GLTexture textureSide, float width){
glid = gl.glGenLists(1);
gl.glNewList(glid, GL2.GL_COMPILE);
//Top Face
textureTop.bind(gl);
gl.glEnable(GL2.GL_TEXTURE_2D);
gl.glBegin(GL2.GL_QUADS);
gl.glNormal3f(0f, 1f, 0f);
gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3f(0, width, 0);
gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f(0, width, width);
gl.glTexCoord2f(1.0f, 0.0f); gl.glVertex3f(width, width, width);
gl.glTexCoord2f(1.0f, 1.0f); gl.glVertex3f(width, width, 0);
gl.glDisable(GL2.GL_TEXTURE_2D);
//Bot face
textureSide.bind(gl);
gl.glEnable(GL2.GL_TEXTURE_2D);
gl.glNormal3f(0f, -1f, 0f);
gl.glTexCoord2f(0.0f, 1.0f); gl.glVertex3f(0, 0.0f, 0); ..........