Align OpenGL textured integration baselines
This commit is contained in:
@@ -121,13 +121,14 @@ bool OpenGLTexture::InitializeCubeMap(int size, int mipLevels, OpenGLFormat form
|
||||
bool OpenGLTexture::LoadFromFile(const char* path, bool flipVertical) {
|
||||
stbi_set_flip_vertically_on_load(flipVertical ? 1 : 0);
|
||||
|
||||
unsigned char* data = stbi_load(path, &m_width, &m_height, &m_channels, 0);
|
||||
unsigned char* data = stbi_load(path, &m_width, &m_height, &m_channels, STBI_rgb_alpha);
|
||||
if (!data) {
|
||||
std::cout << "Failed to load texture: " << path << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool result = Initialize2D(m_width, m_height, m_channels, data, true);
|
||||
m_channels = 4;
|
||||
bool result = Initialize2D(m_width, m_height, m_channels, data, false);
|
||||
stbi_image_free(data);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user