Fixed issue with incorrect delegate signature.
This commit is contained in:
@@ -22,7 +22,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Render
|
||||
private uint dataIndex, indicesIndex, lengthsIndex;
|
||||
|
||||
public Batch(uint BatchVertexSize = 4096) {
|
||||
multiDrawElements = GLFunctionUtils.RetrieveGLDelegate<GLMultiDrawElements>("glMultDrawElements");
|
||||
multiDrawElements = GLFunctionUtils.RetrieveGLDelegate<GLMultiDrawElements>("glMultiDrawElements");
|
||||
indices = new uint[BatchVertexSize];
|
||||
lengths = new uint[BatchVertexSize];
|
||||
offsets = new uint[BatchVertexSize];
|
||||
@@ -50,7 +50,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Render
|
||||
vertexArray.Dispose();
|
||||
}
|
||||
|
||||
public virtual void Draw(IMeshable meshable, Color color) {
|
||||
public virtual void Add(IMeshable meshable, Color color) {
|
||||
ValueTuple<Vector3, Vector2>[] vertices = meshable.Vertices;
|
||||
uint[] indices = meshable.Elements;
|
||||
if (vertices.Length * VERTEX_LENGTH + dataIndex >= data.Length || indices.Length + indicesIndex >= indicesIndex) Flush();
|
||||
@@ -93,7 +93,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Render
|
||||
dataIndex = 0;
|
||||
indicesIndex = 0;
|
||||
lengthsIndex = 0;
|
||||
multiDrawElements(GLEnums.GL_TRIANGLE_STRIP, lengths, GLEnums.GL_UNSIGNED_INT, offsets);
|
||||
multiDrawElements(GLEnums.GL_TRIANGLE_STRIP, lengths, GLEnums.GL_UNSIGNED_INT, IntPtr.Zero, lengths.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user