mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-26 16:08:09 +00:00
Move default bit depth definitions to abstracted pixel buffer loading function.
This commit is contained in:
parent
7359f9e758
commit
e780560d1e
2 changed files with 5 additions and 5 deletions
|
@ -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];
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue