diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dummy/texture_loader_dummy.h | 1 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_storage_gles2.cpp | 12 | ||||
-rw-r--r-- | drivers/png/resource_saver_png.h | 1 |
3 files changed, 12 insertions, 2 deletions
diff --git a/drivers/dummy/texture_loader_dummy.h b/drivers/dummy/texture_loader_dummy.h index 3038bffc95..0bc7fa226b 100644 --- a/drivers/dummy/texture_loader_dummy.h +++ b/drivers/dummy/texture_loader_dummy.h @@ -35,7 +35,6 @@ #include "scene/resources/texture.h" class ResourceFormatDummyTexture : public ResourceFormatLoader { - GDCLASS(ResourceFormatDummyTexture, ResourceFormatLoader) public: virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL); virtual void get_recognized_extensions(List<String> *p_extensions) const; diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 70f1173a7d..418be136b8 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -2427,6 +2427,18 @@ void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS: } 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.float_texture_supported) { + // 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->total_data_size += surface->array_byte_size + surface->index_array_byte_size; diff --git a/drivers/png/resource_saver_png.h b/drivers/png/resource_saver_png.h index 584ccd4908..9267f2d678 100644 --- a/drivers/png/resource_saver_png.h +++ b/drivers/png/resource_saver_png.h @@ -35,7 +35,6 @@ #include "core/io/resource_saver.h" class ResourceSaverPNG : public ResourceFormatSaver { - GDCLASS(ResourceSaverPNG, ResourceFormatSaver) public: static Error save_image(const String &p_path, const Ref<Image> &p_img); |