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