2D_Game_Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends | List of all members
Texture Class Reference

#include <texture.hpp>

Inheritance diagram for Texture:
SpriteSheet

Public Member Functions

 Texture ()
 
 Texture (const std::string &path, int mag_filter, int min_filter, uint32_t texID)
 
 Texture (Texture &other)
 
 ~Texture ()
 
void Bind (unsigned int slot=0) const
 
void Unbind () const
 
int GetWidth () const
 
int GetHeight () const
 
unsigned int GetTexID () const
 
Textureoperator= (Texture &other)
 
Textureoperator= (Texture &&other)
 
void FreeTexture ()
 

Protected Attributes

unsigned int m_ID
 
uint32_t m_TexID
 
std::string m_FilePath
 
std::string m_LoadedFilePath
 
int m_MagFilter
 
int m_MinFilter
 
int m_LoadedMagFilter
 
int m_LoadedMinFilter
 
unsigned char * m_LocalBuffer
 
int m_Width
 
int m_Height
 
int m_BPP
 

Friends

class Renderer
 
class TexturesManager
 
class SceneSerializer
 

Detailed Description

Definition at line 9 of file texture.hpp.

Constructor & Destructor Documentation

◆ Texture() [1/3]

Texture::Texture ( )
inline

Definition at line 11 of file texture.hpp.

◆ Texture() [2/3]

Texture::Texture ( const std::string & path,
int mag_filter,
int min_filter,
uint32_t texID )

Definition at line 6 of file texture.cpp.

◆ Texture() [3/3]

Texture::Texture ( Texture & other)

Definition at line 37 of file texture.cpp.

◆ ~Texture()

Texture::~Texture ( )

Definition at line 52 of file texture.cpp.

Member Function Documentation

◆ Bind()

void Texture::Bind ( unsigned int slot = 0) const

Definition at line 62 of file texture.cpp.

◆ FreeTexture()

void Texture::FreeTexture ( )
inline

Definition at line 60 of file texture.hpp.

◆ GetHeight()

int Texture::GetHeight ( ) const
inline

Definition at line 21 of file texture.hpp.

◆ GetTexID()

unsigned int Texture::GetTexID ( ) const
inline

Definition at line 22 of file texture.hpp.

◆ GetWidth()

int Texture::GetWidth ( ) const
inline

Definition at line 20 of file texture.hpp.

◆ operator=() [1/2]

Texture & Texture::operator= ( Texture && other)
inline

Definition at line 41 of file texture.hpp.

◆ operator=() [2/2]

Texture & Texture::operator= ( Texture & other)
inline

Definition at line 24 of file texture.hpp.

◆ Unbind()

void Texture::Unbind ( ) const

Definition at line 67 of file texture.cpp.

Friends And Related Symbol Documentation

◆ Renderer

friend class Renderer
friend

Definition at line 68 of file texture.hpp.

◆ SceneSerializer

friend class SceneSerializer
friend

Definition at line 70 of file texture.hpp.

◆ TexturesManager

friend class TexturesManager
friend

Definition at line 69 of file texture.hpp.

Member Data Documentation

◆ m_BPP

int Texture::m_BPP
protected

Definition at line 81 of file texture.hpp.

◆ m_FilePath

std::string Texture::m_FilePath
protected

Definition at line 78 of file texture.hpp.

◆ m_Height

int Texture::m_Height
protected

Definition at line 81 of file texture.hpp.

◆ m_ID

unsigned int Texture::m_ID
protected

Definition at line 76 of file texture.hpp.

◆ m_LoadedFilePath

std::string Texture::m_LoadedFilePath
protected

Definition at line 78 of file texture.hpp.

◆ m_LoadedMagFilter

int Texture::m_LoadedMagFilter
protected

Definition at line 79 of file texture.hpp.

◆ m_LoadedMinFilter

int Texture::m_LoadedMinFilter
protected

Definition at line 79 of file texture.hpp.

◆ m_LocalBuffer

unsigned char* Texture::m_LocalBuffer
protected

Definition at line 80 of file texture.hpp.

◆ m_MagFilter

int Texture::m_MagFilter
protected

Definition at line 79 of file texture.hpp.

◆ m_MinFilter

int Texture::m_MinFilter
protected

Definition at line 79 of file texture.hpp.

◆ m_TexID

uint32_t Texture::m_TexID
protected

Definition at line 77 of file texture.hpp.

◆ m_Width

int Texture::m_Width
protected

Definition at line 81 of file texture.hpp.


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