[vtkusers] Color doesn't change with external Open GL render -- ?
    Robert Belleman 
    robbel at science.uva.nl
       
    Thu Jul 17 02:43:49 EDT 2003
    
    
  
David,
Try this:
   glDisable(GL_LIGHTING);
   glColor3f(0,1,0);
   glRectf(.3,-.3,.4,-.4);
   glEnable(GL_LIGHTING);
-- Rob
-- 
[] Robert Belleman, PhD    X  Faculty of Science, Informatics Inst.    []
[] robbel at science.uva.nl  |X| University of Amsterdam, the Netherlands []
[] tel: (+31) 20 525 7510  X  http://www.science.uva.nl/~robbel/       []
On Wed, Jul 16, 2003 at 06:17:44PM -0600, David Edwards wrote:
> Hi,
> 
> I need to do some OpenGL immediate mode rendering into a VTK scene. In
> this example, I draw a cone using VTK, and when I get an EndEvent from
> the vtkRenderer (which occurs at the end of the render), I draw a little
> rectangle using pure OpenGL.
> 
> Here's the problem: The drawn rectangle is always the same color as the
> cone, regardless of what I set it to with glColor3f. If I change the
> cone to red, the rectangle will be red, etc. The rect is renderer in the
> correct location, but with the wrong color.
> 
> The code is below. I sure could use some help on this one.
> 
> Thanks,
> 
> - David Edwards
[...]
    
    
More information about the vtkusers
mailing list