quakeforge/libs/video/renderer
Bill Currie 12c84046f3 [cvar] Make cvars properly typed
This is an extremely extensive patch as it hits every cvar, and every
usage of the cvars. Cvars no longer store the value they control,
instead, they use a cexpr value object to reference the value and
specify the value's type (currently, a null type is used for strings).
Non-string cvars are passed through cexpr, allowing expressions in the
cvars' settings. Also, cvars have returned to an enhanced version of the
original (id quake) registration scheme.

As a minor benefit, relevant code having direct access to the
cvar-controlled variables is probably a slight optimization as it
removed a pointer dereference, and the variables can be located for data
locality.

The static cvar descriptors are made private as an additional safety
layer, though there's nothing stopping external modification via
Cvar_FindVar (which is needed for adding listeners).

While not used yet (partly due to working out the design), cvars can
have a validation function.

Registering a cvar allows a primary listener (and its data) to be
specified: it will always be called first when the cvar is modified. The
combination of proper listeners and direct access to the controlled
variable greatly simplifies the more complex cvar interactions as much
less null checking is required, and there's no need for one cvar's
callback to call another's.

nq-x11 is known to work at least well enough for the demos. More testing
will come.
2022-04-24 19:15:22 +09:00
..
gl [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
glsl [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
sw [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
vulkan [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
crosshair.c Add a new crosshair. 2012-12-12 19:36:50 +09:00
font8x8.c [renderer] Add a default 8x8 font 2021-01-08 14:37:52 +09:00
Makemodule.am [renderer] Make screen capture support asynchronous operation 2022-04-01 01:01:53 +09:00
noisetextures.c Change pointer_t to unsigned and clean up the mess. 2012-12-21 21:53:13 +09:00
r_alias.c [scene] Move entity_t etc into scene headers 2022-03-29 14:43:38 +09:00
r_billboard.c [renderer] Move a couple functions to using vec4f_t 2022-03-30 23:53:30 +09:00
r_bsp.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
r_cvar.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
r_dyn_textures.c [image] Change tex_t data from array to pointer 2021-01-25 00:54:41 +09:00
r_efrag.c Work around some clang parsing issues 2022-03-31 02:44:58 +09:00
r_ent.c [renderer] Move some functions from plugins to main lib 2022-03-07 13:40:04 +09:00
r_fog.c [renderer] Fix some non-static linking issues 2022-03-09 06:55:31 +09:00
r_graph.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
r_init.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
r_iqm.c [scene] Move entity_t etc into scene headers 2022-03-29 14:43:38 +09:00
r_light.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
r_main.c Update vec3_t/vec4f_t hacks to work with clang 2022-03-31 00:08:26 +09:00
r_part.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
r_progs.c [gamecode] Pass gcc's purity test again 2022-02-14 19:30:50 +09:00
r_scrap.c [ui] Create library for UI support code 2021-06-12 22:50:51 +09:00
r_screen.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
r_sprite.c [scene] Move entity_t etc into scene headers 2022-03-29 14:43:38 +09:00
vid_common.c [renderer] Clean up particles a little 2022-03-29 14:43:38 +09:00
vid_render_gl.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
vid_render_glsl.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
vid_render_sw.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
vid_render_vulkan.c [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00