GLBasic forum

Main forum => GLBasic - en => Topic started by: yaKC on 2016-Oct-03

Title: Sprite Batching
Post by: yaKC on 2016-Oct-03
Does GLBasic batch sprites as i believe Unity does, or if not has anyone had any success in doing so?

Awesome language btw :D
Title: Re: Sprite Batching
Post by: Ian Price on 2016-Oct-03
You can do that with POLYVECTORS displaying your sprite image on them. These can be very useful for drawing hundreds of sprites (eg particles etc.) in one go. To increase the speed of drawing, ensure that the images are grabbed from a single sprite sheet/ sprite atlas.
Title: Re: Sprite Batching
Post by: MrPlow on 2016-Oct-07
Welcome to Glbasic yaKC!
Title: Re: Sprite Batching
Post by: spacefractal on 2016-Oct-07
Yes POLYVECTORS is great for mest use, depend on content, but is harder to use that regular sprite commands. I'm don't use this for anything, but more tiles and such.

Welcome.
Title: Re: Sprite Batching
Post by: yaKC on 2016-Oct-09
Thanks for the answers and welcomes :)

I've start converting most of my draw commands over to Polyvectors (which i also love), i have quite a lot of big textures (640x360ish), 11 or so which worries me about texture size, as in a sprite atlas.

When people refer to draw calls, do they mean switiches between sprite atlases then rather than the number of say Polyvectors would actually be used for many sprites, this has always confused me.
Title: Re: Sprite Batching
Post by: spacefractal on 2016-Oct-09
Bear in mind, you cannot use 4Kb textures on Android. For some reason that got deprecated....

So I'm in Greedy mouse needs to do a 4 pass with 2KB texture tile sheet instead.