Comments (6)
You will need 3 swap chains, one for each window, and then draw to the swapchain that you want. This is not implemented in the Application class, but there you can see how to create swap chains and how to draw to them.
from wickedengine.
Yes, I added std::vector<wi::graphics::SwapChain> swapChains
there.
Do I need to use std::vector<wi::platform::window_type>
windows or can I get by with just wi::platform::window_type
?
My current idea is that for each wi::platform::window_type
you need to have your own wi::graphics::SwapChain
, your own wi::Canvas
and your own wi::graphics::SwapChainDesc
.
And in the OnRender() method for each SwapChain:
for (auto& swapChain : swapChains)
{
CommandList cmd = m_graphicsDevice->BeginCommandList();
wi::image::SetCanvas(canvas);
wi::font::SetCanvas(canvas);
Viewport viewport;
viewport.width = (float)swapChain->desc.width;
viewport.height = (float)swapChain->desc.height;
m_graphicsDevice->BindViewports(1, &viewport, cmd);
m_graphicsDevice->RenderPassBegin(swapChain.get(), cmd);
m_graphicsDevice->RenderPassEnd(cmd);
wi::input::ClearForNextFrame();
wi::profiler::EndFrame(cmd);
m_graphicsDevice->SubmitCommandLists();
}
But I'm not sure how correct it is.
from wickedengine.
You will need one window for each swap chain. These things in your snippet should be called only once per frame, not for every swapchain:
wi::input::ClearForNextFrame();
wi::profiler::EndFrame(cmd);
m_graphicsDevice->SubmitCommandLists();
from wickedengine.
Thank you, everything worked out great!
Another question, is it possible to make each SwapChain display its own scene?
from wickedengine.
This is a matter of what you draw into it, so yes. Probably the easiest way would be to use a different scene for each and a different RenderPath3D for each, and drawing the each renderpath's result into the corresponding swapchain. You can set renderpath's scene member pointer to the scene you want to render.
from wickedengine.
Thank you!
I'll try to implement it.
I think we can close the issue.
from wickedengine.
Related Issues (20)
- Feature request: scene and general asset packing
- Feature request: scene and general asset packing HOT 7
- [Feature request] Add icon flipping HOT 5
- TextInputField Input Loss When Hovering Over Entities Tree HOT 1
- RTX Support? HOT 1
- when compiling cmake project to c++ 20 it causes weird problems HOT 3
- [Feature request] Add spline editing tool HOT 1
- Compilation failed archlinux HOT 4
- SDL2 not defined by default on linux HOT 2
- [Feature request] Localized volumetric fog HOT 9
- [BUG] Exception thrown: read access violation. shader_internal was nullptr. HOT 6
- [Bug] SSAO artefacts at the edge of the screen HOT 1
- [Bug] Fps drop down HOT 1
- Make wicked check github for new versión
- [Feature request] Make wicked check github for new versión
- [EDITOR] When clicking on items it slowly rotates HOT 6
- "terminate called after throwing an instance of `std::bad_alloc`" HOT 4
- "Corrupted doubly-linked list" HOT 2
- Editor dosen't start (Linux integrated AMD Graphic) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wickedengine.