Example #1
0
func DrawElements(mode, ty Enum, offset, count int) {
	defer func() {
		errstr := errDrain()
		log.Printf("gl.DrawElements(%v, %v, %v, %v) %v", mode, ty, offset, count, errstr)
	}()
	C.glDrawElements(mode.c(), C.GLsizei(count), ty.c(), unsafe.Pointer(uintptr(offset)))
}
Example #2
0
func DrawElements(
	mode Enum, count Sizei,
	type_ Enum, indices Void) {
	C.glDrawElements(
		C.GLenum(mode),
		C.GLsizei(count),
		C.GLenum(type_),
		unsafe.Pointer(indices))
}
Example #3
0
func DrawElements(mode Enum, count int, ty Enum, offset unsafe.Pointer) {
	C.glDrawElements(mode.c(), C.GLsizei(count), ty.c(), offset)
}
Example #4
0
func DrawElementsByte(mode DrawMode, count int, indices []uint8) {
	C.glDrawElements(C.GLenum(mode), C.GLsizei(count), C.GLenum(C.GL_UNSIGNED_BYTE), unsafe.Pointer(&indices[0]))
}
Example #5
0
func DrawElementsShort(mode DrawMode, count int, indices []uint16) {
	C.glDrawElements(C.GLenum(mode), C.GLsizei(count), C.GLenum(C.GL_UNSIGNED_SHORT), unsafe.Pointer(&indices[0]))
}
Example #6
0
File: gl.go Project: james4k/gl
//void glDrawElements (GLenum mode, int count, GLenum type, const GLvoid *indices)
func DrawElements(mode GLenum, count int, typ GLenum, indices interface{}) {
	C.glDrawElements(C.GLenum(mode), C.GLsizei(count), C.GLenum(typ),
		ptr(indices))
}
Example #7
0
func DrawElements(mode uint, count int, type_ uint, indices Void) {
	C.glDrawElements(
		C.GLenum(mode), C.GLsizei(count),
		C.GLenum(type_), unsafe.Pointer(indices))
}
Example #8
0
File: gl.go Project: beoran/fungo
func DrawElements(mode, count, kind int, indices Pointer) {
	C.glDrawElements(C.GLenum(mode), C.GLsizei(count),
		C.GLenum(kind), unsafe.Pointer(indices))
}
Example #9
0
func DrawElements(mode Enum, count int, ty Enum, offset int) {
	C.glDrawElements(mode.c(), C.GLsizei(count), ty.c(), unsafe.Pointer(uintptr(offset)))
}