mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-10 22:23:34 +00:00
fixing compoilation issues
This commit is contained in:
6
Makefile
6
Makefile
@@ -6,7 +6,7 @@
|
||||
# By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# 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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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> window);
|
||||
|
||||
virtual void RegisterWindow(std::shared_ptr<Window> 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<std::uint32_t, std::shared_ptr<Window>> m_windows;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <thread>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <chrono>
|
||||
#include <unordered_set>
|
||||
#include <glm/glm.hpp>
|
||||
@@ -78,7 +79,7 @@
|
||||
#undef Window
|
||||
|
||||
#include <Core/Logs.h>
|
||||
#include <EventBus.h>
|
||||
#include <Core/EventBus.h>
|
||||
#include <Core/Profiler.h>
|
||||
#include <Utils/NonOwningPtr.h>
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <Renderer/Buffer/Buffer.h>
|
||||
#include <Renderer/Buffers/Buffer.h>
|
||||
#include <Renderer/Renderer.h>
|
||||
|
||||
namespace mlx
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <Renderer/Buffer/Buffer.h>
|
||||
#include <Renderer/Buffers/Buffer.h>
|
||||
|
||||
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;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <Renderer/Enums.h>
|
||||
#include <Renderer/Buffer/Buffer.h>
|
||||
#include <Renderer/Buffers/Buffer.h>
|
||||
#include <Renderer/Renderer.h>
|
||||
|
||||
namespace mlx
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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<class Semaphore> signal, NonOwningPtr<class Semaphore> 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();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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<CommanddBuffer> m_buffers;
|
||||
CommanddPool m_pool;
|
||||
std::vector<CommandBuffer> m_buffers;
|
||||
CommandPool m_pool;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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())
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <Renderer/Core/Device.h>
|
||||
#include <Renderer/Core/Instance.h>
|
||||
#include <Renderer/Core/ValidationLayers.h>
|
||||
#include <Renderer/Core/memory.h>
|
||||
#include <Renderer/Core/Memory.h>
|
||||
|
||||
#include <Utils/Singleton.h>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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<class UniformBuffer> 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;
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <Renderer/Core/CommandResource.h>
|
||||
#include <Renderer/Command/CommandResource.h>
|
||||
#include <Renderer/Command/CommandBuffer.h>
|
||||
#include <Renderer/Command/CommandPool.h>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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; }
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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; }
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <Renderer/Image/TextureRegistry.inl>
|
||||
#include <Renderer/Images/TextureRegistry.inl>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <Renderer/Core/Surface.h>
|
||||
#include <Renderer/Core/RenderCore.h>
|
||||
#include <Renderer/Core/Semaphore.h>
|
||||
#include <Renderer/Pipeline/Pipeline.h>
|
||||
#include <Renderer/Pipelines/Pipeline.h>
|
||||
#include <Renderer/Command/CommandManager.h>
|
||||
#include <Renderer/Swapchain/Swapchain.h>
|
||||
#include <Renderer/Renderpass/Swapchain.h>
|
||||
#include <Renderer/Renderpass/RenderPass.h>
|
||||
#include <Renderer/Renderpass/FrameBuffer.h>
|
||||
#include <Renderer/Descriptors/DescriptorSet.h>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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<stbtt_packedchar, 96>& 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();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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<VkDescriptorSet, 2>& sets, Renderer& renderer) override;
|
||||
void Render(Renderer& renderer) override;
|
||||
void ResetUpdate() override;
|
||||
|
||||
TextDrawDescriptor() = default;
|
||||
|
||||
@@ -6,14 +6,12 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 <Core/Logs.h>
|
||||
#include <PreCompiled.h>
|
||||
#include <Utils/Ansi.h>
|
||||
#include <Core/EventBase.h>
|
||||
#include <Core/EventBus.h>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user