mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-27 08:49:19 +00:00
feat(src/main): try to optimize opengl context
This commit is contained in:
parent
afba34e03a
commit
53f804aa5a
2 changed files with 20 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue