Hello,
So I have a small question...
Let's say I have an Android bitmap with the following resolution 1024x2048 (height x width) and I want to make it a 2048x2048 squared texture (to provide support for devices that don't support non-squared textures).
How can I scale the height in the most efficient way?
Bitmap.createScaledBitmap isn't that memory efficient I suppose... (There will be a moment when the original bitmap and the scaled bitmap are loaded in the memory, right? I would like to avoid this,because it could rise an OutOfMemoryError for some devices I guess)
So then, is it possible to do it with a Texture instance instead?
Basically pass the original 1024x2048 bitmap instance to a new texture instance and do Texture.scaleHeight(2);
(Texture.scaleWidth(0.5f); would be possible too of course...)
And when the texture is uploaded to the TextureManager, then the texture will be uploaded as a 2048x2048 texture to the GPU.
I don't know if this can be done... but I guess it would be quite memory efficient if this was possible.
Cheers,
Abiram