mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
create texture property in copy_to_texture
This commit is contained in:
parent
7037945e6a
commit
5050c994e0
@ -1484,6 +1484,12 @@ framebuffer_copy_to_texture(Texture *tex, int z, const DisplayRegion *dr,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
DXTextureContext8 *dtc = DCAST(DXTextureContext8, tc);
|
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) {
|
if (tex->get_texture_type() != Texture::TT_2d_texture) {
|
||||||
// For a specialty texture like a cube map, go the slow route
|
// For a specialty texture like a cube map, go the slow route
|
||||||
|
@ -2138,6 +2138,12 @@ framebuffer_copy_to_texture(Texture *tex, int z, const DisplayRegion *dr,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
DXTextureContext9 *dtc = DCAST(DXTextureContext9, tc);
|
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) {
|
if (tex->get_texture_type() != Texture::TT_2d_texture) {
|
||||||
// For a specialty texture like a cube map, go the slow route
|
// For a specialty texture like a cube map, go the slow route
|
||||||
|
Loading…
x
Reference in New Issue
Block a user