2
* Copyright © 2015 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 3,
6
* as published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored By: Kevin DuBois <kevin.dubois@canonical.com>
19
#ifndef MIR_EXAMPLES_ADORNING_COMPOSITOR_H_
20
#define MIR_EXAMPLES_ADORNING_COMPOSITOR_H_
21
#include "mir/compositor/display_buffer_compositor.h"
22
#include <GLES2/gl2.h>
33
class AdorningDisplayBufferCompositor : public compositor::DisplayBufferCompositor
36
AdorningDisplayBufferCompositor(graphics::DisplayBuffer&, std::tuple<float, float, float> const& background_rgb);
37
void composite(compositor::SceneElementSequence&& scene_sequence) override;
39
graphics::DisplayBuffer& db;
40
GLchar const*const vert_shader_src;
41
GLchar const*const frag_shader_src;
45
Shader(GLchar const* const* src, GLuint type);
51
Program(Shader& vertex, Shader& fragment);
56
GLfloat vertex_data[16]
58
0.0f, 0.0f, 0.0f, 1.0f,
59
0.0f, 1.0f, 0.0f, 1.0f,
60
1.0f, 0.0f, 0.0f, 1.0f,
61
1.0f, 1.0f, 0.0f, 1.0f,
82
#endif /* MIR_EXAMPLES_ADORNING_COMPOSITOR_H_ */