From a110a17a53b14a12dcd70d47bfee58c0e04e7d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Fonseca?= Date: Tue, 26 Sep 2023 12:22:51 +0100 Subject: [PATCH] chore: remove core ui sample --- core/samples/CMakeLists.txt | 1 - core/samples/ui/main.cpp | 95 ------------------------------------- 2 files changed, 96 deletions(-) delete mode 100644 core/samples/ui/main.cpp diff --git a/core/samples/CMakeLists.txt b/core/samples/CMakeLists.txt index c8b7dc32e..ea50badcf 100644 --- a/core/samples/CMakeLists.txt +++ b/core/samples/CMakeLists.txt @@ -37,4 +37,3 @@ make_sample(DIR "ecs/general") make_sample(DIR "gl/compute") make_sample(DIR "gl/debug_renderer") make_sample(DIR "gl/quad") -make_sample(DIR "ui") diff --git a/core/samples/ui/main.cpp b/core/samples/ui/main.cpp deleted file mode 100644 index e120dc106..000000000 --- a/core/samples/ui/main.cpp +++ /dev/null @@ -1,95 +0,0 @@ -#include - -#include -#include -#include -#include -#include -#include - -using namespace cubos::core; - -int main() -{ - initializeLogger(); - auto window = io::openWindow(); - auto& renderDevice = window->renderDevice(); - ui::initialize(window); - - std::vector> matDictArray = { - {{"mat1", gl::Material()}, {"mat2", gl::Material()}}, - {{"mat3", gl::Material()}, {"mat4", gl::Material()}, {"mat5", gl::Material()}}, - {{"mat6", gl::Material()}}}; - int8_t i8 = INT8_MIN; - int16_t i16 = INT16_MIN; - int32_t i32 = INT32_MIN; - int64_t i64 = INT64_MIN; - uint8_t u8 = UINT8_MAX; - uint16_t u16 = UINT16_MAX; - uint32_t u32 = UINT32_MAX; - uint64_t u64 = UINT64_MAX; - float f32 = -FLT_MAX; - double f64 = -DBL_MAX; - bool boolean = false; - std::string string = "poggers"; - - while (!window->shouldClose()) - { - ui::beginFrame(); - - ImGui::Begin("Inspector"); - ImGui::BeginTable("split", 2, ImGuiTableFlags_BordersOuter | ImGuiTableFlags_Resizable); - ui::show(i8, "i8"); - ui::show(i16, "i16"); - ui::show(i32, "i32"); - ui::show(i64, "i64"); - ui::show(u8, "u8"); - ui::show(u16, "u16"); - ui::show(u32, "u32"); - ui::show(u64, "u64"); - ui::show(f32, "f32"); - ui::show(f64, "f64"); - ui::show(boolean, "boolean"); - ui::show(string, "string"); - ui::show(matDictArray, "Mat Dict Array"); - ImGui::EndTable(); - ImGui::End(); - - ImGui::Begin("Editor"); - ImGui::BeginTable("split", 3, ImGuiTableFlags_BordersOuter | ImGuiTableFlags_Resizable); - ui::edit(i8, "i8"); - ui::edit(i16, "i16"); - ui::edit(i32, "i32"); - ui::edit(i64, "i64"); - ui::edit(u8, "u8"); - ui::edit(u16, "u16"); - ui::edit(u32, "u32"); - ui::edit(u64, "u64"); - ui::edit(f32, "f32"); - ui::edit(f64, "f64"); - ui::edit(boolean, "boolean"); - ui::edit(string, "string"); - ui::edit(matDictArray, "Mat Dict Array"); - ImGui::EndTable(); - ImGui::End(); - - ImGui::ShowDemoWindow(); - - auto sz = window->framebufferSize(); - renderDevice.setRasterState(nullptr); - renderDevice.setBlendState(nullptr); - renderDevice.setDepthStencilState(nullptr); - renderDevice.setViewport(0, 0, sz.x, sz.y); - renderDevice.clearColor(0.0F, 0.0F, 0.0F, 1.0F); - - ui::endFrame(); - window->swapBuffers(); - while (auto event = window->pollEvent()) - { - ui::handleEvent(event.value()); - } - } - - ui::terminate(); - return 0; -}