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 ?
Advertisement