don't resample a texture when the output size is 0xN or Nx0

This commit is contained in:
Bill Currie 2000-12-24 04:43:22 +00:00
parent 6e345718c4
commit de79e1433d

View file

@ -1036,6 +1036,8 @@ GL_ResampleTexture (unsigned int *in, int inwidth, int inheight,
unsigned int *inrow; unsigned int *inrow;
unsigned int frac, fracstep; unsigned int frac, fracstep;
if (!outwidth || !outheight)
return;
fracstep = inwidth * 0x10000 / outwidth; fracstep = inwidth * 0x10000 / outwidth;
for (i = 0; i < outheight; i++, out += outwidth) { for (i = 0; i < outheight; i++, out += outwidth) {
inrow = in + inwidth * (i * inheight / outheight); inrow = in + inwidth * (i * inheight / outheight);