Commit Graph

59 Commits

Author SHA1 Message Date
Hajime Hoshi
4f69ca4ea9 internal/graphicsdriver/opengl: add a debug mode with a build tag ebitenginegldebug
In the debug mode, GetError is inserted in each GL function call.

Closes #2650
2023-04-22 13:17:08 +09:00
Hajime Hoshi
0449126c5b internal/graphicsdriver/directx: integrate EBITENGINE_DIRECTX and EBITENGINE_DIRECTX_FEATURE_LEVEL 2023-03-29 16:22:20 +09:00
Hajime Hoshi
78d76945ad internal/graphicsdriver/directx: implement DirectX 11 driver
Updates #2613
2023-03-29 15:52:33 +09:00
Hajime Hoshi
6a9972b085 ebiten: update documents
Updates #2191
2023-03-19 15:30:23 +09:00
Hajime Hoshi
0bdfeec610 internal/ui: use a separate render thread for Nintendo Switch
Updates #2512
2023-01-03 21:12:18 +09:00
Hajime Hoshi
0e0205b2d0 internal/ui: use -overlay to provide the implementation for Nintendo Switch
Closes #2372
2023-01-03 19:10:15 +09:00
Hajime Hoshi
e5b9569142 internal/ui: bug fix: the env variable should be used only when the library is not specified
Updates #2378
2022-12-29 15:44:55 +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
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
f6f7ed3e3d internal/graphicsdriver/opengl/gl: automatically choose OpenGL and OpenGL ES
Updates #292
2022-11-14 12:50:53 +09:00
Hajime Hoshi
86706c0335 internal/graphicsdriver/opengl: add opengles build tag
This enables to use OpenGL ES instead of OpenGL.

