fixing compatibility, workign on renderer

This commit is contained in:
2022-12-18 04:04:10 +01:00
parent b275918de6
commit c907c52968
48 changed files with 6535 additions and 75 deletions

34
src/renderer/buffers/vk_ubo.cpp git.filemode.normal_file
View File

@@ -0,0 +1,34 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* vk_ubo.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/06 18:45:52 by maldavid #+# #+# */
/* Updated: 2022/12/18 00:25:55 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
#include "vk_ubo.h"
#include <cstring>
namespace mlx
{
void UBO::setData(uint32_t size, const void* data)
{
void* temp = nullptr;
mapMem(&temp);
std::memcpy(temp, data, static_cast<size_t>(size));
unmapMem();
}
void UBO::setDynamicData(uint32_t size, uint32_t typeSize, const void* data)
{
void* temp = nullptr;
mapMem(&temp);
std::memcpy(temp, data, static_cast<size_t>(size));
Buffer::flush();
unmapMem();
}
}