2
0
Fork 0

Ensure canvas copy texscreen will not crash if render target is configured without copy buffers. Closes #24749.

3.1
Juan Linietsky 2019-01-15 15:13:58 +07:00
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;