Commit Graph

339 Commits

Author SHA1 Message Date
Hajime Hoshi
f98003bcd5 ebiten: add ColorSpace and RunGameOptions.ColorSpace
This works only for macOS Metal and WebGL so far.

Closes #2871
2024-08-28 03:03:57 +09:00
Hajime Hoshi
ef5ac4175d all: use bufio.Reader to improve reading speed 2024-07-29 02:28:37 +09:00
Hajime Hoshi
1804d56777 Revert "all: open up for more destinations images (#3013)"
This reverts commit 46d171c3c5.

Reason: MRT is now suspended. Let's revisit this when we work on MRT again.
2024-07-16 22:43:49 +09:00
Bertrand Jung
46d171c3c5
all: open up for more destinations images (#3013)
Updates #2930
2024-07-09 02:05:55 +09:00
Bertrand Jung
22fd1f107e
internal/graphics: renamed shader image count to specify src (#3012)
This just specifies that the constant refers to the number of source images passed to a shader.

This makes a distinction with the number of dst images, that could potentially be more than 1 in the future.
2024-06-10 02:02:47 +09:00
Hajime Hoshi
e5d10c47e7 internal/graphicsdriver: reland: rename FillRule constants
Updates #3006
2024-06-08 12:16:20 +09:00
Hajime Hoshi
6ac1270cb0 Revert "internal/graphicsdriver: rename FillRule constants"
This reverts commit ab4a3af1b5.

Reason: compile error on Windows
2024-06-08 12:10:27 +09:00
Hajime Hoshi
ab4a3af1b5 internal/graphicsdriver: rename FillRule constants
Updates #3006
2024-06-08 11:54:46 +09:00
Hajime Hoshi
4818768965 shaderprecomp: remove ShaderSourceID
`ShaderSourceID` was confusing as there was no guarantee the same ID is
used for the same source if Ebitengine versions are different.

`ShaderSource` should be kept as the built-in shader contents should not
be exposed.

Updates #2861
Closes #2999
2024-05-27 00:01:05 +09:00
Hajime Hoshi
83ae577c80 Revert "shaderprecomp: remove ShaderSource and ShaderSourceID"
This reverts commit 8be3bb41d5.

Reason: removing `ShaderSource` unexpected exposes the source.

Updates #2999
2024-05-26 22:45:12 +09:00
Hajime Hoshi
8be3bb41d5 shaderprecomp: remove ShaderSource and ShaderSourceID
This change simplifies the APIs to avoid some confusions around IDs.

Updates #2861
Closes #2999
2024-05-26 22:42:52 +09:00
Hajime Hoshi
b3ad97b22b internal/graphicsdriver/metal/mtl: add comments 2024-05-06 22:07:16 +09:00
Hajime Hoshi
f0ca3f1870 internal/graphicsdriver/metal/mtl: follow ObjC convention
Closes #2981
2024-05-06 21:51:57 +09:00
Hajime Hoshi
2261cf76de internal/graphicsdriver/metal/ca: follow ObjC convention
Updates #2981
2024-05-06 19:36:17 +09:00
Hajime Hoshi
caab1ee29f internal/graphicsdriver/metal: refactoring 2024-05-05 17:18:06 +09:00
Hajime Hoshi
c46f62e184 all: add a new package shaderprecomp
The current implementation is only for macOS so far.

Updates #2861
2024-05-05 03:51:04 +09:00
Hajime Hoshi
ca9a80600d internal/graphicsdriver/metal: release MTLLibrary 2024-05-04 19:26:12 +09:00
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
5887142da7 internal/grpahicsdriver/metal/mtl: use 3 drawings for fullscreen
Hajime found that renderings were delayed with 2 drawing in fullscreen
though FPS might be lowered. This is mysterious but there is no other
good solution.

Updates #2883
2024-01-19 18:29:47 +09:00
Hajime Hoshi
e39c50c296 internal/graphicsdriver/metal: add comments
Updates #2880
Updates #2883
2024-01-17 20:51:32 +09:00
Hajime Hoshi
055db234a1 internal/graphicsdriver/metal: bug fix: use 2 as a drawable count for Arm Mac
Closes #2883
2024-01-17 18:57:50 +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
a4abc4472b internal/shaderir/msl: always use the same function names 2024-01-07 18:54:15 +09:00
Hajime Hoshi
87fe7bfd99 internal/graphicsdriver/metal: refactoring 2024-01-02 23:42:50 +09:00
Hajime Hoshi
fd63820139 internal/graphicsdriver/metal: bug fix: always use 3 drawables
Updates #2822
Closes #2880
2024-01-02 22:50:46 +09:00
Hajime Hoshi
ec9613dd94 Revert "internal/graphicsdriver/metal: bug fix: use 3 drawables for fullscreen"
This reverts commit 3c7bcf3035.

Reason: the window unexpectedly blinks when exiting from fullscreen

Updates #2880
2024-01-02 22:47:09 +09:00
Hajime Hoshi
3c7bcf3035 internal/graphicsdriver/metal: bug fix: use 3 drawables for fullscreen
Closes #2880
2024-01-02 22:33:05 +09:00
Hajime Hoshi
dddfb7317b internal/cocoa: integrate internal/graphicsdriver/metal/ns and internal/cocoa 2024-01-02 22:22:19 +09:00
Hajime Hoshi
c48fc05132 internal/graphicsdriver/metal: use %w instead of %v for errors 2023-12-24 22:29:53 +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
d91f328083 internal/graphicsdriver/metal: bug fix: use 3 for drawable count when vsync is off
Updates #2822
2023-10-28 02:39:47 +09:00
Hajime Hoshi
80301eb29e internal/graphicsdriver/metal: change the maximum drawable count to 2
Updates #2822
2023-10-28 02:15:02 +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
915ed48f7a internal/graphicsdriver/metal/mtl: bug fix: fail to resolve Metal.framework path with Xcode 15
Updates #2732
Closes #2784
2023-09-24 16:15:54 +09:00
Hajime Hoshi
dec08b9e4e all: bug fix: relative paths for dlopen didn't work on macOS Sonoma
Closes #2732
2023-08-26 14:52:52 +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
4158e206e6 internal/graphicsdriver/metal: rename files 2023-08-03 23:54:48 +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