fix randomized faces on export jpg
This commit is contained in:
@@ -1254,7 +1254,7 @@ void Canvas::export_equirectangular_thread(std::string file_path)
|
|||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, cube_id);
|
glBindTexture(GL_TEXTURE_CUBE_MAP, cube_id);
|
||||||
for (GLuint i = 0; i < 6; i++)
|
for (GLuint i = 0; i < 6; i++)
|
||||||
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGBA8, m_width, m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
|
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGBA8, m_width, m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
|
||||||
int faces[]{
|
static int faces[]{
|
||||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, // front
|
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, // front
|
||||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_X, // right
|
GL_TEXTURE_CUBE_MAP_NEGATIVE_X, // right
|
||||||
GL_TEXTURE_CUBE_MAP_POSITIVE_Z, // back
|
GL_TEXTURE_CUBE_MAP_POSITIVE_Z, // back
|
||||||
@@ -1268,6 +1268,10 @@ void Canvas::export_equirectangular_thread(std::string file_path)
|
|||||||
|
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
|
// prepare common states
|
||||||
|
glViewport(0, 0, m_width, m_height);
|
||||||
|
glEnable(GL_BLEND);
|
||||||
|
|
||||||
ShaderManager::use(kShader::TextureAlpha);
|
ShaderManager::use(kShader::TextureAlpha);
|
||||||
ShaderManager::u_int(kShaderUniform::Highlight, false);
|
ShaderManager::u_int(kShaderUniform::Highlight, false);
|
||||||
ShaderManager::u_int(kShaderUniform::Tex, 0);
|
ShaderManager::u_int(kShaderUniform::Tex, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user