Why lines are NOT affected by light?
I used glBegin(GL_LINES) to add some lines into the scene. But the lines look like 2D objects, they're dark and don't change brightness when rotating. Howerver, the other objects in the scene display correctly. How to ensure the lines be shadered correctly? Thanks to every one read this message!
I don't know what can be done in openGL, but if your line vertices contain normal direction information they should be lightable and shadeable.
Hack my projects! Oh Yeah! Use an SVN client to check them out.BlockStacker
In fact I used glVertex3f to add these lines.
How to manage the Normal of the vertices added by glVertex3f?
Thank you.
How to manage the Normal of the vertices added by glVertex3f?
Thank you.
make sure you call glNormal before glVertex, else you will get stange results.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement