style: rename namespace Light to lt

This commit is contained in:
light7734 2025-07-11 00:05:48 +03:30
parent b572b61f4b
commit 30c9196af0
Signed by: light7734
GPG key ID: 8C30176798F1A6BA
128 changed files with 296 additions and 296 deletions

View file

@ -10,7 +10,7 @@ class TextureAsset;
} // namespace Assets } // namespace Assets
namespace Light { namespace lt {
class Shader; class Shader;
class Texture; class Texture;
@ -75,4 +75,4 @@ private:
std::unordered_map<std::string, Ref<Texture>> m_textures; std::unordered_map<std::string, Ref<Texture>> m_textures;
}; };
} // namespace Light } // namespace lt

View file

@ -6,7 +6,7 @@
#include <renderer/shader.hpp> #include <renderer/shader.hpp>
#include <renderer/texture.hpp> #include <renderer/texture.hpp>
namespace Light { namespace lt {
/* static */ auto AssetManager::instance() -> AssetManager & /* static */ auto AssetManager::instance() -> AssetManager &
{ {
@ -89,4 +89,4 @@ auto AssetManager::get_or_load_texture_asset(const std::filesystem::path &path)
} }
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
#include <memory> #include <memory>
namespace Light { namespace lt {
// Ref (Ref) // Ref (Ref)
template<typename t> template<typename t>
@ -36,7 +36,7 @@ constexpr std::unique_ptr<t> make_scope(t *rawPointer)
return std::unique_ptr<t>(rawPointer); return std::unique_ptr<t>(rawPointer);
} }
} // namespace Light } // namespace lt
#define lt_win(x) // windows #define lt_win(x) // windows
#define lt_lin(x) // linux #define lt_lin(x) // linux

View file

@ -2,7 +2,7 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
namespace Light { namespace lt {
class Camera class Camera
{ {
@ -31,4 +31,4 @@ private:
glm::vec4 m_background_color = glm::vec4(1.0f, 0.0f, 0.0f, 1.0f); glm::vec4 m_background_color = glm::vec4(1.0f, 0.0f, 0.0f, 1.0f);
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <camera/scene.hpp> #include <camera/scene.hpp>
#include <glm/glm.hpp> #include <glm/glm.hpp>
namespace Light { namespace lt {
struct CameraComponent struct CameraComponent
{ {
@ -27,4 +27,4 @@ struct CameraComponent
bool isPrimary {}; bool isPrimary {};
}; };
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
#include <camera/camera.hpp> #include <camera/camera.hpp>
namespace Light { namespace lt {
class SceneCamera: public Camera class SceneCamera: public Camera
{ {
@ -97,4 +97,4 @@ private:
void calculate_projection(); void calculate_projection();
}; };
} // namespace Light } // namespace lt

View file

@ -1,6 +1,6 @@
#include <camera/camera.hpp> #include <camera/camera.hpp>
namespace Light { namespace lt {
} }

View file

@ -1,7 +1,7 @@
#include <camera/scene.hpp> #include <camera/scene.hpp>
#include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/matrix_transform.hpp>
namespace Light { namespace lt {
SceneCamera::SceneCamera() SceneCamera::SceneCamera()
: m_orthographic_specification { .size = 1000.0f, .near_plane = -1.0f, .far_plane = 10000.0f } : m_orthographic_specification { .size = 1000.0f, .near_plane = -1.0f, .far_plane = 10000.0f }
@ -86,4 +86,4 @@ void SceneCamera::calculate_projection()
} }
} }
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
#include <logger/logger.hpp> #include <logger/logger.hpp>
namespace Light { namespace lt {
struct FailedAssertion: std::exception struct FailedAssertion: std::exception
{ {
@ -20,8 +20,8 @@ struct glException: std::exception
if (!(x)) \ if (!(x)) \
{ \ { \
log_crt(__VA_ARGS__); \ log_crt(__VA_ARGS__); \
throw ::Light::FailedAssertion(__FILE__, __LINE__); \ throw ::lt::FailedAssertion(__FILE__, __LINE__); \
} \ } \
} }
} // namespace Light } // namespace lt

View file

@ -4,7 +4,7 @@
#include <engine/layer/layer_stack.hpp> #include <engine/layer/layer_stack.hpp>
#include <input/input.hpp> #include <input/input.hpp>
namespace Light { namespace lt {
class Renderer; class Renderer;
class Window; class Window;
@ -56,4 +56,4 @@ private:
}; };
} // namespace Light } // namespace lt

View file

@ -5,12 +5,12 @@
#include <engine/engine.hpp> #include <engine/engine.hpp>
// to be defined in client project // to be defined in client project
extern auto Light::create_application() -> Light::Scope<Light::Application>; extern auto lt::create_application() -> lt::Scope<lt::Application>;
// #todo: use windows specific stuff // #todo: use windows specific stuff
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
auto application = Light::Scope<Light::Application> {}; auto application = lt::Scope<lt::Application> {};
int exitCode = 0; int exitCode = 0;
std::vector<std::string> args; std::vector<std::string> args;
@ -20,8 +20,8 @@ int main(int argc, char *argv[])
try try
{ {
application = Light::create_application(); application = lt::create_application();
lt_assert(application, "Light::Application is not intialized"); lt_assert(application, "lt::Application is not intialized");
for (int i = 0; i < argc; i++) for (int i = 0; i < argc; i++)
log_inf("argv[{}]: {}", i, argv[i]); log_inf("argv[{}]: {}", i, argv[i]);
@ -29,19 +29,19 @@ int main(int argc, char *argv[])
application->game_loop(); application->game_loop();
} }
// failed engine assertion // failed engine assertion
catch (Light::FailedAssertion) catch (lt::FailedAssertion)
{ {
log_crt("Terminating due to unhandled 'FailedEngineAssertion'"); log_crt("Terminating due to unhandled 'FailedEngineAssertion'");
exitCode = -1; exitCode = -1;
} }
// gl exception // gl exception
catch (Light::glException) catch (lt::glException)
{ {
log_crt("Terminating due to unhandled 'glException'"); log_crt("Terminating due to unhandled 'glException'");
exitCode = -3; exitCode = -3;
} }
// dx exception // dx exception
catch (Light::dxException) catch (lt::dxException)
{ {
log_crt("Terminating due to unhandled 'dxException'"); log_crt("Terminating due to unhandled 'dxException'");
exitCode = -4; exitCode = -4;
@ -56,29 +56,29 @@ int main(int argc, char *argv[])
#include <engine/engine.hpp> #include <engine/engine.hpp>
// to be defined in client project // to be defined in client project
extern auto Light::create_application() -> Light::Scope<Light::Application>; extern auto lt::create_application() -> lt::Scope<lt::Application>;
// #todo: use linux specific stuff // #todo: use linux specific stuff
int main(int /*argc*/, char * /*argv*/[]) int main(int /*argc*/, char * /*argv*/[])
{ {
auto application = Light::Scope<Light::Application> {}; auto application = lt::Scope<lt::Application> {};
int exitCode = 0; int exitCode = 0;
try try
{ {
application = Light::create_application(); application = lt::create_application();
lt_assert(application, "Light::Application is not intialized"); lt_assert(application, "lt::Application is not intialized");
application->game_loop(); application->game_loop();
} }
// failed engine assertion // failed engine assertion
catch (Light::FailedAssertion) catch (lt::FailedAssertion)
{ {
log_crt("Exitting due to unhandled 'FailedEngineAssertion'"); log_crt("Exitting due to unhandled 'FailedEngineAssertion'");
exitCode = -1; exitCode = -1;
} }
// gl exception // gl exception
catch (Light::glException) catch (lt::glException)
{ {
log_crt("main: exitting due to unhandled 'glException'"); log_crt("main: exitting due to unhandled 'glException'");
exitCode = -3; exitCode = -3;

View file

@ -2,7 +2,7 @@
#include <random> #include <random>
namespace Light { namespace lt {
class UUID class UUID
{ {
@ -22,14 +22,14 @@ private:
uint64_t m_uuid; uint64_t m_uuid;
}; };
} // namespace Light } // namespace lt
namespace std { namespace std {
template<> template<>
struct hash<Light::UUID> struct hash<lt::UUID>
{ {
std::size_t operator()(const Light::UUID &uuid) const std::size_t operator()(const lt::UUID &uuid) const
{ {
return hash<uint64_t>()(static_cast<uint64_t>(uuid)); return hash<uint64_t>()(static_cast<uint64_t>(uuid));
} }

View file

@ -4,7 +4,7 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <renderer/graphics_context.hpp> #include <renderer/graphics_context.hpp>
namespace Light { namespace lt {
class Event; class Event;
@ -93,4 +93,4 @@ protected:
bool b_Closed { false }; bool b_Closed { false };
}; };
} // namespace Light } // namespace lt

View file

@ -9,7 +9,7 @@
if (FAILED(hr##line = x)) \ if (FAILED(hr##line = x)) \
throw dxException(hr##line, __FILE__, line) throw dxException(hr##line, __FILE__, line)
namespace Light { namespace lt {
#ifdef LIGHT_PLATFORM_WINDOWS #ifdef LIGHT_PLATFORM_WINDOWS
// DirectX // DirectX
@ -19,4 +19,4 @@ struct dxException: std::exception
}; };
#endif #endif
} // namespace Light } // namespace lt

View file

@ -4,7 +4,7 @@
#include <fstream> #include <fstream>
namespace Light { namespace lt {
struct ScopeProfileResult struct ScopeProfileResult
{ {
@ -63,7 +63,7 @@ private:
std::chrono::time_point<std::chrono::steady_clock> m_start; std::chrono::time_point<std::chrono::steady_clock> m_start;
}; };
} // namespace Light } // namespace lt
/* scope */ /* scope */
#define lt_profile_scope(name) lt_profile_scope_no_redifinition(name, __LINE__) #define lt_profile_scope(name) lt_profile_scope_no_redifinition(name, __LINE__)
@ -74,5 +74,5 @@ private:
#define LT_PROFILE_FUNCTION lt_profile_scope(__FUNCSIG__) #define LT_PROFILE_FUNCTION lt_profile_scope(__FUNCSIG__)
/* session */ /* session */
#define lt_profile_begin_session(outputPath) ::Light::Instrumentor::begin_session(outputPath) #define lt_profile_begin_session(outputPath) ::lt::Instrumentor::begin_session(outputPath)
#define lt_profile_end_session() ::Light::Instrumentor::end_session() #define lt_profile_end_session() ::lt::Instrumentor::end_session()

View file

@ -2,7 +2,7 @@
namespace Light { namespace lt {
class Event; class Event;
@ -115,4 +115,4 @@ protected:
} }
}; };
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
namespace Light { namespace lt {
class Layer; class Layer;
class Event; class Event;
@ -67,4 +67,4 @@ private:
void detach_layer_impl(const Ref<Layer> &layer); void detach_layer_impl(const Ref<Layer> &layer);
}; };
} // namespace Light } // namespace lt

View file

@ -4,7 +4,7 @@
struct GLFWwindow; struct GLFWwindow;
namespace Light { namespace lt {
class Event; class Event;
class WindowResizedEvent; class WindowResizedEvent;
@ -46,4 +46,4 @@ private:
void bind_glfw_events(); void bind_glfw_events();
}; };
} // namespace Light } // namespace lt

View file

@ -14,7 +14,7 @@ extern "C"
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; // AMD __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; // AMD
} }
namespace Light { namespace lt {
Scope<Window> Window::create(std::function<void(Event &)> callback) Scope<Window> Window::create(std::function<void(Event &)> callback)
{ {
@ -241,4 +241,4 @@ void wWindow::bind_glfw_events()
}); });
//============================== WINDOW_EVENTS ==============================// } //============================== WINDOW_EVENTS ==============================// }
} }
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
struct GLFWwindow; struct GLFWwindow;
namespace Light { namespace lt {
class Event; class Event;
class WindowResizedEvent; class WindowResizedEvent;
@ -42,4 +42,4 @@ private:
void bind_glfw_events(); void bind_glfw_events();
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <engine/scene/components/scriptable_entity.hpp> #include <engine/scene/components/scriptable_entity.hpp>
namespace Light { namespace lt {
struct NativeScriptComponent struct NativeScriptComponent
{ {
@ -26,4 +26,4 @@ struct NativeScriptComponent
NativeScript *instance; NativeScript *instance;
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <engine/scene/entity.hpp> #include <engine/scene/entity.hpp>
namespace Light { namespace lt {
class NativeScript class NativeScript
{ {
@ -44,4 +44,4 @@ private:
unsigned int m_unique_identifier = 0; // :#todo unsigned int m_unique_identifier = 0; // :#todo
}; };
} // namespace Light } // namespace lt

View file

@ -4,7 +4,7 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <utility> #include <utility>
namespace Light { namespace lt {
class Texture; class Texture;
@ -33,4 +33,4 @@ struct SpriteRendererComponent
glm::vec4 tint {}; glm::vec4 tint {};
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <utility> #include <utility>
namespace Light { namespace lt {
struct TagComponent struct TagComponent
{ {
@ -28,4 +28,4 @@ struct TagComponent
std::string tag = "Unnamed"; std::string tag = "Unnamed";
}; };
} // namespace Light } // namespace lt

View file

@ -7,7 +7,7 @@
#include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform.hpp> #include <glm/gtx/transform.hpp>
namespace Light { namespace lt {
struct TransformComponent struct TransformComponent
{ {
@ -43,4 +43,4 @@ struct TransformComponent
glm::vec3 rotation; glm::vec3 rotation;
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <engine/core/uuid.hpp> #include <engine/core/uuid.hpp>
namespace Light { namespace lt {
struct UUIDComponent struct UUIDComponent
{ {
@ -16,4 +16,4 @@ struct UUIDComponent
UUID uuid; UUID uuid;
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <engine/scene/scene.hpp> #include <engine/scene/scene.hpp>
#include <entt/entt.hpp> #include <entt/entt.hpp>
namespace Light { namespace lt {
class Entity class Entity
{ {
@ -57,4 +57,4 @@ private:
Scene *m_scene; Scene *m_scene;
}; };
} // namespace Light } // namespace lt

View file

@ -6,7 +6,7 @@
#include <entt/entt.hpp> #include <entt/entt.hpp>
#include <glm/glm.hpp> #include <glm/glm.hpp>
namespace Light { namespace lt {
class Entity; class Entity;
class Framebuffer; class Framebuffer;
@ -43,4 +43,4 @@ private:
) -> Entity; ) -> Entity;
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <chrono> #include <chrono>
namespace Light { namespace lt {
class Timer class Timer
{ {
@ -29,4 +29,4 @@ private:
std::chrono::time_point<std::chrono::steady_clock> m_start; std::chrono::time_point<std::chrono::steady_clock> m_start;
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <engine/scene/scene.hpp> #include <engine/scene/scene.hpp>
#include <yaml-cpp/yaml.h> #include <yaml-cpp/yaml.h>
namespace Light { namespace lt {
class SceneSerializer class SceneSerializer
{ {
@ -27,4 +27,4 @@ private:
}; };
} // namespace Light } // namespace lt

View file

@ -15,7 +15,7 @@
#include <renderer/renderer.hpp> #include <renderer/renderer.hpp>
#include <ui/ui.hpp> #include <ui/ui.hpp>
namespace Light { namespace lt {
Application *Application::s_instance = nullptr; Application *Application::s_instance = nullptr;
@ -26,7 +26,7 @@ Application::Application(): m_window(nullptr)
log_debug_data(); log_debug_data();
Light::Instrumentor::begin_session("data/logs/profile_startup.json"); lt::Instrumentor::begin_session("data/logs/profile_startup.json");
m_window = Window::create([this](auto &&PH1) { on_event(std::forward<decltype(PH1)>(PH1)); }); m_window = Window::create([this](auto &&PH1) { on_event(std::forward<decltype(PH1)>(PH1)); });
@ -194,4 +194,4 @@ void Application::log_debug_data()
log_inf(" CWD: {}", std::filesystem::current_path().generic_string()); log_inf(" CWD: {}", std::filesystem::current_path().generic_string());
} }
} // namespace Light } // namespace lt

View file

@ -1,6 +1,6 @@
#include <engine/core/uuid.hpp> #include <engine/core/uuid.hpp>
namespace Light { namespace lt {
auto UUID::s_engine = std::mt19937_64(std::random_device()()); auto UUID::s_engine = std::mt19937_64(std::random_device()());
auto UUID::s_distribution = std::uniform_int_distribution<uint64_t> {}; auto UUID::s_distribution = std::uniform_int_distribution<uint64_t> {};
@ -9,4 +9,4 @@ UUID::UUID(uint64_t uuid /* = -1 */): m_uuid(uuid == -1 ? s_distribution(s_engin
{ {
} }
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <Windows.h> #include <Windows.h>
#endif #endif
namespace Light { namespace lt {
FailedAssertion::FailedAssertion(const char *file, int line) FailedAssertion::FailedAssertion(const char *file, int line)
{ {
@ -55,4 +55,4 @@ dxException::dxException(long hr, const char *file, int line)
} }
#endif #endif
} // namespace Light } // namespace lt

View file

@ -1,6 +1,6 @@
#include <engine/debug/instrumentor.hpp> #include <engine/debug/instrumentor.hpp>
namespace Light { namespace lt {
void Instrumentor::begin_session_impl(const std::string &outputPath) void Instrumentor::begin_session_impl(const std::string &outputPath)
{ {
@ -67,4 +67,4 @@ InstrumentorTimer::~InstrumentorTimer()
Instrumentor::submit_scope_profile(m_result); Instrumentor::submit_scope_profile(m_result);
} }
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <input/events/mouse.hpp> #include <input/events/mouse.hpp>
#include <input/events/window.hpp> #include <input/events/window.hpp>
namespace Light { namespace lt {
Layer::Layer(std::string name): m_layer_name(std::move(name)) Layer::Layer(std::string name): m_layer_name(std::move(name))
{ {
@ -44,4 +44,4 @@ auto Layer::on_event(const Event &event) -> bool
} }
} }
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <input/events/mouse.hpp> #include <input/events/mouse.hpp>
#include <input/events/window.hpp> #include <input/events/window.hpp>
namespace Light { namespace lt {
void LayerStack::attach_layer_impl(Ref<Layer> layer) void LayerStack::attach_layer_impl(Ref<Layer> layer)
{ {
@ -19,4 +19,4 @@ void LayerStack::detach_layer_impl(const Ref<Layer> &layer)
m_layers.erase(std::find(m_layers.begin(), m_layers.end(), layer)); m_layers.erase(std::find(m_layers.begin(), m_layers.end(), layer));
} }
} // namespace Light } // namespace lt

View file

@ -7,7 +7,7 @@
#include <input/events/window.hpp> #include <input/events/window.hpp>
#include <renderer/graphics_context.hpp> #include <renderer/graphics_context.hpp>
namespace Light { namespace lt {
auto Window::create(const std::function<void(Event &)> &callback) -> Scope<Window> auto Window::create(const std::function<void(Event &)> &callback) -> Scope<Window>
{ {
@ -222,4 +222,4 @@ void lWindow::bind_glfw_events()
}); });
} }
} // namespace Light } // namespace lt

View file

@ -14,7 +14,7 @@ extern "C"
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; // AMD __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; // AMD
} }
namespace Light { namespace lt {
Scope<Window> Window::create(std::function<void(Event &)> callback) Scope<Window> Window::create(std::function<void(Event &)> callback)
{ {
@ -241,4 +241,4 @@ void wWindow::bind_glfw_events()
}); });
//============================== WINDOW_EVENTS ==============================// } //============================== WINDOW_EVENTS ==============================// }
} }
} // namespace Light } // namespace lt

View file

@ -1,10 +1,10 @@
#include <engine/scene/entity.hpp> #include <engine/scene/entity.hpp>
#include <engine/scene/scene.hpp> #include <engine/scene/scene.hpp>
namespace Light { namespace lt {
Entity::Entity(entt::entity handle, Scene *scene): m_handle(handle), m_scene(scene) Entity::Entity(entt::entity handle, Scene *scene): m_handle(handle), m_scene(scene)
{ {
} }
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <renderer/renderer.hpp> #include <renderer/renderer.hpp>
namespace Light { namespace lt {
void Scene::on_create() void Scene::on_create()
{ {
@ -108,4 +108,4 @@ auto Scene::create_entity_with_uuid(
return entity; return entity;
} }
} // namespace Light } // namespace lt

View file

@ -1,9 +1,9 @@
#include <engine/time/timer.hpp> #include <engine/time/timer.hpp>
namespace Light { namespace lt {
Timer::Timer(): m_start(std::chrono::steady_clock::now()) Timer::Timer(): m_start(std::chrono::steady_clock::now())
{ {
} }
} // namespace Light } // namespace lt

View file

@ -61,7 +61,7 @@ struct convert<glm::vec4>
}; };
} // namespace YAML } // namespace YAML
namespace Light { namespace lt {
auto operator<<(YAML::Emitter &out, const glm::vec3 &v) -> YAML::Emitter & auto operator<<(YAML::Emitter &out, const glm::vec3 &v) -> YAML::Emitter &
{ {
@ -319,4 +319,4 @@ void SceneSerializer::serialize_entity(YAML::Emitter &out, Entity entity)
out << YAML::EndMap; // entity out << YAML::EndMap; // entity
} }
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <input/events/event.hpp> #include <input/events/event.hpp>
#include <sstream> #include <sstream>
namespace Light { namespace lt {
class SetCharEvent: public Event class SetCharEvent: public Event
{ {
@ -32,4 +32,4 @@ private:
const unsigned int m_character; const unsigned int m_character;
}; };
} // namespace Light } // namespace lt

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
namespace Light { namespace lt {
enum class EventType enum class EventType
{ {
@ -37,7 +37,7 @@ enum EventCategory
#define event_type(type) \ #define event_type(type) \
EventType get_event_type() const override \ EventType get_event_type() const override \
{ \ { \
return ::Light::EventType::type; \ return ::lt::EventType::type; \
} }
#define event_category(eCategory) \ #define event_category(eCategory) \
@ -65,4 +65,4 @@ public:
} }
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <input/events/event.hpp> #include <input/events/event.hpp>
#include <sstream> #include <sstream>
namespace Light { namespace lt {
class KeyPressedEvent: public Event class KeyPressedEvent: public Event
{ {
@ -86,4 +86,4 @@ private:
const int m_key; const int m_key;
}; };
} // namespace Light } // namespace lt

View file

@ -4,7 +4,7 @@
#include <input/events/event.hpp> #include <input/events/event.hpp>
#include <sstream> #include <sstream>
namespace Light { namespace lt {
class MouseMovedEvent: public Event class MouseMovedEvent: public Event
{ {
@ -124,4 +124,4 @@ private:
const int m_button; const int m_button;
}; };
} // namespace Light } // namespace lt

View file

@ -4,7 +4,7 @@
#include <input/events/event.hpp> #include <input/events/event.hpp>
#include <sstream> #include <sstream>
namespace Light { namespace lt {
class WindowClosedEvent: public Event class WindowClosedEvent: public Event
{ {
@ -100,4 +100,4 @@ public:
event_category(WindowEventCategory); event_category(WindowEventCategory);
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <array> #include <array>
#include <glm/glm.hpp> #include <glm/glm.hpp>
namespace Light { namespace lt {
class Event; class Event;
@ -77,4 +77,4 @@ private:
bool m_game_events { true }; bool m_game_events { true };
}; };
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
#include <cstdint> #include <cstdint>
namespace Light::Key { namespace lt::Key {
enum : uint16_t enum : uint16_t
{ {

View file

@ -2,7 +2,7 @@
#include <cstdint> #include <cstdint>
namespace Light::Mouse { namespace lt::Mouse {
enum : uint8_t enum : uint8_t
{ {

View file

@ -7,7 +7,7 @@
#include <input/key_codes.hpp> #include <input/key_codes.hpp>
#include <logger/logger.hpp> #include <logger/logger.hpp>
namespace Light { namespace lt {
Input::Input(): m_mouse_position {}, m_mouse_delta {} Input::Input(): m_mouse_position {}, m_mouse_delta {}
@ -161,4 +161,4 @@ void Input::on_event(const Event &inputEvent)
} }
} }
} // namespace Light } // namespace lt

View file

@ -6,7 +6,7 @@
#include <mirror/panel/properties.hpp> #include <mirror/panel/properties.hpp>
#include <mirror/panel/scene_hierarchy.hpp> #include <mirror/panel/scene_hierarchy.hpp>
namespace Light { namespace lt {
class EditorLayer: public Layer class EditorLayer: public Layer
{ {
@ -51,4 +51,4 @@ private:
ImVec2 m_available_content_region_prev; ImVec2 m_available_content_region_prev;
}; };
} // namespace Light } // namespace lt

View file

@ -4,7 +4,7 @@
#include <filesystem> #include <filesystem>
#include <mirror/panel/panel.hpp> #include <mirror/panel/panel.hpp>
namespace Light { namespace lt {
class AssetBrowserPanel: public Panel class AssetBrowserPanel: public Panel
{ {
@ -42,4 +42,4 @@ private:
Ref<Texture> m_text_texture; Ref<Texture> m_text_texture;
}; };
} // namespace Light } // namespace lt

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
namespace Light { namespace lt {
class Panel class Panel
{ {
@ -10,4 +10,4 @@ public:
virtual ~Panel() = default; virtual ~Panel() = default;
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <engine/scene/entity.hpp> #include <engine/scene/entity.hpp>
#include <mirror/panel/panel.hpp> #include <mirror/panel/panel.hpp>
namespace Light { namespace lt {
class PropertiesPanel: public Panel class PropertiesPanel: public Panel
{ {
@ -29,4 +29,4 @@ private:
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <engine/scene/scene.hpp> #include <engine/scene/scene.hpp>
#include <mirror/panel/panel.hpp> #include <mirror/panel/panel.hpp>
namespace Light { namespace lt {
class PropertiesPanel; class PropertiesPanel;
@ -30,4 +30,4 @@ private:
Entity m_selection_context; Entity m_selection_context;
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <mirror/editor_layer.hpp> #include <mirror/editor_layer.hpp>
#include <ui/ui.hpp> #include <ui/ui.hpp>
namespace Light { namespace lt {
EditorLayer::EditorLayer(const std::string &name) EditorLayer::EditorLayer(const std::string &name)
: Layer(name) : Layer(name)
@ -148,4 +148,4 @@ void EditorLayer::on_user_interface_update()
UserInterface::dockspace_end(); UserInterface::dockspace_end();
} }
} // namespace Light } // namespace lt

View file

@ -6,7 +6,7 @@
// //
#include <engine/engine.hpp> #include <engine/engine.hpp>
namespace Light { namespace lt {
class Mirror: public Application class Mirror: public Application
{ {
@ -32,4 +32,4 @@ auto create_application() -> Scope<Application>
return create_scope<Mirror>(); return create_scope<Mirror>();
} }
} // namespace Light } // namespace lt

View file

@ -4,7 +4,7 @@
#include <imgui.h> #include <imgui.h>
#include <mirror/panel/asset_browser.hpp> #include <mirror/panel/asset_browser.hpp>
namespace Light { namespace lt {
AssetBrowserPanel::AssetBrowserPanel(Ref<Scene> active_scene) AssetBrowserPanel::AssetBrowserPanel(Ref<Scene> active_scene)
: m_current_directory("./data/assets") : m_current_directory("./data/assets")
@ -162,4 +162,4 @@ void AssetBrowserPanel::on_user_interface_update()
ImGui::End(); ImGui::End();
} }
} // namespace Light } // namespace lt

View file

@ -7,7 +7,7 @@
#include <imgui_internal.h> #include <imgui_internal.h>
#include <mirror/panel/properties.hpp> #include <mirror/panel/properties.hpp>
namespace Light { namespace lt {
void PropertiesPanel::on_user_interface_update() void PropertiesPanel::on_user_interface_update()
{ {
@ -48,7 +48,7 @@ void PropertiesPanel::on_user_interface_update()
)) ))
{ {
m_entity_context.add_component<SpriteRendererComponent>( m_entity_context.add_component<SpriteRendererComponent>(
Light::AssetManager::get_texture("awesomeface") lt::AssetManager::get_texture("awesomeface")
); );
} }
@ -310,4 +310,4 @@ void PropertiesPanel::draw_component(
} }
} }
} // namespace Light } // namespace lt

View file

@ -4,7 +4,7 @@
#include <mirror/panel/properties.hpp> #include <mirror/panel/properties.hpp>
#include <mirror/panel/scene_hierarchy.hpp> #include <mirror/panel/scene_hierarchy.hpp>
namespace Light { namespace lt {
SceneHierarchyPanel::SceneHierarchyPanel(): m_context(nullptr), m_properties_panel_context(nullptr) SceneHierarchyPanel::SceneHierarchyPanel(): m_context(nullptr), m_properties_panel_context(nullptr)
{ {
@ -76,4 +76,4 @@ void SceneHierarchyPanel::draw_node(Entity entity, const std::string &label)
} }
} }
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
namespace Light { namespace lt {
class SharedContext; class SharedContext;
@ -48,4 +48,4 @@ protected:
Blender() = default; Blender() = default;
}; };
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
namespace Light { namespace lt {
class SharedContext; class SharedContext;
@ -71,4 +71,4 @@ protected:
IndexBuffer() = default; IndexBuffer() = default;
}; };
} // namespace Light } // namespace lt

View file

@ -4,7 +4,7 @@
#include <renderer/blender.hpp> #include <renderer/blender.hpp>
#include <wrl.h> #include <wrl.h>
namespace Light { namespace lt {
class dxSharedContext; class dxSharedContext;
@ -27,4 +27,4 @@ private:
D3D11_BLEND_DESC m_desc; D3D11_BLEND_DESC m_desc;
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <renderer/buffers.hpp> #include <renderer/buffers.hpp>
#include <wrl.h> #include <wrl.h>
namespace Light { namespace lt {
class dxSharedContext; class dxSharedContext;
@ -81,4 +81,4 @@ private:
Microsoft::WRL::ComPtr<ID3D11Buffer> m_buffer; Microsoft::WRL::ComPtr<ID3D11Buffer> m_buffer;
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <renderer/framebuffer.hpp> #include <renderer/framebuffer.hpp>
#include <wrl.h> #include <wrl.h>
namespace Light { namespace lt {
class dxSharedContext; class dxSharedContext;
@ -44,4 +44,4 @@ private:
Microsoft::WRL::ComPtr<ID3D11DepthStencilView> m_depth_stencil_view; Microsoft::WRL::ComPtr<ID3D11DepthStencilView> m_depth_stencil_view;
}; };
} // namespace Light } // namespace lt

View file

@ -7,7 +7,7 @@
struct GLFWwindow; struct GLFWwindow;
namespace Light { namespace lt {
class dxGraphicsContext: public GraphicsContext class dxGraphicsContext: public GraphicsContext
{ {
@ -28,4 +28,4 @@ private:
void setup_debug_interface(); void setup_debug_interface();
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <renderer/render_command.hpp> #include <renderer/render_command.hpp>
#include <wrl.h> #include <wrl.h>
namespace Light { namespace lt {
class dxSharedContext; class dxSharedContext;
@ -37,4 +37,4 @@ private:
void set_resolution(unsigned int width, unsigned int height); void set_resolution(unsigned int width, unsigned int height);
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <renderer/shader.hpp> #include <renderer/shader.hpp>
#include <wrl.h> #include <wrl.h>
namespace Light { namespace lt {
class dxSharedContext; class dxSharedContext;
@ -39,4 +39,4 @@ private:
Microsoft::WRL::ComPtr<ID3DBlob> m_vertex_blob; Microsoft::WRL::ComPtr<ID3DBlob> m_vertex_blob;
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <renderer/shared_context.hpp> #include <renderer/shared_context.hpp>
#include <wrl.h> #include <wrl.h>
namespace Light { namespace lt {
class dxSharedContext: public SharedContext class dxSharedContext: public SharedContext
{ {
@ -60,4 +60,4 @@ private:
Microsoft::WRL::ComPtr<ID3D11RenderTargetView> m_render_target_view = nullptr; Microsoft::WRL::ComPtr<ID3D11RenderTargetView> m_render_target_view = nullptr;
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <renderer/texture.hpp> #include <renderer/texture.hpp>
#include <wrl.h> #include <wrl.h>
namespace Light { namespace lt {
class dxSharedContext; class dxSharedContext;
@ -33,4 +33,4 @@ private:
Microsoft::WRL::ComPtr<ID3D11SamplerState> m_sampler_state; Microsoft::WRL::ComPtr<ID3D11SamplerState> m_sampler_state;
}; };
} // namespace Light } // namespace lt

View file

@ -6,7 +6,7 @@
struct GLFWwindow; struct GLFWwindow;
namespace Light { namespace lt {
class dxSharedContext; class dxSharedContext;
@ -27,4 +27,4 @@ public:
void log_debug_data() override; void log_debug_data() override;
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
#include <renderer/vertex_layout.hpp> #include <renderer/vertex_layout.hpp>
#include <wrl.h> #include <wrl.h>
namespace Light { namespace lt {
class Shader; class Shader;
class dxSharedContext; class dxSharedContext;
@ -33,4 +33,4 @@ private:
Microsoft::WRL::ComPtr<ID3D11InputLayout> m_input_layout; Microsoft::WRL::ComPtr<ID3D11InputLayout> m_input_layout;
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
namespace Light { namespace lt {
class SharedContext; class SharedContext;
@ -37,4 +37,4 @@ protected:
Framebuffer() = default; Framebuffer() = default;
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <renderer/blender.hpp> #include <renderer/blender.hpp>
namespace Light { namespace lt {
class glBlender: public Blender class glBlender: public Blender
{ {
@ -19,4 +19,4 @@ private:
std::unordered_map<BlendFactor, unsigned int> m_factor_map; std::unordered_map<BlendFactor, unsigned int> m_factor_map;
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <renderer/buffers.hpp> #include <renderer/buffers.hpp>
namespace Light { namespace lt {
class glConstantBuffer: public ConstantBuffer class glConstantBuffer: public ConstantBuffer
{ {
@ -58,4 +58,4 @@ private:
unsigned int m_buffer_id; unsigned int m_buffer_id;
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <renderer/framebuffer.hpp> #include <renderer/framebuffer.hpp>
namespace Light { namespace lt {
class glFramebuffer: public Framebuffer class glFramebuffer: public Framebuffer
{ {
@ -33,4 +33,4 @@ private:
unsigned int m_depth_stencil_attachment_id; unsigned int m_depth_stencil_attachment_id;
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
struct GLFWwindow; struct GLFWwindow;
namespace Light { namespace lt {
class glGraphicsContext: public GraphicsContext class glGraphicsContext: public GraphicsContext
{ {
@ -20,4 +20,4 @@ private:
void set_debug_message_callback(); void set_debug_message_callback();
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
struct GLFWwindow; struct GLFWwindow;
namespace Light { namespace lt {
class glRenderCommand: public RenderCommand class glRenderCommand: public RenderCommand
{ {
@ -29,4 +29,4 @@ private:
GLFWwindow *m_window_handle; GLFWwindow *m_window_handle;
}; };
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
#include <renderer/shader.hpp> #include <renderer/shader.hpp>
namespace Light { namespace lt {
class glShader: public Shader class glShader: public Shader
{ {
@ -21,4 +21,4 @@ private:
unsigned int m_shader_id { 0u }; unsigned int m_shader_id { 0u };
}; };
} // namespace Light } // namespace lt

View file

@ -3,10 +3,10 @@
#include <renderer/shared_context.hpp> #include <renderer/shared_context.hpp>
namespace Light { namespace lt {
class glSharedContext: public SharedContext class glSharedContext: public SharedContext
{ {
}; };
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
#include <renderer/texture.hpp> #include <renderer/texture.hpp>
namespace Light { namespace lt {
class glTexture: public Texture class glTexture: public Texture
{ {
@ -23,4 +23,4 @@ private:
uint32_t m_texture_id {}; uint32_t m_texture_id {};
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
struct GLFWwindow; struct GLFWwindow;
namespace Light { namespace lt {
class glUserInterface: public UserInterface class glUserInterface: public UserInterface
{ {
@ -27,4 +27,4 @@ private:
GLFWwindow *m_window_handle {}; GLFWwindow *m_window_handle {};
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <renderer/vertex_layout.hpp> #include <renderer/vertex_layout.hpp>
namespace Light { namespace lt {
class VertexBuffer; class VertexBuffer;
@ -38,4 +38,4 @@ private:
unsigned int m_array_id; unsigned int m_array_id;
}; };
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
struct GLFWwindow; struct GLFWwindow;
namespace Light { namespace lt {
class SharedContext; class SharedContext;
class WindowResizedEvent; class WindowResizedEvent;
@ -54,4 +54,4 @@ private:
static GraphicsContext *s_context; static GraphicsContext *s_context;
}; };
} // namespace Light } // namespace lt

View file

@ -5,7 +5,7 @@
struct GLFWwindow; struct GLFWwindow;
namespace Light { namespace lt {
class SharedContext; class SharedContext;
@ -42,4 +42,4 @@ protected:
RenderCommand() = default; RenderCommand() = default;
}; };
} // namespace Light } // namespace lt

View file

@ -18,7 +18,7 @@
struct GLFWwindow; struct GLFWwindow;
namespace Light { namespace lt {
class ConstantBuffer; class ConstantBuffer;
class Framebuffer; class Framebuffer;
@ -157,4 +157,4 @@ private:
void end_scene_impl(); void end_scene_impl();
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <renderer/renderer_programs/renderer_program.hpp> #include <renderer/renderer_programs/renderer_program.hpp>
namespace Light { namespace lt {
class Shader; class Shader;
class VertexBuffer; class VertexBuffer;
@ -71,4 +71,4 @@ private:
unsigned int m_max_vertices = 0u; unsigned int m_max_vertices = 0u;
}; };
} // namespace Light } // namespace lt

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
namespace Light { namespace lt {
class RendererProgram class RendererProgram
{ {
@ -14,4 +14,4 @@ public:
virtual ~RendererProgram() = default; virtual ~RendererProgram() = default;
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <renderer/renderer_programs/renderer_program.hpp> #include <renderer/renderer_programs/renderer_program.hpp>
namespace Light { namespace lt {
class Shader; class Shader;
class VertexBuffer; class VertexBuffer;
@ -71,4 +71,4 @@ private:
unsigned int m_max_vertices; unsigned int m_max_vertices;
}; };
} // namespace Light } // namespace lt

View file

@ -3,7 +3,7 @@
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <renderer/renderer_programs/renderer_program.hpp> #include <renderer/renderer_programs/renderer_program.hpp>
namespace Light { namespace lt {
class Shader; class Shader;
class VertexBuffer; class VertexBuffer;
@ -72,4 +72,4 @@ private:
unsigned int m_max_vertices; unsigned int m_max_vertices;
}; };
} // namespace Light } // namespace lt

View file

@ -8,7 +8,7 @@ class TextAsset;
} // namespace Assets } // namespace Assets
namespace Light { namespace lt {
class SharedContext; class SharedContext;
@ -40,4 +40,4 @@ protected:
Shader() = default; Shader() = default;
}; };
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
namespace Light { namespace lt {
class SharedContext class SharedContext
{ {
@ -10,4 +10,4 @@ public:
virtual ~SharedContext() = default; virtual ~SharedContext() = default;
}; };
} // namespace Light } // namespace lt

View file

@ -6,7 +6,7 @@ class TextureAsset;
} }
namespace Light { namespace lt {
class SharedContext; class SharedContext;
@ -36,4 +36,4 @@ protected:
Texture() = default; Texture() = default;
}; };
} // namespace Light } // namespace lt

View file

@ -2,7 +2,7 @@
#include <debug/assertions.hpp> #include <debug/assertions.hpp>
namespace Light { namespace lt {
class VertexBuffer; class VertexBuffer;
class Shader; class Shader;
@ -50,4 +50,4 @@ protected:
VertexLayout() = default; VertexLayout() = default;
}; };
} // namespace Light } // namespace lt

View file

@ -8,7 +8,7 @@
#include <renderer/graphics_context.hpp> #include <renderer/graphics_context.hpp>
namespace Light { namespace lt {
auto Blender::create(const Ref<SharedContext> & /*sharedContext*/) -> Scope<Blender> auto Blender::create(const Ref<SharedContext> & /*sharedContext*/) -> Scope<Blender>
{ {
@ -30,4 +30,4 @@ auto Blender::create(const Ref<SharedContext> & /*sharedContext*/) -> Scope<Blen
} }
} }
} // namespace Light } // namespace lt

View file

@ -10,7 +10,7 @@
#include <renderer/graphics_context.hpp> #include <renderer/graphics_context.hpp>
namespace Light { namespace lt {
auto ConstantBuffer::create( auto ConstantBuffer::create(
ConstantBufferIndex index, ConstantBufferIndex index,
@ -95,4 +95,4 @@ auto IndexBuffer::create(
} }
} }
} // namespace Light } // namespace lt

View file

@ -1,7 +1,7 @@
#include <renderer/dx/blender.hpp> #include <renderer/dx/blender.hpp>
#include <renderer/dx/shared_context.hpp> #include <renderer/dx/shared_context.hpp>
namespace Light { namespace lt {
dxBlender::dxBlender(Ref<dxSharedContext> sharedContext) dxBlender::dxBlender(Ref<dxSharedContext> sharedContext)
: m_context(sharedContext), m_factor_map { // constants : m_context(sharedContext), m_factor_map { // constants
@ -78,4 +78,4 @@ void dxBlender::disable()
m_context->get_device_context()->OMSetBlendState(m_blend_state.Get(), nullptr, 0xffffffff); m_context->get_device_context()->OMSetBlendState(m_blend_state.Get(), nullptr, 0xffffffff);
} }
} // namespace Light } // namespace lt

View file

@ -1,7 +1,7 @@
#include <renderer/dx/buffers.hpp> #include <renderer/dx/buffers.hpp>
#include <renderer/dx/shared_context.hpp> #include <renderer/dx/shared_context.hpp>
namespace Light { namespace lt {
//======================================== CONSTANT_BUFFER //======================================== CONSTANT_BUFFER
//========================================// //========================================//
@ -185,4 +185,4 @@ void dxIndexBuffer::un_bind()
} }
//======================================== INDEX_BUFFER ========================================// //======================================== INDEX_BUFFER ========================================//
} // namespace Light } // namespace lt

View file

@ -1,7 +1,7 @@
#include <renderer/dx/framebuffers.hpp> #include <renderer/dx/framebuffers.hpp>
#include <renderer/dx/shared_context.hpp> #include <renderer/dx/shared_context.hpp>
namespace Light { namespace lt {
dxFramebuffer::dxFramebuffer( dxFramebuffer::dxFramebuffer(
const FramebufferSpecification &specification, const FramebufferSpecification &specification,
@ -106,4 +106,4 @@ void dxFramebuffer::resize(const glm::uvec2 &size)
); );
} }
} // namespace Light } // namespace lt

Some files were not shown because too many files have changed in this diff Show more