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