TeaPacket v0.0.1
Multiplatform Game Engine
Loading...
Searching...
No Matches
TeaPacket::Graphics::Texture Class Reference

#include <Texture.hpp>

Public Member Functions

void Initialize (const unsigned char *data)
 

Static Public Member Functions

static Texture CreateTexture (const unsigned char *data, unsigned short width, unsigned short height, TextureFilterType filterType=TEXTURE_FILTER_LINEAR, TextureWrapType wrapType=TEXTURE_WRAP_REPEAT)
 
static constexpr std::vector< unsigned char > GetFormatChannelSizes (TextureFormat format)
 

Public Attributes

unsigned short width
 
unsigned short height
 
TextureFilterType filterType = TEXTURE_FILTER_LINEAR
 
TextureWrapType wrapType = TEXTURE_WRAP_REPEAT
 
TextureFormat format = TEXTURE_FORMAT_RGBA8
 
PlatformTexture platformTexture
 

Member Function Documentation

◆ CreateTexture()

static Texture TeaPacket::Graphics::Texture::CreateTexture ( const unsigned char * data,
unsigned short width,
unsigned short height,
TextureFilterType filterType = TEXTURE_FILTER_LINEAR,
TextureWrapType wrapType = TEXTURE_WRAP_REPEAT )
static

Creates a texture from data.

Parameters
dataThe graphics data to be used. If nullptr, the texture's contents are uninitialized.
widthThe width of the texture.
heightThe height of the texture.
filterTypeThe filter type to be used by the texture.
wrapTypeThe wrap method used by the texture.

◆ GetFormatChannelSizes()

static constexpr std::vector< unsigned char > TeaPacket::Graphics::Texture::GetFormatChannelSizes ( TextureFormat format)
inlinestaticconstexpr

◆ Initialize()

void TeaPacket::Graphics::Texture::Initialize ( const unsigned char * data)

Initialize a texture.

Parameters
dataThe graphics data the texture needs. If nullptr, the texture's contents are uninitialized.

Member Data Documentation

◆ filterType

TextureFilterType TeaPacket::Graphics::Texture::filterType = TEXTURE_FILTER_LINEAR

◆ format

TextureFormat TeaPacket::Graphics::Texture::format = TEXTURE_FORMAT_RGBA8

◆ height

unsigned short TeaPacket::Graphics::Texture::height

◆ platformTexture

PlatformTexture TeaPacket::Graphics::Texture::platformTexture

◆ width

unsigned short TeaPacket::Graphics::Texture::width

◆ wrapType

TextureWrapType TeaPacket::Graphics::Texture::wrapType = TEXTURE_WRAP_REPEAT

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