Asset loading for Android (#97)
This commit is contained in:
parent
0966d21dc2
commit
6ee70824e5
3 changed files with 81 additions and 10 deletions
|
|
@ -219,6 +219,9 @@ void VulkanExampleBase::prepare()
|
|||
createSetupCommandBuffer();
|
||||
// Create a simple texture loader class
|
||||
textureLoader = new vkTools::VulkanTextureLoader(physicalDevice, device, queue, cmdPool);
|
||||
#if defined(__ANDROID__)
|
||||
textureLoader->assetManager = androidApp->activity->assetManager;
|
||||
#endif
|
||||
}
|
||||
|
||||
VkPipelineShaderStageCreateInfo VulkanExampleBase::loadShader(std::string fileName, VkShaderStageFlagBits stage)
|
||||
|
|
@ -291,6 +294,11 @@ void VulkanExampleBase::loadMesh(
|
|||
float scale)
|
||||
{
|
||||
VulkanMeshLoader *mesh = new VulkanMeshLoader();
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
mesh->assetManager = androidApp->activity->assetManager;
|
||||
#endif
|
||||
|
||||
mesh->LoadMesh(filename);
|
||||
assert(mesh->m_Entries.size() > 0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue