| Module: pack_textures | rdpyg/util/pack_textures.py | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
TODO: need to return UV coordinates and pixel coordinates for the packing/cutting functions for where the images are located on the textures. Code to pack multiple textures into larger ones. As well as to cut up bigger textures into smaller ones. This is useful for eg opengl where there are textures size limits. Also it can speed up rendering as you need to do less texture binding calls, and you can reduce geometry calls too. Power of 2 textures can be a waste of memory if you have non power of 2 sized images. The more video memory saved the faster a game can go. To make this code more useful it will work with rectangles. So that it can be used to update texture memory as well as to update images. There will also need to be possibly multiple big output textures. So that you can specify a maximum size output texture.
|