Jump to content
  • Advertisement
Sign in to follow this  

can't set line color

This topic is 3525 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello all, I am stuck again. Label says it all. I have the following code which I render my lines with: void CLine::Render() { glDisable(GL_LIGHTING); glLineWidth(m_fLineWidth+3); glColor4f(1.0f,0.0f,0.0f,1.0f); glBindBuffer(GL_ARRAY_BUFFER, m_pPointsBuff->m_iHWPosBuff); glVertexPointer(3,GL_FLOAT,0,0); glEnableClientState(GL_VERTEX_ARRAY); glDrawArrays(GL_LINES,0,m_lNumOfPoints); glDisableClientState(GL_VERTEX_ARRAY); glBindBuffer(GL_ARRAY_BUFFER, 0); glEnable(GL_LIGHTING); } Line draws fine but it is allways black, no matter what values a put in glColor4f. Why could that be?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!