Go to the documentation of this file.
27 #if MRPT_HAS_OPENGL_GLUT
54 #if MRPT_HAS_OPENGL_GLUT
58 glEnable(GL_LINE_SMOOTH);
64 glEnableVertexAttribArray(attr_position);
66 glVertexAttribPointer(
78 glEnableVertexAttribArray(attr_color);
80 glVertexAttribPointer(
93 glDisableVertexAttribArray(attr_position);
94 glDisableVertexAttribArray(attr_color);
const mrpt::opengl::Program * shader
COpenGLVertexArrayObject m_vao
void createOnce()
Calls create() only if the buffer has not been created yet.
The base class of 3D objects that can be directly rendered through OpenGL.
std::vector< mrpt::img::TColor > m_color_buffer_data
Renderizable generic renderer for objects using the wireframe shader.
void allocate(const void *data, int byteCount)
Reserves byteCount bytes in the buffer and copy to it the provided data.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
COpenGLBuffer m_colorBuffer
#define IMPLEMENTS_VIRTUAL_SERIALIZABLE(class_name, base_class, NS)
This must be inserted as implementation of some required members for virtual CSerializable classes:
virtual ~CRenderizableShaderWireFrame()
virtual void onUpdateBuffers_Wireframe()=0
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
COpenGLBuffer m_vertexBuffer
void createOnce()
Calls create() only if the buffer has not been created yet.
std::vector< mrpt::math::TPoint3Df > m_vertex_buffer_data
int attributeId(const char *name) const
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
Context for calls to render()
#define BUFFER_OFFSET(offset)
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers,...
The namespace for 3D scene representation and rendering.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Fri Jul 17 08:43:33 UTC 2020 | |