Archived

This topic is now archived and is closed to further replies.

jonbell

Line Colour

Recommended Posts

How come even when I set the line colour I don''t always get the colour i set for example : glLineWidth(5.0f); glColor3ub(255, 255, 255); glBegin(GL_LINES); for (i=0; i < 10;i++) { // specify the line glVertex3f(x,y,z); glVertex3f(x,y,z); } glEnd(); This does not give me a white line as i would expect. When i call this code however i have already done lots of other rendering so obviously something in the state machine is screwing my line colour but what? Cheers

Share this post


Link to post
Share on other sites
no thats not the problem i just put it up the code like that for simplicity. The lines render correctly just the wrong colour.

How come when i specify a colour i don''t get it?

Share this post


Link to post
Share on other sites
Perhaps you have texturing enabled? The colour from one of the texels of the texture will be used if texturing is enabled. Also check you have disabled any lighting you may have switched on.

[edited by - jamessharpe on January 7, 2004 8:50:13 AM]

Share this post


Link to post
Share on other sites