if (gl_support_fragment_shader)
{
CHECKGLERROR
- qglGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &backendimageunits);
+ qglGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, (int *)&backendimageunits);
CHECKGLERROR
- qglGetIntegerv(GL_MAX_TEXTURE_COORDS_ARB, &backendarrayunits);
+ qglGetIntegerv(GL_MAX_TEXTURE_COORDS_ARB, (int *)&backendarrayunits);
CHECKGLERROR
Con_Printf("GLSL shader support detected: texture units = %i texenv, %i image, %i array\n", backendunits, backendimageunits, backendarrayunits);
}
unsigned int i;
gltextureunit_t *unit;
CHECKGLERROR
- gl_state.unit = -1;
- gl_state.clientunit = -1;
+ gl_state.unit = MAX_TEXTUREUNITS;
+ gl_state.clientunit = MAX_TEXTUREUNITS;
for (i = 0;i < MAX_TEXTUREUNITS;i++)
{
unit = gl_state.units + i;
//R_Mesh_CacheArray_ValidateState(3);
// calculate a hashindex to choose a cache chain
r->data = NULL;
- hashindex = CRC_Block((void *)r, sizeof(*r)) % RCACHEARRAY_HASHSIZE;
+ hashindex = CRC_Block((qbyte *)r, sizeof(*r)) % RCACHEARRAY_HASHSIZE;
// is it already cached?
for (lhead = &r_mesh_rcachechain[hashindex], l = lhead->next;l != lhead;l = l->next)