fixing memory management issue, VMA uses custom asserts

This commit is contained in:
Kbz-8
2023-11-14 12:46:51 +01:00
parent 5dce6a2c8e
commit 39aa8009a4
10 changed files with 31 additions and 16 deletions

View File

@@ -10,6 +10,8 @@
/* */
/* ************************************************************************** */
#include <core/application.h>
namespace mlx::core
{
void Application::getMousePos(int* x, int* y) noexcept

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 17:35:20 by maldavid #+# #+# */
/* Updated: 2023/04/25 15:23:05 by maldavid ### ########.fr */
/* Updated: 2023/11/14 11:43:30 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,7 +20,14 @@ extern "C"
{
void* mlx_init()
{
static bool init = false;
if(init)
{
mlx::core::error::report(e_kind::error, "MLX cannot be initialized multiple times");
return NULL;
}
mlx::Render_Core::get().init();
init = true;
return new mlx::core::Application();
}

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/02 14:49:49 by maldavid #+# #+# */
/* Updated: 2023/11/08 20:41:29 by maldavid ### ########.fr */
/* Updated: 2023/11/14 11:39:55 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -38,13 +38,12 @@ namespace mlx
inline std::shared_ptr<MLX_Window> getWindow();
inline void beginRender() noexcept;
void endRender() noexcept;
inline void clearRenderData() noexcept;
inline void pixelPut(int x, int y, uint32_t color) noexcept;
inline void stringPut(int x, int y, int color, std::string str);
inline void texturePut(Texture* texture, int x, int y);
void endRender() noexcept;
~GraphicsSupport();