Commit Graph

1875 Commits

Author SHA1 Message Date
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
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
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
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
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
Hajime Hoshi
725cc22200 uidriver/mobile: Rename Render -> Update 2019-11-17 21:52:06 +09:00
Hajime Hoshi
92e056c508 uidriver/glfw: Bug fix: an unexpected window at launching
Fixes #986
2019-11-17 19:58:44 +09:00
Hajime Hoshi
3aaeee78dd graphicsdriver/metal: Reduce flushing at ReplacePixels 2019-11-17 16:00:24 +09:00
Hajime Hoshi
800b98a0c6 ui: Bug fix: a window was alwasy 'unfocused' on Windows
There is an issue in GLFW that a window was recognized as unfoces
on Windows (glfw/glfw#1573). As a workaround, skip the logic for
an unfocused window on Windows. On Windows, even if a window is in
another workspace, vsync works. Then there seems no problem.

Fixes #987
2019-11-17 14:10:38 +09:00
Hajime Hoshi
4120e868be graphicsdriver/opengl: Remove unused functions 2019-11-17 05:10:22 +09:00
Hajime Hoshi
acc933b7c3 graphicsdriver/opengl: Experimental PBO implementation
This change is an experimental implementation to use Pixel Buffer
Objects. This reduces calls of glTexSubImage2D.

This works only on desktops. Unfortunately WebGL does not have
this features. Mobiles can have PBO as of OpenGL ES 3.

Updates #976
2019-11-17 05:01:43 +09:00
Hajime Hoshi
16b3a5c296 buffered: Bug fix: Needed to copy pixels when buffering
Updates #983
2019-11-16 16:39:02 +09:00
Hajime Hoshi
e42cff071c restorable: Merge two 'copy' into one
Fixes #983
2019-11-16 02:10:53 +09:00
Hajime Hoshi
aa6fc67736 Revert "graphics: Avoid all copying pixels"
This reverts commit c60a32a479.

Reason: This breaks backward comptibility and it was not obvious how to fix examples.
2019-11-16 02:04:46 +09:00
Hajime Hoshi
c60a32a479 graphics: Avoid all copying pixels
This is a breaking change: ReplacePixels now takes the ownership
of the given pixels.

Fixes #983
2019-11-16 01:51:36 +09:00
Hajime Hoshi
f1091910bd Revert "graphicscommand: Remove copying pixels"
This reverts commit 339a96b7e6.

Reason: this causes panic on extending textures
2019-11-16 00:43:22 +09:00
Hajime Hoshi
339a96b7e6 graphicscommand: Remove copying pixels
Now ReplacePixels takes the ownership.

Updates #983
2019-11-16 00:29:37 +09:00
Hajime Hoshi
bfd5774faf graphicsdriver/glfw: Bug fix: CPU was busy when the window is hidden
Fixes #982
2019-11-14 23:11:36 +09:00
Hajime Hoshi
8c54cf639a graphicsdriver/opengl: Reduce glFlush calls
Fixes #981
2019-11-14 01:21:08 +09:00
Hajime Hoshi
c2eae69b47 graphicscommand: Refactoring 2019-11-14 00:08:44 +09:00
Hajime Hoshi
a1a294df72 uidriver/glfw: Bug fix: Freeze on Wayland
Fixes #974
2019-11-10 19:26:49 +09:00
Hajime Hoshi
572780ed6d uidriver/glfw: Bug fix: errors are ignored at (*UserInterface).run
Updates #978
2019-11-10 19:09:41 +09:00
Hajime Hoshi
d43e203ccf uidriver/glfw: Remove a redundant 'if' branch 2019-11-10 17:34:14 +09:00
Hajime Hoshi
63f73ddd75 web: Bug fix: iPad was not recognized as iOS
Fixes #979
2019-11-10 16:52:49 +09:00
Hajime Hoshi
8d12446dbe buffered: Bug fix: reset the flag when invalidating the pending pixels
Updates #977
2019-11-09 05:54:27 +09:00