#include <gl_renderer.h>
mir::compositor::GLRenderer::~GLRenderer |
( |
| ) |
|
|
virtualnoexcept |
void mir::compositor::GLRenderer::begin |
( |
| ) |
const |
|
overridevirtual |
void mir::compositor::GLRenderer::end |
( |
| ) |
const |
|
overridevirtual |
Load the texture for a surface any which way you like.
The default implementation does so with efficient GPU-side caching built in.
- Returns
- The OpenGL texture name for the surface.
void mir::compositor::GLRenderer::set_rotation |
( |
float |
degrees | ) |
|
|
overridevirtual |
void mir::compositor::GLRenderer::suspend |
( |
| ) |
|
|
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 in mir::examples::DemoRenderer.
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