15 #define INVALID_DISPLAY_LIST_ID static_cast<unsigned int>(-1) 76 void render()
const override;
bool m_dl_recreate
If using display lists, this is true when the list must be updated (the object changes, it's the first rendering, etc...).
void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
CRenderizable & setColorA_u8(const uint8_t a) override
Color components in the range [0,255].
CRenderizableDisplayList()
CRenderizable & setColor_u8(uint8_t R, uint8_t G, uint8_t B, uint8_t A=255)
Color components in the range [0,255].
CRenderizable & setColor_u8(const mrpt::img::TColor &c) override
Changes the default object color.
void render() const override
Render the object, regenerating the display list if needed, otherwise just calling it...
The base class of 3D objects that can be directly rendered through OpenGL.
virtual bool should_skip_display_list_cache() const
Optional: If the object has some state in which creating a display list is NOT preferred over direct ...
CRenderizable & setColorG_u8(const uint8_t g) override
Color components in the range [0,255].
unsigned int m_dl
Display list ID, for derived classes that want to use it (it's automatically deleted and freed on des...
virtual void render_dl() const =0
Derived classes must implement this method to the render the object.
#define DEFINE_VIRTUAL_SERIALIZABLE(class_name)
This declaration must be inserted in virtual CSerializable classes definition:
A renderizable object suitable for rendering with OpenGL's display lists.
CRenderizable & setColorR_u8(const uint8_t r) override
Color components in the range [0,255].
virtual CRenderizable & setColor_u8(const mrpt::img::TColor &c)
mrpt::img::TColor m_color
Color components in the range [0,255].
Virtual base class for "archives": classes abstracting I/O streams.
GLdouble GLdouble GLdouble r
The namespace for 3D scene representation and rendering.
void readFromStreamRender(mrpt::serialization::CArchive &in)
CRenderizable & setColorB_u8(const uint8_t b) override
Color components in the range [0,255].
~CRenderizableDisplayList() override
GLubyte GLubyte GLubyte a
void readFromStreamRender(mrpt::serialization::CArchive &in)