mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Work around crash
This commit is contained in:
parent
8f01bbd3d9
commit
2a9bdfdcd2
@ -329,10 +329,15 @@ add_render_texture(Texture *tex, RenderTextureMode mode,
|
|||||||
tex->set_size_padded(get_x_size(), get_y_size());
|
tex->set_size_padded(get_x_size(), get_y_size());
|
||||||
|
|
||||||
if (mode == RTM_bind_or_copy) {
|
if (mode == RTM_bind_or_copy) {
|
||||||
if (!_gsg->get_supports_render_texture() || !support_render_texture) {
|
// Binding is not supported or it is disabled, so just fall back
|
||||||
// Binding is not supported or it is disabled, so just fall back
|
// to copy instead.
|
||||||
// to copy instead.
|
if (!support_render_texture) {
|
||||||
mode = RTM_copy_texture;
|
mode = RTM_copy_texture;
|
||||||
|
} else {
|
||||||
|
nassertv(_gsg != NULL);
|
||||||
|
if (!_gsg->get_supports_render_texture()) {
|
||||||
|
mode = RTM_copy_texture;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user