Commit Graph

6166 Commits

Author SHA1 Message Date
Hajime Hoshi
aaff18ecf7 graphicsdriver/metal/mtl: Bug fix: Guard the handler map by a mutex
The handler is invoked in another thread than the main thread.
2020-11-08 04:40:13 +09:00
Hajime Hoshi
170ddd70a5 ebiten: Add comments 2020-11-08 04:12:48 +09:00
Hajime Hoshi
c7330883ef restorable: Remove Fill and make (*ebiten.Image).Fill available for sub-images
Now a scissor (a clipping region) can be specified, we don't have to
worry about the rendering results out of the specified region.
Replace the implmenetation of the Fill with just a DrawTriangles with
an empty white image.

As a side effect, SubImage is avilable for Fill.

Fixes #1416
2020-11-08 02:50:06 +09:00
Hajime Hoshi
ed028110cf ebiten: Allow rendering on a sub-image by scissor test
Fixes #1255
2020-11-08 00:58:44 +09:00
Hajime Hoshi
e4e8e7254e graphicsdriver/metal/mtl: Refactoring: Specify struct member names explicitly 2020-11-07 23:46:07 +09:00
Hajime Hoshi
a8f96ee9af graphicsdriver/metal: Add Sync to sync CPU and GPU asynchronously
Fixes #1414
2020-11-07 04:09:47 +09:00
Hajime Hoshi
6e3cbe2e33 graphicsdriver/metal/mtl: Refactoring 2020-11-07 03:26:35 +09:00
Hajime Hoshi
e0133cbe32 Update Oto to v0.6.7 2020-11-07 01:19:39 +09:00
Hajime Hoshi
e30d46e947 shareable: Reset non-updated-count at ReplacePixels
Before this change, ReplacePixels didn't affect the non-updated-count,
and an image using ReplacePixels tended to be on a shared image.
This was OK, but as lazy pixel loading is going to be introduced,
ReplacePixels also needs to reset the count.

Updates #1414
2020-11-06 02:19:02 +09:00
Hajime Hoshi
34d7385e6d shareable: Refactoring 2020-11-06 01:45:08 +09:00
Hajime Hoshi
a3bccf5ff7 shareable: Refactoring 2020-11-06 00:48:32 +09:00
Hajime Hoshi
61a8f2c69c examples/rotate: Update the resolution 2020-11-05 00:37:24 +09:00
Hajime Hoshi
552fbb7ed9 examples/contextlost: Enable to build on non-JS environments 2020-11-05 00:36:07 +09:00
Hajime Hoshi
48b46345d7 restorable: Refactoring 2020-11-04 02:03:47 +09:00
Hajime Hoshi
8da5ad2c4f graphicsdriver/metal: Misspelling 2020-11-03 23:44:40 +09:00
Hajime Hoshi
cd779b678a text: Add comments 2020-11-03 20:35:55 +09:00
Hajime Hoshi
c70ebdc697 text: Misspelling 2020-11-03 19:54:51 +09:00
Hajime Hoshi
2d9e2a0483 text: Add CacheGlyphs
Fixes #1413
2020-11-03 17:12:51 +09:00
Hajime Hoshi
ec6821b1e1 text: Refactoring 2020-11-03 16:36:10 +09:00
Hajime Hoshi
5ec05ed79d text: Cleaning up the cache after the rendering finishes
Before this fix, cleaning up the cache happens during making glyph
images, and this can be problematic when the text includes more
glyphs than the cache limit.

After this fix, Draw allows to have more glyph cache than the limit
temporarily.
2020-11-03 15:58:35 +09:00
Hajime Hoshi
9d4b0f3bad Update bitmapfont to v2.1.1 2020-11-03 14:07:14 +09:00
Hajime Hoshi
f3dddaf324 buffered: Better comment 2020-11-03 02:30:00 +09:00
Hajime Hoshi
b9907c03fa glfw: Create a DLL file atomically by renaming the file
Fixes #1393
2020-11-02 22:55:08 +09:00
Hajime Hoshi
3276c57976 jsutil: Rename files 2020-11-01 18:06:43 +09:00
Hajime Hoshi
c4fa29fb22 jsutil: Remove unused files for Go 1.12 2020-11-01 17:56:29 +09:00
Hajime Hoshi
5b8370298a glfw: Use os.UserConfigDir for GLFW DLL instead of temporary directories
As of this change, Ebiten requries Go 1.13 due to os.UserConfigDir.

