#include <Texture.h>
Definition at line 5 of file Texture.h.
◆ Texture()
| Texture::Texture |
( |
const std::string & | path | ) |
|
Definition at line 5 of file Texture.cpp.
5 :
7{
8
9 stbi_set_flip_vertically_on_load(1);
12 {
13 std::cout << stbi_failure_reason();
14 }
17
19 GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
20 GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
21 GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
22 GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
23
24 GLCall(glBindTexture(GL_TEXTURE_2D, 0));
25
28 stbi_set_flip_vertically_on_load(0);
29}
unsigned int m_RendererID
unsigned char * m_LocalBuffer
◆ ~Texture()
◆ Bind()
| void Texture::Bind |
( |
unsigned int | slot = 0 | ) |
const |
Definition at line 46 of file Texture.cpp.
47{
48
49 GLCall(glActiveTexture(GL_TEXTURE0 + slot));
51}
◆ GetHeight()
| int Texture::GetHeight |
( |
| ) |
const |
|
inline |
◆ GetRendererID()
| unsigned int Texture::GetRendererID |
( |
| ) |
|
◆ GetWidth()
| int Texture::GetWidth |
( |
| ) |
const |
|
inline |
◆ SetFilePath()
| void Texture::SetFilePath |
( |
const std::string & | path | ) |
|
◆ Unbind()
| void Texture::Unbind |
( |
| ) |
const |
◆ m_BPP
◆ m_FilePath
| std::string Texture::m_FilePath |
◆ m_Height
◆ m_LocalBuffer
| unsigned char* Texture::m_LocalBuffer |
|
private |
◆ m_RendererID
| unsigned int Texture::m_RendererID |
|
private |
◆ m_Width
The documentation for this class was generated from the following files: