Go to the documentation of this file.
9 #ifndef opengl_CRenderizableDisplayList_H
10 #define opengl_CRenderizableDisplayList_H
18 #define INVALID_DISPLAY_LIST_ID static_cast<unsigned int>(-1)
79 void render()
const override;
void readFromStreamRender(mrpt::serialization::CArchive &in)
The base class of 3D objects that can be directly rendered through OpenGL.
void render() const override
Render the object, regenerating the display list if needed, otherwise just calling it.
CRenderizableDisplayList()
CRenderizable & setColor_u8(uint8_t R, uint8_t G, uint8_t B, uint8_t A=255)
Color components in the range [0,255].
A renderizable object suitable for rendering with OpenGL's display lists.
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated)
virtual ~CRenderizableDisplayList()
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
CRenderizable & setColorA_u8(const uint8_t a) override
Color components in the range [0,255].
virtual void render_dl() const =0
Derived classes must implement this method to the render the object.
CRenderizable & setColorR_u8(const uint8_t r) override
Color components in the range [0,255].
Virtual base class for "archives": classes abstracting I/O streams.
GLdouble GLdouble GLdouble r
mrpt::img::TColor m_color
Color components in the range [0,255].
CRenderizable & setColorB_u8(const uint8_t b) override
Color components in the range [0,255].
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 ...
bool m_dl_recreate
If using display lists, this is true when the list must be updated (the object changes,...
#define DEFINE_VIRTUAL_SERIALIZABLE(class_name)
This declaration must be inserted in virtual CSerializable classes definition:
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 CRenderizable & setColor_u8(const mrpt::img::TColor &c)
void readFromStreamRender(mrpt::serialization::CArchive &in)
CRenderizable & setColor_u8(const mrpt::img::TColor &c) override
Changes the default object color.
GLubyte GLubyte GLubyte a
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |