I've made my own simple Level Editor in Visual Studio using OpenGL and C++ to create games for android phone. But I've stumbled across a problem where some objects that I have put in my editor do not appear correctly on android nor and sometimes they don't even appear. I have been searching around and could not find a solution. So here is my lLevel Editor's orthographic camera and resolution of the screen:
Camera objects Ortho Matrix:
GoldState::aspectRatio = m_AspectRatio = (float)width / (float)height;
float orthoLeft = 0.0f; //* m_AspectRatio;
float orthoRight = 100.0f; //* m_AspectRatio;
float orthoUp = 100.0f;
float orthoDown = 0.0f;
m_OrthoMatrix = glm::ortho(orthoLeft, orthoRight, orthoDown, orthoUp);
And its exactly the same for android too(using ndk).
The aspect ratios are commented out because I was experimenting and without multiplying by aspect ratio entire world will get stretched.
Now to unity's Free Aspect Ratio which I have a feeling is just like my ortho camera without multiplying aspect ratio. What exactly is that and how does every object that I place on unity when I select Free Aspect Ratio stays 1:1 and it is not stretched or anything? If someone can explain this to me that would really help me a lot.
Just one more thing. I have made several games on android using opengl but I specificly made background image to be exact width and height because I was multiplying aspect ratio in my ortho matrix all the time. But this time I just want to extract background and objects positions and sizes and have them keep their aspect without stretching on different resolutions.
If there is any other general solution for this that would be nice if there is not I guess I should use some fixed resolution on level editor and use that same resolution for android?