# Access data on GPU directly with OpenGL-based volume mapper

**URL:** https://discourse.vtk.org/t/access-data-on-gpu-directly-with-opengl-based-volume-mapper/7013
**Category:** Support
**Created:** [October 29, 2021, 8:40am UTC](https://discourse.vtk.org/t/access-data-on-gpu-directly-with-opengl-based-volume-mapper/7013 "2021-10-29T08:40:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![brnk](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ecd19e/32.png) [@brnk](https://discourse.vtk.org/u/brnk)
#### Post date: [October 29, 2021, 8:40am UTC](https://discourse.vtk.org/t/access-data-on-gpu-directly-with-opengl-based-volume-mapper/7013/1 "2021-10-29T08:40:15Z")

</div>

I have an algorithm running on the GPU and I want to visualize its output matrix of size `1000 x 100 x 100` as a volume using a maximum intensity projection. Currently, I am copying the data back to the host, initialize a `vtkFloatArray` using a pointer to the matrix, transform it to a `vtkImageData` and then visualize it using a `vtkFixedPointVolumeRayCastMapper`.

However, since I want to update the volume after the previous visualization has finished, which currently takes around 300 ms, the goal is to accelerate the visualization time.

1. Is it possible to make a `vtkOpenGLGPUVolumeRayCastMapper` instance access the data on the GPU directly without copying it back to the host?
2. Even with the current approach, if I switch from `vtkFixedPointVolumeRayCastMapper` to `vtkOpenGLGPUVolumeRayCastMapper`, the volume is not updating anymore if I call `vtkRenderWindow::Render()`. Do I have to change anything in order to update the OpenGL-based mapper, e.g., `vtkOpenGLGPUVolumeRayCastMapper::DoGPURender()`?
3. Are there any VTK-related techniques to accelerate the animation of large volumes and is there any advantage of using
