9 #ifndef opengl_CTexturedObject_H
10 #define opengl_CTexturedObject_H
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_VIRTUAL_SERIALIZABLE(class_name)
This declaration must be inserted in virtual CSerializable classes definition:
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
A renderizable object suitable for rendering with OpenGL's display lists.
A base class for all OpenGL objects with loadable textures.
void assignImage(const mrpt::utils::CImage &img, const mrpt::utils::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_post() const
virtual ~CTexturedObject()
void assignImage_fast(mrpt::utils::CImage &img)
Similar to assignImage, but the passed images will be returned as empty: it avoids making a copy of t...
virtual void render_pre() const
mrpt::utils::CImage m_textureImage
virtual void render_dl() const MRPT_OVERRIDE
Derived classes must implement this method to the render the object.
void assignImage_fast(mrpt::utils::CImage &img, mrpt::utils::CImage &imgAlpha)
Similar to assignImage, but the passed images will be returned as empty: it avoids making a copy of t...
virtual void render_texturedobj() const =0
Must be implemented by derived classes.
void loadTextureInOpenGL() const
VERY IMPORTANT: If you use a multi-thread application, you MUST call this from the same thread that w...
unsigned int m_glTextureName
int r_height
Size of the texture image, rounded up to next power of 2.
void writeToStreamTexturedObject(mrpt::utils::CStream &out) const
mrpt::utils::CImage m_textureImageAlpha
bool m_enableTransparency
Of the texture using "m_textureImageAlpha".
void assignImage(const mrpt::utils::CImage &img)
Assigns a texture image, and disable transparency.
void readFromStreamTexturedObject(mrpt::utils::CStream &in)
A class for storing images as grayscale or RGB bitmaps.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.