From 7c76269c9e32c446cdb230b6739fa74235c9e3eb Mon Sep 17 00:00:00 2001 From: aignacio_sf <> Date: Mon, 13 Aug 2007 19:25:02 +0000 Subject: [PATCH] Don't compress textures smaller than 4x4 since texture compression requires a texture size >= 4x4. --- panda/src/dxgsg8/dxTextureContext8.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/panda/src/dxgsg8/dxTextureContext8.cxx b/panda/src/dxgsg8/dxTextureContext8.cxx index 98db4e0f65..a1b60f383c 100644 --- a/panda/src/dxgsg8/dxTextureContext8.cxx +++ b/panda/src/dxgsg8/dxTextureContext8.cxx @@ -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; } }