Strange GL draw method behavior
-
Hi,
Don't know if it has been discussed before but I have found no response to this question:
Why view.draw GL_QUADS always draws the quads with a black color ?This doesn't work:
view.drawing_color="red" view.draw_line p1,p4 view.draw GL_QUADS , [p1,p2,p3,p4] view.draw GL_QUADS, [p5,p6,p7,p8]line is red but quads are black

Anyone encountered this before ? -
This is just a guess, but polygons need normals to do lighting, so the default normals are probably causing the bad lighting.
Let's say the normals default to 0,0,0- then that would give you a 0,0,0 for color. -
Changing the point's ordering doesn't solve the problem, so it seems not to be a question of normal.
Same goes with GL_TRIANGLES. -
The real question is how do you specify the normals? You're just giving GL_QUADS the vertices.
-
Hi,
Nothing specified in the docs concerning normals. Doc is so sparse you know...
I guessed that passing points in a counterclockwise order was orienting the normal up (assuming that these points are on an horizontal plane) ?
You can notice that once drawn, quads are visible from both sides. Is the normal useless or am I completely wrong ?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement