diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-24 23:30:45 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-24 23:30:45 +0100 |
commit | 7580565c28e7e10db7f551287e1f91cfd614b195 (patch) | |
tree | 23ef3ab3f99ec0690bb8cfbe90c930d56c7fd906 /drivers/gles3 | |
parent | 8b7efd230609a35cbea68793bf9656a29ff9434d (diff) | |
parent | 535f1adc8d0b0b2fc200e0c8780fc897653d98d3 (diff) |
Merge pull request #69135 from clayjohn/GLES3-mesh2D
Fix drawing of Mesh2D
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/rasterizer_canvas_gles3.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 0c102bfc1d..07d56b156c 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -1306,10 +1306,6 @@ void RasterizerCanvasGLES3::_render_batch(Light *p_lights, uint32_t p_index) { instance_uses_custom_data = true; } - if (instance_buffer == 0) { - break; - } - ERR_FAIL_COND(mesh.is_null()); uint32_t surf_count = mesh_storage->mesh_get_surface_count(mesh); @@ -1339,6 +1335,9 @@ void RasterizerCanvasGLES3::_render_batch(Light *p_lights, uint32_t p_index) { } if (instance_count > 1) { + if (instance_buffer == 0) { + break; + } // Bind instance buffers. glBindBuffer(GL_ARRAY_BUFFER, instance_buffer); glEnableVertexAttribArray(1); |