Commit Graph
99 Commits
Author SHA1 Message Date
Бранимир Караџић 69acf28813 Cleanup. 2024-11-21 07:34:58 -08:00
Martijn Courteaux 01af383a6c Fix Vulkan swapchain invalidation issue. (#3379)
* Fix Vulkan swapchain invalidation issue.

* Always clamp render pass to frame buffer size.

* Fix formatting.
2024-11-21 07:29:24 -08:00
Martijn Courteaux e488a07f1b Support both X11 and Wayland in the same build. (#3360)
* Support both X11 and Wayland in the same build.

 - Works for both Vulkan and OpenGL.
 - Remove --with-wayland from genie options.
 - Vulkan loads all three extensions for surface creation instead of only one.
 - Add width and height parameter to GlContext::createSwapChain(), which is needed for EGL to create
   a SwapChain with the given window size.
 - Dirty-fix the example-22-windows to recreate the FrameBuffer by first destroying and then
   recreating to make sure the window is released of its swapchain.
 - Fix dbgText glitch in example-22-windows.
 - Remove old X11-related dependencies for GLFW3.

* Formatting.
2024-10-05 14:33:22 -07:00
Martijn Courteaux a6e372ead9 Dynamically load libwayland-egl.so.1 when dealing with Wayland to remove dependencies at program startup. (#3359) 2024-10-01 11:06:56 -07:00
Martijn Courteaux 3303b451a1 Properly support Wayland under EGL and Vulkan. (#3358) 2024-10-01 09:01:44 -07:00
elvencache 74e7edccdc Fix issues with controller in entry_sdl.cpp. (#3321)
SDL2's concept of GameController is a like a PS or Xbox controller, two sticks, four face buttons, etc. These are the same as the bgfx example's Gamepad.

SDL also has a concept of Joystick, which could be anything, like a flight stick. Game Controllers are implemented by these lower level joystick's.

Entry SDL gets duplicate events, for both controller and the joystick implementing it. Game controller buttons are remapped to bgfx gamepad, but joystick buttons are not. This causes incorrect button presses.

Additionally, the joystick z axis behaves differently than game controller or bgfx gamepad. With at-rest value being negative, not zero.

Due to all of this, it seems like the best approach would be to ignore joystick events and only handle game controller events.

Also, minor additional fix to get handle's index when using it as array index. Fixes compilation in Visual Studio.
2024-07-07 18:52:23 -07:00
Oskar Kwaśniewskiandmani3xis 3195593d8d feat: base visionOS bgfx implementation (#3289)
Co-authored-by: mani3xis <mariusz.pas+dev@protonmail.com>

fix: properly set storageMode

cleanup: remove unused variables

fix crash while releasing m_drawable on visionOS

fix: remove unused timing variable

fix: file name cases, cleanup

feat: integrate visionOS into bgfx examples
2024-06-03 08:14:53 -07:00
Бранимир Караџић 83dfadf673 Happy New Year! 2024-01-14 01:56:36 -08:00
Branimir Karadžić de9f4b3385 Remove unsupported platforms. 2023-11-03 21:42:02 -07:00
Branimir Karadžić 4946079f1d Cleanup. 2023-11-03 21:36:00 -07:00
Julian Sikorski f4d463990a Allow simultaneous X11 and Wayland support (#3152)
* Allow simultaneous X11 and Wayland support

* Add NativeWindowHandleType

* Set default value for g_platformData.type

* Use g_platformData.type to check for a native Wayland window

* Stub getNativeWindowHandleType on platform where Wayland is not an option

* Implement getNativeWindowHandleType for GLFW

* Add getNativeWindowHandleType to the remaining C++ examples

* Add getNativeWindowHandleType to the C example
2023-08-17 16:54:31 +02:00
Branimir Karadžić 290295136b Added bx::Location, and removed allocator macros. 2023-04-23 19:19:22 -07:00
Бранимир Караџић 466c6a4e95 Happy New Year! 2023-01-14 10:05:12 -08:00
Бранимир Караџић 72cbe83275 Removed bgfx::setPlatformData usage from entry example harness. 2022-08-25 20:07:03 -07:00
Бранимир Караџић 4581f14cd4 Happy New Year! 2022-01-15 11:59:06 -08:00
Бранимир Караџић 8392a44b3a Fixed assert macros, and improved error handling. 2021-10-25 18:59:32 -07:00
Бранимир Караџић b8dc216fa0 Cleanup. 2021-06-05 07:56:20 -07:00
simon chen 0b179e59e2 fixed GLES3 bug, when "EGL_KHR_create_context" doesn't exist. (#2529)
* fixed gles3 bug

* fixed sdl bug on android platform
2021-06-05 07:54:14 -07:00
Бранимир Караџић af49c5d264 Happy New Year! 2021-01-14 15:53:49 -08:00
Бранимир Караџић 2cbcb6ea90 RRenamed BX_CHECK to BX_ASSERT. 2020-06-16 10:06:18 -07:00
Бранимир Караџић 4d50e90dd2 Removed support for SteamLink (discontinued 11/2018). 2020-03-11 21:49:11 -07:00
Бранимир Караџић 82f56b5987 Happy New Year! 2020-01-14 21:37:06 -08:00
mooz ff13e730bb Renamed BGFX_USE_WAYLAND to ENTRY_CONFIG_USE_WAYLAND. 2019-03-09 10:53:14 +01:00
mooz 2b6d4cf00f Added Wayland support. 2019-03-08 10:36:50 +01:00
Бранимир Караџић 3f3a9450ba Happy New Year! 2019-01-13 17:13:25 -08:00
OswaldHurlem ff34c8c37d Mouse up/down events from entry_sdl.cpp incorrectly have mouse z (scroll_z) set to zero (#1404) 2018-06-06 21:40:18 -07:00
Branimir Karadžić 8c91699678 entry: Drop file event for SDL. 2018-01-03 22:49:10 -08:00
Branimir Karadžić 49b5c55610 Fixed SDL build. 2018-01-02 21:41:36 -08:00
Branimir Karadžić ed00c24f6f texturev: Allow arbitrary window size. 2018-01-02 19:15:04 -08:00
Branimir Karadžić f44c8e2b14 Happy New Year! 2018-01-01 11:16:06 -08:00
Branimir Karadžić 2d835155a9 Fixed build. 2017-11-04 15:25:11 -07:00
Libor Čapák f56687ee4b SDL_GameControllerAddMapping needs zero-terminated string (#1234) 2017-09-11 13:28:28 -07:00
Branimir Karadžić 87acea36e7 Cleanup. 2017-07-24 21:04:30 -07:00
Branimir Karadžić 3e212b519f Moving code around and renaming files. 2017-07-15 21:01:08 -07:00
Branimir Karadžić 6710ea410b Cleanup. 2017-04-15 17:29:34 -07:00
Libor Čapák 3e832fb4bb simple fix #1070 before proper solution (#1116) 2017-04-15 17:36:39 -07:00
Libor Čapák b57d8e22bd fix sdl entry + gamecontrollerdb.txt (#1048)
* missing bx/mutex.h include

* gamecontrollerdb.txt update
2017-02-17 09:37:04 -08:00
Branimir Karadžić 094c6a95d7 Cleanup. 2017-02-16 21:07:39 -08:00
Branimir Karadžić b99ebb9535 Cleanup. 2017-02-08 19:55:31 -08:00
Andrew Copland 19770a8f20 Updating code to match bx changes. (#1028) 2017-01-22 08:52:31 -08:00
Branimir Karadžić 3b83f53ab1 Happy New Year! 2017-01-01 00:18:41 -08:00
Branimir Karadžić 2c5e21966f Cleanup. 2016-12-15 10:59:57 -08:00
Branimir Karadžić a5bb9be4ed Cleanup. 2016-12-08 20:45:01 -08:00
Branimir Karadžić 8da9e54957 Renamed bgfxdefines.h to defines.h, and bgfxplatform.h to platform.h. 2016-12-05 19:52:01 -08:00
Branimir Karadžić f7e2c6b291 Cleanup. 2016-11-09 22:22:27 -08:00
Branimir Karadžić 79ef46e4cf Fixed issue #890. 2016-08-26 09:01:49 -07:00
Branimir Karadžić 939829f88c Moved SDL and GLFW window platform hooks to entry. 2016-08-16 22:22:39 -07:00
Branimir Karadžić 196a64d242 Cleanup. 2016-04-24 15:32:51 -07:00
Dario Manesku 59a71ca445 Entry_sdl key input changes. 2016-04-24 23:20:23 +02:00
Branimir Karadžić 45f08a3066 SDL: Updated scancodes. 2016-04-23 17:47:36 -07:00