Ebitengine 2.6 Release Notes
v2.6.0
Monitors
(#1835)
APIs for monitors were added. You can specify a monitor to show your window.
type MonitorType
func (*MonitorType) Name() string
func Monitor() *MonitorType
func SetMonitor(*MonitorType)
func AppendMonitors([]*MonitorType) []*MonitorType
Mouse cursor passthrough
(#2511)
APIs to enable mouse cursor passthrough were added. When passthrough is enabled, a window behind the Ebitengine window becomes responsive to clicks.
New mouse cursor shapes
(#2476)
New mouse cursor shapes were added. See examples/cursor
for an example.
CursorShapeNESWResize
CursorShapeNWSEResize
CursorShapeMove
CursorShapeNotAllowed
Pixel mode in Kage
(#1431)
The pixel mode was added to Kage. The following comments work as compiler directives:
//kage:unit texels
(The texel mode, default)//kage:unit pixels
(The pixel mode)
In the pixel mode, Kage shader will treat pixels for all the units. Also, the second argument of Fragment
will be in pixels, not texels. And, the following functions will treat pixels, not texels:
func imageSrcNAt(pos vec2) vec4
func imageSrcNUnsafeAt(pos vec2) vec4
func imageDstRegionOnTexture() (vec2, vec2)
func imageSrcRegionOnTexture() (vec2, vec2)
For backward compatibility, the default is the texel mode. For new Kage programs, it is strongly recommended to use the pixel mode.
Kage and source images of different sizes
(#1870)
You now can pass source images of different sizes when you use a Kage shader for rendering. This is available only when the shader is in the pixel mode and DrawTrianglesShader
is used.
New APIs for Kage
(#1870)
Now Kage can treat source images of different sizes, new APIs were added for Kage. The functions' returning values are in texels or in pixels, and this depends on the specified mode.
func imageDstOrigin() vec2
: returns the upper-left position of the destination texture.func imageDstSize() vec2
: returns the size of the destination texture.func imageSrcNOrigin() vec2
: returns the upper-left position of the Nth source texture.func imageSrcNSize() vec2
: returns the size of the Nth source texture.
DirectX 11 driver
(#2613)
A DirectX 11 driver was implemented. This is used as the default instead of the existing DirectX 12 driver. The DirectX 11 driver is relatively stable and resolved crashes due to the DirectX 12 driver (#2198). Also, this resolved somes issues, such as not being able to capture with OBS (#2148).
You can also use the DirectX 12 driver by specifying version=12
at the environment variable EBITENGINE_DIRECTX
.
Text input with IME (experimental)
(#1029)
An experimental package exp/textinput
to input texts with IME was added. This works only on macOS and browsers so far. As an example, you can see examples/textinput
. As this is still an experiment, APIs may change in the future.
Breaking changes
- The build tag
wayland
was removed (#2759). - OpenGL 3.2 or newer is now required when you use OpenGL on desktops.
- OpenGL ES 3 or newer is now required when you use OpenGL ES on desktops or mobiles.
- WebGL 2 is now required for browsers.
Bug fixes
This release includes all the bug fixes that were in version 2.5.
Deprecated API
The following APIs were deprecated:
2.5 and older | 2.6 and newer |
---|---|
ebiten.MaxIndicesCount | N/A |
(*audio.Player).Current | (*audio.Player).Position |
(*audio.Player).Seek | (*audio.Player).SetPosition |
text.BoundString | golang.org/x/image/font.BoundString , or golang.org/x/image/font.Metrics (Ascent and Descent ) and golang.org/x/image/font.MeasureString |
imageDstRegionOnTexture (Kage) | imageDstOrigin or imageDstSize |
imageDstTextureSize (Kage) | N/A. This should not be needed in the pixel mode. |
imageSrcRegionOnTexture (Kage) | imageSrc0Origin or imageSrc0Size |
imageSrcTextureSize (Kage) | N/A. This should not be needed in the pixel mode. |
Misc.
(*ColorScale).ScaleWithColorScale(ColorScale)
was added (#2687).- Keyboards are now supported for iOS (#1090).
- The type checks for Kage shaders became stricter (#2256, #2712).
- A build tag
ebitenginegldebug
was added. When this build tag is specified, all the called OpenGL functions are dumped as log (#2650).
v2.6.1
Bug Fixes
- Fixed an issue where crashes could occur when using multiple monitors on macOS (#2794).
- Fixed an issue where
ebiten.SetWindowIcon(nil)
did not reset the icon (#2796).
v2.6.2
Bug fixes
- Fixed an issue where the internal state of
ebiten.Image
created before callingebiten.RunGame
was not released by the GC (#2805).
v2.6.3
Bug Fixes
- Fix for the issue where using integer literals as arrays in the Kage shader causes errors in browsers (#2840).
- Correction of the file name format for screenshots obtained with the
EBITENGINE_SCREENSHOT_KEY
andEBITEN_INTERNAL_IMAGES_KEY
environment variables, which was incorrect (#2844). - Fix for the issue in the Kage shader where variables used as indexers were mistakenly considered as unused variables (#2848).
v2.6.4
Bug Fixes
- Fixed an issue where ebitenmobile did not work with the latest gomobile (#2887).
v2.6.5
Bug Fixes
- Fixed an issue where rendering did not work correctly on 32bit Windows using Go 1.22 and DirectX 12 (#2867).
- Fixed an issue where the CPU would become busy when using
SetVsyncEnabled(false)
andSetScreenClearedEveryFrame(false)
(#2890).
v2.6.6
Bug Fixes
- Fixed the issue where applications did not launch when built with Go 1.22 on Intel macOS (#2908).
v2.6.7
Bug Fixes
- Fixed the issue where trigger buttons on a gamepad were not functioning correctly on Android (#2598).