Merge pull request #69135 from clayjohn/GLES3-mesh2D

Fix drawing of Mesh2D
This commit is contained in:
Rémi Verschelde 2022-11-24 23:30:45 +01:00
commit 7580565c28
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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);