Ebiten 2.1 Release Notes

v2.1.0

Issues for v2.1.0

New features

Functions

These functions were added (#770, #995, #1385, #1561):

See the new example examples/cursor for the cursors.

Functions (audio)

These functions were added (#1460):

Functions (text)

text.CacheGlyphs was added (#1413).

text.CacheGlyphs precaches the glyphs for the given text and the given font face into the cache.

The cache is shared with text.Draw. Glyphs are cached in a LRU way. As the cache's capacity has limit, it is not guaranteed that all the glyphs for runes given at CacheGlyphs are cached.

Draw automatically creates and caches necessary glyphs, so usually you don't have to call CacheGlyphs explicitly. However, for example, when you call Draw for each rune of one big text, Draw tries to create the glyph cache and render it for each rune. This is very inefficient because creating a glyph image and rendering it are different operations ((*ebiten.Image).ReplacePixels and (*ebiten.Image).DrawImage) and can never be merged as one draw call. CacheGlyphs creates necessary glyphs without rendering them so that these operations are likely merged into one draw call regardless of the size of the text. The two functions are implemented like this:

Constants

For system cursors, a new type CursorShapeType and these constants were added (#995):

These key constants were added (#1382, #1561):

As the key name convention has changed, these key constants were added to replace some of the existing keys (#1394). The key constants to be replaced are kept for compatibility:

Build tag

A new build tag ebitensinglethread was added (#1367). If this is enabled, the number of the internal threads becomes one and you can expect performance improvement. As a side effect, all Ebiten's concurrent-safe functions become concurrent-unsafe.

Others

Backward compatibility

Bug fix

This release includes all the bug fixes in v2.0.x.

Performance improvement

v2.1.1

Issues for v2.1.1

Bug fix

v2.1.2

Issues for v2.1.2

Bug fix

v2.1.3

Issues for v2.1.3

Bug fix

v2.1.4

Issues for v2.1.4

Bug fix

v2.1.5

Issues for v2.1.5

Bug fix

v2.1.6

Issues for v2.1.6

Bug fix

v2.1.7

Issues for v2.1.7

Bug fix