I apologize in advance for this post , I am yet another person who did not understand glotho . In fact I understand what it does but I have doubts .
Suppose my window starts from 1920x1080, then I will set :
glViewport (0 , 0, 1920 , 1080 ) ;
glMatrixMode ( GL_PROJECTION ) ;
glLoadIdentity ();
glOrtho ( 0,1920,1080 , 0, 1, -1 ) ;

In this way ortho tells me that the window has a grid that goes from 0 to 1920 or 1080 .
so if I wanted to draw a square button a button disegnerei of 10 units per side from x = 1910 y = 1070.

If I wanted to bring to 800x600 , become:
glViewport (0 , 0 , 800, 600 ) ;
glMatrixMode ( GL_PROJECTION ) ;
glLoadIdentity ();
glOrtho ( 0,800,600 , 0, 1, -1 ) ;

However, the button would not be seen anymore because it would not be in the cooridinate the viewport ! But if I did so :
glViewport (0 , 0 , 800, 600 ) ;
glMatrixMode ( GL_PROJECTION ) ;
glLoadIdentity ();
glOrtho ( 0,1920,1080 , 0, 1, -1 ) ;

the button would be within the coordinates but would no longer be square ...
then what am I supposed to do in this case?
what is good programming practice ?