<div dir="ltr">Thanks for your answer, i thought to use them to give my actors metallic visualization.<div><br></div><div>Maybe i could use textures to show actors with that kind of visualization.</div><div><br></div><div>
Carlos.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-08 21:41 GMT+02:00 Marcus D. Hanwell-2 [via VTK] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=5727802&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span>:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
I don't think that would be useful at this time - whilst the new
<br>rendering code is shader based we have not yet started to add
<br>functionality to add your own or modify our shader code.
<br><br></div><div class="">On Tue, Jul 8, 2014 at 3:07 PM, Aashish Chaudhary
<br><<a href="http://user/SendEmail.jtp?type=node&node=5727800&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>> wrote:
</div><div><div class=""><br>> I can reply in detail layer but on this note, you may want to use the new
<br>> VTK rendering code for it. Marcus or Ken hopefully reply to you on that.
<br>>
<br>> - Aashish
<br>>
<br>>
<br></div>> On Tue, Jul 8, 2014 at 2:14 PM, Carlos Martinez <<a href="http://user/SendEmail.jtp?type=node&node=5727800&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>>
<br><div class="">> wrote:
<div class='shrinkable-quote'><br>>>
<br>>> Thanks for your answer, i thought it wasn't the right way!
<br>>>
<br>>> What do you mean when you say i have to load the shaders manually? The
<br>>> steps i'm doing are:
<br>>>
<br>>> 1- Create a vtkShaderProgram2
<br>>> 2- Create the vtkShader2 (VertexShader) and load it from the file with
<br>>> SetSourceCode.
<br>>> 3- Add my VertexShader to the vtkShaderProgram2 with
<br>>> "GetShaders()->AddItem()".
<br>>> 4- Repeat 2 and 3 with the FragmentShader.
<br>>> 5- Build the vtkShaderProgram and check the Build Status (to check if
<br>>> everything is ok).
<br>>> 6- Create a vtkActor and obtain his property(with GetProperty()).
<br>>> 7- Put ShadingOn to the property and SetPropProgram with the
<br>>> vtkShaderProgram2 build before (The vtkShaderProgram on debug has only the 2
<br>>> shaders I put in).
<br>>>
<br>>> When the actors are going to display into the screen, the warning window
<br>>> shows up and tells me that the main is defined twice (and shows me the
<br>>> Default shaders and mine).
<br>>>
<br>>> Thanks again!!
<br>>>
<br>>>
<br>>> 2014-07-08 18:25 GMT+02:00 Aashish Chaudhary
</div></div>>> <<a href="http://user/SendEmail.jtp?type=node&node=5727800&i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>>:
<br><div class="">>>
<br>>>> vtkOpenGLProperty::SetPropProgram is the right function but you have load
<br>>>> your shaders manually now. I believe the error you are getting is because it
<br>>>> is still trying to use the last shader code.
<br>>>>
<br>>>> - Aashish
<br>>>>
<br>>>>
<br>>>>
<br></div>>>> On Tue, Jul 8, 2014 at 3:15 AM, carlinhos <<a href="http://user/SendEmail.jtp?type=node&node=5727800&i=3" rel="nofollow" link="external" target="_blank">[hidden email]</a>>
<br><div><div class="h5">>>> wrote:
<div class='shrinkable-quote'><br>>>>>
<br>>>>> Hi all,
<br>>>>>
<br>>>>> I'm using Vtk 6.1.0 and Qt 5.2.1 (C++) to develop my app.
<br>>>>>
<br>>>>> I have an assembly with different actors into a vtkRenderWindow.
<br>>>>>
<br>>>>> I load a shader with the class vtkShader2, and create the program with
<br>>>>> vtkShaderProgram2, all ok with this. After that, i wanted to attach the
<br>>>>> shader to the actors (i'm going to use different shaders, depending on
<br>>>>> the
<br>>>>> actors). The problem is i didn't find examples or documentation to do
<br>>>>> this
<br>>>>> and i'm not capable to use the classes for the shaders correctly.
<br>>>>>
<br>>>>> I searched into the class vtkOpenGLProperty to set the vtkShaderProgram2
<br>>>>> with the method "SetPropProgram" and i set the property of the actors
<br>>>>> with
<br>>>>> that one, but vtk shows me a warning window with a conflict between the
<br>>>>> default shaders and mine (total 4 shaders, 2 vertex and 2 fragment).
<br>>>>>
<br>>>>> Can someone help me? Thanks in advance!!
<br>>>>>
<br>>>>>
<br>>>>>
<br>>>>> --
<br>>>>> View this message in context:
<br>>>>> <a href="http://vtk.1045678.n5.nabble.com/GLSL-Shader-on-a-vtkActor-VTK-6-1-and-Qt-5-2-1-tp5727788.html" rel="nofollow" link="external" target="_blank">http://vtk.1045678.n5.nabble.com/GLSL-Shader-on-a-vtkActor-VTK-6-1-and-Qt-5-2-1-tp5727788.html</a></div>
>>>> Sent from the VTK - Dev mailing list archive at Nabble.com.
<div class='shrinkable-quote'><br>>>>> _______________________________________________
<br>>>>> Powered by <a href="http://www.kitware.com" target="_blank" rel="nofollow" link="external">www.kitware.com</a>
<br>>>>>
<br>>>>> Visit other Kitware open-source projects at
<br>>>>> <a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" link="external" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>>>>>
<br>>>>> Follow this link to subscribe/unsubscribe:
<br>>>>> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="nofollow" link="external" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>>>>>
<br>>>>
<br>>>>
<br>>>>
<br>>>> --
<br>>>> | Aashish Chaudhary
<br>>>> | Technical Leader
<br>>>> | Kitware Inc.
<br>>>> | <a href="http://www.kitware.com/company/team/chaudhary.html" rel="nofollow" link="external" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a><br>>>
<br>>>
<br>>
<br>>
<br>>
<br>> --
<br>> | Aashish Chaudhary
<br>> | Technical Leader
<br>> | Kitware Inc.
<br>> | <a href="http://www.kitware.com/company/team/chaudhary.html" rel="nofollow" link="external" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a><br>>
<br>> _______________________________________________
<br>> Powered by <a href="http://www.kitware.com" target="_blank" rel="nofollow" link="external">www.kitware.com</a>
<br>>
<br>> Visit other Kitware open-source projects at
<br>> <a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" link="external" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>>
<br>> Follow this link to subscribe/unsubscribe:
<br>> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="nofollow" link="external" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>>
<br>>
</div></div></div><div><div class="h5">_______________________________________________
</div>Powered by <a href="http://www.kitware.com" target="_blank" rel="nofollow" link="external">www.kitware.com</a>
<br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" link="external" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>
Follow this link to subscribe/unsubscribe:
<br><a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="nofollow" link="external" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br><br>
<br>
<br>
</div></div><hr noshade size="1" color="#cccccc">
<div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><div class="">
<div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
</div><a href="http://vtk.1045678.n5.nabble.com/GLSL-Shader-on-a-vtkActor-VTK-6-1-and-Qt-5-2-1-tp5727788p5727800.html" target="_blank" rel="nofollow" link="external">http://vtk.1045678.n5.nabble.com/GLSL-Shader-on-a-vtkActor-VTK-6-1-and-Qt-5-2-1-tp5727788p5727800.html</a>
</div><div class="HOEnZb"><div class="h5">
<div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To unsubscribe from GLSL Shader on a vtkActor (VTK 6.1 and Qt 5.2.1), <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
<a href="http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
</div></div></div></blockquote></div><br></div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/GLSL-Shader-on-a-vtkActor-VTK-6-1-and-Qt-5-2-1-tp5727788p5727802.html">Re: GLSL Shader on a vtkActor (VTK 6.1 and Qt 5.2.1)</a><br/>
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Dev-f1251487.html">VTK - Dev mailing list archive</a> at Nabble.com.<br/>