Files
StrawberryBF/src/PlatformLayer/Batcher.bf

37 lines
669 B
Beef
Raw Normal View History

2020-08-09 01:29:46 -07:00
using System.Collections.Generic;
namespace Strawberry
{
public class Batcher
{
List<Batch> batchStack = new System.Collections.List<Batch>() ~ DeleteContainerAndItems!(_);
Batch top => batchStack.Count > 0 ? batchStack[batchStack.Count - 1] : null;
2020-08-09 18:28:55 -07:00
public void PushQuad(Vertex a, Vertex b, Vertex c, Vertex d)
{
}
2020-08-09 01:29:46 -07:00
private class Batch
{
2020-08-09 18:28:55 -07:00
uint32 bufferHandle;
List<Vertex> Vertices;
2020-08-09 01:29:46 -07:00
2020-08-09 18:28:55 -07:00
public this()
{
GL.glGenBuffers(1, &bufferHandle);
GL.glBindBuffer(GL.GL_ARRAY_BUFFER, bufferHandle);
GL.glDeleteBuffers(1, &bufferHandle);
}
}
private struct Vertex
{
public Vector Position;
public Color Color;
2020-08-09 01:29:46 -07:00
}
}
}