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.
Some of files could have name of animation and skin, but some of files
does no have naming of action and textures. Search include file by extention
instead use name + filename format.
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.