mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Added RenderTarget2D
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using DirectX.D3D11;
|
||||
|
||||
namespace GlitchyEngine.Renderer
|
||||
{
|
||||
using internal GlitchyEngine.Renderer;
|
||||
|
||||
extension RenderTarget2D
|
||||
{
|
||||
protected internal ID3D11RenderTargetView* nativeRenderTargetView ~ _?.Release();
|
||||
|
||||
protected override void CreateRenderTargetPlatform(Texture2DDesc desc)
|
||||
{
|
||||
nativeRenderTargetView?.Release();
|
||||
nativeRenderTargetView = null;
|
||||
|
||||
CreateTexturePlatform(desc, true, null, 0);
|
||||
|
||||
var result = _context.nativeDevice.CreateRenderTargetView(nativeTexture, null, &nativeRenderTargetView);
|
||||
Log.EngineLogger.Assert(result.Succeeded, scope $"Failed to create render target view. Error ({result.Underlying}): {result}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user