Showing the changes to interface/src/Application.cpp (1 of 258 files). Show all
Unified · Split
| @@ -92,6 +92,7 @@ · 91 unmodified lines | ||
| 92 | 92 | #include <RenderableWebEntityItem.h> |
| 93 | 93 | #include <RenderDeferredTask.h> |
| 94 | 94 | #include <ResourceCache.h> |
| 95 | +#include <RenderScriptingInterface.h> | |
| 95 | 96 | #include <SceneScriptingInterface.h> |
| 96 | 97 | #include <RecordingScriptingInterface.h> |
| 97 | 98 | #include <ScriptCache.h> |
| @@ -104,6 +105,7 @@ · 6 unmodified lines | ||
| 104 | 105 | #include <VrMenu.h> |
| 105 | 106 | #include <recording/Deck.h> |
| 106 | 107 | #include <recording/Recorder.h> |
| 108 | +#include <QmlWebWindowClass.h> | |
| 107 | 109 | |
| 108 | 110 | #include "AnimDebugDraw.h" |
| 109 | 111 | #include "AudioClient.h" |
| @@ -344,6 +346,7 @@ bool setupEssentials(int& argc, char** argv) { · 234 unmodified lines | ||
| 344 | 346 | #endif |
| 345 | 347 | DependencyManager::set<DiscoverabilityManager>(); |
| 346 | 348 | DependencyManager::set<SceneScriptingInterface>(); |
| 349 | + DependencyManager::set<RenderScriptingInterface>(); | |
| 347 | 350 | DependencyManager::set<OffscreenUi>(); |
| 348 | 351 | DependencyManager::set<AutoUpdater>(); |
| 349 | 352 | DependencyManager::set<PathUtils>(); |
| @@ -365,6 +368,17 @@ Cube3DOverlay* _keyboardFocusHighlight{ nullptr }; · 15 unmodified lines | ||
| 365 | 368 | int _keyboardFocusHighlightID{ -1 }; |
| 366 | 369 | PluginContainer* _pluginContainer; |
| 367 | 370 | |
| 371 | + | |
| 372 | +// FIXME hack access to the internal share context for the Chromium helper | |
| 373 | +// Normally we'd want to use QWebEngine::initialize(), but we can't because | |
| 374 | +// our primary context is a QGLWidget, which can't easily be initialized to share | |
| 375 | +// from a QOpenGLContext. | |
| 376 | +// | |
| 377 | +// So instead we create a new offscreen context to share with the QGLWidget, | |
| 378 | +// and manually set THAT to be the shared context for the Chromium helper | |
| 379 | +OffscreenGLCanvas* _chromiumShareContext { nullptr }; | |
| 380 | +Q_GUI_EXPORT void qt_gl_set_global_share_context(QOpenGLContext *context); | |
| 381 | + | |
| 368 | 382 | Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : |
| 369 | 383 | QApplication(argc, argv), |
| 370 | 384 | _dependencyManagerIsSetup(setupEssentials(argc, argv)), |
| @@ -626,6 +640,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 255 unmodified lines | ||
| 626 | 640 | _glWidget->makeCurrent(); |
| 627 | 641 | _glWidget->initializeGL(); |
| 628 | 642 | |
| 643 | + _chromiumShareContext = new OffscreenGLCanvas(); | |
| 644 | + _chromiumShareContext->create(_glWidget->context()->contextHandle()); | |
| 645 | + _chromiumShareContext->makeCurrent(); | |
| 646 | + qt_gl_set_global_share_context(_chromiumShareContext->getContext()); | |
| 647 | + | |
| 629 | 648 | _offscreenContext = new OffscreenGLCanvas(); |
| 630 | 649 | _offscreenContext->create(_glWidget->context()->contextHandle()); |
| 631 | 650 | _offscreenContext->makeCurrent(); |
| @@ -689,13 +708,37 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 57 unmodified lines | ||
| 689 | 708 | } else if (action == controller::toInt(controller::Action::CONTEXT_MENU)) { |
| 690 | 709 | VrMenu::toggle(); // show context menu even on non-stereo displays |
| 691 | 710 | } else if (action == controller::toInt(controller::Action::RETICLE_X)) { |
| 692 | − auto globalPos = QCursor::pos(); | |
| 693 | − globalPos.setX(globalPos.x() + state); | |
| 694 | − QCursor::setPos(globalPos); | |
| 711 | + auto oldPos = QCursor::pos(); | |
| 712 | + auto newPos = oldPos; | |
| 713 | + newPos.setX(oldPos.x() + state); | |
| 714 | + QCursor::setPos(newPos); | |
| 715 | + | |
| 716 | + | |
| 717 | + // NOTE: This is some debugging code we will leave in while debugging various reticle movement strategies, | |
| 718 | + // remove it after we're done | |
| 719 | + const float REASONABLE_CHANGE = 50.0f; | |
| 720 | + glm::vec2 oldPosG = { oldPos.x(), oldPos.y() }; | |
| 721 | + glm::vec2 newPosG = { newPos.x(), newPos.y() }; | |
| 722 | + auto distance = glm::distance(oldPosG, newPosG); | |
| 723 | + if (distance > REASONABLE_CHANGE) { | |
| 724 | + qDebug() << "Action::RETICLE_X... UNREASONABLE CHANGE! distance:" << distance << " oldPos:" << oldPosG << " newPos:" << newPosG; | |
| 725 | + } | |
| 726 | + | |
| 695 | 727 | } else if (action == controller::toInt(controller::Action::RETICLE_Y)) { |
| 696 | − auto globalPos = QCursor::pos(); | |
| 697 | − globalPos.setY(globalPos.y() + state); | |
| 698 | − QCursor::setPos(globalPos); | |
| 728 | + auto oldPos = QCursor::pos(); | |
| 729 | + auto newPos = oldPos; | |
| 730 | + newPos.setY(oldPos.y() + state); | |
| 731 | + QCursor::setPos(newPos); | |
| 732 | + | |
| 733 | + // NOTE: This is some debugging code we will leave in while debugging various reticle movement strategies, | |
| 734 | + // remove it after we're done | |
| 735 | + const float REASONABLE_CHANGE = 50.0f; | |
| 736 | + glm::vec2 oldPosG = { oldPos.x(), oldPos.y() }; | |
| 737 | + glm::vec2 newPosG = { newPos.x(), newPos.y() }; | |
| 738 | + auto distance = glm::distance(oldPosG, newPosG); | |
| 739 | + if (distance > REASONABLE_CHANGE) { | |
| 740 | + qDebug() << "Action::RETICLE_Y... UNREASONABLE CHANGE! distance:" << distance << " oldPos:" << oldPosG << " newPos:" << newPosG; | |
| 741 | + } | |
| 699 | 742 | } |
| 700 | 743 | } |
| 701 | 744 | }); |
| @@ -709,9 +752,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 7 unmodified lines | ||
| 709 | 752 | _applicationStateDevice->addInputVariant(QString("ComfortMode"), controller::StateController::ReadLambda([]() -> float { |
| 710 | 753 | return (float)Menu::getInstance()->isOptionChecked(MenuOption::ComfortMode); |
| 711 | 754 | })); |
| 712 | − _applicationStateDevice->addInputVariant(QString("Grounded"), controller::StateController::ReadLambda([]() -> float { | |
| 713 | − return (float)qApp->getMyAvatar()->getCharacterController()->onGround(); | |
| 714 | − })); | |
| 755 | + _applicationStateDevice->addInputVariant(QString("Grounded"), controller::StateController::ReadLambda([]() -> float { | |
| 756 | + return (float)qApp->getMyAvatar()->getCharacterController()->onGround(); | |
| 757 | + })); | |
| 715 | 758 | |
| 716 | 759 | userInputMapper->registerDevice(_applicationStateDevice); |
| 717 | 760 | |
| @@ -1164,26 +1207,15 @@ void Application::paintGL() { · 446 unmodified lines | ||
| 1164 | 1207 | |
| 1165 | 1208 | if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) { |
| 1166 | 1209 | PerformanceTimer perfTimer("Mirror"); |
| 1167 | − auto primaryFbo = DependencyManager::get<FramebufferCache>()->getPrimaryFramebufferDepthColor(); | |
| 1210 | + auto primaryFbo = DependencyManager::get<FramebufferCache>()->getPrimaryFramebuffer(); | |
| 1168 | 1211 | |
| 1169 | 1212 | renderArgs._renderMode = RenderArgs::MIRROR_RENDER_MODE; |
| 1213 | + renderArgs._blitFramebuffer = DependencyManager::get<FramebufferCache>()->getSelfieFramebuffer(); | |
| 1214 | + | |
| 1170 | 1215 | renderRearViewMirror(&renderArgs, _mirrorViewRect); |
| 1171 | − renderArgs._renderMode = RenderArgs::DEFAULT_RENDER_MODE; | |
| 1172 | 1216 | |
| 1173 | − { | |
| 1174 | − float ratio = ((float)QApplication::desktop()->windowHandle()->devicePixelRatio() * getRenderResolutionScale()); | |
| 1175 | − // Flip the src and destination rect horizontally to do the mirror | |
| 1176 | − auto mirrorRect = glm::ivec4(0, 0, _mirrorViewRect.width() * ratio, _mirrorViewRect.height() * ratio); | |
| 1177 | − auto mirrorRectDest = glm::ivec4(mirrorRect.z, mirrorRect.y, mirrorRect.x, mirrorRect.w); | |
| 1178 | − | |
| 1179 | − auto selfieFbo = DependencyManager::get<FramebufferCache>()->getSelfieFramebuffer(); | |
| 1180 | − gpu::doInBatch(renderArgs._context, [=](gpu::Batch& batch) { | |
| 1181 | − batch.setFramebuffer(selfieFbo); | |
| 1182 | − batch.clearColorFramebuffer(gpu::Framebuffer::BUFFER_COLOR0, glm::vec4(0.0f, 0.0f, 0.0f, 0.0f)); | |
| 1183 | − batch.blit(primaryFbo, mirrorRect, selfieFbo, mirrorRectDest); | |
| 1184 | − batch.setFramebuffer(nullptr); | |
| 1185 | − }); | |
| 1186 | − } | |
| 1217 | + renderArgs._blitFramebuffer.reset(); | |
| 1218 | + renderArgs._renderMode = RenderArgs::DEFAULT_RENDER_MODE; | |
| 1187 | 1219 | } |
| 1188 | 1220 | |
| 1189 | 1221 | { |
| @@ -1263,15 +1295,14 @@ void Application::paintGL() { · 73 unmodified lines | ||
| 1263 | 1295 | hmdOffset.x = -hmdOffset.x; |
| 1264 | 1296 | |
| 1265 | 1297 | _myCamera.setPosition(myAvatar->getDefaultEyePosition() |
| 1266 | − + glm::vec3(0, _raiseMirror * myAvatar->getAvatarScale(), 0) | |
| 1298 | + + glm::vec3(0, _raiseMirror * myAvatar->getUniformScale(), 0) | |
| 1267 | 1299 | + mirrorBodyOrientation * glm::vec3(0.0f, 0.0f, 1.0f) * MIRROR_FULLSCREEN_DISTANCE * _scaleMirror |
| 1268 | 1300 | + mirrorBodyOrientation * hmdOffset); |
| 1269 | − | |
| 1270 | 1301 | } else { |
| 1271 | 1302 | _myCamera.setRotation(myAvatar->getWorldAlignedOrientation() |
| 1272 | 1303 | * glm::quat(glm::vec3(0.0f, PI + _rotateMirror, 0.0f))); |
| 1273 | 1304 | _myCamera.setPosition(myAvatar->getDefaultEyePosition() |
| 1274 | − + glm::vec3(0, _raiseMirror * myAvatar->getAvatarScale(), 0) | |
| 1305 | + + glm::vec3(0, _raiseMirror * myAvatar->getUniformScale(), 0) | |
| 1275 | 1306 | + (myAvatar->getOrientation() * glm::quat(glm::vec3(0.0f, _rotateMirror, 0.0f))) * |
| 1276 | 1307 | glm::vec3(0.0f, 0.0f, -1.0f) * MIRROR_FULLSCREEN_DISTANCE * _scaleMirror); |
| 1277 | 1308 | } |
| @@ -1355,65 +1386,11 @@ void Application::paintGL() { · 77 unmodified lines | ||
| 1355 | 1386 | renderArgs._context->setStereoProjections(eyeProjections); |
| 1356 | 1387 | renderArgs._context->setStereoViews(eyeOffsets); |
| 1357 | 1388 | } |
| 1389 | + renderArgs._blitFramebuffer = finalFramebuffer; | |
| 1358 | 1390 | displaySide(&renderArgs, _myCamera); |
| 1359 | − renderArgs._context->enableStereo(false); | |
| 1360 | 1391 | |
| 1361 | − // Blit primary to final FBO | |
| 1362 | − auto primaryFbo = framebufferCache->getPrimaryFramebuffer(); | |
| 1363 | − | |
| 1364 | − if (renderArgs._renderMode == RenderArgs::MIRROR_RENDER_MODE) { | |
| 1365 | − if (displayPlugin->isStereo()) { | |
| 1366 | − gpu::doInBatch(renderArgs._context, [=](gpu::Batch& batch) { | |
| 1367 | − gpu::Vec4i srcRectLeft; | |
| 1368 | − srcRectLeft.z = size.width() / 2; | |
| 1369 | − srcRectLeft.w = size.height(); | |
| 1370 | − | |
| 1371 | − gpu::Vec4i srcRectRight; | |
| 1372 | − srcRectRight.x = size.width() / 2; | |
| 1373 | − srcRectRight.z = size.width(); | |
| 1374 | − srcRectRight.w = size.height(); | |
| 1375 | − | |
| 1376 | − gpu::Vec4i destRectLeft; | |
| 1377 | − destRectLeft.x = srcRectLeft.z; | |
| 1378 | − destRectLeft.z = srcRectLeft.x; | |
| 1379 | − destRectLeft.y = srcRectLeft.y; | |
| 1380 | − destRectLeft.w = srcRectLeft.w; | |
| 1381 | − | |
| 1382 | − gpu::Vec4i destRectRight; | |
| 1383 | − destRectRight.x = srcRectRight.z; | |
| 1384 | − destRectRight.z = srcRectRight.x; | |
| 1385 | − destRectRight.y = srcRectRight.y; | |
| 1386 | − destRectRight.w = srcRectRight.w; | |
| 1387 | − | |
| 1388 | − batch.setFramebuffer(finalFramebuffer); | |
| 1389 | − batch.clearColorFramebuffer(gpu::Framebuffer::BUFFER_COLOR0, glm::vec4(0.0f, 0.0f, 1.0f, 0.0f)); | |
| 1390 | − // BLit left to right and right to left in stereo | |
| 1391 | − batch.blit(primaryFbo, srcRectRight, finalFramebuffer, destRectLeft); | |
| 1392 | − batch.blit(primaryFbo, srcRectLeft, finalFramebuffer, destRectRight); | |
| 1393 | − }); | |
| 1394 | − } else { | |
| 1395 | − gpu::doInBatch(renderArgs._context, [=](gpu::Batch& batch) { | |
| 1396 | − gpu::Vec4i srcRect; | |
| 1397 | − srcRect.z = size.width(); | |
| 1398 | − srcRect.w = size.height(); | |
| 1399 | − gpu::Vec4i destRect; | |
| 1400 | − destRect.x = size.width(); | |
| 1401 | − destRect.y = 0; | |
| 1402 | − destRect.z = 0; | |
| 1403 | − destRect.w = size.height(); | |
| 1404 | − batch.setFramebuffer(finalFramebuffer); | |
| 1405 | − batch.blit(primaryFbo, srcRect, finalFramebuffer, destRect); | |
| 1406 | − }); | |
| 1407 | − } | |
| 1408 | − } else { | |
| 1409 | − gpu::doInBatch(renderArgs._context, [=](gpu::Batch& batch) { | |
| 1410 | − gpu::Vec4i rect; | |
| 1411 | − rect.z = size.width(); | |
| 1412 | − rect.w = size.height(); | |
| 1413 | − batch.setFramebuffer(finalFramebuffer); | |
| 1414 | − batch.blit(primaryFbo, rect, finalFramebuffer, rect); | |
| 1415 | − }); | |
| 1416 | − } | |
| 1392 | + renderArgs._blitFramebuffer.reset(); | |
| 1393 | + renderArgs._context->enableStereo(false); | |
| 1417 | 1394 | } |
| 1418 | 1395 | |
| 1419 | 1396 | // Overlay Composition, needs to occur after screen space effects have completed |
| @@ -1421,7 +1398,9 @@ void Application::paintGL() { · 1 unmodified line | ||
| 1421 | 1398 | { |
| 1422 | 1399 | PROFILE_RANGE(__FUNCTION__ "/compositor"); |
| 1423 | 1400 | PerformanceTimer perfTimer("compositor"); |
| 1401 | + | |
| 1424 | 1402 | auto primaryFbo = finalFramebuffer; |
| 1403 | + | |
| 1425 | 1404 | glBindFramebuffer(GL_DRAW_FRAMEBUFFER, gpu::GLBackend::getFramebufferID(primaryFbo)); |
| 1426 | 1405 | if (displayPlugin->isStereo()) { |
| 1427 | 1406 | QRect currentViewport(QPoint(0, 0), QSize(size.width() / 2, size.height())); |
| @@ -1446,7 +1425,9 @@ void Application::paintGL() { · 18 unmodified lines | ||
| 1446 | 1425 | { |
| 1447 | 1426 | PROFILE_RANGE(__FUNCTION__ "/pluginOutput"); |
| 1448 | 1427 | PerformanceTimer perfTimer("pluginOutput"); |
| 1428 | + | |
| 1449 | 1429 | auto finalTexturePointer = finalFramebuffer->getRenderBuffer(0); |
| 1430 | + | |
| 1450 | 1431 | GLuint finalTexture = gpu::GLBackend::getTextureID(finalTexturePointer); |
| 1451 | 1432 | Q_ASSERT(0 != finalTexture); |
| 1452 | 1433 | |
| @@ -2574,7 +2555,7 @@ void Application::init() { · 1121 unmodified lines | ||
| 2574 | 2555 | |
| 2575 | 2556 | _environment.init(); |
| 2576 | 2557 | |
| 2577 | − DependencyManager::get<DeferredLightingEffect>()->init(this); | |
| 2558 | + DependencyManager::get<DeferredLightingEffect>()->init(); | |
| 2578 | 2559 | |
| 2579 | 2560 | DependencyManager::get<AvatarManager>()->init(); |
| 2580 | 2561 | _myCamera.setMode(CAMERA_MODE_FIRST_PERSON); |
| @@ -2992,6 +2973,9 @@ void Application::update(float deltaTime) { · 411 unmodified lines | ||
| 2992 | 2973 | _physicsEngine->changeObjects(motionStates); |
| 2993 | 2974 | |
| 2994 | 2975 | myAvatar->prepareForPhysicsSimulation(); |
| 2976 | + _physicsEngine->forEachAction([&](EntityActionPointer action) { | |
| 2977 | + action->prepareForPhysicsSimulation(); | |
| 2978 | + }); | |
| 2995 | 2979 | |
| 2996 | 2980 | getEntities()->getTree()->withWriteLock([&] { |
| 2997 | 2981 | _physicsEngine->stepSimulation(); |
| @@ -3404,7 +3388,7 @@ QImage Application::renderAvatarBillboard(RenderArgs* renderArgs) { · 406 unmodified lines | ||
| 3404 | 3388 | renderArgs->_renderMode = RenderArgs::DEFAULT_RENDER_MODE; |
| 3405 | 3389 | renderRearViewMirror(renderArgs, QRect(0, 0, BILLBOARD_SIZE, BILLBOARD_SIZE), true); |
| 3406 | 3390 | |
| 3407 | − auto primaryFbo = DependencyManager::get<FramebufferCache>()->getPrimaryFramebufferDepthColor(); | |
| 3391 | + auto primaryFbo = DependencyManager::get<FramebufferCache>()->getPrimaryFramebuffer(); | |
| 3408 | 3392 | QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32); |
| 3409 | 3393 | renderArgs->_context->downloadFramebuffer(primaryFbo, glm::ivec4(0, 0, BILLBOARD_SIZE, BILLBOARD_SIZE), image); |
| 3410 | 3394 | |
| @@ -3674,34 +3658,19 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 263 unmodified lines | ||
| 3674 | 3658 | // For now every frame pass the renderContext |
| 3675 | 3659 | { |
| 3676 | 3660 | PerformanceTimer perfTimer("EngineRun"); |
| 3677 | − render::RenderContext renderContext; | |
| 3678 | − | |
| 3679 | − auto sceneInterface = DependencyManager::get<SceneScriptingInterface>(); | |
| 3680 | 3661 | |
| 3681 | − renderContext._cullOpaque = sceneInterface->doEngineCullOpaque(); | |
| 3682 | − renderContext._sortOpaque = sceneInterface->doEngineSortOpaque(); | |
| 3683 | − renderContext._renderOpaque = sceneInterface->doEngineRenderOpaque(); | |
| 3684 | − renderContext._cullTransparent = sceneInterface->doEngineCullTransparent(); | |
| 3685 | − renderContext._sortTransparent = sceneInterface->doEngineSortTransparent(); | |
| 3686 | − renderContext._renderTransparent = sceneInterface->doEngineRenderTransparent(); | |
| 3687 | − | |
| 3688 | − renderContext._maxDrawnOpaqueItems = sceneInterface->getEngineMaxDrawnOpaqueItems(); | |
| 3689 | − renderContext._maxDrawnTransparentItems = sceneInterface->getEngineMaxDrawnTransparentItems(); | |
| 3690 | − renderContext._maxDrawnOverlay3DItems = sceneInterface->getEngineMaxDrawnOverlay3DItems(); | |
| 3691 | − | |
| 3692 | − renderContext._drawItemStatus = sceneInterface->doEngineDisplayItemStatus(); | |
| 3693 | − if (Menu::getInstance()->isOptionChecked(MenuOption::PhysicsShowOwned)) { | |
| 3694 | − renderContext._drawItemStatus |= render::showNetworkStatusFlag; | |
| 3695 | − } | |
| 3696 | − renderContext._drawHitEffect = sceneInterface->doEngineDisplayHitEffect(); | |
| 3697 | − | |
| 3698 | − renderContext._occlusionStatus = Menu::getInstance()->isOptionChecked(MenuOption::DebugAmbientOcclusion); | |
| 3699 | − renderContext._fxaaStatus = Menu::getInstance()->isOptionChecked(MenuOption::Antialiasing); | |
| 3662 | + auto renderInterface = DependencyManager::get<RenderScriptingInterface>(); | |
| 3663 | + auto renderContext = renderInterface->getRenderContext(); | |
| 3700 | 3664 | |
| 3701 | 3665 | renderArgs->_shouldRender = LODManager::shouldRender; |
| 3702 | − | |
| 3703 | − renderContext.args = renderArgs; | |
| 3704 | 3666 | renderArgs->_viewFrustum = getDisplayViewFrustum(); |
| 3667 | + renderContext.setArgs(renderArgs); | |
| 3668 | + | |
| 3669 | + bool occlusionStatus = Menu::getInstance()->isOptionChecked(MenuOption::DebugAmbientOcclusion); | |
| 3670 | + bool antialiasingStatus = Menu::getInstance()->isOptionChecked(MenuOption::Antialiasing); | |
| 3671 | + bool showOwnedStatus = Menu::getInstance()->isOptionChecked(MenuOption::PhysicsShowOwned); | |
| 3672 | + renderContext.setOptions(occlusionStatus, antialiasingStatus, showOwnedStatus); | |
| 3673 | + | |
| 3705 | 3674 | _renderEngine->setRenderContext(renderContext); |
| 3706 | 3675 | |
| 3707 | 3676 | // Before the deferred pass, let's try to use the render engine |
| @@ -3709,15 +3678,8 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 1 unmodified line | ||
| 3709 | 3678 | _renderEngine->run(); |
| 3710 | 3679 | myAvatar->endRenderRun(); |
| 3711 | 3680 | |
| 3712 | − auto engineRC = _renderEngine->getRenderContext(); | |
| 3713 | − sceneInterface->setEngineFeedOpaqueItems(engineRC->_numFeedOpaqueItems); | |
| 3714 | − sceneInterface->setEngineDrawnOpaqueItems(engineRC->_numDrawnOpaqueItems); | |
| 3715 | − | |
| 3716 | − sceneInterface->setEngineFeedTransparentItems(engineRC->_numFeedTransparentItems); | |
| 3717 | − sceneInterface->setEngineDrawnTransparentItems(engineRC->_numDrawnTransparentItems); | |
| 3718 | − | |
| 3719 | − sceneInterface->setEngineFeedOverlay3DItems(engineRC->_numFeedOverlay3DItems); | |
| 3720 | − sceneInterface->setEngineDrawnOverlay3DItems(engineRC->_numDrawnOverlay3DItems); | |
| 3681 | + auto engineContext = _renderEngine->getRenderContext(); | |
| 3682 | + renderInterface->setItemCounts(engineContext->getItemsConfig()); | |
| 3721 | 3683 | } |
| 3722 | 3684 | |
| 3723 | 3685 | activeRenderingThread = nullptr; |
| @@ -4143,6 +4105,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 419 unmodified lines | ||
| 4143 | 4105 | LocationScriptingInterface::locationSetter); |
| 4144 | 4106 | |
| 4145 | 4107 | scriptEngine->registerFunction("WebWindow", WebWindowClass::constructor, 1); |
| 4108 | + scriptEngine->registerFunction("OverlayWebWindow", QmlWebWindowClass::constructor); | |
| 4146 | 4109 | |
| 4147 | 4110 | scriptEngine->registerGlobalObject("Menu", MenuScriptingInterface::getInstance()); |
| 4148 | 4111 | scriptEngine->registerGlobalObject("Stats", Stats::getInstance()); |
| @@ -4171,11 +4134,12 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 22 unmodified lines | ||
| 4171 | 4134 | scriptEngine->registerFunction("HMD", "getHUDLookAtPosition3D", HMDScriptingInterface::getHUDLookAtPosition3D, 0); |
| 4172 | 4135 | |
| 4173 | 4136 | scriptEngine->registerGlobalObject("Scene", DependencyManager::get<SceneScriptingInterface>().data()); |
| 4137 | + scriptEngine->registerGlobalObject("Render", DependencyManager::get<RenderScriptingInterface>().data()); | |
| 4174 | 4138 | |
| 4175 | 4139 | scriptEngine->registerGlobalObject("ScriptDiscoveryService", this->getRunningScriptsWidget()); |
| 4176 | 4140 | } |
| 4177 | 4141 | |
| 4178 | −bool Application::canAcceptURL(const QString& urlString) { | |
| 4142 | +bool Application::canAcceptURL(const QString& urlString) const { | |
| 4179 | 4143 | QUrl url(urlString); |
| 4180 | 4144 | if (urlString.startsWith(HIFI_URL_SCHEME)) { |
| 4181 | 4145 | return true; |