Colour interpolation?

  • Follow


Hi gents,
Trying I've been drawing some lines (using GL_LINES) in a GL application,
and finding that colour interpolation appears to be turned off. What would
cause that?

I'm doing something like

glColor3f(1,0,0);   -red
glVertex3f(x,y,z);
glColor3f(0,0,1);   -blue
glVertex3f(x-10,y,z);

to get a little line that's [supposed to be] red one end and blue the other.
Outside of the application this works fine, but inside it it fails. The
reference for glEnable says nothing about being able to disable it, so I've
no idea what's going on.

I hope someone has some idea what I'm talking about...


0
Reply Makhno 10/27/2004 9:16:20 PM

Makhno wrote:
> Hi gents,
> Trying I've been drawing some lines (using GL_LINES) in a GL application,
> and finding that colour interpolation appears to be turned off. What would
> cause that?
> 
> I'm doing something like
> 
> glColor3f(1,0,0);   -red
> glVertex3f(x,y,z);
> glColor3f(0,0,1);   -blue
> glVertex3f(x-10,y,z);
> 
> to get a little line that's [supposed to be] red one end and blue the other.
> Outside of the application this works fine, but inside it it fails. The
> reference for glEnable says nothing about being able to disable it, so I've
> no idea what's going on.
> 
> I hope someone has some idea what I'm talking about...
> 
> 
glShadeModel (GL_SMOOTH);
vs
glShadeModel (GL_FLAT);

--
Andy V

0
Reply Andy 10/27/2004 10:38:50 PM


1 Replies
284 Views

(page loaded in 0.109 seconds)

Similiar Articles:













7/29/2012 10:45:30 AM


Reply: