Metal changes
This commit is contained in:
+10
-5
@@ -21,8 +21,8 @@ static Gfx::OGraphics graphics;
|
||||
|
||||
int main() {
|
||||
std::string gameName = "MeshShadingDemo";
|
||||
std::filesystem::path outputPath = fmt::format("/home/dynamitos/{0}Game/", gameName);
|
||||
std::filesystem::path sourcePath = fmt::format("/home/dynamitos/{0}/", gameName);
|
||||
std::filesystem::path outputPath = fmt::format("/Users/dynamitos/{0}Game/", gameName);
|
||||
std::filesystem::path sourcePath = fmt::format("/Users/dynamitos/{0}/", gameName);
|
||||
#ifdef WIN32
|
||||
std::string libraryEnding = "dll";
|
||||
#elif __APPLE__
|
||||
@@ -45,9 +45,9 @@ int main() {
|
||||
AssetImporter::importFont(FontImportArgs{
|
||||
.filePath = "./fonts/arial.ttf",
|
||||
});
|
||||
AssetImporter::importEnvironmentMap(EnvironmentImportArgs{
|
||||
.filePath = sourcePath / "import" / "textures" / "newport_loft.hdr",
|
||||
});
|
||||
// AssetImporter::importEnvironmentMap(EnvironmentImportArgs{
|
||||
// .filePath = sourcePath / "import" / "textures" / "newport_loft.hdr",
|
||||
// });
|
||||
// AssetImporter::importTexture(TextureImportArgs{
|
||||
// .filePath = sourcePath / "import" / "textures" / "grass_block_side.png",
|
||||
// .importPath = "",
|
||||
@@ -56,6 +56,11 @@ int main() {
|
||||
// .filePath = sourcePath / "import" / "models" / "main1_sponza" / "sponza.gltf",
|
||||
// .importPath = "sponza",
|
||||
//});
|
||||
// AssetImporter::importMesh(MeshImportArgs{
|
||||
// .filePath = sourcePath / "import" / "models" / "rttest.gltf",
|
||||
// .importPath = "rttest",
|
||||
// });
|
||||
|
||||
AssetImporter::importMesh(MeshImportArgs{
|
||||
.filePath = sourcePath / "import" / "models" / "cube.fbx",
|
||||
.importPath = "",
|
||||
|
||||
@@ -116,13 +116,11 @@ void DescriptorSetHandle::updateBuffer(const std::string& name, uint32 index, Gf
|
||||
|
||||
void DescriptorSetHandle::updateBuffer(const std::string& name, uint32 index, Gfx::PUniformBuffer uniformBuffer) {
|
||||
uint32 flattenedIndex = owner->getLayout()->variableMapping[name].index + index;
|
||||
PIndexBuffer buffer = uniformBuffer.cast<IndexBuffer>();
|
||||
bufferWrites.add(BufferWriteInfo{
|
||||
PUniformBuffer buffer = uniformBuffer.cast<UniformBuffer>();
|
||||
uniformWrites.add(UniformWriteInfo{
|
||||
.index = flattenedIndex,
|
||||
.buffer = buffer->getAlloc(),
|
||||
.access = owner->getLayout()->variableMapping[name].access,
|
||||
.content = buffer->getContents(),
|
||||
});
|
||||
boundResources.add(buffer->getAlloc());
|
||||
}
|
||||
|
||||
void DescriptorSetHandle::updateSampler(const std::string& name, uint32 index, Gfx::PSampler samplerState) {
|
||||
|
||||
Reference in New Issue
Block a user