2
0
Эх сурвалжийг харах

Added support of CrossVCL for Linux and MacOS thnx Eugene Kryukov

GLScene 4 жил өмнө
parent
commit
1736180f36
81 өөрчлөгдсөн 658 нэмэгдсэн , 480 устгасан
  1. 3 3
      AdvDemos/CPP/Archipelago/Unit1.cpp
  2. 3 3
      AdvDemos/Delphi/Archipelago/Unit1.pas
  3. 9 9
      AdvDemos/Delphi/Earth/Unit1.pas
  4. 3 3
      AdvDemos/Delphi/Forest/Unit1.pas
  5. 250 123
      Demos/CPP/bench/megacube/MegaCube.cbproj
  6. 7 9
      Demos/CPP/bench/megaglasscube/Unit1.cpp
  7. 0 1
      Demos/CPP/bench/megaglasscube/Unit1.dfm
  8. 0 1
      Demos/CPP/bench/megaglasscube/Unit1.h
  9. 1 1
      Demos/CPP/cgshaders/simple/Unit1.cpp
  10. 2 2
      Demos/CPP/cgshaders/texturing/Unit1.cpp
  11. 2 2
      Demos/CPP/collisions/Raycast/Unit1.cpp
  12. 4 4
      Demos/CPP/collisions/boxedin/Unit1.cpp
  13. 1 1
      Demos/CPP/collisions/boxedin/Unit1.h
  14. 1 1
      Demos/CPP/collisions/facevsface/Unit1.cpp
  15. 2 2
      Demos/CPP/collisions/meshhit/Unit1.cpp
  16. 1 1
      Demos/CPP/collisions/octree/Unit1.cpp
  17. 2 2
      Demos/CPP/graph/projection/Unit1.cpp
  18. 5 5
      Demos/CPP/interface/CameraController/Unit1.cpp
  19. 1 1
      Demos/CPP/interface/CameraController/Unit1.h
  20. 2 2
      Demos/CPP/interface/GizmoEx/Unit1.h
  21. 1 1
      Demos/CPP/interface/camera/Unit1.cpp
  22. 4 4
      Demos/CPP/meshes/actorproxy/Unit1.cpp
  23. 1 1
      Demos/CPP/meshes/actortwocam/Unit1.cpp
  24. 1 1
      Demos/CPP/meshes/mushroom/Unit1.cpp
  25. 1 1
      Demos/CPP/meshes/shadedterrain/Unit1.cpp
  26. 1 1
      Demos/CPP/meshes/terrain/Unit1.cpp
  27. 1 1
      Demos/CPP/movements/objmove/Objmove.cpp
  28. 6 4
      Demos/CPP/movements/objmove/Unit1.cpp
  29. 30 31
      Demos/CPP/movements/objmove/Unit1.dfm
  30. 7 4
      Demos/CPP/movements/objmove/Unit1.h
  31. 1 1
      Demos/CPP/movements/pong/Unit1.cpp
  32. 2 2
      Demos/CPP/physics/NewtonDensity/Unit1.cpp
  33. 2 2
      Demos/CPP/physics/OdeConveyor/Unit1.h
  34. 1 1
      Demos/CPP/specialsFX/waterplane/Unit1.cpp
  35. 2 2
      Demos/CPP/sprites/imposter/Unit1.cpp
  36. 1 1
      Demos/CleanDemos.bat
  37. 1 1
      Demos/Delphi/bench/CanvasFm.dfm
  38. 1 1
      Demos/Delphi/cgshaders/CgSimpleFm.pas
  39. 2 2
      Demos/Delphi/cgshaders/CgTextureFm.pas
  40. 1 1
      Demos/Delphi/glslshaders/OceanFm.pas
  41. 2 2
      Demos/Delphi/graph/ProjectionFm.pas
  42. 8 8
      Demos/Delphi/interface/CameraControllerFm.pas
  43. 1 1
      Demos/Delphi/interface/CameraFm.pas
  44. 6 6
      Demos/Delphi/interface/GizmoexFm.pas
  45. 1 1
      Demos/Delphi/meshes/ActorProxyFm.pas
  46. 1 1
      Demos/Delphi/meshes/ActorTwocamFm.pas
  47. 1 1
      Demos/Delphi/meshes/MushroomFm.pas
  48. 1 1
      Demos/Delphi/meshes/ShadedTerrainFm.pas
  49. 1 1
      Demos/Delphi/meshes/TerrainFm.pas
  50. 2 2
      Demos/Delphi/meshes/TilesFm.pas
  51. 5 4
      Demos/Delphi/movements/Objmove.dpr
  52. 44 55
      Demos/Delphi/movements/ObjmoveFm.dfm
  53. 40 29
      Demos/Delphi/movements/ObjmoveFm.pas
  54. 1 1
      Demos/Delphi/movements/PongFm.pas
  55. 1 1
      Demos/Delphi/movements/TweeningFm.pas
  56. 2 2
      Demos/Delphi/physics/NewtonDensityFm.pas
  57. 2 2
      Demos/Delphi/physics/NewtonJointsFm.pas
  58. 2 2
      Demos/Delphi/physics/NewtonMousePickFm.pas
  59. 2 2
      Demos/Delphi/physics/NewtonWalkCarryFm.pas
  60. 6 6
      Demos/Delphi/physics/NewtonWalkShootFm.pas
  61. 2 2
      Demos/Delphi/physics/OdeConveyorFm.pas
  62. 33 22
      Demos/Delphi/rendering/FogFm.pas
  63. 4 4
      Demos/Delphi/specialsFX/CandlesFm.dfm
  64. 1 1
      Demos/Delphi/specialsFX/WaterPlaneFm.pas
  65. 1 3
      Demos/Delphi/sprites/ImposterFm.pas
  66. 2 2
      Demos/Delphi/utilities/ArchiveEdit/Main.dfm
  67. 23 17
      Demos/Delphi/utilities/ArchiveEdit/Main.pas
  68. 1 0
      Source/GLS.BaseClasses.pas
  69. 8 8
      Source/GLS.Canvas.pas
  70. 10 11
      Source/GLS.Imposter.pas
  71. 2 6
      Source/GLS.Isosurface.pas
  72. 2 2
      Source/GLS.Logger.pas
  73. 2 1
      Source/GLS.Mesh.pas
  74. 6 6
      Source/GLS.Objects.pas
  75. 23 0
      Source/GLS.OpenGLAdapter.pas
  76. 6 18
      Source/GLS.Selection.pas
  77. 2 0
      Source/GLS.Sound.pas
  78. 4 0
      Source/GLS.VectorGeometry.pas
  79. 19 2
      Source/GLS.VectorTypes.pas
  80. 8 6
      Source/GLScene.inc
  81. 4 2
      Source/Physics.NGDRagdoll.pas

+ 3 - 3
AdvDemos/CPP/Archipelago/Unit1.cpp

