diff --git a/Makefile b/Makefile index e93dcfa..b0b4275 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: maldavid +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2022/10/04 16:43:41 by maldavid #+# #+# # -# Updated: 2024/05/25 16:08:57 by maldavid ### ########.fr # +# Updated: 2024/07/05 13:34:03 by maldavid ### ########.fr # # # # **************************************************************************** # @@ -85,10 +85,10 @@ $(OBJ_DIR)/%.o: %.cpp $(GCH) all: $(NAME) $(GCH): - @printf "\033[1;32m[compiling "$(MODE)" "$(CXX)"]\033[1;00m PreCompiled header\n" + @printf "\033[1;32m[compiling... "$(MODE)" "$(CXX)"]\033[1;00m PreCompiled header\n" @$(CXX) $(CXXFLAGS) $(INCLUDES) -c $(PCH) -o $(GCH) -$(NAME): $(GCH) $(OBJ_DIR) $(OBJS) +$(NAME): $(OBJ_DIR) $(GCH) $(OBJS) @printf "\033[1;32m[linking ... "$(MODE)"]\033[1;00m "$@"\n" @$(CXX) -shared -o $(NAME) $(OBJS) $(LDLIBS) @printf "\033[1;32m[build finished]\033[1;00m\n" diff --git a/runtime/Includes/Core/Application.h b/runtime/Includes/Core/Application.h index 27de075..fed04e2 100644 --- a/runtime/Includes/Core/Application.h +++ b/runtime/Includes/Core/Application.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 21:49:46 by maldavid #+# #+# */ -/* Updated: 2024/05/25 15:26:36 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 14:04:19 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -59,7 +59,7 @@ namespace mlx private: FpsManager m_fps; - Input m_in; + Inputs m_in; ImageRegistry m_image_registry; std::vector> m_graphics; std::function f_loop_hook; diff --git a/runtime/Includes/Core/Enums.h b/runtime/Includes/Core/Enums.h index 80ef797..68f036b 100644 --- a/runtime/Includes/Core/Enums.h +++ b/runtime/Includes/Core/Enums.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/27 17:15:24 by maldavid #+# #+# */ -/* Updated: 2024/03/27 17:16:03 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:23:10 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,11 +23,12 @@ namespace mlx Warning, Error, FatalError, + Debug, EndEnum }; - constexpr std::size_t LogTypeCount = static_cast(LogType::EndEnum) + 1; + constexpr std::size_t LogTypeCount = static_cast(LogType::EndEnum); } #endif diff --git a/runtime/Includes/Core/Graphics.h b/runtime/Includes/Core/Graphics.h index 448e518..8ab5bbf 100644 --- a/runtime/Includes/Core/Graphics.h +++ b/runtime/Includes/Core/Graphics.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/02 14:49:49 by maldavid #+# #+# */ -/* Updated: 2024/05/25 01:00:10 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:46:58 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -55,7 +55,7 @@ namespace mlx std::vector> m_drawlist; TextManager m_text_manager; - TextureManager m_texture_manager; + TextureRegistry m_texture_registry; glm::mat4 m_proj = glm::mat4(1.0); diff --git a/runtime/Includes/Core/Graphics.inl b/runtime/Includes/Core/Graphics.inl index 6e9771e..50573a1 100644 --- a/runtime/Includes/Core/Graphics.inl +++ b/runtime/Includes/Core/Graphics.inl @@ -23,7 +23,7 @@ namespace mlx m_drawlist.clear(); m_pixel_put_pipeline.Clear(); m_text_manager.Clear(); - m_texture_manager.Clear(); + m_texture_registry.Clear(); } void GraphicsSupport::PixelPut(int x, int y, std::uint32_t color) noexcept @@ -48,7 +48,7 @@ namespace mlx void GraphicsSupport::TexturePut(NonOwningPtr texture, int x, int y) { MLX_PROFILE_FUNCTION(); - auto res = m_texture_manager.RegisterTexture(texture, x, y); + auto res = m_texture_registry.RegisterTexture(texture, x, y); if(!res.second) // if this is not a completly new texture draw { auto it = std::find(m_drawlist.begin(), m_drawlist.end(), res.first); @@ -61,7 +61,7 @@ namespace mlx void GraphicsSupport::LoadFont(const std::filesystem::path& filepath, float scale) { MLX_PROFILE_FUNCTION(); - m_text_manager.LoadFont(*_renderer, filepath, scale); + m_text_manager.LoadFont(m_renderer, filepath, scale); } void GraphicsSupport::TryEraseTextureFromManager(NonOwningPtr texture) noexcept @@ -69,11 +69,11 @@ namespace mlx MLX_PROFILE_FUNCTION(); for(auto it = m_drawlist.begin(); it != m_drawlist.end();) { - if(m_texture_manager.IsTextureKnown(texture)) + if(m_texture_registry.IsTextureKnown(texture)) it = m_drawlist.erase(it); else ++it; } - m_texture_manager.EraseTextures(texture); + m_texture_registry.EraseTextures(texture); } } diff --git a/runtime/Includes/Core/Profiler.h b/runtime/Includes/Core/Profiler.h index dbd6b1f..9a24f42 100644 --- a/runtime/Includes/Core/Profiler.h +++ b/runtime/Includes/Core/Profiler.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/10 13:35:45 by maldavid #+# #+# */ -/* Updated: 2024/03/27 21:19:01 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:24:17 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -76,7 +76,7 @@ namespace mlx auto high_res_start = FloatingPointMilliseconds{ m_start_timepoint.time_since_epoch() }; auto elapsed_time = std::chrono::time_point_cast(end_timepoint).time_since_epoch() - std::chrono::time_point_cast(m_start_timepoint).time_since_epoch(); - Profiler::get().appendProfileData({ m_name, elapsed_time, std::this_thread::get_id() }); + Profiler::Get().AppendProfileData({ m_name, elapsed_time, std::this_thread::get_id() }); m_stopped = true; } @@ -84,7 +84,7 @@ namespace mlx ~ProfilerTimer() { if(!m_stopped) - stop(); + Stop(); } private: diff --git a/runtime/Includes/Core/SDLManager.h b/runtime/Includes/Core/SDLManager.h index b32bf6f..8ad7ea7 100644 --- a/runtime/Includes/Core/SDLManager.h +++ b/runtime/Includes/Core/SDLManager.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/05/25 15:28:59 by maldavid #+# #+# */ -/* Updated: 2024/05/25 16:11:50 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 22:15:22 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,6 +28,8 @@ namespace mlx void* CreateWindow(const std::string& title, std::size_t w, std::size_t h); void DestroyWindow(void* window) noexcept; + void SetEventCallback(); + private: SDLManager() = default; ~SDLManager() = default; diff --git a/runtime/Includes/Platform/Inputs.h b/runtime/Includes/Platform/Inputs.h index aa8ad0f..ca3d485 100644 --- a/runtime/Includes/Platform/Inputs.h +++ b/runtime/Includes/Platform/Inputs.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/05 16:27:35 by maldavid #+# #+# */ -/* Updated: 2024/03/27 18:36:21 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 20:35:09 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,14 +30,12 @@ namespace mlx public: Inputs() = default; - virtual void Update() noexcept = 0; + void RegisterWindow(std::shared_ptr window); - virtual void RegisterWindow(std::shared_ptr window) = 0; - - virtual std::int32_t GetX() const noexcept = 0; - virtual std::int32_t GetY() const noexcept = 0; - virtual std::int32_t GetXRel() const noexcept = 0; - virtual std::int32_t GetYRel() const noexcept = 0; + std::int32_t GetX() const noexcept; + std::int32_t GetY() const noexcept; + std::int32_t GetXRel() const noexcept; + std::int32_t GetYRel() const noexcept; inline bool IsMouseMoving() const noexcept { return GetXRel() || GetYRel(); } MLX_FORCEINLINE bool IsRunning() const noexcept { return m_run; } @@ -50,7 +48,7 @@ namespace mlx m_events_hooks[id][event].param = param; } - virtual ~Inputs() = default; + ~Inputs() = default; protected: std::unordered_map> m_windows; diff --git a/runtime/Includes/PreCompiled.h b/runtime/Includes/PreCompiled.h index d5f3ace..6601fe9 100644 --- a/runtime/Includes/PreCompiled.h +++ b/runtime/Includes/PreCompiled.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/25 17:37:23 by maldavid #+# #+# */ -/* Updated: 2024/05/25 15:46:37 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:25:07 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -78,7 +79,7 @@ #undef Window #include -#include +#include #include #include diff --git a/runtime/Includes/Renderer/Buffers/IndexBuffer.h b/runtime/Includes/Renderer/Buffers/IndexBuffer.h index 4a8f4d8..877d518 100644 --- a/runtime/Includes/Renderer/Buffers/IndexBuffer.h +++ b/runtime/Includes/Renderer/Buffers/IndexBuffer.h @@ -6,14 +6,14 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/25 15:05:05 by maldavid #+# #+# */ -/* Updated: 2024/03/28 22:11:05 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:24:46 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef __VK_IBO__ #define __VK_IBO__ -#include +#include #include namespace mlx diff --git a/runtime/Includes/Renderer/Buffers/UniformBuffer.h b/runtime/Includes/Renderer/Buffers/UniformBuffer.h index 6b84cd5..d7f6584 100644 --- a/runtime/Includes/Renderer/Buffers/UniformBuffer.h +++ b/runtime/Includes/Renderer/Buffers/UniformBuffer.h @@ -6,14 +6,14 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:45:29 by maldavid #+# #+# */ -/* Updated: 2024/04/23 14:23:56 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:39:32 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef __MLX_VK_UBO__ #define __MLX_VK_UBO__ -#include +#include namespace mlx { @@ -33,10 +33,10 @@ namespace mlx VkBuffer& operator()() noexcept; VkBuffer& Get() noexcept; - inline VkDeviceSize GetSize(int i) noexcept { return m_buffers[i].getSize(); } - inline VkDeviceSize GetOffset(int i) noexcept { return m_buffers[i].getOffset(); } - inline VkBuffer& operator()(int i) noexcept { return m_buffers[i].get(); } - inline VkBuffer& Get(int i) noexcept { return m_buffers[i].get(); } + inline VkDeviceSize GetSize(int i) noexcept { return m_buffers[i].GetSize(); } + inline VkDeviceSize GetOffset(int i) noexcept { return m_buffers[i].GetOffset(); } + inline VkBuffer& operator()(int i) noexcept { return m_buffers[i].Get(); } + inline VkBuffer& Get(int i) noexcept { return m_buffers[i].Get(); } ~UniformBuffer() = default; diff --git a/runtime/Includes/Renderer/Buffers/VertexBuffer.h b/runtime/Includes/Renderer/Buffers/VertexBuffer.h index ec193b7..8feb7c0 100644 --- a/runtime/Includes/Renderer/Buffers/VertexBuffer.h +++ b/runtime/Includes/Renderer/Buffers/VertexBuffer.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:27:38 by maldavid #+# #+# */ -/* Updated: 2024/03/28 22:23:32 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:24:41 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,7 +14,7 @@ #define __MLX_VK_VBO__ #include -#include +#include #include namespace mlx diff --git a/runtime/Includes/Renderer/Command/CommandBuffer.h b/runtime/Includes/Renderer/Command/CommandBuffer.h index b5be0ad..90a0a48 100644 --- a/runtime/Includes/Renderer/Command/CommandBuffer.h +++ b/runtime/Includes/Renderer/Command/CommandBuffer.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:25:42 by maldavid #+# #+# */ -/* Updated: 2024/04/23 17:59:50 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:37:54 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -32,7 +32,7 @@ namespace mlx void Submit(NonOwningPtr signal, NonOwningPtr wait) noexcept; void SubmitIdle(bool shouldWaitForExecution = true) noexcept; // TODO : handle `shouldWaitForExecution` as false by default (needs to modify CmdResources lifetimes to do so) void UpdateSubmitState() noexcept; - inline void WaitForExecution() noexcept { m_fence.wait(); UpdateSubmitState(); m_state = CommandBufferState::Ready; } + inline void WaitForExecution() noexcept { m_fence.Wait(); UpdateSubmitState(); m_state = CommandBufferState::Ready; } inline void Reset() noexcept { vkResetCommandBuffer(m_cmd_buffer, 0); } void EndRecord(); diff --git a/runtime/Includes/Renderer/Command/SingleTimeCmdManager.h b/runtime/Includes/Renderer/Command/SingleTimeCmdManager.h index be7f896..1ac2ec6 100644 --- a/runtime/Includes/Renderer/Command/SingleTimeCmdManager.h +++ b/runtime/Includes/Renderer/Command/SingleTimeCmdManager.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/12/15 18:25:57 by maldavid #+# #+# */ -/* Updated: 2024/03/27 22:46:48 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:38:11 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -34,15 +34,15 @@ namespace mlx void WaitForAllExecutions() noexcept; inline CommandPool& GetCmdPool() noexcept { return m_pool; } - CommanddBuffer& GetCmdBuffer() noexcept; + CommandBuffer& GetCmdBuffer() noexcept; ~SingleTimeCmdManager() = default; inline static constexpr const std::uint8_t BASE_POOL_SIZE = 16; private: - std::vector m_buffers; - CommanddPool m_pool; + std::vector m_buffers; + CommandPool m_pool; }; } diff --git a/runtime/Includes/Renderer/Core/Queues.h b/runtime/Includes/Renderer/Core/Queues.h index 3986e17..2fdc7ec 100644 --- a/runtime/Includes/Renderer/Core/Queues.h +++ b/runtime/Includes/Renderer/Core/Queues.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/08 19:01:49 by maldavid #+# #+# */ -/* Updated: 2024/03/28 22:05:15 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:38:50 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,8 +31,8 @@ namespace mlx void Init(); - inline VkQueue& GetGraphic() noexcept { return _graphics_queue; } - inline VkQueue& GetPresent() noexcept { return _present_queue; } + inline VkQueue& GetGraphic() noexcept { return m_graphics_queue; } + inline VkQueue& GetPresent() noexcept { return m_present_queue; } inline QueueFamilyIndices GetFamilies() noexcept { if(m_families.has_value()) diff --git a/runtime/Includes/Renderer/Core/RenderCore.h b/runtime/Includes/Renderer/Core/RenderCore.h index a976b92..b0939e7 100644 --- a/runtime/Includes/Renderer/Core/RenderCore.h +++ b/runtime/Includes/Renderer/Core/RenderCore.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/08 19:16:32 by maldavid #+# #+# */ -/* Updated: 2024/03/27 22:55:43 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:39:11 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include diff --git a/runtime/Includes/Renderer/Descriptors/DescriptorSet.h b/runtime/Includes/Renderer/Descriptors/DescriptorSet.h index c50aec9..f687c8c 100644 --- a/runtime/Includes/Renderer/Descriptors/DescriptorSet.h +++ b/runtime/Includes/Renderer/Descriptors/DescriptorSet.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/23 18:39:36 by maldavid #+# #+# */ -/* Updated: 2024/04/23 22:14:48 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:42:22 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,7 +28,7 @@ namespace mlx void WriteDescriptor(int binding, NonOwningPtr ubo) const noexcept; void WriteDescriptor(int binding, const class Image& image) const noexcept; - inline bool IsInit() const noexcept { return m_pool != nullptr && m_renderer != nullptr; } + inline bool IsInit() const noexcept { return p_pool && p_renderer; } void Bind() noexcept; diff --git a/runtime/Includes/Renderer/Images/Image.h b/runtime/Includes/Renderer/Images/Image.h index 2f71614..e86b12d 100644 --- a/runtime/Includes/Renderer/Images/Image.h +++ b/runtime/Includes/Renderer/Images/Image.h @@ -6,14 +6,14 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/25 11:54:21 by maldavid #+# #+# */ -/* Updated: 2024/04/23 20:00:53 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:40:51 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef __MLX_VK_IMAGE__ #define __MLX_VK_IMAGE__ -#include +#include #include #include diff --git a/runtime/Includes/Renderer/Images/Texture.h b/runtime/Includes/Renderer/Images/Texture.h index 16091a5..5cc468d 100644 --- a/runtime/Includes/Renderer/Images/Texture.h +++ b/runtime/Includes/Renderer/Images/Texture.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/03/08 02:24:58 by maldavid #+# #+# */ -/* Updated: 2024/04/23 20:03:59 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:42:41 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,7 +33,7 @@ namespace mlx int GetPixel(int x, int y) noexcept; inline void SetDescriptor(DescriptorSet&& set) noexcept { m_set = set; } - inline VkDescriptorSet GetSet() noexcept { return m_set.IsInit() ? m_set.get() : VK_NULL_HANDLE; } + inline VkDescriptorSet GetSet() noexcept { return m_set.IsInit() ? m_set.Get() : VK_NULL_HANDLE; } inline void UpdateSet(int binding) noexcept { m_set.WriteDescriptor(binding, *this); m_has_set_been_updated = true; } inline bool HasBeenUpdated() const noexcept { return m_has_set_been_updated; } inline constexpr void ResetUpdate() noexcept { m_has_set_been_updated = false; } diff --git a/runtime/Includes/Renderer/Images/TextureAtlas.h b/runtime/Includes/Renderer/Images/TextureAtlas.h index 34802fa..669097f 100644 --- a/runtime/Includes/Renderer/Images/TextureAtlas.h +++ b/runtime/Includes/Renderer/Images/TextureAtlas.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/07 16:36:33 by maldavid #+# #+# */ -/* Updated: 2024/04/24 01:37:54 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:52:40 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,7 +28,7 @@ namespace mlx inline void SetDescriptor(DescriptorSet&& set) noexcept { m_set = set; } inline DescriptorSet GetSet() noexcept { return m_set; } - inline void UpdateSet(int binding) noexcept { m_set.writeDescriptor(binding, *this); m_has_been_updated = true; } + inline void UpdateSet(int binding) noexcept { m_set.WriteDescriptor(binding, *this); m_has_been_updated = true; } inline bool HasBeenUpdated() const noexcept { return m_has_been_updated; } inline constexpr void ResetUpdate() noexcept { m_has_been_updated = false; } diff --git a/runtime/Includes/Renderer/Images/TextureRegistry.h b/runtime/Includes/Renderer/Images/TextureRegistry.h index 432ab21..c1248e9 100644 --- a/runtime/Includes/Renderer/Images/TextureRegistry.h +++ b/runtime/Includes/Renderer/Images/TextureRegistry.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/11 00:56:15 by maldavid #+# #+# */ -/* Updated: 2024/04/23 22:10:08 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:43:48 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -34,6 +34,6 @@ namespace mlx }; } -#include +#include #endif diff --git a/runtime/Includes/Renderer/Renderer.h b/runtime/Includes/Renderer/Renderer.h index 9a0767f..a7ff20c 100644 --- a/runtime/Includes/Renderer/Renderer.h +++ b/runtime/Includes/Renderer/Renderer.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/18 17:14:45 by maldavid #+# #+# */ -/* Updated: 2024/04/24 01:53:20 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:40:20 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,9 +18,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/runtime/Includes/Renderer/Texts/Font.h b/runtime/Includes/Renderer/Texts/Font.h index ebf873f..91b6c4c 100644 --- a/runtime/Includes/Renderer/Texts/Font.h +++ b/runtime/Includes/Renderer/Texts/Font.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/12/11 21:17:04 by kbz_8 #+# #+# */ -/* Updated: 2024/03/28 22:19:39 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:53:11 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,8 +31,8 @@ namespace mlx inline float GetScale() const noexcept { return m_scale; } inline const std::array& GetCharData() const { return m_cdata; } inline const TextureAtlas& GetAtlas() const noexcept { return m_atlas; } - inline bool operator==(const Font& rhs) const { return rhs._name == m_name && rhs._scale == m_scale; } - inline bool operator!=(const Font& rhs) const { return rhs._name != m_name || rhs._scale != m_scale; } + inline bool operator==(const Font& rhs) const { return rhs.m_name == m_name && rhs.m_scale == m_scale; } + inline bool operator!=(const Font& rhs) const { return rhs.m_name != m_name || rhs.m_scale != m_scale; } void Destroy(); diff --git a/runtime/Includes/Renderer/Texts/TextDescriptor.h b/runtime/Includes/Renderer/Texts/TextDescriptor.h index 87496ec..4b5f72a 100644 --- a/runtime/Includes/Renderer/Texts/TextDescriptor.h +++ b/runtime/Includes/Renderer/Texts/TextDescriptor.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/01/11 00:13:34 by maldavid #+# #+# */ -/* Updated: 2024/03/28 22:25:09 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 14:03:43 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,7 +35,7 @@ namespace mlx void Init(FontID font) noexcept; bool operator==(const TextDrawDescriptor& rhs) const { return m_text == rhs.m_text && x == rhs.x && y == rhs.y && color == rhs.color; } - void Render(std::array& sets, Renderer& renderer) override; + void Render(Renderer& renderer) override; void ResetUpdate() override; TextDrawDescriptor() = default; diff --git a/runtime/Sources/Core/Logs.cpp b/runtime/Sources/Core/Logs.cpp index adc9a0c..b70ca49 100644 --- a/runtime/Sources/Core/Logs.cpp +++ b/runtime/Sources/Core/Logs.cpp @@ -6,14 +6,12 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/27 17:20:55 by maldavid #+# #+# */ -/* Updated: 2024/03/27 17:26:59 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:31:02 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ -#include +#include #include -#include -#include namespace mlx { diff --git a/runtime/Sources/Platform/Window.cpp b/runtime/Sources/Platform/Window.cpp index 1b48a77..66ae725 100644 --- a/runtime/Sources/Platform/Window.cpp +++ b/runtime/Sources/Platform/Window.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:36:44 by maldavid #+# #+# */ -/* Updated: 2024/05/25 16:13:31 by maldavid ### ########.fr */ +/* Updated: 2024/07/05 13:12:51 by maldavid ### ########.fr */ /* */ /* ************************************************************************** */ @@ -20,9 +20,6 @@ namespace mlx Window::Window(std::size_t w, std::size_t h, const std::string& title) : m_width(w), m_height(h) { static std::uint64_t ids = 0; - - if(title.find("vvaas") != std::string::npos) - Message("vvaas est mauvais"); p_window = SDLManager::Get().CreateWindow(title, w, h); m_id = ids++; }