Line Color
I''ve been trying to use glColor3f to set the line color, but it doesn''t work. It all comes out as the color of the last texture I bound to.
You are rembering to disable Texturing if you want just colours on you lines arent you?
Forgeting the little things allways leeds to big problems, and I allways forget them.
Forgeting the little things allways leeds to big problems, and I allways forget them.
The tutorials don''t disable texturing.
I tried glDisable(GL_TEXTURE_2D); before glColor3f but it didn''t change anything.
I tried glDisable(GL_TEXTURE_2D); before glColor3f but it didn''t change anything.
Hi,
If you want to set the colour of something when using lighting, set the emissive material property.
Dave
If you want to set the colour of something when using lighting, set the emissive material property.
Dave
Hi again,
Here''s a little bit of code that sets the both the current drawing colour and the emissive material property
GLfloat lineColour[] = {0.3f, 0.3f, 0.3f, 1.0f}; // define the colour
glColor4fv(boxColour); // set current colour
glMaterialfv(GL_FRONT, GL_EMISSION, boxColour); // set emissive material colour
Hope this helps,
Dave
Here''s a little bit of code that sets the both the current drawing colour and the emissive material property
GLfloat lineColour[] = {0.3f, 0.3f, 0.3f, 1.0f}; // define the colour
glColor4fv(boxColour); // set current colour
glMaterialfv(GL_FRONT, GL_EMISSION, boxColour); // set emissive material colour
Hope this helps,
Dave
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement