Commit graph

3754 commits

Author SHA1 Message Date
Jaime Moreira
e8b2e36bd8 GL1 unified draw calls, chapter iv
Buffered flashblend effects.
2024-07-15 10:18:46 -04:00
Jaime Moreira
749e70b988 GL1 unified draw calls, part 3
Batching / buffered procedure, applied to multitexture surfaces.
This solves the issue with gl1_overbrightbits, when jumping
between 0 and 2-4.
2024-07-15 09:05:21 -04:00
Jaime Moreira
4461128255 GL1 unified draw calls, cont.
Batching procedure from previous commit, applied this time to GLPoly
/ single texture surfaces; alpha and liquid included.
2024-07-15 08:23:43 -04:00
Jaime Moreira
50aebd2de4 GL1 unified draw calls, init
Implemented a batching procedure, to try to group meshes in a buffer
and use a final GL call to draw them all in one step, instead of the
many GL draw calls existing today.
For now, only 2D textures are included, especifically console text
("conchars"), scrap and tiles. It's not worth doing this for
individual 2D elements (e.g. crosshair).
2024-07-15 06:56:02 -04:00
Jaime Moreira
4503333b3a GL1: lighting for brushes on the entity list...
...is being "preprocessed" before regenerating lightmaps, so there
are no additional changes to the lightmaps when drawing those brushes.
2024-07-14 20:20:27 -04:00
Jaime Moreira
1bae1e359f GL1: removed many fruitless glTexParameteri calls
They were in this form:
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG/MIN_FILTER,GL_LINEAR)
Only appeared at startup, but we didn't need so many of them.
2024-07-14 19:31:00 -04:00
Yamagi
fd2ebb8891 Update CHANGELOG for 8.40. 2024-07-13 16:19:14 +02:00
Yamagi
2a2f3e0b2f
Merge pull request #1123 from BjossiAlfreds/helpmsg-always
Workarounds for naggy help icons
2024-07-11 21:29:26 +02:00
Yamagi
7b6518060e
Merge pull request #1122 from devnexen/fix_dyn_symb_loading_sig
consistenly cast dynamic loading from generic pointer to fn pointer s…
2024-07-11 21:15:51 +02:00
BjossiAlfreds
6a25ba5118 Workarounds for naggy help icons 2024-07-09 13:11:12 +00:00
David Carlier
2b4598d536
consistenly cast dynamic loading from generic pointer to fn pointer signature. 2024-07-06 18:40:13 +01:00
Yamagi
8c0904f0c8
Merge pull request #1121 from 0lvin/backport
Improve pcx support and cleanup soft render
2024-07-06 18:49:29 +02:00
Denis Pauk
ac2a50cb4a soft: scale model texture s,t values
ref_gl renders use 0.0..1.0 float texture coordinates in gl commands
and skin ratio/resolution could be any.
ref_soft render uses absolute coordinates as result textures with
different to expected size are applied incorrectly.

Fix will not add support of scalled retextured skins, just fix case
when ratio is incorrect after scale down such or place a incorrect
pcx skin to the model directory.
2024-07-06 16:48:20 +03:00
Denis Pauk
79c71c7a68 soft: get rid unused R_PolysetUpdateTables 2024-07-06 16:41:52 +03:00
Denis Pauk
bfeb842bd3 pcx: fix support of bytes_per_line
https://github.com/yquake2/yquake2/issues/1119
2024-07-06 16:32:45 +03:00
Yamagi
3f6a0a3689
Merge pull request #1118 from devnexen/few_more_build_chg
fix few warning builds.
2024-07-06 09:50:37 +02:00
Yamagi
af5a876be4 Fix a typo. 2024-07-06 09:20:04 +02:00
Yamagi
4c4759b73b
Merge pull request #1120 from BjossiAlfreds/jug13-mapfix
Mapfix for map jug13 (The Civic Center) in Juggernaut
2024-07-06 08:51:58 +02:00
BjossiAlfreds
298dd69def Mapfix for map jug13 (The Civic Center) in Juggernaut 2024-07-05 15:26:22 +00:00
David Carlier
a8a15ddff3
fix few warning builds. 2024-06-30 23:07:03 +01:00
Yamagi
a315b15494
Merge pull request #1116 from devnexen/prev_fix_sec_optim
micro optimisations for previous security mitigations.
2024-06-30 20:54:08 +02:00
David Carlier
d0dc3e9926
micro optimisations for previous security mitigations.
also strtok_r uses its own provided buffer instead of the static one
even in a somewhat monothread context, it s still better.
2024-06-30 17:08:45 +01:00
Yamagi
1a1b32961b Refactor the download filter.
The first try didn't take into account that an evil server could
override the filter list by sending a stuff command. Fix this by
hardcoding the filters for .dll, .dylib and .so. Make sure that the
filters are always applied, either when the download is requested
through the `download` command or because game data is missing.

This is just a poor mans fix, trying to rule out an obvious way to
inject code into the client.
2024-06-24 11:56:11 +02:00
Yamagi
852cec05e7 Filter .., :, / and \\ from al_driver and cl_libcurl.
This is a poor mans safeguard against malicious server trying to
download and inject libraries.
2024-06-22 17:22:22 +02:00
Yamagi
5e6a73dc3f Include downloads into the security considerations. 2024-06-22 16:57:30 +02:00
Yamagi
468f90ad48 Implement a simple download filter.
`cl_nodownload_list` is a whitespace seperated list of strings, files
containing one of these strings in their name are never downloaded. Set
to `.dll .dylib .so` by default to prevent downloading libraries which
can be injected into client.

