Commit Graph

2037 Commits

Author SHA1 Message Date
Hajime Hoshi
7ad3343e9c graphicsdriver/monogame: Implement Pixels
Updates #1078
2020-04-22 02:23:16 +09:00
Hajime Hoshi
33e850a6d4 driver: Bug fix: (Key).String might cause infinite loop 2020-04-22 00:32:35 +09:00
Hajime Hoshi
0e75540f8e monogame: Add IsKeyPressed
Updates #1078
2020-04-21 22:48:57 +09:00
Hajime Hoshi
ea99743e0d driver: Add (Key).String() 2020-04-21 22:43:53 +09:00
Hajime Hoshi
691e42f806 graphicsdriver/monogame: Bug fix: An underlying image size should be adjusted 2020-04-21 02:43:47 +09:00
Hajime Hoshi
bbf9b219ec buffered: Skip mutex at ReplacePixels when possible
Updates #1137
2020-04-19 00:18:19 +09:00
Hajime Hoshi
3550abef7a shareable: Replace At with Pixels
This change replaces the API At with Pixels to reduce mutex locks.

Updates #1137
2020-04-18 21:05:51 +09:00
Hajime Hoshi
bbeb0d14e6 buffered: Defer filling an image
This change defers filling an image so that successive fillings
can be merged into one for more efficient rendering.

Fixes #1134
2020-04-18 02:11:25 +09:00
Hajime Hoshi
514c3faebd buffered: Remove unnecessary line and add comments 2020-04-17 21:50:42 +09:00
Hajime Hoshi
b9e0b5f04b graphicsdriver/monogame: Change the V direction 2020-04-17 21:36:59 +09:00
Hajime Hoshi
1d701577d6 buffered: Use the pending pixels when possible at At
(*Image).At can be unnecessarily slow since this tries to get
pixels from GPU. This change reduces the chance to read GPU by
using its pending pixels when possible.

Fixes #1137
2020-04-17 21:34:49 +09:00
Hajime Hoshi
4dad044ad1 monogame: Update
Updates #1078
2020-04-16 01:10:16 +09:00
Hajime Hoshi
de02bcf19f monogame: Update
Updates #1078
2020-04-14 03:23:54 +09:00
Hajime Hoshi
7b77164710 restorable: Ignore the error when restoring failed due to being not ready
(driver.Graphics).BeginFrame tries to restore the images, but
the context might be lost at that time yet. If the attempt to
restore the context because the driver is not ready, return
silently.

Fixes #1133
2020-04-12 20:01:18 +09:00
Hajime Hoshi
d0115f61ae graphicsdriver/monogame: Bug fix: Wrong viewport values 2020-04-11 18:56:50 +09:00
Hajime Hoshi
3437f35444 graphicscommand: Fix debug messages 2020-04-08 13:48:22 +09:00
Hajime Hoshi
f0c2c0e8e9 monogame: Set viewports
Updates #1078
2020-04-06 02:36:15 +09:00
Hajime Hoshi
7f64043ba5 monogame: Implement drawing screens
Updates #1078
2020-04-06 01:51:06 +09:00
Hajime Hoshi
7dd9150b86 monogame: Implement Draw temporarily
Updates #1078
2020-04-06 00:13:08 +09:00
Hajime Hoshi
44088cf14e monogame: Implement SetVertices
Updates #1078
2020-04-05 23:26:45 +09:00
Hajime Hoshi
08ac91fb50 monogame: Refactoring 2020-04-05 20:00:53 +09:00
Hajime Hoshi
3a5f0a7a95 graphicsdriver/monogame: Implement some functions
Updates #1078
2020-04-05 17:36:26 +09:00
Hajime Hoshi
fa90e48eec graphicscommand: Show the number of indices when dumping the command 2020-04-05 14:38:54 +09:00
Hajime Hoshi
57a5783ca0 graphicsdriver/monogame: Implement ReplacePixels
Updates #1078
2020-04-05 04:44:48 +09:00
Hajime Hoshi
8809076682 graphicsdriver/monogame: Create a RenderTarget2D for an image
Updates #1078
2020-04-04 22:59:55 +09:00
Hajime Hoshi
6236ba1f00 Add internal/monogame
Updates #1078
2020-04-04 22:59:13 +09:00
Hajime Hoshi
eabe4152a7 graphicsdriver/opengl: Rename Driver -> Graphics 2020-04-04 17:23:38 +09:00
Hajime Hoshi
01d1afa25c graphicsdriver/metal: Rename Driver -> Graphics 2020-04-04 17:12:24 +09:00
Hajime Hoshi
6cbf37e855 Add graphicsdriver/monogame 2020-04-04 17:03:45 +09:00
Hajime Hoshi
8777140e91 driver: Simplify UIContext.Update 2020-04-03 00:18:27 +09:00
Hajime Hoshi
9b0d95cfcf clock: Integrate now.go and now_js.go
The monotonic timer already uses performance.now, then we don't
have to have the original code.
2020-04-02 01:52:00 +09:00
Hajime Hoshi
4179e6c122 Introduce 'monogame' build tag experimentally
Updates #1078
2020-04-01 23:42:17 +09:00
Hajime Hoshi
5ad9868d85 driver: Refactoring: Reorder functions 2020-04-01 21:28:00 +09:00
Hajime Hoshi
ab94cebd02 buffered: Use RunGame for tests 2020-04-01 18:32:14 +09:00
Hajime Hoshi
16280e9a5a testing: Use RunGame 2020-04-01 18:21:35 +09:00
Hajime Hoshi
47d5c3b5e1 Add testing package 2020-04-01 18:10:48 +09:00
Hajime Hoshi
a718ddbf7e driver: Add UIDriver.Draw
This is a preparation for XNA.

