ADD: async glTF texture preloading
This commit is contained in:
@@ -518,6 +518,16 @@ bool SceneManager::removeGLTFInstance(const std::string &name)
|
||||
return true;
|
||||
}
|
||||
|
||||
std::shared_ptr<LoadedGLTF> SceneManager::getGLTFInstanceScene(const std::string &instanceName) const
|
||||
{
|
||||
auto it = dynamicGLTFInstances.find(instanceName);
|
||||
if (it != dynamicGLTFInstances.end())
|
||||
{
|
||||
return it->second.scene;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool SceneManager::getGLTFInstanceTransform(const std::string &name, glm::mat4 &outTransform)
|
||||
{
|
||||
auto it = dynamicGLTFInstances.find(name);
|
||||
|
||||
@@ -177,6 +177,9 @@ public:
|
||||
|
||||
const PickingDebug &getPickingDebug() const { return pickingDebug; }
|
||||
|
||||
// Returns the LoadedGLTF scene for a named GLTF instance, or nullptr if not found.
|
||||
std::shared_ptr<LoadedGLTF> getGLTFInstanceScene(const std::string &instanceName) const;
|
||||
|
||||
private:
|
||||
EngineContext *_context = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user