~mir-team/mir/development-branch

« back to all changes in this revision

Viewing changes to examples/graphics_utils.cpp

  • Committer: Tarmac
  • Author(s): Daniel van Vugt
  • Date: 2016-05-20 07:19:12 UTC
  • mfrom: (3506.5.22 full-gl)
  • Revision ID: tarmac-20160520071912-5z8y06mdasike9qa
Introducing full desktop GL support for Mir servers (LP: #1420581)

It works well with Mesa, but is disabled by default due to one
remaining "TODO" you will find.

Note the new eglBindAPI calls. Without those, EGL makes all new
threads default to ES. And then eglMakeContext/eglGetCurrent*
functions will randomly fail. So we need to be sure any thread
that touches EGL will call eglBindAPI with the correct value
first. Fixes: https://bugs.launchpad.net/bugs/1420581.

Approved by Cemil Azizoglu, mir-ci-bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
static const GLchar *frag_shader_src =
40
40
{
 
41
    "#ifdef GL_ES\n"
41
42
    "precision mediump float;\n"
 
43
    "#endif\n"
42
44
    "uniform sampler2D tex;\n"
43
45
    "varying vec2 texcoord;\n"
44
46
    "void main() {\n"