Updates #1078
2020-04-01 02:55:50 +09:00
Hajime Hoshi
ef5e917feb shareable: Remove old comments
This was introduced at cbf36734f8,
but the situation was changed at 9d867850dc
2020-04-01 00:58:33 +09:00
Hajime Hoshi
7ac6b0bfa3 Update dependencies 2020-03-31 03:32:38 +09:00
Hajime Hoshi
9a14d2fb14 thread: Fix comments
Fixes #1121
2020-03-29 16:27:12 +09:00
Hajime Hoshi
41d07706ae Revert "thread: Close channels"
This reverts commit 00e78c1eae.

Reason: (*Thread).Loop can be called multiple times on iOS.

Fixes #1121
2020-03-29 16:25:42 +09:00
Hajime Hoshi
b09fe7157b uidriver/glfw: Update comments 2020-03-29 01:33:23 +09:00
Hajime Hoshi
e3def4ae50 uidriver/glfw: Update comments 2020-03-29 01:12:53 +09:00
Hajime Hoshi
9d5c35f029 uidriver/glfw: Bug fix: Initilizing the window position and the size in this order on Windows
It looks like the order is different on Windows from Linux. We
are not sure why.

Updates #1118
2020-03-29 00:50:19 +09:00
Hajime Hoshi
b7ab3d2df4 uidriver/glfw: Avoid using the window position before initializing
Especially in the initial phase before calling Run/RunGame, the
window position is not reliable and then getting the device scale
factor does not make sense based on the window position. Avoid
using the window position, and instead use the glfw.Monitor in
this situation.
2020-03-29 00:09:08 +09:00
Hajime Hoshi
14200eb42c uidriver/glfw: Add comments 2020-03-29 00:02:33 +09:00
Hajime Hoshi
8480f888dd Revert "uidriver/glfw: Bug fix: Do not use the window position for monitors"
Revert "uidriver/glfw: Bug fix: compile error on Linux"

This reverts commit 0a5126f776.
This reverts commit 3e244d7a7c.

Reason: GetMonitor is available only on fullscreen mode
2020-03-28 23:56:03 +09:00
Hajime Hoshi
e628350d4e uidriver/glfw: Bug fix: Initializing order mattered
Especially on Linux, the window size and the window position must
be initialized in this order.

Fixes #1118
2020-03-28 23:37:21 +09:00
Hajime Hoshi
34acf788d2 uidriver/glfw: Bug fix: Call Maximize explictly instead of the hint
Fixes #1117
2020-03-28 22:34:01 +09:00
Hajime Hoshi
4fe5acd711 ui: Panic on MaximizeWindow when the window is not resizable
On Windows, the window could be maximized even when the window was
not resizable. This behavior is confusing. Forbid it so that the
behavior will be clearer.
2020-03-28 22:08:48 +09:00