mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Added Backbuffer to Swapchain + RenderCommand API changes
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
using DirectX.Common;
|
||||
using DirectX.D3D11;
|
||||
using GlitchyEngine.Platform.DX11;
|
||||
using DirectX.DXGI.DXGI1_2;
|
||||
|
||||
using internal GlitchyEngine.Platform.DX11;
|
||||
|
||||
@@ -41,6 +42,18 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
PlatformCreateTexture();
|
||||
|
||||
if(_description.IsSwapchainTarget)
|
||||
{
|
||||
// TODO: if the engine supports multiple windows it has to support multiple swap chains.
|
||||
|
||||
// kinda dirty...
|
||||
var context = GraphicsContext.Get();
|
||||
|
||||
context.SwapChain.GetBackbuffer(out _nativeTexture);
|
||||
|
||||
CreateViews();
|
||||
}
|
||||
|
||||
if(_description.DepthStencilFormat != .None)
|
||||
{
|
||||
_depthStenilTarget = new DepthStencilTarget(_description.Width, _description.Height, _description.DepthStencilFormat);
|
||||
|
||||
Reference in New Issue
Block a user