0

What's the fastest way to read the screen buffer using CUDA (Whole screen, not just a window)?
Can I do this without copying tons of pixels between host and device?
Can I access this specific buffer directly?

Kh40tiK
  • 2,276
  • 19
  • 29

1 Answers1

1

Render to an openGL render buffer object, then use CUDA OpenGL interop to map it to a device pointer and read it in a CUDA kernel. You can also do the equivalent with Direct3D.

See the Graphics Samples included with the CUDA SDK.

harrism
  • 26,505
  • 2
  • 57
  • 88
  • Thanks for the answer. But the problem is how can I map the render buffer for the ENTIRE screen( without copying buffer to host mem )? For example, how can I catch a screenshot including start menu, desktop icons things? – Kh40tiK Jul 08 '13 at 13:02
  • That is not a CUDA question, and is not what you originally asked. You should post that as a separate question or remove the CUDA tag. A quick google turned up [this](http://blogs.msdn.com/b/dsui_team/archive/2013/03/25/ways-to-capture-the-screen.aspx). If my answer was helpful, please upvote and/or accept. – harrism Jul 09 '13 at 01:39