Page 1 of 1

[BUG] RTT size is incorrectly truncated

Posted: Sat Mar 06, 2010 23:00
by Timo
Image
Above is a screenshot with Irrlicht Renderer. As you can see the render target texture starts to repeat itself and the text is blurry. This also happens with Direct3D9 and OpenGL, although it's not quite as evident.

You can reproduce this with Sample_FirstWindow. Just modify the setSize call to the following:

Code: Select all

wnd->setSize(UVector2(UDim(0, 200.9), UDim(0, 200.9)));

If you disable AutoRenderingSurface it renders correctly.

I did some debugging (with irrlicht renderer), and here's what I noticed:
- RTT dimensions are truncated to 200x200. Because it's smaller than FrameWindow size, d_texelScaling causes the texture to start repeating itself.
- Clipping rect is rounded to 201x201 while the viewport is truncated to 200x200. For this reason the scissor matrix slightly scales down everything that is rendered on the surface.

I am using v0-7 branch, rev 2442.

BTW, should I post bugs here or on the mantis tracker or both?

Re: [BUG] RTT size is incorrectly truncated

Posted: Sun Mar 07, 2010 07:54
by CrazyEddie
Thanks for this; I'll get on it ASAP :)

BTW, should I post bugs here or on the mantis tracker or both?

The basic advice has always been that if you're 99% sure it's a bug, then posting on the mantis tracker is generally better. If you're not so sure it's a bug, then posting here first allows some discussion of the issues involved. The only reason we ever made this distinction was to try and prevent the mantis tracker getting full of false reports and / or ordinary support requests - whether or not this was ever a real risk, I do not know ;)

When I work on CEGUI I work from two lists, i) the mantis tracker and ii) a personal written TODO list; generally bugs do not make it to my written TODO, so if they're not on mantis, they can very easily get forgotten about :)

CE.

Re: [BUG] RTT size is incorrectly truncated

Posted: Sun Mar 07, 2010 20:02
by CrazyEddie
FYI, this issue should now be fixed (branches/v0-7 r2457) - I corrected the CEGUI::RenderingWIndow code to ensure the surface size is rounded using the same pixel aligned values we use elsewhere.

HTH

CE.