mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
initial interface setup for platform
This commit is contained in:
parent
06dc9fc39f
commit
f09f6ebd08
8 changed files with 1069 additions and 992 deletions
|
@ -209,7 +209,7 @@ link_hifi_libraries(
|
||||||
model-networking model-baker entities avatars trackers
|
model-networking model-baker entities avatars trackers
|
||||||
audio audio-client animation script-engine physics
|
audio audio-client animation script-engine physics
|
||||||
render-utils entities-renderer avatars-renderer ui qml auto-updater midi
|
render-utils entities-renderer avatars-renderer ui qml auto-updater midi
|
||||||
controllers plugins image trackers
|
controllers plugins image trackers platform
|
||||||
ui-plugins display-plugins input-plugins
|
ui-plugins display-plugins input-plugins
|
||||||
# Platform specific GL libraries
|
# Platform specific GL libraries
|
||||||
${PLATFORM_GL_BACKEND}
|
${PLATFORM_GL_BACKEND}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -79,6 +79,8 @@
|
||||||
|
|
||||||
#include "Sound.h"
|
#include "Sound.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class GLCanvas;
|
class GLCanvas;
|
||||||
class FaceTracker;
|
class FaceTracker;
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
|
@ -172,6 +174,7 @@ public:
|
||||||
void raise();
|
void raise();
|
||||||
|
|
||||||
void showCursor(const Cursor::Icon& cursor);
|
void showCursor(const Cursor::Icon& cursor);
|
||||||
|
void InitializePlatform();
|
||||||
|
|
||||||
bool isThrottleRendering() const;
|
bool isThrottleRendering() const;
|
||||||
|
|
||||||
|
|
3
libraries/platform/CMakeLists.txt
Normal file
3
libraries/platform/CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
set(TARGET_NAME platform)
|
||||||
|
setup_hifi_library()
|
||||||
|
link_hifi_libraries(shared)
|
23
libraries/platform/src/WINPlatform.cpp
Normal file
23
libraries/platform/src/WINPlatform.cpp
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
//
|
||||||
|
// Created by Amer Cerkic 05/02/2019
|
||||||
|
// Copyright 2019 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "WINPlatform.h"
|
||||||
|
|
||||||
|
using namespace platform;
|
||||||
|
|
||||||
|
bool WINInstance::enumerateProcessors() {
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string WINInstance::getProcessor(int index) {
|
||||||
|
|
||||||
|
return "Fake processor";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
21
libraries/platform/src/WINPlatform.h
Normal file
21
libraries/platform/src/WINPlatform.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
//
|
||||||
|
// Created by Amer Cerkic 05/02/2019
|
||||||
|
// Copyright 2019 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
namespace platform {
|
||||||
|
|
||||||
|
class WINInstance : public Instance {
|
||||||
|
|
||||||
|
public:
|
||||||
|
bool enumerateProcessors();
|
||||||
|
std::string getProcessor(int index);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace platform
|
39
libraries/platform/src/platform.cpp
Normal file
39
libraries/platform/src/platform.cpp
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
//
|
||||||
|
// Created by Amer Cerkic 05/02/2019
|
||||||
|
// Copyright 2019 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "platform.h"
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#include "WINPlatform.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
|
#include "MACPlatform.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using namespace platform;
|
||||||
|
|
||||||
|
void platform::create() {
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
_instance =new WINInstance();
|
||||||
|
#elif Q_OS_MAC
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string platform::getProcessor(int index) {
|
||||||
|
return _instance->getProcessor(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool platform::enumerateProcessors() {
|
||||||
|
return _instance->enumerateProcessors();
|
||||||
|
}
|
33
libraries/platform/src/platform.h
Normal file
33
libraries/platform/src/platform.h
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
//
|
||||||
|
// Created by Amer Cerkic 05/02/2019
|
||||||
|
// Copyright 2019 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace platform {
|
||||||
|
|
||||||
|
class Instance {
|
||||||
|
|
||||||
|
public:
|
||||||
|
std::string virtual getProcessor(int index) = 0;
|
||||||
|
bool virtual enumerateProcessors() = 0;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::vector<std::string> _processors;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static Instance *_instance;
|
||||||
|
|
||||||
|
void create();
|
||||||
|
std::string getProcessor(int index);
|
||||||
|
bool enumerateProcessors();
|
||||||
|
}
|
Loading…
Reference in a new issue