idaho777 / computer-graphics-bounding-volume-hierarchy

Computer Graphics Assignment about Bounding Volume Hierarchies
0 stars 0 forks source link

Build error after fixing outdated libigl #2

Open lzm0 opened 3 years ago

lzm0 commented 3 years ago
    In file included from /Users/username/csc317/computer-graphics-bounding-volume-hierarchy/distances.cpp:9:
    /Users/username/csc317/computer-graphics-bounding-volume-hierarchy/include/visualize_aabbtree.h:135:5: error: 
          reference to non-static member function must be called; did you mean to
          call it with no arguments?
      v.core.background_color.setConstant(0.8);
      ~~^~~~
            ()
    /Users/username/csc317/computer-graphics-bounding-volume-hierarchy/libigl/cmake/../include/igl/opengl/glfw/Viewer.cpp:1069:34: note: 
          possible target for call
      IGL_INLINE ViewerCore& Viewer::core(unsigned core_id /*= 0*/)
                                     ^
    /Users/username/csc317/computer-graphics-bounding-volume-hierarchy/libigl/cmake/../include/igl/opengl/glfw/Viewer.cpp:1081:40: note: 
          possible target for call
      IGL_INLINE const ViewerCore& Viewer::core(unsigned core_id /*= 0*/) const
                                           ^
    1 error generated.
    make[2]: *** [CMakeFiles/distances.dir/distances.cpp.o] Error 1
    make[1]: *** [CMakeFiles/distances.dir/all] Error 2
    make: *** [all] Error 2

Does the errors above result from unfinished code?

Samarium150 commented 3 years ago

The start code was writen years ago, and is incompatible with the latest libigl. Use the way mentioned in #56 to resolve downloading error.

Samarium150 commented 3 years ago

Another way is changing v.core.background_color.setConstant(0.8); to v.core().background_color.setConstant(0.8);