[vtkusers] How to write into VTK vertex buffer object from an OpenCL kernel

Reza Faieghi mfaieghi at westerneng.ca
Wed Oct 26 10:27:10 EDT 2016


Hello,



My code generates a massive polygonal data through an openCL kernel. For
rendering purposes, this data copies from GPU memory to host memory.
Afterward, there are regular VTK codes to create an unstructured grid,
passing data into the renderer and display them. However, the data
transfers between device and host memories are time-consuming.


In order to speed up the code, I want to pass the polygonal data directly
from the openCL kernel to vertex buffer object. I am wondering is there any
way that I can bridge between openCL and openGL part of the VTK renderer?

I assume that I will need to make few changes in openGL commands like
glDrawArrays. I also need to make a few changes in vertex shader just to
make sure that the renderer works fine with my data. Other than, the rest
of shaders should remain unchanged. Is it possible to access the shaders
and make the above changes?


I would really appreciate it if you could help me with this.



Best Regards,

Reza Faieghi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161026/16258ca8/attachment.html>


More information about the vtkusers mailing list