Dropping elemental-forms and swapping out with imgui.
Too much code for such little use. This should simplify porting.
This commit is contained in:
@@ -7,7 +7,6 @@ project("xenia-gpu-gl4")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"elemental-forms",
|
||||
"glew",
|
||||
"xenia-base",
|
||||
"xenia-gpu",
|
||||
@@ -20,7 +19,6 @@ project("xenia-gpu-gl4")
|
||||
"GLEW_MX=1",
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/elemental-forms/src",
|
||||
project_root.."/build_tools/third_party/gflags/src",
|
||||
})
|
||||
local_platform_files()
|
||||
@@ -32,7 +30,6 @@ project("xenia-gpu-gl4-trace-viewer")
|
||||
kind("WindowedApp")
|
||||
language("C++")
|
||||
links({
|
||||
"elemental-forms",
|
||||
"gflags",
|
||||
"glew",
|
||||
"imgui",
|
||||
@@ -62,7 +59,6 @@ project("xenia-gpu-gl4-trace-viewer")
|
||||
"GLEW_MX=1",
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/elemental-forms/src",
|
||||
project_root.."/build_tools/third_party/gflags/src",
|
||||
})
|
||||
files({
|
||||
@@ -88,7 +84,6 @@ project("xenia-gpu-gl4-trace-dump")
|
||||
kind("ConsoleApp")
|
||||
language("C++")
|
||||
links({
|
||||
"elemental-forms",
|
||||
"gflags",
|
||||
"glew",
|
||||
"imgui",
|
||||
@@ -115,7 +110,6 @@ project("xenia-gpu-gl4-trace-dump")
|
||||
"GLEW_MX=1",
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/elemental-forms/src",
|
||||
project_root.."/build_tools/third_party/gflags/src",
|
||||
})
|
||||
files({
|
||||
|
||||
@@ -7,7 +7,6 @@ project("xenia-gpu")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"elemental-forms",
|
||||
"spirv-tools",
|
||||
"xenia-base",
|
||||
"xenia-ui",
|
||||
@@ -18,12 +17,11 @@ project("xenia-gpu")
|
||||
defines({
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/elemental-forms/src",
|
||||
project_root.."/third_party/spirv-tools/external/include",
|
||||
project_root.."/build_tools/third_party/gflags/src",
|
||||
})
|
||||
local_platform_files()
|
||||
|
||||
|
||||
group("src")
|
||||
project("xenia-gpu-shader-compiler")
|
||||
uuid("ad76d3e4-4c62-439b-a0f6-f83fcf0e83c5")
|
||||
|
||||
@@ -112,7 +112,6 @@ bool TraceViewer::Setup() {
|
||||
window_->on_closed.AddListener([&](xe::ui::UIEvent* e) {
|
||||
loop_->Quit();
|
||||
XELOGI("User-initiated death!");
|
||||
imgui_drawer_.reset();
|
||||
exit(1);
|
||||
});
|
||||
loop_->on_quit.AddListener([&](xe::ui::UIEvent* e) { window_.reset(); });
|
||||
@@ -130,6 +129,8 @@ bool TraceViewer::Setup() {
|
||||
memory_ = emulator_->memory();
|
||||
graphics_system_ = emulator_->graphics_system();
|
||||
|
||||
window_->set_imgui_input_enabled(true);
|
||||
|
||||
window_->on_key_char.AddListener([&](xe::ui::KeyEvent* e) {
|
||||
if (e->key_code() == 0x74 /* VK_F5 */) {
|
||||
graphics_system_->ClearCaches();
|
||||
@@ -139,26 +140,9 @@ bool TraceViewer::Setup() {
|
||||
|
||||
player_ = std::make_unique<TracePlayer>(loop_.get(), graphics_system_);
|
||||
|
||||
imgui_drawer_ = std::make_unique<xe::ui::ImGuiDrawer>(window_.get());
|
||||
imgui_drawer_->SetupDefaultInput();
|
||||
|
||||
window_->on_painting.AddListener([&](xe::ui::UIEvent* e) {
|
||||
auto& io = ImGui::GetIO();
|
||||
auto current_ticks = Clock::QueryHostTickCount();
|
||||
static uint64_t last_ticks = 0;
|
||||
io.DeltaTime =
|
||||
(current_ticks - last_ticks) / float(Clock::host_tick_frequency());
|
||||
last_ticks = current_ticks;
|
||||
|
||||
io.DisplaySize =
|
||||
ImVec2(float(e->target()->width()), float(e->target()->height()));
|
||||
|
||||
ImGui::NewFrame();
|
||||
|
||||
DrawUI();
|
||||
|
||||
ImGui::Render();
|
||||
|
||||
// Continuous paint.
|
||||
window_->Invalidate();
|
||||
});
|
||||
@@ -185,7 +169,6 @@ void TraceViewer::Run() {
|
||||
|
||||
player_.reset();
|
||||
emulator_.reset();
|
||||
imgui_drawer_.reset();
|
||||
window_.reset();
|
||||
loop_.reset();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
namespace xe {
|
||||
namespace ui {
|
||||
class ImGuiDrawer;
|
||||
class Loop;
|
||||
class Window;
|
||||
} // namespace ui
|
||||
@@ -62,8 +61,6 @@ class TraceViewer {
|
||||
GraphicsSystem* graphics_system_ = nullptr;
|
||||
std::unique_ptr<TracePlayer> player_;
|
||||
|
||||
std::unique_ptr<xe::ui::ImGuiDrawer> imgui_drawer_;
|
||||
|
||||
private:
|
||||
enum class ShaderDisplayType : int {
|
||||
kUcode,
|
||||
|
||||
Reference in New Issue
Block a user