Lets say i have a pyramid... I know how to draw it, and i know how to set a texture for the whole pyramid, but how can i set a different texture for each wall?
I set the texture by adding this GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture.getTextureID());
before GL11.glBegin(GL11.GL_TRIANGLES);
I tried to bind the textures by adding GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture.getTextureID());
after every 3 lines that sets Vertex coordinates of the pyramid, but GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture.getTextureID());
wont work if it is between GL11.glBegin(GL11.GL_TRIANGLES);
and GL11.glEnd();
EDIT
I drawn every wall separately and it worked, but i dont like that way... That looks tricky to me... Is that a good way to do what i want?