From 4d40265e2418d56d58e026fd6583775b296fb146 Mon Sep 17 00:00:00 2001 From: aignacio_sf <> Date: Wed, 20 Dec 2006 02:21:11 +0000 Subject: [PATCH] Render target textures must not be compressed. --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 075114d8ff..728b3dc840 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -4842,6 +4842,10 @@ get_internal_image_format(Texture *tex) const { if (compression == Texture::CM_default) { compression = (compressed_textures) ? Texture::CM_on : Texture::CM_off; } + if (tex->get_render_to_texture()) { + // no compression for render targets + compression = Texture::CM_off; + } bool is_3d = (tex->get_texture_type() == Texture::TT_3d_texture); if (get_supports_compressed_texture_format(compression)) {