mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
gpu/headless: rename "backend" to "dev"
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -16,12 +16,12 @@ import (
|
|||||||
|
|
||||||
// Window is a headless window.
|
// Window is a headless window.
|
||||||
type Window struct {
|
type Window struct {
|
||||||
size image.Point
|
size image.Point
|
||||||
ctx context
|
ctx context
|
||||||
backend driver.Device
|
dev driver.Device
|
||||||
gpu gpu.GPU
|
gpu gpu.GPU
|
||||||
fboTex driver.Texture
|
fboTex driver.Texture
|
||||||
fbo driver.Framebuffer
|
fbo driver.Framebuffer
|
||||||
}
|
}
|
||||||
|
|
||||||
type context interface {
|
type context interface {
|
||||||
@@ -72,7 +72,7 @@ func NewWindow(width, height int) (*Window, error) {
|
|||||||
w.fboTex = fboTex
|
w.fboTex = fboTex
|
||||||
w.fbo = fbo
|
w.fbo = fbo
|
||||||
w.gpu = gp
|
w.gpu = gp
|
||||||
w.backend = dev
|
w.dev = dev
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -109,7 +109,7 @@ func (w *Window) Release() {
|
|||||||
// operation list.
|
// operation list.
|
||||||
func (w *Window) Frame(frame *op.Ops) error {
|
func (w *Window) Frame(frame *op.Ops) error {
|
||||||
return contextDo(w.ctx, func() error {
|
return contextDo(w.ctx, func() error {
|
||||||
w.backend.BindFramebuffer(w.fbo)
|
w.dev.BindFramebuffer(w.fbo)
|
||||||
w.gpu.Clear(color.NRGBA{A: 0xff, R: 0xff, G: 0xff, B: 0xff})
|
w.gpu.Clear(color.NRGBA{A: 0xff, R: 0xff, G: 0xff, B: 0xff})
|
||||||
w.gpu.Collect(w.size, frame)
|
w.gpu.Collect(w.size, frame)
|
||||||
return w.gpu.Frame()
|
return w.gpu.Frame()
|
||||||
|
|||||||
Reference in New Issue
Block a user