From Vladimir Shabanov, "The DDS plugin didn't correctly read mipmapped A8L8 textures.
I've attached a small fix for this. Cause: uncompressed mipmap handling was done only for RGB pixel format. Fix: added condition for handling alpha and luminance formats too."
This commit is contained in:
@@ -392,7 +392,7 @@ osg::Image* ReadDDSFile(std::istream& _istream)
|
||||
//###[afarre_051904] osgImage->setMipmapData(mipmaps);
|
||||
}
|
||||
// Handle uncompressed mipmaps
|
||||
if(ddsd.ddpfPixelFormat.dwFlags & DDPF_RGB)
|
||||
if(ddsd.ddpfPixelFormat.dwFlags & (DDPF_RGB | DDPF_LUMINANCE | DDPF_ALPHA))
|
||||
{
|
||||
int offset = 0;
|
||||
int width = ddsd.dwWidth;
|
||||
|
||||
Reference in New Issue
Block a user