PacoMontanes Posted August 23, 2016 Share Posted August 23, 2016 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... Quote Link to comment Share on other sites More sharing options...
JeffR Posted August 28, 2016 Share Posted August 28, 2016 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. Quote Link to comment Share on other sites More sharing options...
PacoMontanes Posted August 28, 2016 Author Share Posted August 28, 2016 Thank Jeff! Yes, you are right. The issue can be reproduced instancing 2 GuiCanvas and adding content on both. Only one of the windows show something, but just flicking garbage... I have to remark that works properly on D3D9. Quote Link to comment Share on other sites More sharing options...
JeffR Posted September 16, 2016 Share Posted September 16, 2016 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 :) Quote Link to comment Share on other sites More sharing options...
PacoMontanes Posted September 16, 2016 Author Share Posted September 16, 2016 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 Quote Link to comment Share on other sites More sharing options...
Timmy Posted September 16, 2016 Share Posted September 16, 2016 Yes DX11 is not creating a different swap chain for each window target. Will through up a fix for it this weekend, i'll post the PR here so you can test it. Quote Link to comment Share on other sites More sharing options...
PacoMontanes Posted September 16, 2016 Author Share Posted September 16, 2016 Perfect! :) Quote Link to comment Share on other sites More sharing options...
Timmy Posted September 18, 2016 Share Posted September 18, 2016 If you want to try this out and we can fix any further problems i may have missed before sending in a proper PR. https://github.com/rextimmy/Torque3D/tree/dx11_multi_guicanvas Quote Link to comment Share on other sites More sharing options...
PacoMontanes Posted September 19, 2016 Author Share Posted September 19, 2016 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.) Quote Link to comment Share on other sites More sharing options...
Timmy Posted September 19, 2016 Share Posted September 19, 2016 Ok no worries, will check that out and fix it. Quote Link to comment Share on other sites More sharing options...
Timmy Posted September 22, 2016 Share Posted September 22, 2016 Sorry for the delay, been busy this week. Check that branch from above, hopefully should be fixed now. Quote Link to comment Share on other sites More sharing options...
PacoMontanes Posted September 22, 2016 Author Share Posted September 22, 2016 It works like a charm. I've being doing tests in the stock Engine, and I've tested in OpenGL as well. Now, I´ll integrate into my project to see if everything works as in D3D9 used to do. Good work, and many thanks Timmy! Quote Link to comment Share on other sites More sharing options...
Timmy Posted September 22, 2016 Share Posted September 22, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.