Why does LoadSprite spash my 640*480 to a square?
LoadSprite squashes image
Blitz3D Forums/Blitz3D Programming/LoadSprite squashes image All sprites are square and a standard size by default. LoadSprite has the effect of creating a sprite and loading the image as a texture. You will always need to ScaleSprite.
You also want to use power of two images.
The sprite is probably 1024x512 or 1024x1024 because of how blitz works. Lets take a look at texture behaviour (same for sprites):
* If you have an image 257 pixels wide then blitz will use the next step up, which is 512.
* If you don't use power of two sizes ie. 2,4,8,16,32,64,128,256,512,1024 then it will be rounded up.
* It is best to use sizes that are power of two for clarity of your images too.
* Use cleartexturefilters command for the sharpest hud overlays and such. This will clear mip mapping. To re-enable mipmapping for loading other items, use texturefilter "",8 -- texturefilter and cleartexturefilters are states, which means you must call them before loading any items.
640x480 is a bad size to use. The most efficient for you would be 512x512.
The sprite is probably 1024x512 or 1024x1024 because of how blitz works. Lets take a look at texture behaviour (same for sprites):
* If you have an image 257 pixels wide then blitz will use the next step up, which is 512.
* If you don't use power of two sizes ie. 2,4,8,16,32,64,128,256,512,1024 then it will be rounded up.
* It is best to use sizes that are power of two for clarity of your images too.
* Use cleartexturefilters command for the sharpest hud overlays and such. This will clear mip mapping. To re-enable mipmapping for loading other items, use texturefilter "",8 -- texturefilter and cleartexturefilters are states, which means you must call them before loading any items.
640x480 is a bad size to use. The most efficient for you would be 512x512.