Skip to content

Commit

Permalink
Log GL errors if they occur after each frame
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Dec 24, 2019
1 parent 7af37bc commit 11fcb2e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/driver/gomobile/driver.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package gomobile

import (
"fmt"
"runtime"
"strconv"
"time"
Expand Down Expand Up @@ -139,6 +140,11 @@ func (d *mobileDriver) Run() {
if d.freeDirtyTextures(canvas) {
d.paintWindow(current, currentSize)
a.Publish()

err := d.glctx.GetError()
if err != 0 {
fyne.LogError(fmt.Sprintf("OpenGL Error: %d", err), nil)
}
}

time.Sleep(time.Millisecond * 10)
Expand Down

0 comments on commit 11fcb2e

Please sign in to comment.