View Full Version : have a problem about texture mapping??

07-14-2002, 06:51 AM
I'd like to paste the texture over the wireframe model, but I've tried many ways, there's only color changed on mesh, no texture within the grid. Anyone know where the problem is? i am sure that i have done every thing that must to do.(ex:loadBmp,loadTexture,glGenTextures,glBindTex ture,glTexCoord2f)....but it still don't work???
Thank you in advance.

07-14-2002, 07:47 AM
Thank you for what?

07-14-2002, 08:33 AM
You need to first draw a filled mesh with polygons to get the texture to fill the wireframe. Then draw the wireframe with whatever wire color you want. That way, you get a textured model with wireframe face outlines (which I guess is what you're after).

Watch out for Z aliasing between the wire frame and the solid polygon/triangle mesh; it may cause the wireframe to not appear everywhere. If that hits you, try some PolygonOffset().

07-14-2002, 06:40 PM
Originally posted by knackered:
Thank you for what?

Dude, what is wrong with you?

07-14-2002, 07:11 PM
knackered, come on man think about it. What do you think he means? I think it should be obvious that he is thanking anyone for their help. Geeze man.

But anyway what jwatte said was correct. You need to use filled polygons to texture map the whole model and not just the wires.


07-14-2002, 09:25 PM
i am so grateful to jwatte,mancha and SirKnight for this problem, i have solved it! you are all the kind man! thank you very very much! http://www.opengl.org/discussion_boards/ubb/smile.gif