Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture packing #8

Open
Arcnor opened this issue Sep 4, 2014 · 0 comments
Open

Texture packing #8

Arcnor opened this issue Sep 4, 2014 · 0 comments

Comments

@Arcnor
Copy link
Owner

Arcnor commented Sep 4, 2014

Right now, we change sprites every time we draw something on screen. This generates lots of GL texture binding, that is very costly.

A much better solution is to pack the textures into a map and use the same for everything. A quick test suggests that all PD textures can be packed on a 2035x266 texture (when using rotation and non-power-of-two textures) or 2048x512 (without rotation and power-of-two). By splitting font3x.png, we can even get to a 1024x1024 texture, very useful if we want to target (very) old devices without support for 2048x2048 maximum texture size, but maybe that's a non-issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant