[vtkusers] Migrating from OpenGL to OpenGL2

Ken Martin ken.martin at kitware.com
Thu Nov 19 17:23:12 EST 2015


If you are using the generic Rendering API (vtkActor/vtkCamera/etc) then
code should mostly work unchanged. If you are directly working with the
OpenGL implementation then the conversion really depends on what you were
doing as the implementation is fairly different. In terms of the two
specific issues you mentioned vtkgl.h can probably be replaced with
vtk_glew.h, I do not recall what vtkOpenGLHardwareSupport does but there is
no match for that class in the new backend. Given that you have a class
named vtkVertexBufferObject I am guessing you are getting into very
specific implementation details so the conversion may not be trivial. On
the plus side the new back end includes classes such as
vtkOpenGLVertexBufferObject so ...  If you have further
questions/roadblocks let me know and I'll try to point you in the right
direction.

P.S. vtkOpenGLPointGaussianMapper in the new backend may be worth a look
too as it renders both points and splats etc.

Thanks
Ken


On Thu, Nov 19, 2015 at 5:10 PM, VictorLamoine <victor.lamoine at gmail.com>
wrote:

> Hello,
>
> The library I'm using (Point Cloud Library) cannot be compiled as is
> against
> a VTK version with OpenGL2 back end. (I'm using VTK trunk)
> There are some missing includes etc.
>
> Error examples:
>
> > In file included from
> >
> /home/victor/libraries/pcl/src/visualization/src/vtk/vtkVertexBufferObject.cxx:15:0:
> >
> /home/victor/libraries/pcl/src/visualization/include/pcl/visualization/vtk/vtkVertexBufferObject.h:35:62:
> > fatal error: vtkgl.h: No such file or directory
> >  #include "vtkgl.h" // Needed for gl data types exposed in API
> >                                                               ^
> > compilation terminated.
> > [ 50%] Built target pcl_poisson_reconstruction
> > In file included from
> >
> /home/victor/libraries/pcl/src/visualization/src/vtk/vtkVertexBufferObjectMapper.cxx:18:0:
> >
> /home/victor/libraries/pcl/src/visualization/include/pcl/visualization/vtk/vtkVertexBufferObject.h:35:62:
> > fatal error: vtkgl.h: No such file or directory
> >  #include "vtkgl.h" // Needed for gl data types exposed in API
> >                                                               ^
> > compilation terminated.
> >
> >
> /home/victor/libraries/pcl/src/visualization/src/pcl_visualizer.cpp:87:38:
> > fatal error: vtkOpenGLHardwareSupport.h: No such file or directory
> >  #include
> > <vtkOpenGLHardwareSupport.h>
> >                                       ^
> > compilation terminated.
>
> Is there a migration guide helping users getting their code working with
> OpenGL2 back end?
> if not, how do I make the association between old/new includes? (and maybe
> there are some differences in the classes ?)
>
> Bye
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Migrating-from-OpenGL-to-OpenGL2-tp5735123.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



-- 
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151119/de696f90/attachment.html>


More information about the vtkusers mailing list