Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uplift the tiny_obj_loader library to the latest version and put it to 3rdparty directory #183

Open
dtarakanov1 opened this issue Aug 10, 2018 · 0 comments

Comments

@dtarakanov1
Copy link
Contributor

The copied tiny_obj_loader code seems to be quite old. It needs to be updated.
Rationale. The g++-8 compiler generates warnings (which are treated as errors due to -Wall). Warning suppression is not the best way of solving such issues.

In file included from /storage/baikal/BaikalIO/scene_obj_io.cpp:40:
/storage/baikal/Baikal/Utils/tiny_obj_loader.h: In function ‘bool tinyobj::exportFaceGroupToShape(tinyobj::shape_t&, std::map<tinyobj::vertex_index, unsigned int>, const std::vector<float>&, const std::vector<float>&, const std::vector<float>&, const std::vector<std::vector<tinyobj::vertex_index> >&, std::vector<tinyobj::tag_t>&, int, const string&, bool, unsigned int, std::__cxx11::string&)’:
/storage/baikal/Baikal/Utils/tiny_obj_loader.h:672:39: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class tinyobj::float3’ from an array of ‘__gnu_cxx::__alloc_traits<std::allocator<float>, float>::value_type’ {aka ‘float’} [-Werror=class-memaccess]
                         sizeof(float3));
                                       ^
In file included from /storage/baikal/BaikalIO/scene_obj_io.cpp:40:
/storage/baikal/Baikal/Utils/tiny_obj_loader.h:109:11: note: ‘class tinyobj::float3’ declared here
     class float3 {
           ^~~~~~
In file included from /storage/baikal/BaikalIO/scene_obj_io.cpp:40:
/storage/baikal/Baikal/Utils/tiny_obj_loader.h:674:39: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class tinyobj::float3’ from an array of ‘__gnu_cxx::__alloc_traits<std::allocator<float>, float>::value_type’ {aka ‘float’} [-Werror=class-memaccess]
                         sizeof(float3));
                                       ^
In file included from /storage/baikal/BaikalIO/scene_obj_io.cpp:40:
/storage/baikal/Baikal/Utils/tiny_obj_loader.h:109:11: note: ‘class tinyobj::float3’ declared here
     class float3 {
           ^~~~~~
In file included from /storage/baikal/BaikalIO/scene_obj_io.cpp:40:
/storage/baikal/Baikal/Utils/tiny_obj_loader.h:676:39: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class tinyobj::float3’ from an array of ‘__gnu_cxx::__alloc_traits<std::allocator<float>, float>::value_type’ {aka ‘float’} [-Werror=class-memaccess]
                         sizeof(float3));
                                       ^
In file included from /storage/baikal/BaikalIO/scene_obj_io.cpp:40:
/storage/baikal/Baikal/Utils/tiny_obj_loader.h:109:11: note: ‘class tinyobj::float3’ declared here
     class float3 {
           ^~~~~~

Also, it would be good to place the corresponding code into the 3rdparty directory (or even make it a submodule) to avoid confusion.

AlexanderVeselov added a commit to AlexanderVeselov/RadeonProRender-Baikal that referenced this issue Aug 21, 2018
AlexanderVeselov added a commit to AlexanderVeselov/RadeonProRender-Baikal that referenced this issue Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant