start texture binding

This commit is contained in:
Greg Wells
2025-07-01 11:31:55 -04:00
parent 8211876837
commit 76e80081fb
7 changed files with 40 additions and 15 deletions

View File

@@ -120,12 +120,12 @@ void metalBindUniform(gnCommandBufferHandle buffer, gnUniform uniform, uint32_t
];
} else if (uniform->uniform->bindings[i].type == GN_IMAGE_DESCRIPTOR) {
gnImageUniformInfo info = *(gnImageUniformInfo*)uniform->uniform->bindings[i].data;
[encoder setFragmentTexture:info.texture->texture->texture atIndex:(info.binding + 1)];
[encoder setFragmentTexture:info.texture->texture->texture atIndex:0];
}
}
}
void metalBindVertexBytes(gnCommandBufferHandle buffer, gnPushConstantLayout layout, void* data) {
id<MTLRenderCommandEncoder> encoder = (id<MTLRenderCommandEncoder>)buffer->commandBuffer->encoder;
[encoder setVertexBytes:data length:layout.size atIndex:0]; // TODO: fix this
// [encoder setVertexBytes:data length:layout.size atIndex:0]; // TODO: fix this
}