Jump to content
  • Advertisement
Sign in to follow this  
JohnnyCode

can't set line color

This topic is 3434 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!