GL: Add Y16_X16 tex format (untested.)

This commit is contained in:
Unknown W. Brackets 2014-05-17 13:37:34 -07:00
parent 439dd9d8a3
commit 28b10157ad

View File

@ -266,6 +266,16 @@ public:
} }
break; break;
case CELL_GCM_TEXTURE_Y16_X16: // A 16-bit fixed-point number
{
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tex.GetWidth(), tex.GetHeight(), 0, GL_RG, GL_SHORT, pixels);
checkForGlError("GLTexture::Init() -> glTexImage2D");
static const GLint swizzleMaskX32_Y16_X16[] = { GL_GREEN, GL_RED, GL_GREEN, GL_RED };
glRemap = swizzleMaskX32_Y16_X16;
}
break;
case CELL_GCM_TEXTURE_R5G5B5A1: case CELL_GCM_TEXTURE_R5G5B5A1:
glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_TRUE); glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_TRUE);
checkForGlError("GLTexture::Init() -> glPixelStorei"); checkForGlError("GLTexture::Init() -> glPixelStorei");