[vtkusers] drawing with OpenGL primitives within Paint() in a sub-class of vtkContextItem
allison.vacanti at kitware.com
Wed Nov 14 10:15:48 EST 2018
There's nothing stopping you from doing this, but it is generally
considered bad design. The ContextItems are expected to go through the
Context2D painter interface, since that can draw to a variety of backends
(PDF, SVG, etc) that aren't OpenGL. You'll lose the ability to have this
flexibility when you bypass the painter.
But if it's for a one-off application that doesn't care about other
backends, it should be fine. Your best bet is have a look at the
vtkOpenGLContextDevice2D source code and see the conventions it uses and
try to match them within your item's Paint() method.
On Wed, Nov 14, 2018 at 6:09 AM Paul Douglas Hahn <pdhahn at compintensehpc.com>
> Does anyone know if it is feasible to call OpenGL2 primitives directly
> within the overridden Paint() method of a sub-class of vtkContextItem
> (i.e., as found in Rendering/Context2D)? I am using VTK 8.1 specifically.
> If so, is there an example somewhere?
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the VTK FAQ at:
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers