[vtkusers] Using OpenGl with VTK

Mohammed Amine SAHTARI msahtari at gmail.com
Thu Aug 14 05:17:50 EDT 2008


I want to add an OpenGl code in an application of VTK.

For this purpose, I try to draw lines using commands OpenGL.:

*1) I add this on the top of the program :*

#include <GL/gl.h>

*2) I place my OpenGL commands after renWin->Render() but before
iren->Start()** :  *

renWin->Render();

    glBegin (GL_LINES);
       glVertex2f (-2.5, 2.5);
       glVertex2f (2.5, -2.5);
     glEnd ();

iren->Start();


*But it doesn't appears.*

did I miss something ? How can I do this work ?

Looking forward to hear from you soon,

Amine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080814/182f5f0b/attachment.htm>


More information about the vtkusers mailing list