gsdx-ogl: Save depth image as RGB and alpha images

This commit is contained in:
Jonathan Li 2016-02-22 19:32:57 +00:00
parent aa3f4c74dc
commit cf939620ea
3 changed files with 1 additions and 3 deletions

View File

@ -34,7 +34,6 @@ struct {
{PNG_COLOR_TYPE_RGB , 4, 3, 8 , {".png", nullptr}}, // RGB_PNG {PNG_COLOR_TYPE_RGB , 4, 3, 8 , {".png", nullptr}}, // RGB_PNG
{PNG_COLOR_TYPE_RGB , 4, 3, 8 , {".png", "_alpha.png"}}, // RGB_A_PNG {PNG_COLOR_TYPE_RGB , 4, 3, 8 , {".png", "_alpha.png"}}, // RGB_A_PNG
{PNG_COLOR_TYPE_GRAY, 4, 1, 8 , {"_alpha.png", nullptr}}, // ALPHA_PNG {PNG_COLOR_TYPE_GRAY, 4, 1, 8 , {"_alpha.png", nullptr}}, // ALPHA_PNG
{PNG_COLOR_TYPE_GRAY, 4, 2, 16, {"_lsb.png", "_msb.png"}}, // DEPTH_PNG
{PNG_COLOR_TYPE_GRAY, 1, 1, 8 , {"_R8I.png", nullptr}}, // R8I_PNG {PNG_COLOR_TYPE_GRAY, 1, 1, 8 , {"_R8I.png", nullptr}}, // R8I_PNG
{PNG_COLOR_TYPE_GRAY, 2, 2, 16, {"_R16I.png", nullptr}}, // R16I_PNG {PNG_COLOR_TYPE_GRAY, 2, 2, 16, {"_R16I.png", nullptr}}, // R16I_PNG
{PNG_COLOR_TYPE_GRAY, 4, 2, 16, {"_R32I_lsb.png", "_R32I_msb.png"}}, // R32I_PNG {PNG_COLOR_TYPE_GRAY, 4, 2, 16, {"_R32I_lsb.png", "_R32I_msb.png"}}, // R32I_PNG

View File

@ -29,7 +29,6 @@ namespace GSPng {
RGB_PNG, RGB_PNG,
RGB_A_PNG, RGB_A_PNG,
ALPHA_PNG, ALPHA_PNG,
DEPTH_PNG,
R8I_PNG, R8I_PNG,
R16I_PNG, R16I_PNG,
R32I_PNG, R32I_PNG,

View File

@ -443,7 +443,7 @@ bool GSTextureOGL::Save(const string& fn, bool dds)
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0); glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
fmt = GSPng::DEPTH_PNG; fmt = GSPng::RGB_A_PNG;
} else if(m_format == GL_R32I) { } else if(m_format == GL_R32I) {
glGetTextureImage(m_texture_id, 0, GL_RED_INTEGER, GL_INT, buf_size, image.get()); glGetTextureImage(m_texture_id, 0, GL_RED_INTEGER, GL_INT, buf_size, image.get());