summaryrefslogtreecommitdiff
path: root/drivers/gles3
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-09-23 15:35:31 +0200
committerGitHub <noreply@github.com>2019-09-23 15:35:31 +0200
commitf1146c261d7c6f09cf27828ea2d719b82bf0fd09 (patch)
tree9e1c85c909d960dbb210a1bea940155444bf4a1c /drivers/gles3
parent2114898cb5e8f3650602d3a949a00b766347dbfb (diff)
parente65d2184b95ce22553dd6df729e79db3f75c30aa (diff)
Merge pull request #31751 from clayjohn/GLES3-Viewport-crash-canvas
Throw error when canvas background is used without sample buffer
Diffstat (limited to 'drivers/gles3')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 1cab3d89aa..35f414cf09 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -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;
}