Aether3D Game Engine
Public Member Functions | Static Public Member Functions | List of all members
ae3d::Texture2D Class Reference

2D texture. More...

#include <Texture2D.hpp>

Inheritance diagram for ae3d::Texture2D:
Inheritance graph
[legend]
Collaboration diagram for ae3d::Texture2D:
Collaboration graph
[legend]

Public Member Functions

void Load (const FileSystem::FileContentsData &textureData, TextureWrap wrap, TextureFilter filter, Mipmaps mipmaps, ColorSpace colorSpace, float anisotropy)
 
void LoadFromAtlas (const FileSystem::FileContentsData &atlasTextureData, const FileSystem::FileContentsData &atlasMetaData, const char *textureName, TextureWrap wrap, TextureFilter filter, ColorSpace colorSpace, float anisotropy)
 
- Public Member Functions inherited from ae3d::TextureBase
unsigned GetID () const
 
ColorSpace GetColorSpace () const
 
float GetAnisotropy () const
 
int GetWidth () const
 
int GetHeight () const
 
TextureWrap GetWrap () const
 
TextureFilter GetFilter () const
 
Mipmaps GetMipmaps () const
 
const Vec4GetScaleOffset () const
 
bool IsOpaque () const
 
bool IsRenderTexture () const
 

Static Public Member Functions

static Texture2DGetDefaultTexture ()
 Gets a default texture that is always available after System::LoadBuiltinAssets().
 

Additional Inherited Members

- Protected Attributes inherited from ae3d::TextureBase
int width = 0
 Width in pixels.
 
int height = 0
 Height in pixels.
 
unsigned handle = 0
 Graphics API handle.
 
TextureWrap wrap = TextureWrap::Repeat
 Wrapping controls how coordinates outside 0-1 are interpreted.
 
TextureFilter filter = TextureFilter::Nearest
 Filtering mode.
 
Vec4 scaleOffset { 1, 1, 0, 0 }
 Scale (tiling) and offset.
 
Mipmaps mipmaps = Mipmaps::None
 Mipmaps.
 
float anisotropy = 1
 Anisotropy.
 
ColorSpace colorSpace = ColorSpace::RGB
 Color space.
 
bool opaque = true
 Is the texture opaque.
 
bool isRenderTexture = false
 Is the texture a render texture.
 

Detailed Description

2D texture.

Member Function Documentation

void ae3d::Texture2D::Load ( const FileSystem::FileContentsData textureData,
TextureWrap  wrap,
TextureFilter  filter,
Mipmaps  mipmaps,
ColorSpace  colorSpace,
float  anisotropy 
)
Parameters
textureDataTexture image data. File format must be dds, png, tga, jpg, bmp or bmp.
wrapWrap mode.
filterFilter mode.
mipmapsMipmaps
colorSpaceColor space.
anisotropyAnisotropy. Value range is 1-16 depending on support.
void ae3d::Texture2D::LoadFromAtlas ( const FileSystem::FileContentsData atlasTextureData,
const FileSystem::FileContentsData atlasMetaData,
const char *  textureName,
TextureWrap  wrap,
TextureFilter  filter,
ColorSpace  colorSpace,
float  anisotropy 
)
Parameters
atlasTextureDataAtlas texture image data. File format must be dds, png, tga, jpg, bmp or bmp.
atlasMetaDataAtlas metadata. Format is Ogre/CEGUI. Example atlas tool: Texture Packer.
textureNameName of the texture in atlas.
wrapWrap mode.
filterFilter mode.
colorSpaceColor space.
anisotropyAnisotropy. Value range is 1-16 depending on support.

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