Hajime Hoshi
a627c41217
Remove support of Go 1.13 and Go 1.14
...
Updates #1258
Updates #1415
Updates #1462
2021-06-07 21:44:22 +09:00
Hajime Hoshi
040fcd930f
Revert "Revert 2 commits using ColorM cache"
...
This reverts commit dd7a8bc497
.
Reason: DrawTriangles worked fine for the reporter's purpose.
Updates #1655
2021-05-30 15:17:11 +09:00
Hajime Hoshi
dd7a8bc497
Revert 2 commits using ColorM cache
...
This reverts commit 87c8625692
.
This reverts commit a6dd6196b4
.
Reason: Performance regression (#1655 )
Closes #1655
2021-05-30 03:10:00 +09:00
Hajime Hoshi
58843b68f9
internal/hooks: Enable to return error at suspend/resume audio
2021-05-04 23:09:01 +09:00
Tom Lister
bea5ab3335
internal/uidriver/glfw: Native macOS implementation for setting cursor shape ( #1624 )
...
Updates #1624
2021-05-02 14:50:50 +09:00
Hajime Hoshi
b509ce523d
internal/uidriver/js: Bug fix: SetFullscreen didn't work on Safari
...
Updates #1611
2021-04-28 23:28:58 +09:00
Tom Lister
5d3a76cbe6
internal/uidriver/js: Implement {Set,}Fullscreen for browsers ( #1623 )
...
Closes #1611
2021-04-27 23:58:32 +09:00
Hajime Hoshi
091e51ae4c
internal/uidriver/glfw: Avoid allocating a new slice
2021-04-25 00:57:06 +09:00
Hajime Hoshi
e2ceb7b3a6
internal/uidriver/glfw: Call fromGLFWPixels from the main thread
...
fromGLFWPixels can invoke driverScaleFactor, and then using the main
thread is safer.
2021-04-24 23:30:51 +09:00
Hajime Hoshi
b6364c46fe
internal/clock: Misspelling
2021-04-24 23:24:11 +09:00
Hajime Hoshi
2534b78755
internal/clock: Simplify the logic to calculate tick per frame
...
Updates #1444
Updates #1597
2021-04-24 23:06:27 +09:00
Hajime Hoshi
2e6ecc766d
internal/clock: Integrate 'now' implementations
...
The Go runtime already uses QueryPerformanceCounter at runtime.nanotime.
2021-04-24 22:32:47 +09:00
Hajime Hoshi
011a524ac7
internal/clock: Update comments
2021-04-24 22:10:00 +09:00
Hajime Hoshi
91f8347500
internal/uidriver/glfw: Avoid busy loop by sleeping
...
Updates #1580
2021-04-24 05:19:23 +09:00
Hajime Hoshi
3df31c0fce
internal/uidriver/glfw: Bug fix: Deadlock at FramebufferSize callback
...
glfw.PollEvents might invoke multiple FramebufferSize callbacks in
theory, this is very rare though. In this case, the sending an object
to the channel never ends.
This change fixes this deadlock by using 'select'.
Closes #1618
2021-04-24 02:22:51 +09:00
Hajime Hoshi
ac9a18931c
internal/uidriver/glfw: Fix comments
...
Updates #1618
2021-04-23 03:28:14 +09:00
Hajime Hoshi
d446aa39a9
internal/uidriver/glfw: Bug fix: Always wait for SetFramebuffer
...
In case when the callback is not called, let's use timeout.
Updates #1618
2021-04-23 03:02:12 +09:00
Hajime Hoshi
c4c331b0d5
Fix misspellings
2021-04-21 22:50:00 +09:00
Hajime Hoshi
4cb6cb9d6a
internal/uidriver/glfw: Misspelling
2021-04-21 22:29:54 +09:00
Hajime Hoshi
1013ca9c66
internal/uidriver/glfw: Bug fix: A window can never be 'maximized' on fullscreen
...
When the window is fullscreen, calling MaximizeWindow never returned.
Apparently the attribute glfw.Maximized can never be true on the
fullscreen mode.
This change fixes the issue by checking the fullscreen state.
2021-04-21 22:25:14 +09:00
corfe83
d24313e236
internal/devicescale: Fallback to simpler logic when trying to get DPI from monitor and failing ( #1600 )
...
Closes #1612
2021-04-21 11:43:23 +09:00
Hajime Hoshi
c7dd9a4107
internal/uidriver/glfw: Bug fix: Wait for Restore/Maximize/Iconify finishes explicitly
...
On Linux (and probably other UNIX OSes), glfwRestore, glfwMaximize,
and glfwIconify returns even though the window state has not changed.
Wait for its finish by a for loop and glfw.PollEvents.
Closes #1608
2021-04-21 00:52:06 +09:00
Hajime Hoshi
58572fb000
internal/uidriver/glfw: Bug fix: Unexpected small window size on Linux
...
At the initial phase, GLFW window's GetSize seems unreliable. Do not
call it on Linux. On the other hand, this is still necessary on macOS.
Updates #1606
Closes #1609
2021-04-20 23:38:34 +09:00
Hajime Hoshi
ec5b806241
Revert "internal/uidriver/glfw: Bug fix: Delay to enable SetSize callback"
...
This reverts commit fbe6961528
.
Reason: This doesn't fix the issue unfortunately
2021-04-20 23:01:02 +09:00
Hajime Hoshi
fbe6961528
internal/uidriver/glfw: Bug fix: Delay to enable SetSize callback
...
On Linux, the SetSize callback is invoked with an unexpected value
at the initial phase. Just delay it until the initialization
finishes.
2021-04-20 22:53:48 +09:00
Hajime Hoshi
47f569e473
internal/uidriver/glfw: Bug fix: setWindowSize could not accept a fullscreen size
2021-04-20 20:09:04 +09:00
Hajime Hoshi
ee8bfcd837
internal/uidriver/glfw: Bug fix: Disable the SetSize callback for most of GLFW window functions
...
Updates #1576
Updates #1585
Closes #1606
2021-04-20 18:32:39 +09:00
Hajime Hoshi
74018348c0
internal/uidriver/js: Update the error message
...
Updates #1604
2021-04-20 12:47:38 +09:00
Hajime Hoshi
191cc667e1
internal/uidriver/js: Add an error message when pointerlockerror happens
...
Updates #1604
2021-04-20 12:22:33 +09:00
Hajime Hoshi
18ce150495
internal/uidriver/glfw: Bug fix: getWindowSizeLimits should return -1 when the original value was -1
...
Updates #1602
2021-04-20 11:05:17 +09:00
Hajime Hoshi
dcaa1f9722
internal/uidriver/glfw: Bug fix: Need to reregister the callback after recreating the window
...
Updates #1588
Closes #1593
2021-04-19 01:28:59 +09:00
Hajime Hoshi
fd80583dd0
internal/uidriver/glfw: Bug fix: Defer SetIcon on the fullscreen mode
...
Closes #1587
2021-04-18 22:28:01 +09:00
Hajime Hoshi
7e61189c3d
internal/uidriver/glfw: Bug fix: Avoid registring C callbacks too often
...
Instead of registring/unregistering callbacks, use a boolean flag.
Closes #1588
2021-04-18 22:07:29 +09:00
Hajime Hoshi
c88ee0d0ad
internal/uidriver/glfw: Bug fix: Unregister SetSize callback when undecorate the window
...
Closes #1586
2021-04-18 21:24:56 +09:00
Hajime Hoshi
f5a4216434
internal/uidriver/glfw: Bug fix: Do not call setWindowSize on iconifying
...
The window size might be 0 after iconifying. An iconified window is
invisible to users so setting a window size doesn't make sense anyway.
Closes #1585
2021-04-18 21:06:04 +09:00
Hajime Hoshi
26432dfc9e
Revert "internal/uidriver/glfw: Refactoring: use glfw.Window when possible"
...
This reverts commit 475453d5d2
.
Reason: #1584 : A wrong active monitor was detected at the initial phase?
Closes #1584
2021-04-18 20:05:37 +09:00
Hajime Hoshi
78732d93f6
internal/uidriver/glfw: Bug fix: Crash on some operations on native fullscreen mode (macOS)
...
This change forbids some operations when the wiindow is natively
fullscreened on macOS in order to avoid crashes.
Closes #1578
2021-04-18 18:11:33 +09:00
Hajime Hoshi
fda1fd9a95
internal/uidriver/glfw: Bug fix: FramebufferSize callback was not called when the window size was not changed
...
Closes #1580
2021-04-18 15:22:51 +09:00
Hajime Hoshi
61c0908b13
internal/glfw: Refactoring
2021-04-18 03:33:01 +09:00
Hajime Hoshi
f09cf7fa47
internal/uidriver/glfw: Bug fix: Crash at Iconify
...
This is the same reason as Maximize.
Updates #1576
2021-04-18 01:03:13 +09:00
Hajime Hoshi
b5d4c834b8
internal/uidriver/glfw: Bug fix: More precise window size adjustment
...
Before this change, setWindowSize converts the size in device-
independent pixels once, invokes adjustWindowSizeBasedOnSizeLimitsInDP,
and then restore the values in device-dependent pixels. This might
introduce a slight error and then SetSize be unexpectedly invoked.
Such SetSize call with a slightly different size might not invoke
the FramebufferSize callback, and then this blocked forever when
maximizing the window.
This change fixes this by adjusting the size limits instead of the
window size so that the window size is not modified unexpectedly.
Closes #1577
2021-04-18 00:56:37 +09:00
Hajime Hoshi
d6ab27a5a2
internal/uidriver/glfw: Bug fix: Crash at Restore
...
This is the same reason as Maximize.
Updates #1576
2021-04-18 00:10:40 +09:00
Hajime Hoshi
37944d67c4
internal/uidriver/glfw: Update comments
...
Updates #1576
2021-04-18 00:05:48 +09:00
Hajime Hoshi
ab8477a21a
internal/uidriver/glfw: Bug fix: Crash on Maximize
...
At least on macOS, Maximize invokes the SetSize callback in the game's
Update. This change fixes this issue by unregisting the callback
temporarily like what #1505 did.
Closes #1576
2021-04-18 00:02:58 +09:00
Hajime Hoshi
f62576d88d
internal/glfw: Add tools.go to keep go.sum
2021-04-17 20:24:39 +09:00
Hajime Hoshi
855edcd2ff
internal/glfw: Update Dockerfile and regenerate DLLs
2021-04-17 20:11:10 +09:00
Hajime Hoshi
6df87a0383
internal/uidriver: Add comments
...
Updates #1575
2021-04-17 18:17:26 +09:00
Hajime Hoshi
1ca0ecc10f
internal/devicescale: Add comment about #1573
...
Updates #1573
2021-04-17 18:14:26 +09:00
Hajime Hoshi
deba352384
internal/uidriver/glfw: Prefer currentMonitor to get the monitor at deviceScaleFactor
2021-04-17 17:03:50 +09:00
Hajime Hoshi
e89f53774c
internal/uidriver/glfw, internal/devicescale: Add comments
2021-04-17 15:45:46 +09:00
Hajime Hoshi
585f173d1c
internal/uidriver/glfw: Bug fix: Treat pixel units correctly
...
Updates #1385
2021-04-17 04:43:33 +09:00
Hajime Hoshi
99b2b5c1ee
internal/glfw: Bug fix: compile error on Windows
...
Updates #1385
2021-04-17 04:24:19 +09:00
Hajime Hoshi
9b6ba5ed2c
ebiten: Add {Set,}WindowSizeLimits
...
Closes #1385
2021-04-17 03:58:06 +09:00
Hajime Hoshi
4cbbdbf518
internal/uidriver/js: Misspelling
2021-04-16 03:14:46 +09:00
Hajime Hoshi
20705d63a3
internal/uidriver/js: Refactoring
2021-04-16 03:13:12 +09:00
Hajime Hoshi
ead84553a0
internal/uidriver/js: Implement CursorModeCaptured
...
Closes #1572
2021-04-16 03:09:24 +09:00
Hajime Hoshi
3c1226a227
internal/uidriver/js: Bug fix: SetCursorMode didn't work
2021-04-16 01:21:48 +09:00
Hajime Hoshi
d00d0c8556
ebiten: Add CursorShape/SetCursorShape/CursorShapeType
...
This change adds APIs to enable to use system cursor shapes other
than the default shape (an arrow).
This change doesn't add these cursors since they seem a little
different on macOS from the other platforms.
* GLFW_HRESIZE_CURSOR
* GLFW_VRESIZE_CURSOR
Closes #995
2021-04-16 01:09:19 +09:00
Hajime Hoshi
71e899acf3
internal/uidriver/glfw: Refactoring
2021-04-15 02:01:20 +09:00
Hajime Hoshi
4398a5e227
ebiten: Change the key name convention to follow the Web standard
...
Closes #1394
2021-04-14 22:49:07 +09:00
Hajime Hoshi
7934c3b22b
internal/driver: Clean CursorMode values up
2021-04-11 03:29:14 +09:00
Hajime Hoshi
77b51e4707
internal/shader: Add more tests and improve the comment
...
Updates #1192
2021-04-09 01:25:37 +09:00
Hajime Hoshi
1cdc6ea72b
internal/shader: Bug fix: Treat multiple constant definitions in one statement correctly
...
Updates #1192
2021-04-09 01:18:38 +09:00
Hajime Hoshi
3b6fa891ac
internal/shader: Bug fix: Error on duplicated const/var names
...
Updates #1192
2021-04-09 00:12:17 +09:00
Hajime Hoshi
59a80cf953
internal/shader: Implement basic constants
...
Updates #1192
2021-04-09 00:00:49 +09:00
Hajime Hoshi
0246a6407e
ebiten: Guarantee that CursorPosition returns (0, 0) in the very initial state on desktops
...
This change also guarantees that CursorPosition always returns (0, 0)
on mobiles.
2021-04-07 03:08:09 +09:00
Hajime Hoshi
ad3c76b6d9
internal/uidriver/js: Bug fix: CursorPosition crashed before the main loop on browsers
...
Closes #1559
2021-04-07 03:07:09 +09:00
Hajime Hoshi
6fe6543b4b
internal/graphicsdriver/opengl: Bug fix: getBufferSubData was available only with WebGL2
2021-04-06 00:11:51 +09:00
Hajime Hoshi
bd8367588e
internal/graphicsdriver/opengl: Prepare function objects by bind
...
Passing a Go string to the JS world is expensive. This change reduces
this cost by preparing function objects by bind.
Closes #1438
2021-04-05 23:53:21 +09:00
Hajime Hoshi
475453d5d2
internal/uidriver/glfw: Refactoring: use glfw.Window when possible
...
Updates #1122
2021-04-03 17:29:38 +09:00
Hajime Hoshi
9dd00114c5
internal/devicescale: Remove a Unicode space
2021-03-28 23:39:06 +09:00
Hajime Hoshi
19702619ee
ebiten: Bug fix: AdjustPosition could return Inf
...
Before the initialization finishes, AdjustPosition could return Inf
values and in this case AdjustPosition's returning values don't make
sense. Let's return NaN in this case.
Closes #1545
2021-03-27 18:46:14 +09:00
Hajime Hoshi
d415e9c771
internal/uidriver/glfw: Refactoring
2021-03-27 18:35:31 +09:00
Hajime Hoshi
24973da123
internal/jsutil: Restrict the build environment
2021-03-22 03:50:05 +09:00
Hajime Hoshi
402e1a251a
internal/uidriver/js: Bug fix: CursorMode didn't work on go2cpp
2021-03-21 16:40:35 +09:00
Hajime Hoshi
41f060b1d2
ebiten: Use the common vertices backend at DrawTriangles
2021-03-20 20:25:42 +09:00
Hajime Hoshi
15a0c53918
internal/graphics: Refactoring
2021-03-20 20:18:02 +09:00
Hajime Hoshi
26b9fa20c1
internal/graphics: Bug fix: Race condition at QuadVertices
...
QuadVertices or verticesBackend.slice reused its backend slice.
This caused a race condition. QuadVertices can be accessed from
multiple goroutines, and resetting the head and copying the data
at internal/graphicscommand might not be synced.
This change fixes this issue by basically reverting
9cb631e30f
.
Closes #1546
2021-03-20 16:32:13 +09:00
Humphrey Shotton
21cfe362c8
internal/graphicscommand: fix missing graphicscommand log ( #1543 )
...
Closes #1544
2021-03-15 02:14:03 +09:00
Hajime Hoshi
3e7217cb86
internal/atlas: Add comments to moveTo
2021-03-12 00:26:38 +09:00
Hajime Hoshi
ec677a258f
Rename internal/shareable -> internal/atlas
...
Also the terms are renamed:
* shared -> on an atlas
* not shared -> isolated
Closes #1529
2021-03-12 00:22:08 +09:00
Hajime Hoshi
df3e74533b
internal/shareable: Use an exponential way to determine the image sharing
...
When an image was used in both ways source and destination, Ebiten
worked ineffectively since Ebiten tried to make the image on a texture
atlas after the image was used as a source for a while, which tried to
create a new internal texture every time.
This fix mitigates this issue by using an exponential way to determine
whether the image should be on a texture atlas again or not, so that
an image often used as a destination will require much longer time to
become on a texture atlas again.
Updates #1464
2021-03-10 02:30:33 +09:00
Hajime Hoshi
052947d7b7
internal/glfw: Update GLFW to 3.3.3 for Windows
...
Closes #1523
2021-03-09 02:19:34 +09:00
Hajime Hoshi
990fb14f17
internal/uidriver/glfw: Separate createWindow and registring the callback
...
createWindow created a window and also registered the SetSize callback.
This was problematic in setWindowSize, since the callback was invoked
in setWindowSize unexpectedly.
This change separates createWindow and registring the callback so that
the created window in setWindowSize doesn't invoke the callback until
setWindowSize finishes.
Closes #1505
2021-03-06 17:48:28 +09:00
Hajime Hoshi
fda421c5fe
internal/uidriver/glfw: Bug fix: SEGV at setWindowSize
...
u.window can be a different value before and after the function
setWindowSize.
Closes #1522
2021-03-03 23:04:35 +09:00
Hajime Hoshi
c8b98f13fb
internal/graphics: Always use the vertex backend to reduce GC
...
Closes #1521
2021-03-03 22:23:15 +09:00
Hajime Hoshi
cb3fc3c51c
Revert "shareable: Limit the texture size to 8192"
...
This reverts commit c92ccfff79
.
Reason: This should no longer be needed after #1517 is fixed.
2021-02-27 13:55:13 +09:00
Hajime Hoshi
77b198211c
internal/graphicsdriver/metal: Add a comment
2021-02-27 04:04:25 +09:00
Hajime Hoshi
53352cf2b3
internal/graphicsdriver/metal: Use the smallest temporary texture
...
Updates #1517
2021-02-27 03:45:19 +09:00
Hajime Hoshi
673627c4d4
internal/graphicsdriver/metal: Optimization
2021-02-27 02:30:20 +09:00
Hajime Hoshi
6b3c51921c
internal/driver: Remove Image.Sync
...
Syncing is no longer needed for Metal, and additionally, OpenGL's sync
implementation was mock.
Updates #1508
2021-02-26 23:16:28 +09:00
Hajime Hoshi
9341d21614
internal/shareable: Call DrawTriangles instead of ReplacePixels at makeShared ( #1513 )
...
When context losts never happen, reading pixels and call replace-pixels command are not needed.
Closes #1508
2021-02-26 12:56:22 +09:00
Hajime Hoshi
d913e66cd9
Revert "uidriver/glfw: Bug fix: Do not iconify the fullscreen window automatically"
...
This reverts commit 61bf10e73e
.
Reason: This prevents the app from iconifying when toggling apps.
Updates #1405
Closes #1504
2021-02-23 20:13:21 +09:00
Hajime Hoshi
18d526c2d3
internal/uidriver/glfw: Bug fix: Crash when returning from fullscreen
...
ForceUpdate was called unexpectedly inside Update. This caused the
race condition.
Closes #1505
2021-02-23 16:52:12 +09:00
Hajime Hoshi
969964cb46
internal/graphicsdriver/opengl/gl: Bug fix: Remove unsafe reflect usage
...
Closes #1495
2021-02-14 21:27:30 +09:00
Hajime Hoshi
1517f80430
internal/uidriver/glfw: Refactoring
2021-02-11 04:02:18 +09:00
Hajime Hoshi
ec912e5cad
internal/uidriver/glfw: Remove the dirty hack creating a temporary UI instance
...
Updates #1122
2021-02-11 03:45:39 +09:00
Hajime Hoshi
fea802b39d
internal/uidriver: Replace mutex usages with atomic
...
Updates #1073
2021-02-11 02:38:15 +09:00
Hajime Hoshi
ec843ce92c
internal/web: Consider the case when navigator exists but userAgent doesn't
...
This can happen on go2cpp.
2021-02-09 23:59:39 +09:00
Hajime Hoshi
9400efa9a5
internal/uidriver/glfw: Update the screen on resizing
...
Closes #1204
2021-02-07 23:03:56 +09:00
Hajime Hoshi
5f81065d78
internal/shader: Make function duplications error
...
Closes #1430
2021-02-07 22:24:23 +09:00
Hajime Hoshi
d999b4dc8e
internal/uidriver/glfw: Bug fix: Enable to specify ebiten.Image to SetWindowIcon
...
Closes #1468
2021-02-07 21:18:30 +09:00
Hajime Hoshi
acb8bcae38
cmd/ebitenmobile, internal/devicescale: Experimental fix of the display density
...
Closes #1481
2021-02-07 14:07:06 +09:00
Hajime Hoshi
44bb004cb7
internal/restorable: Avoid allocating new slices for drawTrianglesHistory
2021-01-30 19:13:03 +09:00
Hajime Hoshi
87c8625692
Remove internal/colormcache
2021-01-28 03:28:29 +09:00
Hajime Hoshi
256adfff9d
internal/affine: Add tests
...
Updates #1474
2021-01-28 02:24:24 +09:00
Hajime Hoshi
a6dd6196b4
internal/affine: Cache scaling ColorM for heuristic optimization
...
Closes #1474
2021-01-28 02:23:22 +09:00
Hajime Hoshi
14abc28d3a
internal/color: Remove Add
2021-01-27 02:37:56 +09:00
Hajime Hoshi
599b3501fd
internal/uidriver/js: Bug fix: GamepadName and GamepadSDLID could return wrong values
...
Updates #1472
2021-01-26 10:35:40 +09:00
Hajime Hoshi
b9a0906537
internal/uidriver/js: Bug fix: nil map
2021-01-26 10:26:52 +09:00
Hajime Hoshi
2dadfdb88e
internal/uidriver: Optimization
2021-01-26 01:02:24 +09:00
Hajime Hoshi
b8694aa66a
internal/graphicsdriver/opengl: Optimization
2021-01-26 00:45:17 +09:00
Hajime Hoshi
e60e6ca5ac
internal/shareable: Optimization
2021-01-26 00:43:45 +09:00
Hajime Hoshi
f1848a6d46
internal/uidriver/js: Optimization: Avoid creating new maps for initialization
2021-01-26 00:12:18 +09:00
Hajime Hoshi
e844c257f7
internal/uidriver/js: Bug fix: Compile error
2021-01-25 22:49:45 +09:00
Hajime Hoshi
10e5e9e633
internal/uidriver: Prepare the slice capacities
2021-01-25 22:47:44 +09:00
Hajime Hoshi
40e662d672
internal/uidriver: Optimization
2021-01-24 23:59:44 +09:00
Hajime Hoshi
a0a8d41ff6
uidriver/js: Force to update the screen when resizing
...
Updates #1204
2021-01-18 01:17:58 +09:00
Hajime Hoshi
34695dc845
shareable: Refactoring
2021-01-18 00:35:09 +09:00
Hajime Hoshi
0c578f1670
shareable: Rename notUpdatedCount -> usedAsSourceCount and modify implementation
...
Before this change, the image automatically becomes on a shareable
texture again when the image is not modified for a while. This was
problematic when an offscreen is not updated for a while, but used
as a render target again, as an independent image for the image is
created every time when the image is used as a render target.
After this change, the count is updated only when the image is used
as a rendering source.
Closes #1465
2021-01-17 19:00:16 +09:00
Hajime Hoshi
f77c514598
graphicsdriver/opengl: Refactoring
2021-01-05 02:07:30 +09:00
Hajime Hoshi
b7abde7f00
graphicsdriver/opengl: Bug fix: getBufferSubData did not work correctly on JS
2021-01-03 19:44:29 +09:00
Hajime Hoshi
dd15927710
uidriver/js: Bug fix: IsFocused crashes on go2cpp
2021-01-03 17:53:21 +09:00
Hajime Hoshi
fcbde8d124
uidriver/mobile: Do not use %q at the mobile error message
...
Closes #1447
2021-01-02 02:08:36 +09:00
Hajime Hoshi
c92ccfff79
shareable: Limit the texture size to 8192
...
Closes #1453
2020-12-31 17:52:18 +09:00
Hajime Hoshi
b6bc683991
packing: Bug fix: Extend could create a too big page
...
Closes #1454
2020-12-31 17:33:27 +09:00
Hajime Hoshi
2ea360b921
Revert "driver: Increase gamepad buttons to 64"
...
This reverts commit 62b199f9eb
.
Reason: This seems my misunderstanding.
2020-12-29 02:49:58 +09:00
Hajime Hoshi
62b199f9eb
driver: Increase gamepad buttons to 64
...
e.g. Nintendo Switch controller can have more than 32 buttons.
2020-12-27 21:56:08 +09:00
Hajime Hoshi
bb20c9719e
uidriver/js: Implement gamepads for go2cpp
...
Updates #744
2020-12-27 20:10:45 +09:00
Hajime Hoshi
601fd5eb22
uidriver/js: Update go2cpp touch API
2020-12-27 19:56:24 +09:00
Hajime Hoshi
8e6792ca23
uidriver/js: Refactoring: Use a map for gamepad states
...
This change improves the consistency with touches.
2020-12-27 18:44:16 +09:00
Hajime Hoshi
3d48922d8c
jsutil: Bug fix: byteLenght must be accessed every time to get the latest value
2020-12-26 17:04:12 +09:00
Hajime Hoshi
e95cccad21
jsutil: Reduce calls of (js.Value).Get
...
(js.Value).Get invokes the string conversion from UTF-8 to UTF-16.
This is related to #1438 , though this is not a fix in the OpenGL
driver.
Updates #1438
2020-12-26 05:12:04 +09:00
Hajime Hoshi
a6ade8f5cd
uidriver/js: Update touch APIs for go2cpp
2020-12-21 23:01:12 +09:00
Hajime Hoshi
b20f611058
uidriver/js: Implement touches on go2cpp
2020-12-21 18:36:01 +09:00
Hajime Hoshi
59567993c2
clock: Bug fix: High TPS didn't work well due to the timer precision
...
When the TPS is high (e.g., 300), the count might be unreliable
since the timer might not be precise on some machines. In this
case, calculate the factor and multiply the count by it.
Fixes #1444
2020-12-21 00:23:29 +09:00
Hajime Hoshi
53d0e1eae0
clock: Add comment
2020-12-20 21:59:09 +09:00
Hajime Hoshi
aef104203d
clock: Refactoring
2020-12-20 21:54:28 +09:00
Hajime Hoshi
4215678f4c
clock: Bug fix: Syncing with the system clock happens more often than expected
...
When the specified TPS is too big (e.g., 300), the time threshold
to determine whether the clock should be synchronized with the
system clock can be too small, and the decision can be wrong too
often. To fix this, prepare another time assuming the TPS was 60
and use the bigger one.
Fixes #1443
2020-12-20 21:23:40 +09:00
Hajime Hoshi
8003000976
uidriver/js: Refactoring
2020-12-20 18:19:58 +09:00
Hajime Hoshi
2e2ee2595b
uidriver/js: Refactoring
2020-12-20 18:17:08 +09:00
Hajime Hoshi
d3fbf377ef
shader: Bug fix: A wrong usage of a pointer
2020-12-20 13:32:22 +09:00
Hajime Hoshi
de14a44c01
restorable: Replace a potentially dangerous pointer usage
...
Getting a poniter to a loop variable is potentially dangerous.
2020-12-20 13:28:17 +09:00
Hajime Hoshi
2106e0fa6a
devicescale: Use devicePixelRatio property for go2cpp
2020-12-20 00:45:13 +09:00
Hajime Hoshi
5bbb148a38
uidriver/js: Add jsKeyToID to avoid js.Value.String
...
Fixes #1437
2020-12-16 13:30:42 +09:00
Hajime Hoshi
69b1d2e820
uidriver/js: Use js.Value as key strings
...
Updates #1437
2020-12-16 12:53:33 +09:00
Hajime Hoshi
442be20f4d
uidriver/js: Avoid calling String when possible to reduce overhead
...
Updates #1437
2020-12-16 12:41:55 +09:00
Hajime Hoshi
e856b236f3
jsutil: Refactoring
2020-12-16 02:41:06 +09:00
Hajime Hoshi
7e32075abd
jsutil: Avoid creating Uint8Array when copying bytes from Go to JS
...
Updates #1435
2020-12-16 01:50:05 +09:00
Hajime Hoshi
49b86843c3
jsutil: Avoid creating Uint8Array at TemporaryUint8Array
...
Updates #1435
2020-12-16 01:21:13 +09:00
Hajime Hoshi
146357c298
jsutil: Enable to specify length at Uint8ArrayToSlice
2020-12-15 01:13:15 +09:00
Hajime Hoshi
e5c1151cc5
jsutil: Avoid creating Float32Array at TemporaryFloat32Array
...
Updates #1435
2020-12-15 00:40:43 +09:00
Hajime Hoshi
f440e368b3
graphicsdriver/opengl: Use WebGL2 API on go2cpp
2020-12-14 02:02:45 +09:00
Hajime Hoshi
547621ddad
clock: Bug fix: The game was frozen when TPS is <= 4
...
Fixes #1417
2020-12-13 15:14:15 +09:00
Hajime Hoshi
692460c5aa
testing: Bug fix: Lack of uniform variables
2020-12-09 11:52:45 +09:00
Hajime Hoshi
718273c2d7
ebiten: Add a new shader function imageDstRegionOnTexture
...
Updates #1428
2020-12-09 11:36:29 +09:00
Hajime Hoshi
8d2a4ac917
uidriver/glfw: Bug fix: OpenGL was adopted unexpectedly on macOS Big Sur
...
Fixes #1429
2020-12-09 10:21:26 +09:00
Hajime Hoshi
35867c7697
uidriver/js: Add go2cpp.screenWidth/screenHeight
2020-12-09 10:10:34 +09:00
Hajime Hoshi
768fdd2c47
uidriver/js: Separate registering event handlers
2020-12-06 22:56:09 +09:00
Hajime Hoshi
66d12722ae
graphicsdriver/opengl: Remove comments
2020-12-06 03:24:08 +09:00
Hajime Hoshi
2c31156a34
graphicsdriver/opengl: Reduce allocations of Float32Array on go2cpp
...
Updates #1426
2020-12-06 03:23:09 +09:00
Hajime Hoshi
2bf4a3bb6e
jsutil: Use Equal for Go 1.13
2020-12-06 03:14:25 +09:00
Hajime Hoshi
469dc31765
jsutil: Reduce allocating Uint8Array on go2cpp
...
Updates #1426
2020-12-06 03:00:50 +09:00
Hajime Hoshi
2ca0f3f300
jsutil: Remove println
2020-12-06 02:58:52 +09:00
Hajime Hoshi
7a86238c9a
jsutil: Remove ArrayBufferToSlice
2020-12-06 02:28:14 +09:00
Hajime Hoshi
b326b76d60
jsutil: Use a 'writable' TypedArray on go2cpp
2020-12-06 02:25:04 +09:00
Hajime Hoshi
410766c984
restorable: Add more detailed information to the panic message
...
Updates #1427
2020-12-05 19:56:06 +09:00
Hajime Hoshi
d4a2433643
Revert "graphicsdriver/opengl: Reduce creation of Float32Array"
...
This reverts commit 3c28bcf3c4
.
Reason: Tests failed: https://github.com/hajimehoshi/ebiten/runs/1496602911
2020-12-04 12:10:15 +09:00
Hajime Hoshi
3c28bcf3c4
graphicsdriver/opengl: Reduce creation of Float32Array
...
Updates #1426
2020-12-02 22:58:36 +09:00
Hajime Hoshi
44e2455c65
graphicsdriver/opengl: Avoid unnecessary creation of Uint16Array/Float32Array
...
Updates #1426
2020-12-02 20:40:28 +09:00
Hajime Hoshi
5897e1ab7c
Implement some preparation code for go2cpp
...
Updates #744
2020-11-30 23:18:42 +09:00
Hajime Hoshi
912e13071f
graphicsdriver/opengl: Refactoring
2020-11-29 23:04:00 +09:00
Hajime Hoshi
9a69c3ea9c
graphicscommand: Add 'dst-region' to String of DrawTriangles command
2020-11-27 01:48:17 +09:00
Hajime Hoshi
e7fafb5527
ebiten: Add a new log to dump update count
...
Fixes #1425
2020-11-24 22:36:32 +09:00
Hajime Hoshi
526a92256b
graphicsdriver/opengl: Refactoring: Remove shaderType
2020-11-21 23:33:25 +09:00
Hajime Hoshi
8dba7b7722
graphicsdriver/opengl: Refactoring: Remove dataType
2020-11-21 23:14:43 +09:00
Hajime Hoshi
c9060d2fa8
graphicsdriver/opengl: Remove bufferType
2020-11-21 23:07:11 +09:00
Hajime Hoshi
9c014a281a
graphicsdriver/opengl: Refactoring
2020-11-21 23:00:57 +09:00
Hajime Hoshi
859d247093
graphicsdriver/opengl: Refactoring
2020-11-21 22:49:49 +09:00
Hajime Hoshi
ddc8115b51
graphicsdriver/opengl: Refactoring: remove ensureGL
2020-11-21 22:09:58 +09:00
Hajime Hoshi
dd46221968
graphicsdriver/opengl: Enable dFdx for mobiles
...
Fixes #1404
2020-11-21 19:40:11 +09:00
Hajime Hoshi
b72848dc97
shaderir: Bug fix: Test failures
...
Updates #1404
2020-11-21 19:17:31 +09:00
Hajime Hoshi
b1d7a5f595
shaderir/glsl: Enable dFdx for WebGL
...
With WebGL1, an extension is required for dFdx. On the other hand,
with WebGL2, GLSL ES 300 is required and the extension is forbidden.
This change fixes shaderir/glsl to switch the output depends on the
WebGL version.
This change also adds a new build tag 'ebitenwebgl1' forcing WebGL 1.
Updates #1404
2020-11-21 19:07:54 +09:00
Hajime Hoshi
2097312a8b
graphicsdriver/opengl: Refactoring
2020-11-21 16:44:49 +09:00
Hajime Hoshi
4df958c9fd
Avoid comparing to js.Undefined() for consistency
2020-11-21 14:25:17 +09:00
Hajime Hoshi
5d8c39028c
web: Remove unused functions
2020-11-21 01:33:09 +09:00
Hajime Hoshi
3101ffd082
uidriver/glfw: Bug fix: Add more mutex locks for callbacks
...
Updates #1358
2020-11-18 20:43:29 +09:00
Hajime Hoshi
91b01ff83d
uidriver/glfw: Replace thread usages with mutex usages for performance
...
Updates #1358
2020-11-18 19:45:15 +09:00
Hajime Hoshi
14070ee153
uidriver: Copy the runes on the callee sides
2020-11-18 19:37:12 +09:00
Hajime Hoshi
ed494dbf59
restorable: Reland: Do not record pixels if restoring is not requried
...
This change also remove the restrictions of operations on
graphicscommand.Image. For example, now DrawTriangles and
ReplacePixels can be mixed on the same image.
Fixes #1022
2020-11-14 15:00:16 +09:00
Hajime Hoshi
257d747f7d
shareable: Refactoring
2020-11-14 13:15:42 +09:00
Hajime Hoshi
d179dab314
shareable: Refactoring
2020-11-14 01:03:18 +09:00
Hajime Hoshi
86a0c7aa82
graphicsdriver/opengl: Use PBO when retrieving pixels
2020-11-13 09:10:56 +09:00
Hajime Hoshi
0366103b2e
shareable: Bug fix: Crash when syncing pixels of a disposed image
...
When an image was disposed, the image was not unregistered from the
set of 'imagesToMakeShared'. This caused a crash when trying to sync
the pixel data of the disposed image.
This change fixes the issue by unregistering the image when the
image is disposed.
Fixes #1421
2020-11-12 23:37:51 +09:00
Hajime Hoshi
ddfb8adbc4
graphicsdriver/metal: Asynchronous sending pixels
...
Fixes #1418
2020-11-10 22:48:03 +09:00
Hajime Hoshi
5705dc79fb
graphicsdriver/metal: Do not need to wait until flushing at Sync
2020-11-10 22:12:26 +09:00
Hajime Hoshi
99b4a3096a
graphicsdriver/opengl: Use Go const values instead of getting them dynamically
2020-11-08 19:23:32 +09:00
Hajime Hoshi
e09f3aa286
graphicsdriver/metal/mtl: Bug fix: Fix the guard range
2020-11-08 04:44:43 +09:00
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
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
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
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
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
831c7ca6f4
restorable: Refactoring: Use the smaller empty image
2020-10-31 03:06:44 +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
61bf10e73e
uidriver/glfw: Bug fix: Do not iconify the fullscreen window automatically
...
Fixes #1405
2020-10-27 03:14:55 +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
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
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
185e367295
shader: Implement cap function
...
Fixes #1361
2020-10-17 23:36:09 +09:00
Hajime Hoshi
c051acd6f2
graphicscommand: Remove the dependency on internal/thread
2020-10-17 20:43:17 +09:00
Hajime Hoshi
f39f80c7c3
uidriver/glfw: Refactoring
2020-10-17 17:45:29 +09:00
Hajime Hoshi
e7a3d29af5
clock: Update a comment
2020-10-17 16:08:41 +09:00
Hajime Hoshi
974ec525fa
uidriver/glfw: Refactoring
2020-10-17 15:09:12 +09:00
Hajime Hoshi
33fd7c935a
uidriver/glfw: Avoid (*thread).Call when possible at (*UserInterface).loop
...
Updates #1367
2020-10-17 06:08:15 +09:00
Hajime Hoshi
cbb70d045c
uidriver/glfw: Eliminate (*thread).Call at (*UserInterface).update
...
Updates #1367
2020-10-17 06:03:38 +09:00
Hajime Hoshi
ee50f611ee
uidriver/glfw: Reduce (*thread).Call at (*UserInterface).updateSize
...
Updates #1367
2020-10-17 05:53:21 +09:00
Hajime Hoshi
d9906835ad
uidriver/glfw: Reduce (*thread).Call at (*UserInterface).update
...
Updates #1367
2020-10-17 05:33:34 +09:00
Hajime Hoshi
1864c22ad6
uidriver/glfw: Reduce (*thread).Call at (*Input).update
2020-10-17 05:22:23 +09:00
Hajime Hoshi
495b2b722a
uidriver/glfw: Reduce (*thread).Call at (*UserInterface).update
2020-10-17 04:38:15 +09:00
Hajime Hoshi
7762f5dcec
uidriver/glfw: Reduce (*thread).Call
2020-10-17 04:33:34 +09:00
Hajime Hoshi
1db7bed2a7
uidriver/glfw: Refactoring
2020-10-17 02:57:03 +09:00
Hajime Hoshi
d2c4a6fc9f
graphicscommand: Remove unnecessary comments
2020-10-17 02:45:35 +09:00
Hajime Hoshi
770661c609
driver: Refactoring: Remove (UIContext).Draw
2020-10-15 01:27:50 +09:00
Hajime Hoshi
20b4a28801
graphicscommand: Unexport RunOnMainThread
2020-10-14 23:37:28 +09:00
Hajime Hoshi
fe6a2daef4
graphicsdriver/metal: Bug fix: Had to set the vsync state again at resetting
...
Fixes #1364
2020-10-14 01:58:56 +09:00
Hajime Hoshi
249e1c46ba
graphicsdriver/metal: Remove an old comment
...
Updates #1367
2020-10-14 01:51:18 +09:00
Hajime Hoshi
eed619ad0f
graphicsdriver/metal, graphicsdriver/opengl: Reland: Remove the thread usages for performance
...
Instead, graphicscommand package has a thread.
Updates #1367
2020-10-13 02:46:31 +09:00
Hajime Hoshi
713eee1117
Revert "graphicsdriver/metal, graphicsdriver/opengl: Remove the thread usages for performance"
...
This reverts commit 2942f10d9d
.
Reason: Compile error on mobiles and runtime error on browsers
2020-10-13 02:12:02 +09:00
Hajime Hoshi
2942f10d9d
graphicsdriver/metal, graphicsdriver/opengl: Remove the thread usages for performance
...
Instead, graphicscommand package has a thread.
Updates #1367
2020-10-13 01:50:54 +09:00
Hajime Hoshi
b2d618c2be
mipmap, shareable: Refactoring: Remove SetGraphicsDriver
2020-10-13 01:36:52 +09:00
Hajime Hoshi
3c21246db5
uidirve/js: Bug fix: Fix key codes for Edge browser
...
Updates #1382
2020-10-11 19:03:49 +09:00
Hajime Hoshi
5ee3fdf628
ebiten: Add KeySuper
...
Fixes #1382
2020-10-11 18:40:40 +09:00
Hajime Hoshi
7f55fdf769
uidriver/js: Stop auto-focusing on loading when the page is in an iframe
...
Fixes #1373
2020-10-10 15:52:33 +09:00
Hajime Hoshi
b1c67c7661
ebiten: Introduce type TouchID
...
Fixes #604
2020-10-10 03:57:47 +09:00
Hajime Hoshi
809b7a3afa
ebiten: Introduce type GamepadID
...
Updates #604
2020-10-08 01:57:08 +09:00
Hajime Hoshi
dc288d37f8
Bug fix: Compile error for Wasm
2020-10-07 02:23:45 +09:00
Hajime Hoshi
ee4ebaaa95
Clean up the 'js' build tags
...
Updates #1129
2020-10-07 02:07:03 +09:00
Hajime Hoshi
7a0e31a23a
Clean up the 'js' build tags
...
Updates #1129
2020-10-07 01:33:10 +09:00
Hajime Hoshi
00f3d83d4c
Remove supporting GopherJS
...
Fixes #1129
2020-10-07 01:10:09 +09:00
Hajime Hoshi
41cf90a321
ebiten: Change the default value of IsRunningOnUnfocused to be true
...
Fixes #1180
2020-10-07 00:30:49 +09:00
Hajime Hoshi
c6053bcf14
ebiten: Remove the error returning value from NewImage
...
Updates #1380
2020-10-06 00:48:56 +09:00
Hajime Hoshi
448a863eb1
ebiten: Remove FilterDefault
...
Fixes #503
2020-10-05 01:48:47 +09:00
Hajime Hoshi
fe97e7b0a5
ebiten: Remove the filter argument from NewImage and NewImageFromImage
...
Updates #503
2020-10-05 01:40:44 +09:00
Hajime Hoshi
2dadc6a7a9
ebiten: Make AddressUnsafe default
...
Fixes #1228
2020-10-04 23:49:35 +09:00
Hajime Hoshi
8f00c8fbf5
ebiten: Remove the argument from Update
...
Fixes #1260
2020-10-04 19:33:10 +09:00
Hajime Hoshi
e90b5ff277
Update import paths in the documents
2020-10-04 05:07:08 +09:00
Hajime Hoshi
bf515bb594
Update version to v2.0.0-alpha
2020-10-04 04:30:40 +09:00
Bui Quoc Trong
0d29979296
Fix the comment style cause heading in pkgsite ( #1369 )
2020-09-29 16:55:39 +09:00
Hajime Hoshi
9890dc51da
uidriver/glfw: Bug fix: Need to call updateVsync after setWindowSize
...
Fixes #1363
2020-09-22 18:45:56 +09:00
Hajime Hoshi
3c71eba446
shaderir: Bug fix: Implement atan2 for Metal correctly
...
Fixes #1360
2020-09-22 04:29:34 +09:00
Hajime Hoshi
ee52c88e98
uidriver/glfw: Bug fix: Set the correct window size when going back from fullscreen
2020-09-21 19:20:58 +09:00
Hajime Hoshi
3fc328db8d
uidriver/glfw: Adjust monitor sizes with math.Ceil
...
deviceScaleFactor() sometimes returns an unnice value (e.g.,
1.502361). Add math.Ceil whenever the calculation involves the
device scale factor.
2020-09-21 18:52:27 +09:00
Hajime Hoshi
f3ef2e2af5
Performance optimization for the path without a shader
...
Fixes #1355
2020-09-21 05:43:24 +09:00
Hajime Hoshi
cb73230301
graphics: Revive the special allocating method for vertices for Wasm
...
It looks like the allocation cost is pretty high even on Wasm.
Revive the special method not only on GopherJS but also on Wasm.
examples/sprites kept 30FPS without this fix, but keeps 35FPS with
this fix, on Hajime's MacBook Pro 2020 (macOS Catalina 10.15.6).
Updates #797
2020-09-21 04:21:21 +09:00
Hajime Hoshi
8d17ec837a
shareable: Refactoring
2020-09-21 01:58:00 +09:00
Hajime Hoshi
138d9b8e47
shareable: Bug fix: Wrong offset calculation
2020-09-21 01:52:21 +09:00
Hajime Hoshi
41564533f9
ebiten: Allow SubImage at DrawRectShader
2020-09-20 04:48:10 +09:00
Hajime Hoshi
28ce1fc3fb
uidriver/glfw: Bug fix: Compile failure
2020-09-19 01:32:33 +09:00
Hajime Hoshi
51f06139a6
uidriver/glfw: Bug fix: Treat X scale (HiDPI) correctly
...
Fixes #1350
2020-09-19 01:24:18 +09:00
Hajime Hoshi
40e35fa047
uidriver/glfw: Bug fix: Unscale the size for framebuffers on Linux/UNIX
...
Fixes #1307
2020-09-19 01:04:18 +09:00
Hajime Hoshi
97607f5779
graphicsdriver/glfw: Bug fix: Convert window size unit correctly on Linux/UNIX
...
Updates #1307
2020-09-19 00:31:34 +09:00
Hajime Hoshi
5278a7c6d6
uidriver/glfw: Bug fix: Use the correct scale for GLFW APIs on Linux/UNIX
...
Updates #1307
2020-09-19 00:21:10 +09:00
Hajime Hoshi
632b985448
devicescale: Ignore the base scale
...
The window might be too bit when the base scale is 2.
Updates #1307
Updates #1350
2020-09-18 03:48:42 +09:00
Hajime Hoshi
5f3d6dbc19
devicescale: Choose the correct Cinnamon monitor configuration
...
Updates #1307
2020-09-18 01:07:48 +09:00
Hajime Hoshi
da94f3c2cb
devicescale: Bug fix: Base-scale should be multiplied on Cinnamon
...
Updates #1307
2020-09-18 00:19:16 +09:00
Hajime Hoshi
65759f33a3
devicescale: Refactoring
2020-09-18 00:11:18 +09:00
Hajime Hoshi
3dab49fc39
graphicsdriver/opengl: Better error message
2020-09-17 20:35:57 +09:00
Hajime Hoshi
ab004031d0
shader: Reland: Bug fix: Checking unused variables defined with var
2020-09-17 17:46:35 +09:00
Hajime Hoshi
ac971f77c5
Revert "shader: Bug fix: Checking unused variables defined with var"
...
This reverts commit 4d3d3134d5
.
Reason: Test failures
2020-09-17 17:32:07 +09:00
Hajime Hoshi
4d3d3134d5
shader: Bug fix: Checking unused variables defined with var
2020-09-17 17:29:37 +09:00
Hajime Hoshi
ded223ead0
shader: Bug fix: selector is not available on a blank identifier
2020-09-14 03:41:25 +09:00
Hajime Hoshi
e1d8629189
shader: Bug fix: a blank identifier lhs and += cannot work
2020-09-14 00:51:27 +09:00
Hajime Hoshi
fd51abfb0d
shader: Bug fix ++/-- must not be applied to a blank identifier
2020-09-14 00:32:47 +09:00
Hajime Hoshi
7666987b09
shader: Bug fix: a blank identifier cannot be used as values
2020-09-13 23:55:25 +09:00
Hajime Hoshi
154f86e6c1
shader: Check unused local variables
...
Fixes #1328
2020-09-13 22:36:41 +09:00
Hajime Hoshi
e543d4f107
shader: Bug fix: true/false should be available as a local variable
2020-09-13 20:38:51 +09:00
Hajime Hoshi
a5af597594
shader: Forbid assigning to special variables
2020-09-13 05:19:20 +09:00
Hajime Hoshi
ed4a7e1856
shader: Forbid init functions
...
Fixes #1331
2020-09-12 19:50:23 +09:00
Hajime Hoshi
de4ff71544
devicescale: Read ~/.config/cinnamon-monitors.xml on Cinnamon
...
Updates #1307
2020-09-12 19:15:11 +09:00
Hajime Hoshi
8833e46c7e
shader: Refactoring
2020-09-12 18:54:36 +09:00
Hajime Hoshi
a0db26f234
ebiten: Bug fix: Test failuer (TestShaderWrongReturn)
2020-09-12 18:36:22 +09:00
Hajime Hoshi
d001f49ad7
shader: Bug fix: Treat multiple-context at return correctly
2020-09-12 17:44:04 +09:00
Hajime Hoshi
2fb1033183
shader: Initialize output parameters explicitly
2020-09-12 00:35:14 +09:00
Hajime Hoshi
99dcb14582
shaderir/glsl: Refactoring
2020-09-10 02:11:21 +09:00
Hajime Hoshi
e1ae9bdde0
shaderir/glsl, shaderir/metal: Refactoring
2020-09-10 02:04:28 +09:00
Hajime Hoshi
337f44c916
shader: Add Metal tests
...
Fixes #1340
2020-09-10 01:19:02 +09:00
Hajime Hoshi
031f8376e9
shaderir: Refactoring
2020-09-08 03:51:29 +09:00
Hajime Hoshi
3b040e5f22
Fix test failures
2020-09-08 03:10:59 +09:00
Hajime Hoshi
1786be55f7
shader: Refactoring
2020-09-08 02:43:41 +09:00
Hajime Hoshi
0a0401e217
shader: Refactoring: Simplify calculation of LocalVarIndexOffset
2020-09-08 02:42:43 +09:00
Hajime Hoshi
41d4fc288b
shader: Reword
2020-09-08 01:40:49 +09:00
Hajime Hoshi
f61a916e4a
shaderir/glsl: Bug fix: Calculate local variable indices correctly
...
Fixes #1339
2020-09-08 00:19:07 +09:00
Hajime Hoshi
4308bbbc31
shader: Check the existence of 'return'
2020-09-06 22:33:27 +09:00
Hajime Hoshi
e0b8b9945f
shader: Check returning value types and the number
2020-09-06 22:08:57 +09:00
Hajime Hoshi
52fcab7a90
graphicsdriver/metal: Fix comments
2020-09-06 16:51:44 +09:00
Hajime Hoshi
e565433fb0
graphicsdriver/metal: Bug fix: Synchronizing textures on iOS was necessary
...
Fixes #1337
2020-09-06 16:19:50 +09:00
Hajime Hoshi
20ccafce4b
uidriver/mobile: Bug fix: Freezing on Pixel 4a by force calling DoWork
...
When the two channels don't receive for a while, call DoWork forcibly to avoid
freeze.
In theory, this timeout should not be necessary. However, it looks like this
'select' statement sometimes blocks forever on some Android devices like
Pixel 4(a). Apparently workAvailable sometimes not receives even though there
are queued OpenGL functions. Call DoWork for such case as a symptomatic
treatment.
Calling DoWork without waiting for workAvailable is safe. If there are no tasks,
DoWork should return immediately.
Updates #1322
Fixes #1332
2020-09-06 14:34:12 +09:00
Hajime Hoshi
29c7b7687f
shaderir: Add Program.UniformNames
...
Updates #1324
2020-09-06 03:41:17 +09:00
Hajime Hoshi
ac30377297
graphicscommand: Bug fix: Adjusting source regions must be done before checking merging
...
Fixes #1333
2020-09-05 00:42:51 +09:00
Hajime Hoshi
68c43bb4fb
graphicsdriver/opengl: Enable to compile with gldebug tag for gomobile
2020-09-04 15:08:40 +09:00
Hajime Hoshi
760225df75
glfw: Replace the pointer size calc with bits.UintSize / 8
...
Updates #1306
2020-09-04 01:18:42 +09:00
Hajime Hoshi
ee15e06c50
glfw: Remove some suspicious codes depending on the memory layout
2020-09-04 01:10:39 +09:00
Hajime Hoshi
a3b41515a9
ui: Replace the native window's type (unsafe.Pointer) with uintptr
...
Updates #1306
2020-09-04 00:51:48 +09:00
Hajime Hoshi
55f0c983ba
shader: Bug fix: Ignore blank identifiers for the duplication check
...
Fixes #1330
2020-09-03 03:03:06 +09:00
Hajime Hoshi
4ac11bf156
shader: Bug fix: Treat number literals in function calls correctly
2020-09-03 02:45:22 +09:00
Hajime Hoshi
0b1d29b6e7
shader: Bug fix: Returning value's integer literals were wrong
2020-09-03 02:10:52 +09:00
Hajime Hoshi
f5829b2cf3
shader: Check at least one variable on left side of :=
...
Updates #1330
2020-09-03 01:15:41 +09:00
Hajime Hoshi
8336cb6007
uidriver/mobile: Refactoring
2020-08-31 23:28:00 +09:00
Hajime Hoshi
f332fa61c1
uidriver/mobile: Refactoring
2020-08-31 01:01:36 +09:00
Hajime Hoshi
8c779447db
shader: Friendly error messages when local variable names are duplicated
...
Fixes #1254
2020-08-30 21:22:10 +09:00
Hajime Hoshi
349faa0f34
thread: Use an error value instead of context.Context
2020-08-30 02:18:12 +09:00
Hajime Hoshi
1ed2b09ba0
uidriver/glfw: Ensure that canceling happens after all the queued tasks are done
2020-08-29 23:27:20 +09:00
Hajime Hoshi
deb3d4a0c3
uidriver/mobile: Bug fix: Freeze on Pixel 4
...
An Ebiten application often freezes on Pixel 4. Apparently adding
loggings or runtime.Gosched hides the issue, though this doesn't fix
the root cause. The root cause might be in gomobile itself, but it
seeems really hard to make a minimum case.
As a tentative fix, add runtime.Gosched to avoid freezing.
Fixes #1322
2020-08-29 22:02:54 +09:00
Hajime Hoshi
e19f38bd4f
uidriver/mobile: Refactoring
2020-08-29 03:02:20 +09:00
Hajime Hoshi
12878571f6
uidriver/mobile: Refactoring
2020-08-29 02:48:06 +09:00
Hajime Hoshi
b76c34336d
uidriver/mobile: Reduce mutex usages
2020-08-29 00:24:30 +09:00
Hajime Hoshi
91aa6a0f3a
mobile/ebitenmobileview: Remove mutex usages
2020-08-29 00:18:42 +09:00
Hajime Hoshi
0f21829867
shareable: Bug fix: Add the padding to the offsets when there are no sources
...
Fixes #1320
2020-08-27 03:42:23 +09:00
Hajime Hoshi
12e5617396
uidriver/glfw: Update comments
2020-08-24 04:07:08 +09:00
Hajime Hoshi
932d599c98
uidriver/glfw: Bug fix compilation failure on macOS and Windows
2020-08-24 03:31:46 +09:00
Hajime Hoshi
a7d234e3c8
uidriver/glfw: Refactoring: make currentMonitorByOS more explicit
2020-08-24 03:27:38 +09:00
Hajime Hoshi
9bff1c79be
uidriver/glfw: Refactoring
2020-08-24 03:05:38 +09:00
Hajime Hoshi
af6961fc17
uidriver/glfw: Bug fix: isInitWindowMaximized didn't unlock the mutex
2020-08-24 02:55:31 +09:00
Hajime Hoshi
b1bc06935a
uidriver/glfw: Update comments
2020-08-24 00:57:48 +09:00
Hajime Hoshi
ed3a4a734e
uidriver/glfw: Refactoring
2020-08-24 00:34:57 +09:00
Hajime Hoshi
9f8054c2d5
uidriver/glfw: Misspelling
2020-08-24 00:10:43 +09:00
Hajime Hoshi
07480ed66d
uidriver/glfw: Add better fallbacks for currentMonitorFromPosition
...
Updates #1119
2020-08-23 23:38:03 +09:00
Hajime Hoshi
10d6a3ad67
uidriver/glfw: Bug fix: Crash on Wine when getting a monitor
2020-08-23 02:31:52 +09:00
Hajime Hoshi
77fa0cb9ef
ui: Add SetInitFocused
...
Fixes #769
2020-08-23 02:19:09 +09:00
Hajime Hoshi
dea716c9a6
uidriver: Remove force focusing by clicking the body
...
As long as the game is embedded in an iframe, this is no longer
needed.
2020-08-22 18:40:34 +09:00
Hajime Hoshi
bd888f62b9
graphicsdriver/opengl: Exclude bytes.go from non-mobile environments
...
This requires reflect and reflect prevents Ebiten from being compiiled
with TinyGo.
Updates #747
2020-08-20 22:24:21 +09:00
Hajime Hoshi
85d172c673
uidriver/mobile: Bug fix: The context didn't recovered on gomobile-build
...
Updates #1176
2020-08-19 23:59:27 +09:00
Hajime Hoshi
7329880f40
restorable: Make the image stale when volatile state changes
2020-08-19 21:13:05 +09:00
Hajime Hoshi
8aef1f9080
restorable: Enable to set the 'volatile' state later
...
Updates #1309
2020-08-19 00:57:23 +09:00
Hajime Hoshi
c921a63c21
graphicsdriver/opengl/gl: Bug fix: Crash on Parallels
...
Fixes #1310
2020-08-18 04:33:59 +09:00
Hajime Hoshi
64a6b39240
Revert "restorable: Do not record pixels if restoring is not requried"
...
This reverts commit 5e1f263d6d
.
Reason: Issue #1304
2020-08-17 00:00:12 +09:00
Hajime Hoshi
5e1f263d6d
restorable: Do not record pixels if restoring is not requried
...
Fixes #1022
2020-08-16 20:07:17 +09:00
Hajime Hoshi
a9b94a183b
shader: Implement swapping variables
...
Fixes #1248
2020-08-16 18:40:45 +09:00
Hajime Hoshi
06ed4f5444
shader: Implement len function
...
Fixes #1279
2020-08-16 02:07:39 +09:00
Hajime Hoshi
a67fd4a2b3
mipmap: Bug fix: Adopt 32 for tooBigScale
...
I found the case that 64 was not enough on Huawei ALE-L02.
2020-08-15 15:39:27 +09:00
Hajime Hoshi
71e65fa1b7
cmd/ebitenmobile: Use an explict way to detect context lost on Android
...
Fixes #1176
2020-08-15 01:39:08 +09:00
Hajime Hoshi
d48770cb1c
png: Update for Go 1.15
2020-08-14 03:25:02 +09:00
Hajime Hoshi
7307a148f5
glfw: Use Dockerfile for ease to generate the embedding files for Windows
...
As MinGW version is specified, the result should be more deterministic.
Fixes #1201
2020-08-14 01:34:58 +09:00
Hajime Hoshi
d73472f4f2
Use the library style of file2byteslice
2020-08-14 00:50:09 +09:00
Hajime Hoshi
f6c3e0579f
shaderir: Adopt the precision 10 for float literals
...
Adopted the same precision of (*math/big.Float).String().
2020-08-13 00:01:16 +09:00
Hajime Hoshi
50cd33ed9b
shader: Bug fix: Use integer literals in the integer context
...
Fixes #1299
2020-08-12 13:47:22 +09:00
Hajime Hoshi
39d829d3bf
shader: Check the index is an exact integer
2020-08-12 13:47:22 +09:00
Hajime Hoshi
18732ca879
shader: Bug fix: Wrong type deduction with int(x)
...
Fixes #1298
2020-08-12 12:16:22 +09:00
Hajime Hoshi
d4042a5cfa
ebiten: Bug fix: Source regions should not be passed when not needed
...
The source region information affects the condition of merging
graphics commands. To avoid performance issues by the big number of
graphcis commands, do not pass the source region whenever possible.
Fixes #1293
2020-08-12 02:12:35 +09:00
Hajime Hoshi
08270ee729
shader: Enable to parse ... in an array type
2020-08-11 23:51:22 +09:00
Hajime Hoshi
f71346da6c
shaderir: Add bool/int/float conversion
...
Updates #1289
2020-08-11 23:04:55 +09:00
Hajime Hoshi
609a3c4e22
ebiten: Bug fix: Fix the texel calculation
...
In shaders, texCoord is always in texture0's texels. Convert them
at imageNTextureAt functions correctly.
Fixes #1290
2020-08-11 04:15:07 +09:00
Hajime Hoshi
69f87d5fd1
ebiten: Add new shader builtin functions: image[N]TextureBoundAt
...
Fixes #1287
2020-08-11 03:24:54 +09:00
Hajime Hoshi
523dc6f2a0
graphicscommand: Add comments
2020-08-11 03:17:50 +09:00
Hajime Hoshi
985ff2d43f
graphicscommand: 0th image must be adopted to calculate the size
2020-08-11 01:38:00 +09:00
Hajime Hoshi
ee049a19ac
shader: Bug fix: Wrong local variable index in a block in the fragment entry point
2020-08-10 02:29:49 +09:00
Hajime Hoshi
9b6b306ca3
shader: Bug fix: Wrong local variable index in a block in an entry point
2020-08-10 02:22:09 +09:00
Hajime Hoshi
4d20da9bc0
shader: Refactoring
2020-08-10 02:02:26 +09:00
Hajime Hoshi
e534fe8246
shader: Add more tests using a for-loop
2020-08-10 01:14:42 +09:00
Hajime Hoshi
5d2606b6a5
shader: Bug fix: Wrong local variable indices in blocks
2020-08-10 01:09:02 +09:00
Hajime Hoshi
240e20ad87
shader: Bug fix: Wrong variable index at declaration
2020-08-09 23:23:40 +09:00
Hajime Hoshi
a0494210c3
shader: Bug fix: Wrong local variable index in a block
2020-08-09 23:14:28 +09:00
Hajime Hoshi
eacc9fac6a
shader: Indexing with non-consntat value should be allowed
2020-08-09 22:50:53 +09:00
Hajime Hoshi
5dc0d4e1a4
shader: Add more tests about 'for' loops
2020-08-09 22:26:57 +09:00
Hajime Hoshi
dee8690502
shaderir/glsl: Bug fix: Copying an array did not work on GLSL
...
Fixes #1286
2020-08-09 22:18:58 +09:00
Hajime Hoshi
646518f2e8
shaderir: Fix the test side: local variables for 'for' stmts must be reserved
2020-08-09 22:12:35 +09:00
Hajime Hoshi
b73fecae79
shaderir: Add tests for different counter types
2020-08-09 21:44:06 +09:00
Hajime Hoshi
2707915376
shaderir/glsl, shaderir/metal: Bug fix: Wrong local variables with multiple 'for' statements
2020-08-09 20:12:56 +09:00
Hajime Hoshi
80361443cc
shaderir/glsl, shaderir/metal: Bug fix: Wrong local variables in for
2020-08-09 20:06:13 +09:00
Hajime Hoshi
ee9257e626
shaderir: Use pointers for Block
2020-08-09 18:00:55 +09:00
Hajime Hoshi
07514a37c8
shaderir/glsl: Bug fix: Initialize an array
...
Updates #1285
2020-08-09 04:59:29 +09:00
Hajime Hoshi
febdc46ad5
shaderir/metal: Better array initialization
...
Updates #1285
2020-08-09 04:40:15 +09:00
Hajime Hoshi
a536b3ee25
shaderir/metal: Bug fix: Array initialization
...
Updates #1285
2020-08-09 04:22:12 +09:00
Hajime Hoshi
4d1947f711
grpahicsdriver/metal: Better error message
2020-08-09 04:06:30 +09:00
Hajime Hoshi
00a92a21a3
shader: Add compilation tests for Metal
2020-08-08 21:29:01 +09:00
Hajime Hoshi
a45e241da1
shaderir/metal: Implement the shader IR compiler for Metal
...
Fixes #1165
2020-08-08 19:14:57 +09:00
Hajime Hoshi
18b3859e20
shaderir: Export IsValidSwizzling
...
This is a preparation for compiling the IR to Metal.
Updates #1165
2020-08-08 19:08:10 +09:00
Hajime Hoshi
2b89710600
graphicsdriver/metal: Refactoring
2020-08-08 18:05:58 +09:00
Hajime Hoshi
caad187cd3
testing: Bug fix: Wrong attribute variables
2020-08-08 17:42:54 +09:00
Hajime Hoshi
6dc74d308b
graphicsdriver/metal: Rename viewportSize to internalSize and use it more
2020-08-08 16:07:14 +09:00
Hajime Hoshi
b4046a795e
graphics: Reduce the usage of InternalImageSize
2020-08-08 16:01:33 +09:00
Hajime Hoshi
fe1cea533a
graphicsdriver/metal: Add a generalized 'draw' function
...
This is a preparation for rendering shaders.
Updates #1165
2020-08-08 03:12:44 +09:00
Hajime Hoshi
28c638cb5b
graphicsdriver/opengl: Unexpose NewShader
2020-08-08 03:12:44 +09:00
Hajime Hoshi
ae28b83d45
testing: Fix wrong comments
2020-08-07 12:26:00 +09:00
Hajime Hoshi
00ccc8ad85
shaderir/glsl: Refactoring
2020-08-07 01:53:22 +09:00
Hajime Hoshi
6576a1da76
shaderir/glsl: Refactoring
2020-08-06 17:53:28 +09:00
Hajime Hoshi
6003d85f75
shaderir: Remove some builtin functions
...
'degrees' and 'radians' are not defined in Metal.
2020-08-05 02:06:28 +09:00
Hajime Hoshi
ffee5eb6b8
shaderir/glsl: Fix the panic messages
2020-08-05 01:50:41 +09:00
Hajime Hoshi
c22ec580bc
shaderir: Remove bultin functions for bvec
2020-08-05 01:41:06 +09:00
Hajime Hoshi
fb59901609
graphicscommand: Bug fix: build error
2020-08-04 01:08:29 +09:00
Hajime Hoshi
cf2f7009aa
graphicscommand: Allow shader tests on browsers
...
Updates #1166
2020-08-04 00:59:27 +09:00
Hajime Hoshi
8bac08cbd9
Add internal/shaderir/glsl
2020-08-03 23:27:27 +09:00
Hajime Hoshi
79e252c158
shaderir: Refactoring
2020-08-02 00:09:12 +09:00
Hajime Hoshi
fa60e31997
shaderir: Bug fix: Pass tests
2020-08-01 21:22:47 +09:00
Hajime Hoshi
4bd01fd038
graphicsdriver/opengl: Implement shaders for browsers
...
Fixes #1166
2020-08-01 20:27:46 +09:00
Hajime Hoshi
bab05874cd
shaderir: Remove unnecessary empty lines
2020-08-01 19:04:10 +09:00
Hajime Hoshi
38dcadb233
graphicsdriver/opengl: Add program error info to the error
2020-08-01 18:58:05 +09:00
Hajime Hoshi
a4334c5464
shader: Use arrays at uniform variables
...
Fixes #1274
2020-08-01 17:22:10 +09:00
Hajime Hoshi
2b4cf7fd17
shader: Remove unnecessary Println
2020-08-01 16:47:17 +09:00
Hajime Hoshi
073fd329f2
graphicsdriver/opengl: Enable to pass any type of uniform variables
...
Updates #1274
2020-08-01 05:11:24 +09:00
Hajime Hoshi
a50ef46ed0
graphicsdriver/opengl: Do not allow nil value for uniform variables
2020-08-01 02:01:51 +09:00
Hajime Hoshi
da5642cd0e
graphicsdriver/opengl: Add type checks of uniform variables
2020-08-01 02:01:51 +09:00
Hajime Hoshi
ac16564e95
shaderir: Add indexing
...
Fixes #1235
2020-07-29 23:49:57 +09:00
Hajime Hoshi
a0549820fd
shadeir: Add array composite literals
...
Updates #1235
2020-07-29 23:49:54 +09:00
Hajime Hoshi
004b279e4f
shader: Add array initialization
...
Updates #1235
2020-07-29 22:43:51 +09:00
Hajime Hoshi
62fbac2290
mipmap: Bug fix: HasHighPrecisionFloat cannot be called before the main loop
...
Instead, use the common number for the too-big scale.
Fixes #1270
2020-07-29 12:46:09 +09:00
Hajime Hoshi
2dc6cbe51a
shader: Make parseType return a boolean value indicating ok
2020-07-29 12:02:07 +09:00
Hajime Hoshi
d9c54bc0d0
shader: Implement an array variable
...
Updates #1235
2020-07-29 02:27:05 +09:00
Hajime Hoshi
da98e67345
mipmap: Bug fix: Wrong level calculation when the indices are empty
...
Fixes #1269
2020-07-28 14:02:51 +09:00
Hajime Hoshi
a43efb66b2
shaderir: Bug fix: Function prototypes were required for GLSL
...
Fixes #1267
2020-07-28 00:04:03 +09:00
Hajime Hoshi
a0197d4c2f
graphicsdriver/opengl: Bug fix: Build error on Android
...
Fixes #1266
2020-07-26 17:01:11 +09:00
Hajime Hoshi
ca3fd4eaa4
ebiten: Add texture[ID]Size functions for shaders
...
Fixes #1239
2020-07-26 15:18:01 +09:00
Hajime Hoshi
d08a04a635
ebiten: Refactoring
2020-07-26 15:05:00 +09:00
Hajime Hoshi
637afe6d67
mipmap: Skip mipmap calculation if possible
...
If we know we can skip mipmap calculation from GeoM, let's skip it.
Updates #1265
2020-07-26 12:25:03 +09:00
Hajime Hoshi
d017a1b95e
Swap the order of the dependencies 'buffered and 'mipmap'
2020-07-26 12:15:23 +09:00
Hajime Hoshi
71aec36ef3
graphics: Update comments
2020-07-26 01:11:11 +09:00
Hajime Hoshi
eb056690aa
graphicsdriver/metal: Update the minimum macOS version to 10.12 for Go 1.15
2020-07-25 04:18:26 +09:00
Hajime Hoshi
75d34ab585
graphicsdriver/opengl: Forbids PBO on Raspberry Pi 4 ( #1261 )
...
Fixes #1208
2020-07-23 19:15:34 +09:00
Hajime Hoshi
bb1d08a681
shader: Remove the comments
2020-07-20 11:14:54 +09:00
Hajime Hoshi
1217db3b1e
ebiten: Remove user-defined vertex shaders
...
Fixes #1253
2020-07-20 10:07:55 +09:00
Hajime Hoshi
29d53edf1d
graphicsdriver/opengl: Bug fix: Rename the attribute variables along with custom shaders
2020-07-20 04:06:35 +09:00
Hajime Hoshi
c8fa937a0a
shaderir: Format
2020-07-20 02:12:31 +09:00
Hajime Hoshi
5506491c03
graphicsdriver/opengl: Bug fix: Binding the same texture multiple times did not work
...
Updates #1193
2020-07-19 04:34:53 +09:00
Hajime Hoshi
36e9803cea
shader: Enable to get pixels from multiple images
...
Updates #1193
2020-07-19 02:33:43 +09:00
Hajime Hoshi
5dd073fcbb
restorable, graphicscommand: Remove uniform variables
2020-07-19 01:55:01 +09:00
Hajime Hoshi
fe79bb27af
graphicscommand: Refactoring
2020-07-18 23:25:16 +09:00
Hajime Hoshi
6ccb614b08
graphicsdriver/metal: Implement CompositeModeMultiply
...
Updates #410
2020-07-18 21:51:57 +09:00
nanoslayer
72babcd420
ebiten: Add CompositeModeMultiply ( #1251 )
...
This change adds a new composite mode called `CompositeModeMultiply`,
which multiplies the source color with the destination color.
This is tested on Linux and Windows only.
Fixes #410
2020-07-18 21:37:17 +09:00
Hajime Hoshi
4bd3bc16ac
shader: Define special variables for textures __t%d
...
This eanbles to define texture0At to texture3At.
Updates #1193
2020-07-18 19:37:50 +09:00
Hajime Hoshi
e0d5763a60
shader: Use the fixed number of images for shaders
...
This changes uses arrays rather than slices in order to avoid heap
allocations.
Updates #1193
2020-07-18 18:27:47 +09:00
Hajime Hoshi
52773e1d12
mipmap: Bug fix: Crash at DrawTrianglesWithShader
2020-07-16 23:02:33 +09:00
Hajime Hoshi
c4c9771b78
mipmap: Bug fix: Infinite loop at (*Mipmap).mipmapLevelFromDistance
2020-07-16 03:00:10 +09:00