func (emitter *particleEmitter) Buffer() { data := emitter.Bytes() if len(data) > 0 { gl.BindBuffer(gl.ARRAY_BUFFER, emitter.VBO) gl.BufferSubData(gl.ARRAY_BUFFER, 0, data) } }
func (shape *DynamicShape) Buffer(offset int) { gl.BindBuffer(gl.ARRAY_BUFFER, shape.VBO) data := shape.BytesOffset(offset) if len(data) == 0 { return } gl.BufferSubData(gl.ARRAY_BUFFER, offset*shape.Stride(), data) }
func (shape *Line) Buffer(offset int) { data := shape.BytesOffset(offset) if len(data) == 0 { return } gl.BindBuffer(gl.ARRAY_BUFFER, shape.VBO) gl.BufferSubData(gl.ARRAY_BUFFER, lineEmittedVertices*offset*shape.Stride(), data) }