From faf39f97aee53bee67f05328f1d19d4606d1a373 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 3 Oct 2005 23:39:09 +0000 Subject: [PATCH] framebuffer_copy_to_texture for cubemap too --- panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx index 8d732927a2..44ae3b5552 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx +++ b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx @@ -1330,7 +1330,12 @@ framebuffer_copy_to_texture(Texture *tex, int z, const DisplayRegion *dr, const } DXTextureContext8 *dtc = DCAST(DXTextureContext8, tc); - nassertv(tex->get_texture_type() == Texture::TT_2d_texture); + if (tex->get_texture_type() != Texture::TT_2d_texture) { + // For a specialty texture like a cube map, go the slow route + // through RAM for now. + framebuffer_copy_to_ram(tex, z, dr, rb); + return; + } nassertv(dtc->get_d3d_2d_texture() != NULL); IDirect3DSurface8 *tex_level_0, *render_target;