I resize my window like this:
RECT clientRect;
GetClientRect(mainWindow,&clientRect);
glShadeModel(GL_SMOOTH);
MoveWindow(framehWnd,
toolWidth,
tabHeight,
((clientRect.right - clientRect.left) - toolWidth) - rightRemainder ,
(clientRect.bottom - clientRect.top) - tabHeight - paramHeight,
false);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho (0, ((clientRect.right - clientRect.left) - toolWidth) - rightRemainder ,
(clientRect.bottom - clientRect.top) - tabHeight - paramHeight
, 0, 0, 1);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
This works fine except for one thing. Lets say I create a square at 0,0 to 100, 100. I'd like if I resize that it always stays at the top left but right now if I resize it gets pushed up or down instead of staying at the top left. What should I modify? Thanks
*I just realized what really would need to happen is for the context to resize, but i'm not sure how to do this without throwing out the OGL context and re initing it.