Sign in to follow this  

Capturing images from D3D application

This topic is 3316 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
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

This topic is 3316 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this