KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::Texture Class Reference

Texture class. More...

#include <Texture.h>

Inheritance diagram for Karma::Texture:

Public Member Functions

 Texture ()
 A constructor.
 
 Texture (TextureType tType, const char *filename, std::string textureName, std::string textureShaderName)
 Another constructor.
 
 ~Texture ()
 A destructor.
 
const std::string & GetTextureName () const
 Getter for texture name.
 
const std::string & GetTextureShaderName () const
 Getter for Texture Shader name.
 
std::shared_ptr< VulkanTextureGetVulkanTexture () const
 Getter for VulkanTexture.
 

Detailed Description

Texture class.

Note
A texture often contains color information and is usually projected onto the triangles of a mesh. In this case, it acts a bit like those silly fake tattoos we used to apply to our arms when we were kids. But a texture can contain other kinds of visual surface properties as well as colors. And a texture needn’t be projected onto a mesh—for example, a texture might be used as a stand-alone data table. The individual picture elements of a texture are called texels to differentiate them from the pixels on the screen.
Todo
Need to integrate VulkanTexture in abstract way (vulkantexture shouldn't be explicit in this class, violation of SRP?)

Constructor & Destructor Documentation

◆ Texture() [1/2]

Karma::Texture::Texture ( )

A constructor.

Since
Karma 1.0.0

◆ Texture() [2/2]

Karma::Texture::Texture ( TextureType tType,
const char * filename,
std::string textureName,
std::string textureShaderName )

Another constructor.

Parameters
tTypeThe type of Texture
filenameThe path of the file (including name), relative to the running directory of Engine
textureNameName of texture for identification
textureShaderNameName of the shader with which shader binding is done (for instance, see OpenGLShader::Bind)
Since
Karma 1.0.0

◆ ~Texture()

Karma::Texture::~Texture ( )

A destructor.

Since
Karma 1.0.0

Member Function Documentation

◆ GetTextureName()

const std::string & Karma::Texture::GetTextureName ( ) const
inline

Getter for texture name.

Since
Karma 1.0.0

◆ GetTextureShaderName()

const std::string & Karma::Texture::GetTextureShaderName ( ) const
inline

Getter for Texture Shader name.

Since
Karma 1.0.0

◆ GetVulkanTexture()

std::shared_ptr< VulkanTexture > Karma::Texture::GetVulkanTexture ( ) const
inline

Getter for VulkanTexture.

Todo
Needs to be abstracted (no rendering API specific functionality in this class)
Since
Karma 1.0.0

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