View Full Version : Performance: Textured vs Vector/Drawn Sprites

05-13-2009, 06:10 PM
Hi, so I'm programming a 2d game with an interactive map in it. I'm planning on placing basic symbols on the map to indicate things like an airport using basic pictograms that I could probably easy draw in OpenGL. What I was wondering is if doing this would be a plus or minus for performance vs using textured sprites if there are a good number of them scattered around and the user is zooming and panning. I guess I'm just sort of vector/infinite resolution obsessed in general and I was wondering if this would be a good idea or not.

05-13-2009, 08:49 PM
Depends how you do it.. In direct mode (i.e. using deprecated calls such as glVertex etc.) it would soon slow you down if you had a lot of pictograms.. It's certainly not the most efficient way to do it.. The slow down would be CPU side simply because of all the draw calls you'd be sending...

However, if you predefine those pictograms in Vertex Buffers then not so much.

I forget the name of the library but there is a very good OpenGL Vector library out there btw.

At the end of the day personally I think your preferred method may well look nicer if done properly as it tends towards a kind of resolution independence.. Point Sprites, or Quads are very fast, but when you zoom you are going to lose definition on the textures, or have to have lots of versions for different viewing sizes and so forth..

It all depends how much zooming you are going to do.. because if it's not much then you can get the look of vectorization using sprites, with a lot less hassle for you programmatically.. You'll just need to be a good artist to make them... or hire one! ;)