else
Host_Error("R_FreeTexture: texture \"%s\" not linked in pool", glt->identifier);
+ R_Mesh_ClearBindingsForTexture(glt->texnum);
+
switch(vid.renderpath)
{
case RENDERPATH_GL11:
{
// multiply RGB channels by A channel before uploading
int alpha;
- for (i = 0;i < width*height*depth*4;i += 4)
+ for (i = 0;i < glt->inputwidth*glt->inputheight*glt->inputdepth*4;i += 4)
{
alpha = prevbuffer[i+3];
colorconvertbuffer[i] = (prevbuffer[i] * alpha) >> 8;