Commit Graph

1952 Commits

Author SHA1 Message Date
Kristian Bolino
779c420d06 Fix C89 warnings and oversample at 3x scale 2022-03-15 18:10:01 -04:00
Kristian Bolino
ec4aa9992f Fix high-DPI scaling in sdl_renderer
This commit resolves two issues with high-DPI display rendering:

1. The coordinates were not scaled properly, resulting in tiny output
   and misalignment of actual cursor position with apparent position;
   this is fixed by calling SDL_SetRenderScale with appropriate scaling
   factors determined by comparing the window size to the renderer's
   output size
2. The fonts were not oversampled, resulting in excessively blurry text;
    this is fixed by setting oversample_h and oversample_v on the
    font_config according to the scaling factors
2022-03-15 11:43:31 -04:00
Kristian Bolino
cbfc8f89e9
sdl_renderer: fix Metal rendering (#426)
Addresses an issue where the Metal render driver (macOS) could not handle the clipping rectangle {-8192, -8192, 16384, 16384} and would simply draw nothing to the screen. The solution is to ensure the cliprect coordinates are not negative, which also doesn't break the other render drivers.

Co-authored-by: Kristian Bolino <kbolino@kbolino.com>
2022-03-15 15:28:47 +01:00
crazyBaboon
f0dccaeeec
Integrate file browser with glfw opengl2 demo (#400) and restructure demo/ directory accordingly 2022-03-14 20:46:44 +01:00
dumblob
10ecc825cc
Merge pull request #412 from Ohjurot/d3d12_backend
backend: add D3D12
2022-02-24 10:22:19 +01:00
Ludwig Füchsl
cb59055c06 Added some API dokumentation 2022-02-14 22:41:32 +01:00
Ludwig Füchsl
703d73aebf Added D3D12 backend and demo 2022-02-14 20:51:28 +01:00
dumblob
3e834293ad
Merge pull request #406 from Immediate-Mode-UI/inv_sqrt
Allow overriding the NK_INV_SQRT function as planned.
2022-02-07 18:24:49 +01:00
Rob Loach
429eaf3892
Merge pull request #409 from Immediate-Mode-UI/sdl_renderer-fix-cast
Fix incorrect cast on SDL_RenderGeometryRaw()
2022-02-06 15:29:57 -05:00
Rob Loach
6686ab1dd5
Fix incorrect cast on SDL_RenderGeometryRaw()
Fixes #405
2022-02-06 00:43:54 -05:00
Rob Loach
d13cc80b6e
Merge pull request #403 from lib-omar/lib-omar-patch-1
SDL demos: Favor switch over if-else chain in event handler.
2022-02-06 00:29:24 -05:00
Rob Loach
e20240b84f
Update clib.json to 4.9.6 2022-02-03 15:35:58 -05:00
Rob Loach
f60e50232a
Allow overriding the NK_INV_SQRT function 2022-02-03 15:30:39 -05:00
lib-omar
f6851ea2ca
Favor switch over if-else chain in event handler. 2022-01-29 14:19:32 -05:00
lib-omar
811dbacd12
Favor switch over if-else chain in event handler. 2022-01-29 14:18:07 -05:00
lib-omar
43b5e82748
Favor switch over if-else chain in event handler. 2022-01-29 14:15:02 -05:00
lib-omar
8f5ae21035
Favor switch over if-else chain in event handler. 2022-01-29 14:13:34 -05:00
Rob Loach
9486833f61
Merge pull request #396 from Immediate-Mode-UI/br_example_sdl_rendergeometry
Backend: SDL2 Renderer
2022-01-09 18:13:28 -05:00
Rob Loach
cd4990834f
sdl_renderer: Update code 2022-01-06 21:55:20 -05:00
Rob Loach
dfec9f0e43
Merge pull request #372 from ccawley2011/sdl-rawfb-pixelformat
sdl2surface_rawfb: Support any format with 1, 2, or 4 bytes per pixel
2021-12-26 21:26:17 -05:00
Rob Loach
3e91905e82
Merge pull request #387 from Immediate-Mode-UI/revert-156-fix-layout-bounds-padding
Revert "Fix layout bounds not accounting for padding"
2021-12-25 19:01:37 -05:00
Rob Loach
878936f476
Merge branch 'master' of github.com:Immediate-Mode-UI/Nuklear into revert-156-fix-layout-bounds-padding 2021-12-24 15:11:28 -05:00
Cameron Cawley
20a26c8fec Restore a previously removed cast 2021-12-22 21:43:33 +00:00
Cameron Cawley
54b14dc103 Support any format with 1, 2, or 4 bytes per pixel in sdl2surface_rawfb 2021-12-22 21:43:29 +00:00
Rob Loach
1f562ecb94
Merge branch 'master' of github.com:Immediate-Mode-UI/Nuklear into br_example_sdl_rendergeometry 2021-12-22 16:08:49 -05:00
YgorVasilenko
aa47577bae
window: Fix hover state when window is minimized (#284)
* Fix hovering check when window is minimized
* Align line
* window: Fix checking hovering when window is minimized
* changelog: Update version in clib.json

Fixes #284
2021-12-22 14:43:42 -05:00
dumblob
0fb7a29712
Merge pull request #384 from RobLoach/versions
changelog: Use x.y.z for versioning, rather than x.yy.zz
2021-12-22 20:35:30 +01:00
Rob Loach
f653884879
Revert "Fix layout bounds not accounting for padding" 2021-12-22 14:14:50 -05:00
Rob Loach
741cf32d15
Merge pull request #156 from Hejsil/fix-layout-bounds-padding
Fix layout bounds not accounting for padding
2021-12-22 13:15:22 -05:00
Rob Loach
0aa9a15a6c
changelog: Reference Semantic Versioning directly 2021-12-22 12:06:15 -05:00
Jimmi Holst Christensen
da15e0f9a0 Fix layout bounds not accounting for padding 2021-12-22 17:55:38 +01:00
Rob Loach
cd0d7bdecd
changelog: Use x.y.z for versioning, rather than x.yy.zz 2021-12-21 18:11:29 -05:00
dumblob
56be88e73f
Merge pull request #383 from RobLoach/doc
docs: Rename nuklear.html to index.html
2021-12-20 11:26:19 +01:00
dumblob
024ee4cf7f
Merge pull request #375 from RobLoach/stb-updates
fonts: Update stb_rect_pack and stb_truetype
2021-12-20 10:59:14 +01:00
Rob Loach
8125fb6413
docs: Rename nuklear.html to index.html 2021-12-19 18:08:20 -05:00
Rob Loach
eec319bb2c
Merge pull request #287 from epsilon-0/master
Add create-tag action to automatically tag nuklear versions
2021-12-19 15:58:03 -05:00
Rob Loach
a4b1d5e4fd
ci: Have autotagger reference clib.json 2021-12-19 03:17:43 -05:00
Rob Loach
3e92a81d3a
Merge branch 'master' of github.com:Immediate-Mode-UI/Nuklear into stb-updates 2021-12-19 02:31:14 -05:00
dumblob
a3cfd2a910
Merge pull request #378 from ccawley2011/canvas-demo
demos: Integrate the canvas example with the demos
2021-12-17 09:47:59 +01:00
Rob Loach
156bfbfb26
Merge pull request #380 from ccawley2011/gdiplus-arcs
Implement arcs with GDI+
2021-12-16 22:16:58 -05:00
Cameron Cawley
48334b8ba6 Implement arcs with GDI+ 2021-12-16 21:15:23 +00:00
Cameron Cawley
a12c158ad4 Add more shapes to the canvas demo 2021-12-16 20:26:26 +00:00
Cameron Cawley
459ba9c48c Integrate the canvas example with the demos 2021-12-16 20:26:26 +00:00
Rob Loach
24912785b7
Merge pull request #379 from ccawley2011/allegro5
Fix rendering issues with Allegro
2021-12-16 14:51:45 -05:00
Cameron Cawley
60c52adfaf
Enable and fix most GCC warnings (#377)
Co-authored-by: Rob Loach <robloach@gmail.com>
2021-12-16 20:44:00 +01:00
Cameron Cawley
c5d18493a4 Correctly implement arcs with Allegro 2021-12-16 18:57:08 +00:00
Cameron Cawley
291ce9b609 Fix rendering polygons and polylines with Allegro 2021-12-16 18:56:07 +00:00
Rob Loach
fb88f6c6fc
Merge branch 'master' of github.com:Immediate-Mode-UI/Nuklear into stb-updates 2021-12-16 11:55:29 -05:00
dumblob
fe2c63bb67
Merge pull request #374 from Immediate-Mode-UI/clib-mit
clib: Add licensing information
2021-12-16 10:29:06 +01:00
Rob Loach
368e184ebc
clib: Add Unlicense 2021-12-16 00:59:09 -05:00