[vtk-developers] passing vertex attributes to custom shader

Ken Martin ken.martin at kitware.com
Sat Mar 5 08:05:40 EST 2016


Currently you can pass uniforms (see
https://gitlab.kitware.com/vtk/vtk/blob/v7.0.0.rc2/Rendering/OpenGL2/Testing/Cxx/TestUserShader2.cxx
for an example). You currently cannot pass your own attributes without
subclassing, only work with the default ones that are passed
(position/scalars/normals/tcoords)

Thanks
Ken

On Fri, Mar 4, 2016 at 7:47 PM, Brad Hollister <behollis at sci.utah.edu>
wrote:

> Hi,
>
> I've been using vtkOpenGLPolyDataMapper() to set custom vertex / fragment
> shaders. I'd also like to provide user-defined vertex attributes accessible
> in the shader code. I assumed from the documentation that
> MapDataArrayToVertexAttributes() is the proper way to do this.
>
> However, I get the ERROR: vtkOpenGLPolyDataMapper (0x2872160): Not
> implemented at this level...
>
> There doesn't appear to be a derived class of vtkOpenGLPolyDataMapper
> available for my needs (which is that I'm specifying polygons via a
> vtkPolyData object).
>
> Is it possible to pass vertex attributes and custom uniforms using
> vtkOpenGLPolyDataMapper? Is there a different way from the one I've been
> trying that makes this possible?
>
> Regards,
> Brad
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>


-- 
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/vtk-developers/attachments/20160305/d1ca8c63/attachment.html>


More information about the vtk-developers mailing list