OpenGL


1. Windows - 9


return (DefWindowProc(hWnd, message, wParam, lParam));

}

return (0);

}

, , , , . .

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,

LPSTR lpCmdLine,int nCmdShow)

{

MSGmsg;// Windows

WNDCLASSwc; // Windows

HWNDhWnd;//

CS_HREDRAW CS_VREDRAW , . CS_OWNDC DC . , DC . WndProc - , . hIcon , , ICON , . ( GL). , NULL, .

wc.style= CS_HREDRAW | CS_VREDRAW | CS_OWNDC;

wc.lpfnWndProc= (WNDPROC) WndProc;

wc.cbClsExtra= 0;

wc.cbWndExtra= 0;

wc.hInstance= hInstance;

wc.hIcon= NULL;

wc.hCursor= LoadCursor(NULL, IDC_ARROW);

wc.hbrBackground= NULL;

wc.lpszMenuName= NULL;

wc.lpszClassName= "OpenGL WinClass";

. , . OK .

if(!RegisterClass(&wc))

{

MessageBox(0,"Failed To Register The Window

Class.","Error",MB_OK|MB_ICONERROR);

return FALSE;

}