mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
fixing compoilation issues
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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<std::unique_ptr<GraphicsSupport>> m_graphics;
|
||||
std::function<int(void*)> f_loop_hook;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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<std::size_t>(LogType::EndEnum) + 1;
|
||||
constexpr std::size_t LogTypeCount = static_cast<std::size_t>(LogType::EndEnum);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <Renderer/Renderer.h>
|
||||
#include <Renderer/PixelPut.h>
|
||||
#include <Renderer/Core/DrawableResource.h>
|
||||
#include <Renderer/Images/TextureManager.h>
|
||||
#include <Renderer/Images/TextureRegistry.h>
|
||||
#include <Renderer/Texts/TextManager.h>
|
||||
#include <Utils/NonCopyable.h>
|
||||
#include <Renderer/Images/Texture.h>
|
||||
@@ -55,7 +55,7 @@ namespace mlx
|
||||
std::vector<NonOwningPtr<DrawableResource>> m_drawlist;
|
||||
|
||||
TextManager m_text_manager;
|
||||
TextureManager m_texture_manager;
|
||||
TextureRegistry m_texture_registry;
|
||||
|
||||
glm::mat4 m_proj = glm::mat4(1.0);
|
||||
|
||||
|
||||
@@ -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> 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> 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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<std::chrono::milliseconds>(end_timepoint).time_since_epoch() - std::chrono::time_point_cast<std::chrono::milliseconds>(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:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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;
|
||||
|
||||
Reference in New Issue
Block a user