Changeset View
Changeset View
Standalone View
Standalone View
plugins/kdecorations/aurorae/src/aurorae.cpp
Show First 20 Lines • Show All 331 Lines • ▼ Show 20 Line(s) | 331 | } else { | |||
---|---|---|---|---|---|
332 | m_renderControl = new QQuickRenderControl(this); | 332 | m_renderControl = new QQuickRenderControl(this); | ||
333 | m_view = new QQuickWindow(m_renderControl); | 333 | m_view = new QQuickWindow(m_renderControl); | ||
334 | const bool usingGL = m_view->rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL; | 334 | const bool usingGL = m_view->rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL; | ||
335 | m_view->setColor(Qt::transparent); | 335 | m_view->setColor(Qt::transparent); | ||
336 | m_view->setFlags(Qt::FramelessWindowHint); | 336 | m_view->setFlags(Qt::FramelessWindowHint); | ||
337 | if (usingGL) { | 337 | if (usingGL) { | ||
338 | // first create the context | 338 | // first create the context | ||
339 | QSurfaceFormat format; | 339 | QSurfaceFormat format; | ||
340 | format.setSwapBehavior(QSurfaceFormat::SingleBuffer); | ||||
340 | format.setDepthBufferSize(16); | 341 | format.setDepthBufferSize(16); | ||
341 | format.setStencilBufferSize(8); | 342 | format.setStencilBufferSize(8); | ||
342 | m_context.reset(new QOpenGLContext); | 343 | m_context.reset(new QOpenGLContext); | ||
343 | m_context->setFormat(format); | 344 | m_context->setFormat(format); | ||
344 | m_context->create(); | 345 | m_context->create(); | ||
345 | // and the offscreen surface | 346 | // and the offscreen surface | ||
346 | m_offscreenSurface.reset(new QOffscreenSurface); | 347 | m_offscreenSurface.reset(new QOffscreenSurface); | ||
347 | m_offscreenSurface->setFormat(m_context->format()); | 348 | m_offscreenSurface->setFormat(m_context->format()); | ||
▲ Show 20 Lines • Show All 458 Lines • Show Last 20 Lines |