texture swaped in runtime ?
i just noticed there is bug fixed !553 (merged).
but still i can not change texture or set Color in the runtime, here is my core code.
curSliceIndex is changed, but texture has no effort.
imstk::connect<MouseEvent>(viewer->getMouseDevice(), &MouseDeviceClient::mouseScroll,
[&](MouseEvent* e) {
if (e->m_scrollDx > 0.0) {
if (curSliceIndex < 22) {
curSliceIndex++;
Scene->getSceneObject("slice")->getVisualModel(0)->getRenderMaterial()->addTexture(texture[curSliceIndex]);
}
}
if (e->m_scrollDx < 0.0) {
if (curSliceIndex > 0) {
curSliceIndex--;
Scene->getSceneObject("slice")->getVisualModel(0)->getRenderMaterial()->addTexture(texture[curSliceIndex]);
}
}
std::cout << "sliceIndex:" << curSliceIndex << std::endl;
});
thans for your patience.