Ensure canvas copy texscreen will not crash if render target is configured without copy buffers. Closes #24749.
This commit is contained in:
parent
7d5c970eff
commit
ca03d7e0d7
1 changed files with 5 additions and 0 deletions
|
@ -1144,6 +1144,11 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
|
|||
|
||||
void RasterizerCanvasGLES3::_copy_texscreen(const Rect2 &p_rect) {
|
||||
|
||||
if (storage->frame.current_rt->effects.mip_maps[0].sizes.size() == 0) {
|
||||
ERR_EXPLAIN("Can't use screen texture copying in a render target configured without copy buffers");
|
||||
ERR_FAIL();
|
||||
}
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
state.canvas_texscreen_used = true;
|
||||
|
|
Loading…
Reference in a new issue