fixing compilation issues

This commit is contained in:
Kbz-8
2024-09-14 09:55:19 +02:00
parent 77bfe4ff11
commit f50dd2d946
26 changed files with 1036 additions and 1241 deletions

View File

@@ -22,6 +22,11 @@ namespace mlx
inline void SetEventCallback(func::function<void(mlx_event_type, int, int, void*)> functor, void* userdata) { f_callback = std::move(functor); p_callback_data = userdata; }
std::int32_t GetX() const noexcept;
std::int32_t GetY() const noexcept;
std::int32_t GetXRel() const noexcept;
std::int32_t GetYRel() const noexcept;
private:
SDLManager() = default;
~SDLManager() = default;

View File

@@ -19,7 +19,7 @@ namespace mlx
public:
Inputs();
void RegisterWindow(std::shared_ptr<Window> window);
inline void RegisterWindow(std::shared_ptr<Window> window) { m_windows[window->GetID()] = window; }
std::int32_t GetX() const noexcept;
std::int32_t GetY() const noexcept;

View File

@@ -14,6 +14,7 @@
#include <SDL2/SDL.h>
#include <SDL2/SDL_vulkan.h>
#include <Renderer/Vulkan/VulkanPrototypes.h>
#include <kvf.h>
#include <functional>
@@ -71,7 +72,6 @@
#include <Core/EventBus.h>
#include <Core/Profiler.h>
#include <Utils/NonOwningPtr.h>
#include <Renderer/Vulkan/VulkanPrototypes.h>
using Handle = void*;

View File

@@ -111,7 +111,7 @@ namespace mlx
void SetPixel(int x, int y, std::uint32_t color) noexcept;
int GetPixel(int x, int y) noexcept;
void Update(VkCommandBuffer cmd) const;
void Update(VkCommandBuffer cmd);
~Texture() override { Destroy(); }

View File

@@ -21,7 +21,6 @@ namespace mlx
[[nodiscard]] MLX_FORCEINLINE VkPhysicalDevice GetPhysicalDevice() const noexcept { return m_physical_device; }
[[nodiscard]] MLX_FORCEINLINE GPUAllocator& GetAllocator() noexcept { return m_allocator; }
inline void WaitDeviceIdle() const noexcept { vkDeviceWaitIdle(m_device); }
private:

View File

@@ -1,5 +1,5 @@
#ifndef __SCOP_VK_PROTOTYPES__
#define __SCOP_VK_PROTOTYPES__
#ifndef __MLX_VK_PROTOTYPES__
#define __MLX_VK_PROTOTYPES__
#if defined(VULKAN_H_) && !defined(VK_NO_PROTOTYPES)
#error "define VK_NO_PROTOTYPES needed"

View File

@@ -16,6 +16,7 @@ namespace mlx
NonOwningPtr<T>& NonOwningPtr<T>::operator=(T* ptr)
{
p_ptr = ptr;
return *this;
}
template<typename T>
@@ -23,6 +24,7 @@ namespace mlx
{
p_ptr = ptr.p_ptr;
ptr.p_ptr = nullptr;
return *this;
}
template<typename T>