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
@@ -6,8 +6,6 @@ namespace GlitchyEngine.Renderer
{
public class GeometryBinding : RefCounter
{
internal GraphicsContext _context ~ _?.ReleaseRef();
internal List<VertexBufferBinding> _vertexBuffers = new .() ~ delete _;
internal IndexBuffer _indexBuffer ~ _?.ReleaseRef();
internal VertexLayout _vertexLayout ~ _?.ReleaseRef();
@@ -19,9 +17,8 @@ namespace GlitchyEngine.Renderer
public bool IsIndexed => _indexBuffer != null;
public this(GraphicsContext context)
public this()
{
_context = context..AddRef();
}
public ~this()
@@ -120,8 +117,8 @@ namespace GlitchyEngine.Renderer
protected extern void PlatformSetIndexBuffer(IndexBuffer indexBuffer);
public extern void Bind(GraphicsContext context = null);
public extern void Bind();
public extern void Unbind(GraphicsContext context = null);
public extern void Unbind();
}
}