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
44ac98c9
Commit
44ac98c9
authored
Apr 13, 2018
by
Martin Schultz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed stereo check, because failing the check might result in
acquiring a wrong opengl context
parent
15ebce8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
60 deletions
+0
-60
widgets/coreWidget/CoreWidget.cc
widgets/coreWidget/CoreWidget.cc
+0
-60
No files found.
widgets/coreWidget/CoreWidget.cc
View file @
44ac98c9
...
...
@@ -207,72 +207,12 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
splitter_
=
new
QSplitter
(
Qt
::
Vertical
,
toolSplitter_
);
stackedWidget_
=
new
QStackedWidget
(
splitter_
);
OFGLFormat
format
=
OFGLFormat
::
defaultFormat
();
#ifdef ARCH_DARWIN
format
.
setStereo
(
false
);
#else
format
.
setStereo
(
OpenFlipper
::
Options
::
stereo
());
#endif
#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
format
.
setAlphaBufferSize
(
8
);
format
.
setStencilBufferSize
(
8
);
format
.
setSamples
(
OpenFlipper
::
Options
::
samples
());
#else
format
.
setAlpha
(
true
);
format
.
setStencil
(
true
);
format
.
setSampleBuffers
(
true
);
#endif
// Construct GL context & widget
baseLayout_
=
new
QtMultiViewLayout
;
baseLayout_
->
setContentsMargins
(
0
,
0
,
0
,
0
);
// ===============================================================================
// Test context capabilities ...
// If we get stereo buffers, we use them .. which might disable multisampling
// If we don't have stereo, we disable it to not interfere with multisampling
// ===============================================================================
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
OFGLWidget
*
test
=
new
OFGLWidget
();
test
->
setFormat
(
format
);
#else
OFGLWidget
*
test
=
new
OFGLWidget
(
format
);
#endif
if
(
!
test
->
format
().
stereo
()
)
{
// std::cerr << "No stereo ... disabling stereo for real context!" << std::endl;
format
.
setStereo
(
false
);
}
/* else {
std::cerr << "Stereo found ok" << std::endl;
}*/
delete
test
;
if
(
OpenFlipper
::
Options
::
coreProfile
())
{
#if QT_VERSION >= 0x050000
// request the highest OpenGL version
// QT 5 should gracefully provide the next highest available version
format
.
setVersion
(
4
,
0
);
format
.
setProfile
(
OFGLFormat
::
CoreProfile
);
#else
format
.
setProfile
(
OFGLFormat
::
CompatibilityProfile
);
format
.
setOption
(
QSurfaceFormat
::
DeprecatedFunctions
);
#endif
}
else
{
format
.
setProfile
(
QSurfaceFormat
::
CompatibilityProfile
);
format
.
setOption
(
QSurfaceFormat
::
DeprecatedFunctions
);
}
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 4))
if
(
OpenFlipper
::
Options
::
debug
())
format
.
setOption
(
format
.
options
()
|
QSurfaceFormat
::
DebugContext
);
glWidget_
=
new
OFGLWidget
();
glWidget_
->
setFormat
(
format
);
glWidget_
->
makeCurrent
();
#else
glWidget_
=
new
OFGLWidget
(
format
,
0
);
...
...
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