Parameter ordering for model class (put in line with texture class)
This commit is contained in:
parent
ff643e5e48
commit
5a50dfdc1c
2 changed files with 5 additions and 5 deletions
|
|
@ -153,7 +153,7 @@ namespace vks
|
||||||
* @param copyQueue Queue used for the memory staging copy commands (must support transfer)
|
* @param copyQueue Queue used for the memory staging copy commands (must support transfer)
|
||||||
* @param (Optional) flags ASSIMP model loading flags
|
* @param (Optional) flags ASSIMP model loading flags
|
||||||
*/
|
*/
|
||||||
bool loadFromFile(vk::VulkanDevice *device, const std::string& filename, vks::VertexLayout layout, vks::ModelCreateInfo *createInfo, VkQueue copyQueue, const int flags = defaultFlags)
|
bool loadFromFile(const std::string& filename, vks::VertexLayout layout, vks::ModelCreateInfo *createInfo, vk::VulkanDevice *device, VkQueue copyQueue, const int flags = defaultFlags)
|
||||||
{
|
{
|
||||||
this->device = device->logicalDevice;
|
this->device = device->logicalDevice;
|
||||||
|
|
||||||
|
|
@ -379,10 +379,10 @@ namespace vks
|
||||||
* @param copyQueue Queue used for the memory staging copy commands (must support transfer)
|
* @param copyQueue Queue used for the memory staging copy commands (must support transfer)
|
||||||
* @param (Optional) flags ASSIMP model loading flags
|
* @param (Optional) flags ASSIMP model loading flags
|
||||||
*/
|
*/
|
||||||
bool loadFromFile(vk::VulkanDevice *device, const std::string& filename, vks::VertexLayout layout, float scale, VkQueue copyQueue, const int flags = defaultFlags)
|
bool loadFromFile(const std::string& filename, vks::VertexLayout layout, float scale, vk::VulkanDevice *device, VkQueue copyQueue, const int flags = defaultFlags)
|
||||||
{
|
{
|
||||||
vks::ModelCreateInfo modelCreateInfo(scale, 1.0f, 0.0f);
|
vks::ModelCreateInfo modelCreateInfo(scale, 1.0f, 0.0f);
|
||||||
return loadFromFile(device, filename, layout, &modelCreateInfo, copyQueue, flags);
|
return loadFromFile(filename, layout, &modelCreateInfo, device, copyQueue, flags);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -600,11 +600,11 @@ public:
|
||||||
void loadAssets()
|
void loadAssets()
|
||||||
{
|
{
|
||||||
// Models
|
// Models
|
||||||
models.skybox.loadFromFile(vulkanDevice, getAssetPath() + "models/cube.obj", vertexLayout, 0.05f, queue);
|
models.skybox.loadFromFile(getAssetPath() + "models/cube.obj", vertexLayout, 0.05f, vulkanDevice, queue);
|
||||||
std::vector<std::string> filenames = {"sphere.obj", "teapot.dae", "torusknot.obj"};
|
std::vector<std::string> filenames = {"sphere.obj", "teapot.dae", "torusknot.obj"};
|
||||||
for (auto file : filenames) {
|
for (auto file : filenames) {
|
||||||
vks::Model model;
|
vks::Model model;
|
||||||
model.loadFromFile(vulkanDevice, getAssetPath() + "models/" + file, vertexLayout, 0.05f, queue);
|
model.loadFromFile(getAssetPath() + "models/" + file, vertexLayout, 0.05f, vulkanDevice, queue);
|
||||||
models.objects.push_back(model);
|
models.objects.push_back(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue