bio photo

When I started Nifty my mindset was like, "well, games can render millions of polys each frame so throwing a couple of hundred textured polys at the GPU shouldn't hurt performance that much".

Well, I was wrong.

To achieve a somewhat high performance you still have to play by the GPU rules. Simply throwing polys at the GPU and expect the best rendering performance doesn't really work. In this two part series of blog posts I'll try to explain what basically sucks in the current way we render things and what we've done in the last couple of months to achieve better rendering performance.

There is of course always room for more improvement. One thing I'd like to tackle in the future and especially in Nifty 2.0 would be to render only the parts of a scene that have changed. Since the best performance you can ever get is not to render :) But since this is a bit more involved for now we're stuck with the "render the whole GUI each frame" approach of current generation Nifty. BUT at least we can make Nifty render fast. Very fast.

So here we go. A trip down the current way how Nifty renders its GUI and how we can try to be a bit smart to optimize it a lot. In this first part we'll look at the way the current renderer works and how bad some of the decisions have been according to rendering performance. In the second part of this two part series we'll look at the way we can make everything better and speed it up.

When it comes to rendering Nifty only knows three somewhat high level primitives: