mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-06 05:01:53 +00:00
Added Context, Bind and Unbind to GeometryBinding
This commit is contained in:
@@ -5,6 +5,8 @@ namespace GlitchyEngine.Renderer
|
||||
{
|
||||
public class GeometryBinding
|
||||
{
|
||||
internal GraphicsContext _context;
|
||||
|
||||
internal List<VertexBufferBinding> _vertexBuffers = new .() ~ delete _;
|
||||
internal IndexBuffer _indexBuffer;
|
||||
internal VertexLayout _vertexLayout;
|
||||
@@ -12,6 +14,11 @@ namespace GlitchyEngine.Renderer
|
||||
internal uint32 _indexCount;
|
||||
internal PrimitiveTopology _primitiveTopology;
|
||||
|
||||
public this(GraphicsContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public VertexBufferBinding GetVertexBuffer(uint32 slot)
|
||||
{
|
||||
return _vertexBuffers[slot];
|
||||
@@ -79,5 +86,9 @@ namespace GlitchyEngine.Renderer
|
||||
}
|
||||
|
||||
protected extern void PlatformSetIndexBuffer(IndexBuffer indexBuffer);
|
||||
|
||||
public extern void Bind(GraphicsContext context = null);
|
||||
|
||||
public extern void Unbind(GraphicsContext context = null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user