something new every day

Since we don’t have a general opengl sub forum, I just post it here :stuck_out_tongue:

While exermining the parts of Hell’s Segment (HellSinker) some days ago, I stumbled upon a little neat micro optimisation, wich I like to share.

All toplevel elements are placed in one texture. So one bind and you can draw all bullets, the player animations, all power ups and all tiny message thingies - it’s insane! Several hundret tiny things are there ;D

http://people.freenet.de/ki_onyx/neoj.png (38.19 KB)
(btw the alpha is stored in a seperate 4bit grayscale image)

I know we talked here about that before, but I think it’s nice to see such an extreme example. I also think that it made a rather big difference in that game, because you have tons of sprites there (it’s one of those shoot em ups with hundret of bullets on the screen).

I’ll definitively try to put all my hud (and toplevel) graphics into one 512x512 texture (as far as I can tell that shouldn’t be a big problem).

I like packing my textures into one texture3D where the the z component selects the slice to use :wink:

Cheater ;D

Interesting idea though. Unfortunately it’s 1.2+ (but 8-10 binds won’t be a bottleneck anyways… yea I think I can get away with 8 binds IICC [if I counted correctly]).