I develope an OpenGL-App with the WIN32-API, but my problem is, when I resize the Window of my application, the graphics are not resized. Under Glut there is no problem.
My code:
…
GetClientRect(hWnd, &rect);
glViewport(0, 0, (GLsizei)rect.right, (GLsizei)rect.bottom);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0, rect.right, 0, rect.bottom);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity(); glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
//Draw Code
SwapBuffers(hDC);
…
I think it is almost the same like mine. But this don’t work. I think, maybe I do something wrong, when I define my windowclass, or when I create my window. But I don’t know what. The other GL-commands works fine.