From eb67585e1d8b0ddf961c6cf4e35018653de94ff0 Mon Sep 17 00:00:00 2001 From: Albin Johansson Date: Tue, 8 Oct 2024 21:46:39 +0200 Subject: [PATCH] Move OpenGL renderer --- CMakeLists.txt | 2 +- .../opengl}/CMakeLists.txt | 2 +- .../opengl}/lib/CMakeLists.txt | 20 +++++++++---------- .../opengl/lib/inc/tactile/opengl}/api.hpp | 0 .../lib/inc/tactile/opengl}/opengl_error.hpp | 2 +- .../inc/tactile/opengl}/opengl_renderer.hpp | 2 +- .../opengl}/opengl_renderer_plugin.hpp | 4 ++-- .../inc/tactile/opengl}/opengl_texture.hpp | 2 +- .../opengl/lib/src}/opengl_error.cpp | 2 +- .../opengl/lib/src}/opengl_renderer.cpp | 6 +++--- .../lib/src}/opengl_renderer_plugin.cpp | 2 +- .../opengl/lib/src}/opengl_texture.cpp | 4 ++-- .../opengl}/test/.clang-tidy | 0 .../opengl}/test/CMakeLists.txt | 2 +- .../opengl}/test/src/main.cpp | 0 .../opengl}/test/src/opengl_error_test.cpp | 2 +- .../opengl}/test/src/opengl_renderer_test.cpp | 4 ++-- .../opengl}/test/src/opengl_texture_test.cpp | 4 ++-- 18 files changed, 30 insertions(+), 30 deletions(-) rename source/{opengl_renderer => renderers/opengl}/CMakeLists.txt (86%) rename source/{opengl_renderer => renderers/opengl}/lib/CMakeLists.txt (61%) rename source/{opengl_renderer/lib/inc/tactile/opengl_renderer => renderers/opengl/lib/inc/tactile/opengl}/api.hpp (100%) rename source/{opengl_renderer/lib/inc/tactile/opengl_renderer => renderers/opengl/lib/inc/tactile/opengl}/opengl_error.hpp (97%) rename source/{opengl_renderer/lib/inc/tactile/opengl_renderer => renderers/opengl/lib/inc/tactile/opengl}/opengl_renderer.hpp (97%) rename source/{opengl_renderer/lib/inc/tactile/opengl_renderer => renderers/opengl/lib/inc/tactile/opengl}/opengl_renderer_plugin.hpp (87%) rename source/{opengl_renderer/lib/inc/tactile/opengl_renderer => renderers/opengl/lib/inc/tactile/opengl}/opengl_texture.hpp (97%) rename source/{opengl_renderer/lib/src/tactile/opengl_renderer => renderers/opengl/lib/src}/opengl_error.cpp (97%) rename source/{opengl_renderer/lib/src/tactile/opengl_renderer => renderers/opengl/lib/src}/opengl_renderer.cpp (97%) rename source/{opengl_renderer/lib/src/tactile/opengl_renderer => renderers/opengl/lib/src}/opengl_renderer_plugin.cpp (96%) rename source/{opengl_renderer/lib/src/tactile/opengl_renderer => renderers/opengl/lib/src}/opengl_texture.cpp (97%) rename source/{opengl_renderer => renderers/opengl}/test/.clang-tidy (100%) rename source/{opengl_renderer => renderers/opengl}/test/CMakeLists.txt (93%) rename source/{opengl_renderer => renderers/opengl}/test/src/main.cpp (100%) rename source/{opengl_renderer => renderers/opengl}/test/src/opengl_error_test.cpp (95%) rename source/{opengl_renderer => renderers/opengl}/test/src/opengl_renderer_test.cpp (88%) rename source/{opengl_renderer => renderers/opengl}/test/src/opengl_texture_test.cpp (88%) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfc3303661..12b6b3eae6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,7 +118,7 @@ endif () add_subdirectory("source/renderers/null") if (TACTILE_BUILD_OPENGL_RENDERER) - add_subdirectory("source/opengl_renderer") + add_subdirectory("source/renderers/opengl") endif () if (TACTILE_BUILD_VULKAN_RENDERER) diff --git a/source/opengl_renderer/CMakeLists.txt b/source/renderers/opengl/CMakeLists.txt similarity index 86% rename from source/opengl_renderer/CMakeLists.txt rename to source/renderers/opengl/CMakeLists.txt index 66e8cf1c59..d3bcd94019 100644 --- a/source/opengl_renderer/CMakeLists.txt +++ b/source/renderers/opengl/CMakeLists.txt @@ -1,4 +1,4 @@ -project(tactile-opengl-renderer CXX) +project(tactile-renderers-opengl CXX) find_package(imgui CONFIG REQUIRED) find_package(glad CONFIG REQUIRED) diff --git a/source/opengl_renderer/lib/CMakeLists.txt b/source/renderers/opengl/lib/CMakeLists.txt similarity index 61% rename from source/opengl_renderer/lib/CMakeLists.txt rename to source/renderers/opengl/lib/CMakeLists.txt index da839f63ad..fb2979c604 100644 --- a/source/opengl_renderer/lib/CMakeLists.txt +++ b/source/renderers/opengl/lib/CMakeLists.txt @@ -1,21 +1,21 @@ -project(tactile-opengl-renderer-lib CXX) +project(tactile-renderers-opengl-lib CXX) add_library(tactile-opengl-renderer SHARED) add_library(tactile::opengl_renderer ALIAS tactile-opengl-renderer) target_sources(tactile-opengl-renderer PRIVATE - "src/tactile/opengl_renderer/opengl_error.cpp" - "src/tactile/opengl_renderer/opengl_renderer.cpp" - "src/tactile/opengl_renderer/opengl_renderer_plugin.cpp" - "src/tactile/opengl_renderer/opengl_texture.cpp" + "src/opengl_error.cpp" + "src/opengl_renderer.cpp" + "src/opengl_renderer_plugin.cpp" + "src/opengl_texture.cpp" PUBLIC FILE_SET "HEADERS" BASE_DIRS "inc" FILES - "inc/tactile/opengl_renderer/api.hpp" - "inc/tactile/opengl_renderer/opengl_error.hpp" - "inc/tactile/opengl_renderer/opengl_renderer.hpp" - "inc/tactile/opengl_renderer/opengl_renderer_plugin.hpp" - "inc/tactile/opengl_renderer/opengl_texture.hpp" + "inc/tactile/opengl/api.hpp" + "inc/tactile/opengl/opengl_error.hpp" + "inc/tactile/opengl/opengl_renderer.hpp" + "inc/tactile/opengl/opengl_renderer_plugin.hpp" + "inc/tactile/opengl/opengl_texture.hpp" ) tactile_prepare_target(tactile-opengl-renderer) diff --git a/source/opengl_renderer/lib/inc/tactile/opengl_renderer/api.hpp b/source/renderers/opengl/lib/inc/tactile/opengl/api.hpp similarity index 100% rename from source/opengl_renderer/lib/inc/tactile/opengl_renderer/api.hpp rename to source/renderers/opengl/lib/inc/tactile/opengl/api.hpp diff --git a/source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_error.hpp b/source/renderers/opengl/lib/inc/tactile/opengl/opengl_error.hpp similarity index 97% rename from source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_error.hpp rename to source/renderers/opengl/lib/inc/tactile/opengl/opengl_error.hpp index 009dd5d0f9..d94f3d8ca7 100644 --- a/source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_error.hpp +++ b/source/renderers/opengl/lib/inc/tactile/opengl/opengl_error.hpp @@ -7,7 +7,7 @@ #include // to_underlying #include "tactile/base/prelude.hpp" -#include "tactile/opengl_renderer/api.hpp" +#include "tactile/opengl/api.hpp" namespace tactile { diff --git a/source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_renderer.hpp b/source/renderers/opengl/lib/inc/tactile/opengl/opengl_renderer.hpp similarity index 97% rename from source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_renderer.hpp rename to source/renderers/opengl/lib/inc/tactile/opengl/opengl_renderer.hpp index 60a51c9e7e..b9b540b982 100644 --- a/source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_renderer.hpp +++ b/source/renderers/opengl/lib/inc/tactile/opengl/opengl_renderer.hpp @@ -8,7 +8,7 @@ #include "tactile/base/prelude.hpp" #include "tactile/base/render/renderer.hpp" -#include "tactile/opengl_renderer/api.hpp" +#include "tactile/opengl/api.hpp" namespace tactile { diff --git a/source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_renderer_plugin.hpp b/source/renderers/opengl/lib/inc/tactile/opengl/opengl_renderer_plugin.hpp similarity index 87% rename from source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_renderer_plugin.hpp rename to source/renderers/opengl/lib/inc/tactile/opengl/opengl_renderer_plugin.hpp index 28c5519507..119f26e57a 100644 --- a/source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_renderer_plugin.hpp +++ b/source/renderers/opengl/lib/inc/tactile/opengl/opengl_renderer_plugin.hpp @@ -5,8 +5,8 @@ #include // optional #include "tactile/base/prelude.hpp" -#include "tactile/opengl_renderer/api.hpp" -#include "tactile/opengl_renderer/opengl_renderer.hpp" +#include "tactile/opengl/api.hpp" +#include "tactile/opengl/opengl_renderer.hpp" #include "tactile/runtime/plugin.hpp" namespace tactile { diff --git a/source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_texture.hpp b/source/renderers/opengl/lib/inc/tactile/opengl/opengl_texture.hpp similarity index 97% rename from source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_texture.hpp rename to source/renderers/opengl/lib/inc/tactile/opengl/opengl_texture.hpp index e18ef88abf..31819e9ed0 100644 --- a/source/opengl_renderer/lib/inc/tactile/opengl_renderer/opengl_texture.hpp +++ b/source/renderers/opengl/lib/inc/tactile/opengl/opengl_texture.hpp @@ -7,7 +7,7 @@ #include "tactile/base/prelude.hpp" #include "tactile/base/render/texture.hpp" -#include "tactile/opengl_renderer/api.hpp" +#include "tactile/opengl/api.hpp" namespace tactile { diff --git a/source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_error.cpp b/source/renderers/opengl/lib/src/opengl_error.cpp similarity index 97% rename from source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_error.cpp rename to source/renderers/opengl/lib/src/opengl_error.cpp index e96e6529ef..21e380597d 100644 --- a/source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_error.cpp +++ b/source/renderers/opengl/lib/src/opengl_error.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0) -#include "tactile/opengl_renderer/opengl_error.hpp" +#include "tactile/opengl/opengl_error.hpp" #include diff --git a/source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_renderer.cpp b/source/renderers/opengl/lib/src/opengl_renderer.cpp similarity index 97% rename from source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_renderer.cpp rename to source/renderers/opengl/lib/src/opengl_renderer.cpp index a7ef7c5bdc..ee393ad541 100644 --- a/source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_renderer.cpp +++ b/source/renderers/opengl/lib/src/opengl_renderer.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0) -#include "tactile/opengl_renderer/opengl_renderer.hpp" +#include "tactile/opengl/opengl_renderer.hpp" #include // malloc, free #include // list @@ -17,8 +17,8 @@ #include "tactile/base/render/window.hpp" #include "tactile/base/util/scope_exit.hpp" -#include "tactile/opengl_renderer/opengl_error.hpp" -#include "tactile/opengl_renderer/opengl_texture.hpp" +#include "tactile/opengl/opengl_error.hpp" +#include "tactile/opengl/opengl_texture.hpp" #include "tactile/runtime/logging.hpp" namespace tactile { diff --git a/source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_renderer_plugin.cpp b/source/renderers/opengl/lib/src/opengl_renderer_plugin.cpp similarity index 96% rename from source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_renderer_plugin.cpp rename to source/renderers/opengl/lib/src/opengl_renderer_plugin.cpp index 00b5c4726a..cc3fc3c430 100644 --- a/source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_renderer_plugin.cpp +++ b/source/renderers/opengl/lib/src/opengl_renderer_plugin.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0) -#include "tactile/opengl_renderer/opengl_renderer_plugin.hpp" +#include "tactile/opengl/opengl_renderer_plugin.hpp" #include // nothrow diff --git a/source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_texture.cpp b/source/renderers/opengl/lib/src/opengl_texture.cpp similarity index 97% rename from source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_texture.cpp rename to source/renderers/opengl/lib/src/opengl_texture.cpp index 7a8dd35b1a..d2a1ca28ba 100644 --- a/source/opengl_renderer/lib/src/tactile/opengl_renderer/opengl_texture.cpp +++ b/source/renderers/opengl/lib/src/opengl_texture.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0) -#include "tactile/opengl_renderer/opengl_texture.hpp" +#include "tactile/opengl/opengl_texture.hpp" #define STB_IMAGE_IMPLEMENTATION @@ -12,7 +12,7 @@ #include #include "tactile/base/render/renderer_options.hpp" -#include "tactile/opengl_renderer/opengl_error.hpp" +#include "tactile/opengl/opengl_error.hpp" namespace tactile { diff --git a/source/opengl_renderer/test/.clang-tidy b/source/renderers/opengl/test/.clang-tidy similarity index 100% rename from source/opengl_renderer/test/.clang-tidy rename to source/renderers/opengl/test/.clang-tidy diff --git a/source/opengl_renderer/test/CMakeLists.txt b/source/renderers/opengl/test/CMakeLists.txt similarity index 93% rename from source/opengl_renderer/test/CMakeLists.txt rename to source/renderers/opengl/test/CMakeLists.txt index cf5338033d..6d27282573 100644 --- a/source/opengl_renderer/test/CMakeLists.txt +++ b/source/renderers/opengl/test/CMakeLists.txt @@ -1,4 +1,4 @@ -project(tactile-opengl-renderer-test CXX) +project(tactile-renderers-opengl-test CXX) add_executable(tactile-opengl-renderer-test) diff --git a/source/opengl_renderer/test/src/main.cpp b/source/renderers/opengl/test/src/main.cpp similarity index 100% rename from source/opengl_renderer/test/src/main.cpp rename to source/renderers/opengl/test/src/main.cpp diff --git a/source/opengl_renderer/test/src/opengl_error_test.cpp b/source/renderers/opengl/test/src/opengl_error_test.cpp similarity index 95% rename from source/opengl_renderer/test/src/opengl_error_test.cpp rename to source/renderers/opengl/test/src/opengl_error_test.cpp index 277b3dba68..4b4bc2551d 100644 --- a/source/opengl_renderer/test/src/opengl_error_test.cpp +++ b/source/renderers/opengl/test/src/opengl_error_test.cpp @@ -1,6 +1,6 @@ // Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0) -#include "tactile/opengl_renderer/opengl_error.hpp" +#include "tactile/opengl/opengl_error.hpp" #include // to_underlying diff --git a/source/opengl_renderer/test/src/opengl_renderer_test.cpp b/source/renderers/opengl/test/src/opengl_renderer_test.cpp similarity index 88% rename from source/opengl_renderer/test/src/opengl_renderer_test.cpp rename to source/renderers/opengl/test/src/opengl_renderer_test.cpp index 5b4442aefd..3dfac91f5a 100644 --- a/source/opengl_renderer/test/src/opengl_renderer_test.cpp +++ b/source/renderers/opengl/test/src/opengl_renderer_test.cpp @@ -1,10 +1,10 @@ // Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0) -#include "tactile/opengl_renderer/opengl_renderer.hpp" +#include "tactile/opengl/opengl_renderer.hpp" #include -#include "tactile/opengl_renderer/opengl_renderer_plugin.hpp" +#include "tactile/opengl/opengl_renderer_plugin.hpp" #include "tactile/runtime/command_line_options.hpp" #include "tactile/runtime/runtime.hpp" diff --git a/source/opengl_renderer/test/src/opengl_texture_test.cpp b/source/renderers/opengl/test/src/opengl_texture_test.cpp similarity index 88% rename from source/opengl_renderer/test/src/opengl_texture_test.cpp rename to source/renderers/opengl/test/src/opengl_texture_test.cpp index aa42dece8e..552cbb1b83 100644 --- a/source/opengl_renderer/test/src/opengl_texture_test.cpp +++ b/source/renderers/opengl/test/src/opengl_texture_test.cpp @@ -1,10 +1,10 @@ // Copyright (C) 2024 Albin Johansson (GNU General Public License v3.0) -#include "tactile/opengl_renderer/opengl_texture.hpp" +#include "tactile/opengl/opengl_texture.hpp" #include -#include "tactile/opengl_renderer/opengl_renderer_plugin.hpp" +#include "tactile/opengl/opengl_renderer_plugin.hpp" #include "tactile/runtime/command_line_options.hpp" #include "tactile/runtime/runtime.hpp"