mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Merge fixes
This commit is contained in:
parent
caf93d1aff
commit
4b5c71e16d
1 changed files with 6 additions and 5 deletions
|
@ -526,6 +526,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_window->setCentralWidget(_glWidget);
|
_window->setCentralWidget(_glWidget);
|
||||||
|
|
||||||
_window->restoreGeometry();
|
_window->restoreGeometry();
|
||||||
|
_window->setVisible(true);
|
||||||
|
|
||||||
_glWidget->setFocusPolicy(Qt::StrongFocus);
|
_glWidget->setFocusPolicy(Qt::StrongFocus);
|
||||||
_glWidget->setFocus();
|
_glWidget->setFocus();
|
||||||
|
@ -547,9 +548,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_offscreenContext->makeCurrent();
|
_offscreenContext->makeCurrent();
|
||||||
initializeGL();
|
initializeGL();
|
||||||
|
|
||||||
_window->setVisible(true);
|
|
||||||
_offscreenContext->makeCurrent();
|
|
||||||
|
|
||||||
|
|
||||||
_toolWindow = new ToolWindow();
|
_toolWindow = new ToolWindow();
|
||||||
_toolWindow->setWindowFlags(_toolWindow->windowFlags() | Qt::WindowStaysOnTopHint);
|
_toolWindow->setWindowFlags(_toolWindow->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
|
@ -796,7 +794,6 @@ void Application::initializeGL() {
|
||||||
isInitialized = true;
|
isInitialized = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Where the gpuContext is initialized and where the TRUE Backend is created and assigned
|
// Where the gpuContext is initialized and where the TRUE Backend is created and assigned
|
||||||
gpu::Context::init<gpu::GLBackend>();
|
gpu::Context::init<gpu::GLBackend>();
|
||||||
_gpuContext = std::make_shared<gpu::Context>();
|
_gpuContext = std::make_shared<gpu::Context>();
|
||||||
|
@ -1176,6 +1173,10 @@ void Application::resizeEvent(QResizeEvent * event) {
|
||||||
|
|
||||||
void Application::resizeGL() {
|
void Application::resizeGL() {
|
||||||
PROFILE_RANGE(__FUNCTION__);
|
PROFILE_RANGE(__FUNCTION__);
|
||||||
|
if (nullptr == _displayPlugin) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto displayPlugin = getActiveDisplayPlugin();
|
auto displayPlugin = getActiveDisplayPlugin();
|
||||||
// Set the desired FBO texture size. If it hasn't changed, this does nothing.
|
// Set the desired FBO texture size. If it hasn't changed, this does nothing.
|
||||||
// Otherwise, it must rebuild the FBOs
|
// Otherwise, it must rebuild the FBOs
|
||||||
|
@ -4498,7 +4499,7 @@ int Application::getMaxOctreePacketsPerSecond() {
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal Application::getDevicePixelRatio() {
|
qreal Application::getDevicePixelRatio() {
|
||||||
return _window ? _window->windowHandle()->devicePixelRatio() : 1.0;
|
return (_window && _window->windowHandle()) ? _window->windowHandle()->devicePixelRatio() : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayPlugin * Application::getActiveDisplayPlugin() {
|
DisplayPlugin * Application::getActiveDisplayPlugin() {
|
||||||
|
|
Loading…
Reference in a new issue