Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenFlipper
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
761d52c1
Commit
761d52c1
authored
Feb 16, 2018
by
schultz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed segfault for windows when opengl context is recreated in core
profile
parent
1e7b36af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
17 deletions
+12
-17
Core/Core.cc
Core/Core.cc
+0
-16
widgets/glWidget/QtBaseViewer_qt.cc
widgets/glWidget/QtBaseViewer_qt.cc
+12
-1
No files found.
Core/Core.cc
View file @
761d52c1
...
...
@@ -98,20 +98,6 @@
//== IMPLEMENTATION ==========================================================
namespace
{
void
recreateContext
()
{
#ifdef WIN32
QOpenGLContext
*
ctx
=
QOpenGLContext
::
currentContext
();
QSurfaceFormat
format
=
QSurfaceFormat
::
defaultFormat
();
ctx
->
setFormat
(
format
);
ctx
->
create
();
QOffscreenSurface
*
surface
=
new
QOffscreenSurface
();
ctx
->
makeCurrent
(
surface
);
#endif
}
}
/** \brief Constuctor for the Core Widget ( This is stage 1 , call init for stage 2)
*
* Initialization is working the following way:\n
...
...
@@ -667,7 +653,6 @@ Core::init() {
coreWidget_
->
splitter_
->
restoreState
(
windowStates
.
value
(
"Core/LogSplitter"
).
toByteArray
());
coreWidget_
->
show
();
recreateContext
();
applyOptions
();
...
...
@@ -686,7 +671,6 @@ Core::init() {
}
else
{
coreWidget_
->
show
();
recreateContext
();
applyOptions
();
...
...
widgets/glWidget/QtBaseViewer_qt.cc
View file @
761d52c1
...
...
@@ -64,7 +64,7 @@
#include "QtBaseViewer.hh"
#include <OpenFlipper/common/GlobalOptions.hh>
#include <QOffscreenSurface>
#if (QT_VERSION >= QT_VERSION_CHECK(5,4,4))
#include <QOpenGLContext>
#endif
...
...
@@ -98,6 +98,17 @@ void glViewer::startGLDebugLogger()
if
(
OpenFlipper
::
Options
::
debug
())
{
delete
glDebugLogger_
;
//workaround for windows, because the DebugContext flag is discarded by QMainWindow show in core.cc
#ifdef WIN32
QOpenGLContext
*
ctx
=
QOpenGLContext
::
currentContext
();
QSurfaceFormat
format
=
QSurfaceFormat
::
defaultFormat
();
ctx
->
setFormat
(
format
);
ctx
->
create
();
QOffscreenSurface
*
surface
=
new
QOffscreenSurface
();
surface
->
create
();
ctx
->
makeCurrent
(
surface
);
#endif
///////////////////////////////////////////////////////////////////////////////////////////////////
glDebugLogger_
=
new
QOpenGLDebugLogger
(
this
);
if
(
glDebugLogger_
->
initialize
())
{
...
...
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