Commit Graph

7159 Commits

Author SHA1 Message Date
Hajime Hoshi
c6c45aadfa Revert "Revert "internal/glfwwin: ignore errors from DWM functions""
This reverts commit 991cec993c.

Reason: Reverted a wrong commit
2022-06-03 13:59:16 +09:00
Hajime Hoshi
991cec993c Revert "internal/glfwwin: ignore errors from DWM functions"
This reverts commit 9ad87c0153.

Reason: Specifying nil for reading ranges is not efficient
2022-06-03 13:49:45 +09:00
Hajime Hoshi
3b13158cc0 internal/graphicsdriver/directx: pass nil for pReadRange at Map
Updates #2113
2022-06-03 13:45:08 +09:00
Hajime Hoshi
9ad87c0153 internal/glfwwin: ignore errors from DWM functions
DWM functions might not be implemented on Proton. In the original
GLFW implementation, the returning values are not checked.

Updates #2113
2022-06-03 01:36:31 +09:00
Hajime Hoshi
c29c423686 internal/glfwwin, internal/graphicsdriver/directx: bug fix: HRESULT and Errno are imcompatible 2022-06-03 00:41:04 +09:00
Hajime Hoshi
7d95dddb1a internal/glfwwin: refactoring 2022-06-03 00:32:36 +09:00
Hajime Hoshi
666d50e83d internal/glfwwin: use HRESULT for an error value instead of GetLastError
GetLastError might not be reliable for some APIs like DwmFlush.

Updates #2113
2022-06-02 23:02:09 +09:00
Hajime Hoshi
4a9caf8afb internal/graphicsdriver/directx: ignore higher 32bit values for Errno
Updates #2113
2022-06-02 23:01:38 +09:00
Hajime Hoshi
fb03a1e351 internal/graphicsdriver/directx: bug fix: ID3D12Resource::Unmap does not return an value
Updates #2113
2022-06-02 12:52:58 +09:00
Hajime Hoshi
4a684c4195 treat Windows error values as uint32 instead of windows.Handle
The error value are defined as windows.Handle (64bit) in
golang.org/x/sys/windows, but an actual type should be HRESULT (32bit).
This causes an issue that a returning value from a Windows API was
recognized as a non-zero error value though the value was not an error,
when the value's lower 32-bits are all zero.

See also https://github.com/golang/go/issues/48736#issuecomment-1143993096

