Jump to content
  • Advertisement
Sign in to follow this  

can't set line color

This topic is 3609 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!