Go to the documentation of this file.
59 CRenderizableDisplayList::CRenderizableDisplayList()
72 obj.dls_to_delete_cs.lock();
73 obj.dls_to_delete.push_back(
m_dl);
74 obj.dls_to_delete_cs.unlock();
82 #if MRPT_HAS_OPENGL_GLUT
94 if (!
obj.dls_to_delete.empty())
96 obj.dls_to_delete_cs.lock();
97 #if MRPT_HAS_OPENGL_GLUT
98 for (
size_t i = 0; i <
obj.dls_to_delete.size(); i++)
101 obj.dls_to_delete.clear();
102 obj.dls_to_delete_cs.unlock();
109 std::cerr <<
"glGenLists: Error" << std::endl;
117 std::cerr <<
"glNewList: Error" << std::endl;
124 std::cerr <<
"glEndList: Error" << std::endl;
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.
A renderizable object suitable for rendering with OpenGL's display lists.
GLsizei GLsizei GLuint * obj
virtual ~CRenderizableDisplayList()
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
std::recursive_mutex dls_to_delete_cs
virtual void render_dl() const =0
Derived classes must implement this method to the render the object.
static TAuxDLData & getSingleton()
static TAuxDLData * m_pInstance
#define INVALID_DISPLAY_LIST_ID
GLAPI void GLAPIENTRY glNewList(GLuint list, GLenum mode)
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,...
GLAPI void GLAPIENTRY glCallList(GLuint list)
GLAPI void GLAPIENTRY glDeleteLists(GLuint list, GLsizei range)
GLAPI void GLAPIENTRY glEndList(void)
IMPLEMENTS_VIRTUAL_SERIALIZABLE(CRenderizableDisplayList, CRenderizable, mrpt::opengl) void deleteSingleton()
std::vector< unsigned int > dls_to_delete
unsigned int m_dl
Display list ID, for derived classes that want to use it (it's automatically deleted and freed on des...
GLAPI GLuint GLAPIENTRY glGenLists(GLsizei range)
The namespace for 3D scene representation and rendering.
GLAPI GLenum GLAPIENTRY glGetError(void)
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 | |