big refactoring ! ci skip

This commit is contained in:
2024-09-02 09:44:42 +02:00
parent d95233e728
commit f65ac577bc
581 changed files with 42971 additions and 99170 deletions

View File

@@ -1,18 +1,7 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Inputs.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/05 16:27:35 by maldavid #+# #+# */
/* Updated: 2024/07/05 20:35:09 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef __MLX_INPUTS__
#define __MLX_INPUTS__
#include <mlx.h>
#include <mlx_profile.h>
#include <Platform/Window.h>

View File

@@ -1,36 +1,30 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Window.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 21:53:12 by maldavid #+# #+# */
/* Updated: 2024/05/25 16:11:00 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef __MLX_WINDOW__
#define __MLX_WINDOW__
#include <Maths/Vec2.h>
namespace mlx
{
class Window
{
public:
Window(std::size_t w, std::size_t h, const std::string& title);
Window(std::size_t w, std::size_t h, const std::string& title, bool hidden = false);
inline void* GetWindowHandle() const noexcept { return p_window; }
inline Handle GetWindowHandle() const noexcept { return p_window; }
inline int GetWidth() const noexcept { return m_width; }
inline int GetHeight() const noexcept { return m_height; }
inline std::uint32_t GetID() const noexcept { return m_id; }
inline VkSurfaceKHR CreateVulkanSurface(VkInstance instance) const noexcept { return SDLManager::Get().CreateVulkanSurface(p_window, instance); }
inline std::vector<const char*> GetRequiredVulkanInstanceExtentions() const noexcept { return SDLManager::Get().GetRequiredVulkanInstanceExtentions(p_window); }
inline Vec2ui GetVulkanDrawableSize() const noexcept { return SDLManager::Get().GetVulkanDrawableSize(p_window); }
void Destroy() noexcept;
~Window() = default;
private:
void* p_window = nullptr;
Handle p_window = nullptr;
std::uint32_t m_id = -1;
int m_width = 0;
int m_height = 0;