i get it on this line
device = new Device(0, DeviceType.Hardware, panel1,
CreateFlags.MixedVertexProcessing,
presentParams);
in Window2
InvalidCallException was unhandeled
Error in the application.
How to use swap chain managed directX c#
Quote:Original post by jpetrie
However, the first thing that appears like an obvious problem from this code is that you are using panel1 for the handle for both devices. Shouldn't do that. Create two panels, one for the first device and one for the second. You're also trying to use adapter 0 the first time and adapter 1 the second -- do you actually have two graphics adapters?
Well both panels just so happened to be called panel1, and also i just have one graphics card if thats what your saying
Quote:
also i just have one graphics card if thats what your saying
Then perhaps you should not try to use two of them.
Quote:
how i can use a swap chain to render in multiple windows?
(1) Did using adapter 0 for both devices actually fix your problem, or do you just not understand what we're telling you?
(2) This is what happens if you put exactly what you said into Google and hit "Search."
Quote:Original post by Washu
First off, D3D9 or 10? Doesn't really matter as the principles are the same.
You use a swap chain (as mentioned in your topic)... you don't create multiple devices, you create multiple swap chains. That's about all it takes. Each swap chain is associated with one window handle (HWND).
This, and see set render target as well.
Quote:
adapter 0 still doesnt work
Enable the debug runtimes and unmanaged debugging in your project and look at the output window.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement