Hajime Hoshi
8551cd350f
internal/ui: bug fix: need to sleep when swapping buffers is skipped
...
Closes #2890
2024-01-24 12:20:30 +09:00
Hajime Hoshi
48e3c766f7
internal/graphicsdriver: remove Image.IsInvalidated
...
Updates #805
2024-01-09 00:30:21 +09:00
Hajime Hoshi
771e5685f8
internal/graphicsdriver: remove NeedsRestoring()
...
Updates #805
2024-01-08 23:27:28 +09:00
Hajime Hoshi
3ca6184294
ebiten: add a new FillRule: NonZero
...
Closes #2782
2023-11-06 12:11:38 +09:00
Hajime Hoshi
4e93efa5ac
internal/graphicsdriver: reland: add FillRule and replace boolean values with this
...
Updates #2782
2023-11-04 19:09:50 +09:00
Hajime Hoshi
f695df5924
Revert "internal/graphicsdriver: add FillRule and replace boolean values with this"
...
This reverts commit 38cf964a3b
.
Reason: build failure on Windows
2023-11-04 19:02:40 +09:00
Hajime Hoshi
38cf964a3b
internal/graphicsdriver: add FillRule and replace boolean values with this
...
Updates #2782
2023-11-04 18:57:31 +09:00
Hajime Hoshi
f2544a1bd9
internal/graphicsdriver: use []uint32 instead of []uint16 for indices
...
Updates #2612
2023-11-04 04:39:17 +09:00
Hajime Hoshi
61498e899a
internal/graphicsdriver/metal: typo
2023-10-28 02:43:57 +09:00
Hajime Hoshi
8274b32301
internal/graphicslibrary: refactoring: remove IsGL and IsDirectX
2023-10-15 17:30:16 +09:00
Hajime Hoshi
567e2fa04c
ebiten: add BlendOperationMin
and BlendOperationMax
...
Closes #2395
2023-10-13 01:56:33 +09:00
Hajime Hoshi
4ca3fa5e57
internal/graphicsdriver: replace Region with image.Rectangle ( #2791 )
...
Closes #2790
2023-09-28 14:29:55 +09:00
Hajime Hoshi
592d6c57b7
internal/graphicsdriver/metal: improve an error message for Metal initialization
...
Updates #2732
2023-08-26 12:43:16 +09:00
Hajime Hoshi
e270dea460
internal/graphicsdriver: use []PixelsArgs for ReadPixels
...
Closes #2592
2023-08-17 03:06:48 +09:00
Hajime Hoshi
842c3cbfcd
internal/graphicscommand: use a slice to values instead of pointers
...
This should reduce heap allocations.
2023-08-16 23:23:30 +09:00
Hajime Hoshi
377b0b8502
internal/graphicscommand: rename WritePixelsArgs -> PixelsArgs
...
Updates #2592
2023-08-16 22:34:56 +09:00
Hajime Hoshi
e98acd3dc7
internal/graphicsdriver: refactoring: use image.Rectangle
2023-04-29 01:12:05 +09:00
Hajime Hoshi
a19ff07130
internal/graphicsdriver/opengl: bug fix: potential infinite loop
2023-03-23 02:47:23 +09:00
Hajime Hoshi
3bcac70d1c
internal/graphicsdriver/metal: add comments
2023-03-13 22:21:55 +09:00
Hajime Hoshi
65fb9d56ba
internal/graphicsdriver/metal: refactoring
...
Updates #2599
2023-03-13 21:29:42 +09:00
Hajime Hoshi
7998e4d31d
update purego to v0.3.0-alpha
...
There are breaking changes between purego v0.2.0 and v0.3.0-alpha.
2023-03-04 01:22:54 +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
aa52402a90
internal/graphicsdriver/metal: fix a comment
2023-01-24 02:22:35 +09:00
Hajime Hoshi
7f39b9c5b6
internal/graphicsdriver/metal: use supportsFeatureSet: as a fallback
...
This change is a fix for a regression that happened on macOS High Sierra.
Closes #2553
2023-01-23 23:44:56 +09:00
Hajime Hoshi
c5848455f5
internal/graphicsdriver/metal: use MTLGPUFamily instead of MTLGPUFeatureSet
2023-01-05 13:37:37 +09:00
Hajime Hoshi
599be725b9
internal/graphicsdriver/metal: fix comments
2023-01-03 23:16:01 +09:00
Hajime Hoshi
7418576c16
internal/ui: re-enable skipping to render the final screen when possible
...
With Metal, nextDrawable could return immediately when a command buffer
is empty. To avoid high CPU usage, this change adds a slight sleep in
this case.
With DirectX, Present waits for a while even though nothing is updated,
then that's fine.
Updates #2341
Updates #2342
Updates #2520
2023-01-03 23:09:28 +09:00
Hajime Hoshi
edb952c9e7
internal/graphicsdriver/metal: add comments
2023-01-03 22:10:33 +09:00
Hajime Hoshi
34941ca083
all: separate the rendering thread from the main thread
...
Updates #1704
Closes #2512
2022-12-30 22:57:34 +09:00
Hajime Hoshi
8d020ad414
internal/graphicsdriver/metal: refactoring
2022-12-29 15:27:51 +09:00
Hajime Hoshi
5e17791e4e
internal/ui: bug fix: an offscreen was broken with SetScreenClearedEveryFrame(false)
...
Updates #2500
Closes #2510
2022-12-29 14:57:07 +09:00
Hajime Hoshi
ece60af1b7
internal/graphicsdriver/metal: stop using presentsWithTransaction
...
presentsWithTransaction caused many troubles. The critical thing was
that nextDrawable sometimes took more than one second when a user
inputs with NSTextView.
Fortunately, applications work well even without presentsWithTransaction.
Updates #1029
Updates #1196
Updates #1745
Updates #1974
2022-12-27 19:00:56 +09:00
Hajime Hoshi
0a6813c17f
internal/graphics: use flatten []float32 slice instead of [][]float32
...
Closes #2479
2022-12-03 20:23:58 +09:00
Hajime Hoshi
0b9cbaa1ed
internal/shader: introduce integer vectors (ivec2, ivec3, ivec4)
...
Closes #1911
2022-11-21 00:31:23 +09:00
Hajime Hoshi
9a75e266d4
internal/graphicsdriver: fix comments
2022-11-20 23:18:40 +09:00
Hajime Hoshi
7961654927
internal/graphicsdriver/metal: bug fix: wrong alignment for vec3
2022-11-20 23:14:09 +09:00
Hajime Hoshi
a406904a51
internal/graphicsdriver: refactoring
2022-11-12 21:03:54 +09:00
Hajime Hoshi
419bb4c1e9
all: use uint32 instead of float32 for uniform values
...
This is a preparation for other types of uniform values.
Updates #2305
2022-11-12 20:28:07 +09:00
Hajime Hoshi
d73e8f785d
internal/graphicsdriver: render various destination regions as one command
...
Closes #2232
2022-11-04 20:49:44 +09:00
Hajime Hoshi
0afb6fd22a
internal/graphicsdriver/metal: reduce rendering paths for even-odd rendering
2022-11-04 16:17:51 +09:00
Hajime Hoshi
384dee7160
internal/graphicscommand: remove unused uniform variables
...
This improves possibility of merging graphics commands by reducing
uniform variables.
Updates #2232
2022-11-03 22:45:17 +09:00
Hajime Hoshi
a5993f09a2
internal/graphicscommand: refactoring: add preserved uniform variables at the graphicscommand package
...
This is a preparation to skip setting unnecessary uniform variables
like dstRegion.
Updates #2232
2022-10-30 22:30:52 +09:00
Hajime Hoshi
b019a3723a
internal/ui: optimize GPU usages when the screen doesn't have to be updated
...
This change skips rendering when 1) the screen is not cleared every frame
(`SetScreenClearedEveryFrame(false)`) and 2) Draw doesn't draw anything
onto the screen. The GPU usages decreased on some machines (e.g. GPU usage
was 10% with an empty Ebitengine project and became 2-3 % on a Windows
machine).
Updates #2341
2022-10-28 18:51:06 +09:00
Hajime Hoshi
da5f5ea327
ebiten: add blend factors
...
Updates #2382
2022-10-18 00:21:13 +09:00
Hajime Hoshi
871a8869db
ebiten: bug fix: wrong renaming
...
Updates #2382
2022-10-17 01:00:23 +09:00
Hajime Hoshi
180e456a8e
ebiten: rename members of Blend
...
Updates #2382
2022-10-17 00:51:55 +09:00
Hajime Hoshi
e03825bf08
ebiten: add BlendOperationSubtract and BlendOperationReverseSubtract
...
Updates #2382
2022-10-17 00:30:24 +09:00
Hajime Hoshi
09a7d39874
internal/graphicsdriver: add Blend struct
...
This is a preparation to specify blend factors and blend operators.
Updates #2382
2022-10-16 01:08:26 +09:00
Hajime Hoshi
1d9f1474e9
internal/graphicsdriver: rename constants
2022-10-15 21:14:59 +09:00
Hajime Hoshi
272d0c6a3f
internal/graphicsdriver: rename Operator -> BlendFactor
...
Updates #2382
2022-10-15 17:34:03 +09:00