-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't free a shared buffer unless on iOS (strange but seems to be true)
- Loading branch information
1 parent
399d26b
commit 068243f
Showing
3 changed files
with
19 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// +build ios | ||
|
||
package gl | ||
|
||
import "golang.org/x/mobile/gl" | ||
|
||
func (p *glPainter) glFreeBuffer(vbo Buffer) { | ||
ctx := p.glctx() | ||
|
||
ctx.BindBuffer(gl.ARRAY_BUFFER, gl.Buffer(vbo)) | ||
ctx.DeleteBuffer(gl.Buffer(vbo)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build !ios | ||
|
||
package gl | ||
|
||
func (p *glPainter) glFreeBuffer(_ Buffer) { | ||
// we don't free a shared buffer! | ||
} |