Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
TextureBackend Class Referenceabstract

A base texture. More...

#include <Texture.h>

Inherits Object.

Inherited by Texture2DBackend, and TextureCubemapBackend.

Public Member Functions

virtual void updateSamplerDescriptor (const SamplerDescriptor &sampler)=0
 Update sampler.
 
virtual void generateMipmaps ()=0
 Generate mipmaps.
 
virtual void updateTextureDescriptor (const TextureDescriptor &descriptor, int index=0)
 Update texture description.
 
PixelFormat getTextureFormat () const
 Get texture format.
 
TextureUsage getTextureUsage () const
 Get texture usage.
 
TextureType getTextureType () const
 Get texture type.
 
bool hasMipmaps () const
 Check if mipmap had generated before.
 
- Public Member Functions inherited from Object
void retain ()
 Retains the ownership.
 
void release ()
 Releases the ownership immediately.
 
Objectautorelease ()
 Releases the ownership sometime soon automatically.
 
unsigned int getReferenceCount () const
 Returns the Object's current reference count.
 
virtual ~Object ()
 Destructor.
 

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 

Detailed Description

A base texture.

Member Function Documentation

◆ updateSamplerDescriptor()

virtual void updateSamplerDescriptor ( const SamplerDescriptor & sampler)
pure virtual

Update sampler.

Parameters
samplerSpecifies the sampler descriptor.

Implemented in Texture2DGL, TextureCubeGL, TextureCubeMTL, and TextureMTL.

◆ updateTextureDescriptor()

virtual void updateTextureDescriptor ( const TextureDescriptor & descriptor,
int index = 0 )
virtual

Update texture description.

Parameters
descriptorSpecifies texture and sampler descriptor.

Reimplemented in Texture2DGL, TextureCubeGL, TextureCubeMTL, and TextureMTL.

◆ getTextureFormat()

PixelFormat getTextureFormat ( ) const
inline

Get texture format.

Returns
Texture format.

◆ getTextureUsage()

TextureUsage getTextureUsage ( ) const
inline

Get texture usage.

Symbolic constant can be READ, WRITE or RENDER_TARGET.

Returns
Texture usage.

◆ getTextureType()

TextureType getTextureType ( ) const
inline

Get texture type.

Symbolic constant value can be either TEXTURE_2D or TEXTURE_CUBE.

Returns
Texture type.

◆ hasMipmaps()

bool hasMipmaps ( ) const
inline

Check if mipmap had generated before.

Returns
true if the mipmap has always generated before, otherwise false.

The documentation for this class was generated from the following file: