Public Member Functions | Protected Member Functions | Protected Attributes | Friends

sp::video::GLTextureBase Class Reference

#include <spOpenGLTextureBase.hpp>

Inheritance diagram for sp::video::GLTextureBase:
sp::video::Texture sp::BaseObject sp::video::OpenGLES1Texture sp::video::OpenGLES2Texture sp::video::OpenGLTexture

List of all members.

Public Member Functions

virtual ~GLTextureBase ()
bool valid () const
 Returns true if the texture is correctly created by the used renderer.
void setFilter (const ETextureFilters Filter)
void setFilter (const ETextureFilters MagFilter, const ETextureFilters MinFilter)
void setMagFilter (const ETextureFilters Filter)
void setMinFilter (const ETextureFilters Filter)
void setMipMapFilter (const ETextureMipMapFilters MipMapFilter)
void setWrapMode (const ETextureWrapModes Wrap)
void setWrapMode (const ETextureWrapModes WrapU, const ETextureWrapModes WrapV, const ETextureWrapModes WrapW=TEXWRAP_REPEAT)
void generateMipMap ()
 Generates the mipmaps if enabled.
void bind (s32 Level=0) const
void unbind (s32 Level=0) const

Protected Member Functions

 GLTextureBase ()
 GLTextureBase (const STextureCreationFlags &CreationFlags)
void createHWTexture ()
void deleteHWTexture ()
void updateTextureAttributesImmediate ()
 Updates the texture attributes immediately, i.e. the OpenGL texture will be bound and unbound automatically.
virtual void updateTextureAttributes ()
virtual void updateTextureImage ()
virtual void updateHardwareFormats ()=0
virtual void updateHardwareTexture (dim::vector3di Size, const u32 PixelSize, const void *ImageBuffer, s32 Level=0)=0
GLuint getTexID () const
GLuint * getTexPtrID () const

Protected Attributes

GLenum GLFormat_
GLenum GLInternalFormat_
GLenum GLDimension_
GLenum GLType_

Friends

class GLProgrammableFunctionPipeline
class GLFramebufferObject

Constructor & Destructor Documentation

virtual sp::video::GLTextureBase::~GLTextureBase (  )  [virtual]
sp::video::GLTextureBase::GLTextureBase (  )  [protected]
sp::video::GLTextureBase::GLTextureBase ( const STextureCreationFlags CreationFlags  )  [protected]

Member Function Documentation

void sp::video::GLTextureBase::bind ( s32  Level = 0  )  const [virtual]

Reimplemented from sp::video::Texture.

void sp::video::GLTextureBase::createHWTexture (  )  [protected]
void sp::video::GLTextureBase::deleteHWTexture (  )  [protected]
void sp::video::GLTextureBase::generateMipMap (  )  [virtual]

Generates the mipmaps if enabled.

Reimplemented from sp::video::Texture.

GLuint sp::video::GLTextureBase::getTexID (  )  const [inline, protected]
GLuint* sp::video::GLTextureBase::getTexPtrID (  )  const [inline, protected]
void sp::video::GLTextureBase::setFilter ( const ETextureFilters  Filter  )  [virtual]

Texture's filter mode. By default FILTER_SMOOTH. The renderers normally calls this type "linear". But in this engine a "linear" texture has none-smoothed texels. This is the second value: FILTER_LINEAR. Mag (magnification) is the filter when the texels are bigger then one pixel on the screen. Min (minification) is the filter when the texels are smaller then one pixel on the screen (normally using MipMaps).

Reimplemented from sp::video::Texture.

void sp::video::GLTextureBase::setFilter ( const ETextureFilters  MagFilter,
const ETextureFilters  MinFilter 
) [virtual]

Reimplemented from sp::video::Texture.

void sp::video::GLTextureBase::setMagFilter ( const ETextureFilters  Filter  )  [virtual]

Reimplemented from sp::video::Texture.

void sp::video::GLTextureBase::setMinFilter ( const ETextureFilters  Filter  )  [virtual]

Reimplemented from sp::video::Texture.

void sp::video::GLTextureBase::setMipMapFilter ( const ETextureMipMapFilters  MipMapFilter  )  [virtual]

Texture's mipmap filter. By default FILTER_TRILINEAR. Three filter types are supported: FILTER_BILINEAR, FILTER_TRILINEAR and FILTER_ANISOTROPIC. If the filter is FILTER_ANISOTROPIC the anisotropy factor can be set by "setAnisotropicSamples". The texture quality grows with these parameters. i.e. FILTER_BILINEAR looks worst and FILTER_ANISOTROPIC looks best. This is the method on how MIP-mapping is computed. If the texture has no MIP-maps the filter is unnecessary.

Reimplemented from sp::video::Texture.

void sp::video::GLTextureBase::setWrapMode ( const ETextureWrapModes  WrapU,
const ETextureWrapModes  WrapV,
const ETextureWrapModes  WrapW = TEXWRAP_REPEAT 
) [virtual]

Reimplemented from sp::video::Texture.

void sp::video::GLTextureBase::setWrapMode ( const ETextureWrapModes  Wrap  )  [virtual]

Texture coordinate wrap mode. This type says the renderer how to handle the texture coordinate greater then 1.0 or smaller then 0.0. Three types are supported: TEXWRAP_REPEAT (default value), TEXWRAP_MIRROR, TEXWRAP_CLAMP (normall used for SkyBoxes).

Reimplemented from sp::video::Texture.

void sp::video::GLTextureBase::unbind ( s32  Level = 0  )  const [virtual]

Reimplemented from sp::video::Texture.

virtual void sp::video::GLTextureBase::updateHardwareFormats (  )  [protected, pure virtual]
virtual void sp::video::GLTextureBase::updateHardwareTexture ( dim::vector3di  Size,
const u32  PixelSize,
const void *  ImageBuffer,
s32  Level = 0 
) [protected, pure virtual]
virtual void sp::video::GLTextureBase::updateTextureAttributes (  )  [protected, virtual]
void sp::video::GLTextureBase::updateTextureAttributesImmediate (  )  [protected]

Updates the texture attributes immediately, i.e. the OpenGL texture will be bound and unbound automatically.

virtual void sp::video::GLTextureBase::updateTextureImage (  )  [protected, virtual]
bool sp::video::GLTextureBase::valid (  )  const [virtual]

Returns true if the texture is correctly created by the used renderer.

Reimplemented from sp::video::Texture.


Friends And Related Function Documentation

friend class GLFramebufferObject [friend]
friend class GLProgrammableFunctionPipeline [friend]

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines