Hmm, general front buffer reading is bad for texture based RTTs, so fixed this change to the screenshot method.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1558 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
8050b2d031
commit
05c55f7151
|
@ -319,8 +319,6 @@ bool COpenGLDriver::genericDriverInit(const core::dimension2d<s32>& screenSize,
|
||||||
else
|
else
|
||||||
os::Printer::log("GLSL not available.", ELL_INFORMATION);
|
os::Printer::log("GLSL not available.", ELL_INFORMATION);
|
||||||
|
|
||||||
// We want to read the front buffer to get the latest render finished.
|
|
||||||
glReadBuffer(GL_FRONT);
|
|
||||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||||
|
|
||||||
// Reset The Current Viewport
|
// Reset The Current Viewport
|
||||||
|
@ -2688,7 +2686,10 @@ IImage* COpenGLDriver::createScreenShot()
|
||||||
glPixelStorei(GL_PACK_INVERT_MESA, GL_TRUE);
|
glPixelStorei(GL_PACK_INVERT_MESA, GL_TRUE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// We want to read the front buffer to get the latest render finished.
|
||||||
|
glReadBuffer(GL_FRONT);
|
||||||
glReadPixels(0, 0, ScreenSize.Width, ScreenSize.Height, GL_RGB, GL_UNSIGNED_BYTE, pPixels);
|
glReadPixels(0, 0, ScreenSize.Width, ScreenSize.Height, GL_RGB, GL_UNSIGNED_BYTE, pPixels);
|
||||||
|
glReadBuffer(GL_BACK);
|
||||||
|
|
||||||
#ifdef GL_MESA_pack_invert
|
#ifdef GL_MESA_pack_invert
|
||||||
if (FeatureAvailable[IRR_MESA_pack_invert])
|
if (FeatureAvailable[IRR_MESA_pack_invert])
|
||||||
|
|
Loading…
Reference in New Issue