Jump to content
  • Advertisement
Sign in to follow this  
Slader

Capturing images from D3D application

This topic is 3534 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Main aim: run 3D application remotely at fastest computer station, capturing application's output and streaming it to thin clients (laptop etc). Questions: 1. How to hide 3D application window? 2. How to capture images from hided window? 3. How to send events (from mouse and keyboard)? PS. I know that VLC can capture screen and stream it. But I need hiding applications windows, because I want to use computer while applications are running. Please, help me to find more information.

Share this post


Link to post
Share on other sites
Advertisement
This is a tough question. Because implementing this may not be trivial

Quote:
Original post by Slader
1. How to hide 3D application window?

You can't.
Right now Direct3D and OpenGL need a window to render on. AFAIK OpenGL is working towards "off-line" rendering so you don't need a window to be attached to the API. But today that isn't possible.
There are some tricks though, like using a 1x1 window, rendering to a texture the 3D data, and placing the 1x1 window off the screen (i.e. at 700,600 when the desktop resolution is 640x480)

Quote:
Original post by Slader
2. How to capture images from hided window?

That's easy. Since you render to a texture, you read back from the texture. Then send it uncompressed, use JPEG lib, PNG lib, (or even XviD), etc.
Read D3D/OGL documentation/tutorials on how to read back
However this may be slow and compensate any performance benefit you think you gain by using the fastest PC for rendering.
The bigger the texture is, the slower it is. You will be surprise how slow this can be. But surely it should be equally fast as streaming with VLC.

I haven't checked this source, but it seems correct on how to read back from a texture:
http://stackoverflow.com/questions/120066/doing-readback-from-direct3d-textures-and-surfaces

Quote:
Original post by Slader
3. How to send events (from mouse and keyboard)?

The client application should capture input, either using DirectInput, OIS, XInput, WinAPI, whatever. Then the application sends which keys were pressed through the network to the server and the server processes that input as soon as he gets it.
Synchronizing inputs from different clients can be very hard though (i.e. two clients hit the same key at the same time), assuming all clients are controlling the same application.
This is not related to Direct3D API at all

Cheers
Dark Sylinc

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!