The layer IDs were not set correctly when constructing draw lists from sorted primitives, so using gizmos in different layers did not work:
// in the main loop
Im3d::PushLayerId("gizmoLayer");
Im3d::Gizmo("mygizmo", &transform);
Im3d::PopLayerId();
// in the rendering code
if (drawList.m_layerId == Im3d::MakeId("gizmoLayer")) {
// will never reach here
}
This patch simply sets the layer ID of the draw list from the current index in the ID map.
The layer IDs were not set correctly when constructing draw lists from sorted primitives, so using gizmos in different layers did not work:
This patch simply sets the layer ID of the draw list from the current index in the ID map.