#include <demo_renderer.h>
DemoRenderer::~DemoRenderer |
( |
| ) |
|
void DemoRenderer::begin |
( |
| ) |
const |
|
overridevirtual |
tessellate defines the list of triangles that will be used to render the surface.
By default it just returns 4 vertices for a rectangle. However you can override its behaviour to tessellate more finely and deform freely for effects like wobbly windows.
- Parameters
-
[in,out] | primitives | The list of rendering primitives to be grown and/or modified. |
[in] | renderable | The renderable surface being tessellated. |
[in] | buf_size | The dimensions of the buffer being rendered, which can be particularly useful in calculating texcoords for a surface being actively resized (as the buf_size doesn't yet match renderable.size()). |
- Note
- The cohesion of this function to GLRenderer is quite loose and it does not strictly need to reside here. However it seems a good choice under GLRenderer while this remains the only OpenGL-specific class in the display server, and tessellation is very much OpenGL-specific.
Reimplemented from mir::compositor::GLRenderer.
void DemoRenderer::tessellate_frame |
( |
std::vector< Primitive > & |
primitives, |
|
|
graphics::Renderable const & |
renderable, |
|
|
float |
titlebar_height |
|
) |
| const |
The documentation for this class was generated from the following files:
Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014