~vanvugt/mir/full-gl

« back to all changes in this revision

Viewing changes to src/platforms/mesa/server/display_helpers.cpp

  • Committer: Daniel van Vugt
  • Date: 2016-05-13 06:11:26 UTC
  • Revision ID: daniel.van.vugt@canonical.com-20160513061126-wxv6o8yv1vpcur0v
BetterĀ debugĀ output

Show diffs side-by-side

added added

removed removed

Lines of Context:
321
321
 
322
322
void mgmh::EGLHelper::setup(GBMHelper const& gbm)
323
323
{
 
324
    fprintf(stderr, "SETUP 1\n");
 
325
 
324
326
    static const EGLint context_attr[] = {
325
327
        EGL_CONTEXT_CLIENT_VERSION, 2,
326
328
        EGL_NONE
335
337
 
336
338
void mgmh::EGLHelper::setup(GBMHelper const& gbm, EGLContext shared_context)
337
339
{
 
340
    fprintf(stderr, "SETUP 2\n");
 
341
 
338
342
    static const EGLint context_attr[] = {
339
343
        EGL_CONTEXT_CLIENT_VERSION, 2,
340
344
        EGL_NONE
350
354
void mgmh::EGLHelper::setup(GBMHelper const& gbm, gbm_surface* surface_gbm,
351
355
                            EGLContext shared_context)
352
356
{
 
357
    fprintf(stderr, "SETUP 3\n");
 
358
 
353
359
    static const EGLint context_attr[] = {
354
360
        EGL_CONTEXT_CLIENT_VERSION, 2,
355
361
        EGL_NONE
357
363
 
358
364
    setup_internal(gbm, false);
359
365
 
360
 
    fprintf(stderr, "SETUP\n");
361
 
 
362
366
    egl_surface = eglCreateWindowSurface(egl_display, egl_config, surface_gbm, nullptr);
363
367
    fprintf(stderr, "SETUP = %p\n", egl_surface);
364
368
    if(egl_surface == EGL_NO_SURFACE)
367
371
    egl_context = eglCreateContext(egl_display, egl_config, shared_context, context_attr);
368
372
    if (egl_context == EGL_NO_CONTEXT)
369
373
        BOOST_THROW_EXCEPTION(mg::egl_error("Failed to create EGL context"));
 
374
    fprintf(stderr, "SETUP egl_context = %p\n", egl_context);
370
375
}
371
376
 
372
377
mgmh::EGLHelper::~EGLHelper() noexcept