Commit Graph

2231 Commits

Author SHA1 Message Date
Martijn Courteaux
3303b451a1
Properly support Wayland under EGL and Vulkan. (#3358) 2024-10-01 09:01:44 -07:00
Бранимир Караџић
f8b20616de Rebuilt spir-v shaders. 2024-09-28 10:14:37 -07:00
Бранимир Караџић
e4073f0259 Imgui: Add ability to link external STB libs. 2024-09-28 09:48:37 -07:00
Sandy
409fbc5d14
Replace ALooper_pollAll with ALooper_pollOnce (#3334) 2024-08-02 15:38:56 -07:00
Бранимир Караџић
e41cbebf16 Set define for USE_ENTRY. 2024-07-09 07:28:59 -07:00
Raziel Alphadios
500e03ffcb
Change ImGuiKey_Mod* to new names ImGuiMod_* (#3322) 2024-07-09 07:17:35 -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
Бранимир Караџић
4c74c06661 Cleanup. 2024-06-15 20:23:44 -07:00
Бранимир Караџић
acfad63e8f Cleanup. 2024-06-15 16:53:08 -07:00
Branimir Karadžić
d1feabe319 Rebuilt shaders. 2024-06-15 14:47:08 -07:00
Oskar Kwaśniewski
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
Бранимир Караџић
00fa5ad179 Updated SPIR-V shaders. 2024-05-27 22:32:47 -07:00
Бранимир Караџић
da5f27f9ce X11: Workaround DISPLAY not being set. 2024-05-25 09:10:05 -07:00
Бранимир Караџић
9d9ca4f8f6 Cleanup. 2024-05-02 20:00:58 -07:00
Aleksandr Bazhin
1138cc0cc9
Examples: change order of calls in loadTexture() (#3281)
Fixes possible concurrency issue - makes code usable in a multithreaded environment. imageReleasCb releases imageContainer after bgfx::createTexture...() is called. If bgfx::frame() is called from another thread, the release can happen before imageContainer is used in bgfx::calcTextureSize(), leading to a crash. Although loadTexture() is not used in multithreaded environment in the examples, calling bgfx::calcTextureSize() before bgfx::createTexture...() is a better reference for users.
2024-04-24 21:25:35 -07:00
Бранимир Караџић
932302d8f4 Compute: Rename Write Only suffix _WR to _WO. 2024-04-18 10:07:40 -07:00
Бранимир Караџић
2ad67a4dfd Cleanup. 2024-03-29 16:36:55 -07:00
Branimir Karadžić
dc2bb19519 Cleanup. 2024-03-27 19:59:59 -07:00
pheonix
0b049d4897
Use bx::bit_cast where appropriate for type punning, applying packed struct for arrays when necessary (#3212) 2024-02-24 15:47:04 -08:00
Branimir Karadžić
98d88d9fc6 Fixed draw indirect. 2024-02-09 20:55:44 -08:00
Бранимир Караџић
83dfadf673 Happy New Year! 2024-01-14 01:56:36 -08:00
Бранимир Караџић
e9e2e224ee Replaced macros with C++17 attributes. 2023-12-02 20:16:56 -08:00
Бранимир Караџић
edb72488bc macOS: Fixed VK (MoltenVK 1.2.6). 2023-12-01 20:51:28 -08:00
Martijn Courteaux
6dea6a22b6
Fixes #1671 and Fixes #1139. Flush the nanovg draw commands whenever the next draw would overflow the uint16_t index type. (#3207) 2023-11-25 09:23:05 -08:00
Бранимир Караџић
49c0e49527
Removed WebGPU. (#3198) 2023-11-09 17:15:22 -08:00
Branimir Karadžić
c54063b88c Updated texture. 2023-11-08 07:14:30 -08:00
Branimir Karadžić
1e800e8ba9 Rebuilt assets. 2023-11-06 21:37:19 -08:00
Aleksandr Bazhin
a23b128ae2
Fix kerning for SDF scaled fonts in font_manager.cpp (#3192)
Kerning is now also scaled with the scaled child font when using SDF fonts. In examples/common/font_manager.cpp kerning was visibly off when scaling SDF font down.
2023-11-05 09:13:52 -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
Бранимир Караџић
f14c14a485
Removed D3D9. (#3191) 2023-11-03 21:15:42 -07:00
Branimir Karadžić
6f2716d2f4 Rebuilt shaders. 2023-09-30 16:54:57 -07:00
Branimir Karadžić
0be9604e74 Uncomment examples. 2023-09-30 16:54:57 -07:00
Branimir Karadžić
8abb775f45 Cleanup. 2023-09-30 16:54:57 -07:00
Julian Sikorski
ec84ed60fc
Use BX_UNUSED for cases where Wayland is not an option (#3160) 2023-08-17 21:42:26 +02:00
Бранимир Караџић
cbfea75cfd Cleanup. 2023-08-17 19:28:22 +02: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
Бранимир Караџић
5bc450408c Updated ImGui. 2023-07-01 08:16:39 -07:00
Бранимир Караџић
43aa2b6bca Cleanup. 2023-06-30 18:38:59 -07:00
Branimir Karadžić
75fc6aeb4a Added clear rect test. 2023-06-23 20:17:56 -07:00
云风
498c34273b
Larger debug text for retina display (#3109)
* Add Init.Resolution.scaleDebug

* clamp scale to BGFX_CONFIG_MAX_SCALE_DEBUG

* update version

* Use textWdith/textHeight in helloworld
2023-06-13 18:17:38 -07:00
Бранимир Караџић
eb3405158a Cleanup. 2023-05-23 22:03:07 -07:00
Бранимир Караџић
3a0233ed50 Cleanup. 2023-05-20 18:45:17 -07:00
Branimir Karadžić
290295136b Added bx::Location, and removed allocator macros. 2023-04-23 19:19:22 -07:00
Бранимир Караџић
e9d1e3d0fe Renamed bx::init::* tags. 2023-04-22 22:22:45 -07:00
Бранимир Караџић
a3e68cd9b7 Cleanup. 2023-04-21 19:04:16 -07:00
Бранимир Караџић
d909d01734 Metal: Rebuilt shaders. 2023-04-12 19:23:57 -07:00
Бранимир Караџић
4d11ad55f3 Cleanup. 2023-04-03 07:23:49 -07:00
Бранимир Караџић
f8019cb3d4 Cleanup. 2023-03-02 21:45:20 -08:00
Francis Hart
403c4da2e0
Fix compiler warnings for nanovg wrapper (#3048)
* Fix compiler warnings for nanovg wrapper

Code for the nanovg wrapper was generating compiler warnings for
implicit casts from int32_t to uint16_t. These casts are unavoidable
due to how bgfx and nanovg APIs use different types for texture
width/height.

* Fix compiler warning from nanovg fontstash.h

This fixes some warnings for signed/unsigned comparsion
coming from the nanovg fontstash.h header.
2023-02-27 18:33:29 -08:00