gpu/internal/opengl: support sRGB emulation for desktop OpenGL

Desktop OpenGL implements a GL_FRAMEBUFFER_SRGB setting; query that instead
of the frambuffer color encoding.

With this change it is no longer necessary to enable FRAMEBUFFER_SRGB
in the macOS setup; remove it.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-05-17 09:50:49 +02:00
parent b622412ac6
commit 03ee75fd72
6 changed files with 47 additions and 19 deletions
+3
View File
@@ -276,6 +276,9 @@ func (f *Functions) InvalidateFramebuffer(target, attachment Enum) {
f.Ctx.Call("invalidateFramebuffer", int(target), f.int32Buf)
}
}
func (f *Functions) IsEnabled(cap Enum) bool {
return f.Ctx.Call("isEnabled", int(cap)).Truthy()
}
func (f *Functions) LinkProgram(p Program) {
f.Ctx.Call("linkProgram", js.Value(p))
}