Skip to content

Commit

Permalink
Fixed mesh data access errors in GLES2
Browse files Browse the repository at this point in the history
1. Removed errors in mesh_surface_get_array as it's supported now
2. More accurate errors in mesh_surface_get_blend_shapes
  • Loading branch information
pouleyKetchoupp committed Jul 9, 2020
1 parent 25858f3 commit e19a3df
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gles2/rasterizer_storage_gles2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2566,9 +2566,7 @@ Vector<uint8_t> RasterizerStorageGLES2::mesh_surface_get_array(RID p_mesh, int p
ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<uint8_t>());

Surface *surface = mesh->surfaces[p_surface];
#ifndef TOOLS_ENABLED
ERR_PRINT("OpenGL ES 2.0 does not allow retrieving mesh array data");
#endif

return surface->data;
}

Expand Down Expand Up @@ -2612,7 +2610,7 @@ Vector<Vector<uint8_t>> RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RI
ERR_FAIL_COND_V(!mesh, Vector<Vector<uint8_t>>());
ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<Vector<uint8_t>>());
#ifndef TOOLS_ENABLED
ERR_PRINT("OpenGL ES 2.0 does not allow retrieving mesh array data");
ERR_PRINT("OpenGL ES 2.0 does not allow retrieving blend shape data");
#endif

return mesh->surfaces[p_surface]->blend_shape_data;
Expand Down

0 comments on commit e19a3df

Please sign in to comment.