mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
commit
b7dd47efcb
14 changed files with 45 additions and 48 deletions
|
@ -5047,5 +5047,7 @@ void Application::emulateMouse(Hand* hand, float click, float shift, int index)
|
|||
void Application::crashApplication() {
|
||||
QObject* object = nullptr;
|
||||
bool value = object->isWindowType();
|
||||
Q_UNUSED(value);
|
||||
|
||||
qCDebug(interfaceapp) << "Intentionally crashed Interface";
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ Menu::Menu() {
|
|||
addActionToQMenuAndActionHash(toolsMenu, MenuOption::PackageModel, 0,
|
||||
qApp, SLOT(packageModel()));
|
||||
|
||||
MenuWrapper* displayMenu = addMenu(DisplayPlugin::MENU_PATH());
|
||||
addMenu(DisplayPlugin::MENU_PATH());
|
||||
{
|
||||
MenuWrapper* displayModeMenu = addMenu(MenuOption::OutputMenu);
|
||||
QActionGroup* displayModeGroup = new QActionGroup(displayModeMenu);
|
||||
|
|
|
@ -844,7 +844,6 @@ void MyAvatar::sendKillAvatar() {
|
|||
DependencyManager::get<NodeList>()->broadcastToNodes(std::move(killPacket), NodeSet() << NodeType::AvatarMixer);
|
||||
}
|
||||
|
||||
static int counter = 0;
|
||||
void MyAvatar::updateLookAtTargetAvatar() {
|
||||
//
|
||||
// Look at the avatar whose eyes are closest to the ray in direction of my avatar's head
|
||||
|
|
|
@ -206,8 +206,6 @@ void ApplicationCompositor::displayOverlayTexture(RenderArgs* renderArgs) {
|
|||
|
||||
updateTooltips();
|
||||
|
||||
auto deviceSize = qApp->getDeviceSize();
|
||||
|
||||
//Handle fading and deactivation/activation of UI
|
||||
gpu::Batch batch;
|
||||
|
||||
|
|
|
@ -80,32 +80,34 @@ void OpenGLDisplayPlugin::deactivate() {
|
|||
// Pass input events on to the application
|
||||
bool OpenGLDisplayPlugin::eventFilter(QObject* receiver, QEvent* event) {
|
||||
switch (event->type()) {
|
||||
case QEvent::MouseButtonPress:
|
||||
case QEvent::MouseButtonRelease:
|
||||
case QEvent::MouseButtonDblClick:
|
||||
case QEvent::MouseMove:
|
||||
case QEvent::Wheel:
|
||||
case QEvent::MouseButtonPress:
|
||||
case QEvent::MouseButtonRelease:
|
||||
case QEvent::MouseButtonDblClick:
|
||||
case QEvent::MouseMove:
|
||||
case QEvent::Wheel:
|
||||
|
||||
case QEvent::TouchBegin:
|
||||
case QEvent::TouchEnd:
|
||||
case QEvent::TouchUpdate:
|
||||
case QEvent::TouchBegin:
|
||||
case QEvent::TouchEnd:
|
||||
case QEvent::TouchUpdate:
|
||||
|
||||
case QEvent::FocusIn:
|
||||
case QEvent::FocusOut:
|
||||
case QEvent::FocusIn:
|
||||
case QEvent::FocusOut:
|
||||
|
||||
case QEvent::KeyPress:
|
||||
case QEvent::KeyRelease:
|
||||
case QEvent::ShortcutOverride:
|
||||
case QEvent::KeyPress:
|
||||
case QEvent::KeyRelease:
|
||||
case QEvent::ShortcutOverride:
|
||||
|
||||
case QEvent::DragEnter:
|
||||
case QEvent::Drop:
|
||||
case QEvent::DragEnter:
|
||||
case QEvent::Drop:
|
||||
|
||||
case QEvent::Resize:
|
||||
if (QCoreApplication::sendEvent(QCoreApplication::instance(), event)) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case QEvent::Resize:
|
||||
if (QCoreApplication::sendEvent(QCoreApplication::instance(), event)) {
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -141,4 +143,4 @@ bool OpenGLDisplayPlugin::isVsyncEnabled() {
|
|||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,20 +51,22 @@ protected:
|
|||
|
||||
private:
|
||||
static const QString NAME;
|
||||
|
||||
ovrHmd _hmd;
|
||||
float _ipd{ OVR_DEFAULT_IPD };
|
||||
unsigned int _frameIndex;
|
||||
ovrEyeRenderDesc _eyeRenderDescs[2];
|
||||
|
||||
ovrPosef _eyePoses[2];
|
||||
ovrVector3f _eyeOffsets[2];
|
||||
ovrFovPort _eyeFovs[2];
|
||||
|
||||
mat4 _eyeProjections[3];
|
||||
mat4 _compositeEyeProjections[2];
|
||||
uvec2 _desiredFramebufferSize;
|
||||
ovrTrackingState _trackingState;
|
||||
|
||||
#if (OVR_MAJOR_VERSION >= 6)
|
||||
ovrHmd _hmd;
|
||||
float _ipd{ OVR_DEFAULT_IPD };
|
||||
unsigned int _frameIndex;
|
||||
ovrEyeRenderDesc _eyeRenderDescs[2];
|
||||
ovrVector3f _eyeOffsets[2];
|
||||
ovrFovPort _eyeFovs[2];
|
||||
|
||||
ovrLayerEyeFov& getSceneLayer();
|
||||
ovrHmdDesc _hmdDesc;
|
||||
SwapFboPtr _sceneFbo;
|
||||
|
|
|
@ -34,7 +34,7 @@ const QString & OculusLegacyDisplayPlugin::getName() const {
|
|||
return NAME;
|
||||
}
|
||||
|
||||
OculusLegacyDisplayPlugin::OculusLegacyDisplayPlugin() : _ipd(OVR_DEFAULT_IPD) {
|
||||
OculusLegacyDisplayPlugin::OculusLegacyDisplayPlugin() {
|
||||
}
|
||||
|
||||
uvec2 OculusLegacyDisplayPlugin::getRecommendedRenderSize() const {
|
||||
|
|
|
@ -44,7 +44,6 @@ protected:
|
|||
private:
|
||||
static const QString NAME;
|
||||
|
||||
float _ipd{ OVR_DEFAULT_IPD };
|
||||
ovrHmd _hmd;
|
||||
unsigned int _frameIndex;
|
||||
ovrTrackingState _trackingState;
|
||||
|
|
|
@ -78,7 +78,7 @@ void StereoDisplayPlugin::activate() {
|
|||
}
|
||||
|
||||
void StereoDisplayPlugin::updateScreen() {
|
||||
for (int i = 0; i < _screenActions.size(); ++i) {
|
||||
for (int i = 0; i < (int) _screenActions.size(); ++i) {
|
||||
if (_screenActions[i]->isChecked()) {
|
||||
CONTAINER->setFullscreen(qApp->screens().at(i));
|
||||
break;
|
||||
|
|
|
@ -41,7 +41,6 @@ void GLBackend::do_setViewportTransform(Batch& batch, uint32 paramOffset) {
|
|||
if (_stereo._pass) {
|
||||
vp.x += vp.z;
|
||||
}
|
||||
int i = 0;
|
||||
}
|
||||
|
||||
glViewport(vp.x, vp.y, vp.z, vp.w);
|
||||
|
|
|
@ -65,11 +65,11 @@ void compileProgram(ProgramPtr & result, const std::string& vs, const std::strin
|
|||
.Compile()
|
||||
);
|
||||
result->Link();
|
||||
} catch (ProgramBuildError & err) {
|
||||
} catch (ProgramBuildError& err) {
|
||||
Q_UNUSED(err);
|
||||
qWarning() << err.Log().c_str();
|
||||
Q_ASSERT_X(false, "compileProgram", "Failed to build shader program");
|
||||
qFatal((const char*)err.Message);
|
||||
qFatal("%s", (const char*) err.Message);
|
||||
result.reset();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,16 +16,16 @@
|
|||
#include "WebSocketClass.h"
|
||||
|
||||
WebSocketClass::WebSocketClass(QScriptEngine* engine, QString url) :
|
||||
_engine(engine),
|
||||
_webSocket(new QWebSocket())
|
||||
_webSocket(new QWebSocket()),
|
||||
_engine(engine)
|
||||
{
|
||||
initialize();
|
||||
_webSocket->open(url);
|
||||
}
|
||||
|
||||
WebSocketClass::WebSocketClass(QScriptEngine* engine, QWebSocket* qWebSocket) :
|
||||
_engine(engine),
|
||||
_webSocket(qWebSocket)
|
||||
_webSocket(qWebSocket),
|
||||
_engine(engine)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
#include "WebSocketServerClass.h"
|
||||
|
||||
WebSocketServerClass::WebSocketServerClass(QScriptEngine* engine, const QString& serverName, const quint16 port) :
|
||||
_engine(engine),
|
||||
_webSocketServer(serverName, QWebSocketServer::SslMode::NonSecureMode)
|
||||
_webSocketServer(serverName, QWebSocketServer::SslMode::NonSecureMode),
|
||||
_engine(engine)
|
||||
{
|
||||
if (_webSocketServer.listen(QHostAddress::Any, port)) {
|
||||
connect(&_webSocketServer, &QWebSocketServer::newConnection, this, &WebSocketServerClass::onNewConnection);
|
||||
|
|
|
@ -378,8 +378,6 @@ glm::mat4 createMatFromQuatAndPos(const glm::quat& q, const glm::vec3& p) {
|
|||
|
||||
// cancel out roll and pitch
|
||||
glm::quat cancelOutRollAndPitch(const glm::quat& q) {
|
||||
glm::vec3 xAxis = q * glm::vec3(1, 0, 0);
|
||||
glm::vec3 yAxis = q * glm::vec3(0, 1, 0);
|
||||
glm::vec3 zAxis = q * glm::vec3(0, 0, 1);
|
||||
|
||||
// cancel out the roll and pitch
|
||||
|
@ -393,8 +391,6 @@ glm::quat cancelOutRollAndPitch(const glm::quat& q) {
|
|||
|
||||
// cancel out roll and pitch
|
||||
glm::mat4 cancelOutRollAndPitch(const glm::mat4& m) {
|
||||
glm::vec3 xAxis = glm::vec3(m[0]);
|
||||
glm::vec3 yAxis = glm::vec3(m[1]);
|
||||
glm::vec3 zAxis = glm::vec3(m[2]);
|
||||
|
||||
// cancel out the roll and pitch
|
||||
|
|
Loading…
Reference in a new issue