diff --git a/source/base/CMakeLists.txt b/source/base/CMakeLists.txt index 271f9ff1b8..e1fef070a9 100644 --- a/source/base/CMakeLists.txt +++ b/source/base/CMakeLists.txt @@ -25,6 +25,9 @@ target_sources(tactile-base "${PROJECT_SOURCE_DIR}/inc/tactile/base/container/vector.hpp" "${PROJECT_SOURCE_DIR}/inc/tactile/base/numeric/saturate_cast.hpp" "${PROJECT_SOURCE_DIR}/inc/tactile/base/numeric/sign_cast.hpp" + "${PROJECT_SOURCE_DIR}/inc/tactile/base/render/renderer.hpp" + "${PROJECT_SOURCE_DIR}/inc/tactile/base/render/texture.hpp" + "${PROJECT_SOURCE_DIR}/inc/tactile/base/render/window.hpp" "${PROJECT_SOURCE_DIR}/inc/tactile/base/util/chrono.hpp" "${PROJECT_SOURCE_DIR}/inc/tactile/base/util/concepts.hpp" "${PROJECT_SOURCE_DIR}/inc/tactile/base/util/hash.hpp" diff --git a/source/render/inc/tactile/render/renderer.hpp b/source/base/inc/tactile/base/render/renderer.hpp similarity index 100% rename from source/render/inc/tactile/render/renderer.hpp rename to source/base/inc/tactile/base/render/renderer.hpp diff --git a/source/render/inc/tactile/render/texture.hpp b/source/base/inc/tactile/base/render/texture.hpp similarity index 100% rename from source/render/inc/tactile/render/texture.hpp rename to source/base/inc/tactile/base/render/texture.hpp diff --git a/source/render/inc/tactile/render/window.hpp b/source/base/inc/tactile/base/render/window.hpp similarity index 100% rename from source/render/inc/tactile/render/window.hpp rename to source/base/inc/tactile/base/render/window.hpp diff --git a/source/core/CMakeLists.txt b/source/core/CMakeLists.txt index d88d963d6e..dd7a10a689 100644 --- a/source/core/CMakeLists.txt +++ b/source/core/CMakeLists.txt @@ -291,7 +291,6 @@ target_compile_definitions(tactile-core target_link_libraries(tactile-core PUBLIC tactile::base - tactile::render EnTT::EnTT imgui::imgui diff --git a/source/core/inc/tactile/core/platform/window.hpp b/source/core/inc/tactile/core/platform/window.hpp index 42395a43de..711ad637a5 100644 --- a/source/core/inc/tactile/core/platform/window.hpp +++ b/source/core/inc/tactile/core/platform/window.hpp @@ -6,7 +6,7 @@ #include "tactile/base/container/smart_ptr.hpp" #include "tactile/base/int.hpp" #include "tactile/base/prelude.hpp" -#include "tactile/render/window.hpp" +#include "tactile/base/render/window.hpp" struct SDL_Window; diff --git a/source/core/src/tactile/core/engine/engine.cpp b/source/core/src/tactile/core/engine/engine.cpp index c928599f43..022721b5b0 100644 --- a/source/core/src/tactile/core/engine/engine.cpp +++ b/source/core/src/tactile/core/engine/engine.cpp @@ -6,10 +6,10 @@ #include #include +#include "tactile/base/render/renderer.hpp" #include "tactile/core/debug/validation.hpp" #include "tactile/core/engine/engine_app.hpp" #include "tactile/core/log/logger.hpp" -#include "tactile/render/renderer.hpp" namespace tactile { diff --git a/source/core/src/tactile/core/tactile_editor.cpp b/source/core/src/tactile/core/tactile_editor.cpp index c2acd8ffcd..8b7a245334 100644 --- a/source/core/src/tactile/core/tactile_editor.cpp +++ b/source/core/src/tactile/core/tactile_editor.cpp @@ -4,12 +4,12 @@ #include // move +#include "tactile/base/render/renderer.hpp" +#include "tactile/base/render/window.hpp" #include "tactile/core/debug/validation.hpp" #include "tactile/core/event/view_events.hpp" #include "tactile/core/log/logger.hpp" #include "tactile/core/ui/i18n/language_parser.hpp" -#include "tactile/render/renderer.hpp" -#include "tactile/render/window.hpp" namespace tactile { diff --git a/source/core/src/tactile/core/ui/fonts.cpp b/source/core/src/tactile/core/ui/fonts.cpp index 1606272542..6dd715de1d 100644 --- a/source/core/src/tactile/core/ui/fonts.cpp +++ b/source/core/src/tactile/core/ui/fonts.cpp @@ -6,9 +6,9 @@ #include #include "tactile/base/container/array.hpp" +#include "tactile/base/render/renderer.hpp" #include "tactile/core/log/logger.hpp" #include "tactile/core/model/settings.hpp" -#include "tactile/render/renderer.hpp" namespace tactile::ui { inline namespace fonts { diff --git a/source/lib/CMakeLists.txt b/source/lib/CMakeLists.txt index 7e51883a0f..f84fd14cf0 100644 --- a/source/lib/CMakeLists.txt +++ b/source/lib/CMakeLists.txt @@ -28,7 +28,6 @@ target_link_libraries(libtactile PUBLIC tactile::proto tactile::base - tactile::render tactile::core tactile::opengl diff --git a/source/main/CMakeLists.txt b/source/main/CMakeLists.txt index 14edfa50fd..5fa1823a12 100644 --- a/source/main/CMakeLists.txt +++ b/source/main/CMakeLists.txt @@ -14,7 +14,6 @@ target_include_directories(tactile PUBLIC "${PROJECT_SOURCE_DIR}/inc") target_link_libraries(tactile PRIVATE tactile::base - tactile::render tactile::core SDL2::SDL2 SDL2::SDL2main diff --git a/source/main/src/tactile/main.cpp b/source/main/src/tactile/main.cpp index 134f448726..441afa7b03 100644 --- a/source/main/src/tactile/main.cpp +++ b/source/main/src/tactile/main.cpp @@ -10,6 +10,7 @@ #include "tactile/base/int.hpp" #include "tactile/base/prelude.hpp" +#include "tactile/base/render/renderer.hpp" #include "tactile/base/util/chrono.hpp" #include "tactile/core/debug/exception.hpp" #include "tactile/core/debug/terminate.hpp" @@ -27,7 +28,6 @@ #include "tactile/core/ui/common/style.hpp" #include "tactile/core/ui/imgui_context.hpp" #include "tactile/core/util/scope_guard.hpp" -#include "tactile/render/renderer.hpp" namespace tactile { diff --git a/source/opengl/CMakeLists.txt b/source/opengl/CMakeLists.txt index b5c2ca13a4..7572f907b3 100644 --- a/source/opengl/CMakeLists.txt +++ b/source/opengl/CMakeLists.txt @@ -31,7 +31,6 @@ target_include_directories(tactile-opengl target_link_libraries(tactile-opengl PUBLIC tactile::base - tactile::render PRIVATE OpenGL::GL diff --git a/source/opengl/inc/tactile/opengl/opengl_renderer.hpp b/source/opengl/inc/tactile/opengl/opengl_renderer.hpp index 064b79616b..6c96a5355a 100644 --- a/source/opengl/inc/tactile/opengl/opengl_renderer.hpp +++ b/source/opengl/inc/tactile/opengl/opengl_renderer.hpp @@ -5,8 +5,8 @@ #include "tactile/base/container/expected.hpp" #include "tactile/base/container/smart_ptr.hpp" #include "tactile/base/prelude.hpp" +#include "tactile/base/render/renderer.hpp" #include "tactile/opengl/api.hpp" -#include "tactile/render/renderer.hpp" namespace tactile { diff --git a/source/opengl/inc/tactile/opengl/opengl_texture.hpp b/source/opengl/inc/tactile/opengl/opengl_texture.hpp index 13c98a9971..6f29892ea9 100644 --- a/source/opengl/inc/tactile/opengl/opengl_texture.hpp +++ b/source/opengl/inc/tactile/opengl/opengl_texture.hpp @@ -5,15 +5,16 @@ #include "tactile/base/container/expected.hpp" #include "tactile/base/int.hpp" #include "tactile/base/prelude.hpp" +#include "tactile/base/render/texture.hpp" #include "tactile/opengl/api.hpp" -#include "tactile/render/texture.hpp" namespace tactile { /** * Represents an OpenGL texture. */ -class TACTILE_OPENGL_API OpenGLTexture final : public ITexture { +class TACTILE_OPENGL_API OpenGLTexture final : public ITexture +{ public: using id_type = uint; diff --git a/source/opengl/src/tactile/opengl/opengl_renderer.cpp b/source/opengl/src/tactile/opengl/opengl_renderer.cpp index 84db06333b..8f9402d3b3 100644 --- a/source/opengl/src/tactile/opengl/opengl_renderer.cpp +++ b/source/opengl/src/tactile/opengl/opengl_renderer.cpp @@ -16,10 +16,10 @@ #include "tactile/base/container/hash_map.hpp" #include "tactile/base/container/maybe.hpp" #include "tactile/base/container/smart_ptr.hpp" +#include "tactile/base/render/window.hpp" #include "tactile/opengl/opengl_error.hpp" #include "tactile/opengl/opengl_imgui.hpp" #include "tactile/opengl/opengl_texture.hpp" -#include "tactile/render/window.hpp" namespace tactile { diff --git a/source/render/CMakeLists.txt b/source/render/CMakeLists.txt deleted file mode 100644 index 1bc60cc390..0000000000 --- a/source/render/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -project(tactile-render CXX) - -add_library(tactile-render INTERFACE) -add_library(tactile::render ALIAS tactile-render) - -target_sources(tactile-render - INTERFACE - "${PROJECT_SOURCE_DIR}/inc/tactile/render/renderer.hpp" - "${PROJECT_SOURCE_DIR}/inc/tactile/render/texture.hpp" - "${PROJECT_SOURCE_DIR}/inc/tactile/render/window.hpp" - ) - -target_include_directories(tactile-render INTERFACE "${PROJECT_SOURCE_DIR}/inc") - -target_link_libraries(tactile-render INTERFACE tactile::base)