Message 1 of 5
How to invalidate render items
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
Regarding the render items in nitrous
Usually a system based on render items is made in this way
bool CustomPlugin::PrepareDisplay(
const MaxSDK::Graphics::UpdateDisplayContext& displayContext)
{
// cook some new render items
}
bool CustomPlugin::UpdatePerNodeItems(
const UpdateDisplayContext& updateDisplayContext,
UpdateNodeContext& nodeContext,
IRenderItemContainer& targetRenderItemContainer)
{
// remove the existing render items
targetRenderItemContainer.ClearAllRenderItems();
// add the new render items
for( auto& item: myRenderItems )
{
CustomRenderItemHandle newHandle;
newHandle.Initialize();
newHandle.SetVisibilityGroup(RenderItemVisible_Gizmo);
newHandle.SetCustomImplementation(mpSampleItem.GetPointer());
targetRenderItemContainer.AddRenderItem(newHandle);
}
return true;
}
The question is: how to invalidate the render items and triger the system to invoke again PrepareDisplay?
Actually now PrepareDisaply is only called when the frame changes.
Thanks