Sign in to follow this  
Joeman

2 Devices, 1 Texture?

Recommended Posts

Joeman    122
Hello All, I'm making an editor in C#. I need to render ascene to a texture and then render the texture to screen. I can do that on my computer just fine and its very fast. The Problem is my partner has a super slow Celeron 1.5ghz no grahpics card. So I have to render to the texture using a software device for his computer b/c I'm using shaders. I then want to render the texture of the scene to the screen using a hardware device so it'll be fast. Is it impossible to share a texture btw 2 different devices? Is it possible to changes the device from software rendering to hardware rendering? Any Suggestions? Joe

Share this post


Link to post
Share on other sites
Pipo DeClown    804
Q1) I don't think this is possible. (Why not create another texture-object?)
Q2) pDevice->Reset( presentParams ); Read the DirectX documentation for more information on this function.

Share this post


Link to post
Share on other sites
DrunkenHyena    805
2 devices can't share a resource. You would likely have to do something like Lock both textures and copy the bits with the CPU. But this is likely to be so slow that it's unusable.

Share this post


Link to post
Share on other sites
Quote:
Pipo DeClown wrote:
Q1) I don't think this is possible. (Why not create another texture-object?)
Q2) pDevice->Reset( presentParams ); Read the DirectX documentation for more information on this function.


pDevice->Reset cannot chage device type, only parameters

Share this post


Link to post
Share on other sites
Raloth    379
You should only ever have one device for your program, unless you are dealing with multiple monitors.

I'm not exactly sure what you are saying, but it sounds like all you have to do is try to create a hardware device and if that fails create a software device instead.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Check out IDirect3DSwapChain*, or I guesss it would be Microsft.DirectX.Direct3D.SwapChain or something like that for C#. Then you will have one device.

Share this post


Link to post
Share on other sites

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