What is better? (On sprites)

Started by
12 comments, last by Servant of the Lord 17 years, 11 months ago
Quote:Original post by Boder
There is this strange mix of misunderstanding.

Some people are answering as if you are using OpenGL or Direct3D (texture 2^x and expensive texture binding) and others are thinking you are using like SDL.

Telastyn says: Switch sheets is 100x slower than drawing

Not if you're using SDL, it would likely be the opposite.


Eh, yes, I forgot to condition my advice. To my knowledge, the problem/behavior lies in hardware and would thus occur irregardless of the API handling textures. SDL might be clever and group textures for you, or I might be misinformed.
Advertisement
I am using SDL, but I will sortly be getting into OpenGL. I wouldn't have thought it would make a difference. Perhaps I'm not explaining myself well. When loading a picture from the computer into a program, will it be faster or slower to load a sprite sheet containing 100 sprites over a 100 serperate sheets? I'm not talking about using/drawing it once inside the program, I mean upon starting my program(assuming I load all sprites on startup), is a sprite sheet quicker to load? From what people are saying, I gather it would be faster, but only if using SDL?

Sorry, I'm a bit confused, -Servant
No, it should be faster to load the one single sheet than to load 100 individual files, think it about it, the loading will all be the same time, but the starting and stopping on each small file will be 100x more than the starting and stopping for the one sheet. although once opened the loading time will be the same as long as the data sizes are the same.

-Synt4x
Quote:Original post by Synt4x
No, it should be faster to load the one single sheet than to load 100 individual files, think it about it, the loading will all be the same time, but the starting and stopping on each small file will be 100x more than the starting and stopping for the one sheet. although once opened the loading time will be the same as long as the data sizes are the same.


Thanks.

This topic is closed to new replies.

Advertisement