mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
gpu: make GPU an interface to prepare for second implementation
While here, merge BeginFrame and EndFrame; the split was done for performance reasons, yet never measured. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -18,7 +18,7 @@ type Window struct {
|
||||
size image.Point
|
||||
ctx context
|
||||
backend backend.Device
|
||||
gpu *gpu.GPU
|
||||
gpu gpu.GPU
|
||||
fboTex backend.Texture
|
||||
fbo backend.Framebuffer
|
||||
}
|
||||
@@ -109,9 +109,7 @@ func (w *Window) Release() {
|
||||
func (w *Window) Frame(frame *op.Ops) error {
|
||||
return contextDo(w.ctx, func() error {
|
||||
w.gpu.Collect(w.size, frame)
|
||||
w.gpu.BeginFrame()
|
||||
w.gpu.EndFrame()
|
||||
return nil
|
||||
return w.gpu.Frame()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user