https://www.opengl.org/sdk/docs/man3/xhtml/glDrawElements.xml
(mode glbase.Enum, count int, gltype glbase.Enum, indices interface{})
| 1274 | |
| 1275 | // https://www.opengl.org/sdk/docs/man3/xhtml/glDrawElements.xml |
| 1276 | func (gl *GL) DrawElements(mode glbase.Enum, count int, gltype glbase.Enum, indices interface{}) { |
| 1277 | var indices_ptr unsafe.Pointer |
| 1278 | var indices_v = reflect.ValueOf(indices) |
| 1279 | if indices != nil && indices_v.Kind() != reflect.Slice { |
| 1280 | panic("parameter indices must be a slice") |
| 1281 | } |
| 1282 | if indices != nil { |
| 1283 | indices_ptr = unsafe.Pointer(indices_v.Index(0).Addr().Pointer()) |
| 1284 | } |
| 1285 | C.gl3_2core_glDrawElements(gl.funcs, C.GLenum(mode), C.GLsizei(count), C.GLenum(gltype), indices_ptr) |
| 1286 | } |
| 1287 | |
| 1288 | // https://www.opengl.org/sdk/docs/man3/xhtml/glDrawArrays.xml |
| 1289 | func (gl *GL) DrawArrays(mode glbase.Enum, first, count int) { |