Skip to content

Commit

Permalink
Merge pull request #31751 from clayjohn/GLES3-Viewport-crash-canvas
Browse files Browse the repository at this point in the history
Throw error when canvas background is used without sample buffer
  • Loading branch information
akien-mga authored Sep 23, 2019
2 parents 2114898 + e65d218 commit f1146c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gles3/rasterizer_scene_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4330,6 +4330,10 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
if (storage->frame.current_rt->buffers.active) {
current_fbo = storage->frame.current_rt->buffers.fbo;
} else {
if (storage->frame.current_rt->effects.mip_maps[0].sizes.size() == 0) {
ERR_PRINT_ONCE("Can't use canvas background mode in a render target configured without sampling");
return;
}
current_fbo = storage->frame.current_rt->effects.mip_maps[0].sizes[0].fbo;
}

Expand Down

0 comments on commit f1146c2

Please sign in to comment.