fixing multiple window issue

This commit is contained in:
Kbz-8
2024-04-22 17:35:41 +02:00
parent e26af9ae1b
commit 5af4c82c1b
3 changed files with 6 additions and 4 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */ /* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 22:10:52 by maldavid #+# #+# */ /* Created: 2022/10/04 22:10:52 by maldavid #+# #+# */
/* Updated: 2024/04/21 18:13:29 by maldavid ### ########.fr */ /* Updated: 2024/04/22 17:35:15 by maldavid ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@@ -40,6 +40,7 @@ namespace mlx::core
void Application::run() noexcept void Application::run() noexcept
{ {
_in->run();
while(_in->isRunning()) while(_in->isRunning())
{ {
if(!_fps.update()) if(!_fps.update())

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */ /* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/02 15:13:55 by maldavid #+# #+# */ /* Created: 2023/04/02 15:13:55 by maldavid #+# #+# */
/* Updated: 2024/01/11 04:38:53 by maldavid ### ########.fr */ /* Updated: 2024/04/22 17:34:27 by maldavid ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@@ -52,7 +52,7 @@ namespace mlx
_proj = glm::ortho<float>(0, _width, 0, _height); _proj = glm::ortho<float>(0, _width, 0, _height);
_renderer->getUniformBuffer()->setData(sizeof(_proj), &_proj); _renderer->getUniformBuffer()->setData(sizeof(_proj), &_proj);
static std::array<VkDescriptorSet, 2> sets = { std::array<VkDescriptorSet, 2> sets = {
_renderer->getVertDescriptorSet().get(), _renderer->getVertDescriptorSet().get(),
VK_NULL_HANDLE VK_NULL_HANDLE
}; };

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */ /* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/05 16:27:35 by maldavid #+# #+# */ /* Created: 2022/10/05 16:27:35 by maldavid #+# #+# */
/* Updated: 2024/02/25 07:51:55 by maldavid ### ########.fr */ /* Updated: 2024/04/22 17:35:23 by maldavid ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@@ -45,6 +45,7 @@ namespace mlx
inline int getYRel() const noexcept { return _yRel; } inline int getYRel() const noexcept { return _yRel; }
inline bool isRunning() const noexcept { return !_end; } inline bool isRunning() const noexcept { return !_end; }
inline constexpr void run() noexcept { _end = false; }
inline constexpr void finish() noexcept { _end = true; } inline constexpr void finish() noexcept { _end = true; }
inline void addWindow(std::shared_ptr<MLX_Window> window) inline void addWindow(std::shared_ptr<MLX_Window> window)