mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-13 15:43:34 +00:00
fixing compatibility, workign on renderer
This commit is contained in:
34
src/renderer/buffers/vk_ubo.cpp
git.filemode.normal_file
34
src/renderer/buffers/vk_ubo.cpp
git.filemode.normal_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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user