Commit fe09f2eb authored by hybrid's avatar hybrid

Avoid using a plain texture as RTT if screensize is too small.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1686 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 04e788ae
...@@ -2582,7 +2582,12 @@ ITexture* COpenGLDriver::addRenderTargetTexture(const core::dimension2d<s32>& si ...@@ -2582,7 +2582,12 @@ ITexture* COpenGLDriver::addRenderTargetTexture(const core::dimension2d<s32>& si
else else
#endif #endif
{ {
rtt = addTexture(size, name, ECF_A8R8G8B8); // the simple texture is only possible for size <= screensize
// TODO: Needs to be checked on setRenderTarget instead, in
// order to cope with screen size changes
if ((size.Width <= ScreenSize.Width) &&
(size.Height<= ScreenSize.Height))
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