Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Graphics::BaseTexture Class Reference

Class for base texture. More...

#include <base_texture.h>

Public Member Functions

 BaseTexture ()=delete
 
 BaseTexture (const GLenum texture_type)
 BaseTexture constructor. More...
 
 ~BaseTexture ()
 Destroys the object. More...
 
unsigned int getWidth () const noexcept
 Gets the width. More...
 
unsigned int getHeight () const noexcept
 Gets the height. More...
 
virtual bool load (const std::string &filename)
 Loads the texture. More...
 
virtual void bind (const unsigned int texture_unit)
 Binds texture to opengl on the texture unit. More...
 
virtual bool isLoaded () const noexcept
 Determines if loaded. More...
 
void setName (const std::string name) noexcept
 Sets the name. More...
 
std::string getName () const noexcept
 Gets the name. More...
 
std::string to_string () const noexcept
 Returns a string representation of the object. More...
 
virtual unsigned int getTextureObject () const noexcept
 Gets the texture object. More...
 

Detailed Description

Class for base texture.

Constructor & Destructor Documentation

Graphics::BaseTexture::BaseTexture ( )
delete
Graphics::BaseTexture::BaseTexture ( const GLenum  texture_type)

BaseTexture constructor.

Parameters
[in]texture_typeThe open gl texture type
Graphics::BaseTexture::~BaseTexture ( )

Destroys the object.

Member Function Documentation

void Graphics::BaseTexture::bind ( const unsigned int  texture_unit)
virtual

Binds texture to opengl on the texture unit.

Parameters
[in]texture_unitThe texture unit

Referenced by generated::getBaseTextureModule().

unsigned int Graphics::BaseTexture::getHeight ( ) const
noexcept

Gets the height.

Returns
The height.

Referenced by generated::getBaseTextureModule(), and to_string().

std::string Graphics::BaseTexture::getName ( ) const
noexcept

Gets the name.

Returns
The name.

Referenced by generated::getBaseTextureModule(), and to_string().

unsigned int Graphics::BaseTexture::getTextureObject ( ) const
virtualnoexcept

Gets the texture object.

Returns
The texture object.
unsigned int Graphics::BaseTexture::getWidth ( ) const
noexcept

Gets the width.

Returns
The width.

Referenced by generated::getBaseTextureModule(), and to_string().

bool Graphics::BaseTexture::isLoaded ( ) const
virtualnoexcept

Determines if loaded.

Returns
True if loaded, False otherwise.

Referenced by generated::getBaseTextureModule(), and to_string().

bool Graphics::BaseTexture::load ( const std::string &  filename)
virtual

Loads the texture.

Parameters
[in]filenameThe filename
Returns
True on success

Referenced by generated::getBaseTextureModule().

void Graphics::BaseTexture::setName ( const std::string  name)
noexcept

Sets the name.

Parameters
[in]nameThe name

Referenced by generated::getBaseTextureModule().

std::string Graphics::BaseTexture::to_string ( ) const
noexcept

Returns a string representation of the object.

Returns
String representation of the object.

References getHeight(), getName(), getWidth(), and isLoaded().

Referenced by generated::getBaseTextureModule().


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