OpenGL


9. 3D - 10


spin+=0.01f;//

star[loop].angle+=float(loop)/num;//

star[loop].dist-=0.01f;//

. . , 5 . .

if (star[loop].dist<0.0f)// ?

{

star[loop].dist+=5.0f;// 5

//

star[loop].r=rand()%256;

//

star[loop].g=rand()%256;

//

star[loop].b=rand()%256;

}

}

return TRUE;//

}

. WinMain(). SwapBuffers(hDC). .

'T'. , , . twinkle FALSE, TRUE. TRUE, FALSE. 'T' tp TRUE. , 'T' .

SwapBuffers(hDC);// (Double Buffering)

if (keys['T'] && !tp)// 'T' tp FALSE

{

tp=TRUE;// tp TRUE

twinkle=!twinkle;// twinkle

}

"" ( ) 'T'. , tp=FALSE. 'T' tp FALSE, .