Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
fireworks::graphics::Texture Class Reference

The class responsible for loading Textures. More...

#include <texture.h>

Public Member Functions

 Texture (const std::string &path, bool flip=true, const std::string &typeName="texture_diffuse")
 Creates Textures from images. More...
 
 ~Texture ()
 
void bind () const
 Binds the texture. More...
 
void unbind () const
 Unbinds the texture. More...
 
const unsigned int getWidth () const
 Gets the Width of the texture. More...
 
const unsigned int getHeight () const
 Gets the Height of the texture. More...
 
const unsigned int getID () const
 Gets the ID of the texture. More...
 
const std::string getPath () const
 Gets the path of the texture. More...
 
const std::string getTypeName () const
 Return the name of the texture's type. More...
 

Detailed Description

The class responsible for loading Textures.

Constructor & Destructor Documentation

◆ Texture()

fireworks::graphics::Texture::Texture ( const std::string &  path,
bool  flip = true,
const std::string &  typeName = "texture_diffuse" 
)

Creates Textures from images.

Parameters
pathThe file path to the image/texture
Warning
Currently only supports .png files

◆ ~Texture()

fireworks::graphics::Texture::~Texture ( )

Member Function Documentation

◆ bind()

void fireworks::graphics::Texture::bind ( ) const

Binds the texture.

◆ getHeight()

const unsigned int fireworks::graphics::Texture::getHeight ( ) const
inline

Gets the Height of the texture.

◆ getID()

const unsigned int fireworks::graphics::Texture::getID ( ) const
inline

Gets the ID of the texture.

◆ getPath()

const std::string fireworks::graphics::Texture::getPath ( ) const
inline

Gets the path of the texture.

◆ getTypeName()

const std::string fireworks::graphics::Texture::getTypeName ( ) const
inline

Return the name of the texture's type.

◆ getWidth()

const unsigned int fireworks::graphics::Texture::getWidth ( ) const
inline

Gets the Width of the texture.

◆ unbind()

void fireworks::graphics::Texture::unbind ( ) const

Unbinds the texture.


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