--- deliantra/Deliantra-Client/DC/Texture.pm 2007/08/06 05:06:33 1.25 +++ deliantra/Deliantra-Client/DC/Texture.pm 2007/08/19 12:56:24 1.26 @@ -275,8 +275,18 @@ #glDisable GL_SCISSOR_TEST; } else { + my $if = $self->{internalformat}; + + if ($GL_COMPRESS && $::CFG->{texture_compression}) { + if ($if == GL_RGB) { + $if = GL_COMPRESSED_RGB_ARB; + } elsif ($if == GL_RGBA) { + $if = GL_COMPRESSED_RGBA_ARB; + } + } + glTexImage2D GL_TEXTURE_2D, 0, - $self->{internalformat}, + $if, $dw, $dh, 0, $self->{format},