eth-igl / gp2024-Assignments

0 stars 0 forks source link

Displaying vertex and face labels #5

Open rubenwgs opened 4 months ago

rubenwgs commented 4 months ago

When using the libigl viewer, the vertex and face labels can be displayed upon running the main.cpp file. When pressing, e.g., key "1", the labels disappear (I guess that's due to us clearing and setting the viewer data). However, in my case the labels can't be turned on again, i.e. unchecking and checking the "Show vertex labels" button does nothing. Is this a problem with my implementation or with libigl?

Best and thanks in advance, Ruben

segaviv commented 4 months ago

Hey Ruben,

It looks to me like a bug in libigl's viewer. You can fix it by marking all the mesh properties as dirty at the end of the set_mesh() method of ViewerData.cpp (here). You can replace that line with the following to fix the issue:

dirty = MeshGL::DIRTY_ALL;

Best, Aviv