Advertisement

OpenGL normal newB question

Started by July 10, 2002 10:53 AM
11 comments, last by TYBZ 22 years, 7 months ago
Sure this code works... it''s not mine... :|
Anyway I think I know where my errors are, they are in the drawing of my quads... we must drawing them in counter clockwise, but IN RELATION to what ??? in a 3D world, anything is from a point of view, no?

I draw my quads that way:
bottom-left
bottom-right
top-right
top-left
point view: in front of the light face (the up face)

But that is not seems to works...
Is this the "good" connter clockwise ???
It''s only takes motivation!
quote:
Original post by TYBZ
I draw my quads that way:
bottom-left
bottom-right
top-right
top-left
point view: in front of the light face (the up face)



yep that's right. you are drawing them in the correct order. the reference point is from the up face.

lemme suggest something. don't bother with lighting until you have got some objects to sucessfully draw. just take out the line where you say: "glEnable(GL_LIGHTING);" and for safety's sake, comment out ALL lines that have anything to do with lighting.

get some things to draw

THEN worry about lighting.

otherwise you're debugging too many things to hope to succeed.

you don't need lighting enabled to be able to see things.

my guess is that either your draw code is wrong or you have all your normals pointing the wrong way.

anyway, turn off lighting and get your polys to draw. if you still have problems after you do that, post your draw method here and we can work through it.

-me

[edited by - Palidine on July 11, 2002 4:39:44 PM]
Advertisement
Yep, ok I get it, I mean my error, it''s cause the lights follow me when I move in the 3D world..... i''m trying to get to many new things to work at the same time, I''ll revise that. Thanx for all your reply.
It''s only takes motivation!

This topic is closed to new replies.

Advertisement