Archived

This topic is now archived and is closed to further replies.

raton

OpenGl simple texturing prob

Recommended Posts

it s probably evident for everyone but i have a little prob with my first Gl prog. I try to make a simple house. For the moment i try to texture it with only one tex (just to try ). The first 2 quands are ok but after i have a lot a graphic bug ! Piece of texture who clip,... I have exactly the code of the lecon 8 on nehe. someone can say me why i have this bug ? ps: sorry for my english, just a french boy
Mess with the best Die like the rest

Share this post


Link to post
Share on other sites
You should specify what kind of a graphic bug you get. A screenshot works wonders.

But, I''ll try a guess.

Are you using GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_QUADS, or GL_QUAD_STRIP? If you use a strip, and try to make a cube, you will quite probably mess it up, because the strips are strips, and not individual quads (or triangles). If this is your case, use GL_QUADS, and specify 4 vertexes for each quad.

Other guess, are you using backface culling? If so, turn it off, and see if the house looks like it should. If that solved your problem, you have your vertexes in the wrond order. (Counterclockwise when you should have clockwise, or vice versa).

Grab a screenshot, and put it here, if these don''t work. Good luck with your house!

Share this post


Link to post
Share on other sites
thanks a lot but i have found the prob... it waas really... stupid. I hadn t create my vertex in the right order !!!
There s time like this... i would better go to sleep

Share this post


Link to post
Share on other sites