Fixed mesh data access errors in GLES2
1. Removed errors in mesh_surface_get_array as it's supported now 2. More accurate errors in mesh_surface_get_blend_shapes
This commit is contained in:
parent
25858f3607
commit
e19a3df98f
|
@ -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>());
|
ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<uint8_t>());
|
||||||
|
|
||||||
Surface *surface = mesh->surfaces[p_surface];
|
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;
|
return surface->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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_COND_V(!mesh, Vector<Vector<uint8_t>>());
|
||||||
ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<Vector<uint8_t>>());
|
ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<Vector<uint8_t>>());
|
||||||
#ifndef TOOLS_ENABLED
|
#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
|
#endif
|
||||||
|
|
||||||
return mesh->surfaces[p_surface]->blend_shape_data;
|
return mesh->surfaces[p_surface]->blend_shape_data;
|
||||||
|
|
Loading…
Reference in New Issue