Sprite Batch Changes

Discussions for core devs and contributors. Read only for normal forum members to keep the noise low

Re: Sprite Batch Changes

Postby NateS » Sat Oct 26, 2013 2:19 pm

Eclipse does! Right click, Refactor, extract interface, check use extracted type where possible. Though using the interface everywhere isn't really great, I prefer the concrete type unless I have the need for the interface. In that case it'd be a manual job only in places that could use any type of batch, like scene2d, etc.
NateS
 
Posts: 1980
Joined: Fri Nov 12, 2010 11:08 am

Re: Sprite Batch Changes

Postby davedes » Tue Oct 29, 2013 1:36 am

mzechner wrote:The problem with this technique is that it's hard to anticipate which textures to bind. Unless the user did some things manually, there's simply no heuristic that can figure out the best binds.

Can you explain this a bit more?

Even in an edge case, where you are rendering textures ABCDEFGH etc., it should still lead to less render calls (only 2, as opposed to the default SpriteBatch which would lead to 8). I guess the real question is whether the fewer render calls is worth the extra work in the shader.

Though I wouldn't expect it to be the default shader -- I think that makes too many assumptions about the way the GPU handles branching. Interesting nevertheless. :)
davedes
 
Posts: 434
Joined: Thu Oct 11, 2012 7:51 pm

Re: Sprite Batch Changes

Postby NateS » Wed Nov 13, 2013 3:46 pm

NateS
 
Posts: 1980
Joined: Fri Nov 12, 2010 11:08 am

Previous

Return to Libgdx Development

Who is online

Users browsing this forum: No registered users and 1 guest