class: ewol::resource::VirtualBufferObject


Description:

VirtualBufferObject is a specific resources for opengl, this load the data directly in the graphic card ad keep these inside

Constructor and Destructor:

#                              VirtualBufferObject      ();
+ virtual ~VirtualBufferObject ();

Synopsis:

# void                 init                     (int32_t _number);
+ DECLARE_RESOURCE_FACTORY (VirtualBufferObject );
+ GLuint getGL_ID (int32_t id);
+ std::vector<float> & getRefBuffer (int32_t id);
+ void pushOnBuffer (int32_t id,
const vec3 & data);
+ vec3 getOnBufferVec3 (int32_t id,
int32_t elementID);
+ int32_t sizeOnBufferVec3 (int32_t id);
+ void pushOnBuffer (int32_t id,
const vec2 & data);
+ vec2 getOnBufferVec2 (int32_t id,
int32_t elementID);
+ int32_t sizeOnBufferVec2 (int32_t id);
+ void retreiveData ();
+ void flush ();
+ 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::VirtualBufferObject

Detail:

VirtualBufferObject

#  VirtualBufferObject ();
Constructor of this VBO.


init

# void init (int32_t _number);



DECLARE_RESOURCE_FACTORY

+  DECLARE_RESOURCE_FACTORY (VirtualBufferObject );



~VirtualBufferObject

+ virtual  ~VirtualBufferObject ();
Destructor of this VBO.


getGL_ID

+ GLuint getGL_ID (int32_t id);
get the real openGL ID.


getRefBuffer

+ std::vector<float> & getRefBuffer (int32_t id);
get a reference on hte buffer data for this VBO.


pushOnBuffer

+ void pushOnBuffer (int32_t id,
const vec3 & data);
push data on a buffer with a custum type :


getOnBufferVec3

+ vec3 getOnBufferVec3 (int32_t id,
int32_t elementID);



sizeOnBufferVec3

+ int32_t sizeOnBufferVec3 (int32_t id);



pushOnBuffer

+ void pushOnBuffer (int32_t id,
const vec2 & data);
push data on a buffer with a custum type :


getOnBufferVec2

+ vec2 getOnBufferVec2 (int32_t id,
int32_t elementID);



sizeOnBufferVec2

+ int32_t sizeOnBufferVec2 (int32_t id);



retreiveData

+ void retreiveData ();
get the data from the graphic card.


flush

+ void flush ();
Send the data to the graphic card.


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.