~mir-team/mir/development-branch

« back to all changes in this revision

Viewing changes to playground/demo-shell/demo_renderer.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:
152
152
 
153
153
static const GLchar inverse_fshader[] =
154
154
{
 
155
    "#ifdef GL_ES\n"
155
156
    "precision mediump float;\n"
 
157
    "#endif\n"
156
158
    "uniform sampler2D tex;\n"
157
159
    "uniform float alpha;\n"
158
160
    "varying vec2 v_texcoord;\n"
164
166
};
165
167
static const GLchar contrast_fshader[] =
166
168
{
 
169
    "#ifdef GL_ES\n"
167
170
    "precision mediump float;\n"
 
171
    "#endif\n"
168
172
    "uniform sampler2D tex;\n"
169
173
    "uniform float alpha;\n"
170
174
    "varying vec2 v_texcoord;\n"