Open ghost opened 7 years ago
What's the best way to do this? Using glScale() (and whatever else for whatever else than OpenGL), or using SDL_gfx?
The solution would probably be to add an SDL_glx dependency, allow to scale and rotate surfaces, text surfaces and sprites from Lua scripts.
No need for SDL_glx for scaling sprites, SDL2 can already do that ( https://wiki.libsdl.org/SDL_RenderCopy?highlight=%28%5CbCategoryAPI%5Cb%29%7C%28SDLFunctionTemplate%29 )
No. It is for textures only.
We should allow sprites scaling. This is useful in a lot of situations. Roughly any situation in which you'd like to use a graphic in a different size than its source. Sometimes it is better to resize the actual source graphic, for instance if you want to have two sizes of a graphic, e.g. one for the world element, and one for the UI element. But in others, this is clearly not feasible -- e.g. if you want to have something expand from a very small size to a very big size in a smooth manner. Having, say, 300 source images that all need updating when you need to tweak the initial graphic, is just madness.