internal/graphicsdriver/opengl: update comments

This commit is contained in:
Hajime Hoshi 2023-03-20 01:42:28 +09:00
parent 6a9972b085
commit 8ae6ea5ff6
2 changed files with 1 additions and 7 deletions

View File

@ -155,9 +155,7 @@ func (g *Graphics) Reset() error {
} }
func (g *Graphics) SetVertices(vertices []float32, indices []uint16) error { func (g *Graphics) SetVertices(vertices []float32, indices []uint16) error {
// Note that the vertices passed to BufferSubData is not under GC management // Note that the vertices and the indices passed to BufferSubData is not under GC management in the gl package.
// in opengl package due to unsafe-way.
// See BufferSubData in context_mobile.go.
g.context.arrayBufferSubData(vertices) g.context.arrayBufferSubData(vertices)
g.context.elementArrayBufferSubData(indices) g.context.elementArrayBufferSubData(indices)
return nil return nil

View File

@ -152,10 +152,6 @@ func (s *openGLState) reset(context *context) error {
} }
s.arrayBuffer = theArrayBufferLayout.newArrayBuffer(context) s.arrayBuffer = theArrayBufferLayout.newArrayBuffer(context)
// Note that the indices passed to NewElementArrayBuffer is not under GC management
// in opengl package due to unsafe-way.
// See NewElementArrayBuffer in context_mobile.go.
s.elementArrayBuffer = context.newElementArrayBuffer(graphics.IndicesCount * 2) s.elementArrayBuffer = context.newElementArrayBuffer(graphics.IndicesCount * 2)
return nil return nil