Commit Graph

4488 Commits

Author SHA1 Message Date
Hajime Hoshi
8e9f5b9535 driver: Remove Suspend/ResumeAudio from UIContext 2019-12-08 16:17:02 +09:00
Hajime Hoshi
63fbffa9f6 uidriver/glfw: Fix thread issues at reqWidth/reqHeight 2019-12-08 02:44:14 +09:00
Hajime Hoshi
22e3db6814 uidriver/glfw: Add comments
Updates #1004
2019-12-08 02:04:04 +09:00
Hajime Hoshi
80fbc9701c uidriver/glfw: Force to swap buffer or recreate an window after toggling fullscreen
This change resolves a bug that an image lag remains after
toggling fullscreen.

On OpenGL, swapping buffer is necessary after toggling fullscreen.

On Metal, recreating a window works after toggling fullscreen.

Fixes #1004
2019-12-08 01:47:32 +09:00
Hajime Hoshi
2180613e2a uidriver/glfw: Refactoring: Add createWindow 2019-12-07 19:56:56 +09:00
Hajime Hoshi
0e33e3e6fc
Add FUNDING.yml 2019-12-07 19:00:46 +09:00
Hajime Hoshi
67ee0ff5d4 uidriver/glfw: Refactoring: Remove forceSetScreenSize 2019-12-07 17:35:57 +09:00
Hajime Hoshi
c9bc5913fd driver: Refactoring: Remove Graphics.Flush
Updates #226
2019-12-06 08:56:55 +09:00
Hajime Hoshi
7991ba4cfa graphicsdriver/metal: Bug fix: Failed to compile for iOS
The definition of BOOL is different between macOS and iOS. C's
bool is used on iOS, but C's bool is hard to use from Go (e.g.,
an integer cannot be converted to C's bool). Use unsigned char
instead.

Fixes #1006
2019-12-03 01:03:44 +09:00
Hajime Hoshi
42056c2d61 restorable: Refactoring: Remove Clear
Fill now fills the whole texture.
2019-12-02 03:03:07 +09:00
Hajime Hoshi
b35ffa57b3 Revert "uidriver/glfw: Remove the dirty hack for GLFW 3.2"
This reverts commit d1da5b4920.

Reason: The dirty hack might still be needed.
2019-12-02 01:06:55 +09:00
Hajime Hoshi
d1da5b4920 uidriver/glfw: Remove the dirty hack for GLFW 3.2
See also https://github.com/glfw/glfw/issues/1334.

