Go to the documentation of this file.
37 void render(
const RenderContext& rc)
const override;
unsigned int m_glTextureName
Renderizable generic renderer for objects using the triangles-with-a-texture shader.
bool m_textureInterpolate
A wrapper for an OpenGL vertex array object (VAO).
void assignImage(const mrpt::img::CImage &img, const mrpt::img::CImage &imgAlpha)
Assigns a texture and a transparency image, and enables transparency (If the images are not 2^N x 2^M...
The base class of 3D objects that can be directly rendered through OpenGL.
bool m_textureImageAssigned
void freeOpenGLResources() override
Free opengl buffers.
static constexpr shader_id_t TEXTURED_TRIANGLES
COpenGLBuffer m_vertexBuffer
void readFromStreamTexturedObject(mrpt::serialization::CArchive &in)
void enableLight(bool enable=true)
void enableTextureLinearInterpolation(bool enable)
Enable linear interpolation of textures (default=false, use nearest pixel)
mrpt::vision::TStereoCalibResults out
bool m_enableTransparency
Of the texture using "m_textureImageAlpha".
CRenderizableShaderTexturedTriangles()=default
virtual void onUpdateBuffers_TexturedTriangles()=0
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
virtual shader_list_t requiredShaders() const override
Returns the ID of the OpenGL shader program required to render this class.
COpenGLVertexArrayObject m_vao
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::img::CImage m_textureImage
void destroy()
Automatically called upon destructor, no need for the user to call it in normal situations.
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
static void releaseTextureName(unsigned int i)
std::vector< mrpt::opengl::TTriangle > m_triangles
List of triangles.
#define DEFINE_VIRTUAL_SERIALIZABLE(class_name)
This declaration must be inserted in virtual CSerializable classes definition:
A class for storing images as grayscale or RGB bitmaps.
const mrpt::img::CImage & getTextureImage() const
static unsigned int getNewTextureNumber()
A wrapper for an OpenGL buffer object.
virtual void initializeTextures() const override
VERY IMPORTANT: If you use a multi-thread application, you MUST call this from the same thread that w...
virtual ~CRenderizableShaderTexturedTriangles() override
bool textureImageHasBeenAssigned() const
const mrpt::img::CImage & getTextureAlphaImage() const
const auto & shaderTexturedTrianglesBuffer() const
bool isLightEnabled() const
std::vector< shader_id_t > shader_list_t
A list of shader IDs.
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.
void destroy()
Automatically called upon destructor, no need for the user to call it in normal situations.
mrpt::img::CImage m_textureImageAlpha
void writeToStreamTexturedObject(mrpt::serialization::CArchive &out) const
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sun Jul 19 15:15:43 UTC 2020 | |