mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-17 18:46:31 +02:00
Switched to chared pointers and macros
This commit is contained in:
parent
cf6aa563ac
commit
e8a22f6f0f
5 changed files with 10 additions and 8 deletions
|
@ -194,7 +194,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
|||
_isVSyncOn(true),
|
||||
_aboutToQuit(false)
|
||||
{
|
||||
QSharedPointer<GLCanvas> glCanvas = DependencyManager::get<GLCanvas>();
|
||||
GLCanvas::SharedPointer glCanvas = DependencyManager::get<GLCanvas>();
|
||||
|
||||
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
||||
QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
|
||||
|
@ -442,7 +442,6 @@ void Application::aboutToQuit() {
|
|||
}
|
||||
|
||||
Application::~Application() {
|
||||
DependencyManager::get<GLCanvas>()->setParent(NULL);
|
||||
|
||||
_entities.getTree()->setSimulation(NULL);
|
||||
qInstallMessageHandler(NULL);
|
||||
|
|
|
@ -18,8 +18,10 @@
|
|||
#include <DependencyManager.h>
|
||||
|
||||
/// customized canvas that simply forwards requests/events to the singleton application
|
||||
class GLCanvas : public QGLWidget, public DependencyManager::Dependency {
|
||||
class GLCanvas : public QGLWidget {
|
||||
Q_OBJECT
|
||||
SINGLETON_DEPENDENCY(GLCanvas)
|
||||
|
||||
public:
|
||||
bool isThrottleRendering() const;
|
||||
|
||||
|
@ -60,8 +62,9 @@ private slots:
|
|||
|
||||
private:
|
||||
GLCanvas();
|
||||
~GLCanvas();
|
||||
friend class DependencyManager;
|
||||
~GLCanvas() {
|
||||
qDebug() << "Deleting GLCanvas";
|
||||
}
|
||||
};
|
||||
|
||||
#endif // hifi_GLCanvas_h
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
class DdeFaceTracker : public FaceTracker {
|
||||
Q_OBJECT
|
||||
SINGLETON_DEPENDENCY
|
||||
SINGLETON_DEPENDENCY(DdeFaceTracker)
|
||||
|
||||
public:
|
||||
//initialization
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
/// Handles interaction with the Faceshift software, which provides head position/orientation and facial features.
|
||||
class Faceshift : public FaceTracker {
|
||||
Q_OBJECT
|
||||
SINGLETON_DEPENDENCY
|
||||
SINGLETON_DEPENDENCY(Faceshift)
|
||||
|
||||
public:
|
||||
void init();
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace VisageSDK {
|
|||
/// Handles input from the Visage webcam feature tracking software.
|
||||
class Visage : public FaceTracker {
|
||||
Q_OBJECT
|
||||
SINGLETON_DEPENDENCY
|
||||
SINGLETON_DEPENDENCY(Visage)
|
||||
|
||||
public:
|
||||
void init();
|
||||
|
|
Loading…
Reference in a new issue