Commit Graph

4038 Commits

Author SHA1 Message Date
Hajime Hoshi
bbbc41a04d internal/atlas: rename functions
Updates #2519
2023-01-03 17:25:58 +09:00
Hajime Hoshi
d98df45a39 internal/atlas: ensure the given sizes must be power of 2
Updates #2519
2023-01-03 17:25:30 +09:00
Hajime Hoshi
c371659f63 internal/graphicsdriver/directx: implement suspend/resume for Xbox 2023-01-03 17:24:17 +09:00
Hajime Hoshi
61a009e508 internal/ui: bug fix: FPS drop on fullscreen on macOS 13
Updates #1745
Closes #2495
2022-12-16 02:59:06 +09:00
Hajime Hoshi
72dc730b42 internal/ui: bug fix: care the case when CoInitializeEx returns S_FALSE 2022-12-13 13:01:32 +09:00
Hajime Hoshi
8ab220df7f internal/ui: bug fix: compile error 2022-12-13 02:38:45 +09:00
Hajime Hoshi
b022f6d86a internal/ui: bug fix: error check at syscall 2022-12-13 02:26:07 +09:00
Hajime Hoshi
0bec1e65fa ebiten: add RunGameOptions.SkipTaskbar
Closes #1518
2022-12-13 02:00:44 +09:00
Hajime Hoshi
6ed5293132 internal/gamepaddb: update gamepad db 2022-12-12 02:50:58 +09:00
Hajime Hoshi
c321d069a8 internal/graphicscommand: remove unnecessary type parameters 2022-12-10 00:43:41 +09:00
Hajime Hoshi
3024e07ecc ebiten: add RunGameOptions.ScreenTransparent
Closes #2378
2022-12-09 22:50:57 +09:00
Hajime Hoshi
d31b0189a2 ebiten: add RunGameOptions.InitUnfocused
Updates #2378
2022-12-09 21:27:32 +09:00
Hajime Hoshi
bb68ebfcad ebiten: add RunGameWithOptions to specify graphics library
This also adds mobile.SetGameWithOptions.

Updates #2378
2022-12-09 21:27:31 +09:00
Hajime Hoshi
015ce2b262 internal/ui: refactoring: reduce APIs 2022-12-09 00:05:22 +09:00
Hajime Hoshi
1f741fa007 internal/glfw: do not panic for an error at Monitor.GetContentScale
Updates #2488
2022-12-08 13:39:19 +09:00
Hajime Hoshi
8a95b1d85c internal/glfwwin: ignore an error ERROR_SUCCESS for all Windows APIs
This is still mysterious, but this can happen on some old machines.

Updates #2478
Closes #2489
2022-12-08 12:33:52 +09:00
Hajime Hoshi
14688348a8 internal/ui: bug fix: wrong calculation of wheel scrolling
Closes #2487
2022-12-08 02:10:01 +09:00
Hajime Hoshi
102a2d2138 internal/graphicsdriver/directx: change the default feature level to 11_0
The feature level 12_0 causes some issues on some machines. As we now
have EBITENGINE_DIRECTX_FEATURE_LEVEL, let's go back to the default
feature level 11_0.

Updates #2486
2022-12-07 21:16:47 +09:00
Hajime Hoshi
0d173834a6 all: speed optimization 2022-12-03 23:09:41 +09:00
Hajime Hoshi
89c64f83e3 ebiten: performance improvement by reducing allocations of []float32 2022-12-03 21:53:56 +09:00
Hajime Hoshi
6a72b1e10d internal/ui: refactoring 2022-12-03 21:25:28 +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
9d74784723 internal/ui: refactoring: simplify ConvertUniforms 2022-12-03 18:26:30 +09:00
Hajime Hoshi
724516a0e0 internal/shaderir: add comments 2022-12-03 15:37:14 +09:00
Hajime Hoshi
6a0eb82207 internal/glfwwin: bug fix: crash when dropping a file
Updates #2478
2022-12-03 04:47:05 +09:00
Hajime Hoshi
15c2fe01c0 internal/glfwwin: bug fix: unexpected error at wglSwapIntervalEXT
Updates #2478
2022-12-03 04:37:23 +09:00
Hajime Hoshi
ae715ba33b internal/shaderir: performance improvement by using a slice instead of a map 2022-12-03 01:10:29 +09:00
Hajime Hoshi
61f1d8b69f internal/graphics: remove the common vertices backend
It was actually impossible to use the common vertices backend in a
thread-safe manner, and actually this caused race conditions.

