diff --git a/app/internal/wm/gl_ios.go b/app/internal/wm/gl_ios.go index aacd588b..811bd8af 100644 --- a/app/internal/wm/gl_ios.go +++ b/app/internal/wm/gl_ios.go @@ -46,19 +46,28 @@ func newContext(w *window) (*context, error) { if ctx == 0 { return nil, fmt.Errorf("failed to create EAGLContext") } + api := contextAPI() + f, err := gl.NewFunctions(api.Context) + if err != nil { + return nil, err + } c := &context{ ctx: ctx, owner: w, layer: C.CFTypeRef(w.contextLayer()), - c: new(gl.Functions), + c: f, } return c, nil } -func (c *context) API() gpu.API { +func contextAPI() gpu.OpenGL { return gpu.OpenGL{} } +func (c *context) API() gpu.API { + return contextAPI() +} + func (c *context) Release() { if c.ctx == 0 { return