Updates #2113
2022-06-02 12:10:21 +09:00
Hajime Hoshi
b900f83a01 internal/graphicsdriver/directx: refactoring: remove an unused member Image.numRows 2022-06-02 01:53:27 +09:00
Hajime Hoshi
0dc6e4e64e internal/graphicsdriver/directx: use ID3D12Resource instead of ID3D12Resource1
Updates #2114
2022-06-02 01:26:02 +09:00
Hajime Hoshi
432365ff92 internal/glfwwin: ignore the error at SetProcessDpiAwarenessContext
Updates #2113
2022-06-01 23:11:06 +09:00
Hajime Hoshi
285a5cbc69 internal/glfwwin: skip some functions for Xbox
Updates #2084
2022-06-01 12:08:03 +09:00
Hajime Hoshi
0adb0c3860 internal/ui: bug fix: compile error 2022-06-01 02:09:10 +09:00
Hajime Hoshi
9c15bda275 internal/ui: return a null Window on Xbox
Updates #2084
2022-06-01 01:26:31 +09:00
Hajime Hoshi
ff868ba39f internal/ui: skip some functions for Xbox
Updates #2084
2022-06-01 00:58:36 +09:00
Hajime Hoshi
dcb5bb47c6 internal/glfw: unify the naming convension for Win32API 2022-06-01 00:48:22 +09:00
Hajime Hoshi
6fc71e97bb internal/glfwwin: skip some functions for Xbox
Updates #2084
2022-06-01 00:35:43 +09:00
Hajime Hoshi
aa4a2b64e0 internal/glfwwin: bug fix: update _glfw.windows 2022-06-01 00:01:07 +09:00
Hajime Hoshi
c99b948df3 internal/graphicsdriver/directx: refactoring
Updates #2084
2022-05-30 03:17:15 +09:00
Hajime Hoshi
d4226659ee internal/graphicsdriver/directx: initialize a device for Xbox
Updates #1162
2022-05-30 02:10:18 +09:00
Hajime Hoshi
59798d29f4 internal/graphicsdriver/directx: defer the initialization 2022-05-29 22:02:39 +09:00
Hajime Hoshi
b4491ab94d internal/graphicsdriver/directx: unify the naming convention with glfwwin 2022-05-29 21:18:23 +09:00
Hajime Hoshi
0081fa7a47 internal/graphicsdriver/directx: add a comment 2022-05-29 20:05:37 +09:00
Hajime Hoshi
ad380a32f4 internal/glfwwin: split GDK part to a new package internal/microsoftgdk
Updates #1162
2022-05-29 19:25:26 +09:00
Hajime Hoshi
7f46938ff7 internal/glfwwin: return an error at initWGL on Xbox
Updates #1162
2022-05-29 17:37:06 +09:00
Hajime Hoshi
59e6d4578b internal/glfw: skip some Win32APIs for Xbox
Updates #1162
2022-05-29 17:04:47 +09:00
Hajime Hoshi
ce147a7e38 internal/glfwwin: refactoring: remove Monitor.currentMode 2022-05-29 16:00:18 +09:00
Hajime Hoshi
2efbb819e0 internal/glfw: skip some Win32APIs for Xbox
Updates #1162
2022-05-29 15:54:37 +09:00
Hajime Hoshi
05d49c5a52 internal/glfwwin: create a pseudo monitor for Xbox
Updates #1162
2022-05-29 15:38:17 +09:00
Hajime Hoshi
f8163f93c0 internal/glfwwin: refactoring 2022-05-29 14:22:22 +09:00
Hajime Hoshi
ef7d10a36e internal/glfwwin: add a build tag microsoftgdk
Updates #1162
2022-05-29 01:31:42 +09:00
Hajime Hoshi
5c63c4a4aa internal/graphicsdriver/metal: support macOS 10.12 by removing packed types
From the Metal shading language specification [1] Table 2.2.3, attribute
variables in Ebitengine's vertices don't have to be packed. Then, we can
remove `packed` types.

[1] https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf

Closes #2107
2022-05-28 23:57:59 +09:00
Hajime Hoshi
ac922742bf internal/glfw: use shorter copyright comments 2022-05-27 20:38:45 +09:00
Hajime Hoshi
f7d1a43e98 internal/glfwwin: remove GammaRamp 2022-05-27 20:19:12 +09:00
Hajime Hoshi
df0208ec79 internal/glfwwin: remove unused exported functions 2022-05-27 20:15:36 +09:00
Hajime Hoshi
3a6b707b29 internal/glfwwin: remove unused members (a monitor size) 2022-05-27 20:12:43 +09:00
Hajime Hoshi
d577cc5e7d internal/graphicsdriver/opengl/gl: rename files
Updates #1162
2022-05-27 18:31:40 +09:00
TotallyGamerJet
726e88e520
internal/graphics/opengl/gl: remove CGO in openGL on macOS (#2104)
Updates #1162
2022-05-27 18:26:53 +09:00
Hajime Hoshi
f7172f41c8 internal/glfwwin: skip detecting monitors for Xbox
Updates #2084
2022-05-27 15:55:23 +09:00
Hajime Hoshi
cbe42ddddc update CONTRIBUTING.md 2022-05-27 02:09:27 +09:00
Hajime Hoshi
ea42f69072 update the Slack channel name to #ebitengine 2022-05-27 00:58:40 +09:00
Hajime Hoshi
22c609dd1e audio: rename Ebiten -> Ebitengine 2022-05-26 00:27:27 +09:00
Hajime Hoshi
5c0935d2da misc: update README 2022-05-26 00:05:31 +09:00
Hajime Hoshi
04f56dd2bf misc: update Ebiten -> Ebitengine 2022-05-26 00:03:34 +09:00
Hajime Hoshi
c379873a1f rename Ebiten -> Ebitengine 2022-05-25 22:48:19 +09:00
Hajime Hoshi
1202e66114 internal/gamepad: bug fix: out of range at hatState on Windows
Closes #2103
2022-05-25 11:44:46 +09:00
Hajime Hoshi
7030840efa internal/graphicsdriver/opengl/gl: refactoring 2022-05-25 02:24:40 +09:00
Hajime Hoshi
604f14d2d4 internal/glfwwin: refactoring: reduce risky unsafe.Pointer usages 2022-05-25 02:21:30 +09:00