Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
demo_renderer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
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.
12  *
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/>.
15  *
16  * Authored by: Daniel van Vugt <daniel.van.vugt@canonical.com>
17  */
18 
19 #ifndef MIR_EXAMPLES_DEMO_RENDERER_H_
20 #define MIR_EXAMPLES_DEMO_RENDERER_H_
21 
23 
24 namespace mir
25 {
26 namespace examples
27 {
28 
30 {
31 public:
32  DemoRenderer(geometry::Rectangle const& display_area);
33  ~DemoRenderer();
34 
35  void begin() const override;
36  void tessellate(std::vector<Primitive>& primitives,
37  graphics::Renderable const& renderable,
38  geometry::Size const& buf_size) const override;
39  void tessellate_shadow(std::vector<Primitive>& primitives,
40  graphics::Renderable const& renderable,
41  float radius) const;
42  void tessellate_frame(std::vector<Primitive>& primitives,
43  graphics::Renderable const& renderable,
44  float titlebar_height) const;
45 
46 private:
47  GLuint shadow_corner_tex;
48  GLuint titlebar_corner_tex;
49 };
50 
51 } // namespace examples
52 } // namespace mir
53 
54 #endif // MIR_EXAMPLES_DEMO_RENDERER_H_
Definition: size.h:30
void begin() const override
Definition: demo_renderer.cpp:147
Definition: gl_renderer.h:34
Definition: renderable.h:33
Definition: demo_renderer.h:29
Definition: rectangle.h:33
~DemoRenderer()
Definition: demo_renderer.cpp:141
void tessellate_frame(std::vector< Primitive > &primitives, graphics::Renderable const &renderable, float titlebar_height) const
Definition: demo_renderer.cpp:257
DemoRenderer(geometry::Rectangle const &display_area)
Definition: demo_renderer.cpp:134
void tessellate_shadow(std::vector< Primitive > &primitives, graphics::Renderable const &renderable, float radius) const
Definition: demo_renderer.cpp:162
void tessellate(std::vector< Primitive > &primitives, graphics::Renderable const &renderable, geometry::Size const &buf_size) const override
tessellate defines the list of triangles that will be used to render the surface. ...
Definition: demo_renderer.cpp:153

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014