--- deliantra/Deliantra-Client/DC/Texture.pm 2007/07/19 20:12:06 1.17 +++ deliantra/Deliantra-Client/DC/Texture.pm 2007/07/19 21:02:02 1.18 @@ -116,7 +116,6 @@ } my ($tw, $th) = ($dw, $dh); - my ($rw, $rh) = ($dw, $dh); defined $data or $self->{render_cb} or die; # some sanity check @@ -141,12 +140,15 @@ $th >>= 1; } + # decide the amount of space used in the texture + my ($rw, $rh); + if ($self->{render_cb}) { # use only part of the texture #$rw >>= 1 while $rw > $tw; #$rh >>= 1 while $rh > $th; - $rw = min $rw, $tw; - $rh = min $rh, $th; + $rw = min $dw, $tw; + $rh = min $dh, $th; } else { if ($self->{wrap} || $tw < $dw || $th < $dh) { # scale to the full texture size