Skip to content

Commit

Permalink
ProcessInputMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
MrShoor committed Sep 1, 2016
1 parent 300f415 commit de3a2b3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion untmain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
interface

uses
LCLType, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
Windows, LCLType, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
ExtCtrls, ComCtrls, StdCtrls, avRes, avTypes, mutils, avTess, avContnrs,
avCameraController, D3D11_JSB, DXGI_JSB, avContext_DX11;

Expand Down Expand Up @@ -248,6 +248,15 @@ procedure TfrmMain.rbRagResolveChange(Sender: TObject);
end;

procedure TfrmMain.RenderScene(ASender: TObject);
procedure ProcessInputMessages;
var msg: Windows.TMsg;
begin
while PeekMessage(msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE) do
begin
TranslateMessage(msg);
DispatchMessage(msg);
end;
end;
var
i: Integer;
currentTime, dTime: Int64;
Expand All @@ -257,6 +266,7 @@ procedure TfrmMain.RenderScene(ASender: TObject);
try
if rbQueryEvent.Checked then SyncQueryWaitEvent;
if rbGenerateMips.Checked then SyncTexWaitEvent;
ProcessInputMessages;

FCtx.Clear(Vec(0,0,0,0));
FCtx.States.DepthTest := True;
Expand Down

0 comments on commit de3a2b3

Please sign in to comment.