[vtk-developers] passing vertex attributes to custom shader (Ken Martin)

Brad Hollister behollis at sci.utah.edu
Tue Mar 8 13:42:58 EST 2016


Thanks, Ken. I'm using the VTK Python bindings. It looks like 
vtkOpenGLHelper isn't wrapped.

Is there another way to set the uniforms besides of the method given 
in the C++ test program?

Regards,
Brad

> Date: Sat, 5 Mar 2016 08:05:40 -0500
>From: Ken Martin <ken.martin at kitware.com>
> To: Brad Hollister <behollis at sci.utah.edu>
> Cc: VTK Developers <vtk-developers at vtk.org>
> Subject: Re: [vtk-developers] passing vertex attributes to custom
> 	shader
> Message-ID:
> 	<CANXz0SY+P=YuTQFcWg+5=9pd9RiCxPNYQjrrMKERLPhm2ooFsg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> 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
>>
>>


More information about the vtk-developers mailing list