mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 01:06:25 +02:00
Fix for AnimDebugDraw crash on shutdown.
This commit is contained in:
parent
a454584496
commit
90a551214e
3 changed files with 8 additions and 0 deletions
|
@ -794,6 +794,8 @@ void Application::cleanupBeforeQuit() {
|
||||||
DependencyManager::get<EyeTracker>()->setEnabled(false, true);
|
DependencyManager::get<EyeTracker>()->setEnabled(false, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
AnimDebugDraw::getInstance().shutdown();
|
||||||
|
|
||||||
if (_keyboardFocusHighlightID > 0) {
|
if (_keyboardFocusHighlightID > 0) {
|
||||||
getOverlays().deleteOverlay(_keyboardFocusHighlightID);
|
getOverlays().deleteOverlay(_keyboardFocusHighlightID);
|
||||||
_keyboardFocusHighlightID = -1;
|
_keyboardFocusHighlightID = -1;
|
||||||
|
|
|
@ -141,6 +141,10 @@ AnimDebugDraw::AnimDebugDraw() :
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimDebugDraw::~AnimDebugDraw() {
|
AnimDebugDraw::~AnimDebugDraw() {
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimDebugDraw::shutdown() {
|
||||||
|
// remove renderItem from main 3d scene.
|
||||||
render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene();
|
render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene();
|
||||||
if (scene && _itemID) {
|
if (scene && _itemID) {
|
||||||
render::PendingChanges pendingChanges;
|
render::PendingChanges pendingChanges;
|
||||||
|
|
|
@ -27,6 +27,8 @@ public:
|
||||||
AnimDebugDraw();
|
AnimDebugDraw();
|
||||||
~AnimDebugDraw();
|
~AnimDebugDraw();
|
||||||
|
|
||||||
|
void shutdown();
|
||||||
|
|
||||||
// draw a skeleton bind pose
|
// draw a skeleton bind pose
|
||||||
void addSkeleton(const std::string& key, AnimSkeleton::ConstPointer skeleton, const AnimPose& rootPose, const glm::vec4& color);
|
void addSkeleton(const std::string& key, AnimSkeleton::ConstPointer skeleton, const AnimPose& rootPose, const glm::vec4& color);
|
||||||
void removeSkeleton(const std::string& key);
|
void removeSkeleton(const std::string& key);
|
||||||
|
|
Loading…
Reference in a new issue