126 virtual bool loadFromFile(
const std::string& a_fileName);
129 virtual bool saveToFile(
const std::string& a_fileName);
203 virtual void reset();
Implements color properties.
Implements a base class for textures.
Implements a 2D image data structure.
This class implements a base class for textures.
Definition CGenericTexture.h:133
This class implements a 1D texture map.
Definition CTexture1d.h:84
GLuint getTextureId()
This method returns the texture ID.
Definition CTexture1d.h:120
GLint m_environmentMode
OpenGL texture mode (GL_MODULATE, GL_DECAL, GL_BLEND, or GL_REPLACE).
Definition CTexture1d.h:240
GLint m_minFunctionMipmapsON
Texture minification function when mipmapping is ON.
Definition CTexture1d.h:255
bool m_useMipmaps
If true, mipmaps are enabled.
Definition CTexture1d.h:234
void setTextureId(const GLuint a_textureId)
This method sets the texture ID.
Definition CTexture1d.h:117
cTexture1dPtr copy()
This method creates a copy of itself.
Definition CTexture1d.cpp:97
virtual void markForDeleteAndUpdate()
This method marks this texture for GPU deletion and reinitialization.
Definition CTexture1d.cpp:332
virtual ~cTexture1d()
Destructor of cTexture1d.
Definition CTexture1d.cpp:77
cTexture1d()
Constructor of cTexture1d.
Definition CTexture1d.cpp:59
GLint getEnvironmentMode()
This method returns the environment mode status.
Definition CTexture1d.h:147
GLint getWrapModeS() const
This method returns the texture wrap mode of s.
Definition CTexture1d.h:153
virtual void reset()
This method resets all internal variables. This function should be called only by constructors.
Definition CTexture1d.cpp:125
GLint m_minFunctionMipmapsOFF
Texture minification function when mipmapping is OFF.
Definition CTexture1d.h:249
GLint getMagFunction() const
This method returns the current magnification function value.
Definition CTexture1d.h:159
bool getUseMipmaps()
This returns the the status of mipmaps.
Definition CTexture1d.h:177
virtual void markForUpdate()
This method marks this texture for GPU update.
Definition CTexture1d.cpp:320
bool m_updateTextureFlag
If true, texture bitmap needs to be updated to GPU memory.
Definition CTexture1d.h:219
void setMagFunction(const GLint a_magFunction)
This method sets the magnification function value.
Definition CTexture1d.cpp:449
cColorf m_color
Environmental color.
Definition CTexture1d.h:193
void setUseMipmaps(bool a_useMipmaps)
This method enables or disables the use of mipmaps.
Definition CTexture1d.cpp:511
static cTexture1dPtr create()
Shared cTexture1d allocator.
Definition CTexture1d.h:98
bool m_useSphericalMapping
If true, spherical mapping is enable.
Definition CTexture1d.h:237
bool m_deleteTextureFlag
If true, texture bitmap needs to be deleted from GPU memory.
Definition CTexture1d.h:216
GLint m_minFunction
Texture minification function value. (GL_NEAREST or GL_LINEAR).
Definition CTexture1d.h:231
virtual void renderInitialize(cRenderOptions &a_options)
This method enables texturing and sets this texture as the current texture.
Definition CTexture1d.cpp:171
virtual bool saveToFile(const std::string &a_fileName)
This method save a texture image to a file.
Definition CTexture1d.cpp:307
void setMinFunction(const GLint a_minFunction)
This method sets the minification function value.
Definition CTexture1d.cpp:487
void setTextureUnit(const GLenum a_textureUnit)
This method set the texture unit where a_textureUnit is GL_TEXTUREi_ARB, where 0i<GL_MAX_TEXTURE_UNIT...
Definition CTexture1d.h:111
GLint m_magFunction
Texture magnification function value. (GL_NEAREST or GL_LINEAR).
Definition CTexture1d.h:228
GLint m_magFunctionMipmapsON
Texture magnification function when mipmapping is ON.
Definition CTexture1d.h:252
GLuint m_textureID
OpenGL texture ID number.
Definition CTexture1d.h:222
bool getSphericalMappingEnabled() const
This method returns thestatus of the spherical mapping mode.
Definition CTexture1d.h:171
GLint getMinFunction() const
This method returns the current minification function value.
Definition CTexture1d.h:165
virtual void renderFinalize(cRenderOptions &a_options)
This method disables texture rendering. This method should be called after triangles have been render...
Definition CTexture1d.cpp:273
virtual void update(cRenderOptions &a_options)
This method update the OpenGL texture to GPU.
Definition CTexture1d.cpp:346
bool setImage(cImagePtr a_image)
This method assigns an image to this texture.
Definition CTexture1d.cpp:537
virtual bool loadFromFile(const std::string &a_fileName)
This method load a texture image from a file.
Definition CTexture1d.cpp:294
GLint m_magFunctionMipmapsOFF
Texture magnification function when mipmapping is OFF.
Definition CTexture1d.h:246
virtual void setWrapModeS(const GLint &a_wrapModeS)
This method set the texture wrap mode of s.
Definition CTexture1d.cpp:432
virtual std::string getClassName()
This method returns the name of the object class.
Definition CTexture1d.h:108
GLint m_wrapModeS
Texture wrap parameter along s (GL_REPEAT or GL_CLAMP).
Definition CTexture1d.h:225
GLenum m_textureUnit
Texture unit number.
Definition CTexture1d.h:243
GLenum getTextureUnit() const
This method returns the texture unit value.
Definition CTexture1d.h:114
void setEnvironmentMode(const GLint &a_environmentMode)
This method sets the environment mode (GL_MODULATE, GL_DECAL, GL_BLEND, GL_REPLACE).
Definition CTexture1d.h:144
cImagePtr m_image
Image object associated with texture (use this to get data about the texture itself).
Definition CTexture1d.h:190
void setSphericalMappingEnabled(const bool a_enabled)
This method enables of disables the spherical mapping mode.
Definition CTexture1d.h:168
Definition CAudioBuffer.cpp:57
std::shared_ptr< cImage > cImagePtr
Definition CImage.h:64
std::shared_ptr< cTexture1d > cTexture1dPtr
Definition CTexture1d.h:68
This class defines a color using a GLfloat representation for each component.
Definition CColor.h:139
This structures provide a containers for storing rendering options that are passed through the sceneg...
Definition CRenderOptions.h:83