Commit graph

4099 commits

Author SHA1 Message Date
Andrei Alexeyev
a77dc789de
test/renderer: move load_texture into test_renderer.h 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
023a6b31e6
test/renderer/texture: add a basic textured quad test 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
98888a461b
test/renderer/triangle: use GLSL 420
330 doesn't allow explicit locations for vertex outputs/fragment inputs
2024-08-30 11:52:47 +02:00
Andrei Alexeyev
df5d68f253
test/renderer: add thread system to basic init 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
dcac5d9ec9
test/renderer: clean shutdown sequence 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
49bcbac838
renderer: remove PRIM_LINE_LOOP 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
48568b9227
renderer: add r_unclaim_window API
Must be called before destroying a window. Implementation is optional.
2024-08-30 11:52:47 +02:00
Andrei Alexeyev
7acdad7531
dynarray: make UBSan happy 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
47c8f5bee3
gl33: don't try to fall back to r_shader_standard() if active shader is deleted
This prevents clean shutdown in tests that don't bring up the whole
resource system, and is not really a sane fallback anyway.
2024-08-30 11:52:47 +02:00
Andrei Alexeyev
043f09c668
gl33: remove magic _SIZE uniform handling
Only FXAA ever used this, and it's trivial to implement in client code
2024-08-30 11:52:47 +02:00
Andrei Alexeyev
85eff81c7f
resources/shader/fxaa: don't rely on magic _SIZE uniform 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
141c942432
resource/font: disable mipmap generation
The mipmaps were never used
2024-08-30 11:52:47 +02:00
Andrei Alexeyev
be06946a31
renderer/api: add NUM_TEXTURE_CLASSES constant 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
718fc9685f
resource/texture_loader: remove bad assert; handle r_texture_create() failure 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
26959c4a1f
renderer/common/sprite_batch: replace tex_aux array in shaders with plain samplers
SDL_gpu doesn't support sampler arrays
2024-08-30 11:52:47 +02:00
Andrei Alexeyev
cbdff3ca41
stage1: use correct depth function in background
It's a mystery that this worked in opengl…
2024-08-30 11:52:47 +02:00
Andrei Alexeyev
7cd47e9404
renderer: move magic uniform definitions to common 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
4ebd7ba14b
gl33: remove trailing [0] from array uniform names 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
50056eb41a
renderer: decouple models and sprite_batch init/shutdown from main render system 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
2fdf9baf36
renderer/api: remove dead struct 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
fa2c13d116
util/compat: workaround for clangd in gcc-based build dirs 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
d676808ad1
memory/arena: add ARENA_ALLOC series of macros 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
a15b193c0b
memory/arena: add marena_memdup() and marena_strdup() 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
1f05199456
memory/arena: add marena_alloc_array_aligned() 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
b48e4e7714
build,renderer: dispose of gles20's rotting corpse 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
6a84f1aee3
shaderlib/lang_spirv_aux: support SPIR-V output in spirv_transpile 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
b7025a4d4c
util/stringops: strappend: make src param const 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
2afc7f90ec
scripts: yeet pull and checkout 2024-08-30 11:52:47 +02:00
4226739869
scripts: optimize-img.sh: msg(): process arguments as a single string 2024-08-30 11:52:44 +02:00
c7df571a91
scripts: optimize-img.sh: simplify 1>&2
Simplify `1>&2` to `>&2`
2024-08-30 11:52:42 +02:00
d69b5ab55a
scripts: all: command read: use -r flag
Use the `-r` option with `read` to prevent backslash escaping and preserve
literal backslashes in input strings
2024-08-30 11:52:37 +02:00
64744d092b
scripts: all: put double quotes where they're needed
Put double quotation marks where they're needed to prevent word splitting of
strings and paths
2024-08-30 11:52:34 +02:00
8365529eba
scripts: all: guard all echo uses
Use `printf --` instead
2024-08-30 11:52:30 +02:00
48a6f33138
scripts: /checkout, /pull: use POSIX shell shebang
Use POSIX shell shebang, since there are no bashisms in the scripts
2024-08-30 11:52:27 +02:00
Andrei Alexeyev
551c82b4f0
util: add portable sort_r() 2024-06-16 22:33:38 +02:00
Andrei Alexeyev
c1082d0f8d
resources: replace stage5 demo due to desync 2024-06-16 20:34:45 +02:00
Andrei Alexeyev
3dc8624265
memory/mempool: fix warning 2024-06-15 09:31:14 +02:00
Andrei Alexeyev
0fe465522f
menu: improve grouping in spell practice and stage select 2024-06-14 22:35:24 +02:00
Andrei Alexeyev
bad453ce61
resources: replace stg3 reimuA hard demo due to desync 2024-06-14 21:15:21 +02:00
Andrei Alexeyev
a8322f5e1d
util/rectpack: refactor to use standard mempools 2024-06-05 23:53:30 +02:00
Andrei Alexeyev
f9c2748fae
memory/mempool: pass arena pointer to acquire() instead of storing in struct 2024-06-05 22:07:17 +02:00
Andrei Alexeyev
b81f338d2d
stageobjects: add type-based macros for acquiring from/releasing into the correct pool 2024-06-05 21:58:58 +02:00
Andrei Alexeyev
13ace0e5c0
memory/mempool: refactor to avoid storing object size and alignment in struct
Works similarly to DYNAMMIC_ARRAY(type)
2024-06-05 21:16:02 +02:00
Andrei Alexeyev
05168ac2d7
memory/mempool: rename from objectpool 2024-06-05 18:35:08 +02:00
Andrei Alexeyev
fc54f3f8ce
global,mainmenu: enable Quit if quitting is allowed in kiosk mode 2024-06-04 16:31:46 +02:00
Andrei Alexeyev
139ac03d5c
config: change default bomb and surge gamepad buttons
LT and RT respectively
2024-06-04 16:17:26 +02:00
Andrei Alexeyev
7548e4892d
gamepad: direction snapping; more flexible configuration options
- The free/restricted axis distinction is gone; the joystick always
  operates in "free" mode.
- Added direction snapping functionality to help aid exact movement in
  cardinal and/or diagonal directions. The snapping angle can be
  adjusted from 0% (disabled) to 100% (similar to the old "restricted"
  mode). The snapping angle can also be biased towards cardinals or
  diagonals.
- When the maximum zone is less than or equals dead zone, moving
  the character will always move at maximum speed (as in the old
  "restricted" mode).
- Most of these settings are now visualized in the options menu and can
  be tested there.
2024-05-27 19:23:59 +02:00
Andrei Alexeyev
d288f2bd27
shaders: don't use textureGrad() in powersurge_effect
Apparently it has bad performance at least on some intel iGPUs (my
laptop), and it does nothing visually here.
2024-05-22 16:25:20 +02:00
Andrei Alexeyev
149a261389
lasers: handle lasers that only have a single point 2024-05-22 16:25:19 +02:00
Andrei Alexeyev
8189f8daa6
lasers: improve degenerate sample rejection during quantization
Fixes some issues with curves that have degenerate samples at the start,
and is more efficient for curves with lots of degenerate samples in
general.
2024-05-19 06:54:30 +02:00