gpu: expose the rendering implementation

The rendering implementation is needed for using Gio UI with external
window libraries such as GLFW. Expose it in the new package gpu.

Updates #26

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-07 21:16:03 +01:00
parent 34c6a2f735
commit 3b6646933d
25 changed files with 42 additions and 35 deletions
+5 -3
View File
@@ -2,8 +2,10 @@
package headless
import "gioui.org/app/internal/gl"
import "gioui.org/app/internal/gl/impl"
import (
"gioui.org/app/internal/glimpl"
"gioui.org/gpu/gl"
)
/*
#cgo CFLAGS: -DGL_SILENCE_DEPRECATION -Werror -Wno-deprecated-declarations -fmodules -fobjc-arc -x objective-c
@@ -21,7 +23,7 @@ type nsContext struct {
func newContext() (context, error) {
ctx := C.gio_headless_newContext()
return &nsContext{ctx: ctx, c: new(impl.Functions)}, nil
return &nsContext{ctx: ctx, c: new(glimpl.Functions)}, nil
}
func (c *nsContext) MakeCurrent() error {