From: Alexis Laferrière Date: Sun, 6 Dec 2015 17:00:59 +0000 (-0500) Subject: lib/glesv2: intro glDrawElements X-Git-Tag: v0.8~51^2~1 X-Git-Url: http://nitlanguage.org lib/glesv2: intro glDrawElements Signed-off-by: Alexis Laferrière --- diff --git a/lib/glesv2/glesv2.nit b/lib/glesv2/glesv2.nit index 24820ef..38ebc89 100644 --- a/lib/glesv2/glesv2.nit +++ b/lib/glesv2/glesv2.nit @@ -375,6 +375,11 @@ fun glDisableVertexAttribArray(index: Int) `{ glDisableVertexAttribArray(index); # Render primitives from array data fun glDrawArrays(mode: GLDrawMode, from, count: Int) `{ glDrawArrays(mode, from, count); `} +# Render primitives from array data by their index +fun glDrawElements(mode: GLDrawMode, count: Int, typ: GLDataType, indices: Pointer) `{ + glDrawElements(mode, count, typ, indices); +`} + # Define an array of generic vertex attribute data fun glVertexAttribPointer(index, size: Int, typ: GLDataType, normalized: Bool, stride: Int, array: NativeGLfloatArray) `{ glVertexAttribPointer(index, size, typ, normalized, stride, array);