Hi Jerry,<br /><br />
simply disable Lighting.<br />
Add this before calling Draw2DGrid():<br />
<pre> _GL.Disable(OpenGL.GL_LIGHTING);
</pre>
Btw. these lines should be added too:<br />
<pre> _GL.MatrixMode(MatrixMode.Modelview);
_GL.LoadIdentity();
</pre>
So in summary it looks like:<br />
<pre> <span style=' color: Blue;'>void</span> renderer_EndEvt(vtkObject sender, vtkObjectEventArgs e) {
<span style=' color: Blue;'>if</span>(_IsOpenGLInitialized) {
<span style=' color: Green;'>//Debug.WriteLine("renderer_EndEvt");</span>
<span style=' color: Green;'>// next commented line has the same effect as _GL.MakeCurrent()</span>
<span style=' color: Green;'>//renderWindowControl1.RenderWindow.MakeCurrent();</span>
_GL.MakeCurrent();
_GL.MatrixMode(MatrixMode.Projection);
_GL.LoadIdentity();
_GL.Ortho(<span style=' color: Maroon;'>0</span>, renderWindowControl1.Width, renderWindowControl1.Height, <span style=' color: Maroon;'>0</span>, -<span style=' color: Maroon;'>10</span>, <span style=' color: Maroon;'>10</span>);
_GL.Clear(SharpGL.OpenGL.GL_DEPTH_BUFFER_BIT); <span style=' color: Green;'>// really needed ??? --> yes and no, try removing this call and change z coordinate of the grid</span>
_GL.Disable(OpenGL.GL_LIGHTING);
<span style=' color: Green;'>// draw our own stuff</span>
_GL.MatrixMode(MatrixMode.Modelview);
_GL.LoadIdentity();
Draw2DGrid();
_GL.Flush();
_GL.Blit(_Context);
}
}
</pre>
with kind regards<br />
Jochen
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Draw-a-2D-cross-on-vtkImageActor-tp5714166p5714185.html">Re: Draw a 2D cross on vtkImageActor</a><br/>
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br/>