Commit Graph

1316 Commits

Author SHA1 Message Date
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
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
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
Бранимир Караџић
43aa2b6bca Cleanup. 2023-06-30 18:38:59 -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
Бранимир Караџић
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
Francis Hart
caa637dbd5
Expose nvgCreateBgfxTexture() helper function (#3046)
The nvgCreateBgfxTexture() helper function is already implemented in
the nanovg wrapper library, so its useful to expose this function
to the user.

Also expose the NVG_IMAGE_NODELETE flag so this can be passed to the
nvgCreateBgfxTexture() function, to indicate that the caller retains
ownership of the bgfx texture.
2023-02-27 07:10:53 -08:00
ShuangLiu1992
adb0f893a3
fix ios entry (#3027)
When initWithFrame is being called s_ctx has not been created yet. Fix with correct assign order.
2023-01-19 08:45:51 -08:00
Бранимир Караџић
466c6a4e95 Happy New Year! 2023-01-14 10:05:12 -08:00
Бранимир Караџић
4f3ce6abcb Entry: Resize window before calling init. 2023-01-13 07:08:51 -08:00
Bryan McNett
a93a714632
fix for save file dialog in windows (#3003)
the save file dialog in windows was an open file dialog, by mistake

Co-authored-by: Bryan McNett <bryan@mcnett.org>
2022-12-23 23:00:26 -08:00
Бранимир Караџић
43296d6f3f Cleanup. 2022-12-12 07:53:08 -08:00
Branimir Karadžić
408988946d Cleanup. 2022-09-16 20:12:31 -07:00
Бранимир Караџић
9ad3825cee D3D12: Linux build. 2022-09-14 20:59:59 -07:00
Бранимир Караџић
72cbe83275 Removed bgfx::setPlatformData usage from entry example harness. 2022-08-25 20:07:03 -07:00
Бранимир Караџић
ad5cc799a4 Added numeric min/max for type. 2022-08-22 20:33:50 -07:00
Бранимир Караџић
7d323e84f3 Updated ImGui. 2022-08-06 22:28:07 -07:00
luzpaz
e7936efa6a
Fix typos (#2839)
Found via `codespell -q 3 -S ./3rdparty,*.ttf -L attribut,ba,clude,conly,indext,inout,lod,nclude,retur,struc,unknwn,utput`
2022-07-12 14:21:31 -07:00
Бранимир Караџић
aaba3b3a5e Cleanup. 2022-06-20 04:39:25 -07:00
SnapperTT
498d0b6e54
Update nanovg_bgfx.cpp (#2823)
Fix the transient vertex buffer's overflow assert being fired. Now if the tvb is overflowed a warning is emitted and the draw is skipped
2022-06-20 04:37:59 -07:00
Бранимир Караџић
2215e67ee1 Fixed ImGui assert. 2022-06-17 00:17:37 -07:00
Бранимир Караџић
8f96b8ade7 Cleanup. 2022-02-11 08:15:04 -08:00
pezcode
88a6317a93
Switch to imgui IO event API (#2726)
Added in imgui 1.87
2022-02-11 08:12:27 -08:00
pezcode
841ab98cfa
Imgui fixes (#2720)
* Pass Meta key modifier to ImGui

* Use index offset provided by ImGui

* Use vertex offset provided by ImGui

We need to tell ImGui we can support per-draw vertex offsets. Useful for
complex widgets like implot.
2022-02-06 17:31:27 -08:00
luzpaz
6875e96bcb
Fix various typos (#2719)
Found via `codespell -q 3 -S ./3rdparty,*.ttf -L attribut,ba,clude,conly,indext,inout,lod,nclude,retur,utput`
2022-02-05 11:34:15 -08:00
Бранимир Караџић
4581f14cd4 Happy New Year! 2022-01-15 11:59:06 -08:00
Paul Gruenbacher
5b4a6dc330
Fix bad delete in font_manager.cpp (#2703)
Fix alloc-dealloc-mismatch (operator new [] vs operator delete
2022-01-03 12:52:53 -08:00
XXxR4GALXxx
be3cfd1bd9
Fix "GDI resource leak". (#2694)
"When you no longer need the HBRUSH object, call the DeleteObject function to delete it."
https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createsolidbrush
👍
2021-12-25 13:45:19 -08:00
Raziel Alphadios
16ee93b88d
Change TTF init asserts to warns and add some details to the output (#2681)
Co-authored-by: Raziel Alphadios <raziely@gmail.com>
2021-12-08 14:27:13 -08:00
simon chen
5cbaa3bdcd
remove duplicate code (#2679) 2021-12-07 08:55:19 -08:00
DarkContact
08b8252f73
Fix font rendering (#2653)
* Fix subpixel font rendering

* remove const
2021-11-09 14:35:48 -08:00
Бранимир Караџић
e71ffa0016 Cleanup. 2021-10-27 17:00:39 -07:00
Бранимир Караџић
53772163f4 Added cmdRemove. 2021-10-26 18:20:35 -07:00
Бранимир Караџић
8392a44b3a Fixed assert macros, and improved error handling. 2021-10-25 18:59:32 -07:00
Бранимир Караџић
c5d1a1a8e3 Moving bounds from bgfx to bx. 2021-10-16 10:41:42 -07:00
Бранимир Караџић
a1d2c03eba Cleanup. 2021-10-14 21:03:34 -07:00
Бранимир Караџић
84a38eede0 Cleanup. 2021-10-13 19:54:27 -07:00
Бранимир Караџић
6921fc3438 Cleanup. 2021-10-08 19:06:53 -07:00
Бранимир Караџић
3c9591d9f9 Cleanup. 2021-09-25 22:30:42 -07:00