Texture class.
More...
#include <Texture.h>
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?)
◆ 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
-
tType | The type of Texture |
filename | The path of the file (including name), relative to the running directory of Engine |
textureName | Name of texture for identification |
textureShaderName | Name 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
◆ 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 |
◆ 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:
- Karma/src/Karma/Renderer/Texture.h
- Karma/src/Karma/Renderer/Texture.cpp