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
a2cc7ba5
Commit
a2cc7ba5
authored
Apr 10, 2018
by
Martin Schultz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed options and settings for opengl profile and version selection,
so they are not always overwritten
parent
7580642d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
OpenFlipper.cc
OpenFlipper.cc
+0
-1
common/GlobalOptions.cc
common/GlobalOptions.cc
+10
-2
No files found.
OpenFlipper.cc
View file @
a2cc7ba5
...
...
@@ -358,7 +358,6 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, QString *err
parser
.
addOption
(
samplesOption
);
QCommandLineOption
profileOption
(
"profile"
,
QCoreApplication
::
translate
(
"main"
,
"Request OpenGL context profile <profile> with profile set as compat or core"
),
QCoreApplication
::
translate
(
"main"
,
"< compat | core >"
));
profileOption
.
setDefaultValue
(
"compat"
);
parser
.
addOption
(
profileOption
);
const
QCommandLineOption
helpOption
=
parser
.
addHelpOption
();
const
QCommandLineOption
versionOption
=
parser
.
addVersionOption
();
...
...
common/GlobalOptions.cc
View file @
a2cc7ba5
...
...
@@ -410,7 +410,12 @@ QPair<int,int> glVersion(){
if
(
versionOverride_
)
return
version_
;
else
return
OpenFlipperSettings
().
value
(
"Core/OpenGL/Version"
,
QVariant
::
fromValue
(
QPair
<
int
,
int
>
(
4
,
6
))).
value
<
QPair
<
int
,
int
>>
();
{
// unfortunately QVariant cant store QPair directly, we could try std::pair but its good for now
int
major
=
OpenFlipperSettings
().
value
(
"Core/OpenGL/VersionMajor"
,
4
).
value
<
int
>
();
int
minor
=
OpenFlipperSettings
().
value
(
"Core/OpenGL/VersionMinor"
,
6
).
value
<
int
>
();
return
QPair
<
int
,
int
>
(
major
,
minor
);
}
}
/// Store opengl version setting
...
...
@@ -423,7 +428,10 @@ void glVersion(const QPair<int,int> & _version, bool _temporary)
versionOverride_
=
true
;
}
else
OpenFlipperSettings
().
setValue
(
"Core/OpenGL/Version"
,
QVariant
::
fromValue
(
_version
));
{
OpenFlipperSettings
().
setValue
(
"Core/OpenGL/VersionMajor"
,
_version
.
first
);
OpenFlipperSettings
().
setValue
(
"Core/OpenGL/VersionMinor"
,
_version
.
second
);
}
}
/// Store opengl MSAA sample count
void
samples
(
int
_samples
,
bool
_temporary
)
{
...
...
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