danielepanozzo / gp-old

67 stars 13 forks source link

add_edges not showing edges? #25

Open sebastianherscher opened 7 years ago

sebastianherscher commented 7 years ago

I've been trying to show my displacement vectors for a while and cannot get any edges to show up. Here's what I'm calling:

viewer.data.clear(); viewer.data.set_mesh(B, F); viewer.data.add_edges(B, V,RowVector3d(0,0,1));

I know that B and V are both correct, so it should just draw a displacement line for each vertex? What am I doing wrong?

danielepanozzo commented 7 years ago

This looks fine. Could you try the tutorial 105: http://libigl.github.io/libigl/tutorial/105_Overlays/main.cpp

If that does not work, then it might be a shader problem (I doubt it, but if you are sure the B and F are correct there is not much else that could go wrong).

ypiadyk commented 7 years ago

Same problem

danielepanozzo commented 7 years ago

Meaning that you do not see anything also in the tutorial? This looks like a driver bug then. What GPU are you using?

jpanetta commented 7 years ago

Are you trying to add the edges from the solve() function? If so, they're probably being overridden by callback_pre_draw. You should add your visualization code to callback_pre_draw instead.

ypiadyk commented 7 years ago

Thanks for pointing out to callback_pre_draw! A lot of things are happening behind the scene)