Commit 2603feb2 authored by hybrid's avatar hybrid

Fix color ordering

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3745 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 738b571e
...@@ -4292,7 +4292,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE ...@@ -4292,7 +4292,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
tgt=GL_AUX0+(target-video::ERT_AUX_BUFFER0); tgt=GL_AUX0+(target-video::ERT_AUX_BUFFER0);
break; break;
} }
GLenum fmt = (format==video::ECF_A8R8G8B8 || format==video::ECF_A1R5G5B5)?GL_RGBA:GL_RGB; GLenum fmt = (format==video::ECF_A8R8G8B8 || format==video::ECF_A1R5G5B5)?GL_BGRA:GL_RGB;
// We want to read the front buffer to get the latest render finished. // We want to read the front buffer to get the latest render finished.
glReadBuffer(tgt); glReadBuffer(tgt);
glReadPixels(0, 0, ScreenSize.Width, ScreenSize.Height, fmt, GL_UNSIGNED_BYTE, pixels); glReadPixels(0, 0, ScreenSize.Width, ScreenSize.Height, fmt, GL_UNSIGNED_BYTE, pixels);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment