예제 #1
0
파일: gla.go 프로젝트: spate/gla
// TexCoordSlice uses glVertexPointer to bind an element of the currently
// bound buffer at the given index. See VertexAttribSlice for more details.
//
// Precondition: VBO bound to ARRAY_BUFFER target containing data of array type dummy
func TexCoordSlice(dummy interface{}, dummy_index int) error {
	data, err := sliceAttrib(dummy, dummy_index)
	if err != nil {
		return err
	}

	C.glTexCoordPointer(C.GLint(data.Elements), C.GLenum(data.Gltype), C.GLsizei(data.Stride), unsafe.Pointer(data.Offset))
	return nil
}
예제 #2
0
파일: texture.go 프로젝트: Nvveen/gl
//void glTexCoordPointer (int size, GLenum type, int stride, const GLvoid *pointer)
func TexCoordPointer(size int, typ GLenum, stride int, pointer interface{}) {
	C.glTexCoordPointer(C.GLint(size), C.GLenum(typ), C.GLsizei(stride),
		ptr(pointer))
}