ref: gl: cleanup unused variables

This commit is contained in:
Alibek Omarov
2026-05-13 10:09:09 +05:00
parent 63e112bf4c
commit bf990d1040
5 changed files with 3 additions and 21 deletions

View File

@@ -769,7 +769,6 @@ void GL2_ShimEndFrame( void )
static void APIENTRY GL2_Begin( GLenum prim )
{
int i;
if( gl2wrap.begin + MAX_BEGINEND_VERTS > GL2_MAX_VERTS )
GL2_ResetPersistentBuffer();
@@ -978,7 +977,6 @@ leave_label:
static void APIENTRY GL2_End( void )
{
int i;
#ifdef QUAD_BATCH
if( gl2wrap.prim == GL_QUADS )
{

View File

@@ -704,7 +704,6 @@ static void GL_DrawAliasShadow( aliashdr_t *paliashdr )
float vec_x, vec_y;
vec3_t av, point;
int *order;
float height;
int count;
if( FBitSet( RI.currententity->curstate.effects, EF_NOSHADOW ))
@@ -713,7 +712,6 @@ static void GL_DrawAliasShadow( aliashdr_t *paliashdr )
if( glState.stencilEnabled )
pglEnable( GL_STENCIL_TEST );
height = g_alias.lightspot[2] + 1.0f;
vec_x = -g_alias.lightvec[0] * 8.0f;
vec_y = -g_alias.lightvec[1] * 8.0f;

View File

@@ -688,7 +688,7 @@ box filter 3x3
static void GL_BoxFilter3x3( byte *out, const byte *in, int w, int h, int x, int y )
{
int r = 0, g = 0, b = 0, a = 0;
int count = 0, acount = 0;
int acount = 0;
int i, j, u, v;
const byte *pixel;
@@ -982,7 +982,6 @@ static qboolean GL_UploadTexture( gl_texture_t *tex, rgbdata_t *pic )
size_t texsize, size;
uint width, height, depth;
uint i, j, numSides;
uint offset = 0;
qboolean normalMap;
qboolean texture3d;
const byte *bufend;
@@ -1028,7 +1027,6 @@ static qboolean GL_UploadTexture( gl_texture_t *tex, rgbdata_t *pic )
buf = pic->buffer;
bufend = pic->buffer + pic->size; // total image size include all the layers, cube sides, mipmaps
offset = gEngfuncs.Image_CalcImageSize( pic->type, pic->width, pic->height, pic->depth );
texsize = GL_CalcTextureSize( tex->format, tex->width, tex->height, tex->depth );
normalMap = FBitSet( tex->flags, TF_NORMALMAP ) ? true : false;
numSides = FBitSet( pic->flags, IMAGE_CUBEMAP ) ? 6 : 1;
@@ -1458,7 +1456,6 @@ int GL_LoadTextureArray( const char **names, int flags )
rgbdata_t *pic, *src;
char basename[256];
uint numLayers = 0;
uint picFlags = 0;
char name[256];
gl_texture_t *tex;
size_t len = 0;

View File

@@ -209,14 +209,12 @@ static void SubdividePolygon_r( model_t *loadmodel, msurface_t *warpface, int nu
float dist[SUBDIVIDE_SIZE];
float m, frac, *v;
int i, j, k, f, b;
float sample_size;
vec3_t mins, maxs;
glpoly2_t *poly;
if( numverts > ( SUBDIVIDE_SIZE - 4 ))
gEngfuncs.Host_Error( "%s: too many vertexes on face ( %i )\n", __func__, numverts );
sample_size = gEngfuncs.Mod_SampleSizeForFace( warpface );
BoundPoly( numverts, verts, mins, maxs );
for( i = 0; i < 3; i++ )

View File

@@ -1265,7 +1265,7 @@ static void R_StudioEntityLight( alight_t *lightinfo )
float minstrength, dist2, f, r2;
float lstrength[MAX_LOCALLIGHTS];
cl_entity_t *ent = RI.currententity;
vec3_t mid, origin, pos;
vec3_t mid, origin;
g_studio.numlocallights = 0;
@@ -1294,7 +1294,6 @@ static void R_StudioEntityLight( alight_t *lightinfo )
else VectorCopy( ent->origin, el->origin );
}
VectorCopy( el->origin, pos );
VectorSubtract( origin, el->origin, mid );
f = DotProduct( mid, mid );
@@ -1810,9 +1809,7 @@ generic path
*/
static void R_StudioBuildArrayNormalMesh( short *ptricmds, vec3_t *pstudionorms, float s, float t )
{
float *lv;
int i;
float alpha = tr.blend;
while(( i = *( ptricmds++ )))
{
@@ -1829,7 +1826,6 @@ static void R_StudioBuildArrayNormalMesh( short *ptricmds, vec3_t *pstudionorms,
{
GLubyte *cl;
cl = g_studio.arraycolor[g_studio.numverts];
lv = (float *)g_studio.lightvalues[ptricmds[1]];
vertexState = R_StudioBuildIndices( tri_strip, vertexState );
@@ -1853,9 +1849,7 @@ generic path
*/
static void R_StudioBuildArrayFloatMesh( short *ptricmds, vec3_t *pstudionorms )
{
float *lv;
int i;
float alpha = tr.blend;
while(( i = *( ptricmds++ )))
{
@@ -1872,7 +1866,6 @@ static void R_StudioBuildArrayFloatMesh( short *ptricmds, vec3_t *pstudionorms )
{
GLubyte *cl;
cl = g_studio.arraycolor[g_studio.numverts];
lv = (float *)g_studio.lightvalues[ptricmds[1]];
vertexState = R_StudioBuildIndices( tri_strip, vertexState );
@@ -1900,7 +1893,6 @@ static void R_StudioBuildArrayChromeMesh( short *ptricmds, vec3_t *pstudionorms,
int i, idx;
qboolean glowShell = (scale > 0.0f) ? true : false;
vec3_t vert;
float alpha = tr.blend;
while(( i = *( ptricmds++ )))
{
@@ -2688,7 +2680,7 @@ R_StudioDrawPointsShadow
*/
static void R_StudioDrawPointsShadow( void )
{
float *av, height;
float *av;
float vec_x, vec_y;
mstudiomesh_t *pmesh;
vec3_t point;
@@ -2700,7 +2692,6 @@ static void R_StudioDrawPointsShadow( void )
if( glState.stencilEnabled )
pglEnable( GL_STENCIL_TEST );
height = g_studio.lightspot[2] + 1.0f;
vec_x = -g_studio.lightvec[0] * 8.0f;
vec_y = -g_studio.lightvec[1] * 8.0f;