ui/app/internal/gpu: introduce caps and context

Enables graceful fallback to OpenGL ES 2 and WebGL.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-05-04 11:45:28 +02:00
parent 8df5feeeea
commit d118bd5a88
4 changed files with 130 additions and 102 deletions
+3 -3
View File
@@ -9,13 +9,13 @@ import (
)
type timers struct {
ctx *gl.Functions
ctx *context
timers []*timer
}
type timer struct {
Elapsed time.Duration
ctx *gl.Functions
ctx *context
obj gl.Query
state timerState
}
@@ -28,7 +28,7 @@ const (
timerWaiting
)
func newTimers(ctx *gl.Functions, exts string) *timers {
func newTimers(ctx *context) *timers {
return &timers{
ctx: ctx,
}