Changeset View
Changeset View
Standalone View
Standalone View
plugins/qpa/abstractplatformcontext.cpp
Show First 20 Lines • Show All 87 Lines • ▼ Show 20 Line(s) | 87 | #undef BUFFER_HELPER | |||
---|---|---|---|---|---|
88 | HELPER(SAMPLES, Samples) | 88 | HELPER(SAMPLES, Samples) | ||
89 | #undef HELPER | 89 | #undef HELPER | ||
90 | format.setRenderableType(isOpenGLES() ? QSurfaceFormat::OpenGLES : QSurfaceFormat::OpenGL); | 90 | format.setRenderableType(isOpenGLES() ? QSurfaceFormat::OpenGLES : QSurfaceFormat::OpenGL); | ||
91 | format.setStereo(false); | 91 | format.setStereo(false); | ||
92 | 92 | | |||
93 | return format; | 93 | return format; | ||
94 | } | 94 | } | ||
95 | 95 | | |||
96 | AbstractPlatformContext::AbstractPlatformContext(QOpenGLContext *context, Integration *integration, EGLDisplay display) | 96 | AbstractPlatformContext::AbstractPlatformContext(QOpenGLContext *context, Integration *integration, EGLDisplay display, EGLConfig config) | ||
97 | : QPlatformOpenGLContext() | 97 | : QPlatformOpenGLContext() | ||
98 | , m_integration(integration) | 98 | , m_integration(integration) | ||
99 | , m_eglDisplay(display) | 99 | , m_eglDisplay(display) | ||
100 | , m_config(configFromGLFormat(m_eglDisplay, context->format())) | 100 | , m_config(config ? config :configFromGLFormat(m_eglDisplay, context->format())) | ||
101 | , m_format(formatFromConfig(m_eglDisplay, m_config)) | 101 | , m_format(formatFromConfig(m_eglDisplay, m_config)) | ||
102 | { | 102 | { | ||
103 | } | 103 | } | ||
104 | 104 | | |||
105 | AbstractPlatformContext::~AbstractPlatformContext() | 105 | AbstractPlatformContext::~AbstractPlatformContext() | ||
106 | { | 106 | { | ||
107 | if (m_context != EGL_NO_CONTEXT) { | 107 | if (m_context != EGL_NO_CONTEXT) { | ||
108 | eglDestroyContext(m_eglDisplay, m_context); | 108 | eglDestroyContext(m_eglDisplay, m_context); | ||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |