[vtk-developers] Regarding of OpenGL/GPGPU intraoperation
sonogi1979 at live.jp
sonogi1979 at live.jp
Mon Jul 20 03:18:41 EDT 2015
Hi,
You know GPGPU is very hot technology in medical/scientific computing.
Especially, I'm working 3D volume processing by using GPGPU(CUDA). To use
GPGPU with vtk, I hope an interface for OpenGL-CUDA intraoperation to reduce
redundant CPU-GPU data transfer.
Simple hack of vtkOpenGLGPUVolumeRayCastMapper is followings:
vtkTextureObject* vtkOpenGLGPUVolumeRayCastMapper::GetTextureObject()
{
return this->Impl->VolumeTextureObject;
}
When I get the texture object, I can access and operate a volume stored in
GPU memory easily by using cudaGraphicsGLRegisterImage,
cudaGraphicsMapResources, cudaGraphicsSubResourceGetMappedArray, and
cudaBindSurfaceToArray because vtkTextureObject provides a texture handle
and texture dimensions.
On the other hand, the method is not well designed: no synchronization
method among vtkImageData and vtkTextureObject, processed results does not
affect in original vtkImageData.
If you know better way, please let me know.
Thank you,
Shinya
--
View this message in context: http://vtk.1045678.n5.nabble.com/Regarding-of-OpenGL-GPGPU-intraoperation-tp5732977.html
Sent from the VTK - Dev mailing list archive at Nabble.com.
More information about the vtk-developers
mailing list