1

I guess some portion of an opengl application used to run on CPU, and now through cuda people can run it on GPU, and accelerate those portions (portion of an opengl application or pipeline) .

Can someone explain me what exactly cuda does for opengl ? I mean exactly what operations are offloaded to GPU for processing by cuda?

1 Answer 1

3

CUDA is a totally separate API than OpenGL; you can use them at the same time but CUDA isn't necessary to get GPU acceleration of rendering. In OpenGL you use shaders, which are conceptually somewhat similar to CUDA kernels, to achieve hardware acceleration of many tasks in OpenGL.

CUDA does allow interoperability with OpenGL (and Direct3D) but it is by no means necessary; you'd usually only want to do that if you both want to do scientific computing AND rendering in the same application. That's becoming even less necessary though, now with compute shaders available in both GL and D3D

Sign up to request clarification or add additional context in comments.

4 Comments

thanks. can you give more explanation on "That's becoming even less necessary though, now with compute shaders available in both GL and D3D "
Compute shaders are still very far away from the power of expressiveness of CUDA.
@AfnanAbdullah Compute shaders displace some uses of CUDA by allowing you to run arbitrary stuff on the GPU, separate from the rendering pipeline while still being integrated directly with OpenGL (or Direct3D).
@MomotapaLimpopo You're certainly right, but compute shaders are worth a mention; they can take the place of CUDA for some cases, especially when you're already using a graphics API. Also, they're gaining expressiveness.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.