Commit a597253b authored by hybrid's avatar hybrid

Create smaller RTTs instead of none if screen size is limiting the desired size.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1702 dfc29bdd-3216-0410-991c-e03cc46cb475
parent d5a5d9b5
...@@ -2583,11 +2583,10 @@ ITexture* COpenGLDriver::addRenderTargetTexture(const core::dimension2d<s32>& si ...@@ -2583,11 +2583,10 @@ ITexture* COpenGLDriver::addRenderTargetTexture(const core::dimension2d<s32>& si
#endif #endif
{ {
// the simple texture is only possible for size <= screensize // the simple texture is only possible for size <= screensize
// TODO: Needs to be checked on setRenderTarget instead, in // we try to find an optimal size with the original constraints
// order to cope with screen size changes core::dimension2di destSize(core::min_(size.Width,ScreenSize.Width), core::min_(size.Height,ScreenSize.Height));
if ((size.Width <= ScreenSize.Width) && destSize = destSize.getOptimalSize((size==size.getOptimalSize()), false, false);
(size.Height<= ScreenSize.Height)) rtt = addTexture(destSize, name, ECF_A8R8G8B8);
rtt = addTexture(size, name, ECF_A8R8G8B8);
if (rtt) if (rtt)
{ {
rtt->grab(); rtt->grab();
......
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