If I good understand, you have finished lib for game Input defined by user. OK. Then i don't need implementing it to F3D. But then i need source for including to F3D. When willl be released?

P.Solution with timer dont work good on my home PC (((((( Mouse FreeLook sometimes, jump about big angle (is calculated from Mouse Delta X/Y)

If you have time, plese look on my code, what is wrong in my logic.

http://final3d.intelligentdevelopmen...s/F3D_test.zip

In Win32 F3D version i never had this problems, because i used DXInput and DXTimer and latter my Timer class. With correct working timer + input i can't continue

My old Timer class:

[pascal]
unit F3D_Timer;

interface

uses Windows, Controls, Messages, SysUtils, Classes, Forms,

dglOpenGL;

type TProcedureEvent = procedure of object;
{ The type of event that is called by the timer. }
Type TF3D_TimerEvent = procedure(Sender: TObject; FrameTime: Single) of object;


Type TF3D_Timer = class(TComponent)
private
{ Private declarations }
FEnabled : Boolean;
FActive : Boolean;
FActiveOnly : Boolean;
FInterval : Cardinal;
FInitialized : Boolean;
FFrequency : Int64;

// Event
FOnTimer : TF3D_TimerEvent;

// Time
FAppStart : Single;
FLastTime : Single;

// Frame information
FFrameTimes : Single;
FFrameCount : Int64;
FFrameRate : Integer;
FFrameRateCounter: Integer;
FFrameRateTime : Single;
FDeltaTime : Single;

function GetCurrentTime: Single;
function GetElapsedTime: Single;


function AppProc(var Message: TMessage): Boolean;
procedure AppIdle(Sender: TObject; var Done: Boolean);

procedure Finalize;
procedure Initialize;
procedure Resume;
procedure Suspend;

procedure SetActiveOnly(Value: Boolean);
procedure SetEnabled (Value: Boolean);
procedure SetInterval (Value: Cardinal);
protected
{@exclude}
procedure Loaded; override;
public
OnBeginFrame :TProcedureEvent;
OnEndFrame :TProcedureEvent;

DeltaTime : Single;
{@exclude}
constructor Create(AOwner: TComponent); override;
{@exclude}
destructor Destroy; override;
function NPXDeltaTime: Single;
{ The current framerate, is weighted over the last 500 ms. }
property FrameRate : Integer read FFrameRate;
{ The number of frames rendered since program start. }
property FrameCount : Int64 read FFrameCount;
{ The time elapsed since program start, in milliseconds. }
property ElapsedTime: Single read GetElapsedTime;
published
{ Determines if the timer shall be active or not. }
property Enabled : Boolean read FEnabled write SetEnabled;
{ The interval of the timer, in milliseconds. If zero then max speed. }
property Interval : Cardinal read FInterval write SetInterval;
{ This tells if the timer shall be disabled when the window loses focus. }
property ActiveOnly : Boolean read FActiveOnly write SetActiveOnly;
{ The main timer event, this is called with the interval in milliseconds. }
property OnTimer : TF3D_TimerEvent read FOnTimer write FOnTimer;
end;



implementation




// Class TGLTimer
//================================================== ============================
constructor TF3D_Timer.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FActiveOnly:= True;
FActive := True;
FEnabled := True;
Interval := 1;
Application.HookMainWindow(AppProc);

QueryPerformanceFrequency(FFrequency);
FAppStart :=GetCurrentTime;
FFramerateTime :=FAppStart;
FLastTime :=FAppStart;
FFrameRate :=0;
FFrameRateCounter :=0;
FFrameCount :=0;
end;

//------------------------------------------------------------------------------
destructor TF3D_Timer.Destroy;
begin
Finalize;
Application.UnHookMainWindow(AppProc);
inherited ;
end;


//------------------------------------------------------------------------------
procedure TF3D_Timer.AppIdle(Sender: TObject; var Done: Boolean);
var FrameTime : Single;
var FrameRateTime: Single;
begin
Done := False;
FrameTime := (GetCurrentTime - FLastTime);
IF (FrameTime >= FInterval) then begin
FLastTime:=GetCurrentTime;

Inc(FFramerateCounter);

FrameRateTime:=(FLastTime - FFrameRateTime);
IF FrameRateTime > 1000 then begin
IF FFramerateCounter = 0 then FFramerateCounter:=1;
FFrameRate := Round(1000/(FrameRateTime/FFramerateCounter));
FFramerateCounter := 0;
FFramerateTime := GetCurrentTime();
end;

FDeltaTime:=(FFrameTimes + FrameTime) * 0.5 ;
DeltaTime:=FDeltaTime * 0.1;
if Assigned(FOnTimer) then OnBeginFrame();
if Assigned(FOnTimer) then FOnTimer(Self, FDeltaTime);

if Assigned(FOnTimer) then OnEndFrame();


FFrameTimes:=FrameTime;

Inc(FFrameCount);
end;
end;

//------------------------------------------------------------------------------
function TF3D_Timer.AppProc(var Message: TMessage): Boolean;
begin
Result:= False;
case Message.Msg of
CM_ACTIVATE : If FInitialized and FActiveOnly then Resume;
CM_DEACTIVATE: If FInitialized and FActiveOnly then Suspend;
end;
end;

//------------------------------------------------------------------------------
procedure TF3D_Timer.Initialize;
begin
Finalize;

if ActiveOnly then begin
if Application.Active then
Resume;
end else
Resume;
FInitialized := True;
end;

//------------------------------------------------------------------------------
procedure TF3D_Timer.Finalize;
begin
if FInitialized then begin
Suspend;
FInitialized := False;
end;
end;

//------------------------------------------------------------------------------
procedure TF3D_Timer.Loaded;
begin
inherited Loaded;
if (not (csDesigning in ComponentState)) and FEnabled then
Initialize;
end;

//------------------------------------------------------------------------------
procedure TF3D_Timer.Resume;
begin
// FAppStart:=FAppStart + (GetCurrentTime-FSuspendTime);
FLastTime:=GetCurrentTime;

Application.OnIdle:= AppIdle;
end;

//------------------------------------------------------------------------------
procedure TF3D_Timer.Suspend;
begin
// FSuspendTime:=GetCurrentTime;
Application.OnIdle:= nil;
end;

//------------------------------------------------------------------------------
procedure TF3D_Timer.SetActiveOnly(Value: Boolean);
begin
if FActiveOnly<>Value then
begin
FActiveOnly := Value;

if Application.Active and FActiveOnly then
if FInitialized and FActiveOnly then Suspend;
end;
end;

//------------------------------------------------------------------------------
procedure TF3D_Timer.SetEnabled(Value: Boolean);
begin
if FEnabled<>Value then
begin
FEnabled := Value;
if ComponentState*[csReading, csLoading]=[] then
if FEnabled then Initialize else Finalize;
end;
end;

//------------------------------------------------------------------------------
procedure TF3D_Timer.SetInterval(Value: Cardinal);
begin
FInterval:= Value;
end;



//------------------------------------------------------------------------------
function TF3D_Timer.GetCurrentTime: Single;
var Time : Int64;
begin
QueryPerformanceCounter(Time);
Result:= (Time / FFrequency) * 1000;
end;

//------------------------------------------------------------------------------
function TF3D_Timer.GetElapsedTime: Single;
begin
Result:=GetCurrentTime - FAppStart;
end;


function TF3D_Timer.NPXDeltaTime: Single;
var Time : Int64;
begin
QueryPerformanceCounter(Time);
Result:=((Time - FAppStart)/(FFrequency*1000))*0.01;
end;


end.
[/pascal]

Now i seems as stupid bastard