~ci-train-bot/qtmir/qtmir-ubuntu-zesty-2291.1

« back to all changes in this revision

Viewing changes to src/platforms/mirserver/miropenglcontext.cpp

  • Committer: Bileto Bot
  • Author(s): Brandon Schaefer
  • Date: 2016-12-03 12:37:37 UTC
  • mfrom: (569.5.5 qtmir)
  • Revision ID: ci-train-bot@canonical.com-20161203123737-mcoig5xt2ac2qoov
Mir 0.25 compat

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
// Mir
31
31
#include <mir/graphics/display.h>
32
 
#include <mir/graphics/gl_context.h>
 
32
#include <mir/renderer/gl/context.h>
 
33
#include <mir/renderer/gl/context_source.h>
33
34
 
34
35
// Qt supports one GL context per screen, but also shared contexts.
35
36
// The Mir "Display" generates a shared GL context for all DisplayBuffers
45
46
#endif
46
47
{
47
48
    // create a temporary GL context to fetch the EGL display and config, so Qt can determine the surface format
48
 
    std::unique_ptr<mir::graphics::GLContext> mirContext = display.create_gl_context();
 
49
    std::unique_ptr<mir::renderer::gl::Context> mirContext = dynamic_cast<mir::renderer::gl::ContextSource*>(
 
50
                                                                display.native_display())->create_gl_context();
49
51
    mirContext->make_current();
50
52
 
51
53
    EGLDisplay eglDisplay = eglGetCurrentDisplay();