Merge pull request #24943 from aqnuep/issue-18201
Mute errors on surface->index_array_len == 0 in the GLES3 renderer
This commit is contained in:
commit
c34636cbc4
1 changed files with 17 additions and 15 deletions
|
@ -3772,10 +3772,10 @@ PoolVector<uint8_t> RasterizerStorageGLES3::mesh_surface_get_index_array(RID p_m
|
|||
|
||||
Surface *surface = mesh->surfaces[p_surface];
|
||||
|
||||
ERR_FAIL_COND_V(surface->index_array_len == 0, PoolVector<uint8_t>());
|
||||
|
||||
PoolVector<uint8_t> ret;
|
||||
ret.resize(surface->index_array_byte_size);
|
||||
|
||||
if (surface->index_array_byte_size > 0) {
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, surface->index_id);
|
||||
|
||||
#if defined(GLES_OVER_GL) || defined(__EMSCRIPTEN__)
|
||||
|
@ -3794,6 +3794,8 @@ PoolVector<uint8_t> RasterizerStorageGLES3::mesh_surface_get_index_array(RID p_m
|
|||
#endif
|
||||
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue