Commit 05c55f71 authored by hybrid's avatar hybrid

Hmm, general front buffer reading is bad for texture based RTTs, so fixed this...

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-e03cc46cb475
parent 8050b2d0
......@@ -319,8 +319,6 @@ bool COpenGLDriver::genericDriverInit(const core::dimension2d<s32>& screenSize,
else
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);
// Reset The Current Viewport
......@@ -2688,7 +2686,10 @@ IImage* COpenGLDriver::createScreenShot()
glPixelStorei(GL_PACK_INVERT_MESA, GL_TRUE);
#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);
glReadBuffer(GL_BACK);
#ifdef GL_MESA_pack_invert
if (FeatureAvailable[IRR_MESA_pack_invert])
......
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