1
0
mirror of https://github.com/hajimehoshi/ebiten.git synced 2025-01-21 08:22:03 +01:00
Commit Graph

71 Commits

Author SHA1 Message Date
Hajime Hoshi
903ab6727b internal/ui: better panic message at ReadPixels before RunGame
Closes 
2024-05-03 16:36:19 +09:00
Hajime Hoshi
bb799da51f internal/ui: use atomic.Int32 instead of atomic.Store/LoadInt32
Updates 
2024-04-29 21:53:43 +09:00
Hajime Hoshi
f34932151d all: use atomic.Bool instead of atomic.Store/LoadUint32
Updates 
2024-04-29 21:16:01 +09:00
Hajime Hoshi
fd2c79398e Revert "internal/atlas: refactoring: ensure ReadPixels to be processed in a frame"
This reverts commit 55702a7c28.

Reason: This didn't work with the single-thread mode.

Updates 
Closes 
2024-03-26 13:10:00 +09:00
Hajime Hoshi
60725eba86 ebiten: add RunGameOptions.X11ClassName and X11InstanceName
Closes 
2024-02-11 19:31:29 +09:00
Hajime Hoshi
6736bb56ec internal/ui: make a separate package to hide a console
Updates 
2024-01-28 22:42:58 +09:00
Hajime Hoshi
2da56c00c8 internal/ui: remove renderThread
Updates 
2024-01-02 17:14:38 +09:00
Hajime Hoshi
d7ebc19d04 internal/ui: refactoring: reduce usages of renderThread
Updates 
2023-12-17 16:21:07 +09:00
Hajime Hoshi
563bbda615 internal/ui: bug fix: build failure on mobiles 2023-11-05 00:43:02 +09:00
Hajime Hoshi
2db10b1e9c ebiten: add RunGameOptions.SingleThread and deprecate ebitenginesinglethread build tag
Closes 
2023-11-05 00:01:44 +09:00
Hajime Hoshi
5fe8c29b4c internal/ui: refactoring: integrate (*UserInterface).run 2023-10-29 18:57:10 +09:00
Hajime Hoshi
ea842495cf internal/ui: refactoring 2023-10-29 18:29:41 +09:00
Hajime Hoshi
457f6bb964 Revert "internal/ui: bug fix: panic at ReadPixels before running"
This reverts commit 2f6df3d4d6.

Reason: regression by calling (*ebiten.Image).At from a different goroutine

Updates 
2023-10-27 14:29:41 +09:00
Hajime Hoshi
2f6df3d4d6 internal/ui: bug fix: panic at ReadPixels before running
Closes 
2023-10-27 12:18:34 +09:00
Hajime Hoshi
55702a7c28 internal/atlas: refactoring: ensure ReadPixels to be processed in a frame
This enables to call (*Image).At from HandleInput, which might be
called outside of a frame.

Updates 
2023-10-25 00:48:09 +09:00
Hajime Hoshi
f2acc3d9f7 internal/ui: refactoring 2023-10-24 14:38:23 +09:00
Hajime Hoshi
39688dd27d internal/processtest: improve test issue2815
WritePixels for 1x1 image is optimized at internal/ui, and Ebitengine
doesn't read pixels from GPU in this case. Enlarge the tested image,
and use DrawImage to ensure to invalidate the internal cache.

Updates 
2023-10-20 02:48:21 +09:00
Hajime Hoshi
e80e981bf5 internal/atlas: let callers retry ReadPixels instead of blocking
This is a preparation to implement HandleInput, which might call
(*Image).At in its callback.

Updates 
2023-10-20 02:30:32 +09:00
Hajime Hoshi
8274b32301 internal/graphicslibrary: refactoring: remove IsGL and IsDirectX 2023-10-15 17:30:16 +09:00
Hajime Hoshi
83a4133577 internal/ui: refactoring: remove globalState 2023-10-15 16:51:16 +09:00
Hajime Hoshi
27fd10595b internal/ui: refactoring: reduce global functions and prefer Get() 2023-10-15 03:40:48 +09:00
Ketchetwahmeegwun T. Southall
60b7de6a3c
ebiten: add APIs to treat monitors ()
This change adds these APIs:

* `type MonitorType`
* `func (*MonitorType) Bounds() image.Rectangle`
* `func (*MonitorType) Name() string`
* `func Monitor() *MonitorType`
* `func SetMonitor(*MonitorType)`
* `func AppendMonitors([]*MonitorType) []*MonitorType`

Closes 
2023-08-30 21:02:04 +09:00
Hajime Hoshi
91e1c0ea29 ebiten: add more cursor shapes
This change adds these new cursor shapes:

* CursorShapeNESWResize
* CursorShapeNWSEResize
* CursorShapeMove
* CursorShapeNotAllowed