This changes fixes the issue by giving up a central backend, and
letting images have their own vertices buffer.

Closes #2473
2022-12-03 01:02:23 +09:00
Hajime Hoshi
3386908902 ebiten: swap the definition MouseButtonMiddle and MouseButtonRight
This follows the Web standard.

Closes #2468
2022-11-27 13:51:09 +09:00
Hajime Hoshi
e98661c1d3 internal/ui: forbid fullscreen on Xbox 2022-11-25 00:59:15 +09:00
Hajime Hoshi
9e9cec249a ebiten: make some MouseButton definitions explicit
This change redefines named mouse button consts like MouseButtonLeft
to use MouseButton0, so that users can know which enums are the same
and different.

Updates #2445
2022-11-23 04:41:11 +09:00
Kacper Drobny
6e12fd13e4
ebiten: add additional MouseButtons (#2467)
Closes #2445
2022-11-23 04:28:34 +09:00
Hajime Hoshi
5356b44286 internal/graphicsdriver/opengl: add comments about Firefox
Updates #2077
2022-11-23 00:57:16 +09:00
Hajime Hoshi
67430362cc internal/graphicsdriver/directx: add EBITENGINE_DIRECTX_FEATURE_LEVEL
A fix for #2447 was a breaking-change as the DirectX driver was no longer
available for some old graphics card.

To support such old cards, provide a new environment variable
EBITENGINE_DIRECTX_FEATURE_LEVEL to specify a feature level.
The possible values are 11_0, 11_1, 12_0, 12_1, and 12_2. The default
value is 12_0.

Closes #2466
2022-11-21 02:46:07 +09:00
Hajime Hoshi
f129c23393 all: update URLs in comments 2022-11-21 01:46:50 +09:00
Hajime Hoshi
e9e5d27d2c internal/shader: bug fix: % operators for integer vecs didn't work
Closes #1911
2022-11-21 01:39:20 +09:00
Hajime Hoshi
0b9cbaa1ed internal/shader: introduce integer vectors (ivec2, ivec3, ivec4)
Closes #1911
2022-11-21 00:31:23 +09:00
TotallyGamerJet
f09c4a624e
internal/gamepad: use RegisterLibFunc (#2465)
RegisterLibFunction is typesafe and now supports float arguments.

Updates #1162
2022-11-21 00:24:27 +09:00
TotallyGamerJet
fb612ab443
internal/cocoa, internal/graphicsdriver/mtl: remove usages of NSInvocations to directly call ID.Send (#2464)
purego now supports using floats as arguments.
We can remove these instances of NSInvocation that
only existed to circumvent that feature.

Updates #1162
2022-11-20 23:48:22 +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
5aecd6762c internal/shader: refactoring 2022-11-20 18:25:08 +09:00
Hajime Hoshi
dc1df824a5 internal/shader: more strict type checks with built-in functions 2022-11-20 17:47:53 +09:00
Hajime Hoshi
5d8216def3 internal/shader: stricter const type check 2022-11-20 15:52:33 +09:00
Hajime Hoshi
5f4e3a0348 internal/shader: add swizzling check 2022-11-19 22:39:17 +09:00
Hajime Hoshi
bba196d1ec ebiten: allow array types for uniform variables
Closes #2448
2022-11-18 14:08:31 +09:00
Hajime Hoshi
90213d5d80 internal/graphicsdriver/opengl: refactoring 2022-11-18 13:32:09 +09:00
Hajime Hoshi
95b4e67c77 internal/graphicsdriver/opengl: reduce context functions 2022-11-18 03:18:30 +09:00
Hajime Hoshi
4de6da0a50 internal/graphicsdriver/opengl: use an appropriate stencil buffer format 2022-11-17 13:31:36 +09:00
Hajime Hoshi
21670691b1 internal/graphicsdriver/opengl: remove duplicated code 2022-11-17 13:22:48 +09:00