lib/glesv2: intro glDrawElements
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 6 Dec 2015 17:00:59 +0000 (12:00 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Mon, 7 Dec 2015 14:44:37 +0000 (09:44 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/glesv2/glesv2.nit

index 24820ef..38ebc89 100644 (file)
@@ -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);