From d0b5a42c5cea195c57ffb56edc04e96b73fc4bde Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 3 Apr 2008 10:26:18 +0000 Subject: [PATCH] From Mattias Helsing, "While using the dds plugin (via osgdem) it was able to write 24bit images with BGR order but not read them. My 2-liner fixed it for me but it may be that someone with more knowledge of the plugin want to insert more pixel formats in the reading part of the plugin." --- src/osgPlugins/dds/ReaderWriterDDS.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osgPlugins/dds/ReaderWriterDDS.cpp b/src/osgPlugins/dds/ReaderWriterDDS.cpp index 6cfac53b4..9ceaf141f 100644 --- a/src/osgPlugins/dds/ReaderWriterDDS.cpp +++ b/src/osgPlugins/dds/ReaderWriterDDS.cpp @@ -337,6 +337,9 @@ osg::Image* ReadDDSFile(std::istream& _istream) { "R8G8B8", 24, 0xff0000, 0x00ff00, 0x0000ff, 0x000000, GL_RGB , GL_BGR , GL_UNSIGNED_BYTE }, + { "B8G8R8", 24, 0x0000ff, 0x00ff00, 0xff0000, 0x000000, + GL_RGB , GL_RGB , GL_UNSIGNED_BYTE }, + { "A8R8G8B8", 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000, GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE }, { "X8R8G8B8", 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000,