Commit graph

4143 commits

Author SHA1 Message Date
Andrei Alexeyev
bc4924ac59
stagedraw: disable face culling for 2D rendering
It's never needed, and sometimes we have to re-enable it e.g. for blast
particles. This lets those cases batch together with other sprites.
2024-10-04 16:27:28 +02:00
Andrei Alexeyev
b9ee7628ba
resource/font: no need to enable face culling in text_render 2024-10-04 16:27:28 +02:00
Andrei Alexeyev
cef9524068
boss,stagedraw: improve overlay draw order 2024-10-04 16:27:28 +02:00
Andrei Alexeyev
8198f55584
enemy_classes: use sprite_particle for swirls to improve batching 2024-10-04 16:27:28 +02:00
Andrei Alexeyev
08a129d424
boss: use sprite_particle shader for better batching 2024-10-04 16:27:28 +02:00
Andrei Alexeyev
5610ecb6b7
player: use sprite_particle shader for better batching 2024-10-04 16:27:28 +02:00
Andrei Alexeyev
bcc5b17430
item: use sprite_particle shader for better batching 2024-10-04 16:27:28 +02:00
Andrei Alexeyev
321ba481d9
renderer/common/sprite_batch: don't pass NULL to r_uniform_sampler 2024-10-04 16:27:28 +02:00
Andrei Alexeyev
7c82cbba9b
gl33: remove avoid_sampler_uniform_updates workaround and make it the default 2024-10-04 16:27:28 +02:00
Andrei Alexeyev
b61185ff06
build: update shaderc wrap to 2024.3 2024-10-02 22:03:24 +02:00
Andrei Alexeyev
3526d17f0a
build: update SPIRV-Tools wrap to 2024.3 2024-10-02 22:03:24 +02:00
Andrei Alexeyev
114681aae0
build: update SPIRV-Cross wrap to 1.3.296.0 2024-10-02 22:03:24 +02:00
Andrei Alexeyev
56a1ecf9a3
build: update SPIRV-Headers wrap to 1.3.290.0 2024-10-02 22:03:18 +02:00
Andrei Alexeyev
974ae46908
build: update glslang wrap to 15.0.0 2024-10-02 21:30:53 +02:00
Andrei Alexeyev
27a578675d
build: update opus wrap to 1.5.1 2024-10-02 21:23:13 +02:00
Andrei Alexeyev
6da610efb7
build: update zstd wrap to 1.5.6 2024-10-02 21:08:40 +02:00
Andrei Alexeyev
a58a3f5ec4
build: update libzip wrap to 1.11.1 2024-10-02 21:06:31 +02:00
Andrei Alexeyev
a2398bc85e
build: update libwebp wrap to 1.4.0 2024-10-02 21:01:27 +02:00
Andrei Alexeyev
0b24c17145
build: update libpng wrap to 1.6.44 2024-10-02 20:58:52 +02:00
Andrei Alexeyev
ba9ef3be43
build: update freetype wrap to 2.13.2 2024-10-02 20:57:02 +02:00
Andrei Alexeyev
696ed9c84c
build: update cglm wrap to 0.9.4 2024-10-02 20:54:08 +02:00
Andrei Alexeyev
5274cec283
gl33: use glTexStorage* and glInvalidateTexImage* when available
glTexStorage is mostly intended to work around a regression in ANGLE's
Metal backend; see https://issues.chromium.org/issues/355605685

Potentially fixes #386
2024-10-01 04:22:30 +02:00
Andrei Alexeyev
54f9a6daab
glad: add ARB_texture_storage and ARB_invalidate_subdata; regenerate loader 2024-10-01 03:21:03 +02:00
Andrei Alexeyev
39721cd099
ci: switch to emscripten 3.1.68 2024-10-01 02:53:34 +02:00
Andrei Alexeyev
8c3d6f2518
resources/shader: potential fix for disappearing cutscene text (#385) 2024-09-29 06:05:47 +02:00
Andrei Alexeyev
cae66eeadc
vfs/union: fix subdir lookup order lottery 2024-09-29 06:02:07 +02:00
Andrei Alexeyev
3fdc62eeb8
scripts: fix macos_build_universal.sh 2024-09-28 03:30:41 +02:00
Andrei Alexeyev
8b09cca7c2
src/entity: simplify sort comparison function 2024-09-22 21:18:31 +02:00
Andrei Alexeyev
22e6f9b4de
renderer/common/sprite_batch: r_draw_sprite optimizations 2024-09-22 21:18:31 +02:00
Andrei Alexeyev
7f570d2338
renderer/common/sprite_batch: remove string fields from SpriteParams 2024-09-22 21:18:31 +02:00
Andrei Alexeyev
2b21ee0e3f
util/assert: remove __builtin_unreachable() after assert trap 2024-09-22 21:18:31 +02:00
Andrei Alexeyev
d84a94d2f8
util/stringops: add strfmt_arena() 2024-09-10 14:32:22 +02:00
Andrei Alexeyev
787773a53b
memory/arena: add snapshot and rollback APIs 2024-09-10 14:31:55 +02:00
Andrei Alexeyev
5e0d85af1b
memory/arena: add opportunistic free and realloc functions 2024-09-10 14:31:55 +02:00
Andrei Alexeyev
1fc752531a
memory/arena: fix alignment offset calculation
Previously would add an unnecessary padding equal to alignment if the
pointer is already sufficiently aligned
2024-09-10 14:31:55 +02:00
Andrei Alexeyev
1ca51a6690
memory/arena: fix page size calculation 2024-09-10 14:31:55 +02:00
Andrei Alexeyev
ba840bedeb
resources/shader: fix certain shaders to work without texture swizzle support 2024-09-10 14:31:55 +02:00
Andrei Alexeyev
56f0fde7c6
util/compat: fix windows UNICODE defines 2024-09-10 14:31:55 +02:00
Andrei Alexeyev
8ad74bf62f
rwops/rwops_segment: fix missing include 2024-09-10 14:31:55 +02:00
Andrei Alexeyev
fda8556a39
src: deprecate strdup(), use mem_strdup() explicitly
This fixes a nasty bug that manifests on windows when building without
precompiled headers. util/stringops.h used to silently replace strdup
with a macro that's compatible with mem_free(). This header would
typically be included everywhere due to PCH, but without it the strdup
from libc would sometimes be in scope. On most platforms mem_free() is
equivalent to free(), but not on windows, because we have to use
_aligned_free() there. Attempting to mem_free() the result of a libc
strdup() would segfault in such a configuration.

Avoid the footgun by banning strdup() entirely. Maybe redefining libc
names isn't such a great idea, who knew?
2024-09-10 14:31:55 +02:00
Andrei Alexeyev
c8a2fb1418
memory: fix mem_realloc edge case on windows 2024-09-10 14:28:36 +02:00
Andrei Alexeyev
c150f4cd13
gl33: fix gl33_framebuffer_finalize_read_requests() 2024-09-03 01:52:50 +02:00
Andrei Alexeyev
c73aa60b0d
util/stringops: constify hexdigest() 2024-08-30 11:52:47 +02:00
Andrei Alexeyev
7e5a7fa513
util/strbuf: make UBSan happy 2024-08-30 11:52:47 +02:00
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