Closes #1114.
2024-06-22 16:56:42 +02:00
Yamagi
d5c7845271 Fix formating of the cvarlist. 2024-06-22 16:50:54 +02:00
Yamagi
93178d0f6b Implement a Q_strcasecmp() library replacement function.
It will be used in a later commit. While at it change Q_strcasecmp() and
Q_strncasecmp() to take the arguments as const, matching the signatures
of the non-replacement versions.
2024-06-22 16:47:19 +02:00
Yamagi
d5d7ee29ec
Merge pull request #1115 from hbokh/feature/fix-apple-silicon-build
Update Makefile to build on Apple Silicon
2024-06-17 18:54:16 +02:00
Yamagi
71ff8bcdfc
Merge pull request #1111 from 0lvin/backport
Show weapon in player model preview
2024-06-16 09:53:24 +02:00
Henk
473b2ca078
Update Makefile to build on Apple Silicon 2024-06-14 17:26:24 +02:00
Denis Pauk
e7dc4f3b2c menu: Fix default NULL 2024-06-11 23:28:50 +03:00
Denis Pauk
28aeb68826 menu: show weapon in player model preview 2024-06-08 23:36:57 +03:00
Denis Pauk
8fd8c2b546 menu: support long player skin name 2024-06-08 23:21:00 +03:00
Yamagi
41e9b46358
Merge pull request #1110 from protocultor/gyro_tightening
Gyro tightening
2024-06-08 19:09:53 +02:00
Yamagi
2d2c6787bb
Merge pull request #1109 from starfrost013/master
Fix potential memory corruption issue where cl_numparticles is 0 and CL_ClearParticles is called
2024-06-08 18:32:43 +02:00
Jaime Moreira
c842ab806f Remove fruitless glBindTexture() calls
...when there are no SURF_DRAWTURB surfaces to draw.
2024-06-06 18:23:26 -04:00
Jaime Moreira
c4271848df gl1_multitexture doc update 2024-06-04 16:21:10 -04:00
Jaime Moreira
24b03b61f8 Gyro tightening
A practical way to avoid a noisy gyro signal, or shaky hands.
Unlike a deadzone, inputs below the threshold are "squeezed towards
zero", so they are not completely ignored. Source:
http://gyrowiki.jibbsmart.com/blog:good-gyro-controls-part-1:the-gyro-is-a-mouse#toc9
2024-06-04 15:48:42 -04:00
Jaime Moreira
0e63bad7d9 Sliders and gamepad buttons refactor
Same logic with less code.
2024-06-04 15:18:37 -04:00
Jaime Moreira
d2b0ebd522 Correct OpenGL boolean flags. 2024-06-04 15:10:41 -04:00
Jaime Moreira
6869d7dddd GL1 multitexture combine removed
Applied too many OpenGL calls for an effect that could not be told
apart from normal GL_MODULATE; explains its absence from Q3A code.
Also, removed calls to glPixelStorei when no dynamic lights present.
2024-06-04 14:59:05 -04:00
Jaime Moreira
c68ffec274 GL1 multitexture bugfix
With "hand 2" and no "alias" models in player sight, sometimes only
lightmap was visible. Now forcing disabled multitexture when needed.
Another bugfix: "gl_showbbox 1" no longer produces OpenGL errors.
2024-06-04 14:53:25 -04:00
starfrost013
e160691fec Fix potential memory corruption issue where cl_numparticles is 0 and CL_ClearParticles is called. 2024-05-29 15:41:12 +01:00
Yamagi
7ffcd990c4
Merge pull request #1108 from protocultor/gl1_biglightmaps
GL1 big lightmaps and scrap
2024-05-25 16:03:38 +02:00
Jaime Moreira
0f307cc9c1 GL1 scrap/atlas configurable size
Controlled by gl1_biglightmaps cvar, works like new lightmaps.
Max size is 384x384; a bigger size is not justified.
Added a transparent border so colors from one picture don't bleed
into the next.
2024-05-11 18:20:13 -04:00
Jaime Moreira
81fd2c1027 Increased lightmap size in GL1
Controlled by new cvar, gl1_biglightmaps.
Size is now up to 512x512, for a max quantity of 8 lightmaps.
Should reduce rebinding of them, and reduce the number of calls
to glTexSubImage2D(), although it may increase data transfer on
each call.
2024-05-11 18:18:28 -04:00
Jaime Moreira
a8824972db Fixed potential game crash at shutdown
Only happens in Windows. A cvar was being queried just after
all cvars were freed, in Qcommon_Shutdown().
GL_GENERATE_MIPMAP definition relocated.
scrap_uploads counter deleted, it wasn't being read anywhere.
2024-05-11 18:16:38 -04:00
Yamagi
b401846ce6
Merge pull request #1103 from protocultor/gl1_multitexture
GL1 multitexture
2024-05-11 16:28:39 +02:00
Yamagi
d50408ff0b Bump SDL 3 support to the latest preview, SDL 3.1.2.
SDL 3.1.1 -> 3.1.2 brings another round of API changes. Only one of them
is relevant for us: the SDL_RENDERER_ACCELERATED flag was removed.
2024-05-05 09:37:36 +02:00