OpenGL

         

WM_KEYDOWN


case WM_DESTROY:

case WM_CLOSE:

ChangeDisplaySettings(NULL, 0);

wglMakeCurrent(hDC,NULL);

wglDeleteContext(hRC);

ReleaseDC(hWnd,hDC);

PostQuitMessage(0);

break;
WM_KEYDOWN . , , wParam. , ... , 'A'. , . , 'A' TRUE. , , TRUE, , 'A' .
case WM_KEYDOWN:

keys[wParam] = TRUE;

break;
WM_KEYUP , . , , wParam. , 'A', 'A' FALSE. , 'A', FALSE, ", ".
case WM_KEYUP:

keys[wParam] = FALSE;

break;
, - . , , , , , OpenGL . , .
WM_SIZE Windows - , . LOWORD(lParam) HIWORD(lParam). ReSizeGLScene . .
case WM_SIZE:

ReSizeGLScene(LOWORD(lParam),HIWORD(lParam));

break;
, Windows , .
default:

    







Forekc.ru
, , , , , , , , , ,