Beispiel #1
0
func (buffer *vertexBuffer) unbind() {
	if buffer.is_bound {
		gl.BindBuffer(gl.ARRAY_BUFFER, gl.Buffer{})
	}
	buffer.is_bound = false
}
Beispiel #2
0
func (buffer *indexBuffer) unbind() {
	if buffer.is_bound {
		gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, gl.Buffer{Value: 0})
	}
	buffer.is_bound = false
}
Beispiel #3
0
func (buffer *vertexBuffer) bind() {
	gl.BindBuffer(gl.ARRAY_BUFFER, buffer.vbo)
	buffer.is_bound = true
}
Beispiel #4
0
func (buffer *indexBuffer) bind() {
	gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, buffer.ibo)
	buffer.is_bound = true
}