OpenGL


1. Windows - 6


switch (message)//

{

WM_CREATE , . DC ( ) . , . . , , . , , . - , . , , .

case WM_CREATE:

hDC = GetDC(hWnd);//

PixelFormat = ChoosePixelFormat(hDC, &pfd);

//

, . , OK, .

if (!PixelFormat)

{

MessageBox(0,"Can't Find A Suitable

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

PostQuitMessage(0);

// ,

break;//

}

, . - , , , , OK, .

if(!SetPixelFormat(hDC,PixelFormat,&pfd))

{

MessageBox(0,"Can't Set The

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

PostQuitMessage(0);

break;