how can i calculate the FPS on GameLoop?
i did a bad pseucode... but i don't know how get the time and test if is 1 second.Code:int Frame=0; void GameLoop() { //GetInput(); //UpdateMovements(); //DrawFrameThings(); //Frame++; //GetTimeSomething(); //if the time is a second then //FPS = Frame; //Frame=0; }
PS: i need a correction: before draw the frame(a memory frame), on screen, do i need, 1st, clear the screen(draw a fill black rectangle)?