class: ewol::Resource


Description:

A Resource is a generic interface to have an instance that have things that can be used by many people, ad have some hardware dependency. For example of resources : :INDENT: ...

Associated Namespace:

Constructor and Destructor:

#                                   Resource            ();
+ virtual ~Resource ();

Synopsis:

#         void                      init                ();
# void init (const std::string & _name);
# uint8_t m_resourceLevel;
+ uint8_t getResourceLevel ();
+ virtual void updateContext ();
+ virtual void removeContext ();
+ virtual void removeContextToLate ();
+ virtual void reload ();
# ewol::resource::Manager & getManager ();

Object Hierarchy:

+std::enable_shared_from_this<Object>
+ewol::object::ParameterList
+ewol::object::SignalList
+--> +ewol::Object
+--> ewol::Resource
+--> ewol::resource::Colored3DObject
+--> ewol::resource::Program
+--> ewol::resource::Texture
+--> ewol::resource::Shader
+--> ewol::resource::ConfigFile
+--> ewol::resource::ColorFile
+--> ewol::resource::VirtualBufferObject
+--> ewol::resource::FontBase
+--> ege::resource::Mesh

Detail:

Resource

#  Resource ();
generic protected contructor (use factory to create this class)


init

# void init ();
# void init (const
std::string & _name);
Initialisation of the class and previous classes.


~Resource

+ virtual  ~Resource ();
geenric destructor


m_resourceLevel

# uint8_t m_resourceLevel;
Level of the resource ==> for update priority [0..5] 0 must be update first.


getResourceLevel

+ uint8_t getResourceLevel ();
Get the current resource level;


updateContext

+ virtual void updateContext ();
Call when need to send data on the harware (openGL)
Note: This is done asynchronously with the create of the Resource.


removeContext

+ virtual void removeContext ();
The current OpenGl context is removing ==> remove yout own system data


removeContextToLate

+ virtual void removeContextToLate ();
The notification of the Context removing is too late, we have no more acces on the OpenGl context (thank you Android). Juste update your internal state


reload

+ virtual void reload ();
User request the reload of all resources (usefull when the file depend on DATA:GUI:xxx ...


getManager

# ewol::resource::Manager & getManager ();
Get the current resource Manager