Use static D3D11 device and context

This commit is contained in:
Simon Lübeß
2021-10-13 22:56:22 +02:00
parent 84daee95e4
commit 0cbbf94fe6
51 changed files with 448 additions and 345 deletions
@@ -81,24 +81,11 @@ namespace GlitchyEngine.Renderer
public class VertexLayout : RefCounter
{
private GraphicsContext _context ~ _?.ReleaseRef();
private VertexElement[] _elements;
private bool _ownsElements;
public GraphicsContext Context => _context;
public VertexElement[] Elements => _elements;
public this(GraphicsContext context, VertexElement[] elements, bool ownsElements, VertexShader vertexShader)
{
_context = context..AddRef();
_elements = elements;
_ownsElements = ownsElements;
CreateNativeLayout();
}
public ~this()
{
if(_ownsElements)