mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Merge pull request #95838 from olawlor/vertex65536bugfix
Fix GLES3 crash with Mesh surface with exactly 65536 vertices
This commit is contained in:
commit
033054f182
@ -301,7 +301,7 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface)
|
||||
Vector<uint8_t> ir = new_surface.index_data;
|
||||
wr = wf_indices.ptrw();
|
||||
|
||||
if (new_surface.vertex_count < (1 << 16)) {
|
||||
if (new_surface.vertex_count <= 65536) {
|
||||
// Read 16 bit indices.
|
||||
const uint16_t *src_idx = (const uint16_t *)ir.ptr();
|
||||
for (uint32_t i = 0; i + 5 < wf_index_count; i += 6) {
|
||||
|
Loading…
Reference in New Issue
Block a user