Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
cc5745db
Commit
cc5745db
authored
Feb 09, 2018
by
schultz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #9 by recerating the opengl context after QMainWindow->show was
called
parent
745d2324
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
Core/Core.cc
Core/Core.cc
+15
-0
No files found.
Core/Core.cc
View file @
cc5745db
...
...
@@ -98,6 +98,18 @@
//== IMPLEMENTATION ==========================================================
namespace
{
void
recreateContext
()
{
QOpenGLContext
*
ctx
=
QOpenGLContext
::
currentContext
();
QSurfaceFormat
format
=
QSurfaceFormat
::
defaultFormat
();
ctx
->
setFormat
(
format
);
ctx
->
create
();
QOffscreenSurface
*
surface
=
new
QOffscreenSurface
();
ctx
->
makeCurrent
(
surface
);
}
}
/** \brief Constuctor for the Core Widget ( This is stage 1 , call init for stage 2)
*
* Initialization is working the following way:\n
...
...
@@ -653,6 +665,7 @@ Core::init() {
coreWidget_
->
splitter_
->
restoreState
(
windowStates
.
value
(
"Core/LogSplitter"
).
toByteArray
());
coreWidget_
->
show
();
recreateContext
();
applyOptions
();
...
...
@@ -671,6 +684,8 @@ Core::init() {
}
else
{
coreWidget_
->
show
();
recreateContext
();
applyOptions
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment