Hajime Hoshi
6a51e5b003
internal/restorable: optimize WritePixels
...
This adds (*Image).makeStaleIfDependingOnWithRegion to reduce the
possibility of making an image stale.
2024-09-08 22:55:34 +09:00
Hajime Hoshi
26f0479f16
internal/restorable: typo
2024-09-08 17:06:25 +09:00
Hajime Hoshi
9ef9ea0469
internal/restorable: refactoring
2024-09-08 17:03:18 +09:00
Hajime Hoshi
b36160d9e7
internal/restorable: bug fix: make all the images stale correctly
2024-09-08 16:11:57 +09:00
Hajime Hoshi
20f8df7fc1
internal/restorable: refactoring: remove lastTarget
...
This didn't improve performance very much. Rather, this made the code
a little hard to read and could have a potential issue.
2024-09-08 16:08:36 +09:00
Hajime Hoshi
167c3435f7
internal/restorable: refactoring
2024-09-08 16:03:56 +09:00
Hajime Hoshi
1b2a2afbfb
internal/restorable: rename restoring -> restoration
2024-09-07 19:09:00 +09:00
Hajime Hoshi
35f4884a74
ebiten: add RunGameOptions.StrictContextRestration
...
This reverts commit a30f075896
.
This change adds a new option StrictContextRestration to make the
restoration optional.
Closes #3083
2024-09-07 18:36:04 +09:00
Hajime Hoshi
935e7a6d5d
Revert "internal/restorable: remove the case when the restoring is needed"
...
This reverts commit c08a2193a9
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
16d2052836
Revert "internal/restorable: remove alwaysReadPixelsFromGPU"
...
This reverts commit f3206721a3
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
81d35df33b
Revert "internal/restorable: remove unused functions and variables"
...
This reverts commit 8169253a57
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
6453e552f3
Revert "internal/restorable: remove unnecessary functions and variables around shaders"
...
This reverts commit 4f3e00ec3a
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
169b9fe51e
Revert "internal/restorable: move DumpImages to internal/atlas"
...
This reverts commit 7c9266d8b6
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
a9d8f374c8
Revert "internal/restorable: move SwapBuffers to internal/atlas"
...
This reverts commit f610cb5724
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
c2c5480878
Revert "internal/atlas: move some functions in internal/restorable to internal/atlas"
...
This reverts commit 3651d73e0b
.
Updates #3083
2024-09-07 16:54:20 +09:00
Hajime Hoshi
3651d73e0b
internal/atlas: move some functions in internal/restorable to internal/atlas
...
Updates #805
2024-01-13 14:05:24 +09:00
Hajime Hoshi
f610cb5724
internal/restorable: move SwapBuffers to internal/atlas
...
Updates #805
2024-01-09 04:55:26 +09:00
Hajime Hoshi
7c9266d8b6
internal/restorable: move DumpImages to internal/atlas
...
Updates #805
2024-01-09 04:50:22 +09:00
Hajime Hoshi
4f3e00ec3a
internal/restorable: remove unnecessary functions and variables around shaders
...
Updates #805
2024-01-09 03:23:13 +09:00
Hajime Hoshi
8169253a57
internal/restorable: remove unused functions and variables
...
Updates #805
2024-01-09 02:56:15 +09:00
Hajime Hoshi
f3206721a3
internal/restorable: remove alwaysReadPixelsFromGPU
...
Updates #805
2024-01-09 02:43:09 +09:00
Hajime Hoshi
c08a2193a9
internal/restorable: remove the case when the restoring is needed
...
Updates #805
2024-01-09 00:20:35 +09:00
Hajime Hoshi
771e5685f8
internal/graphicsdriver: remove NeedsRestoring()
...
Updates #805
2024-01-08 23:27:28 +09:00
Hajime Hoshi
a30f075896
cmd/ebitenmobile: use setPreserveEGLContextOnPause(true)
...
setPreserveEGLContextOnPause(true) suppresses context losts, and
basically we will no longer need our restoring logic.
Updates #805
2024-01-08 20:13:13 +09:00
Hajime Hoshi
4895ae7f93
internal/graphicsdriver/opengl: refactoring: move some functions from internal/ui
...
Updates #2714
2023-12-23 22:30:13 +09:00
Hajime Hoshi
b94c3fa9bb
internal/atlas: split EndFrame into EndFrame and SwapBuffers
...
This enables to do something asynchronously while executing SwapBuffers
in a different goroutine.
This is a preparation for HandleInput.
Updates #1704
2023-10-24 00:22:04 +09:00
Hajime Hoshi
d9757138a7
internal/restorable: use clearImage to clear a region
...
This is an improvement for https://github.com/hajimehoshi/ebiten/issues/2676#issuecomment-1650325027
Updates #2676
2023-08-31 23:32:54 +09:00
Hajime Hoshi
e082ea73dc
internal/restorable: reuse empty byte slices for ClearPixels
...
This is an improvement for https://github.com/hajimehoshi/ebiten/issues/2676#issuecomment-1650325027
Updates #2676
2023-08-31 23:02:40 +09:00
Hajime Hoshi
3869e2e4f6
internal/ui: refactoring: integrate the render thread usages into internal/graphicscommand
...
Updates #2664
2023-07-30 03:50:49 +09:00
Hajime Hoshi
20edb04e5e
internal/restorable: refactoring: add EndFrame
2023-05-08 01:09:25 +09:00
Hajime Hoshi
e5bb89aa35
internal/restorable: use a special shader to clear an image
...
This reduces one extra internal texture.
2023-03-01 15:47:03 +09:00
Hajime Hoshi
110ba5403d
internal/buffered: remove redundant pixel data if possible
2023-02-26 01:55:43 +09:00
Hajime Hoshi
965fd4cac8
internal/restoring: bug fix: stop keeping pixel data on 32bit architecture
...
Updates #4259
2023-02-25 23:11:42 +09:00
Pierre Curto
4de807cc44
all: fix typos ( #2558 )
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-01-28 19:06:38 +09:00
Hajime Hoshi
8cc6fa82fd
internal/graphicsdriver/opengl: remove fnIsContextLost
...
As restoring from context lost doesn't happen on browsers, isContextLost
doesn't have to be called.
2022-11-17 12:43:26 +09:00
Hajime Hoshi
e796646abd
internal/graphicscommand: rename arguments
2022-10-15 03:36:25 +09:00
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
ae41530f1c
internal/graphicscommand: move availableFilename to graphicscommand
2022-08-31 13:26:14 +09:00
Terra Brown
26a58d20b3
internal/graphicscommand: enable EBITENGINE_INTERNAL_IMAGES_KEY
on browsers ( #2283 )
...
Closes #2270
Co-authored-by: Hajime Hoshi <hajimehoshi@gmail.com>
2022-08-31 03:10:10 +09:00
Hajime Hoshi
f7c44f086f
replace Ebiten with Ebitengine in comments
2022-08-29 11:17:17 +09:00
Hajime Hoshi
6b814888b5
internal/atlas: always use DrawTriangles at putOnAtlas
...
DrawTriangles was introduced at #1508 , and apparently there is no
reason we should use ReplacePixels here. So, simplify the logic by
using only DrawTriangles.
2022-06-10 02:58:04 +09:00
Hajime Hoshi
b8e8d72377
internal/restorable: rename ImageTypeScreenFramebuffer -> ImageTypeScreen
2022-06-07 23:45:35 +09:00
Hajime Hoshi
cb0cbb4efa
internal/restorable: refactoring: introduce ImageType
2022-06-06 09:13:55 +09:00
Hajime Hoshi
151dfffad6
internal/restorable: simplify canDetectContextLostExplicitly
...
This constant was set with some wrong assumptions:
1. On Android, recovering was needed.
2. On iOS, OpenGL ES was used when
a. The architecture was 386 or amd64 == an emulator is used
b. The build tag ebitengl was not specified
c. gomobile-build was used
3. On browsers, recovering was needed.
1., 2b, and 2c are correct.
2a. is not correct: Now emulators are available on all the
architectures with both Metal and OpenGL.
3. is not correct: Ebiten no longer recovers the contest lost.
Now, Ebiten can detect a context lost explicitly when
1. On Android
2. On iOS and on gomobile-build
(When gomobile-build is used, OpenGL should always be used)
Based on this fact, this change changes the constant to a variable,
and fixes the logic to set the variable.
2022-03-23 03:01:59 +09:00
Hajime Hoshi
4cbce71b2b
internal/graphicscommand: move the choice of graphics drivers to internal/ui
2022-03-20 02:51:31 +09:00
Hajime Hoshi
df60c4c92d
internal/driver: rename to internal/graphicsdriver
2022-02-06 20:41:32 +09:00
Hajime Hoshi
96dc80fd08
internal/restorable: Remove needsDisposingWhenRestoring
...
Now restoring from context lost doesn't work on browsers. Then,
the constant needsDisposingWhenRestoring is actually always true.
2021-10-23 23:46:29 +09:00
Hajime Hoshi
8f857daf3e
internal/restorable: Bug fix: Forbid NewImage before the graphics driver is ready
2021-09-09 03:58:58 +09:00
Hajime Hoshi
60b8f82bfd
graphicscommand: Dump internal image info on the debug mode
...
Closes #1714
2021-08-05 01:16:42 +09:00
Hajime Hoshi
18903db1c6
internal/atlas: Bug fix: Unexpected padding in screenshots
...
Closes #1736
2021-07-29 16:09:29 +09:00