Move default bit depth definitions to abstracted pixel buffer loading function.

This commit is contained in:
Pavel Krajcevski 2013-11-19 14:55:41 -05:00
parent 7359f9e758
commit e780560d1e
2 changed files with 5 additions and 5 deletions

View file

@ -138,6 +138,11 @@ unsigned int ImageLoader::GetChannelForPixel(uint32 x, uint32 y, uint32 ch) {
}
bool ImageLoader::LoadFromPixelBuffer(uint32 *data) {
m_RedChannelPrecision = 8;
m_GreenChannelPrecision = 8;
m_BlueChannelPrecision = 8;
m_AlphaChannelPrecision = 8;
const int nPixels = m_Width * m_Height;
m_RedData = new uint8[nPixels];
m_GreenData = new uint8[nPixels];

View file

@ -74,11 +74,6 @@ bool ImageLoaderPVR::ReadData() {
return false;
}
m_RedChannelPrecision = 8;
m_GreenChannelPrecision = 8;
m_BlueChannelPrecision = 8;
m_AlphaChannelPrecision = 8;
const pvrtexture::CPVRTextureHeader &hdr = pvrTex.getHeader();
m_Width = hdr.getWidth();