Try to fix bugs that came up but just keeping the old parameters for row alignment: 4 or 1
Revert "Try to fix bugs that came up but just keeping the old parameters for row alignment: 4 or 1"
This was not the correct fix.
This reverts commit eaec065a755489f718477a2b7fcd4f3dde1b6c25.
For some non power of two textures, even if the row alignment was 8, 4 or 2, setting this resulted in corruption.
See https://github.com/cocos2d/cocos2d-x/commit/e66e7cfcca2676d8e1b3fa44b27e096729c68f5a#commitcomment-3243089 for texture example.
Fix by setting alignment to 1 for ALL non-PO2 textures.
The real cause of the problem for the texture corruption was when using textures with no alpha.
The function bitsPerPixelForFormat returns the wrong number for RGB_888.
Merge pull request #2586 from silverscania/master

Bug in previous modifications made to GL_UNPACK_ALIGNMENT