Mir
Public Member Functions | Protected Member Functions | List of all members
mir::gl::TextureCache Class Referenceabstract

#include <texture_cache.h>

Inheritance diagram for mir::gl::TextureCache:
[legend]

Public Member Functions

virtual ~TextureCache ()=default
 
virtual std::shared_ptr< Textureload (graphics::Renderable const &)=0
 Loads texture from the renderable. More...
 
virtual void invalidate ()=0
 Mark all entries in the cache as out-of-date to ensure fresh textures are loaded next time. More...
 
virtual void drop_unused ()=0
 Free textures that were not used (loaded) since the last drop/invalidate. More...
 

Protected Member Functions

 TextureCache ()=default
 

Constructor & Destructor Documentation

virtual mir::gl::TextureCache::~TextureCache ( )
virtualdefault
mir::gl::TextureCache::TextureCache ( )
protecteddefault

Member Function Documentation

virtual void mir::gl::TextureCache::drop_unused ( )
pure virtual

Free textures that were not used (loaded) since the last drop/invalidate.

Must be called with a current GL context.

Implemented in mir::gl::RecentlyUsedCache.

virtual void mir::gl::TextureCache::invalidate ( )
pure virtual

Mark all entries in the cache as out-of-date to ensure fresh textures are loaded next time.

This function must be implemented in a way that does not require a GL context, as it will typically be called without one.

Implemented in mir::gl::RecentlyUsedCache.

virtual std::shared_ptr<Texture> mir::gl::TextureCache::load ( graphics::Renderable const &  )
pure virtual

Loads texture from the renderable.

Must be called with a current GL context.

Parameters
[in]renderableThe Renderable that needs to be used as a texture
Returns
The texture that represents the renderable.

Implemented in mir::gl::RecentlyUsedCache.


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

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016