/** * @author Edouard DUPIN * * @copyright 2011, Edouard DUPIN, all right reserved * * @license BSD v3 (see license file) */ #ifndef __COLORED_3D_OBJECT_H__ #define __COLORED_3D_OBJECT_H__ #include #include #include #include #include namespace ewol { class Colored3DObject : public ewol::Resource { protected: ewol::Program* m_GLprogram; int32_t m_GLPosition; int32_t m_GLMatrix; int32_t m_GLColor; protected: Colored3DObject(void); virtual ~Colored3DObject(void); public: virtual const char* getType(void) { return "ewol::Colored3DObject"; }; virtual void draw(etk::Vector& _vertices, const etk::Color& _color, bool _updateDepthBuffer=true, bool _depthtest=true); virtual void draw(etk::Vector& _vertices, const etk::Color& _color, mat4& _transformationMatrix, bool _updateDepthBuffer=true, bool _depthtest=true); virtual void drawLine(etk::Vector& _vertices, const etk::Color& _color, mat4& _transformationMatrix, bool _updateDepthBuffer=true, bool _depthtest=true); public: /** * @brief keep the resource pointer. * @note Never free this pointer by your own... * @return pointer on the resource or NULL if an error occured. */ static ewol::Colored3DObject* keep(void); /** * @brief release the keeped resources * @param[in,out] reference on the object pointer */ static void release(ewol::Colored3DObject*& _object); }; }; #endif