[vtk-developers] GLSL Shader on a vtkActor (VTK 6.1 and Qt 5.2.1)

Aashish Chaudhary aashish.chaudhary at kitware.com
Tue Jul 8 12:25:17 EDT 2014


vtkOpenGLProperty::SetPropProgram is the right function but you have
load your shaders manually now. I believe the error you are getting is
because it is still trying to use the last shader code.

- Aashish



On Tue, Jul 8, 2014 at 3:15 AM, carlinhos <carlinhosmp87 at gmail.com> wrote:

> Hi all,
>
> I'm using Vtk 6.1.0 and Qt 5.2.1 (C++) to develop my app.
>
> I have an assembly with different actors into a vtkRenderWindow.
>
> I load a shader with the class vtkShader2, and create the program with
> vtkShaderProgram2, all ok with this. After that, i wanted to attach the
> shader to the actors (i'm going to use different shaders, depending on the
> actors). The problem is i didn't find examples or documentation to do this
> and i'm not capable to use the classes for the shaders correctly.
>
> I searched into the class vtkOpenGLProperty to set the vtkShaderProgram2
> with the method "SetPropProgram" and i set the property of the actors with
> that one, but vtk shows me a warning window with a conflict between the
> default shaders and mine (total 4 shaders, 2 vertex and 2 fragment).
>
> Can someone help me? Thanks in advance!!
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/GLSL-Shader-on-a-vtkActor-VTK-6-1-and-Qt-5-2-1-tp5727788.html
> Sent from the VTK - Dev 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
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>


-- 



*| Aashish Chaudhary | Technical Leader         | Kitware Inc.            *
*| http://www.kitware.com/company/team/chaudhary.html
<http://www.kitware.com/company/team/chaudhary.html>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20140708/89a560ca/attachment-0002.html>


More information about the vtk-developers mailing list