In old OpenGL, once the projection matrix has been set to GLOrtho2D, you could simply use glTranslatef to position a 2D rectangle and then draw it like so:
The equivalent for any sequence of matrix operations is to construct the equivalent matrix then pass it using glUniform() or a uniform block.
All of the legacy matrix functions specify the actual matrix in their manual pages. Other than that, you just need matrix multiplication (and inversion for the normal matrix, in the event that the model-view matrix isn’t orthonormal).
Thanks for your help. I forgot to mention that modern OpenGL doesn’t support glBegin or glEnd functions. Do I have to replace these with VBOs, or is there a simpler method?
Is there anyway to just create one square VBO and then stretch it to be the shape I want. Or do I have to make a new one for each different size EG: 42 x 30, 32 x 27, etc…