--- deliantra/Deliantra-Client/DC/Texture.pm 2006/07/30 13:16:44 1.11 +++ deliantra/Deliantra-Client/DC/Texture.pm 2006/12/09 21:26:46 1.13 @@ -16,8 +16,6 @@ use strict; -use Scalar::Util; - use CFPlus::OpenGL; my %TEXTURES; @@ -32,7 +30,7 @@ %data, }, $class; - Scalar::Util::weaken ($TEXTURES{$self+0} = $self); + CFPlus::weaken ($TEXTURES{$self+0} = $self); $self->upload; @@ -86,7 +84,7 @@ sub new_from_opengl { my ($class, $w, $h, $cb) = @_; - $class->new (w => $w || 1, h => $h || 1, render_cb => $cb) + $class->new (w => $w || 1, h => $h || 1, render_cb => $cb, nearest => 1) } sub upload { @@ -137,7 +135,7 @@ glTexParameter GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, $GL_VERSION >= 1.2 ? GL_CLAMP_TO_EDGE : GL_CLAMP; } - if ($::FAST) { + if ($::FAST || $self->{nearest}) { glTexParameter GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST; glTexParameter GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST; } elsif ($self->{mipmap} && $GL_VERSION >= 1.4) {