mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/graphicsdriver/opengl: update comments
This commit is contained in:
parent
6a9972b085
commit
8ae6ea5ff6
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user