#include <OpenGLTexture.h>
OpenGLTexture.h 파일의 9 번째 라인에서 정의되었습니다.
◆ OpenGLTexture2D() [1/2]
| Gear::OpenGLTexture2D::OpenGLTexture2D |
( |
const std::string & |
path | ) |
|
OpenGLTexture.cpp 파일의 26 번째 라인에서 정의되었습니다.
31 int width, height, channels;
32 stbi_set_flip_vertically_on_load(1);
33 stbi_uc* data =
nullptr;
35 GR_PROFILE_SCOPE(
"stbi_load - OpenGlTexture2D::OpenGLTexture2D(const std::string&)");
36 data = stbi_load(path.c_str(), &width, &height, &channels, 0);
42 GLenum internalFormat = 0, dataFormat = 0;
46 internalFormat = GL_RGBA8;
49 else if (channels == 3)
51 internalFormat = GL_RGB8;
58 GR_CORE_ASSERT(internalFormat & dataFormat,
"Format not supported!");
63 glTextureParameteri(
m_RendererID, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
64 glTextureParameteri(
m_RendererID, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
66 glTextureParameteri(
m_RendererID, GL_TEXTURE_WRAP_S, GL_REPEAT);
67 glTextureParameteri(
m_RendererID, GL_TEXTURE_WRAP_T, GL_REPEAT);
71 stbi_image_free(data);
◆ OpenGLTexture2D() [2/2]
| Gear::OpenGLTexture2D::OpenGLTexture2D |
( |
uint32_t |
width, |
|
|
uint32_t |
height |
|
) |
| |
◆ ~OpenGLTexture2D()
| Gear::OpenGLTexture2D::~OpenGLTexture2D |
( |
| ) |
|
|
virtual |
◆ Bind()
| void Gear::OpenGLTexture2D::Bind |
( |
uint32_t |
slot = 0 | ) |
const |
|
overridevirtual |
◆ Create() [1/2]
| Ref< Texture2D > Gear::Texture2D::Create |
( |
const std::string & |
path | ) |
|
|
staticinherited |
Texture.cpp 파일의 23 번째 라인에서 정의되었습니다.
28 GR_CORE_ASSERT(
false,
"RendererAPI::None is currently not supported!");
31 return CreateRef<OpenGLTexture2D>(path);
◆ Create() [2/2]
| Ref< Texture2D > Gear::Texture2D::Create |
( |
uint32_t |
width, |
|
|
uint32_t |
height |
|
) |
| |
|
staticinherited |
Texture.cpp 파일의 9 번째 라인에서 정의되었습니다.
14 GR_CORE_ASSERT(
false,
"RendererAPI::None is currently not supported!");
17 return CreateRef<OpenGLTexture2D>(width, height);
◆ GetHeight()
| virtual uint32_t Gear::OpenGLTexture2D::GetHeight |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ GetWidth()
| virtual uint32_t Gear::OpenGLTexture2D::GetWidth |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ SetData()
| void Gear::OpenGLTexture2D::SetData |
( |
void * |
data, |
|
|
uint32_t |
size |
|
) |
| |
|
overridevirtual |
◆ m_DataFormat
| GLenum Gear::OpenGLTexture2D::m_DataFormat |
|
private |
◆ m_Height
| uint32_t Gear::OpenGLTexture2D::m_Height |
|
private |
◆ m_InternalFormat
| GLenum Gear::OpenGLTexture2D::m_InternalFormat |
|
private |
◆ m_Path
| std::string Gear::OpenGLTexture2D::m_Path |
|
private |
◆ m_RendererID
| uint32_t Gear::OpenGLTexture2D::m_RendererID |
|
private |
◆ m_Width
| uint32_t Gear::OpenGLTexture2D::m_Width |
|
private |
이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: