mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-06 09:43:17 +02:00
Pre-merge cleanup
This commit is contained in:
parent
82464ee4be
commit
58530c595a
34 changed files with 293 additions and 262 deletions
0
interface/compiledResources/.placeholder
Normal file
0
interface/compiledResources/.placeholder
Normal file
Binary file not shown.
|
@ -1,135 +1,89 @@
|
|||
name = being_of_light
|
||||
name = mannequin
|
||||
type = body+head
|
||||
scale = 1
|
||||
filename = being_of_light/being_of_light.fbx
|
||||
texdir = being_of_light/textures
|
||||
filename = mannequin/mannequin.baked.fbx
|
||||
joint = jointRoot = Hips
|
||||
joint = jointLeftHand = LeftHand
|
||||
joint = jointHead = HeadTop_End
|
||||
joint = jointLean = Spine
|
||||
joint = jointLeftHand = LeftHand
|
||||
joint = jointHead = Head
|
||||
joint = jointEyeLeft = LeftEye
|
||||
joint = jointRightHand = RightHand
|
||||
joint = jointNeck = Head
|
||||
joint = jointEyeRight = RightEye
|
||||
joint = jointRightHand = RightHand
|
||||
joint = jointNeck = Neck
|
||||
freeJoint = LeftArm
|
||||
freeJoint = LeftForeArm
|
||||
freeJoint = RightArm
|
||||
freeJoint = RightForeArm
|
||||
bs = MouthFrown_L = Frown_Left = 1
|
||||
bs = MouthLeft = Midmouth_Left = 1
|
||||
bs = BrowsU_R = BrowsUp_Right = 1
|
||||
bs = ChinUpperRaise = UpperLipUp_Right = 0.5
|
||||
bs = ChinUpperRaise = UpperLipUp_Left = 0.5
|
||||
bs = MouthSmile_R = Smile_Right = 1
|
||||
bs = MouthDimple_L = Smile_Left = 0.25
|
||||
bs = EyeBlink_L = Blink_Left = 1
|
||||
bs = BrowsD_L = BrowsDown_Left = 1
|
||||
bs = MouthFrown_R = Frown_Right = 1
|
||||
bs = MouthDimple_R = Smile_Right = 0.25
|
||||
bs = Sneer = Squint_Right = 0.5
|
||||
bs = Sneer = Squint_Left = 0.5
|
||||
bs = Sneer = NoseScrunch_Right = 0.75
|
||||
bs = Sneer = NoseScrunch_Left = 0.75
|
||||
bs = EyeSquint_L = Squint_Left = 1
|
||||
bs = EyeBlink_R = Blink_Right = 1
|
||||
bs = JawLeft = JawRotateY_Left = 0.5
|
||||
bs = BrowsD_R = BrowsDown_Right = 1
|
||||
bs = EyeSquint_R = Squint_Right = 1
|
||||
bs = Puff = CheekPuff_Right = 1
|
||||
bs = Puff = CheekPuff_Left = 1
|
||||
bs = LipsUpperClose = UpperLipIn = 1
|
||||
bs = JawOpen = MouthOpen = 0.69999999999999996
|
||||
bs = LipsUpperUp = UpperLipUp_Right = 0.69999999999999996
|
||||
bs = LipsUpperUp = UpperLipUp_Left = 0.69999999999999996
|
||||
bs = LipsLowerDown = LowerLipDown_Right = 0.69999999999999996
|
||||
bs = LipsLowerDown = LowerLipDown_Left = 0.69999999999999996
|
||||
bs = LipsLowerOpen = LowerLipOut = 1
|
||||
bs = EyeOpen_L = EyesWide_Left = 1
|
||||
bs = LipsPucker = MouthNarrow_Right = 1
|
||||
bs = LipsPucker = MouthNarrow_Left = 1
|
||||
bs = EyeOpen_R = EyesWide_Right = 1
|
||||
bs = JawRight = Jaw_Right = 1
|
||||
bs = MouthRight = Midmouth_Right = 1
|
||||
bs = ChinLowerRaise = Jaw_Up = 1
|
||||
bs = LipsUpperOpen = UpperLipOut = 1
|
||||
bs = BrowsU_C = BrowsUp_Right = 1
|
||||
bs = BrowsU_C = BrowsUp_Left = 1
|
||||
bs = JawFwd = JawForeward = 1
|
||||
bs = BrowsU_L = BrowsUp_Left = 1
|
||||
bs = MouthSmile_L = Smile_Left = 1
|
||||
bs = LipsLowerClose = LowerLipIn = 1
|
||||
bs = LipsFunnel = TongueUp = 1
|
||||
bs = LipsFunnel = MouthWhistle_NarrowAdjust_Right = 0.5
|
||||
bs = LipsFunnel = MouthWhistle_NarrowAdjust_Left = 0.5
|
||||
bs = LipsFunnel = MouthNarrow_Right = 1
|
||||
bs = LipsFunnel = MouthNarrow_Left = 1
|
||||
bs = LipsFunnel = Jaw_Down = 0.35999999999999999
|
||||
bs = LipsFunnel = JawForeward = 0.39000000000000001
|
||||
jointIndex = LeftHandIndex1 = 50
|
||||
jointIndex = LeftHandIndex2 = 51
|
||||
jointIndex = LeftHandIndex3 = 52
|
||||
jointIndex = LeftHandIndex4 = 53
|
||||
jointIndex = Spine1 = 12
|
||||
jointIndex = Spine2 = 13
|
||||
jointIndex = RightHandThumb1 = 18
|
||||
jointIndex = RightHandThumb2 = 19
|
||||
jointIndex = RightHandThumb3 = 20
|
||||
jointIndex = RightHandThumb4 = 21
|
||||
jointIndex = LeftFoot = 8
|
||||
jointIndex = LeftForeArm = 40
|
||||
jointIndex = Neck = 62
|
||||
jointIndex = Head = 63
|
||||
jointIndex = Hips = 0
|
||||
jointIndex = RightHandPinky1 = 30
|
||||
jointIndex = RightHandPinky2 = 31
|
||||
jointIndex = RightHandPinky3 = 32
|
||||
jointIndex = RightHandPinky4 = 33
|
||||
jointIndex = RightLeg = 2
|
||||
jointIndex = RightForeArm = 16
|
||||
jointIndex = LeftHandRing1 = 46
|
||||
jointIndex = LeftHandRing2 = 47
|
||||
jointIndex = LeftHandRing3 = 48
|
||||
jointIndex = LeftHandRing4 = 49
|
||||
jointIndex = LeftHandThumb1 = 54
|
||||
jointIndex = LeftHandThumb2 = 55
|
||||
jointIndex = LeftHandThumb3 = 56
|
||||
jointIndex = LeftHandThumb4 = 57
|
||||
jointIndex = HeadTop_End = 66
|
||||
jointIndex = LeftUpLeg = 6
|
||||
jointIndex = LeftToeBase = 9
|
||||
jointIndex = LeftHandPinky1 = 42
|
||||
jointIndex = LeftHandPinky2 = 43
|
||||
jointIndex = LeftHandPinky3 = 44
|
||||
jointIndex = LeftHandPinky4 = 45
|
||||
jointIndex = LeftLeg = 7
|
||||
jointIndex = RightEye = 65
|
||||
jointIndex = RightHand = 17
|
||||
jointIndex = RightToeBase = 4
|
||||
jointIndex = RightUpLeg = 1
|
||||
jointIndex = RightArm = 15
|
||||
jointIndex = RightHandRing1 = 26
|
||||
jointIndex = RightHandRing2 = 27
|
||||
jointIndex = RightHandRing3 = 28
|
||||
jointIndex = RightHandRing4 = 29
|
||||
jointIndex = RightHandIndex1 = 22
|
||||
jointIndex = RightHandIndex2 = 23
|
||||
jointIndex = RightHandIndex3 = 24
|
||||
jointIndex = RightHandIndex4 = 25
|
||||
jointIndex = LeftToe_End = 10
|
||||
jointIndex = LeftHandMiddle1 = 58
|
||||
jointIndex = LeftHandMiddle2 = 59
|
||||
jointIndex = LeftHandMiddle3 = 60
|
||||
jointIndex = LeftShoulder = 38
|
||||
bs = EyeBlink_L = blink = 1
|
||||
bs = JawOpen = mouth_Open = 1
|
||||
bs = LipsFunnel = Oo = 1
|
||||
bs = BrowsU_L = brow_Up = 1
|
||||
jointIndex = RightHandPinky2 = 19
|
||||
jointIndex = LeftHandMiddle4 = 61
|
||||
jointIndex = RightFoot = 3
|
||||
jointIndex = LeftHand = 41
|
||||
jointIndex = RightHandMiddle1 = 34
|
||||
jointIndex = RightHandMiddle2 = 35
|
||||
jointIndex = LeftHandRing4 = 49
|
||||
jointIndex = RightHandMiddle3 = 36
|
||||
jointIndex = RightShoulder = 14
|
||||
jointIndex = LeftEye = 64
|
||||
jointIndex = LeftHandThumb4 = 57
|
||||
jointIndex = RightToe_End = 10
|
||||
jointIndex = LeftHandRing1 = 46
|
||||
jointIndex = LeftForeArm = 40
|
||||
jointIndex = RightHandIndex4 = 29
|
||||
jointIndex = LeftShoulder = 38
|
||||
jointIndex = RightHandMiddle4 = 37
|
||||
jointIndex = Body = 67
|
||||
jointIndex = LeftArm = 39
|
||||
jointIndex = RightToe_End = 5
|
||||
jointIndex = RightShoulder = 14
|
||||
jointIndex = LeftLeg = 2
|
||||
jointIndex = LeftToe_End = 5
|
||||
jointIndex = Hips = 0
|
||||
jointIndex = RightFoot = 8
|
||||
jointIndex = RightHandThumb2 = 31
|
||||
jointIndex = LeftHandMiddle3 = 60
|
||||
jointIndex = RightHandThumb1 = 30
|
||||
jointIndex = Neck = 62
|
||||
jointIndex = Spine = 11
|
||||
jointIndex = RightHandThumb4 = 33
|
||||
jointIndex = RightHandMiddle1 = 34
|
||||
jointIndex = LeftHandIndex4 = 53
|
||||
jointIndex = face = 68
|
||||
jointIndex = RightHandRing3 = 24
|
||||
jointIndex = LeftHandPinky4 = 45
|
||||
jointIndex = LeftHandMiddle2 = 59
|
||||
jointIndex = RightHandThumb3 = 32
|
||||
jointIndex = LeftHandPinky3 = 44
|
||||
jointIndex = HeadTop_End = 66
|
||||
jointIndex = Spine1 = 12
|
||||
jointIndex = LeftHandRing3 = 48
|
||||
jointIndex = mannequin1 = 67
|
||||
jointIndex = RightEye = 65
|
||||
jointIndex = RightHandRing4 = 25
|
||||
jointIndex = RightHandPinky4 = 21
|
||||
jointIndex = LeftHandRing2 = 47
|
||||
jointIndex = RightHandIndex3 = 28
|
||||
jointIndex = RightUpLeg = 6
|
||||
jointIndex = LeftArm = 39
|
||||
jointIndex = LeftHandThumb3 = 56
|
||||
jointIndex = RightHandIndex2 = 27
|
||||
jointIndex = RightForeArm = 16
|
||||
jointIndex = RightArm = 15
|
||||
jointIndex = RightHandRing2 = 23
|
||||
jointIndex = LeftHandMiddle1 = 58
|
||||
jointIndex = Spine2 = 13
|
||||
jointIndex = LeftHandThumb2 = 55
|
||||
jointIndex = RightHandMiddle2 = 35
|
||||
jointIndex = RightHandPinky1 = 18
|
||||
jointIndex = LeftUpLeg = 1
|
||||
jointIndex = RightLeg = 7
|
||||
jointIndex = LeftHandIndex2 = 51
|
||||
jointIndex = RightHand = 17
|
||||
jointIndex = LeftHandIndex3 = 52
|
||||
jointIndex = LeftFoot = 3
|
||||
jointIndex = RightHandPinky3 = 20
|
||||
jointIndex = RightHandIndex1 = 26
|
||||
jointIndex = LeftHandPinky1 = 42
|
||||
jointIndex = RightToeBase = 9
|
||||
jointIndex = LeftHandIndex1 = 50
|
||||
jointIndex = LeftToeBase = 4
|
||||
jointIndex = LeftHandPinky2 = 43
|
||||
jointIndex = RightHandRing1 = 22
|
||||
jointIndex = LeftHandThumb1 = 54
|
||||
jointIndex = LeftEye = 64
|
||||
jointIndex = Head = 63
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
|
||||
#include <gl/QOpenGLContextWrapper.h>
|
||||
|
||||
#include <shared/FileUtils.h>
|
||||
#include <shared/QtHelpers.h>
|
||||
#include <shared/GlobalAppProperties.h>
|
||||
#include <StatTracker.h>
|
||||
|
@ -321,7 +322,7 @@ static bool DISABLE_WATCHDOG = QProcessEnvironment::systemEnvironment().contains
|
|||
static bool DISABLE_DEFERRED = true;
|
||||
#else
|
||||
static const QString RENDER_FORWARD{ "HIFI_RENDER_FORWARD" };
|
||||
static bool DISABLE_DEFERRED = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD);
|
||||
static bool DISABLE_DEFERRED = QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD);
|
||||
#endif
|
||||
|
||||
static const int MAX_CONCURRENT_RESOURCE_DOWNLOADS = 16;
|
||||
|
@ -1047,7 +1048,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
DependencyManager::get<AddressManager>().data(), &AddressManager::storeCurrentAddress);
|
||||
|
||||
// Inititalize sample before registering
|
||||
_sampleSound = DependencyManager::get<SoundCache>()->getSound(QUrl(PathUtils::resourcesUrl() + "sounds/sample.wav"));
|
||||
_sampleSound = DependencyManager::get<SoundCache>()->getSound(PathUtils::resourcesUrl("sounds/sample.wav"));
|
||||
|
||||
auto scriptEngines = DependencyManager::get<ScriptEngines>().data();
|
||||
scriptEngines->registerScriptInitializer([this](ScriptEnginePointer engine){
|
||||
|
@ -1132,9 +1133,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
// Make sure we don't time out during slow operations at startup
|
||||
updateHeartbeat();
|
||||
|
||||
// Now that OpenGL is initialized, we are sure we have a valid context and can create the various pipeline shaders with success.
|
||||
// DependencyManager::get<GeometryCache>()->initializeShapePipelines();
|
||||
|
||||
// sessionRunTime will be reset soon by loadSettings. Grab it now to get previous session value.
|
||||
// The value will be 0 if the user blew away settings this session, which is both a feature and a bug.
|
||||
static const QString TESTER = "HIFI_TESTER";
|
||||
|
@ -1819,9 +1817,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
PROFILE_RANGE(render, "Process Default Skybox");
|
||||
auto textureCache = DependencyManager::get<TextureCache>();
|
||||
|
||||
auto skyboxUrl = QFileSelector().select(PathUtils::resourcesPath() + "images/Default-Sky-9-cubemap.ktx").toStdString();
|
||||
QFileSelector fileSelector;
|
||||
fileSelector.setExtraSelectors(FileUtils::getFileSelectors());
|
||||
auto skyboxUrl = fileSelector.select(PathUtils::resourcesPath() + "images/Default-Sky-9-cubemap.ktx");
|
||||
|
||||
_defaultSkyboxTexture = gpu::Texture::unserialize(skyboxUrl);
|
||||
_defaultSkyboxTexture = gpu::Texture::unserialize(skyboxUrl.toStdString());
|
||||
_defaultSkyboxAmbientTexture = _defaultSkyboxTexture;
|
||||
|
||||
_defaultSkybox->setCubemap(_defaultSkyboxTexture);
|
||||
|
@ -1832,7 +1832,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
return entityServerNode && !isPhysicsEnabled();
|
||||
});
|
||||
|
||||
_snapshotSound = DependencyManager::get<SoundCache>()->getSound(QUrl(PathUtils::resourcesUrl() + "sounds/snap.wav"));
|
||||
_snapshotSound = DependencyManager::get<SoundCache>()->getSound(PathUtils::resourcesUrl("sounds/snap.wav"));
|
||||
|
||||
QVariant testProperty = property(hifi::properties::TEST);
|
||||
qDebug() << testProperty;
|
||||
|
@ -2224,7 +2224,6 @@ void Application::initializeGL() {
|
|||
_isGLInitialized = true;
|
||||
}
|
||||
|
||||
gl::initModuleGl();
|
||||
_glWidget->makeCurrent();
|
||||
if (!nsightActive()) {
|
||||
_chromiumShareContext = new OffscreenGLCanvas();
|
||||
|
@ -2364,7 +2363,7 @@ void Application::initializeUi() {
|
|||
offscreenUi->setProxyWindow(_window->windowHandle());
|
||||
// OffscreenUi is a subclass of OffscreenQmlSurface specifically designed to
|
||||
// support the window management and scripting proxies for VR use
|
||||
offscreenUi->createDesktop(PathUtils::qmlBaseUrl("hifi/Desktop.qml"));
|
||||
offscreenUi->createDesktop(PathUtils::qmlUrl("hifi/Desktop.qml"));
|
||||
// FIXME either expose so that dialogs can set this themselves or
|
||||
// do better detection in the offscreen UI of what has focus
|
||||
offscreenUi->setNavigationFocused(false);
|
||||
|
@ -5867,9 +5866,6 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe
|
|||
scriptEngine->registerGlobalObject("UserActivityLogger", DependencyManager::get<UserActivityLoggerScriptingInterface>().data());
|
||||
scriptEngine->registerGlobalObject("Users", DependencyManager::get<UsersScriptingInterface>().data());
|
||||
|
||||
scriptEngine->registerGlobalObject("App", this);
|
||||
scriptEngine->registerFunction("App", "isAndroid", Application::isAndroid, 0);
|
||||
|
||||
scriptEngine->registerGlobalObject("LimitlessSpeechRecognition", DependencyManager::get<LimitlessVoiceRecognitionScriptingInterface>().data());
|
||||
scriptEngine->registerGlobalObject("GooglePoly", DependencyManager::get<GooglePolyScriptingInterface>().data());
|
||||
|
||||
|
@ -7463,18 +7459,6 @@ void Application::updateThreadPoolCount() const {
|
|||
QThreadPool::globalInstance()->setMaxThreadCount(threadPoolSize);
|
||||
}
|
||||
|
||||
QScriptValue Application::isAndroid(QScriptContext* context, QScriptEngine* engine) {
|
||||
return QScriptValue(engine, isAndroid());
|
||||
}
|
||||
|
||||
bool Application::isAndroid() {
|
||||
#ifdef Q_OS_ANDROID
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Application::updateSystemTabletMode() {
|
||||
qApp->setProperty(hifi::properties::HMD, isHMDMode());
|
||||
if (isHMDMode()) {
|
||||
|
|
|
@ -284,9 +284,6 @@ public:
|
|||
bool getSaveAvatarOverrideUrl() { return _saveAvatarOverrideUrl; }
|
||||
void saveNextPhysicsStats(QString filename);
|
||||
|
||||
static Q_INVOKABLE QScriptValue isAndroid(QScriptContext* context, QScriptEngine* engine);
|
||||
static bool isAndroid();
|
||||
|
||||
signals:
|
||||
void svoImportRequested(const QString& url);
|
||||
|
||||
|
|
|
@ -1801,7 +1801,7 @@ void MyAvatar::initAnimGraph() {
|
|||
} else if (!_fstAnimGraphOverrideUrl.isEmpty()) {
|
||||
graphUrl = _fstAnimGraphOverrideUrl;
|
||||
} else {
|
||||
graphUrl = QUrl(PathUtils::resourcesUrl() + "avatar/avatar-animation.json");
|
||||
graphUrl = PathUtils::resourcesUrl("avatar/avatar-animation.json");
|
||||
}
|
||||
|
||||
_skeletonModel->getRig().initAnimGraph(graphUrl);
|
||||
|
|
|
@ -48,11 +48,6 @@ int main(int argc, const char* argv[]) {
|
|||
CrashReporter crashReporter { BUG_SPLAT_DATABASE, BUG_SPLAT_APPLICATION_NAME, BuildInfo::VERSION };
|
||||
#endif
|
||||
|
||||
#if USE_GLES
|
||||
qputenv("QT_ANGLE_PLATFORM", "d3d11");
|
||||
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
|
||||
#endif
|
||||
|
|
|
@ -139,8 +139,7 @@ void AssetMappingsScriptingInterface::uploadFile(QString path, QString mapping,
|
|||
void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue callback) {
|
||||
auto assetClient = DependencyManager::get<AssetClient>();
|
||||
auto request = assetClient->createDeleteMappingsRequest(paths);
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
// TODO: just to make android compile
|
||||
|
||||
connect(request, &DeleteMappingsRequest::finished, this, [this, callback](DeleteMappingsRequest* request) mutable {
|
||||
if (callback.isCallable()) {
|
||||
QJSValueList args { request->getErrorString() };
|
||||
|
@ -149,7 +148,6 @@ void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue
|
|||
|
||||
request->deleteLater();
|
||||
});
|
||||
#endif
|
||||
|
||||
request->start();
|
||||
}
|
||||
|
@ -157,8 +155,7 @@ void AssetMappingsScriptingInterface::deleteMappings(QStringList paths, QJSValue
|
|||
void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) {
|
||||
auto assetClient = DependencyManager::get<AssetClient>();
|
||||
auto request = assetClient->createGetAllMappingsRequest();
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
// TODO: just to make android compile
|
||||
|
||||
connect(request, &GetAllMappingsRequest::finished, this, [this, callback](GetAllMappingsRequest* request) mutable {
|
||||
auto mappings = request->getMappings();
|
||||
auto map = callback.engine()->newObject();
|
||||
|
@ -174,7 +171,6 @@ void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) {
|
|||
|
||||
request->deleteLater();
|
||||
});
|
||||
#endif
|
||||
|
||||
request->start();
|
||||
}
|
||||
|
@ -182,8 +178,7 @@ void AssetMappingsScriptingInterface::getAllMappings(QJSValue callback) {
|
|||
void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString newPath, QJSValue callback) {
|
||||
auto assetClient = DependencyManager::get<AssetClient>();
|
||||
auto request = assetClient->createRenameMappingRequest(oldPath, newPath);
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
// TODO: just to make android compile
|
||||
|
||||
connect(request, &RenameMappingRequest::finished, this, [this, callback](RenameMappingRequest* request) mutable {
|
||||
if (callback.isCallable()) {
|
||||
QJSValueList args{ request->getErrorString() };
|
||||
|
@ -192,15 +187,14 @@ void AssetMappingsScriptingInterface::renameMapping(QString oldPath, QString new
|
|||
|
||||
request->deleteLater();
|
||||
});
|
||||
#endif
|
||||
|
||||
request->start();
|
||||
}
|
||||
|
||||
void AssetMappingsScriptingInterface::setBakingEnabled(QStringList paths, bool enabled, QJSValue callback) {
|
||||
auto assetClient = DependencyManager::get<AssetClient>();
|
||||
auto request = assetClient->createSetBakingEnabledRequest(paths, enabled);
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
// TODO: just to make android compile
|
||||
|
||||
connect(request, &SetBakingEnabledRequest::finished, this, [this, callback](SetBakingEnabledRequest* request) mutable {
|
||||
if (callback.isCallable()) {
|
||||
QJSValueList args{ request->getErrorString() };
|
||||
|
@ -209,7 +203,7 @@ void AssetMappingsScriptingInterface::setBakingEnabled(QStringList paths, bool e
|
|||
|
||||
request->deleteLater();
|
||||
});
|
||||
#endif
|
||||
|
||||
request->start();
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ AvatarData::~AvatarData() {
|
|||
QUrl AvatarData::_defaultFullAvatarModelUrl = {}; // In C++, if this initialization were in the AvatarInfo, every file would have it's own copy, even for class vars.
|
||||
const QUrl& AvatarData::defaultFullAvatarModelUrl() {
|
||||
if (_defaultFullAvatarModelUrl.isEmpty()) {
|
||||
_defaultFullAvatarModelUrl = QUrl(PathUtils::resourcesUrl() + "/meshes/defaultAvatar_full.fst");
|
||||
_defaultFullAvatarModelUrl = PathUtils::resourcesUrl("/meshes/defaultAvatar_full.fst");
|
||||
}
|
||||
return _defaultFullAvatarModelUrl;
|
||||
}
|
||||
|
|
|
@ -13,10 +13,17 @@
|
|||
|
||||
#include <mutex>
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_WIN)
|
||||
#elif defined(Q_OS_ANDROID)
|
||||
#elif defined(Q_OS_MAC)
|
||||
#include <OpenGL/CGLCurrent.h>
|
||||
#else
|
||||
#include <GL/glx.h>
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
|
||||
static void* getGlProcessAddress(const char *namez) {
|
||||
|
@ -52,6 +59,13 @@ static void* getGlProcessAddress(const char *namez) {
|
|||
return (void*)result;
|
||||
}
|
||||
|
||||
#elif defined(Q_OS_MAC)
|
||||
#else
|
||||
|
||||
static void* getGlProcessAddress(const char *namez) {
|
||||
return (void*)glXGetProcAddressARB((const GLubyte*)namez);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -135,8 +135,6 @@ void Context::clear() {
|
|||
|
||||
#if defined(GL_CUSTOM_CONTEXT)
|
||||
|
||||
#pragma optimize( "", off)
|
||||
|
||||
static void debugMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam) {
|
||||
if (GL_DEBUG_SEVERITY_NOTIFICATION == severity) {
|
||||
return;
|
||||
|
@ -367,8 +365,6 @@ void Context::create() {
|
|||
doneCurrent();
|
||||
}
|
||||
|
||||
#pragma optimize( "", on)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -41,8 +41,6 @@ bool GLWindow::makeCurrent() {
|
|||
qCDebug(glLogging) << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
||||
});
|
||||
|
||||
//Q_ASSERT(_context->qglContext() == QOpenGLContext::currentContext());
|
||||
|
||||
return makeCurrentResult;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <QtCore/QDebug>
|
||||
|
||||
#include <StatTracker.h>
|
||||
#include <shared/FileUtils.h>
|
||||
|
||||
#include "ResourceManager.h"
|
||||
|
||||
|
@ -37,7 +38,9 @@ void FileResourceRequest::doSend() {
|
|||
|
||||
|
||||
// Allow platform specific versions of files loaded out of a resource cache via file://
|
||||
filename = QFileSelector().select(filename);
|
||||
QFileSelector fileSelector;
|
||||
fileSelector.setExtraSelectors(FileUtils::getFileSelectors());
|
||||
filename = fileSelector.select(filename);
|
||||
|
||||
if (!_byteRange.isValid()) {
|
||||
_result = ResourceRequest::InvalidByteRange;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <GLMHelpers.h>
|
||||
#include <PathUtils.h>
|
||||
#include <ViewFrustum.h>
|
||||
#include <shared/FileUtils.h>
|
||||
|
||||
#include <gpu/Batch.h>
|
||||
#include <gpu/Context.h>
|
||||
|
@ -230,7 +231,6 @@ static void loadLightProgram(const char* vertSource, const char* fragSource, boo
|
|||
}
|
||||
|
||||
#include <shared/Shapes.h>
|
||||
#include <QtCore/QFileSelector>
|
||||
|
||||
model::MeshPointer DeferredLightingEffect::getPointLightMesh() {
|
||||
if (!_pointLightMesh) {
|
||||
|
@ -565,9 +565,9 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext,
|
|||
|
||||
// Haze
|
||||
if (haze) {
|
||||
batch.setUniformBuffer(HAZE_MODEL_BUFFER_SLOT, haze->getHazeParametersBuffer());
|
||||
batch.setUniformBuffer(HAZE_MODEL_BUFFER_SLOT, haze->getHazeParametersBuffer());
|
||||
}
|
||||
|
||||
|
||||
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
||||
|
||||
deferredLightingEffect->unsetKeyLightBatch(batch, locations->lightBufferUnit, locations->ambientBufferUnit, SKYBOX_MAP_UNIT);
|
||||
|
@ -734,9 +734,11 @@ void DefaultLightingSetup::run(const RenderContextPointer& renderContext) {
|
|||
PROFILE_RANGE(render, "Process Default Skybox");
|
||||
auto textureCache = DependencyManager::get<TextureCache>();
|
||||
|
||||
auto skyboxUrl = QFileSelector().select(PathUtils::resourcesPath() + "images/Default-Sky-9-cubemap.ktx").toStdString();
|
||||
QFileSelector fileSelector;
|
||||
fileSelector.setExtraSelectors(FileUtils::getFileSelectors());
|
||||
auto skyboxUrl = fileSelector.select(PathUtils::resourcesPath() + "images/Default-Sky-9-cubemap.ktx");
|
||||
|
||||
_defaultSkyboxTexture = gpu::Texture::unserialize(skyboxUrl);
|
||||
_defaultSkyboxTexture = gpu::Texture::unserialize(skyboxUrl.toStdString());
|
||||
_defaultSkyboxAmbientTexture = _defaultSkyboxTexture;
|
||||
|
||||
_defaultSkybox->setCubemap(_defaultSkyboxTexture);
|
||||
|
|
|
@ -96,7 +96,7 @@ protected:
|
|||
|
||||
float enableObscurance{ 1.0f };
|
||||
|
||||
float enableMaterialTexturing { 0.0f };
|
||||
float enableMaterialTexturing { 1.0f };
|
||||
float enableWireframe { 0.0f }; // false by default
|
||||
|
||||
Parameters() {}
|
||||
|
@ -148,7 +148,7 @@ public:
|
|||
bool enableSpecular{ true };
|
||||
|
||||
bool enableAlbedo{ true };
|
||||
bool enableMaterialTexturing { false };
|
||||
bool enableMaterialTexturing { true };
|
||||
|
||||
bool enableAmbientLight{ true };
|
||||
bool enableDirectionalLight{ true };
|
||||
|
|
|
@ -73,12 +73,16 @@ const QString& PathUtils::resourcesUrl() {
|
|||
return staticResourcePath;
|
||||
}
|
||||
|
||||
QUrl PathUtils::resourcesUrl(const QString& relativeUrl) {
|
||||
return QUrl(resourcesUrl() + relativeUrl);
|
||||
}
|
||||
|
||||
const QString& PathUtils::qmlBaseUrl() {
|
||||
static const QString staticResourcePath = resourcesUrl() + "qml/";
|
||||
return staticResourcePath;
|
||||
}
|
||||
|
||||
QUrl PathUtils::qmlBaseUrl(const QString& relativeUrl) {
|
||||
QUrl PathUtils::qmlUrl(const QString& relativeUrl) {
|
||||
return QUrl(qmlBaseUrl() + relativeUrl);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,9 +34,10 @@ class PathUtils : public QObject, public Dependency {
|
|||
Q_PROPERTY(QUrl defaultScripts READ defaultScriptsLocation CONSTANT)
|
||||
public:
|
||||
static const QString& resourcesUrl();
|
||||
static QUrl resourcesUrl(const QString& relative);
|
||||
static const QString& resourcesPath();
|
||||
static const QString& qmlBaseUrl();
|
||||
static QUrl qmlBaseUrl(const QString& relative);
|
||||
static QUrl qmlUrl(const QString& relative);
|
||||
#ifdef DEV_BUILD
|
||||
static const QString& projectRootPath();
|
||||
#endif
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
#include "FileUtils.h"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFileInfo>
|
||||
|
@ -21,8 +23,21 @@
|
|||
#include <QtCore/QRegularExpression>
|
||||
#include <QtGui/QDesktopServices>
|
||||
|
||||
|
||||
#include "../SharedLogging.h"
|
||||
|
||||
const QStringList& FileUtils::getFileSelectors() {
|
||||
static std::once_flag once;
|
||||
static QStringList extraSelectors;
|
||||
std::call_once(once, [] {
|
||||
#if defined(USE_GLES)
|
||||
extraSelectors << "gles";
|
||||
#endif
|
||||
});
|
||||
return extraSelectors;
|
||||
|
||||
}
|
||||
|
||||
|
||||
QString FileUtils::readFile(const QString& filename) {
|
||||
QFile file(filename);
|
||||
|
|
|
@ -13,10 +13,11 @@
|
|||
#define hifi_FileUtils_h
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <QtCore/QFileSelector>
|
||||
class FileUtils {
|
||||
|
||||
public:
|
||||
static const QStringList& getFileSelectors();
|
||||
static void locateFile(QString fileName);
|
||||
static QString standardPath(QString subfolder);
|
||||
static QString readFile(const QString& filename);
|
||||
|
|
|
@ -46,7 +46,7 @@ void InfoView::show(const QString& path, bool firstOrChangedOnly, QString urlQue
|
|||
registerType();
|
||||
QUrl url;
|
||||
if (QDir(path).isRelative()) {
|
||||
url = QUrl(PathUtils::resourcesUrl() + path);
|
||||
url = PathUtils::resourcesUrl(path);
|
||||
} else {
|
||||
url = QUrl::fromLocalFile(path);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <QQuickItem>
|
||||
|
||||
#include <PathUtils.h>
|
||||
|
||||
class QQmlContext;
|
||||
|
||||
#define HIFI_QML_DECL \
|
||||
|
@ -42,7 +43,7 @@ public: \
|
|||
private:
|
||||
|
||||
#define HIFI_QML_DEF(x) \
|
||||
const QUrl x::QML = PathUtils::qmlBaseUrl(#x ".qml"); \
|
||||
const QUrl x::QML = PathUtils::qmlUrl(#x ".qml"); \
|
||||
const QString x::NAME = #x; \
|
||||
\
|
||||
void x::registerType() { \
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
withWriteLock([&] {
|
||||
for (auto url : urls) {
|
||||
if (url.isRelative()) {
|
||||
url = PathUtils::qmlBaseUrl(url.toString());
|
||||
url = PathUtils::qmlUrl(url.toString());
|
||||
}
|
||||
_callbacks[url].push_back(callback);
|
||||
}
|
||||
|
@ -1535,4 +1535,4 @@ void OffscreenQmlSurface::sendToQml(const QVariant& message) {
|
|||
}
|
||||
|
||||
|
||||
#include "OffscreenQmlSurface.moc"
|
||||
#include "OffscreenQmlSurface.moc"
|
||||
|
|
|
@ -173,7 +173,7 @@ void TabletScriptingInterface::preloadSounds() {
|
|||
const QStringList &audioSettings = tabletSoundsButtonClick.get();
|
||||
for (int i = 0; i < TabletAudioEvents::Last; i++) {
|
||||
SharedSoundPointer sound = DependencyManager::get<SoundCache>()->
|
||||
getSound(QUrl(PathUtils::resourcesUrl() + audioSettings.at(i)));
|
||||
getSound(PathUtils::resourcesUrl(audioSettings.at(i)));
|
||||
_audioEvents.insert(static_cast<TabletAudioEvents>(i), sound);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,14 +16,13 @@
|
|||
#if !defined(Q_OS_ANDROID)
|
||||
static const QString QML_WEB_ENGINE_STORAGE_NAME = "qmlWebEngine";
|
||||
|
||||
FileTypeProfile::FileTypeProfile(QObject* parent)
|
||||
: QQuickWebEngineProfile(parent)
|
||||
FileTypeProfile::FileTypeProfile(QObject* parent) :
|
||||
QQuickWebEngineProfile(parent)
|
||||
{
|
||||
static const QString WEB_ENGINE_USER_AGENT = "Chrome/48.0 (HighFidelityInterface)";
|
||||
setHttpUserAgent(WEB_ENGINE_USER_AGENT);
|
||||
|
||||
auto requestInterceptor = new FileTypeRequestInterceptor(this);
|
||||
setRequestInterceptor(requestInterceptor);
|
||||
|
||||
}
|
||||
#endif
|
|
@ -22,4 +22,4 @@ void FileTypeRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo& info
|
|||
RequestFilters::interceptFileType(info);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -17,12 +17,13 @@
|
|||
|
||||
static const QString QML_WEB_ENGINE_STORAGE_NAME = "qmlWebEngine";
|
||||
|
||||
HFWebEngineProfile::HFWebEngineProfile(QObject* parent)
|
||||
: QQuickWebEngineProfile(parent)
|
||||
HFWebEngineProfile::HFWebEngineProfile(QObject* parent) :
|
||||
QQuickWebEngineProfile(parent)
|
||||
{
|
||||
setStorageName(QML_WEB_ENGINE_STORAGE_NAME);
|
||||
|
||||
// we use the HFWebEngineRequestInterceptor to make sure that web requests are authenticated for the interface user
|
||||
auto requestInterceptor = new HFWebEngineRequestInterceptor(this);
|
||||
auto requestInterceptor = new HFWebEngineRequestInterceptor(this);
|
||||
setRequestInterceptor(requestInterceptor);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,4 +22,4 @@ void HFWebEngineRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo& i
|
|||
RequestFilters::interceptHFWebEngineRequest(info);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -79,4 +79,4 @@ void RequestFilters::interceptFileType(QWebEngineUrlRequestInfo& info) {
|
|||
info.setHttpHeader(CONTENT_HEADER.toLocal8Bit(), TYPE_VALUE.toLocal8Bit());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
110
scripts/+android/defaultScripts.js
Normal file
110
scripts/+android/defaultScripts.js
Normal file
|
@ -0,0 +1,110 @@
|
|||
"use strict";
|
||||
/* jslint vars: true, plusplus: true */
|
||||
|
||||
//
|
||||
// defaultScripts.js
|
||||
// examples
|
||||
//
|
||||
// Copyright 2014 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
|
||||
//
|
||||
|
||||
var DEFAULT_SCRIPTS_COMBINED = [
|
||||
"system/progress.js"/*,
|
||||
"system/away.js",
|
||||
"system/controllers/controllerDisplayManager.js",
|
||||
"system/controllers/handControllerGrabAndroid.js",
|
||||
"system/controllers/handControllerPointerAndroid.js",
|
||||
"system/controllers/squeezeHands.js",
|
||||
"system/controllers/grab.js",
|
||||
"system/controllers/teleport.js",
|
||||
"system/controllers/toggleAdvancedMovementForHandControllers.js",
|
||||
"system/dialTone.js",
|
||||
"system/firstPersonHMD.js",
|
||||
"system/bubble.js",
|
||||
"system/android.js",
|
||||
"developer/debugging/debugAndroidMouse.js"*/
|
||||
];
|
||||
|
||||
var DEFAULT_SCRIPTS_SEPARATE = [ ];
|
||||
|
||||
// add a menu item for debugging
|
||||
var MENU_CATEGORY = "Developer";
|
||||
var MENU_ITEM = "Debug defaultScripts.js";
|
||||
|
||||
var SETTINGS_KEY = '_debugDefaultScriptsIsChecked';
|
||||
var previousSetting = Settings.getValue(SETTINGS_KEY);
|
||||
|
||||
if (previousSetting === '' || previousSetting === false || previousSetting === 'false') {
|
||||
previousSetting = false;
|
||||
}
|
||||
|
||||
if (previousSetting === true || previousSetting === 'true') {
|
||||
previousSetting = true;
|
||||
}
|
||||
|
||||
if (Menu.menuExists(MENU_CATEGORY) && !Menu.menuItemExists(MENU_CATEGORY, MENU_ITEM)) {
|
||||
Menu.addMenuItem({
|
||||
menuName: MENU_CATEGORY,
|
||||
menuItemName: MENU_ITEM,
|
||||
isCheckable: true,
|
||||
isChecked: previousSetting,
|
||||
grouping: "Advanced"
|
||||
});
|
||||
}
|
||||
|
||||
function loadSeparateDefaults() {
|
||||
for (var i in DEFAULT_SCRIPTS_SEPARATE) {
|
||||
Script.load(DEFAULT_SCRIPTS_SEPARATE[i]);
|
||||
}
|
||||
}
|
||||
|
||||
function runDefaultsTogether() {
|
||||
for (var i in DEFAULT_SCRIPTS_COMBINED) {
|
||||
Script.include(DEFAULT_SCRIPTS_COMBINED[i]);
|
||||
}
|
||||
loadSeparateDefaults();
|
||||
}
|
||||
|
||||
function runDefaultsSeparately() {
|
||||
for (var i in DEFAULT_SCRIPTS_COMBINED) {
|
||||
Script.load(DEFAULT_SCRIPTS_COMBINED[i]);
|
||||
}
|
||||
loadSeparateDefaults();
|
||||
}
|
||||
|
||||
// start all scripts
|
||||
if (Menu.isOptionChecked(MENU_ITEM)) {
|
||||
// we're debugging individual default scripts
|
||||
// so we load each into its own ScriptEngine instance
|
||||
runDefaultsSeparately();
|
||||
} else {
|
||||
// include all default scripts into this ScriptEngine
|
||||
runDefaultsTogether();
|
||||
}
|
||||
|
||||
function menuItemEvent(menuItem) {
|
||||
if (menuItem === MENU_ITEM) {
|
||||
var isChecked = Menu.isOptionChecked(MENU_ITEM);
|
||||
if (isChecked === true) {
|
||||
Settings.setValue(SETTINGS_KEY, true);
|
||||
} else if (isChecked === false) {
|
||||
Settings.setValue(SETTINGS_KEY, false);
|
||||
}
|
||||
Menu.triggerOption("Reload All Scripts");
|
||||
}
|
||||
}
|
||||
|
||||
function removeMenuItem() {
|
||||
if (!Menu.isOptionChecked(MENU_ITEM)) {
|
||||
Menu.removeMenuItem(MENU_CATEGORY, MENU_ITEM);
|
||||
}
|
||||
}
|
||||
|
||||
Script.scriptEnding.connect(function() {
|
||||
removeMenuItem();
|
||||
});
|
||||
|
||||
Menu.menuItemEvent.connect(menuItemEvent);
|
|
@ -12,69 +12,31 @@
|
|||
//
|
||||
|
||||
var DEFAULT_SCRIPTS_COMBINED = [
|
||||
"system/progress.js",
|
||||
"system/away.js",
|
||||
"system/audio.js",
|
||||
"system/hmd.js",
|
||||
"system/menu.js",
|
||||
"system/bubble.js",
|
||||
"system/snapshot.js",
|
||||
"system/help.js",
|
||||
"system/pal.js", // "system/mod.js", // older UX, if you prefer
|
||||
"system/makeUserConnection.js",
|
||||
"system/tablet-goto.js",
|
||||
"system/marketplaces/marketplaces.js",
|
||||
"system/commerce/wallet.js",
|
||||
"system/edit.js",
|
||||
"system/notifications.js",
|
||||
"system/dialTone.js",
|
||||
"system/firstPersonHMD.js",
|
||||
"system/tablet-ui/tabletUI.js",
|
||||
"system/emote.js"
|
||||
];
|
||||
|
||||
function pushAll(dest, orig) {
|
||||
for (var k in orig) {
|
||||
dest.push(orig[k]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!App.isAndroid()) {
|
||||
pushAll(DEFAULT_SCRIPTS_COMBINED, [
|
||||
"system/progress.js",
|
||||
"system/away.js",
|
||||
"system/audio.js",
|
||||
"system/hmd.js",
|
||||
"system/menu.js",
|
||||
"system/bubble.js",
|
||||
"system/snapshot.js",
|
||||
"system/help.js",
|
||||
"system/pal.js", // "system/mod.js", // older UX, if you prefer
|
||||
"system/makeUserConnection.js",
|
||||
"system/tablet-goto.js",
|
||||
"system/marketplaces/marketplaces.js",
|
||||
"system/commerce/wallet.js",
|
||||
"system/edit.js",
|
||||
"system/notifications.js",
|
||||
"system/dialTone.js",
|
||||
"system/firstPersonHMD.js",
|
||||
"system/tablet-ui/tabletUI.js",
|
||||
"system/emote.js"
|
||||
]);
|
||||
} else {
|
||||
pushAll(DEFAULT_SCRIPTS_COMBINED, [
|
||||
"system/progress.js"/*,
|
||||
"system/away.js",
|
||||
"system/controllers/controllerDisplayManager.js",
|
||||
"system/controllers/handControllerGrabAndroid.js",
|
||||
"system/controllers/handControllerPointerAndroid.js",
|
||||
"system/controllers/squeezeHands.js",
|
||||
"system/controllers/grab.js",
|
||||
"system/controllers/teleport.js",
|
||||
"system/controllers/toggleAdvancedMovementForHandControllers.js",
|
||||
"system/dialTone.js",
|
||||
"system/firstPersonHMD.js",
|
||||
"system/bubble.js",
|
||||
"system/android.js",
|
||||
"developer/debugging/debugAndroidMouse.js"*/
|
||||
]);
|
||||
}
|
||||
|
||||
var DEFAULT_SCRIPTS_SEPARATE = [
|
||||
"system/controllers/controllerScripts.js"
|
||||
//"system/chat.js"
|
||||
];
|
||||
|
||||
|
||||
if (!App.isAndroid()) {
|
||||
pushAll(DEFAULT_SCRIPTS_SEPARATE, [
|
||||
"system/controllers/controllerScripts.js"
|
||||
]);
|
||||
} else {
|
||||
pushAll(DEFAULT_SCRIPTS_SEPARATE, []);
|
||||
}
|
||||
|
||||
// add a menu item for debugging
|
||||
var MENU_CATEGORY = "Developer";
|
||||
var MENU_ITEM = "Debug defaultScripts.js";
|
||||
|
|
|
@ -226,9 +226,7 @@ public:
|
|||
_context.makeCurrent();
|
||||
window->setSurfaceType(QSurface::OpenGLSurface);
|
||||
_context.makeCurrent(_context.qglContext(), window);
|
||||
#ifdef Q_OS_WIN
|
||||
wglSwapIntervalEXT(0);
|
||||
#endif
|
||||
gl::setSwapInterval(0);
|
||||
// GPU library init
|
||||
gpu::Context::init<gpu::gl::GLBackend>();
|
||||
_gpuContext = std::make_shared<gpu::Context>();
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include <vector>
|
||||
#include <sstream>
|
||||
|
||||
#include <gl/Config.h>
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QElapsedTimer>
|
||||
#include <QtCore/QLoggingCategory>
|
||||
|
@ -147,9 +149,7 @@ public:
|
|||
}
|
||||
|
||||
_context.makeCurrent();
|
||||
glewExperimental = true;
|
||||
glewInit();
|
||||
glGetError();
|
||||
gl::initModuleGl();
|
||||
|
||||
//wglSwapIntervalEXT(0);
|
||||
_frameTimes.resize(FRAME_TIME_BUFFER_SIZE, 0);
|
||||
|
@ -441,6 +441,7 @@ protected:
|
|||
}
|
||||
|
||||
void reportMemory() {
|
||||
#if !defined(USE_GLES)
|
||||
static GLint lastMemory = 0;
|
||||
GLint availableMem;
|
||||
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &availableMem);
|
||||
|
@ -449,6 +450,7 @@ protected:
|
|||
qDebug() << "Delta " << availableMem - lastMemory;
|
||||
}
|
||||
lastMemory = availableMem;
|
||||
#endif
|
||||
}
|
||||
|
||||
void derezTexture() {
|
||||
|
|
Loading…
Reference in a new issue