Mir
Public Types | Public Member Functions | Protected Member Functions | List of all members
mir::graphics::Renderable Class Referenceabstract

#include <renderable.h>

Public Types

typedef void const * ID
 

Public Member Functions

virtual ~Renderable ()=default
 
virtual ID id () const =0
 Return a unique ID for the renderable, which may or may not be based on the underlying surface ID. More...
 
virtual std::shared_ptr< Bufferbuffer () const =0
 Return the buffer that should be composited/rendered. More...
 
virtual geometry::Rectangle screen_position () const =0
 
virtual float alpha () const =0
 
virtual glm::mat4 transformation () const =0
 Transformation returns the transformation matrix that should be applied to the surface. More...
 
virtual bool shaped () const =0
 
virtual unsigned int swap_interval () const =0
 

Protected Member Functions

 Renderable ()=default
 
 Renderable (Renderable const &)=delete
 
Renderableoperator= (Renderable const &)=delete
 

Member Typedef Documentation

typedef void const* mir::graphics::Renderable::ID

Constructor & Destructor Documentation

virtual mir::graphics::Renderable::~Renderable ( )
virtualdefault
mir::graphics::Renderable::Renderable ( )
protecteddefault
mir::graphics::Renderable::Renderable ( Renderable const &  )
protecteddelete

Member Function Documentation

virtual float mir::graphics::Renderable::alpha ( ) const
pure virtual
virtual std::shared_ptr<Buffer> mir::graphics::Renderable::buffer ( ) const
pure virtual

Return the buffer that should be composited/rendered.

virtual ID mir::graphics::Renderable::id ( ) const
pure virtual

Return a unique ID for the renderable, which may or may not be based on the underlying surface ID.

You should not assume they are related.

Renderable& mir::graphics::Renderable::operator= ( Renderable const &  )
protecteddelete
virtual geometry::Rectangle mir::graphics::Renderable::screen_position ( ) const
pure virtual
virtual bool mir::graphics::Renderable::shaped ( ) const
pure virtual
virtual unsigned int mir::graphics::Renderable::swap_interval ( ) const
pure virtual
virtual glm::mat4 mir::graphics::Renderable::transformation ( ) const
pure virtual

Transformation returns the transformation matrix that should be applied to the surface.

By default when there are no transformations this will be the identity matrix.

Warning
As this functionality is presently only used by mir_demo_standalone_render_surfaces for rotations it may be deprecated in future. It is expected that real transformations may become more transient things (e.g. applied by animation logic externally instead of being a semi-permanent attribute of the surface itself).

The documentation for this class was generated from the following file:

Copyright © 2012-2016 Canonical Ltd.
Generated on Fri Dec 20 06:52:43 UTC 2019