int depthtest;
int blendfunc1, blendfunc2;
int textures[MAX_TEXTUREUNITS];
- float texturergbscale[MAX_TEXTUREUNITS];
+ int texturergbscale[MAX_TEXTUREUNITS];
int firsttriangle;
int triangles;
int firstvert;
static int mesh_unit;
static int mesh_clientunit;
static int mesh_texture[MAX_TEXTUREUNITS];
-static float mesh_texturergbscale[MAX_TEXTUREUNITS];
+static int mesh_texturergbscale[MAX_TEXTUREUNITS];
void GL_SetupTextureState(void)
{
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA_ARB, GL_SRC_ALPHA);CHECKGLERROR
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA_ARB, GL_SRC_ALPHA);CHECKGLERROR
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_ALPHA_ARB, GL_SRC_ALPHA);CHECKGLERROR
- glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, mesh_texturergbscale[i]);CHECKGLERROR
- glTexEnvf(GL_TEXTURE_ENV, GL_ALPHA_SCALE, 1.0f);CHECKGLERROR
+ glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, mesh_texturergbscale[i]);CHECKGLERROR
+ glTexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE, 1);CHECKGLERROR
}
else
{
{
qglActiveTexture(GL_TEXTURE0_ARB + (mesh_unit = i));CHECKGLERROR
}
- glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, (mesh_texturergbscale[i] = mesh->texturergbscale[i]));CHECKGLERROR
+ glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, (mesh_texturergbscale[i] = mesh->texturergbscale[i]));CHECKGLERROR
}
}
}
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);CHECKGLERROR
if (gl_combine.integer)
{
- glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 1.0f);CHECKGLERROR
+ glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 1.0f);CHECKGLERROR
}
if (i > 0)
{
int tex[MAX_TEXTUREUNITS];
float *texcoords[MAX_TEXTUREUNITS];
int texcoordstep[MAX_TEXTUREUNITS];
- float texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
+ int texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
}
rmeshinfo_t;
int numtriangles;
int numverts;
int tex[MAX_TEXTUREUNITS];
- float texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
+ int texrgbscale[MAX_TEXTUREUNITS]; // used only if COMBINE is present
// output
int *index;
memset(clipbuffertex, 0, sizeof(clipbuffertex));
glTexImage2D(GL_TEXTURE_2D, 0, 1, 256, 256, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, clipbuffertex);
}
- glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
if (lighthalf)