Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
53f804aa
Commit
53f804aa
authored
Mar 22, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/main): try to optimize opengl context
parent
afba34e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
Camera.cpp
linphone-desktop/src/components/camera/Camera.cpp
+1
-0
main.cpp
linphone-desktop/src/main.cpp
+19
-0
No files found.
linphone-desktop/src/components/camera/Camera.cpp
View file @
53f804aa
...
...
@@ -54,6 +54,7 @@ CameraRenderer::~CameraRenderer () {
QOpenGLFramebufferObject
*
CameraRenderer
::
createFramebufferObject
(
const
QSize
&
size
)
{
QOpenGLFramebufferObjectFormat
format
;
format
.
setAttachment
(
QOpenGLFramebufferObject
::
CombinedDepthStencil
);
format
.
setInternalTextureFormat
(
GL_RGBA8
);
format
.
setSamples
(
4
);
...
...
linphone-desktop/src/main.cpp
View file @
53f804aa
...
...
@@ -30,11 +30,30 @@ using namespace std;
// =============================================================================
int
main
(
int
argc
,
char
*
argv
[])
{
// Disable QML cache. Avoid malformed cache.
qputenv
(
"QML_DISABLE_DISK_CACHE"
,
"true"
);
// Options to get a nice video render.
QCoreApplication
::
setAttribute
(
Qt
::
AA_UseDesktopOpenGL
,
true
);
QCoreApplication
::
setAttribute
(
Qt
::
AA_ShareOpenGLContexts
,
true
);
{
QSurfaceFormat
format
;
format
.
setSwapBehavior
(
QSurfaceFormat
::
TripleBuffer
);
format
.
setSwapInterval
(
1
);
format
.
setRedBufferSize
(
8
);
format
.
setGreenBufferSize
(
8
);
format
.
setBlueBufferSize
(
8
);
format
.
setAlphaBufferSize
(
8
);
format
.
setDepthBufferSize
(
24
);
format
.
setStencilBufferSize
(
8
);
QSurfaceFormat
::
setDefaultFormat
(
format
);
}
App
app
(
argc
,
argv
);
app
.
parseArgs
();
...
...
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