🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Why lines are NOT affected by light?

Started by
4 comments, last by WWWFdisk 18 years, 3 months ago
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!
Advertisement
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.
glNormal
make sure you call glNormal before glVertex, else you will get stange results.
Thanks to you all!
I added glNormal3f(0,0,1) before glVertex and now they look quite bright.
:)

This topic is closed to new replies.

Advertisement