CUDA + OpenGL Interop without obsolete features

I could previously fill textures in CUDA for use in OpenGL:

  • Create and initialize a GL texture ( gl::GenTextures()etc.)
  • Create GL pixel buffer object
  • Register PBO with CUDA

In the update / render loop:

  • cudaGraphicsMapResource() with PBO
  • Run kernel to update PBO
  • cudaGraphicsUnmapResource() PBO of CUDA
  • Download the GL program, snap the texture, render as usual.
  • Repeated washing, repeated rinsing.

However, I wonder if PBO is still the best way to write texture from the kernel. I saw articles like this one ( updated for v5 here ) that don't use PBO at all.

I saw some links to cudaTextureObjectand cudaSurfaceObject, but their roll in the OpenGL interface is unclear to me.

PBO - ? , , ?

( Kepler .)

+4
2

CUDA 6 SDK, "simpleCUDA2GL" "3_Imaging". CUDA. ( , ) PBO, 3 .

+2

Source: https://habr.com/ru/post/1534281/


All Articles