Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
160 views
in Technique[技术] by (71.8m points)

c++ - How do I edit SDL2 textures with CUDA?

I have created a very small traffic simulation in which the GPU is responsible for updating the locations and behaviours of all cars. This would speed up my program by a lot, were it not for the pesky detail that I have to copy the cars data from the GPU to the host where I then use SDL to render it (which then sends a subset of that data back to the GPU for rendering actually, making this whole thing even worse). This is clearly inefficient and it would be much better if I could start displaying directly from the GPU. I looked around but could not find any resources on the matter. Is there a standard way to do this?

question from:https://stackoverflow.com/questions/65951455/how-do-i-edit-sdl2-textures-with-cuda

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...