virtual void render_pre() const
virtual void render_texturedobj() const =0
Must be implemented by derived classes.
bool m_enableTransparency
Of the texture using "m_textureImageAlpha".
mrpt::img::CImage m_textureImage
int m_pad_x_right
The size of the fill in pixels in the textured image, w.r.t the image passed by the user.
void assignImage_fast(mrpt::img::CImage &img, mrpt::img::CImage &imgAlpha)
Similar to assignImage, but the passed images will be returned as empty: it avoids making a copy of t...
void readFromStreamTexturedObject(mrpt::serialization::CArchive &in)
virtual void render_post() const
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...
virtual void render_dl() const override
Derived classes must implement this method to the render the object.
void loadTextureInOpenGL() const
VERY IMPORTANT: If you use a multi-thread application, you MUST call this from the same thread that w...
virtual ~CTexturedObject()
mrpt::img::CImage m_textureImageAlpha
int r_width
Size of the texture image, rounded up to next power of 2.
A base class for all OpenGL objects with loadable textures.
void writeToStreamTexturedObject(mrpt::serialization::CArchive &out) const
unsigned int m_glTextureName