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.
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.
`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.
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.
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.
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.
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.
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.
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.
Using MH's solution, which is keeping all lightmaps in memory
to modify and upload them as a batch when possible.
lightmap_buffer is now an array; index 0 is used as the legacy
lightmap buffer (when no mtex), and the rest of the indexes are
to store the different lightmaps (only when using mtex).
Unlike the old, buggy one, this implementation follows the
texture chain, just like the standard execution path. It also
avoids doing the lightmap chains, since it has already done it
in the second TMU; there's no duplicated work for lightmaps.
No errors appear in the lava on the "boss1" map either.
It's still slow when having an overdraw of dynamic lights.
Further work is needed.
While it is based on the old, buggy multitexture implementation
(removed in 68a12d4e & 8fe8f832), rework will be done to make it
function as intended this time.
For this commit, just init and function declarations.
Using GL 1.4 declarations in code, although 'point parameters' will
use legacy extensions if they're the only ones found.
Moved stuff out of local.h; better to have definitions in one place.
Extracted from <glext.h>.
Somehow, R_TextureAnimation() returns different results for the same
surface when called consecutively. We force it to be called once, so
the chains in R_DrawTextureChains() are getting respected now.