Aaron McKellar
Aaron McKellar

Reputation: 667

OpenGL texture mapping on sides cube using GL_QUADS

I am trying to map a different texture on each side of a cube using a GL_QUADS. My first problem is that I cannot even get a texture to display on the side of a GL_QUADS. I can however get a texture to display using GL_TRIANGLES but I do no understand how to draw things very well using triangles and I want to use QUADS. I also can only use GLUT for this. I need an example that works because I do not know enough about OpenGL for someone to simply explain this to me. Someone please help. Thanks!

Upvotes: 0

Views: 1252

Answers (2)

Sean Spicer
Sean Spicer

Reputation: 3

If you post the code that you are having trouble with, perhaps I can help you. Most likely, you need to set the appropriate texture coordinates per-vertex.

Upvotes: 0

Aaron McKellar
Aaron McKellar

Reputation: 667

Oops didn't realize I forgot to use glTexCoord2f. It works now.

Upvotes: 1

Related Questions