OpenGL


1. Windows - 11


dmScreenSettings.dmSize= sizeof(DEVMODE);// Devmode

dmScreenSettings.dmPelsWidth= 640;//

dmScreenSettings.dmPelsHeight= 480;//

dmScreenSettings.dmFields= DM_PELSWIDTH | DM_PELSHEIGHT;//

ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN);

//

ShowWindow - , . , , , . UpdateWindow , SetFocus , wglMakeCurrent(hDC,hRC) , .

ShowWindow(hWnd, SW_SHOW);

UpdateWindow(hWnd);

SetFocus(hWnd);

. , - ESC. , .

while (1)

{

//

while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))

{

if (GetMessage(&msg, NULL, 0, 0))

{

TranslateMessage(&msg);

DispatchMessage(&msg);

}

else

{

return TRUE;

}

}

DrawGLScene , OpenGL. , - . , OpenGL .

SwapBuffers(hDC) . . , ( ). , , . , .