@@ -65,14 +65,15 @@ public class DebugTab : Window, ITab
6565 private readonly TextureManager _textureManager ;
6666 private readonly SkinFixer _skinFixer ;
6767 private readonly IdentifierService _identifier ;
68+ private readonly RedrawService _redraws ;
6869
6970 public DebugTab ( StartTracker timer , PerformanceTracker performance , Configuration config , CollectionManager collectionManager ,
7071 ValidityChecker validityChecker , ModManager modManager , HttpApi httpApi , ActorService actorService ,
7172 DalamudServices dalamud , StainService stains , CharacterUtility characterUtility , ResidentResourceManager residentResources ,
7273 ResourceManagerService resourceManager , PenumbraIpcProviders ipc , CollectionResolver collectionResolver ,
7374 DrawObjectState drawObjectState , PathState pathState , SubfileHelper subfileHelper , IdentifiedCollectionCache identifiedCollectionCache ,
7475 CutsceneService cutsceneService , ModImportManager modImporter , ImportPopup importPopup , FrameworkManager framework ,
75- TextureManager textureManager , SkinFixer skinFixer , IdentifierService identifier )
76+ TextureManager textureManager , SkinFixer skinFixer , IdentifierService identifier , RedrawService redraws )
7677 : base ( "Penumbra Debug Window" , ImGuiWindowFlags . NoCollapse )
7778 {
7879 IsOpen = true ;
@@ -107,6 +108,7 @@ public DebugTab(StartTracker timer, PerformanceTracker performance, Configuratio
107108 _textureManager = textureManager ;
108109 _skinFixer = skinFixer ;
109110 _identifier = identifier ;
111+ _redraws = redraws ;
110112 }
111113
112114 public ReadOnlySpan < byte > Label
@@ -317,6 +319,48 @@ private void DrawDebugTabGeneral()
317319 }
318320 }
319321 }
322+
323+ using ( var tree = TreeNode ( "Redraw Service" ) )
324+ {
325+ if ( tree )
326+ {
327+ using var table = Table ( "##redraws" , 3 , ImGuiTableFlags . RowBg ) ;
328+ if ( table )
329+ {
330+ ImGuiUtil . DrawTableColumn ( "In GPose" ) ;
331+ ImGuiUtil . DrawTableColumn ( _redraws . InGPose . ToString ( ) ) ;
332+ ImGui . TableNextColumn ( ) ;
333+
334+ ImGuiUtil . DrawTableColumn ( "Target" ) ;
335+ ImGuiUtil . DrawTableColumn ( _redraws . Target . ToString ( ) ) ;
336+ ImGui . TableNextColumn ( ) ;
337+
338+ foreach ( var ( objectIdx , idx ) in _redraws . Queue . WithIndex ( ) )
339+ {
340+ var ( actualIdx , state ) = objectIdx < 0 ? ( ~ objectIdx , "Queued" ) : ( objectIdx , "Invisible" ) ;
341+ ImGuiUtil . DrawTableColumn ( $ "Redraw Queue #{ idx } ") ;
342+ ImGuiUtil . DrawTableColumn ( actualIdx . ToString ( ) ) ;
343+ ImGuiUtil . DrawTableColumn ( state ) ;
344+ }
345+
346+ foreach ( var ( objectIdx , idx ) in _redraws . AfterGPoseQueue . WithIndex ( ) )
347+ {
348+ var ( actualIdx , state ) = objectIdx < 0 ? ( ~ objectIdx , "Queued" ) : ( objectIdx , "Invisible" ) ;
349+ ImGuiUtil . DrawTableColumn ( $ "GPose Queue #{ idx } ") ;
350+ ImGuiUtil . DrawTableColumn ( actualIdx . ToString ( ) ) ;
351+ ImGuiUtil . DrawTableColumn ( state ) ;
352+ }
353+
354+ foreach ( var ( name , idx ) in _redraws . GPoseNames . OfType < string > ( ) . WithIndex ( ) )
355+ {
356+ ImGuiUtil . DrawTableColumn ( $ "GPose Name #{ idx } ") ;
357+ ImGuiUtil . DrawTableColumn ( name ) ;
358+ ImGui . TableNextColumn ( ) ;
359+ }
360+
361+ }
362+ }
363+ }
320364 }
321365
322366 private void DrawPerformanceTab ( )
0 commit comments