Fixes #1393
2020-11-01 17:51:44 +09:00
Hajime Hoshi
335c11960a Update Oto for the potential crash fix on macOS 2020-10-31 23:58:45 +09:00
Hajime Hoshi
831c7ca6f4 restorable: Refactoring: Use the smaller empty image 2020-10-31 03:06:44 +09:00
Hajime Hoshi
9464dc2f58 ebiten: Refactoring: canSkipMipmap 2020-10-31 02:59:48 +09:00
Hajime Hoshi
fa53160e18 mipmap: Stop using negative mipmaps
Negative mipmaps tend to allocate extremely big images.

Instead, encourage to use images with explicit padding when enlarging
the image.

Fixes #1400
2020-10-31 02:52:40 +09:00
Hajime Hoshi
19d6f8d20a examples: Update resolutions
Fixes #1408
2020-10-31 02:06:45 +09:00
Hajime Hoshi
fd41042dcb examples/airship: Update the resolution
Updates #1408
2020-10-31 01:56:58 +09:00
Hajime Hoshi
61bf10e73e uidriver/glfw: Bug fix: Do not iconify the fullscreen window automatically
Fixes #1405
2020-10-27 03:14:55 +09:00
Hajime Hoshi
2259378430 ebiten: Panic immediately when zero size is given to NewImage(FromImage) 2020-10-23 00:42:57 +09:00
Hajime Hoshi
d6eac8c5bf ebiten: Better test name
Updates #1399
2020-10-21 11:33:08 +09:00
Hajime Hoshi
e7d080ca4a mipmap: Bug fix: Too big scale tried to allocate too big images
Fixes #1399
2020-10-21 11:28:05 +09:00
Hajime Hoshi
a3cb78558b mipmap: Bug fix: Scale could be Inf/0 and caused a forever loop
Fixes #1398
2020-10-21 10:55:36 +09:00
Hajime Hoshi
aaa675bc2a ebiten: Make the comment more precise 2020-10-21 03:32:58 +09:00
Hajime Hoshi
eedb947471 Update comments 2020-10-21 03:17:40 +09:00
Jake Coffman
290f05060a
ebiten: Add ebitensinglethread build tag (#1396)
Updates #1367
2020-10-21 02:55:17 +09:00
Hajime Hoshi
a76de7c251 Update Oto to v0.6.6 2020-10-19 04:05:05 +09:00
Hajime Hoshi
f611b48c71 graphicsdriver/opengl: Use native GLES functions for mobiles
After this change, GL functions for mobiles, especially Android, are
native ones instead of golang.org/x/mobile/gl functions in order to
reduce goroutine context switches.

On gomobile-build, golang.org/x/mobile/gl functions are still used.

Fixes #1387
2020-10-19 03:51:20 +09:00
Hajime Hoshi
2740938460 graphicsdriver/opengl: Fix the error message again 2020-10-18 22:55:37 +09:00
Hajime Hoshi
b755a1f970 graphicsdriver/opengl: Fix the error message 2020-10-18 22:12:39 +09:00
Hajime Hoshi
cac4b43ddd graphicsdriver/opengl/gles: Add copyright comments 2020-10-18 18:18:08 +09:00
Hajime Hoshi
55af18a178 graphicsdriver/opengl: Use a new package gles
Updates #1387
2020-10-18 18:16:11 +09:00
Hajime Hoshi
a781391752 ebiten: Add an explicit type to CursorModeType consts for pkg.go.dev 2020-10-18 03:55:58 +09:00
Hajime Hoshi
2b7362a66b ebiten: Fix comments 2020-10-18 01:29:35 +09:00
Hajime Hoshi
185e367295 shader: Implement cap function
Fixes #1361
2020-10-17 23:36:09 +09:00
Hajime Hoshi
75158feccf examples/shader: Add build tags for the generated files 2020-10-17 22:38:45 +09:00