Updates #703
2019-12-02 01:04:28 +09:00
Hajime Hoshi
5153713469 uidriver/glfw: Make the panic messages more consistent 2019-12-01 03:34:09 +09:00
Hajime Hoshi
0ec447e0d0 ui: Add SetScreenTransparent / IsScreenTransparent
Fixes #1001
2019-12-01 03:31:32 +09:00
Hajime Hoshi
b8a099e354 ui: Bug fix: (Set)WindowPosition didn't work well with fullscreen mode 2019-12-01 00:39:04 +09:00
Hajime Hoshi
6cd0b44baa uidriver/glfw: Use invalidPos instead of pointers 2019-12-01 00:21:11 +09:00
Hajime Hoshi
e463f9e611 ui: Make (Set)WindowPosition concurrent safe 2019-12-01 00:11:46 +09:00
Hajime Hoshi
d78b4d7ffd examples/windowsize: Add messages about moving the window 2019-11-30 23:59:45 +09:00
Hajime Hoshi
9b2f864fc8 ui: Add SetWindowPosition(x, y int)
Fixes #936
2019-11-30 23:22:39 +09:00
Hajime Hoshi
c021d6be6a ui: Add WindowPosition()
Fixes #936
2019-11-30 22:37:56 +09:00
Hajime Hoshi
5ecd010f5a ui: Add window.go 2019-11-27 00:29:30 +09:00
Hajime Hoshi
e0d780b029 uidriver/glfw: Enable to call SetWindowDecorated after Run
Fixes #556
2019-11-26 11:46:18 +09:00
Hajime Hoshi
995ba3afcf glfw: Update GLFW 3.3 2019-11-26 11:21:07 +09:00
Hajime Hoshi
a040aae83b glfw: Update to GLFW 3.3
Fixes #1000
2019-11-26 01:19:20 +09:00
Hajime Hoshi
5f33d47711 png: Add stdlibfuzz.go 2019-11-26 00:13:50 +09:00
Hajime Hoshi
f6390abad7 png: Update for Go 1.13 2019-11-25 22:24:33 +09:00
Hajime Hoshi
f028610006 Update GLFW repository version 2019-11-25 22:23:55 +09:00
Hajime Hoshi
69c781a03d ui: Refactoring 2019-11-25 02:26:12 +09:00
Hajime Hoshi
b5d8be96a6 mobile: Move Game definition to package ebiten
Updates #943
2019-11-25 00:49:13 +09:00
Hajime Hoshi
8f08565488 mobile/ebitenmobileview: Use uidriver.mobile's functions
This is a preparation to deprecate SetScreenSize and
SetScreenScale.
2019-11-24 23:52:41 +09:00
Hajime Hoshi
a449045ae2 ebitenutil: Cache sub images for debug print 2019-11-24 20:30:54 +09:00
Hajime Hoshi
21ba42325c graphicsdriver/opengl: Use smaller PBOs 2019-11-24 18:32:35 +09:00
Hajime Hoshi
78e912e30b graphicsdriver/opengl: Fix comments 2019-11-24 18:11:45 +09:00
Hajime Hoshi
3d3a1be1c4 graphicsdriver/opengl: Use glTexSubImage2D instead of glTexImage2D 2019-11-24 18:07:21 +09:00
Hajime Hoshi
9f483ddc60 graphicsdriver/opengl: Adopt WRITE_ONLY for PBOs
It looks like it is safe to use WRITE_ONLY:
https://stackoverflow.com/questions/30248594/write-only-glmapbuffer-what-if-i-dont-write-it-all
2019-11-24 17:42:28 +09:00
Hajime Hoshi
4c4f67197f graphicsdriver/opengl/gl: Bug fix: compile error on non-Windows (again) 2019-11-24 03:05:14 +09:00
Hajime Hoshi
ac6a3f0900 graphicsdriver/opengl/gl: Bug fix: compile error on non-Windows 2019-11-24 02:02:40 +09:00
Hajime Hoshi
0ef8009c11 graphicsdriver/opengl: Use uintptr whenever possible instead of unsafe.Pointer 2019-11-20 02:00:02 +09:00
Hajime Hoshi
4296c11256 graphicsdriver/opengl: Refactoring 2019-11-24 00:08:38 +09:00
Hajime Hoshi
3df198f68e graphicsdriver/opengl: Use GL_READ_WRITE at glMapBuffer
Updates #993
2019-11-22 00:27:20 +09:00
Hajime Hoshi
65fdf48cbf graphicsdriver: Refactoring: ReplacePixels takes multiple arguments
This reduces the number of graphics commands, and this works more
efficiently if the driver has an efficient way.
2019-11-21 23:52:12 +09:00
Hajime Hoshi
161771cc99 graphicsdriver/opengl: Refactoring 2019-11-20 12:23:45 +09:00
Hajime Hoshi
52f6be2639 graphicsdriver/opengl: Fix suspicious GL function calls
Before this change, the pixel object buffer is unbound just after
getting a pointer by glMapBuffer. This seemed suspicious.

This change fixes to do all pixel manipulations once between
glMapBuffer and glUnmapBuffer without changing a bound buffer.

This might fix a wrong rendering on some machines, but I am not
sure.

Updates #993
2019-11-20 02:41:34 +09:00
Hajime Hoshi
8243c1838a docs: Update the links 2019-11-19 01:59:36 +09:00
Hajime Hoshi
d7a9193e52 mobile: Enable to compile in non-mobile environments
This was necessary to show API documents on godoc.org and
pkg.go.dev.
2019-11-18 02:18:13 +09:00
Hajime Hoshi
c6cc298e0d mobile: Exclude non-mobile environments to build 2019-11-18 02:05:51 +09:00
Hajime Hoshi
95d3561a3a packing: Better panic message 2019-11-18 00:27:34 +09:00
Hajime Hoshi
63f9ac2ccc packing: Add Rollback/CommitExntension
This enables to dry-run to extend pages without cloning.

Fixes #990
2019-11-18 00:23:13 +09:00
Hajime Hoshi
61839506d8 packing: Add an extending count at Extend 2019-11-17 23:39:16 +09:00
Hajime Hoshi
74902d47af graphicsdriver/metal/mtl: Bug fix: need to link CoreGraphics as of Catalina
Fixes #989
2019-11-17 22:59:21 +09:00