libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
GfxDebuggerWindow.h
Go to the documentation of this file.
1#pragma once
2
4#include <vector>
5#include <memory>
6
7namespace Fast {
8union F3DGfx;
9class Interpreter;
10class GfxDebugger;
11class Fast3dGui;
12class Fast3dWindow;
13} // namespace Fast
14
15namespace Ship {
16class ResourceManager;
17} // namespace Ship
18
19namespace LUS {
20
34 public:
43 GfxDebuggerWindow(const std::string& consoleVariable, const std::string& name,
44 std::shared_ptr<Fast::Fast3dWindow> fast3dWindow, std::shared_ptr<Fast::GfxDebugger> gfxDebugger,
45 std::shared_ptr<Ship::ResourceManager> resourceManager);
47
48 protected:
50 void OnInit(const nlohmann::json& initArgs = nlohmann::json::object()) override;
51
53 void UpdateElement() override;
54
56 void DrawElement() override;
57
58 private:
65 void DrawDisasNode(const Fast::F3DGfx* cmd, std::vector<const Fast::F3DGfx*>& gfxPath, float parentPosY) const;
66
68 void DrawDisas();
69
70 private:
71 std::vector<const Fast::F3DGfx*> mLastBreakPoint = {};
72 std::weak_ptr<Fast::Interpreter> mInterpreter;
73 std::shared_ptr<Fast::GfxDebugger> mGfxDebugger;
74 std::shared_ptr<Fast::Fast3dGui> mFast3dGui;
75 std::shared_ptr<Ship::ResourceManager> mResourceManager;
76};
77
78} // namespace LUS
An ImGui window that visualises and inspects an N64 display list in real-time.
Definition GfxDebuggerWindow.h:33
void DrawElement() override
Renders the disassembly tree for the captured display list.
GfxDebuggerWindow(const std::string &consoleVariable, const std::string &name, std::shared_ptr< Fast::Fast3dWindow > fast3dWindow, std::shared_ptr< Fast::GfxDebugger > gfxDebugger, std::shared_ptr< Ship::ResourceManager > resourceManager)
Constructs a GfxDebuggerWindow with constructor-injected dependencies.
void UpdateElement() override
Polls the interpreter for a new display list when debugging is requested.
void OnInit(const nlohmann::json &initArgs=nlohmann::json::object()) override
Caches a weak reference to the Fast3D interpreter on first init.
virtual ~GfxDebuggerWindow()
A floating ImGui window managed by the Ship Gui layer.
Definition GuiWindow.h:39
Definition gfx_direct3d_common.h:19
union Fast::F3DGfx F3DGfx
Definition ControlDeck.h:13
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14
Definition lus_gbi.h:1171