app,app/internal/gpu: split render loop from GPU

The policy of rendering on a separate goroutine is separate from
the actual rendering. Reflect that by introducing the RenderLoop
type for driving a GPU from a separate goroutine.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-29 19:42:29 +01:00
parent 8cec7d1a40
commit 5fa3dbc70d
4 changed files with 255 additions and 205 deletions
+2 -2
View File
@@ -32,9 +32,9 @@ type textureTriple struct {
typ gl.Enum
}
func newContext(glctx gl.Context) (*context, error) {
func newContext(glctx *gl.Functions) (*context, error) {
ctx := &context{
Functions: glctx.Functions(),
Functions: glctx,
}
exts := strings.Split(ctx.GetString(gl.EXTENSIONS), " ")
glVer := ctx.GetString(gl.VERSION)