gltfio: FilamentInstance owner is now const.

In the future, we will allow instances to be constructed from
immutable assets (this is a Google feature request) so this PR
prepares for that.
This commit is contained in:
Philip Rideout
2022-09-16 16:32:49 -07:00
parent b0fb52c5f4
commit 034aaff56c
7 changed files with 31 additions and 33 deletions
+2 -2
View File
@@ -70,7 +70,7 @@ struct Animation {
struct AnimatorImpl {
vector<Animation> animations;
BoneVector boneMatrices;
FFilamentAsset* asset = nullptr;
FFilamentAsset const* asset = nullptr;
FFilamentInstance* instance = nullptr;
RenderableManager* renderableManager;
TransformManager* transformManager;
@@ -176,7 +176,7 @@ static bool validateAnimation(const cgltf_animation& anim) {
return true;
}
Animator::Animator(FFilamentAsset* asset, FFilamentInstance* instance) {
Animator::Animator(FFilamentAsset const* asset, FFilamentInstance* instance) {
assert(asset->mResourcesLoaded && asset->mSourceAsset);
mImpl = new AnimatorImpl();
mImpl->asset = asset;