Hajime Hoshi
daf349ab72
internal/graphicscommand: bug fix: present at the end of the frame explicitly
...
Before this change, presenting happened when the rendering destination
was the final screen. Now this assumption is wrong as the final screen
might be used in the middle of the commands due to DrawFinalScreen.
Instead, this change adds a new argument `present` to FlushCommands to
present the screen explicitly at the end of the frame.
Closes #2386
2022-10-15 01:54:46 +09:00
Hajime Hoshi
d2f6d8593b
vector: add LineCap
...
Closes #1843
2022-10-15 00:40:28 +09:00
Hajime Hoshi
599571c7a7
ebiten: add geoM argument to DrawFinalScreen
...
Updates #2046
2022-10-14 23:35:58 +09:00
Hajime Hoshi
596efc86fe
examples/lines: more dynaic effect
2022-10-14 23:26:15 +09:00
Hajime Hoshi
225bf1bbb4
vector: add StrokeOptions.MiterLimit
2022-10-14 23:25:59 +09:00
Hajime Hoshi
04680ff761
vector: refactoring
2022-10-14 22:56:15 +09:00
Hajime Hoshi
a1a598471b
vector: add LineJoin
...
Updates #1843
2022-10-14 22:11:00 +09:00
Hajime Hoshi
f5ae18d6f6
vector: add comments
2022-10-14 19:06:33 +09:00
Hajime Hoshi
d2eeca3067
examples/flappy: typo
2022-10-14 16:51:32 +09:00
Hajime Hoshi
30cc36b1ba
ebiten: add FinalScreenDrawer
...
FinalScreenDrawer is an interface for a custom screen rendering. If a
game implements FinalScreenDrawer and is passed to RunGame, its
DrawFinalScreen is called after Draw.
Also this adds `-crt` option to examples/flappy.
Closes #2046
2022-10-14 16:49:32 +09:00
Hajime Hoshi
0803342d01
examples/shader: remove the CRT effect
2022-10-14 16:14:46 +09:00
Hajime Hoshi
93c09633ee
examples/shader: bug fix: wrong function usages
...
The tex-coord should have been modified by the source texture
region/size, rather than the destination texture's.
2022-10-14 16:04:09 +09:00
Hajime Hoshi
4395d91c6b
ebiten: rename ebitenKey -> ebitengineKey
2022-10-14 03:49:02 +09:00
Hajime Hoshi
cdbe83177e
ebiten: rename Ebiten -> Ebitengine
2022-10-14 03:43:45 +09:00
Hajime Hoshi
44c90b42d4
ebiten: implement imageDumper for mobiles
...
This is a provisional implementation to clean up the code.
2022-10-14 03:19:02 +09:00
Hajime Hoshi
f15536e8de
ebiten: refactoring: remove imageDumperGame
...
This enables passing the user's Game to internal/ui without wrapping.
This is necessary to check whether the user's Game implements an
optional function or not.
Updates #2046
2022-10-14 02:58:31 +09:00
Hajime Hoshi
25ae96db89
internal/ui: move screenScaleAndOffsets to the ebiten package
...
Updates #2046
2022-10-14 01:58:07 +09:00
Hajime Hoshi
03621e22c6
internal/ui: remove unnecessary mutex
...
Now (*context).updateFrame and (*context).adjustPosition are not called
in parallel even though the goroutines might be different.
2022-10-14 01:47:52 +09:00
Hajime Hoshi
1ff4918390
ebiten: rename receivers
2022-10-14 00:38:08 +09:00
Hajime Hoshi
4bd3a9ef8f
internal/ui: refactoring: move the screen rendering logic to ebiten package
...
Updates #2046
2022-10-14 00:34:40 +09:00
Hajime Hoshi
08e6f5af86
internal/graphicsdriver: remove FramebufferYDirection
2022-10-14 00:05:59 +09:00
Hajime Hoshi
2dfdd80dc8
update documentation
2022-10-13 18:08:05 +09:00
Hajime Hoshi
c23af8fa3a
internal/ui: remove unnecessary comments
2022-10-13 12:28:32 +09:00
Hajime Hoshi
30088cf602
internal/ui: refactoring: reduce uniform variable
...
This might degrade performance, but can demonstrate how to get the
scale of the screen.
Updates #2046
2022-10-13 00:59:51 +09:00
Ronnie
913a03e247
inpututil: add new APIs for keys and gamepads ( #2383 )
...
This change adds these APIs:
* `AppendJustPressedKeys`
* `AppendJustReleasedKeys`
* `AppendPressedGamepadButtons`
* `AppendJustPressedGamepadButtons`
* `AppendJustReleasedGamepadButtons`
* `AppendPressedStandardGamepadButtons`
* `AppendJustPressedStandardGamepadButtons`
2022-10-12 16:21:52 +09:00
Hajime Hoshi
91275e8fc2
internal/ui: add comments
...
Updates #1431
2022-10-12 02:46:08 +09:00
Hajime Hoshi
27d2e8b60e
update gomobile
2022-10-11 22:47:40 +09:00
Hajime Hoshi
fe172f2151
update Oto to v2.4.0-alpha.4
2022-10-11 22:37:07 +09:00
Hajime Hoshi
99e777b0c5
internal/atlas: do not adjust pixels for DrawTriangles(Shader)
...
Adjusting pixels is needed to avoid strainge rendering to avoid unexpected
rendering (#1171 ). However, this adjustment caused unexpected holes
especially in a thick stroke.
This change moves the logic of adjusting pixels from atlas to
graphics.QuadVertices so that adjusting works only for DrawImage and
DrawRectShader.
Updates #1171
Updates #1843
2022-10-11 02:09:20 +09:00
Hajime Hoshi
1ff55bc745
vector: remove redundant MoveTo
2022-10-11 01:18:18 +09:00
Hajime Hoshi
84452b0bf8
vector: remove redundant LineTo calls before Arc
2022-10-11 01:17:13 +09:00
Hajime Hoshi
2322acbd9c
Revert "vector: improve quality of lines by removing holes"
...
This reverts commit ccfedeea1d
.
Reason: This affects the result of the line ends
2022-10-11 00:28:24 +09:00
Hajime Hoshi
ccfedeea1d
vector: improve quality of lines by removing holes
2022-10-11 00:12:35 +09:00
Hajime Hoshi
69c8fd745b
vector: add AppendVerticesAndIndicesForStroke
...
Updates #1843
2022-10-10 23:19:29 +09:00
Hajime Hoshi
a57042ebef
vector: bug fix: wrong base index
...
Closes #2379
2022-10-10 18:07:13 +09:00
Hajime Hoshi
a310b7c5bb
internal/builtinshader: fix comments
2022-10-10 13:14:37 +09:00
Hajime Hoshi
010bf69f5a
examples/vector: improve readability of the debug message
2022-10-10 00:22:57 +09:00
Hajime Hoshi
5d9acfe7ec
examples/vector: add switching anti-alias
...
This change is a proof-of-concept of anti-alias with a pseudo MSAA
effect.
Updates #663
2022-10-09 21:27:16 +09:00
Hajime Hoshi
f57fb4763c
update Oto
...
Updates hajmehoshi/oto#187
2022-10-09 17:15:44 +09:00
Hajime Hoshi
2d5da14d8f
ebiten: fix the documentation about GraphicsLibrary
2022-10-08 22:44:39 +09:00
Hajime Hoshi
cf5c74ed76
update Oto (to fix a stuttering issue)
...
Closes #2376
2022-10-07 12:23:59 +09:00
Hajime Hoshi
cb79e4eabe
internal/restorable: improve pixelsForRestore usages
...
Updates #2375
2022-10-06 15:54:54 +09:00
Hajime Hoshi
c6b37e9809
internal/restorable: use pixelsForRestore only when restoring is needed
...
Updates #2375
2022-10-06 15:09:21 +09:00
Hajime Hoshi
34562c3337
internal/restorable: clear pixelsForRestore at Dispose
...
Updates #2375
2022-10-06 15:04:12 +09:00
Hajime Hoshi
e66bac5c3f
internal/restorable: reuse byte slices for restoring
...
Updates #2375
2022-10-06 14:52:20 +09:00
Hajime Hoshi
85d8a5889a
Revert "internal/restorable: reuse bytes instead of allocations"
...
This reverts commit 8cf3c31cf6
.
Reason: This didn't improve the situation.
Updates #2375
2022-10-06 14:11:09 +09:00
Hajime Hoshi
8cf3c31cf6
internal/restorable: reuse bytes instead of allocations
...
Updates #2375
2022-10-06 12:41:47 +09:00
Hajime Hoshi
69cdd2b178
internal/graphicsdriver/metal: refactoring
2022-10-04 00:29:18 +09:00
Hajime Hoshi
940d6b11c8
ebiten: add comments about SubImage as destinations
...
Updates #2232
2022-10-03 01:56:20 +09:00
Hajime Hoshi
dcc98e78e9
ebiten: remove unnecessary casts
2022-10-03 01:25:24 +09:00