mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
gpu/backend: move backend interface types to a separate package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -17,7 +17,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"gioui.org/app/internal/glimpl"
|
||||
"gioui.org/gpu"
|
||||
"gioui.org/gpu/backend"
|
||||
"gioui.org/gpu/gl"
|
||||
)
|
||||
|
||||
@@ -51,7 +51,7 @@ func newContext(w *window) (*context, error) {
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func (c *context) Backend() (gpu.Backend, error) {
|
||||
func (c *context) Backend() (backend.Device, error) {
|
||||
return gl.NewBackend(c.c)
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"gioui.org/app/internal/glimpl"
|
||||
"gioui.org/app/internal/srgb"
|
||||
"gioui.org/gpu"
|
||||
"gioui.org/gpu/backend"
|
||||
"gioui.org/gpu/gl"
|
||||
)
|
||||
|
||||
@@ -47,7 +47,7 @@ func newContext(w *window) (*context, error) {
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func (c *context) Backend() (gpu.Backend, error) {
|
||||
func (c *context) Backend() (backend.Device, error) {
|
||||
return gl.NewBackend(c.f)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ package window
|
||||
|
||||
import (
|
||||
"gioui.org/app/internal/glimpl"
|
||||
"gioui.org/gpu"
|
||||
"gioui.org/gpu/backend"
|
||||
"gioui.org/gpu/gl"
|
||||
)
|
||||
|
||||
@@ -42,7 +42,7 @@ func newContext(w *window) (*context, error) {
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func (c *context) Backend() (gpu.Backend, error) {
|
||||
func (c *context) Backend() (backend.Device, error) {
|
||||
return gl.NewBackend(c.c)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"gioui.org/gpu"
|
||||
"gioui.org/gpu/backend"
|
||||
"gioui.org/io/event"
|
||||
"gioui.org/io/system"
|
||||
"gioui.org/unit"
|
||||
@@ -32,7 +32,7 @@ type Callbacks interface {
|
||||
}
|
||||
|
||||
type Context interface {
|
||||
Backend() (gpu.Backend, error)
|
||||
Backend() (backend.Device, error)
|
||||
Present() error
|
||||
MakeCurrent() error
|
||||
Release()
|
||||
|
||||
Reference in New Issue
Block a user