Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
is a good idea to combine many sprite atlas in one at runtime?
Print
Pages: [
1
]
Author
Topic: is a good idea to combine many sprite atlas in one at runtime? (Read 1807 times)
0 Members and 1 Guest are viewing this topic.
shackra
Jr. Member
Posts: 54
is a good idea to combine many sprite atlas in one at runtime?
«
on:
January 28, 2013, 07:28:03 am »
Hello!
I use Tiled to design my maps, so, sometimes I need to use more than one tileset. I was thinking on "paste" each tileset in one texture at loading of my scenery/map, Is It a good idea?
cheers!
Logged
GNU User
Python programmer
Blog
eigenbom
Full Member
Posts: 228
Re: is a good idea to combine many sprite atlas in one at runtime?
«
Reply #1 on:
January 28, 2013, 07:44:07 am »
Sure, why not! Another idea is to batch your tiles into the texture they belong to. So you minimise switching between textures. But, of course, you should only optimise only if necessary.
Logged
Nexus
SFML Team
Hero Member
Posts: 6287
Thor Developer
Re: is a good idea to combine many sprite atlas in one at runtime?
«
Reply #2 on:
January 28, 2013, 01:07:46 pm »
Quote from: eigenbom on January 28, 2013, 07:44:07 am
Sure, why not!
Because the texture size is limited. If you exceed
sf::Texture::getMaximumSize()
, OpenGL will fail to allocate the texture.
Therefore, you need to find a good trade-off for the number of objects inside a texture.
Logged
Zloxx II
: action platformer
Thor Library
: particle systems, animations, dot products, ...
SFML Game Development
:
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
is a good idea to combine many sprite atlas in one at runtime?