Skip to content

Instantly share code, notes, and snippets.

@mellinoe
Created February 8, 2017 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mellinoe/e850f46d084ddd28fa4850de1fc2f2d8 to your computer and use it in GitHub Desktop.
Save mellinoe/e850f46d084ddd28fa4850de1fc2f2d8 to your computer and use it in GitHub Desktop.
public override void DrawIndexedPrimitives(int count, int startingIndex)
{
PreDrawCommand();
DrawElementsType elementsType = ((OpenGLIndexBuffer)IndexBuffer).ElementsType;
int indexSize = OpenGLFormats.GetIndexFormatSize(elementsType);
GL.DrawElements(_primitiveType, count, elementsType, new IntPtr(startingIndex * indexSize));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment