Misc preparations for unified packing
This commit is contained in:
@@ -66,7 +66,7 @@ public class MultiPacker implements Disposable{
|
||||
}
|
||||
|
||||
public void add(PageType type, String name, PixmapRegion region){
|
||||
packers[type.ordinal()].pack(name, region);
|
||||
add(type, name, region, null, null);
|
||||
}
|
||||
|
||||
public void add(PageType type, String name, PixmapRegion region, int[] splits, int[] pads){
|
||||
@@ -74,7 +74,7 @@ public class MultiPacker implements Disposable{
|
||||
}
|
||||
|
||||
public void add(PageType type, String name, Pixmap pix){
|
||||
packers[type.ordinal()].pack(name, pix);
|
||||
add(type, name, new PixmapRegion(pix));
|
||||
}
|
||||
|
||||
public TextureAtlas flush(TextureFilter filter, TextureAtlas atlas){
|
||||
@@ -95,13 +95,13 @@ public class MultiPacker implements Disposable{
|
||||
//main page (sprites.png) - all sprites for units, weapons, placeable blocks, effects, bullets, etc
|
||||
//environment page (sprites2.png) - all sprites for things in the environmental cache layer
|
||||
//editor page (sprites3.png) - all sprites needed for rendering in the editor, including block icons and a few minor sprites
|
||||
//zone page (sprites4.png) - zone preview
|
||||
//rubble page - scorch textures for unit deaths & wrecks
|
||||
//ui page (sprites5.png) - content icons, white icons, fonts and UI elements
|
||||
public enum PageType{
|
||||
//main page can be massive, but 8192 throws GL_OUT_OF_MEMORY on some GPUs and I can't deal with it yet.
|
||||
main(4096),
|
||||
|
||||
//TODO stuff like this throws OOM on some devices
|
||||
environment(4096, 2048),
|
||||
editor(4096, 2048),
|
||||
rubble(4096, 2048),
|
||||
|
||||
Reference in New Issue
Block a user