Exemplo 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))
}
Exemplo 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)

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

}
Exemplo 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))
}
Exemplo 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))
}
Exemplo n.º 6
0
func BindAttribLocation(program, index uint, name string) {
	C.glBindAttribLocation(C.GLuint(program), C.GLuint(index), CString(name))
}