Closes #292
2022-09-13 11:10:48 -07:00
Terra Brown
26a58d20b3
internal/graphicscommand: enable EBITENGINE_INTERNAL_IMAGES_KEY on browsers (#2283)
Closes #2270

Co-authored-by: Hajime Hoshi <hajimehoshi@gmail.com>
2022-08-31 03:10:10 +09:00
Hajime Hoshi
ec68534c73 internal/graphicsdriver/opengl: introduce EBITENGINE_OPENGL replacing ebitenginewebgl1
This change inroduces a new environment variable `EBITENGINE_OPENGL`
to replace the build tag `ebitenginewebgl1`.
2022-08-28 01:45:58 +09:00
Hajime Hoshi
001c344d00 ebiten: update comments about EBITENGINE_SCREENSHOT_KEY
Update #2265
2022-08-28 00:35:39 +09:00
Hajime Hoshi
e7c0a121c4 all: remove the build tag 'ebitencbackend'
This also automatically enables 'egl' when 'nintendosdk' is specified.

Updates #2242
2022-08-12 13:15:39 +09:00
Hajime Hoshi
1abb461329 ebiten: add a comment about microsoftgdk 2022-08-12 00:48:43 +09:00
mattn
3cd0daac67
go generate ./... with Go 1.19 (#2228) 2022-08-03 20:48:02 +09:00
Hajime Hoshi
a0546fc594 ebiten: document that EBITENGINE_GRAPHICS_LIBRARY can be set before RunGame 2022-07-30 17:40:48 +09:00
Hajime Hoshi
28fd3ec9e5 add the ebitengine version build tags besides the ebiten version
Closes #2111
Updates #2190
2022-07-09 15:38:03 +09:00
Hajime Hoshi
204fb5935b add new environment variables with the EBITENGINE_ suffix
Updates #2111
Updates #2190
2022-07-09 15:00:28 +09:00
Hajime Hoshi
c379873a1f rename Ebiten -> Ebitengine 2022-05-25 22:48:19 +09:00
Hajime Hoshi
f67b4cc1d6 internal/glfw: use a pure Go implementation of GLFW
This change removes internal/glfw/glfw, that is a DLL loader, and
replaces the usages with internal/glfwwin, that is a pure Go
implementation of GLFW for Windows.

The build tag `ebitenexternaldll` is also removed.

Closes #1764
2022-05-20 22:10:00 +09:00
Hajime Hoshi
f128f2e146 ebiten: fix a doc 2022-04-15 15:05:29 +09:00
Hajime Hoshi
79e93d3b12 internal/graphicsdriver: introduce the DirectX driver
Closes #1007
2022-03-26 20:09:34 +09:00
Hajime Hoshi
3074dca670 internal/ui: add the EBITEN_GRAPHICS_LIBRARY environment variable
The `ebitengl` build tag is gone instead.

Closes #2007
2022-03-24 02:23:37 +09:00
Hajime Hoshi
5cebe867d4 ebiten: Update doc 2021-10-21 01:28:07 +09:00
Hajime Hoshi
8b775cf0dd internal/glfw: Add a new build tag ebitenexternaldll to requrie external DLLs
Embedding a DLL file and extrating it on the fly can be problematic.
The application might be unexpectedly recognized as a virus by some
virus checkers.

To mitigate this issue, Ebiten adds a new build mode `ebitenexternaldll`
which prevents Ebiten from embedding DLL files. Instead, the application
will require DLL files for GLFW.

Closes #1832
2021-10-14 02:44:25 +09:00
Emanuel
1394fe284d
Fix typos, and use panic instead of log.Fatal in doc.go (#1446)
Co-authored-by: Emanuel <7843818-fuyuaki@users.noreply.gitlab.com>
2020-12-21 21:14:17 +09:00
Hajime Hoshi
b1d7a5f595 shaderir/glsl: Enable dFdx for WebGL
With WebGL1, an extension is required for dFdx. On the other hand,
with WebGL2, GLSL ES 300 is required and the extension is forbidden.
This change fixes shaderir/glsl to switch the output depends on the
WebGL version.

This change also adds a new build tag 'ebitenwebgl1' forcing WebGL 1.

Updates #1404
2020-11-21 19:07:54 +09:00
Hajime Hoshi
aaa675bc2a ebiten: Make the comment more precise 2020-10-21 03:32:58 +09:00
Hajime Hoshi
eedb947471 Update comments 2020-10-21 03:17:40 +09:00
Jake Coffman
290f05060a
ebiten: Add ebitensinglethread build tag (#1396)
Updates #1367
2020-10-21 02:55:17 +09:00
Hajime Hoshi
8f00c8fbf5 ebiten: Remove the argument from Update
Fixes #1260
2020-10-04 19:33:10 +09:00
Hajime Hoshi
afef032acc ebiten: Deprecate Run
Fixes #1184
2020-06-22 03:45:19 +09:00
Hajime Hoshi
4fa52dcc56 Remove MonoGame support
Fixes #1148
2020-05-08 19:32:28 +09:00
Hajime Hoshi
4179e6c122 Introduce 'monogame' build tag experimentally
Updates #1078
2020-04-01 23:42:17 +09:00
Hajime Hoshi
e89605fc4a docs: Draw function's signature was wrong (again) 2020-04-01 04:25:32 +09:00
Hajime Hoshi
3d03599882 docs: Fix a wrong function name 2020-04-01 04:18:59 +09:00
Hajime Hoshi
237498e51f
ui: Add an optional function Draw function to Game interface (#1107)
This change adds an optional function Draw to the Game interface.
With Draw function, the game logic and rendering are separate.
There are some benefits:

  * The API is clearer and easier to understand.
  * When TPS < FPS, smoother rendering can be performed without
    changing the game logic depending on TPS.
  * Porting to XNA, which has separate functions Update and Draw,
    would be a little easier.

Draw is optional due to backward compatibility. Game interface was
already used before v1.11.x in mobile packages, and adding a
function would break existing code unfortunately. Then, we adopted
switching the behavior based on whether Draw is implemented or not
by type assertions.

IsDrawingSkipped will always return false when Draw is implemented.

Fixes #1104
2020-03-24 12:01:37 +09:00
hiroebe
64e838584a Fix doc (#1046) 2020-01-06 19:43:29 +09:00
Hajime Hoshi
807f91e6ca docs: Update comments 2019-12-22 12:59:28 +09:00
Hajime Hoshi
0e63241bcb Update comments 2019-12-22 03:50:30 +09:00
Hajime Hoshi
7d56e4335e ui: Add RunGame, WindowSize and SetWindowSize
This change introduces the new APIs RunGame, WindowSize and
SetWindowSize. These new APIs hides the notion of 'scale', and is
more flexible with the outside size change. This means that we can
introduce a resizable window.

This change also adds -legacy flag to examples/windowsize. If the
flag is off, the new APIs are used.

This change deprecates these functions since the notion of 'scale'
is deprecated:

  * ScreenScale
  * ScreenSizeInFullscreen
  * SetScreenScale
  * SetScreenSize

Fixes #943, #571
Updates #320
2019-12-22 03:35:31 +09:00
Hajime Hoshi
4907cee128 Update documents 2019-10-13 17:33:10 +09:00
Hajime Hoshi
83f93df78b Add 'ebitengl' build tag to force to use GL
Fixes #958
2019-10-13 16:58:33 +09:00
Hajime Hoshi
dd59d8ae6e Fix comments 2019-01-19 02:30:06 +09:00
Hajime Hoshi
65294f2e24 Fix doc 2018-12-05 02:34:39 +09:00
Hajime Hoshi
3abbe26f7f Remove dependency on internal/png on mobiles and browsers
Fixes #735
2018-11-14 00:37:51 +09:00
Hajime Hoshi
3600c8aa6c ui: Add documents about concurrent-safety
Fixes #709.
2018-10-10 23:23:30 +09:00
Hajime Hoshi
3cd9dfd800 Rename IsRunningSlowly to IsDrawingSkipped
Fixes #643
2018-07-10 22:31:26 +09:00