create texture property in copy_to_texture

This commit is contained in:
David Rose 2008-08-28 00:45:30 +00:00
parent 7037945e6a
commit 5050c994e0
2 changed files with 12 additions and 0 deletions

View File

@ -1484,6 +1484,12 @@ framebuffer_copy_to_texture(Texture *tex, int z, const DisplayRegion *dr,
return false;
}
DXTextureContext8 *dtc = DCAST(DXTextureContext8, tc);
if (!dtc->create_texture(*_screen)) {
// Oops, we can't re-create the texture for some reason.
dxgsg8_cat.error()
<< "Unable to re-create texture " << *dtc->get_texture() << endl;
return false;
}
if (tex->get_texture_type() != Texture::TT_2d_texture) {
// For a specialty texture like a cube map, go the slow route

View File

@ -2138,6 +2138,12 @@ framebuffer_copy_to_texture(Texture *tex, int z, const DisplayRegion *dr,
return false;
}
DXTextureContext9 *dtc = DCAST(DXTextureContext9, tc);
if (!dtc->create_texture(*_screen)) {
// Oops, we can't re-create the texture for some reason.
dxgsg9_cat.error()
<< "Unable to re-create texture " << *dtc->get_texture() << endl;
return false;
}
if (tex->get_texture_type() != Texture::TT_2d_texture) {
// For a specialty texture like a cube map, go the slow route