Skip to content

Commit 25ea413

Browse files
committed
Added sample with library use
1 parent 91427aa commit 25ea413

7 files changed

Lines changed: 339 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
-$A8
2+
-$B-
3+
-$C+
4+
-$D+
5+
-$E-
6+
-$F-
7+
-$G+
8+
-$H+
9+
-$I+
10+
-$J-
11+
-$K-
12+
-$L+
13+
-$M-
14+
-$N+
15+
-$O+
16+
-$P+
17+
-$Q-
18+
-$R-
19+
-$S-
20+
-$T-
21+
-$U-
22+
-$V+
23+
-$W-
24+
-$X+
25+
-$YD
26+
-$Z1
27+
-cg
28+
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
29+
-H+
30+
-W+
31+
-M
32+
-$M16384,1048576
33+
-K$00400000
34+
-LE"c:\programs\borland\delphi7\Projects\Bpl"
35+
-LN"c:\programs\borland\delphi7\Projects\Bpl"
36+
-w-UNSAFE_TYPE
37+
-w-UNSAFE_CODE
38+
-w-UNSAFE_CAST
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
[FileVersion]
2+
Version=7.0
3+
[Compiler]
4+
A=8
5+
B=0
6+
C=1
7+
D=1
8+
E=0
9+
F=0
10+
G=1
11+
H=1
12+
I=1
13+
J=0
14+
K=0
15+
L=1
16+
M=0
17+
N=1
18+
O=1
19+
P=1
20+
Q=0
21+
R=0
22+
S=0
23+
T=0
24+
U=0
25+
V=1
26+
W=0
27+
X=1
28+
Y=1
29+
Z=1
30+
ShowHints=1
31+
ShowWarnings=1
32+
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
33+
NamespacePrefix=
34+
SymbolDeprecated=1
35+
SymbolLibrary=1
36+
SymbolPlatform=1
37+
UnitLibrary=1
38+
UnitPlatform=1
39+
UnitDeprecated=1
40+
HResultCompat=1
41+
HidingMember=1
42+
HiddenVirtual=1
43+
Garbage=1
44+
BoundsError=1
45+
ZeroNilCompat=1
46+
StringConstTruncated=1
47+
ForLoopVarVarPar=1
48+
TypedConstVarPar=1
49+
AsgToTypedConst=1
50+
CaseLabelRange=1
51+
ForVariable=1
52+
ConstructingAbstract=1
53+
ComparisonFalse=1
54+
ComparisonTrue=1
55+
ComparingSignedUnsigned=1
56+
CombiningSignedUnsigned=1
57+
UnsupportedConstruct=1
58+
FileOpen=1
59+
FileOpenUnitSrc=1
60+
BadGlobalSymbol=1
61+
DuplicateConstructorDestructor=1
62+
InvalidDirective=1
63+
PackageNoLink=1
64+
PackageThreadVar=1
65+
ImplicitImport=1
66+
HPPEMITIgnored=1
67+
NoRetVal=1
68+
UseBeforeDef=1
69+
ForLoopVarUndef=1
70+
UnitNameMismatch=1
71+
NoCFGFileFound=1
72+
MessageDirective=1
73+
ImplicitVariants=1
74+
UnicodeToLocale=1
75+
LocaleToUnicode=1
76+
ImagebaseMultiple=1
77+
SuspiciousTypecast=1
78+
PrivatePropAccessor=1
79+
UnsafeType=0
80+
UnsafeCode=0
81+
UnsafeCast=0
82+
[Linker]
83+
MapFile=0
84+
OutputObjs=0
85+
ConsoleApp=1
86+
DebugInfo=0
87+
RemoteSymbols=0
88+
MinStackSize=16384
89+
MaxStackSize=1048576
90+
ImageBase=4194304
91+
ExeDescription=
92+
[Directories]
93+
OutputDir=
94+
UnitOutputDir=
95+
PackageDLLOutputDir=
96+
PackageDCPOutputDir=
97+
SearchPath=
98+
Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP
99+
Conditionals=
100+
DebugSourceDirs=
101+
UsePackages=0
102+
[Parameters]
103+
RunParams=
104+
HostApplication=
105+
Launcher=
106+
UseLauncher=0
107+
DebugCWD=
108+
[Language]
109+
ActiveLang=
110+
ProjectLang=
111+
RootDir=
112+
[Version Info]
113+
IncludeVerInfo=0
114+
AutoIncBuild=0
115+
MajorVer=1
116+
MinorVer=0
117+
Release=0
118+
Build=0
119+
Debug=0
120+
PreRelease=0
121+
Special=0
122+
Private=0
123+
DLL=0
124+
Locale=1049
125+
CodePage=1251
126+
[Version Info Keys]
127+
CompanyName=
128+
FileDescription=
129+
FileVersion=1.0.0.0
130+
InternalName=
131+
LegalCopyright=
132+
LegalTrademarks=
133+
OriginalFilename=
134+
ProductName=
135+
ProductVersion=1.0.0.0
136+
Comments=
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
program Project1;
2+
3+
uses
4+
Forms,
5+
Unit1 in 'Unit1.pas' {Form1};
6+
7+
{$R *.res}
8+
9+
begin
10+
Application.Initialize;
11+
Application.CreateForm(TForm1, Form1);
12+
Application.Run;
13+
end.
31.5 KB
Binary file not shown.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
object Form1: TForm1
2+
Left = 192
3+
Top = 124
4+
BorderIcons = [biSystemMenu]
5+
BorderStyle = bsSingle
6+
Caption = '[TrueOpenVR] Sample with library use'
7+
ClientHeight = 185
8+
ClientWidth = 427
9+
Color = clBtnFace
10+
Font.Charset = DEFAULT_CHARSET
11+
Font.Color = clWindowText
12+
Font.Height = -11
13+
Font.Name = 'MS Sans Serif'
14+
Font.Style = []
15+
OldCreateOrder = False
16+
Position = poScreenCenter
17+
OnClick = FormClick
18+
OnCreate = FormCreate
19+
PixelsPerInch = 96
20+
TextHeight = 13
21+
object Label7: TLabel
22+
Left = 216
23+
Top = 72
24+
Width = 30
25+
Height = 13
26+
Alignment = taCenter
27+
Caption = 'TOVR'
28+
end
29+
object GroupBox1: TGroupBox
30+
Left = 8
31+
Top = 8
32+
Width = 169
33+
Height = 169
34+
Caption = 'HMD'
35+
TabOrder = 0
36+
object Label1: TLabel
37+
Left = 8
38+
Top = 24
39+
Width = 25
40+
Height = 13
41+
Caption = 'X = 0'
42+
end
43+
object Label2: TLabel
44+
Left = 8
45+
Top = 48
46+
Width = 25
47+
Height = 13
48+
Caption = 'Y = 0'
49+
end
50+
object Label3: TLabel
51+
Left = 8
52+
Top = 72
53+
Width = 25
54+
Height = 13
55+
Caption = 'Z = 0'
56+
end
57+
object Label4: TLabel
58+
Left = 8
59+
Top = 96
60+
Width = 39
61+
Height = 13
62+
Caption = 'Yaw = 0'
63+
end
64+
object Label5: TLabel
65+
Left = 8
66+
Top = 120
67+
Width = 42
68+
Height = 13
69+
Caption = 'Pitch = 0'
70+
end
71+
object Label6: TLabel
72+
Left = 8
73+
Top = 144
74+
Width = 36
75+
Height = 13
76+
Caption = 'Roll = 0'
77+
end
78+
end
79+
object XPManifest1: TXPManifest
80+
Left = 392
81+
Top = 8
82+
end
83+
end
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
unit Unit1;
2+
3+
interface
4+
5+
uses
6+
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7+
Dialogs, TrueOpenVR, StdCtrls, XPMan;
8+
9+
type
10+
TForm1 = class(TForm)
11+
GroupBox1: TGroupBox;
12+
Label1: TLabel;
13+
Label2: TLabel;
14+
Label3: TLabel;
15+
Label4: TLabel;
16+
Label5: TLabel;
17+
Label6: TLabel;
18+
Label7: TLabel;
19+
XPManifest1: TXPManifest;
20+
procedure FormCreate(Sender: TObject);
21+
procedure FormClick(Sender: TObject);
22+
private
23+
{ Private declarations }
24+
public
25+
{ Public declarations }
26+
end;
27+
28+
var
29+
Form1: TForm1;
30+
31+
implementation
32+
33+
{$R *.dfm}
34+
35+
procedure TForm1.FormCreate(Sender: TObject);
36+
var
37+
myHMD: THMD;
38+
begin
39+
Application.Title:=Caption;
40+
Label7.Caption:='TOVR - Open Source Virtual Reality' + #13#10 + 'standard for all devices';
41+
if TOVR_Init = false then begin
42+
ShowMessage('TrueOpenVR not found');
43+
Halt;
44+
end;
45+
if GetHMDData(myHMD) <> 0 then begin
46+
Label1.Caption:='X = ' + FloatToStr(myHMD.X);
47+
Label2.Caption:='Y = ' + FloatToStr(myHMD.Y);
48+
Label3.Caption:='Z = ' + FloatToStr(myHMD.Z);
49+
Label4.Caption:='Yaw = ' + FloatToStr(myHMD.Yaw);
50+
Label5.Caption:='Pitch = ' + FloatToStr(myHMD.Pitch);
51+
Label6.Caption:='Roll = ' + FloatToStr(myHMD.Roll);
52+
end;
53+
end;
54+
55+
procedure TForm1.FormClick(Sender: TObject);
56+
begin
57+
TOVR_Free;
58+
end;
59+
60+
end.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
del *.obj
2+
del *.dcu
3+
del *.~*
4+
del *.hpp
5+
del *.dcp
6+
del *.dpl
7+
del *.cesettings
8+
del *.bak
9+
--del *.exe*

0 commit comments

Comments
 (0)