AireEngine
A 3D Open-World Game Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Aire::Texture Class Referenceabstract

Texture base class. More...

#include <texture.h>

Inheritance diagram for Aire::Texture:
Inheritance graph
[legend]
Collaboration diagram for Aire::Texture:
Collaboration graph
[legend]

Public Member Functions

 Texture ()
 Create the texture.
 
uint32_t getSize ()
 
GLuint getHandle () const
 
virtual ~Texture ()=0
 Destroy the texture.
 
void bindTexUnit (GLint textureUnit)
 
void setFiltering (GLint minFilter, GLint maxFilter)
 
void setWrapping (GLint wrapS, GLint wrapT, GLint wrapR)
 
unsigned chargetImageData ()
 
void setImageData (unsigned char *)
 
- Public Member Functions inherited from Aire::Resource
 Resource ()
 Default constructor.
 
virtual ~Resource ()
 Default destructor.
 
bool isLoadToGpu ()
 
ResourceState getState ()
 
void setState (ResourceState state)
 

Public Attributes

int texWidth
 
int texHeight
 
int texChannels
 
std::string dir
 

Protected Attributes

GLuint handle
 
unsigned charimageData
 
- Protected Attributes inherited from Aire::Resource
ResourceState resourceState
 

Detailed Description

Texture base class.

Member Function Documentation

◆ bindTexUnit()

void Texture::bindTexUnit ( GLint textureUnit)

Binds the texture to a given texture unit (appears as binding layout qualifier).

Parameters
textureUnitThe index of the texture unit.
Here is the caller graph for this function:

◆ getHandle()

GLuint Aire::Texture::getHandle ( ) const
inline
Returns
The internal OpenGL handle to the buffer.
Here is the caller graph for this function:

◆ getSize()

uint32_t Texture::getSize ( )
virtual

Get the size of the texture in memory

Returns
The number of Bytes in memory required for storing the texture buffer.

Implements Aire::Resource.

◆ setFiltering()

void Texture::setFiltering ( GLint minFilter,
GLint maxFilter )

Set filtering parameters for the texture. See: https://registry.khronos.org/OpenGL-Refpages/gl4/html/glTexParameter.xhtml

Parameters
minFilterThe type of minification filter.
maxFilterThe type of magnification filter.
Here is the caller graph for this function:

◆ setWrapping()

void Texture::setWrapping ( GLint wrapS,
GLint wrapT,
GLint wrapR )

Set wrapping mode on each axis in texture space. See: https://registry.khronos.org/OpenGL-Refpages/gl4/html/glTexParameter.xhtml

Parameters
wrapSWrapping mode along the S axis.
wrapTWrapping mode along the T axis.
wrapRWrapping mode along the R axis.
Here is the caller graph for this function:

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