--- deliantra/Deliantra-Client/DC.pm 2006/05/17 16:17:01 1.53 +++ deliantra/Deliantra-Client/DC.pm 2006/05/19 16:43:56 1.55 @@ -357,7 +357,7 @@ if (defined $data) { glTexImage2D GL_TEXTURE_2D, 0, $self->{internalformat}, - $tw, $th, # need to pad texture first + $tw, $th, 0, $self->{format}, $self->{type}, @@ -373,6 +373,8 @@ CFClient::gl_check "copying to texture %dx%d if=%x", $tw, $th, $self->{internalformat}; } + + glBindTexture GL_TEXTURE_2D, 0; # just to be on the safe side } sub DESTROY { @@ -384,10 +386,10 @@ if $self->{name}; } -sub restore_state{ +sub restore_state { $_->upload for values %TEXTURES; -}; +} 1;