[vtkusers] Defining OpenGL shader with VTK 6.1 and Python 2.7

zadacka alexander.zawadzki at gmail.com
Tue Jul 8 12:55:06 EDT 2014


I am trying to use OpenGL shaders to apply a barrel deformation to a VTK
actor. The end goal is to adapt  febret's shaders
<https://github.com/omega-hub/rift/blob/master/OVRShaders.h>   for the
Oculus Rift. 

The documentation states that this should be done using vtkShader2, since
XML and cg shaders have been depricated in VTK 6.1. However, I am finding it
difficult to do this with using Python 2.7.

Specifically, transposing the  VTK test code
<http://vtk.org/gitweb?p=VTK.git;a=blob;f=Charts/Core/Testing/Cxx/TestGLSL.cxx>  
into Python hits a snag because vtkShader2 does not appear to be available
in the vtk module.

I've spent a few days trying to brute-force my way through this, but haven't
gotten anywhere, and would really appreciate any advice.

Questions:
 - Can vtkShader2 be accessed via a Python wrapper?
 - Is is possible to use user-defined OpenGL shaders in VTK 6.1 via Python?

In advance, thank you for your help.
Alex





--
View this message in context: http://vtk.1045678.n5.nabble.com/Defining-OpenGL-shader-with-VTK-6-1-and-Python-2-7-tp5727797.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list