github egoist/mygo v0.5.4
MyGo 0.5.4

latest release: v0.5.5
9 hours ago

The rest of the ui/shader API: typed uniforms, Metal shaders compiled ahead of their first draw, and shaders that read the backdrop.

Shaders (ui/shader)

  • Typed uniforms. Look a variable up once with s.Uniform(name) and set it on s.NewValues() with Float, Vec2…Vec4, Int, Uint, Bool, Floats, Ints, Uints and Color. Pass them as Options.Values. Each setter checks the variable's type and size and panics on a mismatch, so a typo fails loudly. Drawing with Values allocates nothing. Options.Uniforms still works, and overrides the names it holds. (#385)
  • Colors in the window's gamut. A ui.Color uniform reaches the shader in sRGB. A wide color (ui.Oklch) reaches it in extended sRGB on wide-gamut windows. (#385)
  • Metal shaders compile ahead. On macOS a shader's Metal library and pipeline are now compiled on a goroutine as soon as Compile returns, as Windows already did (#381). A shader compiled at startup draws its first frame in about 10 ms instead of about 200 ms. (#386)
  • Backdrop. A shader can read what the window drew behind it with backdropAt(p) and backdropSample(p), and Options.BackdropBlur blurs it first, as Flutter's BackdropFilter does. This works in Draw and in element effects. It works on Metal, Direct3D, GL and the CPU renderer. (#387)

These three were stacked on #384 and had not reached main; #401 landed them.

Documents

  • A document now follows its file when another app saves it and renames it right away; before, it could be marked deleted. On Windows, documents open their files with FILE_SHARE_DELETE, as Notepad and VS Code do, so other apps can replace them while the app reads them. (#395)

Tests

  • Tests wait for what happens, never for a time: internal/wait replaces every per-test deadline (#391). The GUI tests' input hooks return once the app has handled the input, on macOS, Linux and Windows (#393). Both remove causes of CI's flaky tests.

Full Changelog: v0.5.3...v0.5.4

Don't miss a new mygo release

NewReleases is sending notifications on new releases.