mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-06 05:01:53 +00:00
Use static D3D11 device and context
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user