void Core::SetViewMode( ViewMode viewMode )
{
mStage->SetViewMode( viewMode );
+ // If setting a VR ViewMode, enable VR also.
+ SetVrEnabled( viewMode == VR );
}
ViewMode Core::GetViewMode() const
return mStage->GetStereoBase();
}
+void Core::SetVrEnabled( bool enabled )
+{
+ mVrManager->SetEnabled( enabled );
+}
+
StagePtr Core::GetCurrentStage()
{
return mStage.Get();
*/
float GetStereoBase() const;
+ /**
+ * @copydoc Dali::Integration::Core::SetVrEnabled()
+ */
+ void SetVrEnabled( bool enabled );
+
private: // for use by ThreadLocalStorage
/**
inline void SetVrEnabled( UpdateManager& manager, bool enabled )
{
- typedef MessageValue1< UpdateManager, OwnerPointer<bool> > LocalType;
+ typedef MessageValue1< UpdateManager, bool > LocalType;
// Reserve some memory inside the message queue
unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
- new (slot) LocalType( &manager, &UpdateManager::SetVrEnabled, &enabled );
+ new (slot) LocalType( &manager, &UpdateManager::SetVrEnabled, enabled );
}
} // namespace SceneGraph