Originally Posted by
arthurprs
{pt-br} e ai deu certo ? te add no msn xD
{eng} it works ? i have add you in msnmessenger
hello
what you mean with next render?
eu n?Ło entendi direito a sua id?©ia, vou por um exemplo de c??digo aqui ok?
se tu puder por a solu?ß?Ło dentro do c??digo fica mais f?°cil de aprender...
Code:
var
LastCheckTime, NewCheckTime: Integer;
FPSCount: Integer;
FPS: Integer;
procedure CalculateFPS;
begin
//Pega o tempo atual
NewCheckTime := GetTickCount;
//Incrementa o contador de frames
Inc(FPSCount);
//Checa se o tempo atual menos o ultimo tempo ?© maior ou igual a um segundo
if NewCheckTime - LastCheckTime >= 1000 then
begin
//se for maior ou igual pega o valor total de quadros
FPS := FPSCount;
//zera o valor do contador
FPSCount := 0;
//o ultimo tempo se torna o tempo atual para o pr??ximo c?°lculo
LastCheckTime := NewCheckTime;
end;
end;
if (DXBase.Direct3DDevice = nil) then Exit;
DXBase.Direct3DDevice.Clear(0, nil, D3DCLEAR_TARGET or D3DCLEAR_ZBUFFER, BgColor, 1.0, 0);
if (SUCCEEDED(DXBase.Direct3DDevice.BeginScene)) then
begin
//
end;
CalculateFPS;
DXBase.Direct3DDevice.EndScene;
DXBase.Direct3DDevice.Present(nil, nil, 0, nil);
greetings
Bookmarks