Line coloring??
Hi, i wanted to draw a line with for each vertex a different color, is this impossible using opengl or something as it just wouldn't work for me, if so, is there a way around that (EDIT: besides mapping a texture onto it)?
Thanks
[edited by - Tree Penguin on March 5, 2004 1:49:00 PM]
Have you tried to set a per-vertex color? It would be interpolated. Is this what you need?
Can you please try to be more clear next time you post something, by spending an extra minute? It''s rather difficult to answer to a problem which is not explained enough.
Can you please try to be more clear next time you post something, by spending an extra minute? It''s rather difficult to answer to a problem which is not explained enough.
Well that''s exactly the problem, this:
glColor3d(0.45,0.45,0.45);
glVertex2i(0,11);
glColor3d(1.0,0.0,0.0);
glVertex2i(m_WindowWidth,11);
gives me a red line, not interpolated.
glColor3d(0.45,0.45,0.45);
glVertex2i(0,11);
glColor3d(1.0,0.0,0.0);
glVertex2i(m_WindowWidth,11);
gives me a red line, not interpolated.
For some reason it blends in with mine, two colors:
What does your initialization for the opengl enivironment code look like?
glBegin(GL_LINES); glColor3f(1.0,1.0,1.0); glVertex3f(1.0,1.0,-5.0); glColor3f(0.0,0.0,1.0); glVertex3f(3.0,3.0,-5.0); glEnd();
What does your initialization for the opengl enivironment code look like?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement