clarify doc

This commit is contained in:
faiface 2016-11-24 14:46:12 +01:00
parent ecce5fdcc9
commit 58e2d01435
1 changed files with 2 additions and 0 deletions

View File

@ -183,6 +183,8 @@ func (va *VertexArray) Draw() {
// UpdateData overwrites the current vertex array data starting at the index offset. // UpdateData overwrites the current vertex array data starting at the index offset.
// //
// Offset is not a number of bytes, instead, it's an index in the array. // Offset is not a number of bytes, instead, it's an index in the array.
//
// If offset is negative or offset+len(data)>len(originaldata) the program panics.
func (va *VertexArray) UpdateData(offset int, data []float64) { func (va *VertexArray) UpdateData(offset int, data []float64) {
DoNoBlock(func() { DoNoBlock(func() {
gl.BindBuffer(gl.ARRAY_BUFFER, va.vbo) gl.BindBuffer(gl.ARRAY_BUFFER, va.vbo)