- Fixed COGLES2Texture::lock issue related to transparency textures. Thanks CuteAlien for your help in diagnose this issue.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@4999 dfc29bdd-3216-0410-991c-e03cc46cb475
master
nadro 2014-12-19 18:30:59 +00:00
parent 55f761aa0e
commit f34b554cde
1 changed files with 4 additions and 0 deletions

View File

@ -689,6 +689,10 @@ void* COGLES2Texture::lock(E_TEXTURE_LOCK_MODE mode, u32 mipmapLevel)
glBindFramebuffer(GL_FRAMEBUFFER, tmpFBO);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tmpTexture, 0);
Driver->getBridgeCalls()->setColorMask(true, true, true, true);
glClearColor(0.f, 0.f, 0.f, 0.f);
glClear(GL_COLOR_BUFFER_BIT);
Driver->getBridgeCalls()->setViewport(core::rect<s32>(0, 0, imageSize.Width, imageSize.Height));
Driver->draw2DImage(this, core::rect<s32>(0, 0, screenSize.Width, screenSize.Height), core::rect<s32>(0, 0, TextureSize.Width, TextureSize.Height), 0, 0, true);