Accept an IntPtr for VertexBuffer.SetData.

This commit is contained in:
Paul Chote
2015-05-23 10:34:02 +01:00
parent 4df64eb18f
commit b1f4bd85d6
3 changed files with 12 additions and 0 deletions

View File

@@ -48,6 +48,16 @@ namespace OpenRA.Renderer.Sdl2
ErrorHandler.CheckGlError();
}
public void SetData(IntPtr data, int start, int length)
{
Bind();
GL.BufferSubData(BufferTarget.ArrayBuffer,
new IntPtr(VertexSize * start),
new IntPtr(VertexSize * length),
data);
ErrorHandler.CheckGlError();
}
public void Bind()
{
GL.BindBuffer(BufferTarget.ArrayBuffer, buffer);