Commit graph

6327 commits

Author SHA1 Message Date
Bill Currie
bfa7c1722a [build] Implement tracy memory zones
This proved to be quite the challenge, and is probably rather fragile,
but it does seem to work, and might help with tracking down memory
leaks.
2024-01-05 11:50:48 +09:00
Bill Currie
60c22e8fda [ecs] Make hierarchy ownership of entities optional
I'm not sure this is what I want.
2024-01-05 11:50:48 +09:00
Bill Currie
292e4ca132 [ecs] Pass the registry in to the component destroy function
This makes it possible for hierarchies to clean themselves up (by
deleting their entities (though that will cause other problems later
when the hierarchy doesn't own the entities)), thus plugging a memory
leak when parsing passage text.
2024-01-03 12:40:56 +09:00
Bill Currie
91dd9d3dfa [console] Clamp min charbuf size to 1x1
Prevents a segfault when the window is ultra-tiny (eg, 80x45 pixels)
2024-01-03 12:39:54 +09:00
Bill Currie
dfcad353fb [vulkan] Free the alias model resource block
I forgot to do so when switching to using resource (plugs a leak).
2024-01-03 12:39:54 +09:00
Bill Currie
f5ebc1083f [ecs] Pass the registry in to the component destroy function
This makes it possible for hierarchies to clean themselves up (by
deleting their entities (though that will cause other problems later
when the hierarchy doesn't own the entities)), thus plugging a memory
leak when parsing passage text.
2024-01-03 12:39:54 +09:00
Bill Currie
35eec0b2e5 [ecs] Implement hierarchies as components
The main goal of this change was to make it easier to tell when a
hierarchy has been deleted, but as a side benefit, it got rid of the use
of PR_RESMAP. Also, it's easy to track the number of hierarchies.

Unfortunately, it showed how brittle the component side of the ECS is
(scene and canvas registries assumed their components were the first (no
long the case), thus the sweeping changes).

Centerprint doesn't work (but it hasn't for a while).
2024-01-02 16:38:01 +09:00
Bill Currie
6b2bd02b14 [ui] Add a canvas reference component
It's used for finding the entity that has the actual canvas component
attached. Useful for sharing a single canvas between multiple view
hierarchies, and worked as a proof of concept for doing similar with
hierarchy references, and might work for properly destroying canvas
items (fills etc) when a view entity is deleted (if attached to every
view).
2023-12-31 14:15:05 +09:00
Bill Currie
9a74fb0a14 [ecs] Add basic entity and registry printing
Entities print their status and attached component names, registries
print their component counts for each pool.
2023-12-31 14:08:01 +09:00
Bill Currie
f5de553949 [ui] Take passage view parent parameter
I'm not sure this will be useful in imui, but it might in a retained
mode UI.
2023-12-28 16:43:31 +09:00
Bill Currie
f4f81db440 [ui] Free any preexisting passage glyphs
This plugs a memory leak in Text_PassageView.
2023-12-28 16:40:26 +09:00
Bill Currie
dc8ee14f50 [ruamoko] Use a single dstring for (v)sprintf
Rather than creating and destroying one every call. Didn't make any real
difference to the memory leaks, but it should make the calls
fractionally faster and reduce fragmentation.
2023-12-28 16:31:00 +09:00
Bill Currie
0a7042f318 [sys] Don't use va_copy in Sys_Error
It shouldn't be necessary since Sys_Error can restart args itself.
2023-12-28 16:11:06 +09:00
Bill Currie
4c704e9a2e [ecs] Give registries a name
This makes debugging a little easier when there are multiple ECS
registries. Currently, the name parameter must be a stable pointer.
2023-12-28 16:08:40 +09:00
Bill Currie
1a5b421933 [ruamoko] Share registry between gui and imui
I can't say I like there being a hard-coded registry, but gui and imui
need to agree on all aspects of the ECS registry they use.
2023-12-28 16:06:47 +09:00
Bill Currie
6b6c91e993 [alsa] Fix a missing \n in a message
I guess I had thought it was Sys_Error instead of Sys_Printf (or maybe I
changed it).
2023-12-27 16:05:24 +09:00
Bill Currie
d5b0a51b6e [dstring] Use va_copy correctly
Every use of va_copy needs a corresponding call to va_end. I had somehow
missed that when getting _dvsprintf to work properly. This seems to plug
a memory leak (certainly doesn't make things worse).
2023-12-27 16:03:05 +09:00
Bill Currie
75171743a4 [ecs] Destroy component pools in reverse order
This seems to be the best solution for interlinked entities/components,
the idea being that components with higher indices can "own" those with
lower (eg, imui_reference can "own" a view_href, but not the other way)
and makes it relatively easy to manage (components that can own others
get added to the registry later), and might even allow validation at a
later stage.
2023-12-26 11:10:07 +09:00
Bill Currie
767f4ff02e [ui] Plug a hierarchy reference leak
I'm not entirely sure what's going on yet, but deleting the referenced
view via its entity rather than the view results in a corrupted href in
the component pool (with a null entity id in the dense array) and then
an href component leak (as well as some very weird numbers when dumping
canvas bounds). I suspect Hierref_DestroyComponent is missing a few
steps (though I do need to verify that it's getting called in this
particular case).
2023-12-24 02:22:46 +09:00
Bill Currie
dd11a7b378 [vulkan] Apply 2d scale to clipping bounds
It was a little off-putting getting an incorrectly clipped console when
using non-unitary scale (especially since I was trying to show abbator
something).
2023-12-24 02:14:24 +09:00
Bill Currie
101c50e3e1 [ui] Sort out most of the nested canvas layout issues
Draw order is now stable and sizing is mostly correct.
2023-12-23 19:25:30 +09:00
Bill Currie
a50c1d0f81 [ui] Implement nested canvases
This is for scroll boxes (the nesting of canvases is for the clipping
they provide). There are some issues with automatic layout, but this
gets things mostly working, in particular the management of the link
between hierarchies as a canvas is always the root of its hierarchy.
2023-12-23 14:36:57 +09:00
Bill Currie
6faa78eaa1 [ui] Change draw order from 16-bit to 32-bit
With the scroll box work I'm doing, I realized 16 bits is a little
cramped. Although I doubt it would be that much of a problem, switching
to 32 bits turned out to be free because of alignment.
2023-12-23 14:31:58 +09:00
Bill Currie
86326c8179 [ui] Clip rendering to canvas bounds
This causes minor problems when the window gets too small, but it will
allow for scrollable regions.
2023-12-22 18:27:23 +09:00
Bill Currie
00d9f039fc [vulkan] Set debug windows to auto_fit
I'd missed this earlier, thus the vulkan debug windows wound up a tad
small.
2023-12-22 18:25:04 +09:00
Bill Currie
7f1c20afa9 [ui] Implement window resizing
There are some rather iffy parts (windows can get too small), and the
drag bars are a little odd, but the concepts are working.
2023-12-22 18:22:21 +09:00
Bill Currie
650ea052ea [vulkan] Support clipping rectangles via scissor
Seems to work well. The other renderers have stubs because I don't feel
like implementing clipping for them. The gl and glsl wouldn't be too
difficult (need to handle the draw queues), but sw needs a fair bit of
work and I'm not sure it's worth the effort.
2023-12-22 18:17:09 +09:00
Bill Currie
f3eebae9bc [vulkan] Destroy the tracy GPU contexts
I had forgotten about doing so because I was doing my profiling without
validation layers.
2023-12-22 13:44:31 +09:00
Bill Currie
dc0b4880e3 [vulkan] Use VkValidationFeatureEnableEXT
It's currently unused as it does flag a pile of things I need to fix,
but I don't want to deal with them right now (though I have fixed a
few).
2023-12-22 12:29:59 +09:00
Bill Currie
1ca655c0d8 [ui] Clean up a lot of duplicate code
Much of the state handling was highly redundant (in particular, handling
entity and old_entity). This should make it easier to get dragable items
for window resizing.
2023-12-21 19:59:40 +09:00
Bill Currie
a300e2330d [ui] Make windows respect their size fields
If auto_fit is true, then the old behavior is retained.

This is actually better than the set size thing, but that's probably
still useful.
2023-12-21 19:57:02 +09:00
Bill Currie
f80f265a07 [ui] Support pixel sizing of im views
This will allow for user-controllable window sizes.
2023-12-21 17:02:59 +09:00
Bill Currie
4483368319 [ruamoko] Add bindings for imui
Things are a little clunky, but I've got a little window I can
manipulate in my test scene :)
2023-12-21 16:11:30 +09:00
Bill Currie
866cdcf068 [renderer] Reset fov when fisheye disabled
This fixes the badly stretched view after disabling fisheye.
2023-12-21 13:28:52 +09:00
Bill Currie
c5d27f5162 [client] Merge sbar into hud
This cleans up a lot of the twisted code between the two files. With the
rewrite of hud/sbar last year, there's really no separation between the
two.
2023-12-21 12:35:02 +09:00
Bill Currie
fc6c426241 [console] Clean up bitrot surrounding inputline
pr_argc no longer works for all functions (only for varargs). Fixes a
segfault when hitting enter in an input line in the menus. Also fix the
cursor.
2023-12-21 10:27:47 +09:00
Bill Currie
cc4fd5920f [ruamoko] Return float cvar values correctly
They don't work too well when going through int.
2023-12-21 10:25:44 +09:00
Bill Currie
ee986e3b2a [ruamoko] Use cvar toggle function
This fixes menu toggle items not working (eg fullscreen).
2023-12-21 10:24:21 +09:00
Bill Currie
ba0cf5fa9b [cvar] Add toggle and reset functions
The toggle function is needed for handling listeners, and reset was done
as part of the API cleanup.

Also clean up some of the names and API.
2023-12-21 10:22:21 +09:00
Bill Currie
5d4ce73ff4 [zone] Fix sentinel spelling in unit test 2023-12-21 02:30:39 +09:00
Bill Currie
049566062d [zone] Correct the spelling of sentinel 2023-12-21 02:18:56 +09:00
Bill Currie
82428ffb9d [zone] Fix z_split_block and Z_Realloc
z_split_block missed updating the back pointer in the block after the
split block, and Z_Realloc missed setting the sentinel.
2023-12-21 02:13:40 +09:00
Bill Currie
aed637e4de [zone] Reimplement Z_Realloc
It now checks the next block to see if it is free with enough space and
carves off a chunk if so, or chops off the end of the current block if
smaller, otherwise it allocates *before* freeing.
2023-12-20 21:16:16 +09:00
Bill Currie
de7293c16a [zone] Be more consistent with pointer to block conversion
Most importantly, the error checking is consistent.
2023-12-20 18:37:47 +09:00
Bill Currie
1266ede2b1 [zone] Make zone_error be like printf
It's so much nicer being able to just print normally.
2023-12-20 18:32:53 +09:00
Bill Currie
0f24f10bb9 [vulkan] Handle spotlights pointing -X
The problem didn't show up until the switch to float depth buffers
(because they can store the resulting nan).
2023-12-19 17:56:13 +09:00
Bill Currie
2e9e247ca4 [vulkan] Use resource for allocating alias models
So far only the mesh data, so it doesn't make any difference to
allocations, but it's the first step to reducing memory object
allocation.
2023-12-19 03:28:29 +09:00
Bill Currie
4ed1ef3353 [vulkan] Switch to float depth buffers
This takes full advantage of the reversed (infinite far plane) depth
buffers, and seems to have no performance cost.
2023-12-18 23:15:21 +09:00
Bill Currie
bf4eedc1c6 [vulkan] Apply light cull info to light pvs
This makes a possible improvement to e1m3, only barely affects ad_tears,
but makes about 30% difference to gmsp3v2 (21fps to 27, and from 3300
leafs to 2700).
2023-12-18 21:07:57 +09:00
Bill Currie
443f825d19 [vulkan] Support fisheye for light culling
Nicely, the people who created multiview thought of queries and how they
need to interact.
2023-12-18 03:07:29 +09:00
Bill Currie
d6e6d5b28b [vulkan] Clean up shadow map render passes a little
The cascade_shadow and cube_shadow names are no longer relevant thanks
to the staging images, and the output field for render passes is
optional in general and irrelevant for shadow maps.
2023-12-18 03:05:10 +09:00
Bill Currie
394eae2284 [vulkan] Fix missing debug utils for 64-bit windows
My wordsize check was probably for 686 builds.
2023-12-17 22:41:18 +09:00
Bill Currie
69af6a6234 [vulkan] Bail if all lights have been culled
When all lights have been culled, the updates wind up being 0 bytes and
vulkan validation doesn't particularly like that.
2023-12-17 20:05:17 +09:00
Bill Currie
2dd8eea0d9 [vulkan] Let's do the distcheck again 2023-12-17 18:45:02 +09:00
Bill Currie
b02da2c0a6 [vulkan] Implement shadow map culling
The rendering of the shadow maps now takes the culling information into
account resulting in a drastic reduction of work. There's still more
work to be done, but demo1 peaks at over 1000fps at 640x480, gmsp3v2 now
gets 14fps (1920x1080) near the front gate (used to be 3, then 6),
ad_tears is up to 3fps, but marcher is still unhappy, but it has
infinite radius lights, so needs more culling work (clipped light
volumes will help, I think). Also, culling lights for which nothing has
moved within their volumes will help somewhat (though not as much for
most id maps, I suspect).
2023-12-17 18:45:02 +09:00
Bill Currie
245d4a8d9a [vulkan] Clean up make_id()
Passing the control struct and a flag for style/nostyle makes the calls
much easier to read.
2023-12-17 18:45:02 +09:00
Bill Currie
1511aa7120 [vulkan] Show light style and id in the debug UI
Style includes the resulting scalar for the light value.
2023-12-17 18:45:02 +09:00
Bill Currie
8890e14208 [vulkan] Use OIT to visualize the light hulls
Using the translucency pass made it easy to have depth-tested
translucent "solid" light volumes instead of always visible lines (which
are still an option as that's useful too). Most importantly, being able
to see the surfaces helped no end in figuring out that my hulls were
created with counter-clockwise windings instead of quake's usual
clockwise windings and thus my hulls were being rendered inside-out in
the occlusion pass.
2023-12-17 18:45:02 +09:00
Bill Currie
187c48bde3 [vulkan] Apply the light culling information
The results of the occlusion queries give the lights that don't have a
visible hull, but unfortunately that includes any lights which the
camera is inside, but simple distance checks sort that out (with a
fudge-factor for the icosahedron vertices (1.583 (3(2+p)/(2+3p), p is
golden ratio)).
2023-12-17 18:45:02 +09:00
Bill Currie
f08b8dc3c7 [vulkan] Move light radius calcs to the CPU
No point in calculating them for every vertex, especially when I forgot
to update the calculations for the entid vertex shader.
2023-12-17 18:45:02 +09:00
Bill Currie
00ecb7d71a [vulkan] Use separate tracy GPU context for light culling
My efforts (especially the collect zone (what was I thinking)) got
tracy's knickers in a twist resulting in vanishing zones in the server.
It looks like there are some synchronisation issues between cpu and gpu,
but I'm not *too* worried about it at this stage.
2023-12-17 18:45:02 +09:00
Bill Currie
f282bfc045 [vulkan] Use occlusion queries for culling lights
The info isn't used yet, but this shows that vulkan's occlusion queries
are at least somewhat useful. However, the technique isn't perfect:
infinite radius lights (1/r and 1/r^2) are difficult to cull, and all
lights can poke through thin enough walls, and then lights containing
the camera get culled incorrectly (will need a separate test). Still, it
looks like it will help once everything is tied together.
2023-12-17 18:45:02 +09:00
Bill Currie
1c13879fb9 [vulkan] Split out the render pass core
And make it callable directly (needed to be able to submit the command
buffer separately from the main commands (though this does mess with
tracy a little).
2023-12-17 18:45:02 +09:00
Bill Currie
24aa81e085 [vulkan] Fix some out-by-one errors
I don't know why I thought <= was useful in those loops. Fixes some
segfaults for incorrect references.
2023-12-17 18:45:02 +09:00
Bill Currie
fa6598c389 [vulkan] Fix broken dynamic light shadows
They weren't rendering properly at all due to the matrix updates getting
overwritten by the light data (I'd forgotten to advance the packet data
pointer).
2023-12-17 18:45:02 +09:00
Bill Currie
8e7c21e36a [vulkan] Implement staged shadow maps
This doesn't make much of a difference on the GPU, but it drastically
cuts down CPU usage, especially for ad_tears: shadow map drawing is down
from 16.3ms to 3.7ms thanks to no having to run the alias model queues
as often.
2023-12-17 18:45:02 +09:00
Bill Currie
5637bae20c [vulkan] Move on to vulkan api 1.3
I decided there's little point in hanging onto old API versions when the
newer ones have some nice things like vkCmdCopyImage2.
2023-12-17 18:45:02 +09:00
Bill Currie
c36c2dc8b2 [vulkan] Apply normal light rules to dynamic lights
ie, enforce shadow quanta and max light size.
2023-12-17 18:45:02 +09:00
Bill Currie
72ef0662f5 [vulkan] Add a level of indirection to shadow matrices
Batching shadow map rendering needs be able to reference matrices for
multiple lights in a single batch, but the only input is the view index,
so use that to look up the matrix index rather than using it to index
the matrices directly (modulo the base index that's still there).
2023-12-17 18:45:02 +09:00
Bill Currie
3a31fa111d [vulkan] Create render passes for up to 32 views
Actually, only 29 are used because nvidia's drivers segfault when there
are more than 29 views (regardless of the exact bit pattern in the view
mask). This will allow rendering shadow maps in large batches, which
should make for better GPU utilization.
2023-12-17 18:45:02 +09:00
Bill Currie
a9ff79a76a [vulkan] Set shadow map size limit to 1024
Even that's getting pretty big, but with the quanta at 128, that's a
maximum of 8 different image sizes (which is nice for my planned
"staging image" idea).
2023-12-17 18:45:02 +09:00
Bill Currie
9ba7207e20 [vulkan] Change shadow quanta to 128 pixels
Interestingly, this caused a reduction in memory use for some maps (but
did increase marcher's again, but not as much as the bogus rounding
did). The idea was to use sparse bindings to remap shadow map layers,
but it turns out sparse bindings are insanely slow (beyond unusable).
However, the reduction in the number of shadow map images seems to be
worth it.
2023-12-17 18:45:02 +09:00
Bill Currie
75ce49b1f0 [vulkan] Switch to vulkan 1.1/1.2 prop/feat structs
Since switching to the 1.2 api as a requirement, might as well use the
relevant structs instead of extension struct (for multiview). Came up
when double-checking the max views property due to running into what
appears to be an nvidia bug where > 29 views (any bit pattern) cause a
segfault when creating the pipeline.
2023-12-17 18:45:02 +09:00
Bill Currie
7506117e43 [vulkan] Increase matrix id bits
I had missed that upping max lights to 2048 meant that up to 12288
matrices are needed for all the possible lights. This made it so the
light type could not be encoded in id_data, but the shaders never used
it anyway. This leaves one bit free.
2023-12-17 18:45:02 +09:00
Bill Currie
39616bc84d [vulkan] Remove old descriptor and pipeline code
Pipeline cache handling is still there for now, but the rest hasn't been
used since the render graph rewrite, if not before (and good riddance).
2023-12-17 18:45:02 +09:00
Bill Currie
694d969c83 [vulkan] Round shadow map sizes correctly
I'd added some developer output to see how the layers were distributed
between images and found the image widths to be... odd. It turns out I
was double-adding the shadow_quanta. Oops. Results in ~164MB less memory
used by marcher (for 32 pixel quanta).
2023-12-13 00:06:33 +09:00
Bill Currie
175e9fd7c9 [vulkan] Add some comments to lighting code 2023-12-12 21:13:14 +09:00
Bill Currie
b86f49fe7c [vulkan] Queue quad and slice vertices for transfer
This allows "large" updates to be done in a single staging buffer packet
instead of one packet per quad (or slice). Currently, they're batched
into groups of 64 (not really enough for conchars, but that's only at
init-time, so not all that bad). Nicely, this seems to simplify the
staging code.

Fixes #65.
2023-12-07 14:59:21 +09:00
Bill Currie
800e984880 [vulkan] Rename size to max_count in draw
When looking at a struct and seeing "count" and "size", I had to hunt to
see what "size" really meant. Cherno is very much right about size vs
count being bytes vs number of objects.
2023-12-07 13:00:32 +09:00
Bill Currie
310acc98f4 [vulkan] Unify static quad creation
load_conchars and load_crosshairs were using create_quad directly (due
to make_static_quad having the wrong parameters), but this spread the
handling of which buffer and index where used through the code. Thus fix
make_static_quad to take the x, y offsets (like make_dyn_quad) and then
use it in load_conchars and load_crosshairs.
2023-12-06 23:29:16 +09:00
Bill Currie
7ff0e95c52 [vulkan] Merge lighting updates into one packet
While QFV_PacketScatterBuffer works on only one destination buffer, it
turns out it's still useful for scattering to multiple buffers, just
with multiple calls. This makes it pretty easy to combine multiple
buffer updates into a single staging buffer packet, resulting in
reducing lighting's packet use from up to 7 to just one, drastically
reducing the pressure on the stating buffer packet pool, and thus
reducing the chances of QFV_PacketAcquire stalling.
2023-12-06 00:15:42 +09:00
Bill Currie
fccd06c5bf [vulkan] Add gpu profiling zones
This relies on my fork of tracy: https://github.com/taniwha/tracy
on the wip-c-vulkan branch. Everything is still rather flaky though.

This necessitated the jump to vulkan 1.2 as a requirement.
2023-12-05 22:55:57 +09:00
Bill Currie
57282702ba [vulkan] Move dynamic draw data into device memory
This gets the dynamic data closer to the gpu, so should make a
difference when there's a lot going on. However, for simple tests, it
made no difference.
2023-12-05 19:10:06 +09:00
Bill Currie
d908016606 [sys] Use a jump buffer to exit to main
This allows tracy to clean up properly. However, Sys_Quit will use the
jump buffer (sys_exit_jmpbuf) only if it has been set, so the use of
Sys_setjmp is optional.
2023-12-05 19:02:51 +09:00
Bill Currie
df51e1a18d [vulkan] Report the memory type used for resources
Needed for verifying the desired heap was used.
2023-12-05 16:45:19 +09:00
Bill Currie
63e66e81c5 [vulkan] Increase ring buffer size to 32 packets
I'm still not happy with it being a compile time constant, but this
takes care of the interlock between frames in flight... for now: it's
fragile and really needs the excessive small-packet use in draw and
lighting to be cleaned up.

After discussion with Darian, I've decided to go with one big staging
buffer (with lots of packets) shared between FiF as the large size will,
in the end, be more flexible.
2023-12-05 16:43:05 +09:00
Bill Currie
e65e80f573 [vulkan] Report long packet acquisition times
Here long is considered to be 500μs. This shows the problem mentioned in
test scene, in lighting updates.
2023-12-04 23:41:46 +09:00
Bill Currie
e30f2cbacc [util] Add a wrapper for libgcc's backtrace functions
Right now, just backtrace_pcinfo is supported, but it's enough for
testing.
2023-12-04 17:53:12 +09:00
Bill Currie
1a83fe21c1 [util] Add Sys_setjmp and Sys_longjmp
Host_Error and Host_EndGame use setjmp/longjmp to implement an exception
of sorts, but this messes with tracy's state even with cleanup
attributes. However, it turns out that those cleanup attributes are
exactly how gcc implements C++ destructors, and so the standard Unwind
api (part of libgcc) respects them (so long as -fexceptions is enabled
for C). Thus... replace longjmp with an implementation that uses Unwind
to unwind the stack and call the cleanup functions as needed. This is
actually important for more than just tracy as the cleanup attributed
vars can be thread locks.
2023-12-01 12:13:26 +09:00
Bill Currie
52210b8c55 [util] Add leb123 signed and unsigned message readers
Needed for parsing dwarf eh_frame data, but I'm sure it will come in
handy for other things.
2023-12-01 02:55:08 +09:00
Bill Currie
514bb30655 [iqm] Make the null texture static
That was a nasty bit of UB that wasn't discovered until Tracy affected
the stack, I guess (maybe because of the cleanup attribute).
2023-11-28 16:02:38 +09:00
Bill Currie
010c658653 [build] Add support for building with Tracy
Tracy is a frame profiler: https://github.com/wolfpld/tracy

This uses Tracy's C API to instrument the code (already added in several
places). It turns out there is something very weird with the fence
behavior between the staging buffers and render commands as the
inter-frame delay occurs in a very strangle place (in the draw code's
packet acquisition rather than the fence waiter that's there for that
purpose). I suspect some tangled dependencies.
2023-11-28 15:54:55 +09:00
Bill Currie
9e43675c8f [vulkan] Add length and int color to graph labels
Tracy wants string lengths and uint32_t colors, so set them up
automatically from provided info.
2023-11-28 14:15:43 +09:00
Bill Currie
2a80614273 [build] Fix some build issues caused by using tracy
Mostly just macro conflicts (and a little white space in passing).
Commits for integrating tracy will come later when I've come up with a
wrapper-api that I like (so non-tracy builds are easy even with tracy
available).
2023-11-28 13:54:18 +09:00
Bill Currie
962043ca59 [build] Remove obsolete targets
Gone: svga, fbdev, sdl, wgl and probably a few more. Now it's just x11
and win.
2023-11-27 18:10:23 +09:00
Bill Currie
8e4f0f3837 [win] Implement borderless fullscreen mode
And rip out all the crufty DIB mode junk.
Fixes #60
2023-11-26 14:18:54 +09:00
Bill Currie
4eef0889ee [win] Communicate application focus to the client
This fixes the weird slug when running nq on windows. It turns out it
was the "friendly neighbor" sleep code activating due to bitrot. In
addition, there are cvars for enabling unfocused sleep (defaults off)
and disabling minimized sleep (defaults on).
2023-11-26 13:40:00 +09:00
Bill Currie
9a01e71f67 [win] Silence some debug
Missed that one.
2023-11-26 01:16:16 +09:00
Bill Currie
d2af58bfa2 [win] Implement mouse grabbing
This seems be behave quite nicely (at least for the standard win32
message pump).

Fixes #63
2023-11-25 22:33:57 +09:00
Bill Currie
7024e4efb1 [win] Hide the mouse in a system-friendly way
ShowCursor is system-wide and thus not suitable for general use. It
turns out hiding the cursor in windows is the same as x11: use a null
cursor.
2023-11-25 22:03:27 +09:00