From 5854bf46966c3a0f62bf0152d3b2d91d845cac99 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Thu, 9 Jul 2020 13:41:43 +0200 Subject: [PATCH] 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 (cherry picked from commit e19a3df98fa3efa0cf80edbbb7fe8a681187832f) --- drivers/gles2/rasterizer_storage_gles2.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 518cbd782bc..ec043e94450 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -2667,9 +2667,7 @@ PoolVector RasterizerStorageGLES2::mesh_surface_get_array(RID p_mesh, i ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), PoolVector()); 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; } @@ -2713,7 +2711,7 @@ Vector > RasterizerStorageGLES2::mesh_surface_get_blend_shap ERR_FAIL_COND_V(!mesh, Vector >()); ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector >()); #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;