Пример #1
0
Файл: gla.go Проект: spate/gla
// ColorSlice uses glColorPointer 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 ColorSlice(dummy interface{}, dummy_index int) error {
	data, err := sliceAttrib(dummy, dummy_index)
	if err != nil {
		return err
	}

	C.glColorPointer(C.GLint(data.Elements), C.GLenum(data.Gltype), C.GLsizei(data.Stride), unsafe.Pointer(data.Offset))
	return nil
}
Пример #2
0
Файл: color.go Проект: Nvveen/gl
//void glColorPointer (int size, GLenum type, int stride, const GLvoid *pointer)
func ColorPointer(size int, typ GLenum, stride int, pointer interface{}) {
	C.glColorPointer(C.GLint(size), C.GLenum(typ), C.GLsizei(stride),
		ptr(pointer))
}