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