Skip to content

Brillo 3.0

Latest

Choose a tag to compare

@ad-si ad-si released this 03 Nov 19:09
· 3 commits to main since this release
49a18f2
  • Breaking: Add a Shader constructor to Picture for rendering custom GLSL fragment shaders on a quad (compiled lazily and cached by source text)
    • Add UniformValue and ShaderData types, a shader convenience function, and defaultShaderVertex
    • Add brillo-shader example with rounded rectangle and flame shaders
  • Breaking: Report mouse wheel and trackpad scrolling as EventScroll (offsetX, offsetY) modifiers position instead of EventKey (MouseButton WheelUp/WheelDown) Down …
    • Remove the WheelUp and WheelDown constructors of MouseButton
    • Fix scrolling in the GLFW backend: the vertical offset is now used instead of the horizontal one, offsets are no longer compared like absolute positions, and fractional trackpad offsets are no longer rounded
    • Viewport command bindings (CommandConfig) now take a CommandKey, which is either CKey key or CMouseWheel WheelUp/WheelDown/WheelLeft/WheelRight. Scroll directions can be bound to any instant command (zooming, panning, rotating, restoring), e.g. Shift + wheel to rotate, which is then applied proportionally to the scroll offset
    • Zoom towards the cursor when zooming the viewport by scrolling
    • Breaking: Make CBumpZoomIn and CBumpZoomOut do what their names say (they were swapped), so that scrolling up or pressing PageUp zooms in and scrolling down or pressing PageDown zooms out
  • Fix window creation always failing with Context profiles are only defined for OpenGL version 3.2 and above, as the OpenGL 2.1 context hint must not be combined with a profile hint
  • Retry with the driver's default context if an OpenGL 2.1 context can't be created
  • Fix crash on Windows GL drivers by requesting an OpenGL 2.1 compatibility context on non-Apple platforms, and log GL errors to stderr instead of crashing
  • Include GLFW's error message when window creation fails
  • Re-throw ExitCode from the GLFW main loop, so that exitSuccess / exitFailure in user code terminate the program with the intended status, and write other exceptions to stderr
  • Print GLFW errors to stderr instead of stdout
  • Keep the title bar of a window on screen, as the given position refers to the content area and a window at (0, 0) couldn't be moved by the user anymore
  • Add Brillo.Interface.IO.MessageBox to expose the bundled message box, notification popup, and beep functions
  • Add getDpiScale to Brillo.Interface.Environment, which reports the scale factor between window coordinates and logical UI units (e.g. 1.75 on a Windows display set to 175 %), so that apps can size themselves independently of the display
  • Rasterize TrueType text at the size it's drawn at, so that text nested in a scaled Picture stays crisp instead of being magnified from a smaller glyph atlas
  • Breaking: Support GPU-compressed textures (glCompressedTexImage2D):
    • Add PxCompressed variant of PixelFormat carrying a CompressedFormat (S3TC, RGTC, BPTC, …)
    • Add compressedBitmapOfForeignPtr, compressedBitmapOfByteString and their BitmapData-returning counterparts
    • Export named constants for the common compressed format enums (compressedRGBA_S3TC_DXT1, compressedRGBA_BPTC_UNORM, …)
  • Add Space Invaders example