88#include " vtkF3DImguiVS.h"
99
1010#include < vtkImageData.h>
11- #include < vtkInformation.h>
12- #include < vtkInformationIntegerKey.h>
1311#include < vtkObjectFactory.h>
1412#include < vtkOpenGLBufferObject.h>
1513#include < vtkOpenGLRenderWindow.h>
4543#include < sstream>
4644#include < string>
4745
48- vtkInformationKeyMacro (vtkF3DImguiActor, USER_VISIBILITY, Integer);
49-
5046namespace
5147{
5248constexpr float LOGO_DISPLAY_WIDTH = 256 .f;
@@ -419,19 +415,6 @@ void vtkF3DImguiActor::RenderNode(NodeInfo* node)
419415 NodeVisibilityState[node->prop ] = visible;
420416 node->prop ->SetVisibility (visible ? 1 : 0 );
421417 node->prop ->Modified ();
422-
423- // Mark this prop as user-controlled
424- vtkInformation* info = node->prop ->GetPropertyKeys ();
425- if (!info)
426- {
427- info = vtkInformation::New ();
428- node->prop ->SetPropertyKeys (info);
429- info->Delete ();
430- }
431- info->Set (vtkF3DImguiActor::USER_VISIBILITY (), visible ? 1 : 0 );
432-
433- // Request a render to update the scene
434- this ->VisibilityChangedThisFrame = true ;
435418 }
436419
437420 ImGui::PopID ();
@@ -1005,9 +988,6 @@ void vtkF3DImguiActor::StartFrame(vtkOpenGLRenderWindow* renWin)
1005988 io.DisplaySize = ImVec2 (static_cast <float >(size[0 ]), static_cast <float >(size[1 ]));
1006989
1007990 this ->Pimpl ->Initialize (renWin);
1008-
1009- // Reset the visibility change flag at the start of each frame
1010- this ->VisibilityChangedThisFrame = false ;
1011991
1012992 ImGui::NewFrame ();
1013993}
@@ -1017,12 +997,6 @@ void vtkF3DImguiActor::EndFrame(vtkOpenGLRenderWindow* renWin)
1017997{
1018998 ImGui::Render ();
1019999 this ->Pimpl ->RenderDrawData (renWin, ImGui::GetDrawData ());
1020-
1021- // If visibility changed, request a render to update the scene
1022- if (this ->VisibilityChangedThisFrame && this ->RenderRequestCallback )
1023- {
1024- this ->RenderRequestCallback ();
1025- }
10261000}
10271001
10281002
0 commit comments