@@ -140,7 +140,7 @@ void __fastcall TForm1::GLCadencerProgress(TObject *Sender,
 	const double deltaTime, const double newTime) {
 	float Speed, Alpha, f;
 	float TerrainHeight, SurfaceHeight;
-	Gls::Vectorgeometry::TVector Sbp;
+	TGLVector Sbp;
 	POINT NewMousePos;
 
 	// Handle keypresses
@@ -477,7 +477,7 @@ void __fastcall TForm1::TerrainRendererHeightDataPostRender
 void __fastcall TForm1::DOWakeProgress(TObject *Sender, const double deltaTime,
 	const double newTime) {
 	int i;
-	Gls::Vectorgeometry::TVector sbp, sbr;
+	TGLVector sbp, sbr;
 
 	if (WakeVertices == NULL) {
 		WakeVertices = new TAffineVectorList();
@@ -523,7 +523,7 @@ void __fastcall TForm1::DOWakeProgress(TObject *Sender, const double deltaTime,
 void __fastcall TForm1::DOWakeRender(TObject *Sender, TGLRenderContextInfo &rci) {
 	int i, n;
 	Gls::Vectortypes::TVector3f p;
-	Gls::Vectorgeometry::TVector sbp;
+	TGLVector sbp;
 	float c;
 
 	if (!(WakeVertices) && (!((FFSailBoat->Visible) || (WaterPlane)))) {

+ 3 - 3
AdvDemos/Delphi/Archipelago/Unit1.pas

@@ -204,7 +204,7 @@ procedure TForm1.GLCadencerProgress(Sender: TObject; const deltaTime,
 var
   speed, alpha, f: Single;
   terrainHeight, surfaceHeight: Single;
-  sbp: TVector;
+  sbp: TGLVector;
   newMousePos: TPoint;
 begin
   // handle keypresses
@@ -532,7 +532,7 @@ procedure TForm1.DOWakeProgress(Sender: TObject; const deltaTime,
   newTime: Double);
 var
   i: Integer;
-  sbp, sbr: TVector;
+  sbp, sbr: TGLVector;
 begin
   if WakeVertices = nil then
   begin
@@ -583,7 +583,7 @@ procedure TForm1.DOWakeRender(Sender: TObject; var rci: TGLRenderContextInfo);
 var
   i, n: Integer;
   p: PAffineVector;
-  sbp: TVector;
+  sbp: TGLVector;
   c: Single;
 begin
   if not Assigned(WakeVertices) then

+ 9 - 9
AdvDemos/Delphi/Earth/Unit1.pas

@@ -127,13 +127,13 @@ const
     1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18, 1 / 19, 1 / 20);
 var
   radius, invAtmosphereHeight: Single;
-  sunPos, eyePos, lightingVector: TVector;
-  diskNormal, diskRight, diskUp: TVector;
+  sunPos, eyePos, lightingVector: TGLVector;
+  diskNormal, diskRight, diskUp: TGLVector;
 
-  function AtmosphereColor(const rayStart, rayEnd: TVector): TColorVector;
+  function AtmosphereColor(const rayStart, rayEnd: TGLVector): TColorVector;
   var
     i, n: Integer;
-    atmPoint, normal: TVector;
+    atmPoint, normal: TGLVector;
     altColor: TColorVector;
     alt, rayLength, contrib, decay, intensity, invN: Single;
   begin
@@ -174,10 +174,10 @@ var
     Result.W := n * contrib * cOpacity * 0.1;
   end;
 
-  function ComputeColor(var rayDest: TVector; mayHitGround: Boolean): TColorVector;
+  function ComputeColor(var rayDest: TGLVector; mayHitGround: Boolean): TColorVector;
   var
-    ai1, ai2, pi1, pi2: TVector;
-    rayVector: TVector;
+    ai1, ai2, pi1, pi2: TGLVector;
+    rayVector: TGLVector;
   begin
     rayVector := VectorNormalize(VectorSubtract(rayDest, eyePos));
     if RayCastSphereIntersect(eyePos, rayVector, NullHmgPoint, cAtmosphereRadius, ai1, ai2) > 1 then
@@ -220,8 +220,8 @@ begin
   lightingVector := VectorNormalize(sunPos); // sun at infinity
   PrepareSinCosCache(sinCache, cosCache, 0, 360);
 
-  GetMem(pVertex, 2 * (cSlices + 1) * SizeOf(TVector));
-  GetMem(pColor, 2 * (cSlices + 1) * SizeOf(TVector));
+  GetMem(pVertex, 2 * (cSlices + 1) * SizeOf(TGLVector));
+  GetMem(pColor, 2 * (cSlices + 1) * SizeOf(TGLVector));
 
   rci.GLStates.DepthWriteMask := False;
   rci.GLStates.Disable(stLighting);

+ 3 - 3
AdvDemos/Delphi/Forest/Unit1.pas

@@ -374,7 +374,7 @@ const
   cTreeCenteringOffset: TAffineVector = (X:0; Y:30; Z:0);
 var
   d: Single;
-  camPos: TVector;
+  camPos: TGLVector;
 begin
   if not IsVolumeClipped(VectorAdd(aParticle.Position, cTreeCenteringOffset), 30, rci.rcci.frustum)
   then
@@ -398,7 +398,7 @@ procedure TForm1.PFXTreesEndParticles(Sender: TObject;
   var rci: TGLRenderContextInfo);
 var
   aParticle: TGLParticle;
-  camPos: TVector;
+  camPos: TGLVector;
 begin
   // Only 20 trees max rendered at full res, force imposter'ing the others
   while nearTrees.Count > 20 do
@@ -505,7 +505,7 @@ procedure TForm1.DOInitializeReflectionRender(Sender: TObject;
 var
   w, h: Integer;
   refMat: TMatrix;
-  cameraPosBackup, cameraDirectionBackup: TVector;
+  cameraPosBackup, cameraDirectionBackup: TGLVector;
   frustumBackup: TFrustum;
   clipPlane: TDoubleHmgPlane;
   glTarget: GLEnum;

+ 250 - 123
Demos/CPP/bench/megacube/MegaCube.cbproj

@@ -8,7 +8,7 @@
         <Base>True</Base>
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
-        <TargetedPlatforms>1</TargetedPlatforms>
+        <TargetedPlatforms>3</TargetedPlatforms>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -93,11 +93,12 @@
         <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
         <VerInfo_Locale>1033</VerInfo_Locale>
         <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
-        <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
         <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
         <PackageImports>IndyIPClient;GLScene_Sounds_RT;frx17;fs17;GLScene_Physics_RT;GLScene_Cg_RT;bindcompfmx;GR32_RSXE3;DBXSqliteDriver;vcldbx;GLScene_Physics_RT;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;TeeDB;bindcomp;inetdb;inetdbbde;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DBXOdbcDriver;DataSnapServer;Tee;GLScene_RT;DataSnapProviderClient;xmlrtl;DBXSybaseASEDriver;ibxpress;DbxCommonDriver;vclimg;GLScene_Sounds_RT;IndyProtocols;DBXMySQLDriver;dbxcds;MetropolisUILiveTile;bindengine;vclactnband;vcldb;soaprtl;bindcompdbx;vcldsnap;bindcompvcl;FMXTee;TeeUI;vclie;GR32_DSGN_RSXE3;DBXDb2Driver;vcltouch;bcbsmp;websnap;DBXOracleDriver;CustomIPTransport;vclribbon;VclSmp;dsnap;DBXInformixDriver;IndyIPServer;fmxase;vcl;DataSnapConnectors;IndyCore;GLScene_Sounds_RT;DBXMSSQLDriver;CodeSiteExpressPkg;CloudService;DBXFirebirdDriver;dsnapcon;frxDB17;inet;fsDB17;fmxobj;IndyIPCommon;FmxTeeUI;vclx;frxe17;inetdbxpress;webdsnap;DBXSybaseASADriver;fmxdae;bdertl;dbexpress;DataSnapIndy10ServerTransport;adortl;bcbie;$(PackageImports)</PackageImports>
         <UWP_CppLogo44>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png</UWP_CppLogo44>
         <UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
+        <BT_BuildType>Debug</BT_BuildType>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1)'!=''">
         <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
@@ -127,6 +128,9 @@
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
         <Defines>_DEBUG;$(Defines)</Defines>
+        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
+        <LinkPackageImports>rtl.bpi;vcl.bpi;fmx.bpi;xmlrtl.bpi;vclimg.bpi;GLScene_RT.bpi</LinkPackageImports>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2)'!=''">
         <TASM_Debugging>None</TASM_Debugging>
@@ -136,6 +140,8 @@
     </PropertyGroup>
     <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
         <Defines>NDEBUG;$(Defines)</Defines>
+        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
+        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
     </PropertyGroup>
     <ItemGroup>
         <CppCompile Include="MegaCube.cpp">
@@ -225,13 +231,9 @@
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c270mt.dll" Class="DependencyModule">
-                    <Platform Name="Win32">
-                        <Overwrite>true</Overwrite>
-                    </Platform>
-                </DeployFile>
-                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c270.dll" Class="DependencyModule">
-                    <Platform Name="Win32">
+                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32230.dll" Class="DependencyModule"/>
+                <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx64\libcgcrtl.dylib" Class="DependencyModule">
+                    <Platform Name="OSX64">
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
@@ -303,9 +305,13 @@
                     </Platform>
                 </DeployFile>
                 <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32230mt.dll" Class="DependencyModule"/>
-                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32230.dll" Class="DependencyModule"/>
-                <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx64\libcgcrtl.dylib" Class="DependencyModule">
-                    <Platform Name="OSX64">
+                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c270mt.dll" Class="DependencyModule">
+                    <Platform Name="Win32">
+                        <Overwrite>true</Overwrite>
+                    </Platform>
+                </DeployFile>
+                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c270.dll" Class="DependencyModule">
+                    <Platform Name="Win32">
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
@@ -326,20 +332,12 @@
                         <RemoteDir>classes</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>classes</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidFileProvider">
                     <Platform Name="Android">
                         <RemoteDir>res\xml</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\xml</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidGDBServer">
                     <Platform Name="Android">
@@ -352,10 +350,6 @@
                         <RemoteDir>library\lib\armeabi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\armeabi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeArmeabiv7aFile">
                     <Platform Name="Android64">
@@ -368,20 +362,12 @@
                         <RemoteDir>library\lib\mips</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\mips</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidServiceOutput">
                     <Platform Name="Android">
                         <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\arm64-v8a</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidServiceOutput_Android32">
                     <Platform Name="Android64">
@@ -394,200 +380,120 @@
                         <RemoteDir>res\drawable</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashStyles">
                     <Platform Name="Android">
                         <RemoteDir>res\values</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\values</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashStylesV21">
                     <Platform Name="Android">
                         <RemoteDir>res\values-v21</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\values-v21</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_Colors">
                     <Platform Name="Android">
                         <RemoteDir>res\values</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\values</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_DefaultAppIcon">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon144">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xxhdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon36">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-ldpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-ldpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon48">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-mdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-mdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon72">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-hdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-hdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_LauncherIcon96">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xhdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_NotificationIcon24">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-mdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-mdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_NotificationIcon36">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-hdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-hdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_NotificationIcon48">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xhdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_NotificationIcon72">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xxhdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_NotificationIcon96">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage426">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-small</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-small</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage470">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-normal</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-normal</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage640">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-large</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-large</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_SplashImage960">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable-xlarge</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\drawable-xlarge</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="Android_Strings">
                     <Platform Name="Android">
                         <RemoteDir>res\values</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>res\values</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="DebugSymbols">
                     <Platform Name="iOSSimulator">
@@ -676,9 +582,6 @@
                     <Platform Name="Android">
                         <Operation>0</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <Operation>0</Operation>
-                    </Platform>
                     <Platform Name="iOSDevice32">
                         <Operation>0</Operation>
                     </Platform>
@@ -711,6 +614,17 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch1024x768">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch1536">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -722,6 +636,39 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch1536x2048">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPad_Launch1668">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPad_Launch1668x2388">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch2048">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -733,6 +680,61 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch2048x1536">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPad_Launch2048x2732">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPad_Launch2224">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPad_Launch2388x1668">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPad_Launch2732x2048">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch2x">
                     <Platform Name="iOSDevice64">
                         <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
@@ -754,6 +756,17 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch768x1024">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_LaunchDark2x">
                     <Platform Name="iOSDevice64">
                         <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
@@ -764,6 +777,105 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_Launch1125">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch1136x640">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch1242">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch1242x2688">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch1334">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch1792">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2208">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2436">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2688x1242">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch2x">
                     <Platform Name="iOSDevice64">
                         <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
@@ -817,6 +929,28 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_Launch750">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch828">
+                    <Platform Name="iOSDevice32">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSDevice64">
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_LaunchDark2x">
                     <Platform Name="iOSDevice64">
                         <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
@@ -841,9 +975,6 @@
                     <Platform Name="Android">
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <Operation>1</Operation>
-                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -946,10 +1077,6 @@
                         <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
-                    <Platform Name="Android64">
-                        <RemoteDir>library\lib\arm64-v8a</RemoteDir>
-                        <Operation>1</Operation>
-                    </Platform>
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
                     </Platform>
@@ -1021,7 +1148,7 @@
             </Deployment>
             <Platforms>
                 <Platform value="Win32">True</Platform>
-                <Platform value="Win64">False</Platform>
+                <Platform value="Win64">True</Platform>
             </Platforms>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 7 - 9
Demos/CPP/bench/megaglasscube/Unit1.cpp

@@ -17,16 +17,13 @@
 #pragma link "GLS.SceneViewer"
 #pragma resource "*.dfm"
 TForm1 *Form1;
-//---------------------------------------------------------------------------
-__fastcall TForm1::TForm1(TComponent* Owner)
-	: TForm(Owner)
-{
-}
-//---------------------------------------------------------------------------
 
 const int
   cSize = 10;
-void __fastcall TForm1::FormCreate(TObject *Sender)
+
+//---------------------------------------------------------------------------
+__fastcall TForm1::TForm1(TComponent* Owner)
+	: TForm(Owner)
 {
   int x, y, z;
   TGLCube *cube;
@@ -51,9 +48,10 @@ void __fastcall TForm1::FormCreate(TObject *Sender)
 	  }
 }
 //---------------------------------------------------------------------------
+
 void __fastcall TForm1::GLCadencer1Progress(TObject *Sender, const double deltaTime,
-          const double newTime)
+		  const double newTime)
 {
- //DummyCube1->TurnAngle = 90 * newTime; // 90° per second
+  DummyCube1->TurnAngle = 90 * newTime; // 90° per second
 }
 //---------------------------------------------------------------------------

+ 0 - 1
Demos/CPP/bench/megaglasscube/Unit1.dfm

@@ -11,7 +11,6 @@ object Form1: TForm1
   Font.Name = 'Tahoma'
   Font.Style = []
   OldCreateOrder = False
-  OnCreate = FormCreate
   PixelsPerInch = 96
   TextHeight = 13
   object GLSceneViewer1: TGLSceneViewer

+ 0 - 1
Demos/CPP/bench/megaglasscube/Unit1.h

@@ -26,7 +26,6 @@ __published:	// IDE-managed Components
 	TGLCamera *GLCamera1;
 	TGLCadencer *GLCadencer1;
 	TGLSimpleNavigation *GLSimpleNavigation1;
-	void __fastcall FormCreate(TObject *Sender);
 	void __fastcall GLCadencer1Progress(TObject *Sender, const double deltaTime, const double newTime);
 
 private:	// User declarations

+ 1 - 1
Demos/CPP/cgshaders/simple/Unit1.cpp

@@ -60,7 +60,7 @@ void __fastcall TForm1::FormCreate(TObject *Sender)
 
 void __fastcall TForm1::CgShader1ApplyVP(TCgProgram *CgProgram, TObject *Sender)
 {
-  Gls::Vectorgeometry::TVector v;
+  TGLVector v;
   TCgParameter *Param;
   // rotate light vector for the "simple lighting" vertex program
   v = ZHmgVector;

+ 2 - 2
Demos/CPP/cgshaders/texturing/Unit1.cpp

@@ -72,7 +72,7 @@ void __fastcall TForm1::CgShader1Initialize(TCustomCgShader *CgShader)
 
 void __fastcall TForm1::CgShader1ApplyVP(TCgProgram *CgProgram, TObject *Sender)
 {
-  Gls::Vectorgeometry::TVector v;
+  TGLVector v;
   CgProgram->ParamByName("ModelViewProj")->SetAsStateMatrix(CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_MATRIX_IDENTITY);
 // Alternatively, you can set it using:
 // CgProgram->SetStateMatrix("ModelViewProj", CG_GL_MODELVIEW_PROJECTION_MATRIX, CG_GL_MATRIX_IDENTITY);
@@ -91,7 +91,7 @@ void __fastcall TForm1::CgShader1ApplyVP(TCgProgram *CgProgram, TObject *Sender)
 
 void __fastcall TForm1::CgShader1ApplyFP(TCgProgram *CgProgram, TObject *Sender)
 {
-  Gls::Vectorgeometry::TVector v;
+  TGLVector v;
   CgProgram->ParamByName("Map0")->EnableTexture();
   CgProgram->ParamByName("Map1")->EnableTexture();
   CgProgram->ParamByName("Map2")->EnableTexture();

+ 2 - 2
Demos/CPP/collisions/Raycast/Unit1.cpp

@@ -26,8 +26,8 @@ __fastcall TForm1::TForm1(TComponent* Owner)
 //---------------------------------------------------------------------------
 void __fastcall TForm1::BUCastClick(TObject *Sender)
 {
-   Gls::Vectorgeometry::TVector o, v, vLight, light, iPoint, iNormal;
-   Gls::Vectorgeometry::TVector up, right, dir;
+   TGLVector o, v, vLight, light, iPoint, iNormal;
+   TGLVector up, right, dir;
    int x, y, dx, dy;
    float f, d;
    TColor color;

+ 4 - 4
Demos/CPP/collisions/boxedin/Unit1.cpp

@@ -59,10 +59,10 @@ void __fastcall TForm1::GLCadencer1Progress(TObject * Sender,
 											const double deltaTime,
 											const double newTime)
 {
-  Gls::Vectorgeometry::TVector rayStart, rayVector;
+  TGLVector rayStart, rayVector;
   float velocity;
-  Gls::Vectorgeometry::TVector pPoint;
-  Gls::Vectorgeometry::TVector pNormal;
+  TGLVector pPoint;
+  TGLVector pNormal;
   __int64 t;
 
   if(IsKeyDown(VK_ESCAPE))
@@ -111,7 +111,7 @@ void __fastcall TForm1::GLCadencer1Progress(TObject * Sender,
 
 //---------------------------------------------------------------------------
 
-void TForm1::AddToTrail(const Gls::Vectorgeometry::TVector & p)
+void TForm1::AddToTrail(const TGLVector & p)
 {
   int i, k;
   Lines1->Nodes->Last()->AsVector = p;

+ 1 - 1
Demos/CPP/collisions/boxedin/Unit1.h

@@ -57,7 +57,7 @@ __published:                   // IDE-managed Components
 private:                       // User declarations
   float colTotalTime;           // for timing collision detection
   int colCount;
-  void AddToTrail(const Gls::Vectorgeometry::TVector & p);
+  void AddToTrail(const TGLVector & p);
 public:                        // User declarations
     __fastcall TForm1(TComponent * Owner);
   int mousex, mousey;

+ 1 - 1
Demos/CPP/collisions/facevsface/Unit1.cpp

@@ -161,7 +161,7 @@ void __fastcall TForm1::GLSceneViewer1MouseMove(TObject *Sender, TShiftState Shi
           int X, int Y)
 {
    int dx, dy;
-   Gls::Vectorgeometry::TVector VX, VY;
+   TGLVector VX, VY;
    TGLCamera *Camera;
 
    Camera = GLSceneViewer1->Camera;

+ 2 - 2
Demos/CPP/collisions/meshhit/Unit1.cpp

@@ -36,7 +36,7 @@ void __fastcall TForm1::FormCreate(TObject *Sender)
 void __fastcall TForm1::GLSceneViewer1MouseDown(TObject *Sender, TMouseButton Button,
 		  TShiftState Shift, int X, int Y)
 {
-   Gls::Vectorgeometry::TVector rayStart, rayVector, iPoint, iNormal;
+   TGLVector rayStart, rayVector, iPoint, iNormal;
    // retrieve raycasting data:
    //    rayStart is obtained for camera and screen position
    //    rayVector is the camera direction (i.e direction to target since our camera is targeted)
@@ -71,7 +71,7 @@ void __fastcall TForm1::GLSceneViewer1MouseMove(TObject *Sender, TShiftState Shi
 void __fastcall TForm1::GLSceneViewer2MouseDown(TObject *Sender, TMouseButton Button,
 		  TShiftState Shift, int X, int Y)
 {
-   Gls::Vectorgeometry::TVector rayStart, rayVector, iPoint, iNormal;
+   TGLVector rayStart, rayVector, iPoint, iNormal;
    // retrieve raycasting data:
    //    rayStart is the eye (camera) position
    //    rayVector is computed from screen position

+ 1 - 1
Demos/CPP/collisions/octree/Unit1.cpp

@@ -50,7 +50,7 @@ void __fastcall TForm1::GLSceneViewer2MouseDown(TObject * Sender,
 												TMouseButton Button,
 												TShiftState Shift, int X, int Y)
 {
-  Gls::Vectorgeometry::TVector rayStart, rayVector, iPoint, iNormal;
+  TGLVector rayStart, rayVector, iPoint, iNormal;
   __int64 t;
 
   SetVector(rayStart, GLCamera2->AbsolutePosition);

+ 2 - 2
Demos/CPP/graph/projection/Unit1.cpp

@@ -40,8 +40,8 @@ void __fastcall TForm1::DirectOpenGLRender(TObject *Sender, TGLRenderContextInfo
 {
    int i;
    Gls::Vectorgeometry::TMatrix mat;
-   Gls::Vectorgeometry::TVector p, pProj;
-   Gls::Vectorgeometry::TVector planePoint, planeNormal;
+   TGLVector p, pProj;
+   TGLVector planePoint, planeNormal;
    THmgPlane plane;
 
    // Here we recover our plane point and normal...

+ 5 - 5
Demos/CPP/interface/CameraController/Unit1.cpp

@@ -63,7 +63,7 @@ void __fastcall TForm1::GetInput(TButton *Sender)
   }
 }
 //---------------------------------------------------------------------------
-Gls::Vectorgeometry::TVector __fastcall TForm1::OnGetCameraPosition(
+TGLVector __fastcall TForm1::OnGetCameraPosition(
 					   TGLNavigatorSmoothChangeVector* const ASender)
 {
   if (ASender == FCameraSmoothAnimator_AbsPos)
@@ -119,7 +119,7 @@ void __fastcall TForm1::btnZoomToDistanceClick(TObject *Sender)
 //---------------------------------------------------------------------------
 void __fastcall TForm1::btnOrbitToPosClick(TObject *Sender)
 {
-  Gls::Vectorgeometry::TVector lTargetPosition;
+  TGLVector lTargetPosition;
 
   GetInput(btnOrbitToPos);
   lTargetPosition = dcSphere->LocalToAbsolute(PointMake(DextX, DextY, DextZ));
@@ -147,7 +147,7 @@ void __fastcall TForm1::btSmoothOrbitClick(TObject *Sender)
   float lAngle; // In radians.
   float lTime;
   bool lNeedToRecalculateZoom;
-  Gls::Vectorgeometry::TVector lTargetPosition;
+  TGLVector lTargetPosition;
 
   GetInput(btSmoothOrbit);
   lTargetPosition = dcSphere->LocalToAbsolute(PointMake(DextX, DextY, DextZ));
@@ -178,7 +178,7 @@ void __fastcall TForm1::btSmoothOrbitToPosAdvClick(TObject *Sender)
 {
   float lAngle; // In radians.
   float lTime;
-  Gls::Vectorgeometry::TVector lTargetPosition;
+  TGLVector lTargetPosition;
 
   GetInput(btSmoothOrbitToPosAdv);
 
@@ -199,7 +199,7 @@ void __fastcall TForm1::btSmoothOrbitToPosAdvClick(TObject *Sender)
 
 void __fastcall TForm1::btnOrbitToPosAdvClick(TObject *Sender)
 {
-  Gls::Vectorgeometry::TVector lTargetPosition;
+  TGLVector lTargetPosition;
 
   GetInput(btnOrbitToPosAdv);
   lTargetPosition = dcSphere->LocalToAbsolute(PointMake(DextX, DextY, DextZ));

+ 1 - 1
Demos/CPP/interface/CameraController/Unit1.h

@@ -135,7 +135,7 @@ private:	// User declarations
 	void __fastcall GetInput(TButton *Sender);
 	TVector4f __fastcall(__closure *TGLNavigatorSmoothChangeVectorGetEvent)
 		(TGLNavigatorSmoothChangeVector* const ASender);
-	Gls::Vectorgeometry::TVector __fastcall OnGetCameraPosition(
+	TGLVector __fastcall OnGetCameraPosition(
 					   TGLNavigatorSmoothChangeVector* const ASender);
 	void __fastcall OnSetCameraPosition(TGLNavigatorSmoothChangeVector* const ASender,
 					   const TVector4f &AValue);

+ 2 - 2
Demos/CPP/interface/GizmoEx/Unit1.h

@@ -142,9 +142,9 @@ __published:	// IDE-managed Components
 
 private:	// User declarations
 	int mx, my;
-	Gls::Vectorgeometry::TVector MousePos,LostMousePos;
+	TGLVector MousePos,LostMousePos;
 	bool MouseMoving;
-	Gls::Vectorgeometry::TVector pos;
+	TGLVector pos;
 	TGLBaseSceneObject *FObj;
 	TGLGizmoEx *Gizmo;
 	float FVectorLength;

+ 1 - 1
Demos/CPP/interface/camera/Unit1.cpp

@@ -85,7 +85,7 @@ void __fastcall TForm1::GLSceneViewer1MouseMove(TObject *Sender, TShiftState Shi
           int X, int Y)
 {
 	int dx, dy;
-	Gls::Vectorgeometry::TVector v;
+	TGLVector v;
 
 	// calculate delta since last move or last mousedown
 	dx = mdx-X; dy = mdy-Y;

+ 4 - 4
Demos/CPP/meshes/actorproxy/Unit1.cpp

@@ -69,10 +69,10 @@ void __fastcall TForm1::GLSceneViewer1MouseMove(TObject *Sender, TShiftState Shi
 
 void __fastcall TForm1::DoRaycastStuff()
 {
-   Gls::Vectorgeometry::TVector rayStart;
-   Gls::Vectorgeometry::TVector rayVector;
-   Gls::Vectorgeometry::TVector iPoint;
-   Gls::Vectorgeometry::TVector iNormal;
+   TGLVector rayStart;
+   TGLVector rayVector;
+   TGLVector iPoint;
+   TGLVector iNormal;
 
    SetVector(rayStart, GLCamera1->AbsolutePosition);
    SetVector(rayVector, GLSceneViewer1->Buffer->ScreenToVector(

+ 1 - 1
Demos/CPP/meshes/actortwocam/Unit1.cpp

@@ -47,7 +47,7 @@ void __fastcall TForm1::AddMushrooms()
 {
    int i;
    TGLProxyObject *proxy;
-   Gls::Vectorgeometry::TVector s;
+   TGLVector s;
    float f;
 
    // spawn some more mushrooms using proxy objects

+ 1 - 1
Demos/CPP/meshes/mushroom/Unit1.cpp

@@ -49,7 +49,7 @@ void __fastcall TForm1::AddMushRooms()
 {
    int i;
    TGLProxyObject *proxy;
-   Gls::Vectorgeometry::TVector s;
+   TGLVector s;
    float f;
 
    // spawn some more mushrooms using proxy objects

+ 1 - 1
Demos/CPP/meshes/shadedterrain/Unit1.cpp

@@ -57,7 +57,7 @@ void __fastcall TForm1::GLBumpmapHDS1NewTilePrepared(TGLBumpmapHDS * Sender,
 													 TGLLibMaterial *
 													 normalMapMaterial)
 {
-  Gls::Vectorgeometry::TVector n;
+  TGLVector n;
 
   heightData->MaterialName = normalMapMaterial->Name;
   normalMapMaterial->Texture2Name = "contrast";

+ 1 - 1
Demos/CPP/meshes/terrain/Unit1.cpp

@@ -267,7 +267,7 @@ void __fastcall TForm1::FormKeyPress(TObject * Sender, char &Key)
 
 void __fastcall TForm1::TISoundTimer(TObject * Sender)
 {
-  Gls::Vectorgeometry::TVector wolfPos;
+  TGLVector wolfPos;
   float c, s;
   TGLBSoundEmitter *be;
 

+ 1 - 1
Demos/CPP/movements/objmove/Objmove.cpp

@@ -1,5 +1,5 @@
 //---------------------------------------------------------------------------
-
+// Based on
 #include <vcl.h>
 #pragma hdrstop
 #include <tchar.h>

+ 6 - 4
Demos/CPP/movements/objmove/Unit1.cpp

@@ -17,6 +17,8 @@
 #pragma link "GLS.SpaceText"
 #pragma link "GLS.SceneViewer"
 #pragma link "GLS.WindowsFont"
+#pragma link "GLS.Navigator"
+#pragma link "GLS.SmoothNavigator"
 #pragma resource "*.dfm"
 TForm1 *Form1;
 
@@ -35,10 +37,10 @@ void __fastcall TForm1::FormCreate(TObject *Sender)
   UpdateHudText();
 }
 //---------------------------------------------------------------------------
-Gls::Vectorgeometry::TVector __fastcall TForm1::MouseWorldPos(int X, int Y)
+TGLVector __fastcall TForm1::MouseWorldPos(int X, int Y)
 {
-  Gls::Vectorgeometry::TVector v;
-  Gls::Vectorgeometry::TVector Result;
+  TGLVector v;
+  TGLVector Result;
 
   Y = Scn->Height - Y;
   if (CurrentPick)
@@ -131,7 +133,7 @@ void __fastcall TForm1::ScnMouseDown(TObject *Sender, TMouseButton Button, TShif
 void __fastcall TForm1::ScnMouseMove(TObject *Sender, TShiftState Shift, int X, int Y)
 
 {
-  Gls::Vectorgeometry::TVector newPos;
+  TGLVector newPos;
 
   ScnMouseMoveCnt++;
 ////not translated  Assert(ScnMouseMoveCnt < 2);

+ 30 - 31
Demos/CPP/movements/objmove/Unit1.dfm

@@ -21,73 +21,58 @@ object Form1: TForm1
     Left = 161
     Top = 0
     Width = 387
-    Height = 452
+    Height = 433
     Camera = GLCamera1
     Buffer.BackgroundColor = clBackground
     FieldOfView = 51.630752563476560000
+    PenAsTouch = False
     Align = alClient
     OnMouseDown = ScnMouseDown
     OnMouseMove = ScnMouseMove
     TabOrder = 0
+    ExplicitHeight = 452
   end
   object Panel1: TPanel
     Left = 0
     Top = 0
     Width = 161
-    Height = 452
+    Height = 433
     Align = alLeft
     BevelOuter = bvNone
     TabOrder = 1
-    ExplicitHeight = 407
+    ExplicitHeight = 452
     object Label2: TLabel
-      Left = 0
-      Top = 26
-      Width = 158
-      Height = 26
-      Align = alTop
-      Caption = 'Select and move with the mouse any of the two cubes.'
-      ShowAccelChar = False
-      WordWrap = True
-    end
-    object Label1: TLabel
       Left = 0
       Top = 0
-      Width = 114
-      Height = 13
+      Width = 161
+      Height = 26
       Align = alTop
-      Caption = 'Author: Rado Stoyanov'
+      Caption = 'Select and move with the mouse any of the cubes.'
       ShowAccelChar = False
       WordWrap = True
+      ExplicitWidth = 158
     end
     object Label3: TLabel
       Left = 0
-      Top = 52
-      Width = 150
+      Top = 26
+      Width = 161
       Height = 26
       Align = alTop
       Caption = 'Default movement is on the XY plane.'
       ShowAccelChar = False
       WordWrap = True
+      ExplicitWidth = 150
     end
     object Label4: TLabel
       Left = 0
-      Top = 78
-      Width = 145
+      Top = 52
+      Width = 161
       Height = 26
       Align = alTop
       Caption = 'Shift + Drag moves on the XZ plane.'
       ShowAccelChar = False
       WordWrap = True
-    end
-    object Label5: TLabel
-      Left = 0
-      Top = 13
-      Width = 142
-      Height = 13
-      Align = alTop
-      Caption = '[email protected]'
-      ShowAccelChar = False
-      WordWrap = True
+      ExplicitWidth = 145
     end
     object Button1: TButton
       Left = 618
@@ -99,7 +84,7 @@ object Form1: TForm1
     end
     object GroupBox1: TGroupBox
       Left = 0
-      Top = 104
+      Top = 78
       Width = 161
       Height = 43
       Align = alTop
@@ -116,6 +101,16 @@ object Form1: TForm1
       end
     end
   end
+  object StatusBar: TStatusBar
+    Left = 0
+    Top = 433
+    Width = 548
+    Height = 19
+    Panels = <>
+    ExplicitLeft = 304
+    ExplicitTop = -16
+    ExplicitWidth = 0
+  end
   object GLScene1: TGLScene
     Left = 296
     Top = 8
@@ -260,4 +255,8 @@ object Form1: TForm1
     Left = 400
     Top = 8
   end
+  object GLSmoothNavigator1: TGLSmoothNavigator
+    Left = 400
+    Top = 64
+  end
 end

+ 7 - 4
Demos/CPP/movements/objmove/Unit1.h

@@ -29,6 +29,9 @@
 #include "GLS.BitmapFont.hpp"
 #include "GLS.WindowsFont.hpp"
 #include "GLS.HUDObjects.hpp"
+#include <Vcl.ComCtrls.hpp>
+#include "GLS.Navigator.hpp"
+#include "GLS.SmoothNavigator.hpp"
 
 //---------------------------------------------------------------------------
 class TForm1 : public TForm
@@ -37,10 +40,8 @@ __published:	// IDE-managed Components
 	TGLSceneViewer *Scn;
 	TPanel *Panel1;
 	TLabel *Label2;
-	TLabel *Label1;
 	TLabel *Label3;
 	TLabel *Label4;
-	TLabel *Label5;
 	TButton *Button1;
 	TGroupBox *GroupBox1;
 	TCheckBox *ShowAxes;
@@ -60,6 +61,8 @@ __published:	// IDE-managed Components
 	TGLHUDText *TopText;
 	TGLHUDText *ObjText;
 	TGLWindowsBitmapFont *GLWindowsBitmapFont1;
+	TStatusBar *StatusBar;
+	TGLSmoothNavigator *GLSmoothNavigator1;
 	void __fastcall FormCreate(TObject *Sender);
 	void __fastcall ScnMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
           int X, int Y);
@@ -71,11 +74,11 @@ __published:	// IDE-managed Components
 	void __fastcall FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
 
 private:	// User declarations
-	Gls::Vectorgeometry::TVector lastMouseWorldPos;
+	TGLVector lastMouseWorldPos;
 	bool movingOnZ;
 	TGLCustomSceneObject *CurrentPick;
 	int ScnMouseMoveCnt;
-	Gls::Vectorgeometry::TVector __fastcall MouseWorldPos(int X, int Y);
+	TGLVector __fastcall MouseWorldPos(int X, int Y);
 	void __fastcall UpdateHudText();
 	void __fastcall ProcessPick(TGLBaseSceneObject* pick);
 public:		// User declarations

+ 1 - 1
Demos/CPP/movements/pong/Unit1.cpp

@@ -67,7 +67,7 @@ const float
 void __fastcall TForm1::GLCadencer1Progress(TObject *Sender, const double deltaTime,
 		  const double newTime)
 {
-	Gls::Vectorgeometry::TVector newBallPos;
+	TGLVector newBallPos;
 	// gameOver is True as soon as the ball is behind the pad, but we don't end
 	// the game immediately so the user can realize he has lost
 	if ((!gameOver) && (deltaTime>0))

+ 2 - 2
Demos/CPP/physics/NewtonDensity/Unit1.cpp

@@ -30,7 +30,7 @@ int __cdecl BuoyancyPlaneCallback(const int collisionID, void *context,
   const PNGDFloat globalSpaceMatrix, PNGDFloat globalSpacePlane)
 {
   Gls::Vectorgeometry::TMatrix *BodyMatrix;
-  Gls::Vectorgeometry::TVector PlaneEquation;
+  TGLVector PlaneEquation;
   Gls::Vectorgeometry::PVector pv;
   TForm1 *MyForm;
 
@@ -107,7 +107,7 @@ void __fastcall TForm1::GLSceneViewer1MouseDown(TObject *Sender, TMouseButton Bu
 void TForm1::MyForceAndTorqueDensity(const PNewtonBody cbody,
 	  NGDFloat timestep, int threadIndex)
 {
-  Gls::Vectorgeometry::TVector worldGravity;
+  TGLVector worldGravity;
   TGLNGDDynamic  *NGDDyn;
   float fluidDensity, fluidLinearViscosity, fluidAngularViscosity;
 

+ 2 - 2
Demos/CPP/physics/OdeConveyor/Unit1.h

@@ -62,8 +62,8 @@ __published:	// IDE-managed Components
 	void __fastcall FrictionChange(TObject *Sender);
 
 private:	// User declarations
-	Gls::Vectorgeometry::TVector FUserDirection;
-	Gls::Vectorgeometry::TVector FDirectionVector;
+	TGLVector FUserDirection;
+	TGLVector FDirectionVector;
 
 public:		// User declarations
 	__fastcall TForm1(TComponent* Owner);

+ 1 - 1
Demos/CPP/specialsFX/waterplane/Unit1.cpp

@@ -15,7 +15,7 @@ TForm1 *Form1;
 
 void TForm1::ClickWater(int x, int y)
 {
-  Gls::Vectorgeometry::TVector ip;
+  TGLVector ip;
   // create a ripple in the pond on a right-mousebutton click
   GLSceneViewer1->Buffer->
     ScreenVectorIntersectWithPlaneXZ(VectorMake

+ 2 - 2
Demos/CPP/sprites/imposter/Unit1.cpp

@@ -96,8 +96,8 @@ void __fastcall TForm1::GLDirectOpenGL1Render(TObject *Sender, TGLRenderContextI
 
 {
    int x, y;
-   Gls::Vectorgeometry::TVector camPos;
-   Gls::Vectorgeometry::TVector pos;
+   TGLVector camPos;
+   TGLVector pos;
 
 /*   to do
    TImposter *imp;

+ 1 - 1
Demos/CleanDemos.bat

@@ -57,7 +57,7 @@ attrib +R "AdvDemos/Q3Demo/Model/animation.cfg"
 rem del *.cfg /s  - there are quake's animations
 attrib -R "AdvDemos/Q3Demo/Model/animation.cfg"
 
-del *.res /s
+rem del *.res /s
 rem del *.ico /s  - some projects have own icos
 rem del *.cur /s  - cursors
 rem del *.obj /s  - obj models and resources for lazarus

+ 1 - 1
Demos/Delphi/bench/CanvasFm.dfm

@@ -16,7 +16,7 @@ object FormCanvas: TFormCanvas
   TextHeight = 13
   object PaintBox: TPaintBox
     Left = 272
-    Top = 64
+    Top = 65
     Width = 256
     Height = 256
   end

+ 1 - 1
Demos/Delphi/cgshaders/CgSimpleFm.pas

@@ -153,7 +153,7 @@ end;
 
 procedure TFormCgSimple.CgShader1ApplyVP(CgProgram: TCgProgram; Sender: TObject);
 var
-  v : TVector;
+  v : TGLVector;
   Param: TCgParameter;
 begin
   // rotate light vector for the "simple lighting" vertex program

+ 2 - 2
Demos/Delphi/cgshaders/CgTextureFm.pas

@@ -195,7 +195,7 @@ end;
 procedure TFormCgTexture.CgShader1ApplyVP(CgProgram: TCgProgram; Sender: TObject);
 
 var
-  v: TVector;
+  v: TGLVector;
 
   function conv(TrackBar: TTrackBar): single;
   var
@@ -219,7 +219,7 @@ end;
 
 procedure TFormCgTexture.CgShader1ApplyFP(CgProgram: TCgProgram; Sender: TObject);
 var
-  v: TVector;
+  v: TGLVector;
 
   function conv(TrackBar: TTrackBar): single;
   var

+ 1 - 1
Demos/Delphi/glslshaders/OceanFm.pas

@@ -166,7 +166,7 @@ end;
 procedure TForm1.GLUserShader1DoApply(Sender: TObject;
   var rci: TGLRenderContextInfo);
 var
-  camPos: TVector;
+  camPos: TGLVector;
 begin
   programObject.UseProgramObject;
 

+ 2 - 2
Demos/Delphi/graph/ProjectionFm.pas

@@ -74,8 +74,8 @@ procedure TFormProjection.DirectOpenGLRender(Sender: TObject; var rci: TGLRender
 var
   i: Integer;
   mat: TMatrix;
-  p, pProj: TVector;
-  planePoint, planeNormal: TVector;
+  p, pProj: TGLVector;
+  planePoint, planeNormal: TGLVector;
   plane: THmgPlane;
 begin
   // Here we recover our plane point and normal...

+ 8 - 8
Demos/Delphi/interface/CameraControllerFm.pas

@@ -146,8 +146,8 @@ type
     FCameraSmoothAnimator_AbsPos: TGLNavigatorSmoothChangeVector;
     FCameraSmoothAnimator_RelPos: TGLNavigatorSmoothChangeVector;
     procedure GetInput(Sender:TButton);
-    function OnGetCameraPosition(const ASender: TGLNavigatorSmoothChangeVector): TVector;
-    procedure OnSetCameraPosition(const ASender: TGLNavigatorSmoothChangeVector; const AValue: TVector);
+    function OnGetCameraPosition(const ASender: TGLNavigatorSmoothChangeVector): TGLVector;
+    procedure OnSetCameraPosition(const ASender: TGLNavigatorSmoothChangeVector; const AValue: TGLVector);
   public
 end;
 
@@ -195,7 +195,7 @@ begin
   end;
 end;
 
-function TForm1.OnGetCameraPosition(const ASender: TGLNavigatorSmoothChangeVector): TVector;
+function TForm1.OnGetCameraPosition(const ASender: TGLNavigatorSmoothChangeVector): TGLVector;
 begin
   if ASender = FCameraSmoothAnimator_AbsPos then
     Result := GLCamera.AbsolutePosition
@@ -203,7 +203,7 @@ begin
     Result := GLCamera.Position.DirectVector;
 end;
 
-procedure TForm1.OnSetCameraPosition(const ASender: TGLNavigatorSmoothChangeVector; const AValue: TVector);
+procedure TForm1.OnSetCameraPosition(const ASender: TGLNavigatorSmoothChangeVector; const AValue: TGLVector);
 begin
   if ASender = FCameraSmoothAnimator_AbsPos then
     GLCamera.AbsolutePosition := AValue
@@ -248,7 +248,7 @@ end;
 //OrbitToPos Usage
 procedure TForm1.btnOrbitToPosClick(Sender: TObject);
 var
-  lTargetPosition: TVector;
+  lTargetPosition: TGLVector;
 begin
   GetInput(TButton(Sender));
   lTargetPosition := dcSphere.LocalToAbsolute(PointMake(DextX, DextY, DextZ));
@@ -258,7 +258,7 @@ end;
 
 procedure TForm1.btnOrbitToPosAdvClick(Sender: TObject);
 var
-  lTargetPosition: TVector;
+  lTargetPosition: TGLVector;
 begin
   GetInput(TButton(Sender));
   lTargetPosition := dcSphere.LocalToAbsolute(PointMake(DextX, DextY, DextZ));
@@ -355,7 +355,7 @@ var
   lAngle: Single; // In radians.
   lTime: Single;
   lNeedToRecalculateZoom: Boolean;
-  lTargetPosition: TVector;
+  lTargetPosition: TGLVector;
 begin
   GetInput(TButton(Sender));
 
@@ -393,7 +393,7 @@ procedure TForm1.btSmoothOrbitToPosAdvClick(Sender: TObject);
 var
   lAngle: Single; // In radians.
   lTime: Single;
-  lTargetPosition: TVector;
+  lTargetPosition: TGLVector;
 begin
   GetInput(TButton(Sender));
 

+ 1 - 1
Demos/Delphi/interface/CameraFm.pas

@@ -74,7 +74,7 @@ procedure TFormCamera.GLSceneViewer1MouseMove(Sender: TObject;
   Shift: TShiftState; X, Y: Integer);
 var
   dx, dy: Integer;
-  v: TVector;
+  v: TGLVector;
 begin
   // calculate delta since last move or last mousedown
   dx := mdx - X;

+ 6 - 6
Demos/Delphi/interface/GizmoexFm.pas

@@ -159,7 +159,7 @@ type
     procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
     procedure SpeedButton1Click(Sender: TObject);
     procedure ComboBox3Change(Sender: TObject);
-    function MouseWorldPos(const X, Y: Integer; isy: boolean = false): TVector;
+    function MouseWorldPos(const X, Y: Integer; isy: boolean = false): TGLVector;
     procedure ComboBox4Change(Sender: TObject);
     procedure SpeedButton6MouseDown(Sender: TObject; Button: TMouseButton;
       Shift: TShiftState; X, Y: Integer);
@@ -175,9 +175,9 @@ type
   public
      
     mx, my: Integer;
-    MousePos,LostMousePos: TVector;
+    MousePos,LostMousePos: TGLVector;
     MouseMoving: boolean;
-    pos: TVector;
+    pos: TGLVector;
     FObj: TGLBaseSceneObject;
     procedure UpdateTreeView;
   end;
@@ -192,7 +192,7 @@ implementation
 
 {$R *.dfm}
 
-procedure SettingsObj(Obj: TGLBaseSceneObject; Step: Integer; Length: TVector);
+procedure SettingsObj(Obj: TGLBaseSceneObject; Step: Integer; Length: TGLVector);
 begin
   if (Obj is TGLCube) then
   with (Obj as TGLCube) do
@@ -238,9 +238,9 @@ begin
    end;
 end;
 
-function TFormGizmoEx.MouseWorldPos(const X, Y: Integer; isy: boolean = false): TVector;
+function TFormGizmoEx.MouseWorldPos(const X, Y: Integer; isy: boolean = false): TGLVector;
 var
-  v: TVector;
+  v: TGLVector;
   InvertedY: Integer;
 begin
   InvertedY := Viewer.Height - Y;

+ 1 - 1
Demos/Delphi/meshes/ActorProxyFm.pas

@@ -112,7 +112,7 @@ end;
 
 procedure TFormActorProxy.DoRaycastStuff;
 var
-   rayStart, rayVector, iPoint, iNormal : TVector;
+   rayStart, rayVector, iPoint, iNormal : TGLVector;
 begin
      SetVector(rayStart, GLCamera1.AbsolutePosition);
      SetVector(rayVector, GLSceneViewer1.Buffer.ScreenToVector(

+ 1 - 1
Demos/Delphi/meshes/ActorTwocamFm.pas

@@ -215,7 +215,7 @@ procedure TFormActorTwocam.AddMushrooms;
 var
    i : Integer;
    proxy : TGLProxyObject;
-   s : TVector;
+   s : TGLVector;
    f : Single;
 begin
    // spawn some more mushrooms using proxy objects

+ 1 - 1
Demos/Delphi/meshes/MushroomFm.pas

@@ -86,7 +86,7 @@ procedure TFormMushroom.AddMushrooms;
 var
    i : Integer;
    proxy : TGLProxyObject;
-   s : TVector;
+   s : TGLVector;
    f : Single;
 begin
    // spawn some more mushrooms using proxy objects

+ 1 - 1
Demos/Delphi/meshes/ShadedTerrainFm.pas

@@ -146,7 +146,7 @@ end;
 procedure TFormShadedTerrain.GLBumpmapHDS1NewTilePrepared(Sender: TGLBumpmapHDS;
   heightData: TGLHeightData; normalMapMaterial: TGLLibMaterial);
 var
-  Vec: TVector;
+  Vec: TGLVector;
 begin
   heightData.MaterialName := normalMapMaterial.Name;
   normalMapMaterial.Texture2Name := 'contrast';//'details', 'texture' or 'contrast';

+ 1 - 1
Demos/Delphi/meshes/TerrainFm.pas

@@ -327,7 +327,7 @@ end;
 
 procedure TFormTerrain.TISoundTimer(Sender: TObject);
 var
-  wolfPos: TVector;
+  wolfPos: TGLVector;
   c, s: Single;
 begin
   if not GLSMBASS1.Active then

+ 2 - 2
Demos/Delphi/meshes/TilesFm.pas

@@ -76,7 +76,7 @@ type
      
     mx, my: Integer;
     tileX, tileY: Integer;
-    mip, translateOffset: TVector;
+    mip, translateOffset: TGLVector;
     translating: Boolean;
   end;
 
@@ -141,7 +141,7 @@ end;
 procedure TFormTiles.GLCadencer1Progress(Sender: TObject;
   const deltaTime, newTime: Double);
 var
-  ip: TVector;
+  ip: TGLVector;
   mp: TPoint;
   shiftDown: Boolean;
 begin

+ 5 - 4
Demos/Delphi/movements/Objmove.dpr

@@ -1,13 +1,14 @@
-{ : Moving objects with the mouse.
+(*
+  Moving objects with the mouse.
 
-  In this demo you can move the two cubes around by picking and dragging
+  In this demo you can move the cubes around by picking and dragging
   them. This showcases the use of ScreenVectorIntersectXxxx functions.
 
   You can also use the numeric keypad to move/zoom the camera and the arrow
   to move the selected object around.
 
-  (Based on Rado Stoyanov's test project)
-}
+  // Based on Rado Stoyanov's test project
+*)
 program Objmove;
 
 uses

+ 44 - 55
Demos/Delphi/movements/ObjmoveFm.dfm

@@ -2,8 +2,8 @@ object FormObjmove: TFormObjmove
   Left = 87
   Top = 128
   Caption = 'Moving Objects with Mouse'
-  ClientHeight = 407
-  ClientWidth = 571
+  ClientHeight = 469
+  ClientWidth = 628
   Color = clBtnFace
   ParentFont = True
   KeyPreview = True
@@ -12,16 +12,17 @@ object FormObjmove: TFormObjmove
   OnCreate = FormCreate
   OnKeyPress = FormKeyPress
   OnKeyUp = FormKeyUp
+  OnMouseWheel = FormMouseWheel
   PixelsPerInch = 96
   TextHeight = 13
   object Scn: TGLSceneViewer
     Left = 161
     Top = 0
-    Width = 410
-    Height = 407
-    Camera = GLCamera1
+    Width = 467
+    Height = 450
+    Camera = GLCamera
     Buffer.BackgroundColor = clBackground
-    FieldOfView = 25.000000000000000000
+    FieldOfView = 27.545242309570310000
     PenAsTouch = False
     Align = alClient
     OnMouseDown = ScnMouseDown
@@ -33,64 +34,39 @@ object FormObjmove: TFormObjmove
     Left = 0
     Top = 0
     Width = 161
-    Height = 407
+    Height = 450
     Align = alLeft
     BevelOuter = bvNone
     TabOrder = 1
     object Label2: TLabel
-      Left = 0
-      Top = 26
-      Width = 161
-      Height = 26
-      Align = alTop
-      Caption = 'Select and move with the mouse any of the two cubes.'
-      ShowAccelChar = False
-      WordWrap = True
-      ExplicitWidth = 158
-    end
-    object Label1: TLabel
       Left = 0
       Top = 0
-      Width = 161
-      Height = 13
+      Width = 158
+      Height = 26
       Align = alTop
-      Caption = 'Author: Rado Stoyanov'
+      Caption = 'Select and move with the mouse any of the cubes.'
       ShowAccelChar = False
       WordWrap = True
-      ExplicitWidth = 114
     end
     object Label3: TLabel
       Left = 0
-      Top = 52
-      Width = 161
+      Top = 26
+      Width = 150
       Height = 26
       Align = alTop
       Caption = 'Default movement is on the XY plane.'
       ShowAccelChar = False
       WordWrap = True
-      ExplicitWidth = 150
     end
     object Label4: TLabel
       Left = 0
-      Top = 78
-      Width = 161
+      Top = 52
+      Width = 145
       Height = 26
       Align = alTop
       Caption = 'Shift + Drag moves on the XZ plane.'
       ShowAccelChar = False
       WordWrap = True
-      ExplicitWidth = 145
-    end
-    object Label5: TLabel
-      Left = 0
-      Top = 13
-      Width = 161
-      Height = 13
-      Align = alTop
-      Caption = '[email protected]'
-      ShowAccelChar = False
-      WordWrap = True
-      ExplicitWidth = 142
     end
     object Button1: TButton
       Left = 618
@@ -102,7 +78,7 @@ object FormObjmove: TFormObjmove
     end
     object GroupBox1: TGroupBox
       Left = 0
-      Top = 104
+      Top = 78
       Width = 161
       Height = 43
       Align = alTop
@@ -121,6 +97,13 @@ object FormObjmove: TFormObjmove
       end
     end
   end
+  object StatusBar1: TStatusBar
+    Left = 0
+    Top = 450
+    Width = 628
+    Height = 19
+    Panels = <>
+  end
   object GLScene1: TGLScene
     Left = 296
     Top = 8
@@ -129,7 +112,21 @@ object FormObjmove: TFormObjmove
       Position.Coordinates = {00000000000000005C8F82BF0000803F}
       CubeSize = {00000040000000400AD7233C}
     end
-    object TopLight1: TGLLightSource
+    object GLCamera: TGLCamera
+      DepthOfView = 1000.000000000000000000
+      FocalLength = 917.929199218750000000
+      NearPlaneBias = 0.001000000047497451
+      TargetObject = DummyCube
+      Position.Coordinates = {0000B8410000A041000080410000803F}
+      Direction.Coordinates = {2EF964BF2EF9E43E0000000000000000}
+      Up.Coordinates = {00000000000000000000803F00000000}
+    end
+    object DummyCube: TGLDummyCube
+      Position.Coordinates = {0000803F0000803F0000003F0000803F}
+      CubeSize = 0.200000002980232200
+      EdgeColor.Color = {DEDD5D3FDEDD5D3FE9E8683F0000803F}
+    end
+    object TopLight: TGLLightSource
       Ambient.Color = {0000003F0000003F0000003F0000803F}
       ConstAttenuation = 0.800000011920929000
       Diffuse.Color = {EAE9693FEAE9693FEAE9693F0000803F}
@@ -150,11 +147,6 @@ object FormObjmove: TFormObjmove
       Position.Coordinates = {CDCCCCBECDCCCC3E000000BF0000803F}
       CubeSize = {0000803E0000803E0000803E}
     end
-    object DummyCube1: TGLDummyCube
-      Position.Coordinates = {0000803F0000803F0000003F0000803F}
-      CubeSize = 0.200000002980232200
-      EdgeColor.Color = {DEDD5D3FDEDD5D3FE9E8683F0000803F}
-    end
     object XArrow: TGLArrowLine
       Direction.Coordinates = {0000803F000000000000000000000000}
       Position.Coordinates = {CDCCCC3D000080BF000080BF0000803F}
@@ -234,15 +226,6 @@ object FormObjmove: TFormObjmove
         'Z')
       CharacterRange = stcrAlphaNum
     end
-    object GLCamera1: TGLCamera
-      DepthOfView = 1000.000000000000000000
-      FocalLength = 917.929199218750000000
-      NearPlaneBias = 0.001000000047497451
-      TargetObject = DummyCube1
-      Position.Coordinates = {0000B8410000A041000080410000803F}
-      Direction.Coordinates = {2EF964BF2EF9E43E0000000000000000}
-      Up.Coordinates = {00000000000000000000803F00000000}
-    end
     object TopText: TGLHUDText
       Position.Coordinates = {0000A0400000A040000000000000803F}
       BitmapFont = GLWindowsBitmapFont1
@@ -265,4 +248,10 @@ object FormObjmove: TFormObjmove
     Left = 448
     Top = 8
   end
+  object GLSmoothNavigator1: TGLSmoothNavigator
+    MovingObject = DummyCube
+    MoveAroundParams.TargetObject = DummyCube
+    Left = 448
+    Top = 72
+  end
 end

+ 40 - 29
Demos/Delphi/movements/ObjmoveFm.pas

@@ -13,55 +13,58 @@ uses
   Vcl.Graphics,
   Vcl.StdCtrls,
   Vcl.ExtCtrls,
-  
-  GLS.Scene, 
-  GLS.Objects, 
-  GLS.Graph, 
-  GLS.Collision, 
-  GLS.Texture, 
+  Vcl.ComCtrls,
+
+  GLS.Scene,
+  GLS.Objects,
+  GLS.Graph,
+  GLS.Collision,
+  GLS.Texture,
   GLS.VectorTypes,
-  GLS.VectorGeometry, 
-  GLS.VectorFileObjects, 
+  GLS.VectorGeometry,
+  GLS.VectorFileObjects,
   GLS.SceneViewer,
-  GLS.SpaceText, 
-  GLS.GeomObjects, 
-  GLS.Color, 
- 
-  GLS.Coordinates, 
-  GLS.BaseClasses, 
-  GLS.BitmapFont, 
+  GLS.SpaceText,
+  GLS.GeomObjects,
+  GLS.Color,
+
+  GLS.Coordinates,
+  GLS.BaseClasses,
+  GLS.BitmapFont,
   GLS.WindowsFont,
-  GLS.HUDObjects, 
-  GLS.SimpleNavigation;
+  GLS.HUDObjects,
+  GLS.SimpleNavigation,
+  GLS.Navigator,
+  GLS.SmoothNavigator;
 
 type
   TFormObjmove = class(TForm)
     GLScene1: TGLScene;
     Scn: TGLSceneViewer;
-    GLCamera1: TGLCamera;
-    DummyCube1: TGLDummyCube;
+    GLCamera: TGLCamera;
+    DummyCube: TGLDummyCube;
     ZArrow: TGLArrowLine;
     XArrow: TGLArrowLine;
     YArrow: TGLArrowLine;
     Cube1: TGLCube;
-    TopLight1: TGLLightSource;
+    TopLight: TGLLightSource;
     Cube2: TGLCube;
     Floor: TGLCube;
     Panel1: TPanel;
     Button1: TButton;
     Label2: TLabel;
-    Label1: TLabel;
     TxtX: TGLSpaceText;
     TxtY: TGLSpaceText;
     Label3: TLabel;
     Label4: TLabel;
-    Label5: TLabel;
     TxtZ: TGLSpaceText;
     TopText: TGLHUDText;
     GLWindowsBitmapFont1: TGLWindowsBitmapFont;
     ObjText: TGLHUDText;
     GroupBox1: TGroupBox;
     ShowAxes: TCheckBox;
+    StatusBar1: TStatusBar;
+    GLSmoothNavigator1: TGLSmoothNavigator;
     procedure ScnMouseDown(Sender: TObject; Button: TMouseButton;
       Shift: TShiftState; X, Y: Integer);
     procedure ScnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
@@ -72,11 +75,12 @@ type
     procedure FormCreate(Sender: TObject);
     procedure ShowAxesClick(Sender: TObject);
   private
-    lastMouseWorldPos: TVector;
+    lastMouseWorldPos: TGLVector;
+    Cube: TGLCube;
     movingOnZ: Boolean;
     CurrentPick: TGLCustomSceneObject;
     ScnMouseMoveCnt: Integer;
-    function MouseWorldPos(X, Y: Integer): TVector;
+    function MouseWorldPos(X, Y: Integer): TGLVector;
     procedure UpdateHudText;
     procedure ProcessPick(pick: TGLBaseSceneObject);
   end;
@@ -94,11 +98,18 @@ implementation
 procedure TFormObjmove.FormCreate(Sender: TObject);
 begin
   UpdateHudText;
+  Cube := TGLCube.CreateAsChild(DummyCube);
+  Cube.CubeDepth := 0.2;
+  Cube.CubeWidth := 0.2;
+  Cube.CubeHeight := 0.2;
+  Cube.Position.X := 1;
+  Cube.Position.Y := 1;
+  Cube.Position.Z := 1;
 end;
 
-function TFormObjmove.MouseWorldPos(X, Y: Integer): TVector;
+function TFormObjmove.MouseWorldPos(X, Y: Integer): TGLVector;
 var
-  v: TVector;
+  v: TGLVector;
 begin
   Y := Scn.Height - Y;
   if Assigned(CurrentPick) then
@@ -159,7 +170,7 @@ end;
 procedure TFormObjmove.ScnMouseMove(Sender: TObject; Shift: TShiftState;
   X, Y: Integer);
 var
-  newPos: TVector;
+  newPos: TGLVector;
 begin
   Inc(ScnMouseMoveCnt);
   Assert(ScnMouseMoveCnt < 2);
@@ -193,12 +204,12 @@ begin
   // Note that 1 wheel-step induces a WheelDelta of 120,
   // this code adjusts the distance to target with a 10% per wheel-step ratio
   if WheelDelta <> 0 then
-    GLCamera1.AdjustDistanceToTarget(Power(1.1, -WheelDelta / 120));
+    GLCamera.AdjustDistanceToTarget(Power(1.1, -WheelDelta / 120));
 end;
 
 procedure TFormObjmove.FormKeyPress(Sender: TObject; var Key: Char);
 begin
-  with GLCamera1 do
+  with GLCamera do
     case Key of
       '2':  MoveAroundTarget(3, 0);
       '4':  MoveAroundTarget(0, -3);

+ 1 - 1
Demos/Delphi/movements/PongFm.pas

@@ -106,7 +106,7 @@ end;
 procedure TFormPong.GLCadencer1Progress(Sender: TObject; const deltaTime,
   newTime: Double);
 var
-	newBallPos : TVector;
+	newBallPos : TGLVector;
 begin
 	// gameOver is True as soon as the ball is behind the pad, but we don't end
 	// the game immediately so the user can realize he has lost

+ 1 - 1
Demos/Delphi/movements/TweeningFm.pas

@@ -55,7 +55,7 @@ type
     Initial1iValue: Integer;
     Initial1sValue: single;
     Initial3fValue: TAffineVector;
-    Initial4fValue: TVector;
+    Initial4fValue: TGLVector;
     InitialPtValue: TSinglePoint;
   end;
 

+ 2 - 2
Demos/Delphi/physics/NewtonDensityFm.pas

@@ -83,7 +83,7 @@ function BuoyancyPlaneCallback(const collisionID: Integer; context: Pointer;
   cdecl;
 var
   BodyMatrix: TMatrix;
-  PlaneEquation: TVector;
+  PlaneEquation: TGLVector;
   pv: PVector;
   MyForm: TFormNewtonDensity;
 begin
@@ -151,7 +151,7 @@ end;
 procedure TFormNewtonDensity.MyForceAndTorqueDensity(const cbody: PNewtonBody;
   timestep: NGDFloat; threadIndex: Integer);
 var
-  worldGravity: TVector;
+  worldGravity: TGLVector;
   NGDDyn: TGLNGDDynamic;
   fluidDensity, fluidLinearViscosity, fluidAngularViscosity: Single;
 begin

+ 2 - 2
Demos/Delphi/physics/NewtonJointsFm.pas

@@ -67,7 +67,7 @@ type
     procedure FormCreate(Sender: TObject);
   private
      
-       point3d, FPaneNormal: TVector;
+       point3d, FPaneNormal: TGLVector;
 
   public
      
@@ -90,7 +90,7 @@ end;
 procedure TFormNewtonJoints.GLCadencer1Progress(Sender: TObject;
   const deltaTime, newTime: Double);
   var
-  point2d, GotoPoint3d: TVector;
+  point2d, GotoPoint3d: TGLVector;
 begin
   GLNGDManager1.Step(deltaTime);
 

+ 2 - 2
Demos/Delphi/physics/NewtonMousePickFm.pas

@@ -48,7 +48,7 @@ type
     procedure FormCreate(Sender: TObject);
   private
      
-    point3d, FPaneNormal: TVector;
+    point3d, FPaneNormal: TGLVector;
   public
      
     pickjoint: TGLNGDJoint;
@@ -101,7 +101,7 @@ end;
 procedure TFormNewtonMousePick.GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState;
   X, Y: Integer);
 var
-  point2d, GotoPoint3d: TVector;
+  point2d, GotoPoint3d: TGLVector;
 begin
 
   if ssLeft in Shift then

+ 2 - 2
Demos/Delphi/physics/NewtonWalkCarryFm.pas

@@ -101,7 +101,7 @@ var
 
   FPickedSceneObject: TGLBaseSceneObject;
   NGDDynamicBehav: TGLNGDDynamic;
-  point3d, FPaneNormal: TVector;
+  point3d, FPaneNormal: TGLVector;
   M_X, M_Y: Integer;
   Maps_Count: Integer;
   OnAir, OnGround: boolean;
@@ -133,7 +133,7 @@ var
   peak_Up, peak_Down: boolean;
   ray, GP3D, result_GP3D: TVector4f;
   j: Integer;
-  point2d, GotoPoint3d: TVector;
+  point2d, GotoPoint3d: TGLVector;
   key_space: boolean;
   cp: TPoint;
   visible_cursor: boolean;

+ 6 - 6
Demos/Delphi/physics/NewtonWalkShootFm.pas

@@ -183,10 +183,10 @@ procedure TFormNewtonWalkShoot.GLSceneViewer1MouseDown(Sender: TObject; Button:
   Shift: TShiftState; X, Y: Integer);
 var
   Ball: TGLSphere;
-  delta: Tvector;
+  delta: TGLVector;
 
   PickedSceneObject: TGLBaseSceneObject;
-  point3d: Tvector;
+  point3d: TGLVector;
   MyX, MyY: Integer;
 begin
   // Shoot a Bullet
@@ -250,8 +250,8 @@ end;
 
 procedure TFormNewtonWalkShoot.MoveCam(const deltaTime, newTime: Double);
 var
-  f: Tvector;
-  fup, fdn, flf, frg: Tvector;
+  f: TGLVector;
+  fup, fdn, flf, frg: TGLVector;
   Bup, Bdn, Blf, Brg: Boolean;
   NGDDyn: TGLNGDDynamic;
 begin
@@ -308,8 +308,8 @@ end;
 
 procedure TFormNewtonWalkShoot.MoveGrab;
 var
-  point3d: Tvector;
-  delta: Tvector;
+  point3d: TGLVector;
+  delta: TGLVector;
 begin
   // Move the object in 3 unit front of GLCamera1.TargetObject
   if IsKeyDown(VK_MBUTTON) then

+ 2 - 2
Demos/Delphi/physics/OdeConveyorFm.pas

@@ -71,8 +71,8 @@ type
     procedure FDirChange(Sender: TObject);
     procedure AddODECubeClick(Sender: TObject);
   private
-    FUserDirection: TVector;
-    FDirectionVector: TVector;
+    FUserDirection: TGLVector;
+    FDirectionVector: TGLVector;
   end;
 
 var

+ 33 - 22
Demos/Delphi/rendering/FogFm.pas

@@ -16,14 +16,13 @@ uses
   Vcl.ExtCtrls,
   Vcl.StdCtrls,
 
-  
   GLS.Scene,
   GLS.VectorTypes,
   GLS.Objects,
   GLS.Cadencer,
   GLS.SceneViewer,
   GLS.Texture,
- 
+
   GLS.Material,
   GLS.Coordinates,
   GLS.Utils,
@@ -55,11 +54,14 @@ type
     CBApplyToBackground: TCheckBox;
     LFogDensity: TLabel;
     EFogDensity: TEdit;
-    procedure GLSceneViewer1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-    procedure GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
+    procedure GLSceneViewer1MouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState;
+      X, Y: Integer);
     procedure CBFogEnableClick(Sender: TObject);
     procedure SEFogStartChange(Sender: TObject);
-    procedure SFogColorMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+    procedure SFogColorMouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
     procedure RGFogModeClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);
     procedure CBApplyToBackgroundClick(Sender: TObject);
@@ -69,8 +71,8 @@ type
     procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
       WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
   private
-    MX: integer;
-    MY: integer;
+    MX: Integer;
+    MY: Integer;
     procedure ApplyFogSettings;
   public
   end;
@@ -86,7 +88,8 @@ implementation
 //
 procedure TFormFog.ApplyFogSettings;
 begin
-  with GLSceneViewer1.Buffer.FogEnvironment do begin
+  with GLSceneViewer1.Buffer.FogEnvironment do
+  begin
     FogMode := TFogMode(RGFogMode.ItemIndex);
     FogDistance := TFogDistance(RGFogDistance.ItemIndex);
     FogColor.AsWinColor := SFogColor.Brush.Color;
@@ -101,7 +104,8 @@ end;
 
 // glsceneviewer1mousedown
 //
-procedure TFormFog.GLSceneViewer1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+procedure TFormFog.GLSceneViewer1MouseDown(Sender: TObject;
+  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 begin
   MX := X;
   MY := Y;
@@ -109,7 +113,8 @@ end;
 
 // glsceneviewer1mousemove
 //
-procedure TFormFog.GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
+procedure TFormFog.GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState;
+  X, Y: Integer);
 begin
   if Shift <> [] then
     GLSceneViewer1.Camera.MoveAroundTarget(MY - Y, MX - X);
@@ -136,9 +141,11 @@ end;
 
 // sgfogcolormousedown
 //
-procedure TFormFog.SFogColorMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+procedure TFormFog.SFogColorMouseDown(Sender: TObject; Button: TMouseButton;
+  Shift: TShiftState; X, Y: Integer);
 begin
-  if ColorDialog1.Execute then begin
+  if ColorDialog1.Execute then
+  begin
     SFogColor.Brush.Color := ColorDialog1.Color;
     ApplyFogSettings;
   end;
@@ -157,13 +164,13 @@ procedure TFormFog.FormCreate(Sender: TObject);
 const
   cSpacing = 2;
   cEdgeLength = 0.7;
-  cNb = 4;
+  cNb = 5;
 
 var
-  X: integer;
-  Y: integer;
-  Z: integer;
-  Cube : TGLCube;
+  X: Integer;
+  Y: Integer;
+  Z: Integer;
+  Cube: TGLCube;
 
 begin
   SetGLSceneMediaDir();
@@ -171,7 +178,8 @@ begin
   for X := -cNb to cNb do
     for Y := -cNb to cNb do
       for Z := -cNb to cNb do
-        if (X and Y and Z) <> 0 then begin
+        if (X and Y and Z) <> 0 then
+        begin
           Cube := TGLCube(GLDummyCube1.AddNewChild(TGLCube));
           Cube.Material.MaterialLibrary := GLMaterialLibrary1;
           Cube.Material.LibMaterialName := 'glscene';
@@ -186,7 +194,7 @@ end;
 procedure TFormFog.FormMouseWheel(Sender: TObject; Shift: TShiftState;
   WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
 begin
-	GLCamera1.AdjustDistanceToTarget(Power(1.1, WheelDelta/120));
+  GLCamera1.AdjustDistanceToTarget(Power(1.1, WheelDelta / 120));
   Handled := true
 end;
 
@@ -201,7 +209,8 @@ end;
 //
 procedure TFormFog.CBTextureEnabledClick(Sender: TObject);
 begin
-  GLMaterialLibrary1.Materials[0].Material.Texture.Enabled := CBTextureEnabled.Checked;
+  GLMaterialLibrary1.Materials[0].Material.Texture.Enabled :=
+    CBTextureEnabled.Checked;
 end;
 
 // cbtextureignorefogclick
@@ -209,9 +218,11 @@ end;
 procedure TFormFog.CBTextureIgnoreFogClick(Sender: TObject);
 begin
   if CBTextureIgnoreFog.Checked then
-    GLMaterialLibrary1.Materials[0].Material.MaterialOptions := GLMaterialLibrary1.Materials[0].Material.MaterialOptions + [moIgnoreFog]
+    GLMaterialLibrary1.Materials[0].Material.MaterialOptions :=
+      GLMaterialLibrary1.Materials[0].Material.MaterialOptions + [moIgnoreFog]
   else
-    GLMaterialLibrary1.Materials[0].Material.MaterialOptions := GLMaterialLibrary1.Materials[0].Material.MaterialOptions - [moIgnoreFog];
+    GLMaterialLibrary1.Materials[0].Material.MaterialOptions :=
+      GLMaterialLibrary1.Materials[0].Material.MaterialOptions - [moIgnoreFog];
 end;
 
 procedure TFormFog.EFogStartChange(Sender: TObject);

+ 4 - 4
Demos/Delphi/specialsFX/CandlesFm.dfm

@@ -12,13 +12,12 @@ object FormCandles: TFormCandles
   Font.Style = []
   OldCreateOrder = False
   Position = poScreenCenter
-  WindowState = wsMaximized
   OnResize = FormResize
   PixelsPerInch = 96
   TextHeight = 13
   object GLSceneViewer1: TGLSceneViewer
     Left = 0
-    Top = 0
+    Top = 29
     Width = 442
     Height = 296
     Camera = GLCamera1
@@ -32,11 +31,11 @@ object FormCandles: TFormCandles
   end
   object TrackBar1: TTrackBar
     Left = 0
-    Top = 296
+    Top = 0
     Width = 442
     Height = 29
     Hint = 'Wind'
-    Align = alBottom
+    Align = alTop
     Max = 20
     Min = -20
     ParentShowHint = False
@@ -44,6 +43,7 @@ object FormCandles: TFormCandles
     ShowHint = True
     TabOrder = 1
     OnChange = TrackBar1Change
+    ExplicitTop = 302
   end
   object GLScene1: TGLScene
     Left = 32

+ 1 - 1
Demos/Delphi/specialsFX/WaterPlaneFm.pas

@@ -83,7 +83,7 @@ implementation
 
 procedure TFormWaterPlane.ClickWater(X, Y: Integer);
 var
-  ip: TVector;
+  ip: TGLVector;
 begin
   // create a ripple in the pond on a right-mousebutton click
 

+ 1 - 3
Demos/Delphi/sprites/ImposterFm.pas

@@ -60,9 +60,7 @@ type
     procedure CBShowImposterClick(Sender: TObject);
     procedure CBShowTeapotClick(Sender: TObject);
   private
-     
   public
-     
     impBuilder: TGLStaticImposterBuilder;
     renderPoint: TGLRenderPoint;
     mx, my: Integer;
@@ -98,7 +96,7 @@ end;
 procedure TFormImposter.GLDirectOpenGL1Render(Sender: TObject;
   var rci: TGLRenderContextInfo);
 var
-  camPos, pos: TVector;
+  camPos, pos: TGLVector;
   imp: TImposter;
   X, Y: Integer;
 begin

+ 2 - 2
Demos/Delphi/utilities/ArchiveEdit/Main.dfm

@@ -42,7 +42,7 @@ object Form1: TForm1
     OnKeyDown = TreeViewKeyDown
   end
   object ListView: TListView
-    Left = 176
+    Left = 175
     Top = 8
     Width = 365
     Height = 466
@@ -72,7 +72,7 @@ object Form1: TForm1
   end
   object GLSceneViewer1: TGLSceneViewer
     Left = 8
-    Top = 312
+    Top = 311
     Width = 161
     Height = 161
     Camera = GLCamera1

+ 23 - 17
Demos/Delphi/utilities/ArchiveEdit/Main.pas

@@ -19,8 +19,6 @@ uses
   Vcl.Imaging.Jpeg,
 
   GLS.ArchiveManager,
-  GLS.FilePAK,
-  GLS.FileZLIB,
   GLS.SceneViewer,
 
   GLS.BaseClasses,
@@ -36,6 +34,10 @@ uses
   GLS.State,
   GLS.CompositeImage,
   // FileFormats 3D
+  GLS.FileJPEG,
+  GLS.FilePAK,
+  GLS.FileZLIB,
+
   GLS.FileMS3D,
   GLS.File3DS,
   GLS.FileMD2,
@@ -45,7 +47,9 @@ uses
   GLS.FileSMD,
   GLS.FileTGA,
   GLS.FilePNG,
-  GLS.FileDDS;
+  GLS.FileDDS,
+
+  GLS.Utils;
 
 type
   TForm1 = class(TForm)
@@ -129,13 +133,28 @@ var
 implementation
 //-------------------------------------
 
-uses 
+uses
   FolderDialog, 
   FolderSelect;
 
 {$R *.dfm}
 {.$R icons.res}
 
+procedure TForm1.FormCreate(Sender: TObject);
+var
+  Bmp: TBitmap;
+begin
+  SetGLSceneMediaDir();
+  Bmp := TBitmap.Create;
+  Bmp.LoadFromResourceName(HInstance, 'ICONS');
+  ImageList1.AddMasked(Bmp, clWhite);
+  Bmp.Free;
+  ArchiveManager := TGLSArchiveManager.Create(Self);
+  Archive := ArchiveManager.Archives.Add;
+  vMenu := None1;
+end;
+
+
 procedure TForm1.AddNode(text: string; node: TTreeNode);
 var
   s: string;
@@ -265,19 +284,6 @@ begin
     end;
 end;
 
-procedure TForm1.FormCreate(Sender: TObject);
-var
-  Bmp: TBitmap;
-begin
-  Bmp := TBitmap.Create;
-  Bmp.LoadFromResourceName(HInstance, 'ICONS');
-  ImageList1.AddMasked(Bmp, clWhite);
-  Bmp.Free;
-  ArchiveManager := TGLSArchiveManager.Create(Self);
-  Archive := ArchiveManager.Archives.Add;
-  vMenu := None1;
-end;
-
 procedure TForm1.TreeViewCollapsing(Sender: TObject; node: TTreeNode;
   var AllowCollapse: Boolean);
 begin

+ 1 - 0
Source/GLS.BaseClasses.pas

@@ -170,3 +170,4 @@ end;
 end.
 
 
+

+ 8 - 8
Source/GLS.Canvas.pas

@@ -17,7 +17,7 @@ uses
   System.Classes,
   System.Math,
   Vcl.Graphics,
-  
+
   GLS.OpenGLTokens,
   GLS.VectorGeometry,
   GLS.Color,
@@ -27,7 +27,7 @@ uses
 
 type
 
-  TArcDirection = (adCounterClockWise, adClockWise);
+  TGLArcDirection = (adCounterClockWise, adClockWise);
 
   (* A simple Canvas-like interface for OpenGL.
      This class implements a small "shell" for 2D operations in OpenGL,
@@ -46,8 +46,8 @@ type
     FCurrentPos: TAffineVector;
     FPenColor: TColor;
     FPenWidth: Integer;
-    FCurrentPenColorVector: TVector;
-    FArcDirection: TArcDirection;
+    FCurrentPenColorVector: TGLVector;
+    FArcDirection: TGLArcDirection;
   protected
     procedure BackupOpenGLStates;
     procedure StartPrimitive(const primitiveType: Integer);
@@ -66,7 +66,7 @@ type
       UpdateCurrentPos: Boolean); overload;
   public
     constructor Create(bufferSizeX, bufferSizeY: Integer;
-      const baseTransform: TMatrix); overload;
+      const baseTransform: TGLMatrix); overload;
     constructor Create(bufferSizeX, bufferSizeY: Integer); overload;
     destructor Destroy; override;
     (* Stops the current internal primitive.
@@ -161,7 +161,7 @@ type
     procedure ArcTo(const x1, y1, x2, y2: Single; AngleBegin, AngleEnd: Single); overload;
     procedure RoundRect(const x1, y1, x2, y2, xr, yr: Integer); overload;
     procedure RoundRect(const x1, y1, x2, y2, xr, yr: Single); overload;
-    property ArcDirection: TArcDirection read FArcDirection write FArcDirection;
+    property ArcDirection: TGLArcDirection read FArcDirection write FArcDirection;
   end;
 
 //-------------------------------------------------------------
@@ -178,9 +178,9 @@ const
 // ------------------
 
 constructor TGLCanvas.Create(bufferSizeX, bufferSizeY: Integer;
-  const baseTransform: TMatrix);
+  const baseTransform: TGLMatrix);
 var
-  PM: TMatrix;
+  PM: TGLMatrix;
 begin
   FBufferSizeX := bufferSizeX;
   FBufferSizeY := bufferSizeY;

+ 10 - 11
Source/GLS.Imposter.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLS.Imposter;
 
 (* Imposter building and rendering implementation for GLScene *)
@@ -37,17 +36,17 @@ uses
 type
   (* Imposter rendering options.
      Following options are supported:
-      impoBlended : the imposters are transparently blended during renders,
-     this will smooth their edges but requires them to be rendered sorted
-     from back to front
-      impoAlphaTest : alpha test is used to eliminate transparent pixels,
-     the alpha treshold is adjusted by the AlphaTreshold property
+     impoBlended : the imposters are transparently blended during renders,
+      this will smooth their edges but requires them to be rendered sorted
+      from back to front
+     impoAlphaTest : alpha test is used to eliminate transparent pixels,
+      the alpha treshold is adjusted by the AlphaTreshold property
       impoNearestFiltering : use nearest texture filtering (the alternative
-     is linear filtering)
-      impoPerspectiveCorrection : activates a special imposter rendering
-     projection suitable for distorting the sprites when seen from a level
-     angle of view with a wide focal camera (think trees/grass when walking
-     in a forest), if not active, the imposter sprites are camera-facing *)
+      is linear filtering)
+     impoPerspectiveCorrection : activates a special imposter rendering
+      projection suitable for distorting the sprites when seen from a level
+      angle of view with a wide focal camera (think trees/grass when walking
+      in a forest), if not active, the imposter sprites are camera-facing *)
   TImposterOption = (impoBlended, impoAlphaTest, impoNearestFiltering,
     impoPerspectiveCorrection);
   TImposterOptions = set of TImposterOption;

+ 2 - 6
Source/GLS.Isosurface.pas

@@ -1,9 +1,7 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLS.Isosurface;
-
 (*
   Polygonising a scalar field by construction of isosurfaces
   Algorithms
@@ -27,7 +25,6 @@ unit GLS.Isosurface;
   - Simple Data Structures to store Mesh. Vertices are calculated and stored twice
   or even more often.
 *)
-
 interface
 
 {$I GLScene.inc}
@@ -51,7 +48,6 @@ type
   TSingle3DArray = array of array of array of Single;
   TVertexArray = array of TVector3f;
   TIntegerArray = array of Integer;
-
   TGLMarchingCube = class(TObject)
   private
     FIsoValue: TxScalarValue;
@@ -156,10 +152,10 @@ type
       var AData: TSingle3DArray); overload;
     destructor Destroy(); override;
     procedure AssignData(Xdim, Ydim, Zdim: Integer; var AData: TSingle3DArray);
-    { Launch Marching Cubes }
+    // Launch Marching Cubes
     procedure MarchingCubes(Isovalue: Single; out Vertices: TVertexArray;
       out Triangles: TIntegerArray; isPolished: boolean);
-    { Launch Marching Tetrahedra }
+    // Launch Marching Tetrahedra
     procedure MarchingTetrahedra(Isovalue: Single; out Vertices: TVertexArray;
       out Triangles: TIntegerArray; isPolished: boolean);
   end;

+ 2 - 2
Source/GLS.Logger.pas

@@ -997,7 +997,7 @@ begin
 end;
 
 procedure TLogSession.DisplayLog;
-{$IFDEF LINUX}
+{$IF Defined(LINUX) and not Defined(CROSSVCL)}
 var
   lProcess: TProcess;
 {$ENDIF}
@@ -1006,7 +1006,7 @@ begin
   ShellExecute(0, 'open', 'C:\WINDOWS\notepad.exe',
     PChar(FCurrentLogFileName), nil, 1);
 {$ENDIF}
-{$IFDEF LINUX}
+{$IF Defined(LINUX) and not Defined(CROSSVCL)}
   lProcess := TProcess.Create(nil);
   lProcess.CommandLine := 'gedit ' + FCurrentLogFileName;
   lProcess.Execute;

+ 2 - 1
Source/GLS.Mesh.pas

@@ -6,7 +6,8 @@ unit GLS.Mesh;
 
 (*
   This unit is for simple meshes and legacy support,
-  GLS.VectorFileObjects implements more efficient (though more complex) mesh tools.
+  GLS.VectorFileObjects implements more efficient
+  (though more complex) mesh tools.
 *)
 
 interface

+ 6 - 6
Source/GLS.Objects.pas

@@ -477,8 +477,8 @@ type
     property Options: TGLLinesOptions read FOptions write SetOptions;
   end;
 
-  TCubePart = (cpTop, cpBottom, cpFront, cpBack, cpLeft, cpRight);
-  TCubeParts = set of TCubePart;
+  TGLCubePart = (cpTop, cpBottom, cpFront, cpBack, cpLeft, cpRight);
+  TGLCubeParts = set of TGLCubePart;
 
   (* A simple cube object.
     This cube use the same material for each of its faces, ie. all faces look
@@ -487,11 +487,11 @@ type
   TGLCube = class(TGLSceneObject)
   private
     FCubeSize: TAffineVector;
-    FParts: TCubeParts;
+    FParts: TGLCubeParts;
     FNormalDirection: TGLNormalDirection;
     function GetCubeWHD(const Index: Integer): TGLFloat; inline;
     procedure SetCubeWHD(Index: Integer; aValue: TGLFloat); inline;
-    procedure SetParts(aValue: TCubeParts); inline;
+    procedure SetParts(aValue: TGLCubeParts); inline;
     procedure SetNormalDirection(aValue: TGLNormalDirection); inline;
   protected
     procedure DefineProperties(Filer: TFiler); override;
@@ -516,7 +516,7 @@ type
       stored False;
     property NormalDirection: TGLNormalDirection read FNormalDirection
       write SetNormalDirection default ndOutside;
-    property Parts: TCubeParts read FParts write SetParts
+    property Parts: TGLCubeParts read FParts write SetParts
       default [cpTop, cpBottom, cpFront, cpBack, cpLeft, cpRight];
   end;
 
@@ -2520,7 +2520,7 @@ begin
   end;
 end;
 
-procedure TGLCube.SetParts(aValue: TCubeParts);
+procedure TGLCube.SetParts(aValue: TGLCubeParts);
 begin
   if aValue <> FParts then
   begin

+ 23 - 0
Source/GLS.OpenGLAdapter.pas

@@ -23,8 +23,20 @@ uses
   GLS.VectorTypes;
 
 const
+  {$IFDEF CROSSVCL}
+    {$IF Defined(LINUX)}
+    opengl32 = 'libGL.so';
+    glu32 = 'libGLU.so.1';
+    {$ELSEIF Defined(MACOS)}
+    opengl32 = '/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib';
+    glu32 = '/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib';
+    {$ELSE}
+    Unsupported platform 
+    {$ENDIF}
+  {$ELSE}
   opengl32 = 'OpenGL32.dll';
   glu32 = 'GLU32.dll';
+  {$ENDIF}
 
 type
   EOpenGLError = class(Exception);
@@ -1766,8 +1778,17 @@ end;
 {$ENDIF} //MSWINDOWS
 
 function GetProcAddressGLLib(ProcName: PAnsiChar): Pointer;
+{$IFDEF CROSSVCL}
+var
+  UniProcName: string;
+{$ENDIF}
 begin
+  {$IFDEF CROSSVCL}
+  UniProcName := ProcName;
+  Result := getProcAddress(GLHandle, PChar(UniProcName));
+  {$ELSE}
   Result := getProcAddress(GLHandle, ProcName);
+  {$ENDIF}
 end;
 
 var
@@ -4909,7 +4930,9 @@ end;
 initialization
 //--------------------------------------
 
+{$IFNDEF CROSSVCL}
 Set8087CW($133F);
+{$ENDIF}
 
 finalization
 

+ 6 - 18
Source/GLS.Selection.pas

@@ -1,7 +1,6 @@
 //
 // The graphics rendering engine GLScene http://glscene.org
 //
-
 unit GLS.Selection;
 
 (* Picking and selection of objects *)
@@ -14,19 +13,18 @@ uses
   Winapi.OpenGL,
   System.SysUtils,
   System.Classes,
-   
-  GLS.OpenGLTokens, 
-  GLS.Context, 
-  GLS.VectorLists, 
+
+  GLS.OpenGLTokens,
+  GLS.Context,
+  GLS.VectorLists,
   GLS.VectorGeometry,
-  GLS.BaseClasses, 
+  GLS.BaseClasses,
   GLS.PersistentClasses;
 
- const
+const
   MAX_OBJECT_STACK_DEPTH = 512;
 
 type
-
   TPickSubObjects = array of LongInt;
 
   TPickRecord = class
@@ -86,7 +84,6 @@ type
 
   TGLBaseSelectTechniqueClass = class of TGLBaseSelectTechnique;
 
-
   TGLSelectRenderModeTechnique = class(TGLBaseSelectTechnique)
   private
     FBuffer: array of Cardinal;
@@ -180,14 +177,12 @@ begin
     Sort(@Comparefunction);
 end;
 
-
 procedure TGLPickList.Clear;
 begin
   DoClean;
   inherited;
 end;
 
-
 function TGLPickList.FindObject(aObject: TObject): Integer;
 var
   i: Integer;
@@ -204,19 +199,16 @@ begin
     end;
 end;
 
-
 function TGLPickList.GetFar(aValue: Integer): Single;
 begin
   Result := TPickRecord(Items[AValue]).ZMax;
 end;
 
-
 function TGLPickList.GetHit(aValue: Integer): TObject;
 begin
   Result := TPickRecord(Items[AValue]).AObject;
 end;
 
-
 function TGLPickList.GetNear(aValue: Integer): Single;
 begin
   Result := TPickRecord(Items[AValue]).ZMin;
@@ -227,7 +219,6 @@ begin
   Result := TPickRecord(Items[AValue]).SubObjects;
 end;
 
-
 // ------------------
 // ------------------ TGLSelectRenderModeTechnique ------------------
 // ------------------
@@ -286,7 +277,6 @@ begin
     AList := TGLPickList.Create(psDefault)
   else
     AList.Clear;
-
   if FHits > -1 then
   begin
     next := 0;
@@ -329,6 +319,4 @@ begin
   Inc(FCurrentName);
 end;
 
- 
-
 end.

+ 2 - 0
Source/GLS.Sound.pas

@@ -20,6 +20,8 @@ uses
   GLS.VectorGeometry,
   GLS.Cadencer,
   GLS.BaseClasses,
+  GLS.FileMP3,
+  GLS.FileWAV,
   GLS.Utils;
 
 {$I GLScene.inc}

+ 4 - 0
Source/GLS.VectorGeometry.pas

@@ -72,7 +72,11 @@ type
 
   PExtendedVector = ^TExtendedVector;
   PExtendedArray = PExtendedVector;
+  {$IFDEF CROSSVCL}
+  TExtendedVector = array [0 .. cMaxArray div 2] of Extended;
+  {$ELSE}
   TExtendedVector = array [0 .. cMaxArray] of Extended;
+  {$ENDIF}
 
   PPointerVector = ^TPointerVector;
   PPointerArray = PPointerVector;

+ 19 - 2
Source/GLS.VectorTypes.pas

@@ -25,6 +25,9 @@ uses
   Winapi.Windows;
 
 type
+
+// ===========  OpenGL types  ============
+
   TGLboolean = BYTEBOOL;
   PGLboolean = ^TGLboolean;
 
@@ -101,7 +104,8 @@ type
   TGLhalf = WORD;
   PGLhalf = ^TGLhalf;
 
-  // Windows types
+// ========= Windows types ==============
+
   PWGLswap = ^TWGLswap;
   _WGLSWAP = packed record
     hdc: HDC;
@@ -112,13 +116,18 @@ type
   WGLSWAP = _WGLSWAP;
   HPBUFFERARB = Integer;
 
-  (* These OpenCL's types are compatible with cl_context and cl_event *)
+(* These OpenCL's types are compatible with cl_context and cl_event *)
+
   T_cl_context = record end;
   P_cl_context = ^T_cl_context;
   T_cl_event = record end;
   P_cl_event = ^T_cl_event;
 
+
 type
+
+// ===========  Vectors  ============
+
   //2
   TVector2d = record
     case Integer of
@@ -293,6 +302,11 @@ type
       1 : (X,Y,Z,W: Pointer);
   end;
 
+  PGLVector = ^TGLVector;
+  TGLVector = TVector4f;
+
+// ===========  Matrices  ============
+
  TMatrix2d = record
     case Integer of
       0 : (V: array[0..1] of TVector2d);
@@ -433,6 +447,9 @@ type
       1 : (M : TMatrix4f);
   end;
 
+  PGLMatrix = ^TMatrix4f;
+  TGLMatrix = TMatrix4f;
+
 //-----------------------------------------------  
 implementation
 //-----------------------------------------------  

+ 8 - 6
Source/GLScene.inc

@@ -80,12 +80,14 @@
   {$DEFINE SUPPORT_WGL}
 {$ENDIF}
 
-{$IFDEF LINUX}
-  {$UNDEF SUPPORT_WGL}
-  {$UNDEF USE_ASM}
-  {$DEFINE UNIX}
-  {$DEFINE SUPPORT_GLX}
-  {$DEFINE X11_SUPPORT}
+{$IFNDEF CROSSVCL}
+  {$IFDEF LINUX}
+    {$UNDEF SUPPORT_WGL}
+    {$UNDEF USE_ASM}
+    {$DEFINE UNIX}
+    {$DEFINE SUPPORT_GLX}
+    {$DEFINE X11_SUPPORT}
+  {$ENDIF}
 {$ENDIF}
 
 // .NET

+ 4 - 2
Source/Physics.NGDRagdoll.pas

@@ -121,6 +121,8 @@ var
   p1, p2: TVector4f;
   d: single;
   Collision: PNewtonCollision;
+  CollisionBox, CollisionCylinder, CollisionSphere: PNewtonCollision;
+  Matrix: Tmatrix;
   CollisionOffsetMatrix: TMatrix; // For cone capsule and cylinder
 begin
   collisionOffsetMatrix := IdentityHmgMatrix;
@@ -138,9 +140,9 @@ begin
   SetLength(joints, actor.Skeleton.BoneCount - 1);
   for i := 0 to actor.Skeleton.BoneCount - 2 do
   begin
-    p1 := actor.Skeleton.BoneByID(i).GlobalMatrix.w;
+    p1 := actor.Skeleton.BoneByID(i).GlobalMatrix.W;
     if actor.Skeleton.BoneByID(i).BoneCount > 1 then
-      p2 := actor.Skeleton.BoneByID(i).Items[0].GlobalMatrix.w
+      p2 := actor.Skeleton.BoneByID(i).Items[0].GlobalMatrix.W
     else
       p2 := p1;
     p1 := VectorTransform(p1, actor.AbsoluteMatrix);