class: ewol::resource::Shader


Description:

Shader is a specific resources for opengl, used only in @ref Program. This are components of the renderer pipe-line

Constructor and Destructor:

#                Shader                         ();
+ virtual ~Shader ();

Synopsis:

+ void   init                           (const std::string & _filename);
+ DECLARE_RESOURCE_NAMED_FACTORY (Shader );
+ GLuint getGL_ID ();
+ GLenum getShaderType ();
+ void updateContext ();
+ void removeContext ();
+ void removeContextToLate ();
+ void reload ();

Object Hierarchy:

+std::enable_shared_from_this<Object>
+ewol::object::ParameterList
+ewol::object::SignalList
+--> +ewol::Object
+--> +ewol::Resource
+--> ewol::resource::Shader

Detail:

Shader

#  Shader ();
Contructor of an opengl Shader


init

+ void init (const std::string & _filename);



DECLARE_RESOURCE_NAMED_FACTORY

+  DECLARE_RESOURCE_NAMED_FACTORY (Shader );



~Shader

+ virtual  ~Shader ();
Destructor, remove the current Shader


getGL_ID

+ GLuint getGL_ID ();
get the opengl reference id of this shader.


getShaderType

+ GLenum getShaderType ();
get the opengl type of this shader.


updateContext

+ void updateContext ();
This load/reload the data in the opengl context, needed when removed previously.


removeContext

+ void removeContext ();
remove the data from the opengl context.


removeContextToLate

+ void removeContextToLate ();
Special android spec! It inform us that all context is removed and after notify us...


reload

+ void reload ();
Relode the shader from the file. used when a request of resouces reload is done.
Note: this is really usefull when we tested the new themes or shader developpements.