From Farshid Lashkari, "Attached is a small patch that adds support for writing BGR images to the DDS plugin."
This commit is contained in:
@@ -782,6 +782,17 @@ bool WriteDDSFile(const osg::Image *img, std::ostream& fout)
|
|||||||
SD_flags |= DDSD_PITCH;
|
SD_flags |= DDSD_PITCH;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case GL_BGR:
|
||||||
|
{
|
||||||
|
ddpf.dwBBitMask = 0x000000ff;
|
||||||
|
ddpf.dwGBitMask = 0x0000ff00;
|
||||||
|
ddpf.dwRBitMask = 0x00ff0000;
|
||||||
|
PF_flags |= DDPF_RGB;
|
||||||
|
ddpf.dwRGBBitCount = pixelSize;
|
||||||
|
ddsd.lPitch = img->getRowSizeInBytes();
|
||||||
|
SD_flags |= DDSD_PITCH;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case GL_LUMINANCE:
|
case GL_LUMINANCE:
|
||||||
{
|
{
|
||||||
ddpf.dwRBitMask = 0x000000ff;
|
ddpf.dwRBitMask = 0x000000ff;
|
||||||
|
|||||||
Reference in New Issue
Block a user