More skeleton

This commit is contained in:
Dynamitos
2024-04-10 15:50:20 +02:00
parent e9e483d9d1
commit c3be0e23e7
10 changed files with 141 additions and 9 deletions
+10 -1
View File
@@ -3,6 +3,7 @@
#include "Graphics/Enums.h"
#include "Graphics/Initializer.h"
#include "Graphics/Metal/Graphics.h"
#include "Metal/MTLTypes.hpp"
using namespace Seele;
using namespace Seele::Metal;
@@ -44,6 +45,11 @@ TextureBase::TextureBase(PGraphics graphics, MTL::TextureType type,
descriptor->release();
}
if(createInfo.sourceData.data != nullptr)
{
MTL::Region region(0, 0, 0, width, height, depth);
texture->replaceRegion(region, 0, createInfo.sourceData.data, createInfo.sourceData.size / (depth / height));
}
}
TextureBase::~TextureBase() {
@@ -55,7 +61,10 @@ TextureBase::~TextureBase() {
void TextureBase::executePipelineBarrier(Gfx::SeAccessFlags,
Gfx::SePipelineStageFlags,
Gfx::SeAccessFlags,
Gfx::SePipelineStageFlags) {}
Gfx::SePipelineStageFlags) {
}
void TextureBase::changeLayout(Gfx::SeImageLayout, Gfx::SeAccessFlags,
Gfx::SePipelineStageFlags, Gfx::SeAccessFlags,