Hajime Hoshi
9c6b7aaca3
internal/ui: catch the error at At correctly
2022-03-05 01:44:59 +09:00
Hajime Hoshi
df2133186d
internal/shaderir: bug fix: test failures
2022-03-04 19:01:58 +09:00
Hajime Hoshi
3c1e64dd67
internal/shaderir/metal: bug fix: define the 'mod' function correctly
...
Closes #2006
2022-03-04 18:05:44 +09:00
Hajime Hoshi
d4d4b9c070
internal/graphicsdriver/metal, internal/graphicsdriver/opengl: more efficient modulo
2022-03-04 03:47:55 +09:00
Hajime Hoshi
ed22052e5f
internal/graphicscommand: add a comment
2022-02-28 00:15:52 +09:00
Hajime Hoshi
dd8900ea48
internal/graphicsdriver: refactoring: choose the graphics driver at this package
2022-02-27 23:51:19 +09:00
Hajime Hoshi
99f8e335ee
ebiten: refactoring
2022-02-27 22:21:57 +09:00
Hajime Hoshi
77f765d483
internal/testing: bug fix: considering the case when Y is inverted
...
Closes #2003
2022-02-27 22:14:32 +09:00
Hajime Hoshi
4ca1220671
internal/graphicscommand: bug fix: compile error, test failures
2022-02-27 20:13:21 +09:00
Hajime Hoshi
b22309a0e5
internal/graphicsdriver: replace Pixels with ReadPixels
...
Now preparing a byte slice is the caller's responsibility.
2022-02-27 20:03:13 +09:00
Hajime Hoshi
1cb7633ff6
internal/ui: bug fix: atomic.Value.Store cannot be called when a differnet type value is already stored
2022-02-27 17:41:19 +09:00
Hajime Hoshi
566957dc1c
internal/graphicsdriver/metal: invert Y at the vertex shader
...
Instead of using a negative height in the viewport, invert the Y direction
at the vertex shader. This is a little more readable as a negative height
is hacky.
This is a preparation for DirectX 12. DirectX 12's coodination system
is very similar to Metal, but doesn't treat a negative height in its
viewport unfortunately.
Updates #1007
2022-02-27 01:53:03 +09:00
divVerent
ea35296be7
ebiten: provide SetScreenFilterEnabled
, a way to disable the default screen filter ( #1997 )
...
Using FilterNearest rather than filterScreen or FilterLinear speeds up a
Dell E6500 from 23fps->36fps and 27fps->48fps.
Updates #1772
2022-02-24 03:46:27 +09:00
divVerent
f2209a0b51
internal/atlas: optimization: send premultiplied alpha from vertex to fragment shader. ( #1996 )
...
Note that this applies only to the builtin shaders - interface for Kage stays
unchanged for compatibility.
Minor compatibility delta: when interpolating alpha values, previous code has
created nonsense values, such as, when interpolating from
fully-transparent-black (0,0,0,0) to opaque-white (1,1,1,1), something like
half-transparent-grey (0.25,0.25,0.25,0.5) where half-transparent-white
(0.5,0.5,0.5,0.5) is used by the new code.
I assume this is a strict improvement, however this may warrant some testing.
Possible later improvement could be moving the premultiplication from fragment
shader to CPU. Did not do this as it makes the code rather inconsistent of Kage
vs built-in shader usage.
Updates #1772
2022-02-24 02:27:50 +09:00
divVerent
476f4e3f9a
internal/gamepad: fix SetWindowLongPtrW crash on 32-bit Windows ( #1999 )
...
Closes #1998
2022-02-23 23:18:20 +09:00
Hajime Hoshi
8b7273b74a
internal/graphicsdriver/metal: call PresentDrawable only when necessary
2022-02-22 01:37:13 +09:00
Hajime Hoshi
ee911fd892
internal/graphicsdriver/metal: fix an error message
2022-02-20 22:01:36 +09:00
Hajime Hoshi
bf33658e64
internal/gamepad: respect original names more
2022-02-15 04:07:11 +09:00
Hajime Hoshi
f17d222a4b
internal/atlas: resolve deferred every frame instead of every tick
...
Resolving defferred functions doesn't have to be done every tick. Rather,
this should be done every frame as this is related to rendering.
2022-02-14 03:45:58 +09:00
Hajime Hoshi
4949c49cd0
internal/ui: refactoring
2022-02-14 03:39:02 +09:00
Hajime Hoshi
871121abe3
internal/ui: refactoring: remove (*contextImpl).layout
2022-02-14 02:59:02 +09:00
Hajime Hoshi
cffa123405
internal/ui: refactoring: remove sizeChanged for js
...
It is safe to call Layout every frame.
2022-02-14 02:50:32 +09:00
Hajime Hoshi
e2f0878a4c
internal/ui: refactoring: remove sizeChanged
...
It is safe to call Layout every frame.
2022-02-14 02:17:52 +09:00
Hajime Hoshi
fcd4453e4f
ebiten: remove RunOnMainThread
...
Unfortunately, there are several issues in RunOnMainThread:
* RunOnMainThread cannot be portable: It is impossible to implement this
correctly on mobiles.
* RunOnMainThread doesn't make sense on mobiles: the rendering works on
a different thread (goroutine) on mobiles.
* RunOnMainThread can cause deadlocks very easily.
Until we find a better solution, let's remove this.
Closes #1945
2022-02-14 01:49:42 +09:00
Hajime Hoshi
e09c1bf8f1
internal/ui: refactoring: remove an error value from runOnAnotherThreadFromMainThread
2022-02-14 00:55:58 +09:00
Hajime Hoshi
ce3f83958e
internal/graphicscommand: rename RunOnMainThread -> RunOnRenderingThread
2022-02-14 00:20:49 +09:00
Hajime Hoshi
b695cb928a
internal/ui: remove RunWithoutMainLoop in non-mobile environments
2022-02-13 22:31:48 +09:00
Hajime Hoshi
82b9f7dc56
ebiten: refactoring: remove setScreenClearedEveryFrame
2022-02-13 20:40:46 +09:00
Hajime Hoshi
0c1c40995c
internal/ui: rename types and members: uiContext -> gameForUI
2022-02-13 20:20:46 +09:00
Hajime Hoshi
29382b424b
internal/ui: refactoring: remove some exposed functions
2022-02-13 20:09:13 +09:00
Hajime Hoshi
08defeeded
internal/ui: move more logics to internal/ui
2022-02-13 20:02:49 +09:00
Hajime Hoshi
9b2f0b6c56
internal/ui: rename ResetForFrame -> ResetForTick
...
Resetting happens every tick, not every frame.
2022-02-13 19:54:40 +09:00
Hajime Hoshi
a2cb9fda82
internal/ui: make adjustPosition concurrent-safe
2022-02-13 19:52:39 +09:00
Hajime Hoshi
31aa01131d
ebiten: refactoring: reduce call of ui.Get()
2022-02-13 19:40:48 +09:00
Hajime Hoshi
6a8e45e6c1
internal/ui: refactoring: simplify ResetForFrame
...
Updating the layout is already done every frame, so doing this in
ResetForFrame is not needed.
Updates #490
2022-02-13 19:31:35 +09:00
Hajime Hoshi
7b164882fc
internal/ui: refactoring: move AdjustPosition to the package internal/ui
2022-02-13 19:14:29 +09:00
Hajime Hoshi
08ae7006ef
internal/ui: refactoring: move some logics to internal/ui
2022-02-13 19:02:59 +09:00
Hajime Hoshi
2609d73a1a
internal/ui: refactoring: move some logics to internal/ui
2022-02-13 18:01:18 +09:00
Hajime Hoshi
b282b1805b
internal/ui: refactoring: add ui.SetError
...
This is a preparation to move uiContext to the package internal/ui.
2022-02-13 17:17:08 +09:00
Hajime Hoshi
ab1ad2c72f
.github/workflow: add a test to build with the build tag ebitencbackend
2022-02-13 16:57:48 +09:00
Hajime Hoshi
73d995740f
internal/ui: bug fix: compile error with ebitencbackend
2022-02-13 16:48:30 +09:00
Hajime Hoshi
e9cfbc1630
internal/ui: refactoring: remove Graphics()
2022-02-13 04:17:39 +09:00
Hajime Hoshi
1c57393393
internal/graphicsdriver/metal: refactoring
2022-02-13 01:00:20 +09:00
Hajime Hoshi
5f59807284
internal/gamepad: refactoring
2022-02-12 03:49:09 +09:00
Hajime Hoshi
ab5daa0f90
internal/ui: separate graphics_ios.go to each archtecture
...
This change removes the support of 32bit iOS. 32bit iOS is no longer
supported by Go 1.15.
2022-02-12 02:14:32 +09:00
Hajime Hoshi
162f62f54e
internal/graphicsdriver/metal/mtl: bug fix: test compile error
2022-02-11 23:23:22 +09:00
Hajime Hoshi
176e984a58
internal/ui: refactoring: remove dependency on the package mtl
2022-02-11 23:11:49 +09:00
Hajime Hoshi
6f3c6d6c1b
internal/graphicsdriver/meta: rename function
2022-02-11 22:47:13 +09:00
Hajime Hoshi
cc4e2f08be
internal/graphicsdriver/metal: rename files
2022-02-11 21:49:05 +09:00
Hajime Hoshi
76848f48e6
internal/ui: simplify build tags
2022-02-11 20:47:14 +09:00