Hi, I am new to openGL and wondering how to redimension a window in opengl without resizing objects in it (for example a quad drawn in opengl). I currently have a simple C++ function such as :
void ProjectionOrtho::redimensionWindow(int width, int height)
{
glViewport(0, 0, width, height);
glOrtho(0, width, height, 0, -1.0, 1.0);
}
Here is an image illustrating the problem : [ATTACH=CONFIG]1406[/ATTACH]
I would like that if i redimension my window, the quad keeps its initial position and doesnt redimension, and what we would see on the expanded window is the rest of the universe. For instance if i translate my quad to the right i want to be able to see it on the right.
What i have right now : the quad keeps redimensionnig with the window, so if the window gets to ex: 1000*1000 the quad will still occupy lets say 95% of the space… the quad resizes with the window resize, which is not the intended result.
Thank you very much for your insights I’ve been stuck with this issue for quite a while now.