diff --git a/impls/CMakeLists.txt b/impls/CMakeLists.txt index f431d15..3341760 100644 --- a/impls/CMakeLists.txt +++ b/impls/CMakeLists.txt @@ -136,7 +136,7 @@ endfunction() function(Build) add_library( ${PROJECT_NAME} STATIC - TerreateCore.cpp + TerreateGraphics.cpp animation.cpp buffer.cpp event.cpp diff --git a/impls/TerreateCore.cpp b/impls/TerreateGraphics.cpp similarity index 82% rename from impls/TerreateCore.cpp rename to impls/TerreateGraphics.cpp index 0dbeefb..7034bfd 100644 --- a/impls/TerreateCore.cpp +++ b/impls/TerreateGraphics.cpp @@ -1,12 +1,12 @@ -#include "../includes/TerreateCore.hpp" +#include "../includes/TerreateGraphics.hpp" -namespace TerreateCore::Defines { +namespace TerreateGraphics::Defines { bool GLFW_INITIALIZED = false; bool GLAD_INITIALIZED = false; -} // namespace TerreateCore::Defines +} // namespace TerreateGraphics::Defines -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; Bool Clock::IsElapsed(Float const &time) { Float const now = glfwGetTime(); @@ -56,4 +56,4 @@ void Terminate() { glfwTerminate(); } -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core diff --git a/impls/animation.cpp b/impls/animation.cpp index 6ed0134..5a48417 100644 --- a/impls/animation.cpp +++ b/impls/animation.cpp @@ -1,7 +1,7 @@ #include "../includes/animation.hpp" -namespace TerreateCore::Animation { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Animation { +using namespace TerreateGraphics::Defines; using namespace TerreateMath::Utils; void Animation::AddKeyFrame(Transform const &keyFrame, Float const &time) { @@ -60,4 +60,4 @@ mat4 Animation::TransformToMatrix(Transform const &transform) { result = Translate(transform.position) * result; return result; } -} // namespace TerreateCore::Animation +} // namespace TerreateGraphics::Animation diff --git a/impls/buffer.cpp b/impls/buffer.cpp index dc2a1a6..d6cf7e0 100644 --- a/impls/buffer.cpp +++ b/impls/buffer.cpp @@ -1,7 +1,7 @@ #include "../includes/buffer.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; Attribute::Attribute(Ulong const &index, Ulong const &comps, Ulong const &stride, Ulong const &offset) @@ -166,4 +166,4 @@ void Buffer::DrawInstances(size_t const &numInstances, numInstances); glBindVertexArray(0); } -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core diff --git a/impls/event.cpp b/impls/event.cpp index 5050ec0..206401f 100644 --- a/impls/event.cpp +++ b/impls/event.cpp @@ -1,7 +1,7 @@ #include "../includes/event.hpp" -namespace TerreateCore::Event { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Event { +using namespace TerreateGraphics::Defines; EventSystem::EventSystem() { Logger::Trace(LOCATION(EventSystem)); @@ -62,4 +62,4 @@ void EventSystem::PublishEvent(Str const &event) { LockGuard lock(mQueueMutex); mEventQueue.push(event); } -} // namespace TerreateCore::Event +} // namespace TerreateGraphics::Event diff --git a/impls/font.cpp b/impls/font.cpp index 4dcc331..fa034de 100644 --- a/impls/font.cpp +++ b/impls/font.cpp @@ -1,7 +1,7 @@ #include "../includes/font.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; void Font::LoadDummyCharacter() { Logger::Trace(LOCATION(Font)); @@ -144,4 +144,4 @@ void Font::LoadText(WStr const &text) { this->LoadCharacter(character); } } -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core diff --git a/impls/job.cpp b/impls/job.cpp index e3f0c8a..1c88c1d 100644 --- a/impls/job.cpp +++ b/impls/job.cpp @@ -1,7 +1,7 @@ #include "../includes/job.hpp" -namespace TerreateCore::Job { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Job { +using namespace TerreateGraphics::Defines; void JobBase::Run() { try { @@ -185,4 +185,4 @@ void JobSystem::WaitForAll() { UniqueLock lock(mJobLock); mComplete.wait(false); } -} // namespace TerreateCore::Job +} // namespace TerreateGraphics::Job diff --git a/impls/logger.cpp b/impls/logger.cpp index 418a227..d02a710 100644 --- a/impls/logger.cpp +++ b/impls/logger.cpp @@ -1,7 +1,7 @@ #include "../includes/logger.hpp" -namespace TerreateCore::Logger { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Logger { +using namespace TerreateGraphics::Defines; void Critical(Str const &msg) { #if TC_LOG_CRITICAL @@ -50,4 +50,4 @@ void Trace(Str const &msg) { LoggerManager::Log(CONSTRUCT_LOG(TRACE_PREFIX, msg)); #endif } -} // namespace TerreateCore::Logger +} // namespace TerreateGraphics::Logger diff --git a/impls/model.cpp b/impls/model.cpp index e48f9bd..2e43bbc 100644 --- a/impls/model.cpp +++ b/impls/model.cpp @@ -1,9 +1,9 @@ #include "../includes/model.hpp" #include -namespace TerreateCore::Model { -using namespace TerreateCore::Defines; -using namespace TerreateCore::Core; +namespace TerreateGraphics::Model { +using namespace TerreateGraphics::Defines; +using namespace TerreateGraphics::Core; void MaterialData::SetColorProperty(ColorProperty const &property, vec4 const &value) { @@ -212,4 +212,4 @@ Model &Model::operator=(Model const &other) { mMeshes = other.mMeshes; return *this; } -} // namespace TerreateCore::Model +} // namespace TerreateGraphics::Model diff --git a/impls/object.cpp b/impls/object.cpp index 85ca1dc..5a30b34 100644 --- a/impls/object.cpp +++ b/impls/object.cpp @@ -2,8 +2,8 @@ #include -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; std::mt19937 UUID::sRandomEngine = std::mt19937(std::random_device()()); void UUID::GenerateUUID() { @@ -29,10 +29,10 @@ Str UUID::ToString() const { } return ss.str(); } -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core std::ostream &operator<<(std::ostream &stream, - TerreateCore::Core::UUID const &uuid) { + TerreateGraphics::Core::UUID const &uuid) { stream << uuid.ToString(); return stream; } diff --git a/impls/screen.cpp b/impls/screen.cpp index e764241..58a01b4 100644 --- a/impls/screen.cpp +++ b/impls/screen.cpp @@ -1,8 +1,8 @@ #include "../includes/screen.hpp" #include -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; void Screen::AddBuffer() { Logger::Trace(LOCATION(Screen)); @@ -129,4 +129,4 @@ void Screen::Clear() const { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); this->Unbind(); } -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core diff --git a/impls/shader.cpp b/impls/shader.cpp index f68d463..2c34e25 100644 --- a/impls/shader.cpp +++ b/impls/shader.cpp @@ -1,7 +1,7 @@ #include "../includes/shader.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; Str GetShaderLog(Uint const &id) { Int status; @@ -397,4 +397,4 @@ void Shader::Unuse() const { glUseProgram(0); } -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core diff --git a/impls/skeleton.cpp b/impls/skeleton.cpp index 5da8de6..c1c9d6b 100644 --- a/impls/skeleton.cpp +++ b/impls/skeleton.cpp @@ -1,7 +1,7 @@ #include "../includes/skeleton.hpp" -namespace TerreateCore::Animation { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Animation { +using namespace TerreateGraphics::Defines; using namespace TerreateMath::Utils; void Joint::Initialize(mat4 const &parentOffset) { @@ -39,4 +39,4 @@ void Skeleton::ApplyTransforms(Vec const &transforms) { mRoot->Transform(Eye(4), transforms, mJointTransformMatrices); } } -} // namespace TerreateCore::Animation +} // namespace TerreateGraphics::Animation diff --git a/impls/text.cpp b/impls/text.cpp index 9dde675..ebf5c89 100644 --- a/impls/text.cpp +++ b/impls/text.cpp @@ -1,7 +1,7 @@ #include "../includes/text.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; using namespace TerreateMath::Utils; void Text::LoadText() { @@ -115,4 +115,4 @@ void Text::Render(Float const &x, Float const &y, Float const &windowWidth, mShader.Unuse(); } } -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core diff --git a/impls/texture.cpp b/impls/texture.cpp index 2582f00..3313eaa 100644 --- a/impls/texture.cpp +++ b/impls/texture.cpp @@ -1,7 +1,7 @@ #include "../includes/texture.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; Texture::Texture() { Logger::Trace(LOCATION(Texture)); @@ -224,4 +224,4 @@ void CubeTexture::LoadDatas(Vec const &datas) { this->LoadData((CubeFace)((GLenum)CubeFace::RIGHT + i), datas[i]); } } -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core diff --git a/impls/window.cpp b/impls/window.cpp index b22c9d8..647eeb6 100644 --- a/impls/window.cpp +++ b/impls/window.cpp @@ -1,8 +1,8 @@ #include "../includes/window.hpp" #include "GLFW/glfw3.h" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; Icon::Icon() { Logger::Trace(LOCATION(Icon)); @@ -548,4 +548,4 @@ void Window::Frame() { mController->OnFrame(this); } -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core diff --git a/includes/TerreateCore.hpp b/includes/TerreateGraphics.hpp similarity index 73% rename from includes/TerreateCore.hpp rename to includes/TerreateGraphics.hpp index b70b0d4..1c7b7e9 100644 --- a/includes/TerreateCore.hpp +++ b/includes/TerreateGraphics.hpp @@ -1,5 +1,5 @@ -#ifndef __TC_TERREATECORE_HPP__ -#define __TC_TERREATECORE_HPP__ +#ifndef __TERREATE_CORE_TERREATECORE_HPP__ +#define __TERREATE_CORE_TERREATECORE_HPP__ #include "animation.hpp" #include "buffer.hpp" @@ -17,8 +17,8 @@ #include "texture.hpp" #include "window.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; class Clock : public Object { private: Float mLastTime = 0.0f; @@ -38,5 +38,5 @@ class Clock : public Object { void Initialize(Bool const &enableConsoleLog = false); void Terminate(); -} // namespace TerreateCore::Core -#endif // __TC_TERREATECORE_HPP__ +} // namespace TerreateGraphics::Core +#endif // __TERREATE_CORE_TERREATECORE_HPP__ diff --git a/includes/animation.hpp b/includes/animation.hpp index 7e151eb..4a049ba 100644 --- a/includes/animation.hpp +++ b/includes/animation.hpp @@ -1,11 +1,11 @@ -#ifndef __TC_ANIMATION_HPP__ -#define __TC_ANIMATION_HPP__ +#ifndef __TERREATE_CORE_ANIMATION_HPP__ +#define __TERREATE_CORE_ANIMATION_HPP__ #include "defines.hpp" #include "object.hpp" -namespace TerreateCore::Animation { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Animation { +using namespace TerreateGraphics::Defines; struct Transform { vec3 scale; @@ -71,6 +71,6 @@ class Animation : public Core::Object { */ static mat4 TransformToMatrix(Transform const &transform); }; -} // namespace TerreateCore::Animation +} // namespace TerreateGraphics::Animation -#endif // __TC_ANIMATION_HPP__ +#endif // __TERREATE_CORE_ANIMATION_HPP__ diff --git a/includes/bitflag.hpp b/includes/bitflag.hpp index 2464819..39d96f7 100644 --- a/includes/bitflag.hpp +++ b/includes/bitflag.hpp @@ -1,10 +1,10 @@ -#ifndef __TC_BITFLAG_HPP__ -#define __TC_BITFLAG_HPP__ +#ifndef __TERREATE_CORE_BITFLAG_HPP__ +#define __TERREATE_CORE_BITFLAG_HPP__ #include "defines.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; template class BitFlag { public: @@ -75,11 +75,11 @@ template BitFlag operator^(T const &lhs, BitFlag const &rhs); template BitFlag operator|(T const &lhs, T const &rhs); template BitFlag operator&(T const &lhs, T const &rhs); template BitFlag operator^(T const &lhs, T const &rhs); -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core // Implementation -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; template BitFlag &BitFlag::operator=(T const &flag) { mFlag = static_cast(flag); @@ -206,6 +206,6 @@ template BitFlag operator^(T const &lhs, T const &rhs) { result ^= rhs; return result; } -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core -#endif // __TC_BITFLAG_HPP__ +#endif // __TERREATE_CORE_BITFLAG_HPP__ diff --git a/includes/buffer.hpp b/includes/buffer.hpp index e5abbde..3a5f32c 100644 --- a/includes/buffer.hpp +++ b/includes/buffer.hpp @@ -1,12 +1,12 @@ -#ifndef __TC_BUFFER_HPP__ -#define __TC_BUFFER_HPP__ +#ifndef __TERREATE_CORE_BUFFER_HPP__ +#define __TERREATE_CORE_BUFFER_HPP__ #include "defines.hpp" #include "logger.hpp" #include "object.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; class Attribute { private: @@ -144,6 +144,6 @@ class Buffer final : public Object { operator Bool() const override { return mVAO != 0 && mVBO != 0 && mIBO != 0; } }; -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core -#endif // __TC_BUFFER_HPP__ +#endif // __TERREATE_CORE_BUFFER_HPP__ diff --git a/includes/defines.hpp b/includes/defines.hpp index e4109b1..1523551 100644 --- a/includes/defines.hpp +++ b/includes/defines.hpp @@ -1,5 +1,5 @@ -#ifndef __TC_DEFINES_HPP__ -#define __TC_DEFINES_HPP__ +#ifndef __TERREATE_CORE_DEFINES_HPP__ +#define __TERREATE_CORE_DEFINES_HPP__ #include #include @@ -42,7 +42,7 @@ #include GLAD_H #include GLFW_H -namespace TerreateCore::Defines { +namespace TerreateGraphics::Defines { // Core variables extern bool GLFW_INITIALIZED; extern bool GLAD_INITIALIZED; @@ -631,6 +631,6 @@ static unsigned COLOR_BUFFERS[] = { (GLenum)Attachment::COLOR26, (GLenum)Attachment::COLOR27, (GLenum)Attachment::COLOR28, (GLenum)Attachment::COLOR29, (GLenum)Attachment::COLOR30, (GLenum)Attachment::COLOR31}; -} // namespace TerreateCore::Defines +} // namespace TerreateGraphics::Defines -#endif // __TC_DEFINES_HPP__ +#endif // __TERREATE_CORE_DEFINES_HPP__ diff --git a/includes/event.hpp b/includes/event.hpp index c61e46a..47bdae7 100644 --- a/includes/event.hpp +++ b/includes/event.hpp @@ -1,13 +1,13 @@ -#ifndef __TC_EVENT_HPP__ -#define __TC_EVENT_HPP__ +#ifndef __TERREATE_CORE_EVENT_HPP__ +#define __TERREATE_CORE_EVENT_HPP__ #include "defines.hpp" #include "logger.hpp" #include "object.hpp" -namespace TerreateCore::Event { -using namespace TerreateCore::Core; -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Event { +using namespace TerreateGraphics::Core; +using namespace TerreateGraphics::Defines; using EventCallback = Function; @@ -51,6 +51,6 @@ class EventSystem : public Object { */ void PublishEvent(Str const &event); }; -} // namespace TerreateCore::Event +} // namespace TerreateGraphics::Event -#endif // __TC_EVENT_HPP__ +#endif // __TERREATE_CORE_EVENT_HPP__ diff --git a/includes/font.hpp b/includes/font.hpp index a9ae0ac..bdfcd9b 100644 --- a/includes/font.hpp +++ b/includes/font.hpp @@ -1,5 +1,5 @@ -#ifndef __TC_FONT_HPP__ -#define __TC_FONT_HPP__ +#ifndef __TERREATE_CORE_FONT_HPP__ +#define __TERREATE_CORE_FONT_HPP__ #include #include FT_FREETYPE_H @@ -9,8 +9,8 @@ #include "object.hpp" #include "texture.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; struct Character { Uint codepoint; @@ -86,6 +86,6 @@ class Font final : public Object { operator Bool() const override { return mFace != nullptr; } }; -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core -#endif // __TC_FONT_HPP__ +#endif // __TERREATE_CORE_FONT_HPP__ diff --git a/includes/job.hpp b/includes/job.hpp index 4bee740..96a7e8c 100644 --- a/includes/job.hpp +++ b/includes/job.hpp @@ -1,13 +1,13 @@ -#ifndef __TC_JOB_HPP__ -#define __TC_JOB_HPP__ +#ifndef __TERREATE_CORE_JOB_HPP__ +#define __TERREATE_CORE_JOB_HPP__ #include "defines.hpp" #include "logger.hpp" #include "object.hpp" -namespace TerreateCore::Job { -using namespace TerreateCore::Core; -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Job { +using namespace TerreateGraphics::Core; +using namespace TerreateGraphics::Defines; class JobBase : public Object { private: @@ -154,6 +154,6 @@ class JobSystem : public Object { virtual operator Bool() const override { return mComplete; } }; -} // namespace TerreateCore::Job +} // namespace TerreateGraphics::Job -#endif // __TC_JOB_HPP__ +#endif // __TERREATE_CORE_JOB_HPP__ diff --git a/includes/logger.hpp b/includes/logger.hpp index f69f124..a8ae75a 100644 --- a/includes/logger.hpp +++ b/includes/logger.hpp @@ -1,5 +1,5 @@ -#ifndef __TC_LOGGER_HPP__ -#define __TC_LOGGER_HPP__ +#ifndef __TERREATE_CORE_LOGGER_HPP__ +#define __TERREATE_CORE_LOGGER_HPP__ #include "defines.hpp" @@ -20,8 +20,8 @@ #define TC_DEBUG_LEVEL 1 << 5 #define TC_TRACE_LEVEL 1 << 6 -namespace TerreateCore::Logger { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Logger { +using namespace TerreateGraphics::Defines; static Str const CRITICAL_PREFIX = "[**CRITICAL**]"; static Str const ERROR_PREFIX = "[*ERROR*]"; @@ -36,6 +36,6 @@ void Warning(Str const &msg); void Info(Str const &msg); void Debug(Str const &msg); void Trace(Str const &msg); -} // namespace TerreateCore::Logger +} // namespace TerreateGraphics::Logger -#endif // __TC_LOGGER_HPP__ +#endif // __TERREATE_CORE_LOGGER_HPP__ diff --git a/includes/model.hpp b/includes/model.hpp index fd8f3a5..3c24a49 100644 --- a/includes/model.hpp +++ b/includes/model.hpp @@ -1,5 +1,5 @@ -#ifndef __TC_MODEL_HPP__ -#define __TC_MODEL_HPP__ +#ifndef __TERREATE_CORE_MODEL_HPP__ +#define __TERREATE_CORE_MODEL_HPP__ #include "bitflag.hpp" #include "buffer.hpp" @@ -7,8 +7,8 @@ #include "object.hpp" #include "texture.hpp" -namespace TerreateCore::Model { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Model { +using namespace TerreateGraphics::Defines; using TextureMap = Shared; @@ -418,6 +418,6 @@ class Model : public Core::Object { Model &operator=(Model const &other); }; -} // namespace TerreateCore::Model +} // namespace TerreateGraphics::Model -#endif // __TC_MODEL_HPP__ +#endif // __TERREATE_CORE_MODEL_HPP__ diff --git a/includes/object.hpp b/includes/object.hpp index eca6244..0ae7e40 100644 --- a/includes/object.hpp +++ b/includes/object.hpp @@ -1,13 +1,13 @@ -#ifndef __TC_OBJECT_HPP__ -#define __TC_OBJECT_HPP__ +#ifndef __TERREATE_CORE_OBJECT_HPP__ +#define __TERREATE_CORE_OBJECT_HPP__ #include #include #include "defines.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; class UUID { private: @@ -54,15 +54,15 @@ class Object { virtual operator Bool() const { return true; } }; -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core std::ostream &operator<<(std::ostream &stream, - const TerreateCore::Core::UUID &uuid); + const TerreateGraphics::Core::UUID &uuid); -template <> struct std::hash { - size_t operator()(TerreateCore::Core::UUID const &uuid) const { +template <> struct std::hash { + size_t operator()(TerreateGraphics::Core::UUID const &uuid) const { return std::hash()(uuid.ToString()); } }; -#endif // __TC_OBJECT_HPP__ +#endif // __TERREATE_CORE_OBJECT_HPP__ diff --git a/includes/screen.hpp b/includes/screen.hpp index 3e3e627..98e1500 100644 --- a/includes/screen.hpp +++ b/includes/screen.hpp @@ -1,13 +1,13 @@ -#ifndef __TC_SCREEN_HPP__ -#define __TC_SCREEN_HPP__ +#ifndef __TERREATE_CORE_SCREEN_HPP__ +#define __TERREATE_CORE_SCREEN_HPP__ #include "defines.hpp" #include "logger.hpp" #include "object.hpp" #include "texture.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; class Screen final : public Object { private: @@ -88,6 +88,6 @@ class Screen final : public Object { /* } */ operator Bool() const override { return mFrameBuffer != 0; } }; -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core -#endif // __TC_SCREEN_HPP__ +#endif // __TERREATE_CORE_SCREEN_HPP__ diff --git a/includes/shader.hpp b/includes/shader.hpp index eb999ce..dace81f 100644 --- a/includes/shader.hpp +++ b/includes/shader.hpp @@ -1,12 +1,12 @@ -#ifndef __TC_SHADER_HPP__ -#define __TC_SHADER_HPP__ +#ifndef __TERREATE_CORE_SHADER_HPP__ +#define __TERREATE_CORE_SHADER_HPP__ #include "defines.hpp" #include "logger.hpp" #include "object.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; struct ShaderOption { Bool blending = true; @@ -266,6 +266,6 @@ class Shader final : public Object { */ static Str LoadShaderSource(Str const &path); }; -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core -#endif // __TC_SHADER_HPP__ +#endif // __TERREATE_CORE_SHADER_HPP__ diff --git a/includes/skeleton.hpp b/includes/skeleton.hpp index f2c68a6..df06210 100644 --- a/includes/skeleton.hpp +++ b/includes/skeleton.hpp @@ -1,11 +1,11 @@ -#ifndef __TC_SKELETON_HPP__ -#define __TC_SKELETON_HPP__ +#ifndef __TERREATE_CORE_SKELETON_HPP__ +#define __TERREATE_CORE_SKELETON_HPP__ #include "defines.hpp" #include "object.hpp" -namespace TerreateCore::Animation { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Animation { +using namespace TerreateGraphics::Defines; class Joint : public Core::Object { private: @@ -149,6 +149,6 @@ class Skeleton : public Core::Object { */ void ApplyTransforms(Vec const &transforms); }; -} // namespace TerreateCore::Animation +} // namespace TerreateGraphics::Animation -#endif // __TC_SKELETON_HPP__ +#endif // __TERREATE_CORE_SKELETON_HPP__ diff --git a/includes/text.hpp b/includes/text.hpp index 80c5c6c..343c626 100644 --- a/includes/text.hpp +++ b/includes/text.hpp @@ -1,5 +1,5 @@ -#ifndef __TC_TEXT_HPP__ -#define __TC_TEXT_HPP__ +#ifndef __TERREATE_CORE_TEXT_HPP__ +#define __TERREATE_CORE_TEXT_HPP__ #include "defines.hpp" #include "font.hpp" @@ -8,8 +8,8 @@ #include "object.hpp" #include "shader.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; class Text : public Core::Object { private: @@ -39,6 +39,6 @@ class Text : public Core::Object { void Render(Float const &x, Float const &y, Float const &windowWidth, Float const &windowHeight); }; -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core -#endif // __TC_TEXT_HPP__ +#endif // __TERREATE_CORE_TEXT_HPP__ diff --git a/includes/texture.hpp b/includes/texture.hpp index f9d075e..9499522 100644 --- a/includes/texture.hpp +++ b/includes/texture.hpp @@ -1,5 +1,5 @@ -#ifndef __TC_TEXTURE_HPP__ -#define __TC_TEXTURE_HPP__ +#ifndef __TERREATE_CORE_TEXTURE_HPP__ +#define __TERREATE_CORE_TEXTURE_HPP__ #define STB_IMAGE_STATIC #define STB_IMAGE_IMPLEMENTATION @@ -9,8 +9,8 @@ #include "logger.hpp" #include "object.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; struct TextureData { Vec pixels; @@ -173,6 +173,6 @@ class CubeTexture final : public Object { operator Bool() const override { return mTexture != 0; } }; -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core -#endif // __TC_TEXTURE_HPP__ +#endif // __TERREATE_CORE_TEXTURE_HPP__ diff --git a/includes/window.hpp b/includes/window.hpp index a4b5045..127981d 100644 --- a/includes/window.hpp +++ b/includes/window.hpp @@ -1,12 +1,12 @@ -#ifndef __TC_WINDOW_HPP__ -#define __TC_WINDOW_HPP__ +#ifndef __TERREATE_CORE_WINDOW_HPP__ +#define __TERREATE_CORE_WINDOW_HPP__ #include "defines.hpp" #include "logger.hpp" #include "object.hpp" -namespace TerreateCore::Core { -using namespace TerreateCore::Defines; +namespace TerreateGraphics::Core { +using namespace TerreateGraphics::Defines; class Icon final : public Object { private: @@ -655,6 +655,6 @@ class Window final : public Object { operator Bool() const override { return !this->IsClosed(); } }; -} // namespace TerreateCore::Core +} // namespace TerreateGraphics::Core -#endif // __TC_WINDOW_HPP__ +#endif // __TERREATE_CORE_WINDOW_HPP__ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3399f0d..4b0554a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,9 +10,9 @@ function(SetLibs) endfunction() function(SetIncludes) - target_include_directories(${PROJECT_NAME} PUBLIC ../../includes) - target_include_directories(${PROJECT_NAME} PUBLIC ../../includes/deps) - target_include_directories(${PROJECT_NAME} PUBLIC ../../includes/math) + target_include_directories(${PROJECT_NAME} PUBLIC ../includes) + target_include_directories(${PROJECT_NAME} PUBLIC ../includes/deps) + target_include_directories(${PROJECT_NAME} PUBLIC ../includes/math) endfunction() function(Build) diff --git a/tests/TCTest.cpp b/tests/TCTest.cpp index 6c939da..c74a517 100644 --- a/tests/TCTest.cpp +++ b/tests/TCTest.cpp @@ -1,10 +1,10 @@ #define TC_LOG_LEVEL TC_DEBUG_LEVEL | TC_ERROR_LEVEL | TC_CRITICAL_LEVEL #define TC_THROW_LEVEL TC_DEBUG_LEVEL | TC_ERROR_LEVEL | TC_CRITICAL_LEVEL -#include "../../includes/TerreateCore.hpp" +#include "../../includes/TerreateGraphics.hpp" -using namespace TerreateCore::Core; -using namespace TerreateCore::Model; +using namespace TerreateGraphics::Core; +using namespace TerreateGraphics::Model; using namespace TerreateMath::Utils; class TestApp : public WindowController {