mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 08:23:04 +02:00
Add PhysicsShowOwned back to Menu
This commit is contained in:
parent
4354eae129
commit
e770d7b679
5 changed files with 27 additions and 11 deletions
|
@ -673,13 +673,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
_offscreenContext->makeCurrent();
|
_offscreenContext->makeCurrent();
|
||||||
initializeGL();
|
initializeGL();
|
||||||
|
|
||||||
// Start rendering
|
|
||||||
render::CullFunctor cullFunctor = LODManager::shouldRender;
|
|
||||||
_renderEngine->addJob<RenderShadowTask>("RenderShadowTask", cullFunctor);
|
|
||||||
_renderEngine->addJob<RenderDeferredTask>("RenderDeferredTask", cullFunctor);
|
|
||||||
_renderEngine->registerScene(_main3DScene);
|
|
||||||
// TODO: Load a cached config file
|
|
||||||
|
|
||||||
_offscreenContext->makeCurrent();
|
_offscreenContext->makeCurrent();
|
||||||
|
|
||||||
// Tell our entity edit sender about our known jurisdictions
|
// Tell our entity edit sender about our known jurisdictions
|
||||||
|
@ -1150,9 +1143,17 @@ void Application::initializeGL() {
|
||||||
initDisplay();
|
initDisplay();
|
||||||
qCDebug(interfaceapp, "Initialized Display.");
|
qCDebug(interfaceapp, "Initialized Display.");
|
||||||
|
|
||||||
|
// Set up the render engine
|
||||||
|
render::CullFunctor cullFunctor = LODManager::shouldRender;
|
||||||
|
_renderEngine->addJob<RenderShadowTask>("RenderShadowTask", cullFunctor);
|
||||||
|
_renderEngine->addJob<RenderDeferredTask>("RenderDeferredTask", cullFunctor);
|
||||||
|
_renderEngine->registerScene(_main3DScene);
|
||||||
|
// TODO: Load a cached config file
|
||||||
|
|
||||||
// The UI can't be created until the primary OpenGL
|
// The UI can't be created until the primary OpenGL
|
||||||
// context is created, because it needs to share
|
// context is created, because it needs to share
|
||||||
// texture resources
|
// texture resources
|
||||||
|
// Needs to happen AFTER the render engine initialization to access its configuration
|
||||||
initializeUi();
|
initializeUi();
|
||||||
qCDebug(interfaceapp, "Initialized Offscreen UI.");
|
qCDebug(interfaceapp, "Initialized Offscreen UI.");
|
||||||
_offscreenContext->makeCurrent();
|
_offscreenContext->makeCurrent();
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "devices/Faceshift.h"
|
#include "devices/Faceshift.h"
|
||||||
#include "input-plugins/SpacemouseManager.h"
|
#include "input-plugins/SpacemouseManager.h"
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
|
#include "render/DrawStatus.h"
|
||||||
#include "scripting/MenuScriptingInterface.h"
|
#include "scripting/MenuScriptingInterface.h"
|
||||||
#include "ui/AssetUploadDialogFactory.h"
|
#include "ui/AssetUploadDialogFactory.h"
|
||||||
#include "ui/DialogsManager.h"
|
#include "ui/DialogsManager.h"
|
||||||
|
@ -584,6 +585,11 @@ Menu::Menu() {
|
||||||
|
|
||||||
// Developer > Physics >>>
|
// Developer > Physics >>>
|
||||||
MenuWrapper* physicsOptionsMenu = developerMenu->addMenu("Physics");
|
MenuWrapper* physicsOptionsMenu = developerMenu->addMenu("Physics");
|
||||||
|
{
|
||||||
|
auto drawStatusConfig = qApp->getRenderEngine()->getConfiguration()->getConfig<render::DrawStatus>();
|
||||||
|
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowOwned,
|
||||||
|
0, false, drawStatusConfig, SLOT(setShowNetwork(bool)));
|
||||||
|
}
|
||||||
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowHulls);
|
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowHulls);
|
||||||
|
|
||||||
// Developer > Display Crash Options
|
// Developer > Display Crash Options
|
||||||
|
|
|
@ -245,6 +245,7 @@ namespace MenuOption {
|
||||||
const QString PackageModel = "Package Model...";
|
const QString PackageModel = "Package Model...";
|
||||||
const QString Pair = "Pair";
|
const QString Pair = "Pair";
|
||||||
const QString PhysicsShowHulls = "Draw Collision Hulls";
|
const QString PhysicsShowHulls = "Draw Collision Hulls";
|
||||||
|
const QString PhysicsShowOwned = "Highlight Simulation Ownership";
|
||||||
const QString PipelineWarnings = "Log Render Pipeline Warnings";
|
const QString PipelineWarnings = "Log Render Pipeline Warnings";
|
||||||
const QString Preferences = "General...";
|
const QString Preferences = "General...";
|
||||||
const QString Quit = "Quit";
|
const QString Quit = "Quit";
|
||||||
|
|
|
@ -27,7 +27,10 @@
|
||||||
|
|
||||||
using namespace render;
|
using namespace render;
|
||||||
|
|
||||||
|
void DrawStatusConfig::dirtyHelper() {
|
||||||
|
enabled = showNetwork || showDisplay;
|
||||||
|
emit dirty();
|
||||||
|
}
|
||||||
|
|
||||||
const gpu::PipelinePointer DrawStatus::getDrawItemBoundsPipeline() {
|
const gpu::PipelinePointer DrawStatus::getDrawItemBoundsPipeline() {
|
||||||
if (!_drawItemBoundsPipeline) {
|
if (!_drawItemBoundsPipeline) {
|
||||||
|
|
|
@ -18,15 +18,20 @@
|
||||||
namespace render {
|
namespace render {
|
||||||
class DrawStatusConfig : public Job::Config {
|
class DrawStatusConfig : public Job::Config {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool enabled MEMBER enabled)
|
Q_PROPERTY(bool showDisplay MEMBER showDisplay WRITE setShowDisplay)
|
||||||
Q_PROPERTY(bool showDisplay MEMBER showDisplay NOTIFY dirty)
|
Q_PROPERTY(bool showNetwork MEMBER showNetwork WRITE setShowNetwork)
|
||||||
Q_PROPERTY(bool showNetwork MEMBER showDisplay NOTIFY dirty)
|
|
||||||
public:
|
public:
|
||||||
DrawStatusConfig() : Job::Config(false) {}
|
DrawStatusConfig() : Job::Config(false) {}
|
||||||
|
|
||||||
|
void dirtyHelper();
|
||||||
|
|
||||||
bool showDisplay{ false };
|
bool showDisplay{ false };
|
||||||
bool showNetwork{ false };
|
bool showNetwork{ false };
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void setShowDisplay(bool enabled) { showDisplay = enabled; dirtyHelper(); }
|
||||||
|
void setShowNetwork(bool enabled) { showNetwork = enabled; dirtyHelper(); }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void dirty();
|
void dirty();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue