diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-03 22:53:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-03 22:53:57 +0100 |
commit | 94658de1ffab02ad2eacbadf44f86c3654e3afcb (patch) | |
tree | 56c869fc6e612ffa42ff4271c80563f958c0e9b1 | |
parent | db1a01501bb46ff1391580f68f25e9dd511d6e40 (diff) | |
parent | 906b5e7f3f9f75389e996e0363ad2a91012793b2 (diff) |
Merge pull request #34794 from clayjohn/GLES2-trimesh-crash
Fix crash on trimesh_create
-rw-r--r-- | drivers/gles2/rasterizer_storage_gles2.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 657148cb40..94a7d4e1b5 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -2435,22 +2435,10 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS: if (surface->blend_shape_data.size()) { ERR_PRINT_ONCE("Blend shapes are not supported in OpenGL ES 2.0"); } - surface->data = array; - surface->index_data = p_index_array; -#else - // Even on non-tools builds, a copy of the surface->data is needed in certain circumstances. - // Rigged meshes using the USE_SKELETON_SOFTWARE path need to read bone data - // from surface->data. - - // if USE_SKELETON_SOFTWARE is active - if (config.use_skeleton_software) { - // if this geometry is used specifically for skinning - if (p_format & (VS::ARRAY_FORMAT_BONES | VS::ARRAY_FORMAT_WEIGHTS)) - surface->data = array; - } - // An alternative is to always make a copy of surface->data. #endif + surface->data = array; + surface->index_data = p_index_array; surface->total_data_size += surface->array_byte_size + surface->index_array_byte_size; for (int i = 0; i < surface->skeleton_bone_used.size(); i++) { |