I’ve created an runtime texture atlas for atlassing tilemaps and animations on runtime. Also I use this for texture sharing. (I push multiple tilesets and animations on one texture!) For Dx I can just use 16384 (Desktop, not ARM) and for GL I want to query MAX_TEXTURE_SIZE.
I have this working on Android:
GL.GetInteger(GetPName.MaxTextureSize, out t);
But I can’t get it to work on Mac or IOS. I probably need a using directive to make it work.!? But I don’t know which that would be.
Or is there perhaps an other - more generic MonoGame - way to determine the max size of a Texture2D?
@DJMAX I’m not having any problems allocating Textures > 4096 on DX11 (16384 HiDef) or Android systems that have a bigger MAX_TEXTURE_SIZE then 4096.
I was thinking of trying a solution like that. I will follow up later (days, weeks) on if it will work. It is still kind of “brute force fullness” to do it like that - especially if there are ways like MAX_TEXTURE_SIZE to know in advanced what the correct size is. But if it will work, I gladly use it.!