mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
app/internal/srgb: move sRGB emulation to new internal package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -7,14 +7,14 @@ import (
|
||||
"syscall/js"
|
||||
|
||||
"gioui.org/app/internal/glimpl"
|
||||
"gioui.org/gpu/gl"
|
||||
"gioui.org/app/internal/srgb"
|
||||
)
|
||||
|
||||
type context struct {
|
||||
ctx js.Value
|
||||
cnv js.Value
|
||||
f gl.Functions
|
||||
srgbFBO *gl.SRGBFBO
|
||||
f *glimpl.Functions
|
||||
srgbFBO *srgb.SRGBFBO
|
||||
}
|
||||
|
||||
func newContext(w *window) (*context, error) {
|
||||
@@ -45,7 +45,7 @@ func newContext(w *window) (*context, error) {
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func (c *context) Functions() gl.Functions {
|
||||
func (c *context) Functions() *glimpl.Functions {
|
||||
return c.f
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ func (c *context) Unlock() {}
|
||||
func (c *context) MakeCurrent() error {
|
||||
if c.srgbFBO == nil {
|
||||
var err error
|
||||
c.srgbFBO, err = gl.NewSRGBFBO(c.f)
|
||||
c.srgbFBO, err = srgb.NewSRGBFBO(c.f)
|
||||
if err != nil {
|
||||
c.Release()
|
||||
c.srgbFBO = nil
|
||||
|
||||
Reference in New Issue
Block a user