Commit Graph

944 Commits

Author SHA1 Message Date
Hajime Hoshi
9a511fecb5 internal/jsutil: move to internal/graphicsdriver/opengl/gl 2024-09-14 16:10:49 +09:00
Hajime Hoshi
a36f6210c0 all: use Go 1.20 APIs
Closes #2746
2024-09-12 00:22:45 +09:00
Hajime Hoshi
3eda0dd387 internal/graphicsdriver/playstation5: add extern C 2024-09-01 20:08:52 +09:00
Hajime Hoshi
ca54ce69c4 internal/graphicsdriver/playstation5: bug fix: compile error 2024-09-01 20:00:41 +09:00
Hajime Hoshi
7f1e6cb538 internal/graphicsdriver/playstation5: add ebitengine_SetVertices 2024-09-01 19:47:21 +09:00
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
bff760af01 internal/shader: bug fix: test failures
Updates #2640
2024-08-25 17:43:44 +09:00
Hajime Hoshi
fef487e09d internal/shaderir/hlsl: refactoring: more flexible generation
Updates #2640
2024-08-25 17:27:00 +09:00
Hajime Hoshi
ed45843c13 internal/graphicsdriver/opengl: assume custom attributes are vec4
Due to HLSL restrictions, all the attributes must have a semantics.
Always assuming custom attributes are vec4 makes things simpler.

Updates #2640
2024-08-25 17:11:28 +09:00
Hajime Hoshi
7142a3bcd9 internal/graphicsdriver/opengl: bug fix: total must be reset 2024-08-25 15:29:22 +09:00
Hajime Hoshi
3547d999b1 internal/graphicsdriver/opengl/gl: bug fix: crash when log length is 0 2024-08-25 11:45:54 +09:00
Hajime Hoshi
17322c9c3b all: reduce files for PS5 2024-08-17 23:06:01 +09:00
Hajime Hoshi
435c8b75eb internal/graphicsdriver/opengl: automatically adjust the array buffer layout
Updates #2640
2024-08-12 04:08:02 +09:00
Hajime Hoshi
6cd00f3b88 internal/graphicsdriver/opengl: exclude playstation5 2024-08-11 22:41:21 +09:00
Hajime Hoshi
89933bf0ab internal/graphicsdriver/playstation5: bug fix: compile error 2024-08-10 21:52:38 +09:00
Hajime Hoshi
332da38565 internal/graphicsdriver/playstation5: update DrawTriangles
A Go pointer in a C struct could cause some troubles.
2024-08-10 21:21:09 +09:00
Hajime Hoshi
a5235eea86 internal/graphicsdriver/opengl/gl: always prefer OpenGL ES to OpenGL
Closes #2944
2024-08-10 01:21:35 +09:00
Hajime Hoshi
2a34d1d47b internal/graphicsdriver/opengl/gl: use PureGo version for Android again
This is basically a revert for 297efea68b.
This updates PureGo for the Android issue.

Updates #3052
Updates ebitengine/purego#262
2024-08-05 23:34:56 +09:00
Hajime Hoshi
aba652c323 internal/graphicsdriver/playstation5: add DrawTriangles 2024-08-04 19:13:36 +09:00
Hajime Hoshi
9bd17de2d3 internal/graphicsdriver/opengl: remove unused members 2024-08-04 04:26:53 +09:00
Hajime Hoshi
297efea68b internal/graphicsdriver/opengl/gl: use C version for Android
Unfortunately PureGo's dlopen didn't work on some Android devices.
Use the Cgo version instead in the same way as v2.7.

Closes #3052
2024-08-01 11:52:07 +09:00
Hajime Hoshi
3106f98b52 internal/graphicsdriver/opengl/gl: add more error messages to load libraries 2024-07-31 21:35:24 +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
Hajime Hoshi
073d022c2e internal/graphicsdriver/opengl: remove IsFramebuffer and IsRenderbuffer
These function return true in most cases, and when these return false,
the situation is pretty bad and recovering the situation would not be
possible.

IsFramebuffer and IsRenderbuffer cause round trips and affect performance.
Let's remove them.
2024-07-06 19:15:01 +09:00
Hajime Hoshi
4997e7e254 internal/graphicsdriver/opengl: lazy error check of shaders
See https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#dont_check_shader_compile_status_unless_linking_fails
2024-07-04 21:47:52 +09:00
Hajime Hoshi
c29d4b24bb internal/graphicsdriver/opengl: skip checkFramebufferStatus on browsers 2024-07-03 20:34:44 +09:00
Hajime Hoshi
a6d7cadab7 internal/graphicsdriver/playstation5: change struct member names 2024-06-17 03:04:18 +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
b0a4b6ebbf internal/graphicsdriver/playstation5: update the copyright year 2024-05-19 23:01:47 +09:00
Hajime Hoshi
657e04d3d1 internal/graphicsdriver/playstation5: separate the shader part 2024-05-19 18:05:16 +09:00
Hajime Hoshi
5bb060b1e9 shaderprecomp: add pssl 2024-05-12 15:07:38 +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
10d9660125 shaderprecomp: implement for Windows
Closes #2861
2024-05-06 16:03:57 +09:00
Hajime Hoshi
5d4a68b0ea internal/shaderir/hlsl: refactoring: separate calculation uniform offsets 2024-05-05 20:47:35 +09:00
Hajime Hoshi
a41af4528b internal/graphicsdriver/directx: refactoring 2024-05-05 18:58:13 +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
59fb259181 internal/graphicsdriver/gl: use PureGo for Linux and UNIX
Updates #2284
2024-04-29 21:25:15 +09:00
Hajime Hoshi
4647e9de53 internal/glfw, internal/gamepad: update GLFW to v3.3.9
Updates #2960
2024-04-14 01:14:22 +09:00