[Paraview] Linking error when trying to use vtkGLSL/vtkXMLShader
Sohail Shafii
sohailshafii at yahoo.com
Thu Oct 27 16:44:18 EDT 2011
Thanks. That seems to do the trick. The only other issue is the rendering context. I've used the line integral convolution/lic filters as an example, and it seems like I need a "SetContext" function, which is passed a pointer to an (new) allocated vtkRenderWindow object. For reference, I am looking at vtkImageDataLIC2D.cxx.
I will then need to downcast this object to a vtkOpenGLRenderWindow and pass it to vtkShaderProgram2, which requires a proper context...well I've done all of that, and so far I've noticed that a new (small, blacked out) window with the title "Visualization Toolkit" pops up when I start my filter. Now I have to do something with this fragment shader (which currently does nothing).
Am I on the right track here? Or I am issuing an improper context?
Sohail
________________________________
From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
To: Sohail Shafii <sohailshafii at yahoo.com>
Cc: "paraview at paraview.org" <paraview at paraview.org>
Sent: Wednesday, October 26, 2011 8:43 AM
Subject: Re: [Paraview] Linking error when trying to use vtkGLSL/vtkXMLShader
Classes in graphics cannot depend on classes in rendering. You can move your filter to hybrid.
Utkarsh
On Oct 26, 2011, at 12:11 AM, Sohail Shafii <sohailshafii at yahoo.com> wrote:
Hi,
>
>
>I am currently trying to do some shader operations in a standard C++ filter. This filter (inherits from vtkMultiBlockDataSetAlgorithm, resides in VTK/Graphics) will be used to voxelize a polygonal object (basically the result of the contour filter) and write the results to a 3D texture.
>
>
>I tried to do the following:
>vtkXMLShader *xmlShader = vtkXMLShader::New();
> vtkGLSLShader *glslShader = vtkGLSLShader::New();
>
>
>Which results in:
>Undefined symbols for architecture x86_64:
> "vtkXMLShader::New()", referenced from:
> vtkRepulsiveForceFieldGenerator::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*)in vtkRepulsiveForceFieldGenerator.cxx.o
> "vtkGLSLShader::New()", referenced from:
> vtkRepulsiveForceFieldGenerator::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*)in vtkRepulsiveForceFieldGenerator.cxx.o
>ld: symbol(s) not found for architecture x86_64
>collect2: ld returned 1 exit status
>
>
>I'm going to guess that standard filters can't use code like this, and that my filter should reside inside of the VTK/Rendering folder and follow the examples in that folder.
>
>
>Thanks,
>Sohail
_______________________________________________
>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 ParaView Wiki at: http://paraview.org/Wiki/ParaView
>
>Follow this link to subscribe/unsubscribe:
>http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111027/c8ec7efd/attachment.htm>
More information about the ParaView
mailing list