Jump to content

Direct3D 11 Single SwapChain? (Torque 3D 3.9)


PacoMontanes

Recommended Posts

Hi,


Please, I need some advice... :? I'm migrating my protect to 3.9. I used to use some windows (few GuiCanvas). It works in D3D9, but not in D3D11. I tried to figure out why, and I found that there is a single SwapChain per device. I'm rigth? I think to mimic the architecture of the implementation of D3D9 will be too complicated. Don't you think? So I'm afraid that I'll have to merge all windows in a single one. This will be a painful task, because I have lots of GuiCanvas configured. What else can I do? What do you think guys? ;)


Edit: What I really need, is to know how could I make an application in multi display using D3D11? In fact, I only need only 1 render target in just 1 of the displays. The others displays only shows gui elements. Should I have to make a big window and spread it through all the displays? I'm not very happy this this solution, but perhaps there are no more alternatives...

Link to comment
Share on other sites

So you have one window that's the main game render, one that displays a particular render target, and then the others are just regular gui controls, if I'm reading this right?


Will have to take a look and see what'd be needed for a setup like that.

Link to comment
Share on other sites

  • 3 weeks later...

Hey Paco!


Alright, as a bit of an update to circle back on this, was able to replicate this and also affirmed it's broken for OpenGL as well(dunno if you were bothering with it at all).


So we'll have a look into this and try and get it patched up. I wanted to branch out the editor to have the option of popping some controls out into second windows, so I think this is a pretty important thing to fix :)

Link to comment
Share on other sites

Hi Jeff,

Sorry I didn't try with OpenGL, because nowadays I'm only interested in D3D11.

I'm always working with some windows at once, and I only work with the editor in the main window, I think it's no needed to work like you propose (adding content directly from the editor to other windows). I just edit the gui files in the editor, and in game simply add the gui file to the Canvas, like always:

Canvas.setContent("PlayGui");
CanvasB.setContent("LoadingGui");

As I nearly understand, D3D9 creates a swapchain for every window, but D3D11 (and perhaps OpenGL) only instances one of them per device.

Please, you can count on me to proceed with any test or anything! :D

Link to comment
Share on other sites

Hi Timmy,

I've already finish the test, and multi GuiCanvas works, but when you enter in editor (both worldeditor or guieditor) the render screen goes to black).


in console write:

> new GuiCanvas(CanvasB)

> CanvasB.setContent( MainMenuGui )

And then press F11 or F10

(If you press F11 again remains in black.)


hxOZ83.jpg

Link to comment
Share on other sites

Ok excellent good to know. Just so anyone else reading knows, the SDL side of things is still getting worked on, so in it's current state it only works properly on windows when compiling without SDL. When the SDL side is done i'll get it chucked into the proper development branch.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...