PDA

View Full Version : texture mapping for polygon



joeyx
05-18-2001, 10:41 PM
Hi All,

I have a qn on texture mapping. I drew my octagon using GL_POLYGON, how do i go abt mapping my bitmap on to the object?

so i have altogether 8 vertices drawn between my glBegin and glEnd.

so how do i do it? http://www.opengl.org/discussion_boards/ubb/frown.gif
please help.
Thanx alot!

MrShoe
05-19-2001, 02:44 AM
Well, firstly i would like to say that what you did was bad. You should have drawn it using triangles, so as not to cause some complications that can occur. To texture map what you have done isnt much different from texturing a quad, you sinply will have more hassle with glTexCoord that if you did a simple quad. Simply assing a texture coordinate to each vertex and apply the texture.