简体   繁体   English

CUDA中的图形函数如何使用?

[英]How do I use graphics functions in CUDA?

I want to use basic functions like putpixel, initwindow in CUDA. How do I do it?我想在CUDA中使用putpixel、initwindow等基本功能,请问如何操作?

I would rather use the CUDA - OpenGL interop to visualize results from CUDA, see eg http://3dgep.com/opengl-interoperability-with-cuda/我宁愿使用 CUDA - OpenGL 互操作来可视化 CUDA 的结果,参见例如http://3dgep.com/opengl-interoperability-with-cuda/

CUDA cannot output directly to a window backbuffer. CUDA 不能 output 直接到 window 后备缓冲区。 However, you can still use CUDA to write to a texture or a buffer and then use the results to visualize it in OpenGL. For a thorough example on how to do this, please refer to this project:但是,您仍然可以使用 CUDA 写入纹理或缓冲区,然后使用结果在 OpenGL 中将其可视化。有关如何执行此操作的完整示例,请参阅此项目:

https://github.com/nvpro-samples/gl_cuda_interop_pingpong_sthttps://github.com/nvpro-samples/gl_cuda_interop_pingpong_st

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM