Added mlx_set_window_icon

This commit is contained in:
Daemo
2026-08-10 15:32:18 +02:00
parent 0491089463
commit 9800d2f78d
10 changed files with 77 additions and 9 deletions
+13
View File
@@ -1,3 +1,5 @@
#include "Utils/Buffer.h"
#include "mlx.h"
#include <PreCompiled.h>
#include <Renderer/Image.h>
#include <Maths/Vec4.h>
@@ -349,6 +351,17 @@ namespace mlx
m_has_been_modified = false;
}
mlx_color* Texture::GetBufferCopy() noexcept
{
MLX_PROFILE_FUNCTION();
if(!m_staging_buffer.has_value())
OpenCPUBuffer();
mlx_color* dst = new mlx_color[m_width * m_height];
std::memcpy(dst, m_staging_buffer->GetMap<mlx_color*>(), m_width * m_height * sizeof(mlx_color));
return dst;
}
void Texture::OpenCPUBuffer()
{
MLX_PROFILE_FUNCTION();