OpenGL


17 OpenGL. - 14


// GL

glPrint(int((280+230*cos(cnt2))),int(235+200*sin(cnt1)),"OpenGL",1);

 

. , .

 

glColor3f(0.0f,0.0f,1.0f); //

glPrint(int(240+200*cos((cnt2+cnt1)/5)),

2,"Giuseppe D'Agata",0);//

glColor3f(1.0f,1.0f,1.0f); //

glPrint(int(242+200*cos((cnt2+cnt1)/5)),

2,"Giuseppe D'Agata",0);//

 

, - . 3- .

 

cnt1+=0.01f; //

cnt2+=0.0081f; //

return TRUE; //

}

 

KillGLWindow(), CreateGLWindow() WndProc() , .

 

int WINAPI WinMain(HINSTANCE hInstance, //

HINSTANCE hPrevInstance, //

LPSTR lpCmdLine, //

int nCmdShow) //

{

MSG msg; //

BOOL done=FALSE; //

 

// ,

if (MessageBox(NULL,"Would You Like To Run In Fullscreen Mode?",

"Start FullScreen?",MB_YESNO|MB_ICONQUESTION)==IDNO) {

fullscreen=FALSE; //

}

 

.

 

// OpenGL

if (!CreateGLWindow(

"NeHe & Giuseppe D'Agata's 2D Font Tutorial",640,480,16,fullscreen))