Ebitengine 2.4 Release Notes
v2.4.0
"Truly pure Go" for Windows
Ebitengine originally included GLFW DLL files and extracted them dynamically. This was problematic in terms of portability. For v2.4, we rewrote the GLFW part for Windows into pure Go, which means Ebitengine becomes truly pure Go for Windows. Now an Ebitengine application can be built for an Arm Windows native binary, but this is not tested yet. This fix is also a preparation for other Windows-like system like Xbox.
With this change, the build tag ebitenexternaldll was removed.
Unmanaged images
New APIs NewImageWithOptions and NewImageFromImageWithOptions were added. You can specify these options:
Unmanagedrepresents whether the image is unmanaged or not. The default (zero) value is false, that means the image is managed. An unmanaged image is never on an internal automatic texture atlas. A regular image is a part of an internal texture atlas, and locating them is done automatically in Ebitengine.Unmanagedis useful when you want finer controls over the image for performance and memory reasons.PreserveBoundsrepresents whether the new image's bounds are the same as the given image. The default (zero) value is false, that means the new image's upper-left position is adjusted to (0, 0).
Audio decoding without resampling
(#2055)
New audio APIs to decode without resampling were added. Implicit resampling by Decode was useful but problematic since it might unexpectedly be slow. DecodeWithoutResampling is more explicit in terms of execution cost.
Also, an API to resample the source explicitly was added:
Debug info
(#2177)
A new function ebiten.ReadDebugInfo and a new struct ebiten.DebugInfo were added. Now what you can get from these APIs is only the type of the current graphics library so far.
Other new APIs
ebiten.IsStandardGamepadAxisAvailable(#2040)ebiten.IsStandardGamepadButtonAvailable(#2040)(*ebiten.Image).ReadPixels(#1995)ebitenutil.DrawCircle(#2163)ebitenutil.NewImageFromFileSystem(this is available only with Go 1.16 or newer) (#1948)inpututil.AppendJustReleasedTouchIDs(#2057)inpututil.TouchPositionInPreviousTick(#2057)- An environment variable
EBITENGINE_OPENGL
Renaming APIs
These new API were added as aliases to existing APIs. The existing APIs are still available but deprecated.
ebiten.SetMaxTPS→ebiten.SetTPSebiten.MaxTPS→ebiten.TPSebiten.CurrentFPS→ebiten.ActualFPSebiten.CurrentTPS→ebiten.ActualTPS(*ebiten.Image).ReplacePixels→(*ebiten.Image).WritePixels
Also, environment variables and build tags were renamed. Old ones are still available but deprecated:
- An environment variable
EBITEN_SCREENSHOT_KEY→EBITENGINE_SCREENSHOT_KEY - An environment variable
EBITEN_INTERNALIMAGES_KEY→EBITENGINE_INTERNAL_IMAGES_KEY - An environment variable
EBITEN_GRAPHICS_LIBRARY→EBITENGINE_GRAPHICS_LIBRARY - An environment variable
EBITEN_DIRECTX→EBITENGINE_DIRECTX - A build tag
ebitendebug→ebitenginedebug - A build tag
ebitensinglethread→ebitenginesinglethread
Improving Kage (the shading language for Ebitengine)
Now NewShader checks types for builtin function arguments and operators more strictly (#2184, #2187).
Also, these new built-in functions were added:
discard(this is available only inFragmentfunction) (#1969)refract(this was documented but was not implemented) (#2255)
DirectX performance improvement
The DirectX driver now runs 2x-3x faster than the version 2.3.
Bug fixes
This release includes all the bug fixes in the version 2.3.
(*ebiten.Image).Setsometimes didn't work correctly (#2154, #2176, #2180).- An application might crash when trying to use gamepads on Firefox in a non-HTTPS context (#2100).
- Other small fixes
Breaking changes
- go2cpp is no longer supported (#2126).
- A build tag
ebitenwebgl1was removed. Instead, use an environment variableEBITENGINE_OPENGLwith the valuewebgl1.
v2.4.1
Bug fixes
- An application might crash due to memory leak on Windows (#2292, #2249).
- A window size was not restored correctly after exiting from fullscreen (#2295).
ebitenutil.NewImageFromReaderwas not available on mobiles (#2301).
v2.4.2
Bug fixes
- Checking arguments for the built-in function
powfor Kage was not correct (#2304). - Vendoring Ebitengine by
go mod vendordidn't work (#2306). - An application under the Snap sandbox might crash with a gamepad (#2307).
v2.4.3
Bug fixes
- A wireless Xbox controller didn't work correctly on macOS (#266).
- An application crashed when plugging out a headset on Windows (#2314).
- Audio output was not switched when replugging in a headset on Windows (#2317).
v2.4.4
Bug fixes
- Some gamepad mappings didn't work correctly (#2334).
- An application could deadlock on browsers (#2339).
v2.4.5
Bug fixes
- An application crashed when
DrawImagewas called and thenWritePixelsfor a partial region was called on Android (#2346).
v2.4.6
Bug fixes
- A rendered image unexpectedly disappeared under certain conditions when switching applications on Android (#2354).
(*ebiten.Image).Seton the screen without any other draw commands didn't work correctly (#2362).
v2.4.7
Bug fixes
- Launching an Ebitengine application might fail due to an access-denied error on Windows (#2366).
v2.4.8
Bug fixes
- Creating an unmanged image in a different goroutine might result in glitches (#2390).
v2.4.9
Bug fixes
ebiten.SetVsyncEnabledcaused a hang for iOS (#2407).- Updated an indirect dependency
golang.org/x/text/languagethat had an security issue (GO-2022-1059) (#2411).
v2.4.10
Bug fixes
- An Engtengine application crashed by
WritePixelsfor an already disposed image (#2423).
v2.4.11
Bug fixes
- Calling
(*Image).Setand getting a color byAton a sub-image resulted in an unexpected color (#2428).
v2.4.12
Bug fixes
- Fullscreening didn't work correctly on macOS 13 (#2437).
v2.4.13
Bug fixes
- An Ebitengine application crashed with some old graphics card on Windows (#2447).
- An inefficient software graphics renderer might unexpectedly be used on Windows (#2459).
v2.4.14
Bug fixes
- An Ebitengine application crashed due to the fix for #2447 on Windows (#2466, #2486).
- An Ebitengine application crashed when a file was dropped onto a window on Windows (#2480).
ebiten.Wheelmight miss some values when scrolling a wheel too quickly (#2487).
v2.4.15
Bug fixes
- FPS was unstable in fullscreen on macOS 13 (#2495).
v2.4.16
Bug fixes
FillandSetfor a screen in this order might not update the screen correctly (#2542).
v2.4.17
Bug fixes
- Image functions called before
ebiten.RunGamewere not concurrent-safe (#2580).
v2.4.18
Bug fixes
- An Ebitengine application could crash due to a bug in the texture packing (#2584).