Don't compress textures smaller than 4x4 since texture compression requires a texture size >= 4x4.

This commit is contained in:
aignacio_sf 2007-08-13 19:25:02 +00:00
parent c86c4a7acb
commit 7c76269c9e

View File

@ -141,8 +141,10 @@ create_texture(DXScreenData &scrn) {
case Texture::TT_cube_map:
// check config setting
if (compressed_textures) {
// no compression for render target textures
if (get_texture()->get_render_to_texture() == false) {
// no compression for render target textures, or very small
// textures
if (get_texture()->get_render_to_texture() == false &&
orig_width >= 4 && orig_height >= 4) {
compress_texture = true;
}
}