Debian Codegraph @

examples/delphi/fmx/CastleFmx.dpr

raw
1 program CastleFmx;
2
3 uses
4 System.StartUpCopy,
5 FMX.Forms, Fmx.CastleControl,
6 Unit1 in 'Unit1.pas' {TestCgeControl};
7
8 {$R *.res}
9
10 { Forces using a dedicated (faster) GPU on laptops with multiple GPUs.
11 See https://castle-engine.io/dedicated_gpu }
12 {$if (not defined(CASTLE_NO_FORCE_DEDICATED_GPU)) and
13 (defined(CPU386) or defined(CPUX64) or defined(CPUAMD64)) and
14 (defined(MSWINDOWS) or (defined(LINUX) and defined(FPC)))
15 }
16 {$ifdef FPC}
17 {$asmmode intel}
18 {$endif}
19
20 procedure NvOptimusEnablement; {$ifdef FPC}assembler; nostackframe;{$endif}
21 asm
22 {$ifdef CPU64}
23 {$ifndef FPC}
24 .NOFRAME
25 {$endif}
26 {$endif}
27 dd 1
28 end;
29
30 procedure AmdPowerXpressRequestHighPerformance; {$ifdef FPC}assembler; nostackframe;{$endif}
31 asm
32 {$ifdef CPU64}
33 {$ifndef FPC}
34 .NOFRAME
35 {$endif}
36 {$endif}
37 dd 1
38 end;
39
40 exports
41 NvOptimusEnablement,
42 AmdPowerXpressRequestHighPerformance;
43 {$ifend}
44
45 begin
46 Application.Initialize;
47 Application.CreateForm(TTestCgeControl, TestCgeControl);
48 TCastleControl.ApplicationRun;
49 end.