Closes 
2023-07-23 00:49:45 +09:00
Hajime Hoshi
d2c991b774 all: refactoring: use image.Rectangle 2023-04-28 01:03:38 +09:00
Hajime Hoshi
d1b9a0a9a1 internal/ui: freeze the input state for each frame
After this change, the input APIs will return more consistent results
for one frame.

Closes 
2022-12-18 23:54:43 +09:00
Hajime Hoshi
0bec1e65fa ebiten: add RunGameOptions.SkipTaskbar
Closes 
2022-12-13 02:00:44 +09:00
Hajime Hoshi
3024e07ecc ebiten: add RunGameOptions.ScreenTransparent
Closes 
2022-12-09 22:50:57 +09:00
Hajime Hoshi
d31b0189a2 ebiten: add RunGameOptions.InitUnfocused
Updates 
2022-12-09 21:27:32 +09:00
Hajime Hoshi
bb68ebfcad ebiten: add RunGameWithOptions to specify graphics library
This also adds mobile.SetGameWithOptions.

Updates 
2022-12-09 21:27:31 +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 
2022-11-23 04:41:11 +09:00
Kacper Drobny
6e12fd13e4
ebiten: add additional MouseButtons ()
Closes 
2022-11-23 04:28:34 +09:00
Hajime Hoshi
ae41530f1c internal/graphicscommand: move availableFilename to graphicscommand 2022-08-31 13:26:14 +09:00
Hajime Hoshi
6d87be7169 internal/ui, internal/mipmap: refactoring: replace At with ReadPixels
Updates 
2022-08-06 00:32:42 +09:00
Vseslav Kochenov
3ac37e250f
ebiten: add ReadDebugInfo for getting debug info (only graphics libray so far) ()
Closes 
2022-07-31 02:56:16 +09:00
Hajime Hoshi
15548b4c74 internal/ui: add userInterfaceImpl.graphicsDriver 2022-03-22 00:13:22 +09:00
Hajime Hoshi
be1836339b internal/ui: define the common struct UserInterface for all the environments
The existing UserInterface structs became userInterfaceImpl structs.
2022-03-21 23:10:27 +09:00
Hajime Hoshi
99437944bc internal/ui: remove graphicsDrivre() calls from image.go 2022-03-21 22:49:47 +09:00
Hajime Hoshi
77f765d483 internal/testing: bug fix: considering the case when Y is inverted
Closes 
2022-02-27 22:14:32 +09:00
Hajime Hoshi
566957dc1c internal/graphicsdriver/metal: invert Y at the vertex shader
Instead of using a negative height in the viewport, invert the Y direction
at the vertex shader. This is a little more readable as a negative height
is hacky.

This is a preparation for DirectX 12. DirectX 12's coodination system
is very similar to Metal, but doesn't treat a negative height in its
viewport unfortunately.

Updates 
2022-02-27 01:53:03 +09:00
Hajime Hoshi
29382b424b internal/ui: refactoring: remove some exposed functions 2022-02-13 20:09:13 +09:00
Hajime Hoshi
2609d73a1a internal/ui: refactoring: move some logics to internal/ui 2022-02-13 18:01:18 +09:00
Hajime Hoshi
b282b1805b internal/ui: refactoring: add ui.SetError
This is a preparation to move uiContext to the package internal/ui.
2022-02-13 17:17:08 +09:00
Hajime Hoshi
e9cfbc1630 internal/ui: refactoring: remove Graphics() 2022-02-13 04:17:39 +09:00
Hajime Hoshi
2c2c4bc428 ebiten: add WindowResizingModeType and its constants and functions
This allows a new state to disallow resizing the window but allow
making the window fullscreen on macOS by a user.

This change adds the new type WindowResizingModeType. There are
these constants of this type:

 * WindowResizingModeDisabled
 * WindowResizingModeOnlyFullscreenEnabled
 * WindowResizingModeEnabled

Closes 
2022-02-11 04:59:04 +09:00
Hajime Hoshi
2fbfa5444b internal/driver: remove Input 2022-02-06 18:34:31 +09:00
Hajime Hoshi
6f72b15912 internal/driver: move some definitions to internal/ui
Updates 
2022-02-06 18:13:45 +09:00
Hajime Hoshi
6b8516c7a5 driver: Move ui.RegularTermination to driver 2019-04-07 10:54:05 +09:00
Hajime Hoshi
1b8d4abfdb driver: Move ui.GraphicsContext to driver 2019-04-07 10:48:18 +09:00
Hajime Hoshi
b579bd7fd0 graphics: Remove GraphicsContext.Invalidated 2019-04-07 10:08:55 +09:00
Hajime Hoshi
e3023889ac ui: Change RegularTermination to a value 2018-02-04 00:22:38 +09:00