app/headless: remove OpenGL assumptions

To prepare package headless for multiple backends, refactor the common headless
driver to no longer assume an OpenGL context. Instead, introduce a headless
backend type and the OpenGL implementation, glBackend.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-15 18:59:27 +01:00
parent 94fdc26cb5
commit b34216c124
5 changed files with 82 additions and 40 deletions
+1 -1
View File
@@ -8,6 +8,6 @@ import (
"gioui.org/app/internal/egl"
)
func newContext() (context, error) {
func newGLContext() (glContext, error) {
return egl.NewContext(egl.EGL_DEFAULT_DISPLAY)
}