Esempio n. 1
0
func (program *Program) BindAttribLocation(attrib VertexAttrib, name string) {

	cstr := C.CString(name)
	defer C.free(unsafe.Pointer(cstr))

	C.glBindAttribLocation(program.id, attrib.Index(), (*C.GLchar)(cstr))
}
Esempio n. 2
0
func (program Program) BindAttribLocation(index AttribLocation, name string) {

	cname := glString(name)
	defer freeString(cname)

	C.glBindAttribLocation(C.GLuint(program), C.GLuint(index), cname)

}
Esempio n. 3
0
func BindAttribLocation(
	program uint32, index uint32, name string) {
	s := glString(name)
	C.glBindAttribLocation(
		C.GLuint(program),
		C.GLuint(index),
		s)

}
Esempio n. 4
0
func BindAttribLocation(p Program, a Attrib, name string) {
	defer func() {
		errstr := errDrain()
		log.Printf("gl.BindAttribLocation(%v, %v, %v) %v", p, a, name, errstr)
	}()
	str := unsafe.Pointer(C.CString(name))
	defer C.free(str)
	C.glBindAttribLocation(p.c(), a.c(), (*C.GLchar)(str))
}
Esempio n. 5
0
func BindAttribLocation(p Program, a Attrib, name string) {
	str := unsafe.Pointer(C.CString(name))
	defer C.free(str)
	C.glBindAttribLocation(p.c(), a.c(), (*C.GLchar)(str))
}
Esempio n. 6
0
func BindAttribLocation(program, index uint, name string) {
	C.glBindAttribLocation(C.GLuint(program), C.GLuint(index), CString(name))
}