소스 검색

CUDA package updated

GLScene 5 년 전
부모
커밋
c8657ead7e
56개의 변경된 파일2636개의 추가작업 그리고 1341개의 파일을 삭제
  1. 1 1
      Packages/Win32/GLScene_Parallel_DT.dpk
  2. 1 1
      Packages/Win32/GLScene_Parallel_DT.dproj
  3. 15 15
      Packages/Win32/GLScene_Parallel_RT.dpk
  4. 15 15
      Packages/Win32/GLScene_Parallel_RT.dproj
  5. 233 1
      Packages/Win64/GLScene_Cg_RT.dproj
  6. 233 1
      Packages/Win64/GLScene_Parallel_RT.dproj
  7. 233 1
      Packages/Win64/GLScene_Physics_RT.dproj
  8. 233 1
      Packages/Win64/GLScene_RT.dproj
  9. 240 8
      Packages/Win64/GLScene_SDL_RT.dproj
  10. 238 6
      Packages/Win64/GLScene_Sounds_RT.dproj
  11. 3 3
      Source/FCUDAEditor.pas
  12. 200 173
      Source/FileGL2.pas
  13. 3 1
      Source/FileHDRImage.pas
  14. 3 1
      Source/FileLWObjects.pas
  15. 3 3
      Source/FileMD2.pas
  16. 3 3
      Source/FileMD3.pas
  17. 3 3
      Source/GLAVIRecorder.pas
  18. 33 34
      Source/GLBSP.pas
  19. 5 6
      Source/GLBaseClasses.pas
  20. 50 51
      Source/GLBitmapFont.pas
  21. 3 3
      Source/GLBlur.pas
  22. 3 3
      Source/GLBumpMapping.pas
  23. 9 7
      Source/GLBumpShader.pas
  24. 11 10
      Source/GLBumpmapHDS.pas
  25. 5 4
      Source/GLConsole.pas
  26. 8 6
      Source/GLContext.pas
  27. 22 22
      Source/GLCrossPlatform.pas
  28. 52 47
      Source/GLDCE.pas
  29. 2 9
      Source/GLDCEMisc.pas
  30. 3 2
      Source/GLDynamicTexture.pas
  31. 7 7
      Source/GLExtrusion.pas
  32. 14 11
      Source/GLFeedback.pas
  33. 5 6
      Source/GLFilePGM.pas
  34. 3 2
      Source/GLObjectManager.pas
  35. 0 2
      Source/GLParticleFX.pas
  36. 10 8
      Source/GLS.CUDA.pas
  37. 7 7
      Source/GLS.CUDAApi.pas
  38. 7 2
      Source/GLS.CUDACompiler.pas
  39. 14 15
      Source/GLS.CUDAContext.pas
  40. 4 3
      Source/GLS.CUDADataAccess.pas
  41. 10 9
      Source/GLS.CUDAFFTPlan.pas
  42. 45 49
      Source/GLS.CUDAFourierTransform.pas
  43. 7 6
      Source/GLS.CUDAGraphics.pas
  44. 17 18
      Source/GLS.CUDAParallelPrimitives.pas
  45. 8 6
      Source/GLS.CUDAParser.pas
  46. 211 238
      Source/GLS.CUDARuntime.pas
  47. 39 40
      Source/GLS.CUDAUtility.pas
  48. 8 6
      Source/GLS.OpenCL.pas
  49. 9 7
      Source/GLS.OpenCL_GL.pas
  50. 7 5
      Source/GLS.OpenCL_Platform.pas
  51. 8 8
      Source/GLS.ParallelRegister.pas
  52. 208 191
      Source/GLSoundFileObjects.pas
  53. 92 95
      Source/GLTexture.pas
  54. 3 3
      Source/GLUtils.pas
  55. 24 152
      Source/GLWindows.pas
  56. 3 4
      Source/dwsVectorGeometry.pas

+ 1 - 1
Packages/Win32/GLScene_Parallel_DT.dpk

@@ -40,6 +40,6 @@ requires
 
 contains
   FCUDAEditor in '..\..\Source\FCUDAEditor.pas' {GLSCUDAEditorForm},
-  GLSParallelRegister in '..\..\Source\GLSParallelRegister.pas';
+  GLS.ParallelRegister in '..\..\Source\GLS.ParallelRegister.pas';
 
 end.

+ 1 - 1
Packages/Win32/GLScene_Parallel_DT.dproj

@@ -125,7 +125,7 @@
         <DCCReference Include="..\..\Source\FCUDAEditor.pas">
             <Form>GLSCUDAEditorForm</Form>
         </DCCReference>
-        <DCCReference Include="..\..\Source\GLSParallelRegister.pas"/>
+        <DCCReference Include="..\..\Source\GLS.ParallelRegister.pas"/>
         <RcCompile Include="..\..\Resources\GLSceneParallel.rc">
             <Form>GLSceneParallel.res</Form>
         </RcCompile>

+ 15 - 15
Packages/Win32/GLScene_Parallel_RT.dpk

@@ -37,22 +37,22 @@ requires
   GLScene_RT;
 
 contains
-  GLSCUDARuntime in '..\..\Source\GLSCUDARuntime.pas',
-  GLSCUDAFourierTransform in '..\..\Source\GLSCUDAFourierTransform.pas',
-  GLSCUDAUtility in '..\..\Source\GLSCUDAUtility.pas',
-  GLSCUDACompiler in '..\..\Source\GLSCUDACompiler.pas',
-  GLSCUDAContext in '..\..\Source\GLSCUDAContext.pas',
-  GLSCUDAFFTPlan in '..\..\Source\GLSCUDAFFTPlan.pas',
-  GLSCUDAGraphics in '..\..\Source\GLSCUDAGraphics.pas',
-  GLSCUDAParser in '..\..\Source\GLSCUDAParser.pas',
-  GLSCUDADataAccess in '..\..\Source\GLSCUDADataAccess.pas',
-  GLSCUDAParallelPrimitives in '..\..\Source\GLSCUDAParallelPrimitives.pas',
-  GLSCUDA in '..\..\Source\GLSCUDA.pas',
-  GLSCUDAApi in '..\..\Source\GLSCUDAApi.pas',
+  GLS.CUDARuntime in '..\..\Source\GLS.CUDARuntime.pas',
+  GLS.CUDAFourierTransform in '..\..\Source\GLS.CUDAFourierTransform.pas',
+  GLS.CUDAUtility in '..\..\Source\GLS.CUDAUtility.pas',
+  GLS.CUDACompiler in '..\..\Source\GLS.CUDACompiler.pas',
+  GLS.CUDAContext in '..\..\Source\GLS.CUDAContext.pas',
+  GLS.CUDAFFTPlan in '..\..\Source\GLS.CUDAFFTPlan.pas',
+  GLS.CUDAGraphics in '..\..\Source\GLS.CUDAGraphics.pas',
+  GLS.CUDAParser in '..\..\Source\GLS.CUDAParser.pas',
+  GLS.CUDADataAccess in '..\..\Source\GLS.CUDADataAccess.pas',
+  GLS.CUDAParallelPrimitives in '..\..\Source\GLS.CUDAParallelPrimitives.pas',
+  GLS.CUDA in '..\..\Source\GLS.CUDA.pas',
+  GLS.CUDAApi in '..\..\Source\GLS.CUDAApi.pas',
   GLFilePGM in '..\..\Source\GLFilePGM.pas',
-  OpenCL in '..\..\Source\OpenCL.pas',
-  OpenCL_GL in '..\..\Source\OpenCL_GL.pas',
-  OpenCL_Platform in '..\..\Source\OpenCL_Platform.pas';
+  GLS.OpenCL in '..\..\Source\GLS.OpenCL.pas',
+  GLS.OpenCL_GL in '..\..\Source\GLS.OpenCL_GL.pas',
+  GLS.OpenCL_Platform in '..\..\Source\GLS.OpenCL_Platform.pas';
 
 end.
 

+ 15 - 15
Packages/Win32/GLScene_Parallel_RT.dproj

@@ -127,22 +127,22 @@
         <DCCReference Include="vcl.dcp"/>
         <DCCReference Include="xmlrtl.dcp"/>
         <DCCReference Include="GLScene_RT.dcp"/>
-        <DCCReference Include="..\..\Source\GLSCUDARuntime.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDAFourierTransform.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDAUtility.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDACompiler.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDAContext.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDAFFTPlan.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDAGraphics.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDAParser.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDADataAccess.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDAParallelPrimitives.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDA.pas"/>
-        <DCCReference Include="..\..\Source\GLSCUDAApi.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDARuntime.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDAFourierTransform.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDAUtility.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDACompiler.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDAContext.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDAFFTPlan.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDAGraphics.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDAParser.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDADataAccess.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDAParallelPrimitives.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDA.pas"/>
+        <DCCReference Include="..\..\Source\GLS.CUDAApi.pas"/>
         <DCCReference Include="..\..\Source\GLFilePGM.pas"/>
-        <DCCReference Include="..\..\Source\OpenCL.pas"/>
-        <DCCReference Include="..\..\Source\OpenCL_GL.pas"/>
-        <DCCReference Include="..\..\Source\OpenCL_Platform.pas"/>
+        <DCCReference Include="..\..\Source\GLS.OpenCL.pas"/>
+        <DCCReference Include="..\..\Source\GLS.OpenCL_GL.pas"/>
+        <DCCReference Include="..\..\Source\GLS.OpenCL_Platform.pas"/>
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <CfgParent>Base</CfgParent>

+ 233 - 1
Packages/Win64/GLScene_Cg_RT.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Package</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win64</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -194,12 +194,20 @@
                         <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">
@@ -212,12 +220,26 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeMipsFile">
                     <Platform Name="Android">
                         <RemoteDir>library\lib\mips</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\mips</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeX86File"/>
                 <DeployClass Name="AndroidServiceOutput">
@@ -225,84 +247,216 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashImageDef">
                     <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="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">
@@ -372,6 +526,9 @@
                     <Platform Name="Android">
                         <Operation>0</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>0</Operation>
+                    </Platform>
                     <Platform Name="iOSDevice32">
                         <Operation>0</Operation>
                     </Platform>
@@ -424,6 +581,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch768">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -435,6 +602,26 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch320">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -446,6 +633,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_Launch3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch640">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -468,10 +665,33 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectAndroidManifest">
                     <Platform Name="Android">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -486,6 +706,7 @@
                 <DeployClass Name="ProjectiOSDeviceResourceRules"/>
                 <DeployClass Name="ProjectiOSEntitlements"/>
                 <DeployClass Name="ProjectiOSInfoPList"/>
+                <DeployClass Name="ProjectiOSLaunchScreen"/>
                 <DeployClass Name="ProjectiOSResource">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -515,6 +736,10 @@
                         <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>
@@ -537,6 +762,12 @@
                         <Operation>0</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="ProjectOutput_Android32">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectUWPManifest">
                     <Platform Name="Win32">
                         <Operation>1</Operation>
@@ -574,6 +805,7 @@
                 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
+                <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 233 - 1
Packages/Win64/GLScene_Parallel_RT.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Package</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win64</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -200,12 +200,20 @@
                         <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">
@@ -218,12 +226,26 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeMipsFile">
                     <Platform Name="Android">
                         <RemoteDir>library\lib\mips</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\mips</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeX86File"/>
                 <DeployClass Name="AndroidServiceOutput">
@@ -231,84 +253,216 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashImageDef">
                     <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="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">
@@ -378,6 +532,9 @@
                     <Platform Name="Android">
                         <Operation>0</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>0</Operation>
+                    </Platform>
                     <Platform Name="iOSDevice32">
                         <Operation>0</Operation>
                     </Platform>
@@ -430,6 +587,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch768">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -441,6 +608,26 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch320">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -452,6 +639,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_Launch3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch640">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -474,10 +671,33 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectAndroidManifest">
                     <Platform Name="Android">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -492,6 +712,7 @@
                 <DeployClass Name="ProjectiOSDeviceResourceRules"/>
                 <DeployClass Name="ProjectiOSEntitlements"/>
                 <DeployClass Name="ProjectiOSInfoPList"/>
+                <DeployClass Name="ProjectiOSLaunchScreen"/>
                 <DeployClass Name="ProjectiOSResource">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -521,6 +742,10 @@
                         <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>
@@ -543,6 +768,12 @@
                         <Operation>0</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="ProjectOutput_Android32">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectUWPManifest">
                     <Platform Name="Win32">
                         <Operation>1</Operation>
@@ -580,6 +811,7 @@
                 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
+                <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 233 - 1
Packages/Win64/GLScene_Physics_RT.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Package</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win64</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -219,12 +219,20 @@
                         <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">
@@ -237,12 +245,26 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeMipsFile">
                     <Platform Name="Android">
                         <RemoteDir>library\lib\mips</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\mips</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeX86File"/>
                 <DeployClass Name="AndroidServiceOutput">
@@ -250,84 +272,216 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashImageDef">
                     <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="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">
@@ -397,6 +551,9 @@
                     <Platform Name="Android">
                         <Operation>0</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>0</Operation>
+                    </Platform>
                     <Platform Name="iOSDevice32">
                         <Operation>0</Operation>
                     </Platform>
@@ -449,6 +606,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch768">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -460,6 +627,26 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch320">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -471,6 +658,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_Launch3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch640">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -493,10 +690,33 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectAndroidManifest">
                     <Platform Name="Android">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -511,6 +731,7 @@
                 <DeployClass Name="ProjectiOSDeviceResourceRules"/>
                 <DeployClass Name="ProjectiOSEntitlements"/>
                 <DeployClass Name="ProjectiOSInfoPList"/>
+                <DeployClass Name="ProjectiOSLaunchScreen"/>
                 <DeployClass Name="ProjectiOSResource">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -540,6 +761,10 @@
                         <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>
@@ -562,6 +787,12 @@
                         <Operation>0</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="ProjectOutput_Android32">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectUWPManifest">
                     <Platform Name="Win32">
                         <Operation>1</Operation>
@@ -599,6 +830,7 @@
                 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
+                <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 233 - 1
Packages/Win64/GLScene_RT.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Package</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win64</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -463,12 +463,20 @@
                         <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">
@@ -481,12 +489,26 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeMipsFile">
                     <Platform Name="Android">
                         <RemoteDir>library\lib\mips</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\mips</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeX86File"/>
                 <DeployClass Name="AndroidServiceOutput">
@@ -494,84 +516,216 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashImageDef">
                     <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="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">
@@ -641,6 +795,9 @@
                     <Platform Name="Android">
                         <Operation>0</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>0</Operation>
+                    </Platform>
                     <Platform Name="iOSDevice32">
                         <Operation>0</Operation>
                     </Platform>
@@ -693,6 +850,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch768">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -704,6 +871,26 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch320">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -715,6 +902,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_Launch3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch640">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -737,10 +934,33 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectAndroidManifest">
                     <Platform Name="Android">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -755,6 +975,7 @@
                 <DeployClass Name="ProjectiOSDeviceResourceRules"/>
                 <DeployClass Name="ProjectiOSEntitlements"/>
                 <DeployClass Name="ProjectiOSInfoPList"/>
+                <DeployClass Name="ProjectiOSLaunchScreen"/>
                 <DeployClass Name="ProjectiOSResource">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -784,6 +1005,10 @@
                         <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>
@@ -806,6 +1031,12 @@
                         <Operation>0</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="ProjectOutput_Android32">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectUWPManifest">
                     <Platform Name="Win32">
                         <Operation>1</Operation>
@@ -843,6 +1074,7 @@
                 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
+                <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
             </Deployment>
             <ModelSupport>False</ModelSupport>
         </BorlandProject>

+ 240 - 8
Packages/Win64/GLScene_SDL_RT.dproj

@@ -7,14 +7,14 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Package</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win64</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
     </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Android' and '$(Base)'=='true') or '$(Base_Android)'!=''">
-        <Base_Android>true</Base_Android>
+    <PropertyGroup Condition="('$(Platform)'=='Android64' and '$(Base)'=='true') or '$(Base_Android64)'!=''">
+        <Base_Android64>true</Base_Android64>
         <CfgParent>Base</CfgParent>
         <Base>true</Base>
     </PropertyGroup>
@@ -60,7 +60,10 @@
         <DCC_N>false</DCC_N>
         <DCC_S>false</DCC_S>
     </PropertyGroup>
-    <PropertyGroup Condition="'$(Base_Android)'!=''">
+    <PropertyGroup Condition="'$(Base_Android64)'!=''">
+        <Base_Android>true</Base_Android>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
         <EnabledSysJars>android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar</EnabledSysJars>
         <BT_BuildType>Debug</BT_BuildType>
         <VerInfo_Keys>package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=</VerInfo_Keys>
@@ -141,10 +144,7 @@
                 </Excluded_Packages>
             </Delphi.Personality>
             <Platforms>
-                <Platform value="Android">False</Platform>
-                <Platform value="iOSDevice32">False</Platform>
-                <Platform value="iOSDevice64">False</Platform>
-                <Platform value="iOSSimulator">False</Platform>
+                <Platform value="Android64">False</Platform>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win64">True</Platform>
             </Platforms>
@@ -168,12 +168,20 @@
                         <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">
@@ -186,96 +194,242 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeMipsFile">
                     <Platform Name="Android">
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashImageDef">
                     <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="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">
@@ -345,6 +499,9 @@
                     <Platform Name="Android">
                         <Operation>0</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>0</Operation>
+                    </Platform>
                     <Platform Name="iOSDevice32">
                         <Operation>0</Operation>
                     </Platform>
@@ -397,6 +554,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch768">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -408,6 +575,26 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch320">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -419,6 +606,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_Launch3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch640">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -441,10 +638,33 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectAndroidManifest">
                     <Platform Name="Android">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -459,6 +679,7 @@
                 <DeployClass Name="ProjectiOSDeviceResourceRules"/>
                 <DeployClass Name="ProjectiOSEntitlements"/>
                 <DeployClass Name="ProjectiOSInfoPList"/>
+                <DeployClass Name="ProjectiOSLaunchScreen"/>
                 <DeployClass Name="ProjectiOSResource">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -488,6 +709,10 @@
                         <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>
@@ -510,6 +735,12 @@
                         <Operation>0</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="ProjectOutput_Android32">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectUWPManifest">
                     <Platform Name="Win32">
                         <Operation>1</Operation>
@@ -547,6 +778,7 @@
                 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
+                <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 238 - 6
Packages/Win64/GLScene_Sounds_RT.dproj

@@ -7,7 +7,7 @@
         <TargetedPlatforms>3</TargetedPlatforms>
         <AppType>Package</AppType>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.5</ProjectVersion>
+        <ProjectVersion>19.0</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win64</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -195,20 +195,20 @@
                 <Platform value="Win64">True</Platform>
             </Platforms>
             <Deployment Version="3">
-                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64\GLScene_Sounds_RT.bpl" Configuration="Debug" Class="ProjectOutput">
+                <DeployFile LocalName="..\..\bpl\Win64\GLScene_Sounds_RT.bpl" Configuration="Release" Class="ProjectOutput">
                     <Platform Name="Win64">
                         <RemoteName>GLScene_Sounds_RT.bpl</RemoteName>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl\GLScene_Sounds_RT.bpl" Configuration="Debug" Class="ProjectOutput">
-                    <Platform Name="Win32">
+                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64\GLScene_Sounds_RT.bpl" Configuration="Debug" Class="ProjectOutput">
+                    <Platform Name="Win64">
                         <RemoteName>GLScene_Sounds_RT.bpl</RemoteName>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\bpl\Win64\GLScene_Sounds_RT.bpl" Configuration="Release" Class="ProjectOutput">
-                    <Platform Name="Win64">
+                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl\GLScene_Sounds_RT.bpl" Configuration="Debug" Class="ProjectOutput">
+                    <Platform Name="Win32">
                         <RemoteName>GLScene_Sounds_RT.bpl</RemoteName>
                         <Overwrite>true</Overwrite>
                     </Platform>
@@ -226,12 +226,20 @@
                         <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">
@@ -244,12 +252,26 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeMipsFile">
                     <Platform Name="Android">
                         <RemoteDir>library\lib\mips</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\mips</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidLibnativeX86File"/>
                 <DeployClass Name="AndroidServiceOutput">
@@ -257,84 +279,216 @@
                         <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">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="AndroidSplashImageDef">
                     <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="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">
@@ -404,6 +558,9 @@
                     <Platform Name="Android">
                         <Operation>0</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>0</Operation>
+                    </Platform>
                     <Platform Name="iOSDevice32">
                         <Operation>0</Operation>
                     </Platform>
@@ -456,6 +613,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPad_Launch768">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -467,6 +634,26 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPad_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_Launch2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch320">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -478,6 +665,16 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_Launch3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="iPhone_Launch640">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -500,10 +697,33 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark2x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
+                <DeployClass Name="iPhone_LaunchDark3x">
+                    <Platform Name="iOSDevice64">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                    <Platform Name="iOSSimulator">
+                        <RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectAndroidManifest">
                     <Platform Name="Android">
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="Android64">
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectiOSDeviceDebug">
                     <Platform Name="iOSDevice32">
@@ -518,6 +738,7 @@
                 <DeployClass Name="ProjectiOSDeviceResourceRules"/>
                 <DeployClass Name="ProjectiOSEntitlements"/>
                 <DeployClass Name="ProjectiOSInfoPList"/>
+                <DeployClass Name="ProjectiOSLaunchScreen"/>
                 <DeployClass Name="ProjectiOSResource">
                     <Platform Name="iOSDevice32">
                         <Operation>1</Operation>
@@ -547,6 +768,10 @@
                         <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>
@@ -569,6 +794,12 @@
                         <Operation>0</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="ProjectOutput_Android32">
+                    <Platform Name="Android64">
+                        <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectUWPManifest">
                     <Platform Name="Win32">
                         <Operation>1</Operation>
@@ -606,6 +837,7 @@
                 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
+                <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
             </Deployment>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 3 - 3
Source/FCUDAEditor.pas

@@ -29,9 +29,9 @@ uses
   DesignIntf,
   VCLEditors,
   GLStrings,
-  GLSCUDA, 
-  GLSCUDAFFTPlan, 
-  GLSCUDAGraphics;
+  GLS.CUDA,
+  GLS.CUDAFFTPlan,
+  GLS.CUDAGraphics;
 
 type
   TGLSCUDAEditorForm = class(TForm)

+ 200 - 173
Source/FileGL2.pas

@@ -1,18 +1,20 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit FileGL2;
+
 (*
-	Ghoul2 (GLM/GLA) file format loading structures 
-	Note: Also referred to as MDX (MDXM/MDXA) format in C source. 
+  Ghoul2 (GLM/GLA) file format loading structures
+  Note: Also referred to as MDX (MDXM/MDXA) format in C source.
 *)
-unit FileGL2;
 
 interface
 
 uses
   System.Classes,
   System.SysUtils,
-   
+
   GLVectorTypes,
   GLVectorGeometry;
 
@@ -57,93 +59,87 @@ type
   end;
 
   TGLMTriangle = record
-    indices : array[0..2] of integer;
+    indices: array [0 .. 2] of integer;
   end;
 
   TGLMVertex = record
-    normal,
-    vertex                     : TVector3f;
-    uiNumWeightsAndBoneIndices : Cardinal; // packed int
-    BoneWeightings             : array[0..3] of Byte;
+    normal, vertex: TVector3f;
+    uiNumWeightsAndBoneIndices: Cardinal; // packed int
+    BoneWeightings: array [0 .. 3] of Byte;
   end;
 
   TGLMSurface = record
-    SurfaceHeader : TGLMSurfaceHeader;
-    Triangles      : array of TGLMTriangle;
-    Vertices       : array of TGLMVertex;
-    TexCoords      : array of TVector2f;
-    BoneReferences : array of Integer;
+    SurfaceHeader: TGLMSurfaceHeader;
+    Triangles: array of TGLMTriangle;
+    Vertices: array of TGLMVertex;
+    TexCoords: array of TVector2f;
+    BoneReferences: array of integer;
   end;
 
   TGLMLODInfo = record
-    ofsEnd : integer;
+    ofsEnd: integer;
   end;
 
   TGLMLODSurfaceOffsets = array of integer;
 
   TGLMLODs = record
-    LODInfo           : TGLMLODInfo;
-    LODSurfaceOffsets : TGLMLODSurfaceOffsets;
-    Surfaces          : array of TGLMSurface;
+    LODInfo: TGLMLODInfo;
+    LODSurfaceOffsets: TGLMLODSurfaceOffsets;
+    Surfaces: array of TGLMSurface;
   end;
 
   TGLAHeader = record
-    fileID     : array[0..3] of char;
-    version    : integer;
-    Name       : array[0..63] of char;
-    fScale     : single;
-    numFrames,
-    ofsFrames,
-    numBones,
-    ofsCompBonePool,
-    ofsSkel,
-    ofsEnd     : integer;
+    fileID: array [0 .. 3] of char;
+    version: integer;
+    name: array [0 .. 63] of char;
+    fScale: single;
+    numFrames, ofsFrames, numBones, ofsCompBonePool, ofsSkel, ofsEnd: integer;
   end;
 
-  TGLABone = array[0..2] of TVector4f;
-  TGLACompQuatBone = array[0..6] of Word; {14 bytes}
+  TGLABone = array [0 .. 2] of TVector4f;
+  TGLACompQuatBone = array [0 .. 6] of Word; { 14 bytes }
 
   TGLASkeletonOffsets = array of integer;
 
   TGLASkeleton = record
-    name           : array[0..63] of char;
-    flags          : LongWord;
-    parent         : Integer;
-    BasePoseMat,
-    BasePoseMatInv : TGLABone;
-    numChildren    : Integer;
-    children       : array of Integer;
+    name: array [0 .. 63] of char;
+    flags: LongWord;
+    parent: integer;
+    BasePoseMat, BasePoseMatInv: TGLABone;
+    numChildren: integer;
+    children: array of integer;
   end;
 
   // Ghoul2 Model structure
   TFileGLM = class
-    public
-      ModelHeader            : TGLMHeader;
-      SurfaceHeirachyOffsets : TGLMSurfaceHeirachyOffsets;
-      SurfaceHeirachy        : array of TGLMSurfaceHeirachy;
-      LODs                   : array of TGLMLODs;
-      procedure LoadFromStream(aStream : TStream);
+  public
+    ModelHeader: TGLMHeader;
+    SurfaceHeirachyOffsets: TGLMSurfaceHeirachyOffsets;
+    SurfaceHeirachy: array of TGLMSurfaceHeirachy;
+    LODs: array of TGLMLODs;
+    procedure LoadFromStream(aStream: TStream);
   end;
 
   // Ghoul2 Animation structure
   TFileGLA = class
-    public
-      AnimHeader      : TGLAHeader;
-      SkeletonOffsets : TGLASkeletonOffsets;
-      Skeleton        : array of TGLASkeleton;
-      BoneIndices     : array of Integer;
-      CompBonePool    : array of TGLACompQuatBone;
-      function GetCompressedMatrix(Frame,Bone : Integer):TGLACompQuatBone;
-      function GetUnCompressedMatrix(Frame,Bone : Integer):TMatrix;
-      procedure LoadFromStream(aStream : TStream);
+  public
+    AnimHeader: TGLAHeader;
+    SkeletonOffsets: TGLASkeletonOffsets;
+    Skeleton: array of TGLASkeleton;
+    BoneIndices: array of integer;
+    CompBonePool: array of TGLACompQuatBone;
+    function GetCompressedMatrix(Frame, Bone: integer): TGLACompQuatBone;
+    function GetUnCompressedMatrix(Frame, Bone: integer): TMatrix;
+    procedure LoadFromStream(aStream: TStream);
   end;
 
-function G2_GetVertWeights(const vert:TGLMVertex):Integer;
-function G2_GetVertBoneIndex(const vert:TGLMVertex; iWeightNum:Integer):Integer;
-function G2_GetVertBoneWeight(const vert:TGLMVertex; iWeightNum:Cardinal;
-  var fTotalWeight:Single; const iNumWeights:Cardinal):single;
+function G2_GetVertWeights(const vert: TGLMVertex): integer;
+function G2_GetVertBoneIndex(const vert: TGLMVertex;
+  iWeightNum: integer): integer;
+function G2_GetVertBoneWeight(const vert: TGLMVertex; iWeightNum: Cardinal;
+  var fTotalWeight: single; const iNumWeights: Cardinal): single;
 
-procedure MC_UnCompressQuat(var mat : TMatrix; const comp : TGLACompQuatBone);
+procedure MC_UnCompressQuat(var mat: TMatrix; const comp: TGLACompQuatBone);
 
 // ------------------------------------------------------------------
 implementation
@@ -158,49 +154,56 @@ implementation
 // static inline int G2_GetVertBoneIndex( const mdxmVertex_t *pVert, const int iWeightNum)
 // static inline float G2_GetVertBoneWeight( const mdxmVertex_t *pVert, const int iWeightNum, float &fTotalWeight, int iNumWeights )
 
-function G2_GetVertWeights(const vert:TGLMVertex):Integer;
+function G2_GetVertWeights(const vert: TGLMVertex): integer;
 begin
   // Get number of bones per vertex (0..3)+1 = (1..4)
-  result:=(vert.uiNumWeightsAndBoneIndices shr 30)+1;
+  result := (vert.uiNumWeightsAndBoneIndices shr 30) + 1;
 end;
 
-function G2_GetVertBoneIndex(const vert:TGLMVertex; iWeightNum:Integer):Integer;
+function G2_GetVertBoneIndex(const vert: TGLMVertex;
+  iWeightNum: integer): integer;
 begin
   // Extract the bone reference array index, a 5-bit integer
-  result:=(vert.uiNumWeightsAndBoneIndices shr (5*iWeightNum)) and 31;
+  result := (vert.uiNumWeightsAndBoneIndices shr (5 * iWeightNum)) and 31;
 end;
 
-function G2_GetVertBoneWeight(const vert:TGLMVertex; iWeightNum:Cardinal;
-  var fTotalWeight:Single; const iNumWeights:Cardinal):single;
+function G2_GetVertBoneWeight(const vert: TGLMVertex; iWeightNum: Cardinal;
+  var fTotalWeight: single; const iNumWeights: Cardinal): single;
 var
-  fBoneWeight : Single;
-  iTemp       : Cardinal;
+  fBoneWeight: single;
+  iTemp: Cardinal;
 begin
-  if (iWeightNum = iNumWeights-1) then begin
+  if (iWeightNum = iNumWeights - 1) then
+  begin
     // No need to calculate final weight value, return the
     // weight left over out of 1
-    fBoneWeight:=1-fTotalWeight;
-  end else begin
+    fBoneWeight := 1 - fTotalWeight;
+  end
+  else
+  begin
     // Get the initial 8-bit bone weight
-    iTemp:=vert.BoneWeightings[iWeightNum];
+    iTemp := vert.BoneWeightings[iWeightNum];
     // Get the 2-bit overflow and 'or' it to the front of the
     // weight to get 10-bit integer weight (0..1023)
-    iTemp:=iTemp or ((vert.uiNumWeightsAndBoneIndices shr (12+(iWeightNum*2))) and $300);
+    iTemp := iTemp or
+      ((vert.uiNumWeightsAndBoneIndices shr (12 + (iWeightNum * 2))) and $300);
     // Convert to floating point weight (0..1)
-    fBoneWeight:=iTemp/1023;
+    fBoneWeight := iTemp / 1023;
     // Accumulate total weight
-    fTotalWeight:=fTotalWeight+fBoneWeight;
+    fTotalWeight := fTotalWeight + fBoneWeight;
   end;
-  Result:=fBoneWeight;
+  result := fBoneWeight;
 end;
 
 // Adapted from matcomp.c
 // void MC_UnCompressQuat(float mat[3][4],const unsigned char * comp)
 
-procedure MC_UnCompressQuat(var mat : TMatrix; const comp : TGLACompQuatBone);
+procedure MC_UnCompressQuat(var mat: TMatrix; const comp: TGLACompQuatBone);
 begin
-  mat:=QuaternionToMatrix(QuaternionMake([comp[1]-32726,comp[2]-32726,comp[3]-32726],comp[0]-32726));
-  mat.V[3]:=VectorMake(comp[4]/64-512,comp[5]/64-512,comp[6]/64-512,1);
+  mat := QuaternionToMatrix(QuaternionMake([comp[1] - 32726, comp[2] - 32726,
+    comp[3] - 32726], comp[0] - 32726));
+  mat.V[3] := VectorMake(comp[4] / 64 - 512, comp[5] / 64 - 512,
+    comp[6] / 64 - 512, 1);
 end;
 
 
@@ -210,69 +213,84 @@ end;
 
 procedure TFileGLM.LoadFromStream(aStream: TStream);
 var
-  idstr   : array[0..3] of char;
-  i,j     : integer;
-  ofs,
-  LODofs  : int64;
+  idstr: array [0 .. 3] of char;
+  i, j: integer;
+  ofs, LODofs: int64;
 begin
-  aStream.Read(idstr,sizeof(idstr));
-  aStream.Position:=0;
+  aStream.Read(idstr, sizeof(idstr));
+  aStream.Position := 0;
 
-  if not (idstr='2LGM') then begin
-    raise Exception.Create(Format('Unknown or incorrect identity tag: [%s]',[idstr]));
+  if not(idstr = '2LGM') then
+  begin
+    raise Exception.Create(Format('Unknown or incorrect identity tag: [%s]',
+      [idstr]));
     exit;
   end;
 
   aStream.Read(ModelHeader,SizeOf(ModelHeader));
 
-  if ModelHeader.version<>6 then
-    raise Exception.Create(Format('Only GLM (MDXM) version 6 is supported. File is version %d.',[ModelHeader.version]));
-
-  SetLength(SurfaceHeirachyOffsets,ModelHeader.numSurfaces);
-  aStream.Read(SurfaceHeirachyOffsets[0],sizeof(Integer)*ModelHeader.numSurfaces);
-
-  SetLength(SurfaceHeirachy,ModelHeader.numSurfaces);
-  for i:=0 to ModelHeader.numSurfaces-1 do
-  with SurfaceHeirachy[i] do begin
-    aStream.Read(name,Length(name));
-    aStream.Read(flags,sizeof(LongWord));
-    aStream.Read(shader,Length(shader));
-    aStream.Read(shaderindex,sizeof(Integer));
-    aStream.Read(parentindex,sizeof(Integer));
-    aStream.Read(numChildren,sizeof(Integer));
-    if numChildren>0 then begin
-      SetLength(childIndices,numChildren);
-      aStream.Read(childIndices[0],numChildren*sizeof(Integer));
-    end else SetLength(childIndices,0);
-  end;
+  if ModelHeader.version <> 6 then
+    raise Exception.Create
+      (Format('Only GLM (MDXM) version 6 is supported. File is version %d.',
+      [ModelHeader.version]));
+
+  SetLength(SurfaceHeirachyOffsets, ModelHeader.numSurfaces);
+  aStream.Read(SurfaceHeirachyOffsets[0], sizeof(integer) *
+    ModelHeader.numSurfaces);
+
+  SetLength(SurfaceHeirachy, ModelHeader.numSurfaces);
+  for i := 0 to ModelHeader.numSurfaces - 1 do
+    with SurfaceHeirachy[i] do
+    begin
+      aStream.Read(name, Length(name));
+      aStream.Read(flags, sizeof(LongWord));
+      aStream.Read(shader, Length(shader));
+      aStream.Read(shaderIndex, sizeof(integer));
+      aStream.Read(parentIndex, sizeof(integer));
+      aStream.Read(numChildren, sizeof(integer));
+      if numChildren > 0 then
+      begin
+        SetLength(childIndices, numChildren);
+        aStream.Read(childIndices[0], numChildren * sizeof(integer));
+      end
+      else
+        SetLength(childIndices, 0);
+    end;
 
-  SetLength(LODs,ModelHeader.numLODs);
-  for i:=0 to ModelHeader.numLODs-1 do
-  with LODs[i] do begin
-    LODofs:=aStream.Position;
-    aStream.Read(LODInfo,sizeof(LODInfo));
-    SetLength(LODSurfaceOffsets,ModelHeader.numSurfaces);
-    aStream.Read(LODSurfaceOffsets[0],sizeof(integer)*ModelHeader.numSurfaces);
-    SetLength(Surfaces,ModelHeader.numSurfaces);
-    for j:=0 to ModelHeader.numSurfaces-1 do
-    with Surfaces[j] do begin
-      ofs:=aStream.Position;
-      aStream.Read(SurfaceHeader,SizeOf(TGLMSurfaceHeader));
-      SetLength(Triangles,SurfaceHeader.numTriangles);
-      SetLength(Vertices,SurfaceHeader.numVerts);
-      SetLength(TexCoords,SurfaceHeader.numVerts);
-      SetLength(BoneReferences,SurfaceHeader.numBoneReferences);
-      aStream.Position:=ofs+SurfaceHeader.ofsTriangles;
-      aStream.Read(Triangles[0],SurfaceHeader.numTriangles*SizeOf(TGLMTriangle));
-      aStream.Position:=ofs+SurfaceHeader.ofsVerts;
-      aStream.Read(Vertices[0],SurfaceHeader.numVerts*SizeOf(TGLMVertex));
-      aStream.Read(TexCoords[0],SurfaceHeader.numVerts*SizeOf(TVector2f));
-      aStream.Position:=ofs+SurfaceHeader.ofsBoneReferences;
-      aStream.Read(BoneReferences[0],SurfaceHeader.numBoneReferences*SizeOf(Integer));
-      aStream.Position:=ofs+SurfaceHeader.ofsEnd;
+  SetLength(LODs, ModelHeader.numLODs);
+  for i := 0 to ModelHeader.numLODs - 1 do
+    with LODs[i] do
+    begin
+      LODofs := aStream.Position;
+      aStream.Read(LODInfo, sizeof(LODInfo));
+      SetLength(LODSurfaceOffsets, ModelHeader.numSurfaces);
+      aStream.Read(LODSurfaceOffsets[0], sizeof(integer) *
+        ModelHeader.numSurfaces);
+      SetLength(Surfaces, ModelHeader.numSurfaces);
+      for j := 0 to ModelHeader.numSurfaces - 1 do
+        with Surfaces[j] do
+        begin
+          ofs := aStream.Position;
+          aStream.Read(SurfaceHeader, sizeof(TGLMSurfaceHeader));
+          SetLength(Triangles, SurfaceHeader.numTriangles);
+          SetLength(Vertices, SurfaceHeader.numVerts);
+          SetLength(TexCoords, SurfaceHeader.numVerts);
+          SetLength(BoneReferences, SurfaceHeader.numBoneReferences);
+          aStream.Position := ofs + SurfaceHeader.ofsTriangles;
+          aStream.Read(Triangles[0], SurfaceHeader.numTriangles *
+            sizeof(TGLMTriangle));
+          aStream.Position := ofs + SurfaceHeader.ofsVerts;
+          aStream.Read(Vertices[0], SurfaceHeader.numVerts *
+            sizeof(TGLMVertex));
+          aStream.Read(TexCoords[0], SurfaceHeader.numVerts *
+            sizeof(TVector2f));
+          aStream.Position := ofs + SurfaceHeader.ofsBoneReferences;
+          aStream.Read(BoneReferences[0], SurfaceHeader.numBoneReferences *
+            sizeof(integer));
+          aStream.Position := ofs + SurfaceHeader.ofsEnd;
+        end;
+      aStream.Position := LODofs + LODInfo.ofsEnd;
     end;
-    aStream.Position:=LODofs+LODInfo.ofsEnd;
-  end;
 end;
 
 
@@ -280,67 +298,76 @@ end;
 // ------------------ TFileGLA ------------------
 // ------------------
 
-function TFileGLA.GetCompressedMatrix(Frame, Bone: Integer): TGLACompQuatBone;
+function TFileGLA.GetCompressedMatrix(Frame, Bone: integer): TGLACompQuatBone;
 begin
-  Result:=CompBonePool[BoneIndices[Frame*AnimHeader.numBones+Bone]];
+  result := CompBonePool[BoneIndices[Frame * AnimHeader.numBones + Bone]];
 end;
 
 // GetUnCompressedMatrix
 //
-function TFileGLA.GetUnCompressedMatrix(Frame, Bone: Integer): TMatrix;
+function TFileGLA.GetUnCompressedMatrix(Frame, Bone: integer): TMatrix;
 begin
-  MC_UnCompressQuat(Result,CompBonePool[BoneIndices[Frame*AnimHeader.numBones+Bone]]);
+  MC_UnCompressQuat(result, CompBonePool[BoneIndices[Frame * AnimHeader.numBones
+    + Bone]]);
 end;
 
 procedure TFileGLA.LoadFromStream(aStream: TStream);
 var
-  idstr  : array[0..3] of char;
-  i,temp : integer;
-  buf    : array of array[0..2] of Byte;
+  idstr: array [0 .. 3] of char;
+  i, temp: integer;
+  buf: array of array [0 .. 2] of Byte;
 begin
-  aStream.Read(idstr,sizeof(idstr));
-  aStream.Position:=0;
+  aStream.Read(idstr, sizeof(idstr));
+  aStream.Position := 0;
 
-  if not (idstr='2LGA') then begin
-    raise Exception.Create(Format('Unknown or incorrect identity tag: [%s]',[idstr]));
+  if not(idstr = '2LGA') then
+  begin
+    raise Exception.Create(Format('Unknown or incorrect identity tag: [%s]',
+      [idstr]));
     exit;
   end;
 
   aStream.Read(AnimHeader,SizeOf(AnimHeader));
 
-  if AnimHeader.version<>6 then
-    raise Exception.Create(Format('Only GLA (MDXA) version 6 is supported. File is version %d.',[AnimHeader.version]));
-
-  SetLength(SkeletonOffsets,AnimHeader.numBones);
-  aStream.Read(SkeletonOffsets[0],sizeof(Integer)*AnimHeader.numBones);
-
-  SetLength(Skeleton,AnimHeader.numBones);
-  for i:=0 to AnimHeader.numBones-1 do
-  with Skeleton[i] do begin
-    aStream.Read(name,Length(name));
-    aStream.Read(flags,sizeof(LongWord));
-    aStream.Read(Parent,SizeOf(Integer));
-    aStream.Read(basePoseMat,sizeof(TGLABone));
-    aStream.Read(basePoseMatInv,sizeof(TGLABone));
-    aStream.Read(numChildren,sizeof(Integer));
-    if numChildren>0 then begin
-      SetLength(children,numChildren);
-      aStream.Read(children[0],numChildren*sizeof(Integer));
-    end else SetLength(children,0);
-  end;
+  if AnimHeader.version <> 6 then
+    raise Exception.Create
+      (Format('Only GLA (MDXA) version 6 is supported. File is version %d.',
+      [AnimHeader.version]));
+
+  SetLength(SkeletonOffsets, AnimHeader.numBones);
+  aStream.Read(SkeletonOffsets[0], sizeof(integer) * AnimHeader.numBones);
+
+  SetLength(Skeleton, AnimHeader.numBones);
+  for i := 0 to AnimHeader.numBones - 1 do
+    with Skeleton[i] do
+    begin
+      aStream.Read(name, Length(name));
+      aStream.Read(flags, sizeof(LongWord));
+      aStream.Read(Parent,SizeOf(Integer));
+      aStream.Read(BasePoseMat, sizeof(TGLABone));
+      aStream.Read(BasePoseMatInv, sizeof(TGLABone));
+      aStream.Read(numChildren, sizeof(integer));
+      if numChildren > 0 then
+      begin
+        SetLength(children, numChildren);
+        aStream.Read(children[0], numChildren * sizeof(integer));
+      end
+      else
+        SetLength(children, 0);
+    end;
 
-  aStream.Position:=AnimHeader.ofsFrames;
-  SetLength(BoneIndices,AnimHeader.numFrames*AnimHeader.numBones);
-  SetLength(buf,AnimHeader.numFrames*AnimHeader.numBones*3);
-  aStream.Read(buf[0],AnimHeader.numFrames*AnimHeader.numBones*3);
-  for i:=0 to AnimHeader.numFrames*AnimHeader.numBones-1 do
-    BoneIndices[i]:=(buf[i][2] shl 16) or (buf[i][1] shl 8) or buf[i][0];
-  SetLength(buf,0);
-
-  aStream.Position:=AnimHeader.ofsCompBonePool;
-  temp:=AnimHeader.ofsEnd-AnimHeader.ofsCompBonePool;
-  SetLength(CompBonePool,temp div SizeOf(TGLACompQuatBone));
-  aStream.Read(CompBonePool[0],temp);
+  aStream.Position := AnimHeader.ofsFrames;
+  SetLength(BoneIndices, AnimHeader.numFrames * AnimHeader.numBones);
+  SetLength(buf, AnimHeader.numFrames * AnimHeader.numBones * 3);
+  aStream.Read(buf[0], AnimHeader.numFrames * AnimHeader.numBones * 3);
+  for i := 0 to AnimHeader.numFrames * AnimHeader.numBones - 1 do
+    BoneIndices[i] := (buf[i][2] shl 16) or (buf[i][1] shl 8) or buf[i][0];
+  SetLength(buf, 0);
+
+  aStream.Position := AnimHeader.ofsCompBonePool;
+  temp := AnimHeader.ofsEnd - AnimHeader.ofsCompBonePool;
+  SetLength(CompBonePool, temp div sizeof(TGLACompQuatBone));
+  aStream.Read(CompBonePool[0], temp);
 end;
 
 end.

+ 3 - 1
Source/FileHDRImage.pas

@@ -1,12 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit FileHDRImage;
+
 (*
     Good for preview picture in OpenDialog,
     so you may include both HDRImage (preview) and GLFileHDR (loading)
 *)
 
-unit FileHDRImage;
 
 interface
 

+ 3 - 1
Source/FileLWObjects.pas

@@ -1,6 +1,9 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit FileLWObjects;
+
 (*-------------------------------------------------------------------------------
  Unit Name:  Lightwave
  Author:     Brian Johns [email protected]
@@ -14,7 +17,6 @@
              Lightwave3D is a registered trademark of Newtek Incorporated.
 
 -------------------------------------------------------------------------------*)
-unit FileLWObjects;
 
 interface
 

+ 3 - 3
Source/FileMD2.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-      Loading methods for MD2 file format
-}
+
 unit FileMD2;
 
+(* Loading methods for MD2 file format *)
+
 interface
 
 {$R-}

+ 3 - 3
Source/FileMD3.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  File loading methods for the MD3 file format
-}
+
 unit FileMD3;
 
+(* File loading methods for the MD3 file format *)
+
 interface
 
 uses

+ 3 - 3
Source/GLAVIRecorder.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-  Component to make it easy to record GLScene frames into an AVI file 
-*)
+
 unit GLAVIRecorder;
 
+(* Component to make it easy to record GLScene frames into an AVI file *)
+
 interface
 
 {$I GLScene.inc}

+ 33 - 34
Source/GLBSP.pas

@@ -1,13 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Binary Space Partion mesh support for GLScene. 
-  The classes of this unit are designed to operate within a TGLBaseMesh. 
-}
 
 unit GLBSP;
 
+(*
+  Binary Space Partion mesh support for GLScene.
+  The classes of this unit are designed to operate within a TGLBaseMesh.
+*)
+
 interface
 
 {$I GLScene.inc}
@@ -33,7 +34,7 @@ type
   end;
 
   TBSPRenderContextInfo = record
-    { Local coordinates of the camera (can be a vector or point) }
+    // Local coordinates of the camera (can be a vector or point)
     cameraLocal: TVector;
     rci: PRenderContextInfo;
     faceGroups: TList;
@@ -74,29 +75,29 @@ type
     constructor CreateOwned(AOwner: TGLMeshObjectList);
     destructor Destroy; override;
     procedure BuildList(var mrci: TGLRenderContextInfo); override;
-    {  Drops all unused nodes from the facegroups list. 
-      An unused node is a node that renders nothing and whose children
-      render nothing. Indices are remapped in the process. }
+    (* Drops all unused nodes from the facegroups list.
+       An unused node is a node that renders nothing and whose children
+       render nothing. Indices are remapped in the process. *)
     procedure CleanupUnusedNodes;
-    {  Returns the average BSP tree depth of end nodes.
+    (*  Returns the average BSP tree depth of end nodes.
       Sums up the depth each end node (starting at 1 for root node),
       divides by the number of end nodes. This is a simple estimator
-      of tree balancing (structurally speaking, not polygon-wise). }
+      of tree balancing (structurally speaking, not polygon-wise). *)
     function AverageDepth: Single;
-    {  Traverses the tree to the given point and returns the node index. }
+    // Traverses the tree to the given point and returns the node index.
     function FindNodeByPoint(const aPoint: TVector): TFGBSPNode;
-    {  Rendering sort mode. 
+    (*  Rendering sort mode.
       This sort mode can currently *not* blend with the sort by materials
       flag, default mode is rsBackToFront.
       Note that in rsNone mode, the hierarchical nature of the tree is
-      still honoured (positive subnode, self, then negative subnode). }
+      still honoured (positive subnode, self, then negative subnode). *)
     property RenderSort: TBSPRenderSort read FRenderSort write FRenderSort;
-    {  Cluster visibility. 
-      A property for defining node cluster-cluster visibility potential. }
+    (*  Cluster visibility.
+      A property for defining node cluster-cluster visibility potential. *)
     property ClusterVisibility: TBSPClusterVisibility read FClusterVisibility;
-    {  Use cluster visibility. 
+    (*  Use cluster visibility.
       Toggles the use of the visibility set for culling clusters of nodes
-      when rendering. }
+      when rendering. *)
     property UseClusterVisibility: Boolean read FUseClusterVisibility
       write FUseClusterVisibility;
   end;
@@ -121,42 +122,40 @@ type
     procedure CollectNoSort(var bsprci: TBSPRenderContextInfo);
     procedure CollectFrontToBack(var bsprci: TBSPRenderContextInfo);
     procedure CollectBackToFront(var bsprci: TBSPRenderContextInfo);
-    {  Try to find a 'decent' split plane for the node. 
+    (*  Try to find a 'decent' split plane for the node.
       Use this function to build a BSP tree, on leafy nodes. The split
       plane is chosen among the polygon planes, the coefficient are used
       to determine what a 'good' split plane is by assigning a cost
-      to splitted triangles (cut by the split plane) and tree imbalance. }
+      to splitted triangles (cut by the split plane) and tree imbalance. *)
     function FindSplitPlane(triangleSplitCost: Single = 1;
       triangleImbalanceCost: Single = 0.5): THmgPlane;
-    {  Evaluates a split plane. 
+    (* Evaluates a split plane.
       Used by FindSplitPlane. For splitted triangles, the extra spawned
-      triangles required are accounted for in the nbXxxTriangles values. }
+      triangles required are accounted for in the nbXxxTriangles values. *)
     procedure EvaluateSplitPlane(const splitPlane: THmgPlane;
       var nbTriangleSplit: Integer; var nbPositiveTriangles: Integer;
       var nbNegativeTriangles: Integer);
-    {  Splits a leafy node along the specified plane. 
+    (*  Splits a leafy node along the specified plane.
       Will trigger an exception if the node already has subnodes. Currently
-      also changes the mode from strips/fan to list. }
+      also changes the mode from strips/fan to list. *)
     procedure PerformSplit(const splitPlane: THmgPlane;
       const maxTrianglesPerLeaf: Integer = MaxInt);
-    {  Goes through all triangle edges, looking for tjunctions. 
-      The candidates are indices of points to lookup a tjunction vertices. }
+    (*  Goes through all triangle edges, looking for tjunctions.
+      The candidates are indices of points to lookup a tjunction vertices. *)
     procedure FixTJunctions(const tJunctionsCandidates: TIntegerList);
-    {  BSP node split plane. 
+    (*  BSP node split plane.
       Divides space between positive and negative half-space, positive
       half-space being the one were the evaluation of an homogeneous
-      vector against the plane is positive. }
+      vector against the plane is positive. *)
     property splitPlane: THmgPlane read FSplitPlane write FSplitPlane;
-    {  Index of the positive sub-node index in the list. 
-      Zero if empty. }
+    // Index of the positive sub-node index in the list. Zero if empty.
     property PositiveSubNodeIndex: Integer read FPositiveSubNodeIndex
       write FPositiveSubNodeIndex;
-    {  Index of the negative sub-node index in the list. 
-      Zero if empty. }
+    // Index of the negative sub-node index in the list. Zero if empty.
     property NegativeSubNodeIndex: Integer read FNegativeSubNodeIndex
       write FNegativeSubNodeIndex;
-    {  The index of the cluster that this node belongs to.
-      Used for visibility determination. }
+    (*  The index of the cluster that this node belongs to.
+      Used for visibility determination. *)
     property Cluster: Integer read FCluster write FCluster;
   end;
 
@@ -169,7 +168,7 @@ const
   cTJunctionEpsilon = 1E-4;
 
 // ---------------------------------------
-{ TBSPClusterVisibility }
+// TBSPClusterVisibility
 // ---------------------------------------
 constructor TBSPClusterVisibility.Create;
 begin

+ 5 - 6
Source/GLBaseClasses.pas

@@ -1,21 +1,20 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-  Base classes
-*)
 
 unit GLBaseClasses;
 
+(* Base classes *)
+
 interface
 
 uses
   System.Classes,
   System.SysUtils,
 
+  GLCrossPlatform,
   GLStrings,
-  GLPersistentClasses,
-  GLCrossPlatform;
+  GLPersistentClasses;
 
 type
 
@@ -63,7 +62,7 @@ type
     procedure DoProgress(const progressTime: TGLProgressTimes); virtual;
   end;
 
-  { A base class describing the "update" interface.  }
+  // A base class describing the "update" interface.  
   TGLUpdateAbleComponent = class(TGLCadenceAbleComponent, IGLNotifyAble)
   public
     procedure NotifyChange(Sender: TObject); virtual;

+ 50 - 51
Source/GLBitmapFont.pas

@@ -1,15 +1,15 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Bitmap Fonts management classes
-}
+
 unit GLBitmapFont;
 
-{$I GLScene.inc}
+(* Bitmap Fonts management classes *)
 
 interface
 
+{$I GLScene.inc}
+
 uses
   System.Classes,
   System.SysUtils,
@@ -35,9 +35,9 @@ uses
 
 type
 
-  {  An individual character range in a bitmap font.
-    A range allows mapping ASCII characters to character tiles in a font
-    bitmap, tiles are enumerated line then column (raster). }
+  (* An individual character range in a bitmap font.
+     A range allows mapping ASCII characters to character tiles in a font
+     bitmap, tiles are enumerated line then column (raster). *)
   TGLBitmapFontRange = class(TCollectionItem)
   private
     function GetStartASCII: WideString;
@@ -83,12 +83,12 @@ type
     function FindItemID(ID: Integer): TGLBitmapFontRange;
     property Items[index: Integer]: TGLBitmapFontRange read GetItems
       write SetItems; default;
-    {  Converts an ASCII character into a tile index.
-      Return -1 if character cannot be rendered. }
+    (* Converts an ASCII character into a tile index.
+       Return -1 if character cannot be rendered. *)
     function CharacterToTileIndex(aChar: WideChar): Integer;
     function TileIndexToChar(aIndex: Integer): WideChar;
     procedure NotifyChange;
-    { Total number of characters in the ranges; cached for performance }
+    // Total number of characters in the ranges; cached for performance
     property CharacterCount: Integer read FCharCount;
   end;
 
@@ -97,7 +97,7 @@ type
     l, t, w: word;
   end;
 
-  {  Provides access to individual characters in a BitmapFont.
+  (* Provides access to individual characters in a BitmapFont.
     Only fixed-width bitmap fonts are supported, the characters are enumerated
     in a raster fashion (line then column).
     Transparency is all or nothing, the transparent color being that of the
@@ -105,7 +105,7 @@ type
     Performance note: as usual, for best performance, you base font bitmap
     dimensions should be close to a power of two, and have at least 1 pixel
     spacing between characters (horizontally and vertically) to avoid artefacts
-    when rendering with linear filtering. }
+    when rendering with linear filtering. *)
   TGLCustomBitmapFont = class(TGLUpdateAbleComponent)
   private
     FRanges: TGLBitmapFontRanges;
@@ -150,27 +150,27 @@ type
       out TopLeft, BottomRight: TTexPoint);
     procedure PrepareImage(var ARci: TGLRenderContextInfo); virtual;
     procedure PrepareParams(var ARci: TGLRenderContextInfo);
-    {  A single bitmap containing all the characters.
-      The transparent color is that of the top left pixel. }
+    (* A single bitmap containing all the characters.
+      The transparent color is that of the top left pixel. *)
     property Glyphs: TPicture read FGlyphs write SetGlyphs;
-    {  Nb of horizontal pixels between two columns in the Glyphs. }
+    // Nb of horizontal pixels between two columns in the Glyphs.
     property GlyphsIntervalX: Integer read FGlyphsIntervalX
       write SetGlyphsIntervalX;
-    {  Nb of vertical pixels between two rows in the Glyphs. }
+    //  Nb of vertical pixels between two rows in the Glyphs.
     property GlyphsIntervalY: Integer read FGlyphsIntervalY
       write SetGlyphsIntervalY;
-    {  Ranges allow converting between ASCII and tile indexes.
-      See TGLCustomBitmapFontRange. }
+    (* Ranges allow converting between ASCII and tile indexes.
+      See TGLCustomBitmapFontRange. *)
     property Ranges: TGLBitmapFontRanges read FRanges write SetRanges;
-    {  Width of a single character. }
+    // Width of a single character.
     property CharWidth: Integer read FCharWidth write SetCharWidth default 16;
-    {  Pixels in between rendered characters (horizontally). }
+    // Pixels in between rendered characters (horizontally).
     property HSpace: Integer read FHSpace write SetHSpace default 1;
-    {  Pixels in between rendered lines (vertically). }
+    // Pixels in between rendered lines (vertically).
     property VSpace: Integer read FVSpace write SetVSpace default 1;
-    {  Horizontal spacing fix offset.
-      This property is for internal use, and is added to the hspacing
-      of each character when rendering, typically to fix extra spacing. }
+    (* Horizontal spacing fix offset.
+       This property is for internal use, and is added to the hspacing
+       of each character when rendering, typically to fix extra spacing. *)
     property HSpaceFix: Integer read FHSpaceFix write FHSpaceFix;
     property MagFilter: TGLMagFilter read FMagFilter write SetMagFilter
       default maLinear;
@@ -183,17 +183,17 @@ type
     destructor Destroy; override;
     procedure RegisterUser(anObject: TGLBaseSceneObject); virtual;
     procedure UnRegisterUser(anObject: TGLBaseSceneObject); virtual;
-    {  Renders the given string at current position or at position given by the optional position variable.
-      The current matrix is blindly used, meaning you can render all kinds
-      of rotated and linear distorted text with this method, OpenGL
-      Enable states are also possibly altered. }
+    (* Renders the given string at current position or at position given by the optional position variable.
+       The current matrix is blindly used, meaning you can render all kinds
+       of rotated and linear distorted text with this method, OpenGL
+       Enable states are also possibly altered. *)
     procedure RenderString(var ARci: TGLRenderContextInfo;
       const aText: UnicodeString; aAlignment: TAlignment;
       aLayout: TTextLayout; const aColor: TColorVector;
       aPosition: PVector = nil; aReverseY: boolean = False); overload; virtual;
-    {  A simpler canvas-style TextOut helper for RenderString.
-      The rendering is reversed along Y by default, to allow direct use
-      with TGLCanvas }
+    (* A simpler canvas-style TextOut helper for RenderString.
+       The rendering is reversed along Y by default, to allow direct use
+       with TGLCanvas *)
     procedure TextOut(var rci: TGLRenderContextInfo; X, Y: Single;
       const Text: UnicodeString; const Color: TColorVector); overload;
     procedure TextOut(var rci: TGLRenderContextInfo; X, Y: Single;
@@ -202,22 +202,22 @@ type
     function CharacterToTileIndex(aChar: WideChar): Integer; virtual;
     function TileIndexToChar(aIndex: Integer): WideChar; virtual;
     function CharacterCount: Integer; virtual;
-    {  Get the actual width for this char. }
+    // Get the actual width for this char.
     function GetCharWidth(Ch: WideChar): Integer;
-    {  Get the actual pixel width for this string. }
+    // Get the actual pixel width for this string.
     function CalcStringWidth(const aText: UnicodeString): Integer;
       overload; virtual;
     // make texture if needed
     procedure CheckTexture(var ARci: TGLRenderContextInfo);
-    {  Height of a single character. }
+    //  Height of a single character.
     property CharHeight: Integer read FCharHeight write SetCharHeight
       default 16;
     property TextureWidth: Integer read FTextureWidth write FTextureWidth;
     property TextureHeight: Integer read FTextureHeight write FTextureHeight;
   end;
 
-  {  See TGLCustomBitmapFont.
-    This class only publuishes some of the properties. }
+  (* See TGLCustomBitmapFont.
+     This class only publuishes some of the properties. *)
   TGLBitmapFont = class(TGLCustomBitmapFont)
   published
     property Glyphs;
@@ -236,9 +236,9 @@ type
   TGLFlatTextOption = (ftoTwoSided);
   TGLFlatTextOptions = set of TGLFlatTextOption;
 
-  {  A 2D text displayed and positionned in 3D coordinates.
-    The FlatText uses a character font defined and stored by a TGLBitmapFont
-    component. Default character scale is 1 font pixel = 1 space unit. }
+  (* A 2D text displayed and positionned in 3D coordinates.
+     The FlatText uses a character font defined and stored by a TGLBitmapFont
+     component. Default character scale is 1 font pixel = 1 space unit. *)
   TGLFlatText = class(TGLImmaterialSceneObject)
   private
     FBitmapFont: TGLCustomBitmapFont;
@@ -263,27 +263,26 @@ type
       renderSelf, renderChildren: boolean); override;
     procedure Assign(Source: TPersistent); override;
   published
-    {  Refers the bitmap font to use.
+    (*  Refers the bitmap font to use.
       The referred bitmap font component stores and allows access to
-      individual character bitmaps. }
+      individual character bitmaps. *)
     property BitmapFont: TGLCustomBitmapFont read FBitmapFont
       write SetBitmapFont;
-    {  Text to render.
+    (*  Text to render.
       Be aware that only the characters available in the bitmap font will
-      be rendered. CR LF sequences are allowed. }
+      be rendered. CR LF sequences are allowed. *)
     property Text: UnicodeString read FText write SetText;
-    {  Controls the text alignment (horizontal).
-      Possible values : taLeftJustify, taRightJustify, taCenter }
+    (* Controls the text alignment (horizontal).
+      Possible values : taLeftJustify, taRightJustify, taCenter *)
     property Alignment: TAlignment read FAlignment write SetAlignment;
-    {  Controls the text layout (vertical).
-      Possible values : tlTop, tlCenter, tlBottom }
+    (*  Controls the text layout (vertical).
+      Possible values : tlTop, tlCenter, tlBottom *)
     property Layout: TTextLayout read FLayout write SetLayout;
-    {  Color modulation, can be used for fade in/out too. }
+    // Color modulation, can be used for fade in/out too.
     property ModulateColor: TGLColor read FModulateColor write SetModulateColor;
-    {  Flat text options.
+    (* Flat text options.
        ftoTwoSided : when set the text will be visible from its two
-      sides even if faceculling is on (at the scene-level).
-       }
+       sides even if faceculling is on (at the scene-level). *)
     property Options: TGLFlatTextOptions read FOptions write SetOptions;
   end;
 

+ 3 - 3
Source/GLBlur.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Applies a blur effect over the viewport.
-}
+
 unit GLBlur;
 
+(* Applies a blur effect over the viewport *)
+
 interface
 
 {$I GLScene.inc}

+ 3 - 3
Source/GLBumpMapping.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Some useful methods for setting up bump maps.
-}
+
 unit GLBumpMapping;
 
+(*  Some useful methods for setting up bump maps. *)
+
 interface
 
 {$I GLScene.inc}

+ 9 - 7
Source/GLBumpShader.pas

@@ -1,13 +1,16 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   A shader that applies bump mapping. 
+
+unit GLBumpShader;
+
+(*
+   A shader that applies bump mapping.
    Notes:
-   The normal map is expected to be the primary texture. 
+   The normal map is expected to be the primary texture.
 
    The secondary texture is used for the diffuse texture,
-   to enable set boDiffuseTexture2 in the BumpOptions property. 
+   to enable set boDiffuseTexture2 in the BumpOptions property.
 
    The tertiary texture is used for the specular texture,
    to enable set boSpecularTexture3 in the BumpOptions property.
@@ -22,8 +25,7 @@
    the secondary texture coordinates for the diffuse and specular
    texture lookups.
 
-}
-unit GLBumpShader;
+*)
 
 interface
 
@@ -61,7 +63,7 @@ type
 
   TSpecularMode = (smOff, smBlinn, smPhong);
 
-  {A generic bump shader.  }
+  // A generic bump shader.
   TGLBumpShader = class(TGLShader)
   private
     FVertexProgramHandle: TGLARBVertexProgramHandle;

+ 11 - 10
Source/GLBumpmapHDS.pas

@@ -1,12 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLBumpmapHDS;
+
+(*
   Implements a HDS that automatically generates an elevation bumpmap.
   The object-space elevation bumpmap can be used for dynamic terrain lighting.
   A bumpmap texture is generated for each terrain tile, and placed into a TGLMaterialLibrary.
-}
-unit GLBumpmapHDS;
+*)
 
 interface
 
@@ -33,9 +35,9 @@ type
   TNewTilePreparedEvent = procedure(Sender: TGLBumpmapHDS;
     heightData: TGLHeightData; normalMapMaterial: TGLLibMaterial) of object;
 
-  {  An Height Data Source that generates elevation bumpmaps automatically. 
+  (*  An Height Data Source that generates elevation bumpmaps automatically.
     The HDS must be connected to another HDS, which will provide the elevation
-    data, and to a MaterialLibrary where bumpmaps will be placed. }
+    data, and to a MaterialLibrary where bumpmaps will be placed. *)
   TGLBumpmapHDS = class(TGLHeightDataSourceFilter)
   private
     // FElevationHDS : TGLHeightDataSource;
@@ -73,16 +75,16 @@ type
       write FOnNewTilePrepared;
     property BumpScale: Single read FBumpScale write SetBumpScale
       stored StoreBumpScale;
-    { Specifies the amount of subsampling for the bump texture. 
+    (* Specifies the amount of subsampling for the bump texture.
       This value must be a power of 2, and is used to divide the height
       tile resolution to determine the bump texture resolution (f.i.
       a tile size of 128 with a subsampling of 4 will result in textures
       of a resolution of 32x32. SubSampling won't allow texture resolution
-      to get below 16x16 (minimal bumpmap resolution). }
+      to get below 16x16 (minimal bumpmap resolution). *)
     property SubSampling: Integer read FSubSampling write SetSubSampling
       default 1;
     property MaxPoolSize;
-    {  If MaxTextures>0 then the Bumpmap library is trimmed down to size whenever
+    (* If MaxTextures>0 then the Bumpmap library is trimmed down to size whenever
       the texture count is larger than MaxTextures. The oldest, unused texture is trimmed first.
       However, if you used TGLHeightData.MaterialName, instead of TGLHeightData.LibMaterial,
       then the TGLHeightData component does not register the texture as being used.
@@ -90,7 +92,7 @@ type
       If MaxTextures=0 or if treads(GLAsyncHDS) are used, then the texture cache
       is NOT trimmed automatically.
       You will have to manually trim the cache from the main thread, by
-      calling 'TrimTextureCache'. (GLAsyncHDS.OnIdle is a good place.) }
+      calling 'TrimTextureCache'. (GLAsyncHDS.OnIdle is a good place.) *)
     property MaxTextures: Integer read FMaxTextures write FMaxTextures;
     property OnSourceDataFetched;
   end;
@@ -322,7 +324,6 @@ end;
 initialization
 // ------------------------------------------------------------------
 
-// class registrations
 RegisterClass(TGLBumpmapHDS);
 
 end.

+ 5 - 4
Source/GLConsole.pas

@@ -1,7 +1,10 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLConsole;
+
+(*
    The console is a popdown window that appears on a game for text output/input.
 
    What is different compared to the original component?
@@ -32,9 +35,7 @@
       Blinking cursor, "Delete" key support
       Allow long lines to continue on the next line
       May be SceneViewer should be a TControl to support the FullScreenViewer...
-}
-
-unit GLConsole;
+*)
 
 interface
 

+ 8 - 6
Source/GLContext.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-  Prototypes and base implementation of TGLContext.
-*)
+
 unit GLContext;
 
+(* Prototypes and base implementation of TGLContext *)
+
 interface
 
 {$I GLScene.inc}
@@ -1009,7 +1009,7 @@ begin
   if not Assigned(Result) then
   begin
 {$IFDEF USE_LOGGING}
-    GLSLogger.LogError(strNoActiveRC);
+    LogError(strNoActiveRC);
 {$ENDIF}
     Abort;
   end;
@@ -1902,7 +1902,9 @@ begin
   Result := False;
 end;
 
-{ TGLVirtualHandleTransf }
+// ------------------
+// TGLVirtualHandleTransf
+// ------------------
 
 class function TGLVirtualHandleTransf.Transferable: Boolean;
 begin
@@ -1967,7 +1969,7 @@ begin
   if not vContextActivationFailureOccurred then
   begin
     gl.GetError;
-    { Unbind identifier from all image selectors. }
+    // Unbind identifier from all image selectors.
     if gl.ARB_multitexture then
     begin
       with GetContext.GLStates do

+ 22 - 22
Source/GLCrossPlatform.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-   Cross platform support functions and types for GLScene.
-*)
+
 unit GLCrossPlatform;
 
+(* Cross platform support functions and types for GLScene *)
+
 interface
 
 {$I GLScene.inc}
@@ -43,47 +43,47 @@ var
   vProjectTargetName: TProjectTargetNameFunc;
 
 function GetGLRect(const aLeft, aTop, aRight, aBottom: Integer): TRect;
-{ Increases or decreases the width and height of the specified rectangle.
+(* Increases or decreases the width and height of the specified rectangle.
    Adds dx units to the left and right ends of the rectangle and dy units to
-   the top and bottom. }
+   the top and bottom. *)
 procedure InflateGLRect(var aRect: TRect; dx, dy: Integer);
 procedure IntersectGLRect(var aRect: TRect; const rect2: TRect);
 procedure RaiseLastOSError;
-{Number of pixels per logical inch along the screen width for the device.
-   Under Win32 awaits a HDC and returns its LOGPIXELSX. }
+(* Number of pixels per logical inch along the screen width for the device.
+   Under Win32 awaits a HDC and returns its LOGPIXELSX. *)
 function GetDeviceLogicalPixelsX(device: HDC): Integer;
-{Number of bits per pixel for the current desktop resolution. }
+// Number of bits per pixel for the current desktop resolution.
 function GetCurrentColorDepth: Integer;
-{Returns the number of color bits associated to the given pixel format. }
+// Returns the number of color bits associated to the given pixel format.
 function PixelFormatToColorBits(aPixelFormat: TPixelFormat): Integer;
-{Replace path delimiter to delimiter of the current platform. }
+// Replace path delimiter to delimiter of the current platform.
 procedure FixPathDelimiter(var S: string);
-{Remove if possible part of path witch leads to project executable. }
+// Remove if possible part of path witch leads to project executable.
 function RelativePath(const S: string): string;
-{Returns the current value of the highest-resolution counter.
+(* Returns the current value of the highest-resolution counter.
    If the platform has none, should return a value derived from the highest
    precision time reference available, avoiding, if possible, timers that
-   allocate specific system resources. }
+   allocate specific system resources. *)
 procedure QueryPerformanceCounter(out val: Int64);
-{Returns the frequency of the counter used by QueryPerformanceCounter.
+(* Returns the frequency of the counter used by QueryPerformanceCounter.
    Return value is in ticks per second (Hz), returns False if no precision
-   counter is available. }
+   counter is available. *)
 function QueryPerformanceFrequency(out val: Int64): Boolean;
 
-{Starts a precision timer.
+(* Starts a precision timer.
    Returned value should just be considered as 'handle', even if it ain't so.
    Default platform implementation is to use QueryPerformanceCounter and
    QueryPerformanceFrequency, if higher precision references are available,
    they should be used. The timer will and must be stopped/terminated/released
-   with StopPrecisionTimer. }
+   with StopPrecisionTimer. *)
 function StartPrecisionTimer: Int64;
-{Computes time elapsed since timer start. Return time lap in seconds. }
+// Computes time elapsed since timer start. Return time lap in seconds.
 function PrecisionTimerLap(const precisionTimer: Int64): Double;
-{Computes time elapsed since timer start and stop timer. Return time lap in seconds. }
+// Computes time elapsed since timer start and stop timer. Return time lap in seconds.
 function StopPrecisionTimer(const precisionTimer: Int64): Double;
-{Returns time in milisecond from application start. }
+// Returns time in milisecond from application start.
 function AppTime: Double;
-{Returns the number of CPU cycles since startup. Use the similarly named CPU instruction. }
+// Returns the number of CPU cycles since startup. Use the similarly named CPU instruction.
 function GLOKMessageBox(const Text, Caption: string): Integer;
 procedure GLLoadBitmapFromInstance(Instance: LongInt; ABitmap: TBitmap; const AName: string);
 procedure ShowHTMLUrl(const Url: string);
@@ -98,7 +98,7 @@ function FindUnitName(aClass: TClass): string; overload;
 function FloatToHalf(Float: Single): THalfFloat;
 function HalfToFloat(Half: THalfFloat): Single;
 function GetValueFromStringsIndex(const AStrings: TStrings; const AIndex: Integer): string;
-{Determine if the directory is writable.  }
+// Determine if the directory is writable.
 function IsDirectoryWriteable(const AName: string): Boolean;
 function CharToWideChar(const AChar: AnsiChar): WideChar;
 

+ 52 - 47
Source/GLDCE.pas

@@ -1,7 +1,7 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+(*
   Dynamic Collision Engine
   How to use:
   - Add a DCEManager to you form and configure its properties
@@ -19,7 +19,7 @@
   - UseGravity: You can disable the gravity for that object
   - SlideOrBounce: The object can bounce like a ball or slide like an FPS
   - BounceFactor: Restituition factor, 1 means that it will bounce forever
-}
+*)
 
 unit GLDCE;
 
@@ -28,29 +28,30 @@ interface
 {$I GLScene.inc}
 
 uses
-  System.Classes, 
-  System.SysUtils, 
+  System.Classes,
+  System.SysUtils,
   System.Types,
-   
-  GLScene, 
+
+  GLScene,
   XCollection,
-  GLVectorGeometry, 
-  GLVectorLists, 
+  GLVectorGeometry,
+  GLVectorLists,
   GLVectorFileObjects,
   GLDCEMisc,
   GLEllipseCollision,
-  GLTerrainRenderer, 
-  GLCoordinates, 
+  GLTerrainRenderer,
+  GLCoordinates,
   GLBaseClasses,
-  GLManager, 
-  GLVectorTypes;
+  GLManager,
+  GLVectorTypes,
+  GLStrings;
 
 type
-  {Only csEllipsoid can have dynamic behaviour}
+  //Only csEllipsoid can have dynamic behaviour
   TDCEShape = (csEllipsoid, csBox, csFreeform, csTerrain);
 
-  {Indicates which type of layer comparison is made when trying to detect
-     collisions between 2 bodies (A and B). Possible values are: 
+  (*Indicates which type of layer comparison is made when trying to detect
+     collisions between 2 bodies (A and B). Possible values are:
 	 ccsDCEStandard: Collides bodies if A.layer <= B.layer
 	 ccsCollisionStandard: Collides bodies if either A or B have
 		 layer equal to zero or if their layers are different.
@@ -58,16 +59,16 @@ type
 	     checks would pass (i.e. if the layer of either body  is
 		 equal to 0 or if A.layer <= B.layer) *and* if both
 		 layers are positive (that is, turns off collision
-		 for bodies whose layer is < 0) }
-  TDCECollisionSelection = (ccsDCEStandard, ccsCollisionStandard, ccsHybrid); // gak:20041119
+		 for bodies whose layer is < 0) *)
+  TDCECollisionSelection = (ccsDCEStandard, ccsCollisionStandard, ccsHybrid); 
 
   TDCECollision = record
     Position: TAffineVector;
     Normal: TAffineVector; //Surface normal
     Bounce: TAffineVector; //Surface reflection
     Nearest: Boolean;
-    RootCollision:boolean;//gak:20041119
-    Distance:single;//gak:20041119
+    RootCollision:boolean;
+    Distance:single;
   end;
 
   TGLDCEStatic = class;
@@ -113,7 +114,7 @@ type
     property WorldDirection : TGLCoordinates read FWorldDirection write SetWorldDirection;
     property WorldScale : Single read FWorldScale write SetWorldScale;
     property MovimentScale : Single read FMovimentScale write FMovimentScale;
-    Property StandardiseLayers: TDCECollisionSelection read FStandardiseLayers write FStandardiseLayers; //gak:20041119
+    Property StandardiseLayers: TDCECollisionSelection read FStandardiseLayers write FStandardiseLayers;
     Property ManualStep: Boolean read FManualStep write FManualStep;
     property OnCollision : TDCECollisionEvent read FOnCollision write FOnCollision;
   end;
@@ -124,8 +125,10 @@ type
     FManagerName : String; // NOT persistent, temporarily used for persistence
     FActive: Boolean;
     FShape: TDCEShape;
-    FLayer: Integer; //Collides only with lower or equal layers
-    FSolid: Boolean; //Collide and slide if true, otherwise it "walk thru walls"
+    //Collides only with lower or equal layers
+    FLayer: Integer; 
+    //Collide and slide if true, otherwise it "walk thru walls"
+    FSolid: Boolean; 
     FFriction: Single; //0 (no friction); 100 (no movement)
     FBounceFactor: Single; //0 (don't bounce); 1 (bounce forever)
     FSize: TGLCoordinates;
@@ -171,7 +174,8 @@ type
     FFriction: Single; //0 (no friction); 100 (no movement)
     FBounceFactor: Single; //0 (don't bounce); 1 (bounce forever)
     FSize: TGLCoordinates;
-    FMaxRecursionDepth:byte;//gak20041119 //Number of iterations of the collision method
+	//Number of iterations of the collision method
+    FMaxRecursionDepth:byte; 
     FSlideOrBounce:TDCESlideOrBounce;//gak20041122
     //Movement
     FAccel: TAffineVector; //Current acceleration
@@ -208,13 +212,13 @@ type
     procedure StopAbsAccel;
     procedure Jump(jHeight, jSpeed: Single);
     procedure Move(deltaS: TAffineVector; deltaTime: Double);
-    procedure MoveTo(Position: TAffineVector; Amount: Single); // gak:20041119
+    procedure MoveTo(Position: TAffineVector; Amount: Single); 
     procedure DoMove(deltaTime: Double);
     procedure DoProgress(const progressTime : TGLProgressTimes); override;
     //Runtime only
     property Speed : TAffineVector read FSpeed write FSpeed;
     property InGround : Boolean read FInGround;
-    property MaxRecursionDepth:byte read FMaxRecursionDepth write FMaxRecursionDepth;//gak20041119
+    property MaxRecursionDepth:byte read FMaxRecursionDepth write FMaxRecursionDepth;
     property OnCollision : TDCEObjectCollisionEvent read FOnCollision write FOnCollision;
   published
     property Active : Boolean read FActive write FActive;
@@ -225,7 +229,7 @@ type
     property Friction : Single read FFriction write SetFriction;
     property BounceFactor : Single read FBounceFactor write SetBounceFactor;
     property Size : TGLCoordinates read FSize write SetSize;
-    property SlideOrBounce:TDCESlideOrBounce read FSlideOrBounce write FSlideOrBounce;//gak20041122
+    property SlideOrBounce:TDCESlideOrBounce read FSlideOrBounce write FSlideOrBounce;
   end;
 
 function GetOrCreateDCEStatic(behaviours : TGLBehaviours) : TGLDCEStatic; overload;
@@ -280,7 +284,8 @@ begin
   result := FStatics.Count;
 end;
 
-function TGLDCEManager.MoveByDistance(var Body: TGLDCEDynamic; deltaS, deltaAbsS: TAffineVector): Single;
+function TGLDCEManager.MoveByDistance(var Body: TGLDCEDynamic; 
+  deltaS, deltaAbsS: TAffineVector): Single;
 var
     //Friction and bounce
     TotalFriction, bounce,f,m,restitution: Single;
@@ -290,7 +295,7 @@ var
     tObject: TGLBaseSceneObject;
     //Collision results
     ColInfo: TDCECollision;
-    lastobj:integer;//gak:20041119
+    lastobj:integer;
     i, oi: Integer;
     MP: TECMovePack;
     CanCollide,GravCollided: boolean;
@@ -305,7 +310,7 @@ begin
   MP.Gravity := deltaAbsS;
   MP.ObjectInfo.Solid := Body.Solid;
   MP.UnitScale := FWorldScale;
-  MP.MaxRecursionDepth := Body.MaxRecursionDepth; //gak://20041119
+  MP.MaxRecursionDepth := Body.MaxRecursionDepth; 
   //Get collision range, if it is too big separate into small pieces
   ECSetCollisionRange(MP);
   ColRange := MP.CollisionRange;
@@ -314,13 +319,17 @@ begin
   SetLength(MP.Contacts,0);
   GravCollided := False; //Is colliding with the ground
   Body.FGroundNormal := NullVector;
-  while deltaCR>0 do begin
-    if deltaCR>MaxRange then begin
-      dCR:=MaxRange;
-      deltaCR:=deltaCR-MaxRange;
-    end else begin
-      dCR:=deltaCR;
-      deltaCR:=0;
+  while deltaCR > 0 do
+  begin
+    if deltaCR > MaxRange then
+    begin
+      dCR := MaxRange;
+      deltaCR := deltaCR - MaxRange;
+    end
+    else
+    begin
+      dCR := deltaCR;
+      deltaCR := 0;
     end;
     dT := dCR / ColRange;
     MP.Velocity := VectorScale(deltaS,dT);
@@ -389,7 +398,7 @@ begin
   Body.FInGround := GravCollided;
 
   //Generate events and calculate average friction
-  lastobj := -1;//gak:20041119
+  lastobj := -1;
   TotalFriction := Body.Friction;
   ContactList := TIntegerList.Create;
 
@@ -460,12 +469,10 @@ begin
 
     end;
 
-    //gak:20041119 start
     colinfo.RootCollision := (lastobj <> oi);
     colInfo.Distance := Contacts[i].Distance;
     lastobj := oi;
-    //gak:20041119 end
-
+    
     if Assigned(FOnCollision) then
         FOnCollision(Self,Body.OwnerBaseSceneObject,tObject,ColInfo);
     if Assigned(Body.FOnCollision) then
@@ -558,7 +565,9 @@ begin
    FDynamics.Clear;
 end;
 
-{ TGLDCEStatic }
+//---------------------
+// TGLDCEStatic 
+//---------------------
 
 procedure TGLDCEStatic.Assign(Source: TPersistent);
 begin
@@ -751,8 +760,8 @@ begin
   FSolid := True;
   FFriction := 1;
   FBounceFactor := 0;
-  FMaxRecursionDepth := 5;  //gak:20041119
-  FSlideOrBounce := csbSlide; // gak:20041122
+  FMaxRecursionDepth := 5;  
+  FSlideOrBounce := csbSlide;
   FInGround := False;
 
   FAccel := NullVector;
@@ -938,10 +947,8 @@ begin
       WriteBoolean(FUseGravity);
       WriteSingle(FFriction);
       WriteSingle(FBounceFactor);
-      //gak:20041122 - start
       writeinteger(FMaxRecursionDepth);
       writeinteger(ord(FSlideOrBounce));
-      //gak:20041122 - end
       FSize.WriteToFiler(writer);
    end;
 end;
@@ -963,10 +970,8 @@ begin
       FUseGravity := ReadBoolean;
       FFriction := ReadSingle;
       FBounceFactor := ReadSingle;
-      //gak:20041122 - start
       FMaxRecursionDepth := readinteger;
       FSlideOrBounce := TDCESlideOrBounce(readinteger);
-      //gak:20041122 - end
       FSize.ReadFromFiler(reader);
    end;
 end;

+ 2 - 9
Source/GLDCEMisc.pas

@@ -1,11 +1,10 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-  Miscelaneous functions used by DCE (Dynamic Collision Engine).
-}
 unit GLDCEMisc;
 
+(* Miscelaneous functions used by DCE (Dynamic Collision Engine) *)
+
 interface
 
 {$I GLScene.inc}
@@ -156,10 +155,8 @@ begin
   i := 0;
   while i < 36 do
   begin
-
     count := count + 1;
     SetLength(MovePack.TriMeshes[t].Triangles,count);
-
     with MovePack.TriMeshes[t] do
     begin
       p1 := DCEBox[i]; ScaleVector(p1,BoxSize); p1 := BoxObj.LocalToAbsolute(p1);
@@ -172,7 +169,6 @@ begin
       ObjectInfo.Solid := Solid;
       ObjectInfo.ObjectID := ObjectID;
     end;
-
   end;
 end;
 
@@ -241,11 +237,9 @@ begin
 
       x := x + Resolution;
     end;
-
   end;
 end;
 
-
 procedure ECAddEllipsoid(var MovePack: TECMovePack; ePos, eRadius: TAffineVector;
   Solid: Boolean; ObjectID: Integer);
 var count : Integer;
@@ -266,7 +260,6 @@ begin
     ObjectInfo.Solid := Solid;
     ObjectInfo.ObjectID := ObjectID;
   end;
-
 end;
 
 

+ 3 - 2
Source/GLDynamicTexture.pas

@@ -1,13 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit GLDynamicTexture;
+
 (*
   Adds a dynamic texture image, which allows for easy updating of
   texture data.
 *)
 
-unit GLDynamicTexture;
-
 interface
 
 {$I GLScene.inc}

+ 7 - 7
Source/GLExtrusion.pas

@@ -1,17 +1,17 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLExtrusion;
+
+(*
    Extrusion objects for GLScene. Extrusion objects are solids defined by the
    surface described by a moving curve.
-}
-{  TODO
-   ur:
-     Suggestion:
+  TODO  ur: Suggestion:
        All extrusion objects use actually the same kind of "parts",
        one common type should do.
-}
-unit GLExtrusion;
+*)
+
 
 interface
 

+ 14 - 11
Source/GLFeedback.pas

@@ -1,18 +1,20 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   A scene object encapsulating the OpenGL feedback buffer. 
+
+unit GLFeedback;
+
+(*
+   A scene object encapsulating the OpenGL feedback buffer.
    This object, when Active, will render it's children using
    the GL_FEEDBACK render mode. This will render the children
-   into the feedback Buffer rather than into the frame buffer. 
+   into the feedback Buffer rather than into the frame buffer.
 
    Mesh data can be extracted from the buffer using the
    BuildMeshFromBuffer procedure. For custom parsing of the
    buffer use the Buffer SingleList. The Buffered property
-   will indicate if there is valid data in the buffer. 
-}
-unit GLFeedback;
+   will indicate if there is valid data in the buffer.
+*)
 
 interface
 
@@ -39,7 +41,7 @@ uses
 type
   TglFeedbackMode = (fm2D, fm3D, fm3DColor, fm3DColorTexture, fm4DColorTexture);
 
-  {An object encapsulating the OpenGL feedback rendering mode. }
+  // An object encapsulating the OpenGL feedback rendering mode.
   TglFeedback = class(TGLBaseSceneObject)
   private
     FActive: Boolean;
@@ -56,8 +58,8 @@ type
     destructor Destroy; override;
     procedure DoRender(var ARci: TGLRenderContextInfo;
       ARenderSelf, ARenderChildren: Boolean); override;
-    {Parse the the feedback buffer for polygon data and build
-       a mesh into the assigned lists. }
+    (* Parse the the feedback buffer for polygon data and build
+       a mesh into the assigned lists. *)
     procedure BuildMeshFromBuffer(
       Vertices: TAffineVectorList = nil;
       Normals: TAffineVectorList = nil;
@@ -68,8 +70,8 @@ type
     property Buffered: Boolean read FBuffered;
     // The feedback buffer
     property Buffer: TSingleList read FBuffer;
-    {Vertex positions in the buffer needs to be scaled by
-       CorrectionScaling to get correct coordinates. }
+    (* Vertex positions in the buffer needs to be scaled by
+       CorrectionScaling to get correct coordinates. *)
     property CorrectionScaling: Single read FCorrectionScaling;
   published
     // Maximum size allocated for the feedback buffer
@@ -340,3 +342,4 @@ initialization
 
 end.
 
+

+ 5 - 6
Source/GLFilePGM.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   PGM image loader
-}
+
 unit GLFilePGM;
 
+(* PGM image loader *)
+
 {$I GLScene.inc}
 
 interface
@@ -20,8 +20,8 @@ uses
   GLTextureFormat,
   GLStrings,
   GLApplicationFileIO,
-  //CUDA
-  GLSCUDAUtility;
+
+  GLS.CUDAUtility;
 
 
 type
@@ -181,7 +181,6 @@ end;
 initialization
 //------------------------------------------------
 
-{ Register this Fileformat-Handler with GLScene }
 RegisterRasterFormat('pgm', 'Portable Graymap', TGLPGMImage);
 
 end.

+ 3 - 2
Source/GLObjectManager.pas

@@ -1,6 +1,9 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit GLObjectManager;
+
 (*
    The object manager is used for registering classes together with a category,
    description + icon, so that they can be displayed visually.  This can then
@@ -11,8 +14,6 @@
    unregistered, any editor that is using the object manager can be notified.
 *)
 
-unit GLObjectManager;
-
 interface
 
 {$I GLScene.inc}

+ 0 - 2
Source/GLParticleFX.pas

@@ -10,10 +10,8 @@ unit GLParticleFX;
    These provide a mechanism to render heterogenous particles systems with per
    particle depth-sorting (allowing correct rendering of interwoven separate
    fire and smoke particle systems for instance).
-
 *)
 
-
 interface
 
 {$I GLScene.inc}

+ 10 - 8
Source/GLSCUDA.pas → Source/GLS.CUDA.pas

@@ -2,7 +2,7 @@
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 
-unit GLSCUDA;
+unit GLS.CUDA;
 
 (* CUDA routines implementation *)
 
@@ -24,13 +24,15 @@ uses
   GLGraphics,
   GLStrings,
   GLUtils,
-  GLSCUDAApi,
-  GLSCUDARunTime,
-  GLSCUDAParser,
-  GLSCUDAFourierTransform,
-  GLSCUDACompiler,
-  GLSCUDAContext,
-  GLSCUDADataAccess
+  GLCrossPlatform,
+
+  GLS.CUDAApi,
+  GLS.CUDARunTime,
+  GLS.CUDAParser,
+  GLS.CUDAFourierTransform,
+  GLS.CUDACompiler,
+  GLS.CUDAContext,
+  GLS.CUDADataAccess
   {$IFDEF USE_LOGGING},GLSLog;{$ELSE};{$ENDIF}
 
 type

+ 7 - 7
Source/GLSCUDAApi.pas → Source/GLS.CUDAApi.pas

@@ -36,7 +36,7 @@
 // * the above Disclaimer and U.S. Government End Users Notice.
 // */
 
-unit GLSCUDAApi;
+unit GLS.CUDAApi;
 
 interface
 
@@ -243,14 +243,14 @@ type
   // Function properties
   TCUfunction_attribute = (
 
-    { * The number of threads beyond which a launch of the function would fail.
-      * This number depends on both the function and the device on which the
-      * function is currently loaded. }
+    (* The number of threads beyond which a launch of the function would fail.
+     * This number depends on both the function and the device on which the
+     * function is currently loaded. *)
     CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0,
 
-    { * The size in bytes of statically-allocated shared memory required by
-      * this function. This does not include dynamically-allocated shared
-      * memory requested by the user at runtime. }
+    (* The size in bytes of statically-allocated shared memory required by
+     * this function. This does not include dynamically-allocated shared
+     * memory requested by the user at runtime. *)
     CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1,
 
     { * The size in bytes of user-allocated constant memory required by this

+ 7 - 2
Source/GLSCUDACompiler.pas → Source/GLS.CUDACompiler.pas

@@ -1,12 +1,14 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
+
+unit GLS.CUDACompiler;
+
 (*
   Component allows to compile the CUDA-source (*.cu) file.
   in design- and runtime.
   To work requires the presence of CUDA Toolkit 3.X and MS Visual Studio C++.
 *)
-unit GLSCUDACompiler;
 
 interface
 
@@ -16,12 +18,15 @@ uses
   Winapi.Windows,
   Winapi.ShellAPI,
   Winapi.TlHelp32,
+  System.UITypes,
   System.SysUtils,
   System.Classes,
   Vcl.Forms,
   VCL.Dialogs,
   GLStrings,
-  GLSCUDAParser,
+
+  GLS.CUDAParser,
+
   GLApplicationFileIO
   {$IFDEF USE_LOGGING},GLSLog;{$ELSE};{$ENDIF}
 

+ 14 - 15
Source/GLSCUDAContext.pas → Source/GLS.CUDAContext.pas

@@ -1,12 +1,10 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{  
-   CUDA context
-   
-}
 
-unit GLSCUDAContext;
+unit GLS.CUDAContext;
+
+(* CUDA context *)
 
 interface
 
@@ -20,8 +18,9 @@ uses
   GLContext,
   GLSGenerics,
   GLSLog,
-  GLSCUDARunTime,
-  GLSCUDAApi;
+
+  GLS.CUDARunTime,
+  GLS.CUDAApi;
 
 type
 
@@ -160,7 +159,7 @@ type
     class function GetThreadStack: TCUDAContextList;
     class function GetContext(i: Integer): TCUDAContext;
   public
-    {  Managment. }
+    //  Management
     class procedure Init;
     class procedure Done;
     class procedure CreateContext(aContext: TCUDAContext);
@@ -169,19 +168,19 @@ type
     class procedure DestroyContextOf(ADevice: TCUDADevice);
     class procedure PushContext(aContext: TCUDAContext);
     class function PopContext: TCUDAContext;
-    {  Fill unused device list to show its in property. }
+    //  Fill unused device list to show its in property.
     class procedure FillUnusedDeviceList(var AList: TStringList);
-    {  Return device by name. }
+    //  Return device by name.
     class function GetDeviceByName(const AName: string): TCUDADevice;
-    {  Returns the number of CUDA compatiable devices. }
+    //  Returns the number of CUDA compatiable devices.
     class function DeviceCount: Integer;
-    {  Access to devices list. }
+    //  Access to devices list.
     property Devices[i: Integer]: TCUDADevice read GetDevice;
-    {  Returns a device that has a maximum Giga flops. }
+    //  Returns a device that has a maximum Giga flops.
     class function GetMaxGflopsDevice: TCUDADevice;
-    {  Returns the number of TCUDAcontext object. }
+    //  Returns the number of TCUDAcontext object.
     class function ContextCount: Integer;
-    {  Return CUDA context of current thread. }
+    //  Return CUDA context of current thread.
     class function GetCurrentThreadContext: TCUDAContext;
     {  Access to contexts list. }
     property Contexts[i: Integer]: TCUDAContext read GetContext;

+ 4 - 3
Source/GLSCUDADataAccess.pas → Source/GLS.CUDADataAccess.pas

@@ -2,7 +2,7 @@
 // This unit is part of the GLScene Engine, http://glscene.org
 //
 
-unit GLSCUDADataAccess;
+unit GLS.CUDADataAccess;
 
 (* CUDA data access implementation *)
 
@@ -12,9 +12,10 @@ interface
 
 uses
   System.SysUtils,
-  GLStrings,
   GLUtils,
-  GLSLog;
+  GLSLog,
+  GLStrings,
+  GLCrossPlatform;
 
 type
 

+ 10 - 9
Source/GLSCUDAFFTPlan.pas → Source/GLS.CUDAFFTPlan.pas

@@ -1,23 +1,24 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{  
-   Fast Fourier Transform for CUDA  
-}
 
-unit GLSCUDAFFTPlan;
+unit GLS.CUDAFFTPlan;
+
+(*  Fast Fourier Transform for CUDA *)
 
 interface
 
 {$I GLScene.inc}
 
 uses
-  System.Classes, 
+  System.Classes,
   System.SysUtils,
-  GLSCUDAContext,
-  GLSCUDA,
-  GLSCUDAApi,
-  GLSCUDAFourierTransform,
+
+  GLS.CUDAContext,
+  GLS.CUDA,
+  GLS.CUDAApi,
+  GLS.CUDAFourierTransform,
+
   GLStrings,
   GLSLog;
 

+ 45 - 49
Source/GLSCUDAFourierTransform.pas → Source/GLS.CUDAFourierTransform.pas

@@ -1,9 +1,6 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-   CUDA Fourier Transform
-*)
 
 /// *
 // * Copyright 1993-2009 NVIDIA Corporation.  All rights reserved.
@@ -40,7 +37,9 @@
 // * the above Disclaimer and U.S. Government End Users Notice.
 // */
 
-unit GLSCUDAFourierTransform;
+unit GLS.CUDAFourierTransform;
+
+(* CUDA Fourier Transform *)
 
 interface
 
@@ -48,10 +47,13 @@ interface
 
 uses
   Winapi.Windows,
-  GLVectorTypes, 
-  GLSCUDAApi, 
-  GLSCUDARunTime, 
-  GLStrings
+
+  GLVectorTypes,
+  GLStrings,
+
+  GLS.CUDAApi,
+  GLS.CUDARunTime
+
   {$IFDEF USE_LOGGING},GLSLog;{$ELSE};{$ENDIF}
 
 
@@ -69,12 +71,12 @@ const
     'cufft64_40_10', 'cufft64_32_16', 'cufft64_31_4', 'cufft64_30_14',
     'cufft64_30_9', 'cufft64_30_8');
 {$ENDIF}
-  { /// CUFFT API function return values }
+  /// CUFFT API function return values
 
 type
-  { /// CUFFT defines and supports the following data types }
+  /// CUFFT defines and supports the following data types
 
-  { /// cufftHandle is a handle type used to store and access CUFFT plans. }
+  /// cufftHandle is a handle type used to store and access CUFFT plans.
   TcufftHandle = type Cardinal;
 
   TcufftReal = Single;
@@ -111,12 +113,12 @@ type
   TcudaRoundMode = (cudaRoundNearest, cudaRoundZero, cudaRoundPosInf,
     cudaRoundMinInf);
 
-  { /// CUFFT transform directions }
+  /// CUFFT transform directions
 const
-  CUFFT_FORWARD = -1; { // Forward FFT }
-  CUFFT_INVERSE = 1; { // Inverse FFT }
+  CUFFT_FORWARD = -1; // Forward FFT
+  CUFFT_INVERSE = 1;  // Inverse FFT
 
-  { /// CUFFT supports the following transform types }
+  /// CUFFT supports the following transform types
   CUFFT_R2C: TcufftType = $2A; // Real to Complex (interleaved)
   CUFFT_C2R: TcufftType = $2C; // Complex (interleaved) to Real
   CUFFT_C2C: TcufftType = $29; // Complex to Complex, interleaved
@@ -162,43 +164,43 @@ type
 
   TcufftPlan1d = function(out plan: TcufftHandle; nx: Integer;
     atype: TcufftType; batch: Integer): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftPlan2d = function(out plan: TcufftHandle; nx: Integer; ny: Integer;
     atype: TcufftType): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftPlan3d = function(out plan: TcufftHandle; nx: Integer; ny: Integer;
     nz: Integer; atype: TcufftType): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftDestroy = function(plan: TcufftHandle): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftPlanMany = function(out plan: TcufftHandle; rank: Integer;
     var n: Integer; var inembed: Integer; istride, idist: Integer;
     var onembed: Integer; ostride, odist: Integer; ctype: TcufftType;
     batch: Integer): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftExecC2C = function(plan: TcufftHandle; idata: PcufftComplex;
     odata: PcufftComplex; direction: Integer): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftExecR2C = function(plan: TcufftHandle; idata: PcufftReal;
     odata: PcufftComplex): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftExecC2R = function(plan: TcufftHandle; idata: PcufftComplex;
     odata: PcufftReal): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftExecZ2Z = function(plan: TcufftHandle; idata: PcufftDoubleComplex;
     odata: PcufftDoubleComplex; direction: Integer): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftExecD2Z = function(plan: TcufftHandle; idata: PcufftDoubleReal;
     odata: PcufftDoubleComplex): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftExecZ2D = function(plan: TcufftHandle; idata: PcufftDoubleComplex;
     odata: PcufftDoubleReal): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftSetStream = function(p: TcufftHandle; stream: Integer): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
   TcufftSetCompatibilityMode = function(plan: TcufftHandle;
     mode: TcufftCompatibility): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 
 var
   cufftPlan1d: TcufftPlan1d;
@@ -221,13 +223,9 @@ function InitCUFFTFromLibrary(const LibName: WideString): Boolean;
 function IsCUFFTInitialized: Boolean;
 function Get_CUDA_FFT_Error_String(AError: TcufftResult): string;
 
-//---------------------------------------------------------
-//---------------------------------------------------------
 //---------------------------------------------------------
 implementation
 //---------------------------------------------------------
-//---------------------------------------------------------
-//---------------------------------------------------------
 
 const
   cufftPlan1dName = 'cufftPlan1d';
@@ -250,12 +248,11 @@ const
 var
 {$IFDEF MSWINDOWS}
   CUFFTHandle: HINST = INVALID_MODULEHANDLE;
-{$ENDIF}
-{$IFDEF LINUX}
+{$ENDIF}{$IFDEF LINUX}
   CUFFTHandle: TLibHandle = INVALID_MODULEHANDLE;
 {$ENDIF}
-{$IFDEF USE_CUDA_DEBUG_MODE}
 
+{$IFDEF USE_CUDA_DEBUG_MODE}
 var
   cufftPlan1d_: TcufftPlan1d;
   cufftPlan2d_: TcufftPlan2d;
@@ -273,7 +270,7 @@ var
 
 function cufftPlan1dShell(out plan: TcufftHandle; nx: Integer;
   atype: TcufftType; batch: Integer): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftPlan1d_(plan, nx, atype, batch);
   if Result <> CUFFT_SUCCESS then
@@ -283,7 +280,7 @@ end;
 
 function cufftPlan2dShell(out plan: TcufftHandle; nx: Integer; ny: Integer;
   atype: TcufftType): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftPlan2d_(plan, nx, ny, atype);
   if Result <> CUFFT_SUCCESS then
@@ -293,7 +290,7 @@ end;
 
 function cufftPlan3dShell(out plan: TcufftHandle; nx: Integer; ny: Integer;
   nz: Integer; atype: TcufftType): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftPlan3d_(plan, nx, ny, nz, atype);
   if Result <> CUFFT_SUCCESS then
@@ -302,7 +299,7 @@ begin
 end;
 
 function cufftDestroyShell(plan: TcufftHandle): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftDestroy_(plan);
   if Result <> CUFFT_SUCCESS then
@@ -314,7 +311,7 @@ function cufftPlanManyShell(out plan: TcufftHandle; rank: Integer;
   var n: Integer; var inembed: Integer; istride, idist: Integer;
   var onembed: Integer; ostride, odist: Integer; ctype: TcufftType;
   batch: Integer): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftPlanMany_(plan, rank, n, inembed, istride, idist, onembed,
     ostride, odist, ctype, batch);
@@ -325,7 +322,7 @@ end;
 
 function cufftExecC2CShell(plan: TcufftHandle; idata: PcufftComplex;
   odata: PcufftComplex; direction: Integer): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftExecC2C_(plan, idata, odata, direction);
   if Result <> CUFFT_SUCCESS then
@@ -335,7 +332,7 @@ end;
 
 function cufftExecR2CShell(plan: TcufftHandle; idata: PcufftReal;
   odata: PcufftComplex): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftExecR2C_(plan, idata, odata);
   if Result <> CUFFT_SUCCESS then
@@ -345,7 +342,7 @@ end;
 
 function cufftExecC2RShell(plan: TcufftHandle; idata: PcufftComplex;
   odata: PcufftReal): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftExecC2R_(plan, idata, odata);
   if Result <> CUFFT_SUCCESS then
@@ -355,7 +352,7 @@ end;
 
 function cufftExecZ2ZShell(plan: TcufftHandle; idata: PcufftDoubleComplex;
   odata: PcufftDoubleComplex; direction: Integer): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftExecZ2Z_(plan, idata, odata, direction);
   if Result <> CUFFT_SUCCESS then
@@ -365,7 +362,7 @@ end;
 
 function cufftExecD2ZShell(plan: TcufftHandle; idata: PcufftDoubleReal;
   odata: PcufftDoubleComplex): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftExecD2Z_(plan, idata, odata);
   if Result <> CUFFT_SUCCESS then
@@ -375,7 +372,7 @@ end;
 
 function cufftExecZ2DShell(plan: TcufftHandle; idata: PcufftDoubleComplex;
   odata: PcufftDoubleReal): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftExecZ2D_(plan, idata, odata);
   if Result <> CUFFT_SUCCESS then
@@ -384,7 +381,7 @@ begin
 end;
 
 function cufftSetStreamShell(p: TcufftHandle; stream: Integer): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftSetStream_(p, stream);
   if Result <> CUFFT_SUCCESS then
@@ -394,14 +391,13 @@ end;
 
 function cufftSetCompatibilityModeShell(plan: TcufftHandle;
   mode: TcufftCompatibility): TcufftResult;
-{$IFDEF MSWINDOWS}stdcall;{$ENDIF}{$IFDEF UNIX}cdecl;{$ENDIF}
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 begin
   Result := cufftSetCompatibilityMode_(plan, mode);
   if Result <> CUFFT_SUCCESS then
     GLSLogger.LogErrorFmt(strFFTFuncRetErr, [cufftSetCompatibilityModeName,
       Get_CUDA_FFT_Error_String(Result)]);
 end;
-
 {$ENDIF GLS_CUDA_DEBUG_MODE}
 
 function CUFFTGetProcAddress(ProcName: PAnsiChar): Pointer;

+ 7 - 6
Source/GLSCUDAGraphics.pas → Source/GLS.CUDAGraphics.pas

@@ -1,11 +1,10 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-   CUDA Graphics for GLScene
-*)
 
-unit GLSCUDAGraphics;
+unit GLS.CUDAGraphics;
+
+(* CUDA Graphics for GLScene *)
 
 interface
 
@@ -17,8 +16,9 @@ uses
   System.Classes,
   System.SysUtils,
 
-  GLSCUDAApi,
-  GLSCUDA,
+  GLS.CUDAApi,
+  GLS.CUDA,
+
   GLContext,
   GLState,
   GLScene,
@@ -29,6 +29,7 @@ uses
   GLTexture,
   GLSLShader,
   GLSLParameter,
+  GLPersistentClasses,
   {$IFDEF USE_LOGGING} GLSLog, {$ENDIF}
   GLRenderContextInfo;
 

+ 17 - 18
Source/GLSCUDAParallelPrimitives.pas → Source/GLS.CUDAParallelPrimitives.pas

@@ -1,9 +1,6 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-   CUDA Parallel Primitives
-*)
 
 // -------------------------------------------------------------
 // cuDPP -- CUDA Data Parallel Primitives library
@@ -15,12 +12,14 @@
 // the root directory of this source distribution.
 // -------------------------------------------------------------
 
-unit GLSCUDAParallelPrimitives;
+unit GLS.CUDAParallelPrimitives;
+
+(* CUDA Parallel Primitives *)
 
 interface
 
-uses
-  OpenCL;
+
+// uses OpenCL;
 
 const
   CUDPPDLL = 'cudpp32.dll';
@@ -103,10 +102,10 @@ function cudppPlan(var planHandle: TCUDPPHandle;
   n: NativeUInt;
   rows: NativeUInt;
   rowPitch: NativeUInt): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 function cudppDestroyPlan(plan: TCUDPPHandle): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 // Scan and sort algorithms
 
@@ -114,21 +113,21 @@ function cudppScan(planHandle: TCUDPPHandle;
   var d_out;
   var d_in,
   numElements: NativeUInt): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 function cudppMultiScan(planHandle: TCUDPPHandle;
   var d_out;
   var d_in;
   numElements: NativeUInt;
   numRows: NativeUInt): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 function cudppSegmentedScan(planHandle: TCUDPPHandle;
   var d_out;
   var d_idata;
   const d_iflags: PCardinal;
   numElements: NativeUInt): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 function cudppCompact(planHandle: TCUDPPHandle;
   var d_out;
@@ -136,14 +135,14 @@ function cudppCompact(planHandle: TCUDPPHandle;
   var d_in;
   const d_isValid: PCardinal;
   numElements: NativeUInt): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 function cudppSort(planHandle: TCUDPPHandle;
   var d_keys;
   var d_values;
   keybits: Integer;
   numElements: NativeUInt): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 // Sparse matrix allocation
 
@@ -154,28 +153,28 @@ function cudppSparseMatrix(var sparseMatrixHandle: TCUDPPHandle;
   var A;
   const h_rowIndices: PCardinal;
   const h_indices: PCardinal): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 function cudppDestroySparseMatrix(sparseMatrixHandle: TCUDPPHandle):
   TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 // Sparse matrix-vector algorithms
 
 function cudppSparseMatrixVectorMultiply(sparseMatrixHandle: TCUDPPHandle;
   var d_y;
   var d_x): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 // random number generation algorithms
 function cudppRand(planHandle: TCUDPPHandle;
   var d_out;
   numElements: NativeUInt): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 function cudppRandSeed(const planHandle: TCUDPPHandle;
   seed: Cardinal): TCUDPPResult;
-{$IFDEF CUDA_STDCALL}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
+{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}external CUDPPDLL;
 
 implementation
 

+ 8 - 6
Source/GLSCUDAParser.pas → Source/GLS.CUDAParser.pas

@@ -1,18 +1,20 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
-   Helper unit for parsing CU modules and get information about. 
-   kernel's functions, textures, shared and constants memory. 
-}
-unit GLSCUDAParser;
+
+unit GLS.CUDAParser;
+
+(*
+   Helper unit for parsing CU modules and get information about.
+   kernel's functions, textures, shared and constants memory.
+*)
 
 interface
 
 uses
   System.Classes,
   System.SysUtils,
-  GLSCUDARunTime;
+  GLS.CUDARunTime;
 
 type
 

+ 211 - 238
Source/GLSCUDARuntime.pas → Source/GLS.CUDARuntime.pas

@@ -1,9 +1,6 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{  
-   GLScene CUDA Runtime 
-}
 
 /// *
 // * Copyright 1993-2016 NVIDIA Corporation.  All rights reserved.
@@ -40,7 +37,9 @@
 // * the above Disclaimer and U.S. Government End Users Notice.
 // */
 
-unit GLSCUDARunTime;
+unit GLS.CUDARuntime;
+
+(* GLScene CUDA Runtime *)
 
 interface
 
@@ -48,7 +47,8 @@ interface
 
 uses
   Winapi.Windows,
-  GLSCUDAApi,
+
+  GLS.CUDAApi,
   GLSLog;
 
 const
@@ -338,44 +338,44 @@ var
   cudaBindTexture: function(var offset: NativeUInt; const texref: PTextureReference;
     var devPtr: Pointer; var desc: TCudaChannelFormatDesc; size: NativeUInt)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaBindTexture2D: function(var offset: NativeUInt;
     const texref: PTextureReference; const devPtr: Pointer;
     var desc: TCudaChannelFormatDesc; width, height, pitch: NativeUInt)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaBindTextureToArray: function(const texref: PTextureReference;
     const cudaArray: PcudaArray): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaUnbindTexture: function(const texref: PTextureReference): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGetTextureAlignmentOffset: function(offset: NativeUInt;
     const texref: PTextureReference): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGetTextureReference: function(const texref: PTextureReference;
     const symbol: PAnsiChar): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGetChannelDesc: function(var desc: TCudaChannelFormatDesc;
     const array_: Pointer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaCreateChannelDesc: function(x, y, z, w: Integer;
     f: TCudaChannelFormatKind): TCudaChannelFormatDesc;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   (* ******************************************************************************
     *                                                                              *
@@ -385,136 +385,136 @@ var
 
   cudaMalloc3D: function(var pitchedDevPtr: TcudaPitchedPtr;
     extent: TcudaExtent): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMalloc3DArray: function(var arrayPtr: PcudaArray;
     const desc: TCudaChannelFormatDesc; extent: TcudaExtent; flags: Cardinal)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemset3D: function(pitchedDevPtr: TcudaPitchedPtr; value: Integer;
     extent: TcudaExtent): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpy3D: function(const p: TcudaMemcpy3DParms): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpy3DAsync: function(const p: TcudaMemcpy3DParms; stream: cudaStream_t)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMalloc: function(var devPtr; size: NativeUInt): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMallocHost: function(var ptr: Pointer; size: NativeUInt): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMallocPitch: function(var devPtr; var pitch: NativeUInt; width: NativeUInt;
     height: NativeUInt): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMallocArray: function(var aarray: Pointer;
     var desc: TCudaChannelFormatDesc; width: NativeUInt; height: NativeUInt)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaFree: function(devPtr: Pointer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaFreeHost: function(ptr: Pointer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaFreeArray: function(const aarray: Pointer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaHostAlloc: function(var pHost: Pointer; bytes: NativeUInt; flags: Cardinal)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaHostGetDevicePointer: function(var pDevice: Pointer; pHost: Pointer;
     flags: Cardinal): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaHostGetFlags: function(var pFlags: Cardinal; pHost: Pointer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemGetInfo: function(var free: NativeUInt; var total: NativeUInt): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpy: function(dst: Pointer; src: Pointer; count: NativeUInt;
     kind: TcudaMemcpyKind): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpyToArray: function(var dst: PcudaArray; wOffset: NativeUInt;
     hOffset: NativeUInt; var src; count: NativeUInt; kind: TcudaMemcpyKind)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpyFromArray: function(var dst; const src: PcudaArray; wOffset: NativeUInt;
     hOffset: NativeUInt; count: NativeUInt; kind: TcudaMemcpyKind): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpyArrayToArray: function(dst: PcudaArray; wOffsetDst: NativeUInt;
     hOffsetDst: NativeUInt; const src: PcudaArray; wOffsetSrc: NativeUInt;
     hOffsetSrc: NativeUInt; count: NativeUInt;
     const kind: TcudaMemcpyKind = cudaMemcpyDeviceToDevice): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpy2D: function(var dst; dpitch: NativeUInt; var src; spitch: NativeUInt;
     width: NativeUInt; height: NativeUInt; kind: TcudaMemcpyKind): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpy2DToArray: function(dst: PcudaArray; wOffset: NativeUInt;
     hOffset: NativeUInt; var src; spitch: NativeUInt; width: NativeUInt; height: NativeUInt;
     kind: TcudaMemcpyKind): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpy2DFromArray: function(var dst; dpitch: NativeUInt; src: PcudaArray;
     wOffset: NativeUInt; hOffset: NativeUInt; width: NativeUInt; height: NativeUInt;
     kind: TcudaMemcpyKind): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpy2DArrayToArray: function(dst: PcudaArray; wOffsetDst: NativeUInt;
     hOffsetDst: NativeUInt; src: PcudaArray; wOffsetSrc: NativeUInt; hOffsetSrc: NativeUInt;
     width: NativeUInt; height: NativeUInt;
     const kind: TcudaMemcpyKind = cudaMemcpyDeviceToDevice): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpyToSymbol: function(symbol: PAnsiChar; var src; count: NativeUInt;
     const offset: NativeUInt = 0;
     const kind: TcudaMemcpyKind = cudaMemcpyHostToDevice): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpyFromSymbol: function(var dst; symbol: PAnsiChar; count: NativeUInt;
     const offset: NativeUInt = 0;
     const kind: TcudaMemcpyKind = cudaMemcpyDeviceToHost): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   { +//*************************************************************************** }
   { -** }
@@ -524,50 +524,50 @@ var
 
   cudaMemcpyAsync: function(var dst; const src; count: NativeUInt;
     kind: TcudaMemcpyKind; stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpyToArrayAsync: function(dst: PcudaArray; wOffset: NativeUInt;
     hOffset: NativeUInt; const src; count: NativeUInt; kind: TcudaMemcpyKind;
     stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpyFromArrayAsync: function(var dst; const src: PcudaArray;
     wOffset: NativeUInt; hOffset: NativeUInt; count: NativeUInt; kind: TcudaMemcpyKind;
     stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpy2DAsync: function(var dst; dpitch: NativeUInt; const src;
     spitch: NativeUInt; width: NativeUInt; height: NativeUInt; kind: TcudaMemcpyKind;
     stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpy2DToArrayAsync: function(dst: PcudaArray; wOffset: NativeUInt;
     hOffset: NativeUInt; const src; spitch: NativeUInt; width: NativeUInt; height: NativeUInt;
     kind: TcudaMemcpyKind; stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpy2DFromArrayAsync: function(var dst; dpitch: NativeUInt;
     const src: PcudaArray; wOffset: NativeUInt; hOffset: NativeUInt; width: NativeUInt;
     height: NativeUInt; kind: TcudaMemcpyKind; stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpyToSymbolAsync: function(const symbol: PAnsiChar; const src;
     count: NativeUInt; offset: NativeUInt; kind: TcudaMemcpyKind; stream: cudaStream_t)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemcpyFromSymbolAsync: function(var dst; const symbol: PAnsiChar;
     count: NativeUInt; offset: NativeUInt; kind: TcudaMemcpyKind; stream: cudaStream_t)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   /// *****************************************************************************
   // *                                                                            *
@@ -576,13 +576,13 @@ var
   // *****************************************************************************/
 
   cudaMemset: function(var devPtr; value: Integer; count: NativeUInt): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaMemset2D: function(var devPtr; pitch: NativeUInt; value: Integer;
     width: NativeUInt; height: NativeUInt): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   /// *****************************************************************************
   // *                                                                            *
@@ -592,13 +592,13 @@ var
 
   cudaGetSymbolAddress: function(var devPtr: Pointer; const symbol: PAnsiChar)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGetSymbolSize: function(var size: NativeUInt; const symbol: PAnsiChar)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   { +//*************************************************************************** }
   { -** }
@@ -607,35 +607,35 @@ var
   { =***************************************************************************** }
 
   cudaGetDeviceCount: function(var count: Integer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGetDeviceProperties: function(var prop: TCudaDeviceProp; device: Integer)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaChooseDevice: function(var device: Integer; const prop: PCudaDeviceProp)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaSetDevice: function(device: Integer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGetDevice: function(var device: Integer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaSetDeviceFlags: function(flags: Integer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaSetValidDevices: function(device_arr: PInteger; len: Integer)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   { +//****************************************************************************** }
   { -** }
@@ -645,27 +645,27 @@ var
 
   cudaConfigureCall: function(gridDim, blockDim: TDim3; sharedMem: NativeUInt;
     stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaSetupArgument: function(const arg: Pointer; size: NativeUInt; offset: NativeUInt)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaFuncSetCacheConfig: function(const func: PAnsiChar;
     cacheConfig: TcudaFuncCache): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaLaunch: function(const entry: PAnsiChar): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaFuncGetAttributes: function(var attr: TcudaFuncAttributes;
     const func: PAnsiChar): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   { +//****************************************************************************** }
   { -** }
@@ -674,8 +674,8 @@ var
   { =*******************************************************************************/ }
 
   cudaGetLastError: function: cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   { +//****************************************************************************** }
   { -** }
@@ -683,92 +683,92 @@ var
   { -** }
   { =*******************************************************************************/ }
   cudaGLSetGLDevice: function(device: Integer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGLRegisterBufferObject: function(bufObj: Cardinal): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGraphicsGLRegisterImage: function(const resource: PCUgraphicsResource;
     image: Cardinal; target: Cardinal; flags: Cardinal): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGraphicsGLRegisterBuffer: function(const resource: PCUgraphicsResource;
     buffer: Cardinal; flags: Cardinal): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGLMapBufferObject: function(devPtr: Pointer; bufObj: Cardinal): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGLUnmapBufferObject: function(bufObj: Cardinal): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGLUnregisterBufferObject: function(bufObj: Cardinal): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGLSetBufferObjectMapFlags: function(bufObj: Cardinal;
     flags: TCudaGLMapFlags): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGLMapBufferObjectAsync: function(var devPtr: Pointer; bufObj: Cardinal;
     stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGLUnmapBufferObjectAsync: function(bufObj: Cardinal; stream: cudaStream_t)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGraphicsUnregisterResource: function(resource: PCUgraphicsResource)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGraphicsResourceSetMapFlags: function(resource: PCUgraphicsResource;
     flags: Cardinal): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGraphicsMapResources: function(count: Integer;
     const resources: PCUgraphicsResource; stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGraphicsUnmapResources: function(count: Integer;
     const resources: PCUgraphicsResource; stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGraphicsResourceGetMappedPointer: function(var pDevPtr: TCUdeviceptr;
     var pSize: Cardinal; resource: PCUgraphicsResource): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGraphicsSubResourceGetMappedArray: function(var pArray: PCUarray;
     resource: PCUgraphicsResource; arrayIndex: Cardinal; mipLevel: Cardinal)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaGetErrorString: function(error: cudaError_t): PAnsiChar;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaDriverGetVersion: function(out driverVersion: Integer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaRuntimeGetVersion: function(out runtimeVersion: Integer): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   (* ******************************************************************************
     *                                                                              *
@@ -777,12 +777,12 @@ var
     ****************************************************************************** *)
 
   cudaSetDoubleForDevice: function(var d: Double): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaSetDoubleForHost: function(var d: Double): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   (* ******************************************************************************
     *                                                                              *
@@ -791,20 +791,20 @@ var
     ****************************************************************************** *)
 
   cudaStreamCreate: function(var pStream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaStreamDestroy: function(stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaStreamSynchronize: function(stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaStreamQuery: function(stream: cudaStream_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   (* ******************************************************************************
     *                                                                              *
@@ -813,39 +813,39 @@ var
     ****************************************************************************** *)
 
   cudaEventCreate: function(var event: cudaEvent_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaEventCreateWithFlags: function(var event: cudaEvent_t; flags: Integer)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaEventRecord: function(event: cudaEvent_t; stream: cudaStream_t)
     : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaEventQuery: function(event: cudaEvent_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaEventSynchronize: function(event: cudaEvent_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaEventDestroy: function(event: cudaEvent_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaEventElapsedTime: function(var ms: Single; start: cudaEvent_t;
     ending: cudaEvent_t): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   cudaWGLGetDevice: function(var device: Integer; hGpu: HGPUNV): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
+{$IFDEF MSWINDOWS}stdcall;
+{$ELSE}cdecl;
 {$ENDIF}
   (* ******************************************************************************
     *                                                                              *
@@ -853,30 +853,19 @@ var
     *                                                                              *
     ****************************************************************************** *)
 
-  cudaThreadExit: function(): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
-{$ENDIF}
-  cudaThreadSynchronize: function(): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
-{$ENDIF}
-  cudaThreadSetLimit: function(limit: TcudaLimit; value: NativeUInt): cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
-{$ENDIF}
-  cudaThreadGetLimit: function(var value: NativeUInt; limit: TcudaLimit)
-    : cudaError_t;
-{$IFDEF CUDA_STDCALL}stdcall;
-{$ENDIF}{$IFDEF CUDA_CDECL}cdecl;
-{$ENDIF}
+cudaThreadExit: function(): cudaError_t;{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
+cudaThreadSynchronize: function(): cudaError_t;{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
+cudaThreadSetLimit: function(limit: TcudaLimit; value: NativeUInt): cudaError_t;{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
+cudaThreadGetLimit: function(var value: NativeUInt; limit: TcudaLimit): cudaError_t;{$IFDEF MSWINDOWS}stdcall;{$ELSE}cdecl;{$ENDIF}
 function cudaGetLastErrorString: string;
 function InitCUDART: Boolean;
 procedure CloseCUDART;
 function InitCUDARTFromLibrary(const LibName: WideString): Boolean;
 function IsCUDARTInitialized: Boolean;
 
+//--------------------------------------------
 implementation
+//--------------------------------------------
 
 function cudaGetLastErrorString: string;
 begin
@@ -889,8 +878,7 @@ const
 var
 {$IFDEF MSWINDOWS}
   CUDARTHandle: HINST = INVALID_MODULEHANDLE;
-{$ENDIF}
-{$IFDEF LINUX}
+{$ELSE}
   CUDARTHandle: TLibHandle = INVALID_MODULEHANDLE;
 {$ENDIF}
 
@@ -946,37 +934,24 @@ begin
   cudaGetLastError := CUDARTGetProcAddress('cudaGetLastError');
   cudaGetSymbolAddress := CUDARTGetProcAddress('cudaGetSymbolAddress');
   cudaGetSymbolSize := CUDARTGetProcAddress('cudaGetSymbolSize');
-  cudaGetTextureAlignmentOffset := CUDARTGetProcAddress
-    ('cudaGetTextureAlignmentOffset');
+  cudaGetTextureAlignmentOffset := CUDARTGetProcAddress('cudaGetTextureAlignmentOffset');
   cudaGetTextureReference := CUDARTGetProcAddress('cudaGetTextureReference');
   cudaGLMapBufferObject := CUDARTGetProcAddress('cudaGLMapBufferObject');
-  cudaGLMapBufferObjectAsync := CUDARTGetProcAddress
-    ('cudaGLMapBufferObjectAsync');
-  cudaGLRegisterBufferObject := CUDARTGetProcAddress
-    ('cudaGLRegisterBufferObject');
-  cudaGLSetBufferObjectMapFlags := CUDARTGetProcAddress
-    ('cudaGLSetBufferObjectMapFlags');
+  cudaGLMapBufferObjectAsync := CUDARTGetProcAddress('cudaGLMapBufferObjectAsync');
+  cudaGLRegisterBufferObject := CUDARTGetProcAddress('cudaGLRegisterBufferObject');
+  cudaGLSetBufferObjectMapFlags := CUDARTGetProcAddress('cudaGLSetBufferObjectMapFlags');
   cudaGLSetGLDevice := CUDARTGetProcAddress('cudaGLSetGLDevice');
   cudaGLUnmapBufferObject := CUDARTGetProcAddress('cudaGLUnmapBufferObject');
-  cudaGLUnmapBufferObjectAsync := CUDARTGetProcAddress
-    ('cudaGLUnmapBufferObjectAsync');
-  cudaGLUnregisterBufferObject := CUDARTGetProcAddress
-    ('cudaGLUnregisterBufferObject');
-  cudaGraphicsGLRegisterBuffer := CUDARTGetProcAddress
-    ('cudaGraphicsGLRegisterBuffer');
-  cudaGraphicsGLRegisterImage := CUDARTGetProcAddress
-    ('cudaGraphicsGLRegisterImage');
+  cudaGLUnmapBufferObjectAsync := CUDARTGetProcAddress('cudaGLUnmapBufferObjectAsync');
+  cudaGLUnregisterBufferObject := CUDARTGetProcAddress('cudaGLUnregisterBufferObject');
+  cudaGraphicsGLRegisterBuffer := CUDARTGetProcAddress('cudaGraphicsGLRegisterBuffer');
+  cudaGraphicsGLRegisterImage := CUDARTGetProcAddress('cudaGraphicsGLRegisterImage');
   cudaGraphicsMapResources := CUDARTGetProcAddress('cudaGraphicsMapResources');
-  cudaGraphicsResourceGetMappedPointer :=
-    CUDARTGetProcAddress('cudaGraphicsResourceGetMappedPointer');
-  cudaGraphicsResourceSetMapFlags :=
-    CUDARTGetProcAddress('cudaGraphicsResourceSetMapFlags');
-  cudaGraphicsSubResourceGetMappedArray :=
-    CUDARTGetProcAddress('cudaGraphicsSubResourceGetMappedArray');
-  cudaGraphicsUnmapResources := CUDARTGetProcAddress
-    ('cudaGraphicsUnmapResources');
-  cudaGraphicsUnregisterResource := CUDARTGetProcAddress
-    ('cudaGraphicsUnregisterResource');
+  cudaGraphicsResourceGetMappedPointer := CUDARTGetProcAddress('cudaGraphicsResourceGetMappedPointer');
+  cudaGraphicsResourceSetMapFlags := CUDARTGetProcAddress('cudaGraphicsResourceSetMapFlags');
+  cudaGraphicsSubResourceGetMappedArray := CUDARTGetProcAddress('cudaGraphicsSubResourceGetMappedArray');
+  cudaGraphicsUnmapResources := CUDARTGetProcAddress('cudaGraphicsUnmapResources');
+  cudaGraphicsUnregisterResource := CUDARTGetProcAddress('cudaGraphicsUnregisterResource');
   cudaHostAlloc := CUDARTGetProcAddress('cudaHostAlloc');
   cudaHostGetDevicePointer := CUDARTGetProcAddress('cudaHostGetDevicePointer');
   cudaHostGetFlags := CUDARTGetProcAddress('cudaHostGetFlags');
@@ -992,8 +967,7 @@ begin
   cudaMemcpy2DArrayToArray := CUDARTGetProcAddress('cudaMemcpy2DArrayToArray');
   cudaMemcpy2DAsync := CUDARTGetProcAddress('cudaMemcpy2DAsync');
   cudaMemcpy2DFromArray := CUDARTGetProcAddress('cudaMemcpy2DFromArray');
-  cudaMemcpy2DFromArrayAsync := CUDARTGetProcAddress
-    ('cudaMemcpy2DFromArrayAsync');
+  cudaMemcpy2DFromArrayAsync := CUDARTGetProcAddress('cudaMemcpy2DFromArrayAsync');
   cudaMemcpy2DToArray := CUDARTGetProcAddress('cudaMemcpy2DToArray');
   cudaMemcpy2DToArrayAsync := CUDARTGetProcAddress('cudaMemcpy2DToArrayAsync');
   cudaMemcpy3D := CUDARTGetProcAddress('cudaMemcpy3D');
@@ -1003,8 +977,7 @@ begin
   cudaMemcpyFromArray := CUDARTGetProcAddress('cudaMemcpyFromArray');
   cudaMemcpyFromArrayAsync := CUDARTGetProcAddress('cudaMemcpyFromArrayAsync');
   cudaMemcpyFromSymbol := CUDARTGetProcAddress('cudaMemcpyFromSymbol');
-  cudaMemcpyFromSymbolAsync := CUDARTGetProcAddress
-    ('cudaMemcpyFromSymbolAsync');
+  cudaMemcpyFromSymbolAsync := CUDARTGetProcAddress('cudaMemcpyFromSymbolAsync');
   cudaMemcpyToArray := CUDARTGetProcAddress('cudaMemcpyToArray');
   cudaMemcpyToArrayAsync := CUDARTGetProcAddress('cudaMemcpyToArrayAsync');
   cudaMemcpyToSymbol := CUDARTGetProcAddress('cudaMemcpyToSymbol');

+ 39 - 40
Source/GLSCUDAUtility.pas → Source/GLS.CUDAUtility.pas

@@ -1,17 +1,19 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-{
+
+unit GLS.CUDAUtility;
+
+(*
     GLScene CUDA Utility
     Wraper of cutil.
-}
-unit GLSCUDAUtility;
+*)
 
 interface
 
 {$IFDEF MSWINDOWS}
 uses
-  Windows;
+  Winapi.Windows;
 {$ENDIF}
 
 
@@ -24,68 +26,68 @@ const
 
 var
   cutFindFilePath: function(const filename: PAnsiChar; const executablePath: PAnsiChar): PAnsiChar;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutLoadPGMf: function(const filename: PAnsiChar; var data: System.PSingle; var w: Integer; var h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutSavePGMf: function(const filename: PAnsiChar; data: System.PSingle; w: Integer; h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutLoadPGMub: function(const filename: PAnsiChar; var data: PByte; var w: Integer; var h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutLoadPPMub: function(const filename: PAnsiChar; var data: PByte; var w: Integer; var h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutLoadPPM4ub: function(const filename: PAnsiChar; var data: PByte; var w: Integer; var h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutLoadPGMi: function(const filename: PAnsiChar; var data: PInteger; var w: Integer; var h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutLoadPGMs: function(const filename: PAnsiChar; var data: PWord; var w: Integer; var h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutSavePGMub: function(const filename: PAnsiChar; data: PByte; w: Integer; h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutSavePPMub: function(const filename: PAnsiChar; data: PByte; w: Integer; h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutSavePPM4ub: function(const filename: PAnsiChar; data: PByte; w: Integer; h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutSavePGMi: function(const filename: PAnsiChar; data: PInteger; w: Integer; h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutSavePGMs: function(const filename: PAnsiChar; data: PWord; w: Integer; h: Integer): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutComparef: function(const reference: PSingle; const data: PSingle; const len: Cardinal): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutComparei: function(const reference: PInteger; const data: PInteger; const len: Cardinal): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutCompareuit: function(const reference: PInteger; const data: PInteger; const len: Cardinal; const epsilon: Single;
     const threshold: Single): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutCompareub: function(const reference: PByte; const data: PByte; const len: Cardinal): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutCompareubt: function(const reference: PByte; const data: PByte; const len: Cardinal; const epsilon: Single;
     const threshold: Single): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutCompareube: function(const reference: PByte; const data: PByte; const len: Cardinal; const epsilon: Single): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutComparefe: function(const reference: PSingle; const data: PSingle; const len: Cardinal; const epsilon: Single): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutComparefet: function(const reference: PSingle; const data: PSingle; const len: Cardinal; const epsilon: Single;
     const threshold: Single): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutCompareL2fe: function(const reference: PSingle; const data: PSingle; const len: Cardinal; const epsilon: Single): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutCreateTimer: function(var name: Cardinal): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutStartTimer: function(const name: Cardinal): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutStopTimer: function(const name: Cardinal): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutResetTimer: function(const name: Cardinal): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutDeleteTimer: function(const name: Cardinal): Boolean;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutGetTimerValue: function(const name: Cardinal): Single;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutGetAverageTimerValue: function(const name: Cardinal): Single;
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
   cutFree: procedure(ptr: Pointer);
-{$IFDEF CUDA_STDCALL}stdcall; {$ELSE}cdecl; {$ENDIF}
+{$IFDEF MSWINDOWS}stdcall; {$ELSE}cdecl; {$ENDIF}
 function InitCUTIL: Boolean;
 procedure CloseCUTIL;
 function InitCUTILFromLibrary(const LibName: WideString): Boolean;
@@ -98,15 +100,12 @@ implementation
 const
   INVALID_MODULEHANDLE = 0;
 
-  // ************** Windows specific ********************
 {$IFDEF MSWINDOWS}
-
+// ************** Windows specific ********************
 var
   CUTILHandle: HINST = INVALID_MODULEHANDLE;
-{$ENDIF}
-  // ************** UNIX specific ********************
-{$IFDEF UNIX}
-
+{$ELSE}
+// ************** UNIX specific ********************
 var
   CUTILHandle: TLibHandle = INVALID_MODULEHANDLE;
 {$ENDIF}

+ 8 - 6
Source/OpenCL.pas → Source/GLS.OpenCL.pas

@@ -1,10 +1,7 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-   Conversion of OpenCL cl.h header file into CL.pas
-   from http://www.khronos.org/registry/cl/.
-*)
+
 (****************************************************************************
  * Copyright (c) 2008-2020 The Khronos Group Inc.
  *
@@ -33,13 +30,18 @@
  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  **************************************************************************)
 
-unit OpenCL;
+unit GLS.OpenCL;
+
+(*
+   Conversion of OpenCL cl.h header file into CL.pas
+   from http://www.khronos.org/registry/cl/.
+*)
 
 interface
 
 uses
   Winapi.Windows,
-  OpenCL_Platform;
+  GLS.OpenCL_Platform;
 
 const
   {$IFDEF MSWINDOWS}

+ 9 - 7
Source/OpenCL_GL.pas → Source/GLS.OpenCL_GL.pas

@@ -1,10 +1,7 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-   Conversion of OpenCL header file: cl_gl.h to CL_GL.pas,
-   from http://www.khronos.org/registry/cl/.
-*)
+
 ///*****************************************************************************
 // * Copyright (c) 2008-2020 The Khronos Group Inc.
 // *
@@ -28,13 +25,18 @@
 // * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 // ****************************************************************************/
 
-unit OpenCL_GL;
+unit GLS.OpenCL_GL;
+
+(*
+   Conversion of OpenCL header file: cl_gl.h to CL_GL.pas,
+   from http://www.khronos.org/registry/cl/.
+*)
 
 interface
 
 uses
-  OpenCL,
-  OpenCL_Platform;
+  GLS.OpenCL,
+  GLS.OpenCL_Platform;
 
 type
   PGLuint = ^Cardinal;

+ 7 - 5
Source/OpenCL_Platform.pas → Source/GLS.OpenCL_Platform.pas

@@ -1,10 +1,7 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(* 
-  Conversion of OpenCL header file: cl_platform.h to CL_Platform.pas,
-  from http://www.khronos.org/registry/cl/.
-*)
+
 (****************************************************************************
  * Copyright (c) 2008-2020 The Khronos Group Inc.
  *
@@ -33,7 +30,12 @@
  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  **************************************************************************)
 
-unit OpenCL_Platform;
+unit GLS.OpenCL_Platform;
+
+(*
+  Conversion of OpenCL header file: cl_platform.h to CL_Platform.pas,
+  from http://www.khronos.org/registry/cl/.
+*)
 
 interface
 

+ 8 - 8
Source/GLSParallelRegister.pas → Source/GLS.ParallelRegister.pas

@@ -4,7 +4,7 @@
 {
    Registration unit for GLScene GPU Computing package. 
 }
-unit GLSParallelRegister;
+unit GLS.ParallelRegister;
 
 interface
 
@@ -66,13 +66,13 @@ implementation
 //--------------------------------------------------------------------
 
 uses
-  GLSCUDARunTime,
-  GLSCUDAContext,
-  GLSCUDA,
-  GLSCUDACompiler,
-  GLSCUDAFFTPlan,
-  GLSCUDAGraphics,
-  GLSCUDAParser,
+  GLS.CUDARunTime,
+  GLS.CUDAContext,
+  GLS.CUDA,
+  GLS.CUDACompiler,
+  GLS.CUDAFFTPlan,
+  GLS.CUDAGraphics,
+  GLS.CUDAParser,
   FCUDAEditor;
 
 function FindCuFile(var AModuleName: string): Boolean;

+ 208 - 191
Source/GLSoundFileObjects.pas

@@ -5,9 +5,8 @@
 unit GLSoundFileObjects;
 
 (*
-   Support classes for loading various fileformats.
-   These classes work together like vector file formats or Delphi's TGraphic classes.
-
+  Support classes for loading various fileformats.
+  These classes work together like vector file formats or Delphi's TGraphic classes.
 *)
 
 interface
@@ -20,90 +19,93 @@ uses
   System.SysUtils,
   VCL.Consts,
 
-  GLApplicationFileIO,
-  GLCrossPlatform;
+  GLApplicationFileIO;
 
 type
 
-   {Defines a sound sampling quality. }
-	TGLSoundSampling = class (TPersistent)
-	   private
-         FOwner : TPersistent;
-         FFrequency : Integer;
-         FNbChannels : Integer;
-         FBitsPerSample : Integer;
-	   protected
-         function GetOwner : TPersistent; override;
-	   public
-	      constructor Create(AOwner: TPersistent);
-         destructor Destroy; override;
-	      procedure Assign(Source: TPersistent); override;
-         function BytesPerSec : Integer;
-         function BytesPerSample : Integer;
-         function WaveFormat : TWaveFormatEx;
-     published
-         {Sampling frequency in Hz (= samples per sec) }
-         property Frequency : Integer read FFrequency write FFrequency default 22050;
-         {Nb of sampling channels. 
-            1 = mono, 2 = stereo, etc. }
-         property NbChannels : Integer read FNbChannels write FNbChannels default 1;
-         {Nb of bits per sample. 
-            Common values are 8 and 16 bits. }
-         property BitsPerSample : Integer read FBitsPerSample write FBitsPerSample default 8;
-	end;
-
-   {Abstract base class for different Sound file formats. 
-      The actual implementation for these files (WAV, RAW...) must be done
-      seperately. The concept for TGLSoundFile is very similar to TGraphic
-      (see Delphi Help). 
-      Default implementation for LoadFromFile/SaveToFile are to directly call the
-      relevent stream-based methods, ie. you will just have to override the stream
-      methods in most cases. }
-   TGLSoundFile = class (TGLDataFile)
-      private
-         FSampling : TGLSoundSampling;
-      protected
-         procedure SetSampling(const val : TGLSoundSampling);
-      public
-	      constructor Create(AOwner: TPersistent); override;
-         destructor Destroy; override;
-         procedure PlayOnWaveOut; virtual;
-         {Returns a pointer to the sample data viewed as an in-memory WAV File. }
-	      function WAVData : Pointer; virtual; abstract;
-         {Returns the size (in bytes) of the WAVData. }
-         function WAVDataSize : Integer; virtual; abstract;
-         {Returns a pointer to the sample data viewed as an in-memory PCM buffer. }
-	      function PCMData : Pointer; virtual; abstract;
-         {Length of PCM data, in bytes. }
-	      function LengthInBytes : Integer; virtual; abstract;
-         {Nb of intensity samples in the sample. }
-	      function LengthInSamples : Integer;
-         {Length of play of the sample at nominal speed in seconds. }
-	      function LengthInSec : Single;
-         property Sampling : TGLSoundSampling read FSampling write SetSampling;
-   end;
-
-   TGLSoundFileClass = class of TGLSoundFile;
-
-   TGLSoundFileFormat = record
-      SoundFileClass : TGLSoundFileClass;
-      Extension      : String;
-      Description    : String;
-      DescResID      : Integer;
-   end;
-   PSoundFileFormat = ^TGLSoundFileFormat;
-
-   TGLSoundFileFormatsList = class(TList)
-      public
-         destructor Destroy; override;
-         procedure Add(const Ext, Desc: String; DescID: Integer; AClass: TGLSoundFileClass);
-         function FindExt(Ext: string): TGLSoundFileClass;
-         procedure Remove(AClass: TGLSoundFileClass);
-         procedure BuildFilterStrings(SoundFileClass: TGLSoundFileClass; out Descriptions, Filters: string);
-   end;
-
-function GetGLSoundFileFormats : TGLSoundFileFormatsList;
-procedure RegisterSoundFileFormat(const AExtension, ADescription: String; AClass: TGLSoundFileClass);
+  // Defines a sound sampling quality.
+  TGLSoundSampling = class(TPersistent)
+  private
+    FOwner: TPersistent;
+    FFrequency: Integer;
+    FNbChannels: Integer;
+    FBitsPerSample: Integer;
+  protected
+    function GetOwner: TPersistent; override;
+  public
+    constructor Create(AOwner: TPersistent);
+    destructor Destroy; override;
+    procedure Assign(Source: TPersistent); override;
+    function BytesPerSec: Integer;
+    function BytesPerSample: Integer;
+    function WaveFormat: TWaveFormatEx;
+  published
+    // Sampling frequency in Hz (= samples per sec)
+    property Frequency: Integer read FFrequency write FFrequency default 22050;
+    (* Nb of sampling channels.
+      1 = mono, 2 = stereo, etc. *)
+    property NbChannels: Integer read FNbChannels write FNbChannels default 1;
+    (* Nb of bits per sample.
+      Common values are 8 and 16 bits. *)
+    property BitsPerSample: Integer read FBitsPerSample write FBitsPerSample default 8;
+  end;
+
+  (* Abstract base class for different Sound file formats.
+    The actual implementation for these files (WAV, RAW...) must be done
+    seperately. The concept for TGLSoundFile is very similar to TGraphic
+    (see Delphi Help).
+    Default implementation for LoadFromFile/SaveToFile are to directly call the
+    relevent stream-based methods, ie. you will just have to override the stream
+    methods in most cases. *)
+  TGLSoundFile = class(TGLDataFile)
+  private
+    FSampling: TGLSoundSampling;
+  protected
+    procedure SetSampling(const val: TGLSoundSampling);
+  public
+    constructor Create(AOwner: TPersistent); override;
+    destructor Destroy; override;
+    procedure PlayOnWaveOut; virtual;
+    // Returns a pointer to the sample data viewed as an in-memory WAV File.
+    function WAVData: Pointer; virtual; abstract;
+    // Returns the size (in bytes) of the WAVData.
+    function WAVDataSize: Integer; virtual; abstract;
+    // Returns a pointer to the sample data viewed as an in-memory PCM buffer.
+    function PCMData: Pointer; virtual; abstract;
+    // Length of PCM data, in bytes.
+    function LengthInBytes: Integer; virtual; abstract;
+    // Nb of intensity samples in the sample.
+    function LengthInSamples: Integer;
+    // Length of play of the sample at nominal speed in seconds.
+    function LengthInSec: Single;
+    property Sampling: TGLSoundSampling read FSampling write SetSampling;
+  end;
+
+  TGLSoundFileClass = class of TGLSoundFile;
+
+  TGLSoundFileFormat = record
+    SoundFileClass: TGLSoundFileClass;
+    Extension: String;
+    Description: String;
+    DescResID: Integer;
+  end;
+
+  PSoundFileFormat = ^TGLSoundFileFormat;
+
+  TGLSoundFileFormatsList = class(TList)
+  public
+    destructor Destroy; override;
+    procedure Add(const Ext, Desc: String; DescID: Integer;
+      AClass: TGLSoundFileClass);
+    function FindExt(Ext: string): TGLSoundFileClass;
+    procedure Remove(AClass: TGLSoundFileClass);
+    procedure BuildFilterStrings(SoundFileClass: TGLSoundFileClass;
+      out Descriptions, Filters: string);
+  end;
+
+function GetGLSoundFileFormats: TGLSoundFileFormatsList;
+procedure RegisterSoundFileFormat(const AExtension, ADescription: String;
+  AClass: TGLSoundFileClass);
 procedure UnregisterSoundFileClass(AClass: TGLSoundFileClass);
 
 // ------------------------------------------------------------------
@@ -111,25 +113,26 @@ implementation
 // ------------------------------------------------------------------
 
 var
-   vSoundFileFormats : TGLSoundFileFormatsList;
+  vSoundFileFormats: TGLSoundFileFormatsList;
 
-function GetGLSoundFileFormats : TGLSoundFileFormatsList;
+function GetGLSoundFileFormats: TGLSoundFileFormatsList;
 begin
-   if not Assigned(vSoundFileFormats)then
-      vSoundFileFormats := TGLSoundFileFormatsList.Create;
-   Result := vSoundFileFormats;
+  if not Assigned(vSoundFileFormats) then
+    vSoundFileFormats := TGLSoundFileFormatsList.Create;
+  Result := vSoundFileFormats;
 end;
 
-procedure RegisterSoundFileFormat(const AExtension, ADescription: String; AClass: TGLSoundFileClass);
+procedure RegisterSoundFileFormat(const AExtension, ADescription: String;
+  AClass: TGLSoundFileClass);
 begin
-   RegisterClass(AClass);
-	GetGLSoundFileFormats.Add(AExtension, ADescription, 0, AClass);
+  RegisterClass(AClass);
+  GetGLSoundFileFormats.Add(AExtension, ADescription, 0, AClass);
 end;
 
 procedure UnregisterSoundFileClass(AClass: TGLSoundFileClass);
 begin
-	if Assigned(vSoundFileFormats) then
-		vSoundFileFormats.Remove(AClass);
+  if Assigned(vSoundFileFormats) then
+    vSoundFileFormats.Remove(AClass);
 end;
 
 // ------------------
@@ -138,51 +141,54 @@ end;
 
 constructor TGLSoundSampling.Create(AOwner: TPersistent);
 begin
-	inherited Create;
-   FOwner:=AOwner;
-   FFrequency:=22050;
-   FNbChannels:=1;
-   FBitsPerSample:=8;
+  inherited Create;
+  FOwner := AOwner;
+  FFrequency := 22050;
+  FNbChannels := 1;
+  FBitsPerSample := 8;
 end;
 
 destructor TGLSoundSampling.Destroy;
 begin
-	inherited Destroy;
+  inherited Destroy;
 end;
 
 procedure TGLSoundSampling.Assign(Source: TPersistent);
 begin
-   if Source is TGLSoundSampling then begin
-      FFrequency:=TGLSoundSampling(Source).Frequency;
-      FNbChannels:=TGLSoundSampling(Source).NbChannels;
-      FBitsPerSample:=TGLSoundSampling(Source).BitsPerSample;
-   end else inherited;
+  if Source is TGLSoundSampling then
+  begin
+    FFrequency := TGLSoundSampling(Source).Frequency;
+    FNbChannels := TGLSoundSampling(Source).NbChannels;
+    FBitsPerSample := TGLSoundSampling(Source).BitsPerSample;
+  end
+  else
+    inherited;
 end;
 
-function TGLSoundSampling.GetOwner : TPersistent;
+function TGLSoundSampling.GetOwner: TPersistent;
 begin
-   Result:=FOwner;
+  Result := FOwner;
 end;
 
-function TGLSoundSampling.BytesPerSec : Integer;
+function TGLSoundSampling.BytesPerSec: Integer;
 begin
-   Result:=(FFrequency*FBitsPerSample*FNbChannels) shr 3;
+  Result := (FFrequency * FBitsPerSample * FNbChannels) shr 3;
 end;
 
-function TGLSoundSampling.BytesPerSample : Integer;
+function TGLSoundSampling.BytesPerSample: Integer;
 begin
-   Result:=FBitsPerSample shr 3;
+  Result := FBitsPerSample shr 3;
 end;
 
-function TGLSoundSampling.WaveFormat : TWaveFormatEx;
+function TGLSoundSampling.WaveFormat: TWaveFormatEx;
 begin
-   Result.nSamplesPerSec:=Frequency;
-   Result.nChannels:=NbChannels;
-   Result.wFormatTag:=Wave_Format_PCM;
-   Result.nAvgBytesPerSec:=BytesPerSec;
-   Result.wBitsPerSample:=BitsPerSample;
-   Result.nBlockAlign:=NbChannels*BytesPerSample;
-   Result.cbSize:=0;
+  Result.nSamplesPerSec := Frequency;
+  Result.nChannels := NbChannels;
+  Result.wFormatTag := Wave_Format_PCM;
+  Result.nAvgBytesPerSec := BytesPerSec;
+  Result.wBitsPerSample := BitsPerSample;
+  Result.nBlockAlign := NbChannels * BytesPerSample;
+  Result.cbSize := 0;
 end;
 
 // ------------------
@@ -191,39 +197,40 @@ end;
 
 constructor TGLSoundFile.Create(AOwner: TPersistent);
 begin
-   inherited;
-   FSampling:=TGLSoundSampling.Create(Self);
+  inherited;
+  FSampling := TGLSoundSampling.Create(Self);
 end;
 
 destructor TGLSoundFile.Destroy;
 begin
-   FSampling.Free;
-   inherited;
+  FSampling.Free;
+  inherited;
 end;
 
-procedure TGLSoundFile.SetSampling(const val : TGLSoundSampling);
+procedure TGLSoundFile.SetSampling(const val: TGLSoundSampling);
 begin
-   FSampling.Assign(val);
+  FSampling.Assign(val);
 end;
 
 procedure TGLSoundFile.PlayOnWaveOut;
 begin
-//   GLSoundFileObjects.PlayOnWaveOut(PCMData, LengthInSamples, Sampling);
+  // GLSoundFileObjects.PlayOnWaveOut(PCMData, LengthInSamples, Sampling);
 end;
 
-function TGLSoundFile.LengthInSamples : Integer;
+function TGLSoundFile.LengthInSamples: Integer;
 var
-   d : Integer;
+  d: Integer;
 begin
-   d:=Sampling.BytesPerSample*Sampling.NbChannels;
-   if d>0 then
-   	Result:=LengthInBytes div d
-   else Result:=0;
+  d := Sampling.BytesPerSample * Sampling.NbChannels;
+  if d > 0 then
+    Result := LengthInBytes div d
+  else
+    Result := 0;
 end;
 
-function TGLSoundFile.LengthInSec : Single;
+function TGLSoundFile.LengthInSec: Single;
 begin
-	Result:=LengthInBytes/Sampling.BytesPerSec;
+  Result := LengthInBytes / Sampling.BytesPerSec;
 end;
 
 // ------------------
@@ -232,91 +239,101 @@ end;
 
 destructor TGLSoundFileFormatsList.Destroy;
 var
-   i : Integer;
+  i: Integer;
 begin
-   for i:=0 to Count-1 do Dispose(PSoundFileFormat(Items[i]));
-   inherited;
+  for i := 0 to Count - 1 do
+    Dispose(PSoundFileFormat(Items[i]));
+  inherited;
 end;
 
 procedure TGLSoundFileFormatsList.Add(const Ext, Desc: String; DescID: Integer;
-                                     AClass: TGLSoundFileClass);
+  AClass: TGLSoundFileClass);
 var
-   newRec: PSoundFileFormat;
+  newRec: PSoundFileFormat;
 begin
-   New(newRec);
-   with newRec^ do begin
-      Extension := AnsiLowerCase(Ext);
-      SoundFileClass := AClass;
-      Description := Desc;
-      DescResID := DescID;
-   end;
-   inherited Add(NewRec);
+  New(newRec);
+  with newRec^ do
+  begin
+    Extension := AnsiLowerCase(Ext);
+    SoundFileClass := AClass;
+    Description := Desc;
+    DescResID := DescID;
+  end;
+  inherited Add(newRec);
 end;
 
 function TGLSoundFileFormatsList.FindExt(Ext: string): TGLSoundFileClass;
 var
-   i : Integer;
+  i: Integer;
 begin
-   Ext := AnsiLowerCase(Ext);
-   for I := Count-1 downto 0 do with PSoundFileFormat(Items[I])^ do
-      if (Extension = Ext) or ('.'+Extension = Ext) then begin
-         Result := SoundFileClass;
-         Exit;
+  Ext := AnsiLowerCase(Ext);
+  for i := Count - 1 downto 0 do
+    with PSoundFileFormat(Items[i])^ do
+      if (Extension = Ext) or ('.' + Extension = Ext) then
+      begin
+        Result := SoundFileClass;
+        Exit;
       end;
-   Result := nil;
+  Result := nil;
 end;
 
 procedure TGLSoundFileFormatsList.Remove(AClass: TGLSoundFileClass);
 var
-   i : Integer;
-   p : PSoundFileFormat;
+  i: Integer;
+  p: PSoundFileFormat;
 begin
-   for I := Count-1 downto 0 do begin
-      P := PSoundFileFormat(Items[I]);
-      if P^.SoundFileClass.InheritsFrom(AClass) then begin
-         Dispose(P);
-         Delete(I);
-      end;
-   end;
+  for i := Count - 1 downto 0 do
+  begin
+    p := PSoundFileFormat(Items[i]);
+    if p^.SoundFileClass.InheritsFrom(AClass) then
+    begin
+      Dispose(p);
+      Delete(i);
+    end;
+  end;
 end;
 
-procedure TGLSoundFileFormatsList.BuildFilterStrings(SoundFileClass: TGLSoundFileClass;
-                                                    out Descriptions, Filters: string);
+procedure TGLSoundFileFormatsList.BuildFilterStrings(SoundFileClass
+  : TGLSoundFileClass; out Descriptions, Filters: string);
 var
-   c, i : Integer;
-   p    : PSoundFileFormat;
+  c, i: Integer;
+  p: PSoundFileFormat;
 begin
-   Descriptions := '';
-   Filters := '';
-   C := 0;
-   for I := Count-1 downto 0 do begin
-      P := PSoundFileFormat(Items[I]);
-      if P^.SoundFileClass.InheritsFrom(SoundFileClass) and (P^.Extension <> '') then
-         with P^ do begin
-            if C <> 0 then begin
-               Descriptions := Descriptions+'|';
-               Filters := Filters+';';
-            end;
-            if (Description = '') and (DescResID <> 0) then
-               Description := LoadStr(DescResID);
-            FmtStr(Descriptions, '%s%s (*.%s)|*.%2:s',
-                   [Descriptions, Description, Extension]);
-            FmtStr(Filters, '%s*.%s', [Filters, Extension]);
-            Inc(C);
-         end;
-   end;
-   if C > 1 then
-      FmtStr(Descriptions, '%s (%s)|%1:s|%s', [sAllFilter, Filters, Descriptions]);
+  Descriptions := '';
+  Filters := '';
+  c := 0;
+  for i := Count - 1 downto 0 do
+  begin
+    p := PSoundFileFormat(Items[i]);
+    if p^.SoundFileClass.InheritsFrom(SoundFileClass) and (p^.Extension <> '')
+    then
+      with p^ do
+      begin
+        if c <> 0 then
+        begin
+          Descriptions := Descriptions + '|';
+          Filters := Filters + ';';
+        end;
+        if (Description = '') and (DescResID <> 0) then
+          Description := LoadStr(DescResID);
+        FmtStr(Descriptions, '%s%s (*.%s)|*.%2:s', [Descriptions, Description,
+          Extension]);
+        FmtStr(Filters, '%s*.%s', [Filters, Extension]);
+        Inc(c);
+      end;
+  end;
+  if c > 1 then
+    FmtStr(Descriptions, '%s (%s)|%1:s|%s',
+      [sAllFilter, Filters, Descriptions]);
 end;
 
 // ------------------------------------------------------------------
 initialization
+
 // ------------------------------------------------------------------
 
 finalization
 
-  FreeAndNil(vSoundFileFormats);
+FreeAndNil(vSoundFileFormats);
 
 end.
-
-

+ 92 - 95
Source/GLTexture.pas

@@ -150,38 +150,38 @@ type
     destructor Destroy; override;
     property OwnerTexture: TGLTexture read FOwnerTexture write FOwnerTexture;
     procedure NotifyChange(Sender: TObject); override;
-    {Save textureImage to file.
+    (* Save textureImage to file.
      This may not save a picture, but for instance, parameters, if the
-     textureImage is a procedural texture. }
+     textureImage is a procedural texture. *)
     procedure SaveToFile(const fileName: string); virtual;
-    {Load textureImage from a file.
+    (* Load textureImage from a file.
      This may not load a picture, but for instance, parameters, if the
      textureImage is a procedural texture.
      Subclasses should invoke inherited which will take care of the
-     "OnTextureNeeded" stuff. }
+     "OnTextureNeeded" stuff. *)
     procedure LoadFromFile(const fileName: string); virtual;
-    {Returns a user-friendly denomination for the class.
+    (* Returns a user-friendly denomination for the class.
      This denomination is used for picking a texture image class
-     in the IDE expert. }
+     in the IDE expert. *)
     class function FriendlyName: string; virtual;
-    {Returns a user-friendly description for the class.
+    (* Returns a user-friendly description for the class.
      This denomination is used for helping the user when picking a
      texture image class in the IDE expert. If it's not overriden,
-     takes its value from FriendlyName. }
+     takes its value from FriendlyName. *)
     class function FriendlyDescription: string; virtual;
-    {Request reload/refresh of data upon next use. }
+    // Request reload/refresh of data upon next use.
     procedure Invalidate; virtual;
-     {Returns image's bitmap handle.
+    (* Returns image's bitmap handle.
      If the actual image is not a windows bitmap (BMP), descendants should
-     take care of properly converting to bitmap. }
+     take care of properly converting to bitmap. *)
     function GetBitmap32: TGLImage; virtual;
-    {Request for unloading bitmapData, to free some memory.
+    (* Request for unloading bitmapData, to free some memory.
      This one is invoked when GLScene no longer needs the Bitmap data
      it got through a call to GetHBitmap.
      Subclasses may ignore this call if the HBitmap was obtained at
-     no particular memory cost. }
+     no particular memory cost. *)
     procedure ReleaseBitmap32; virtual;
-    //{AsBitmap : Returns the TextureImage as a TBitmap }
+    // AsBitmap : Returns the TextureImage as a TBitmap
     function AsBitmap: TBitmap;
     procedure AssignToBitmap(aBitmap: TBitmap);
      property Width: Integer read GetWidth;
@@ -194,9 +194,9 @@ type
 
   TGLTextureImageClass = class of TGLTextureImage;
 
-  {A texture image with no specified content, only a size.
-       This texture image type is of use if the context of your texture is
-       calculated at run-time (with a TGLMemoryViewer for instance). }
+  (* A texture image with no specified content, only a size.
+     This texture image type is of use if the context of your texture is
+     calculated at run-time (with a TGLMemoryViewer for instance). *)
   TGLBlankImage = class(TGLTextureImage)
   private
     procedure SetWidth(val: Integer);
@@ -207,11 +207,11 @@ type
   protected
     fBitmap: TGLImage;
     fWidth, fHeight, fDepth: Integer;
-    {Store a icolor format, because fBitmap is not always defined}
+    // Store a icolor format, because fBitmap is not always defined
     fColorFormat: Cardinal;
-    {Blank Cube Map }
+    // Blank Cube Map
     fCubeMap: Boolean;
-    {Flag to interparate depth as layer }
+    // Flag to interparate depth as layer
     fArray: Boolean;
     function GetWidth: Integer; override;
     function GetHeight: Integer; override;
@@ -228,7 +228,7 @@ type
     class function FriendlyName: string; override;
     class function FriendlyDescription: string; override;
   published
-    {Width, heigth and depth of the blank image (for memory allocation). }
+    // Width, heigth and depth of the blank image (for memory allocation).
     property Width: Integer read GetWidth write SetWidth default 256;
     property Height: Integer read GetHeight write SetHeight default 256;
     property Depth: Integer read GetDepth write SetDepth default 0;
@@ -237,7 +237,7 @@ type
     property ColorFormat: Cardinal read fColorFormat write fColorFormat;
   end;
 
-  {Base class for image data classes internally based on a TPicture. }
+  // Base class for image data classes internally based on a TPicture.
   TGLPictureImage = class(TGLTextureImage)
   private
     FBitmap: TGLImage;
@@ -255,23 +255,23 @@ type
     constructor Create(AOwner: TPersistent); override;
     destructor Destroy; override;
     procedure Assign(Source: TPersistent); override;
-    {Use this function if you are going to modify the Picture directly.
-     Each invokation MUST be balanced by a call to EndUpdate. }
+    (* Use this function if you are going to modify the Picture directly.
+     Each invokation MUST be balanced by a call to EndUpdate. *)
     procedure BeginUpdate;
-    {Ends a direct picture modification session. Follows a BeginUpdate. }
+    // Ends a direct picture modification session. Follows a BeginUpdate.
     procedure EndUpdate;
     function GetBitmap32: TGLImage; override;
     procedure ReleaseBitmap32; override;
-    {Holds the image content. }
+    // Holds the image content.
     property Picture: TPicture read GetPicture write SetPicture;
   end;
 
-  {Stores any image compatible with Delphi's TPicture mechanism.
+  (* Stores any image compatible with Delphi's TPicture mechanism.
    The picture's data is actually stored into the DFM, the original
-   picture name or path is not remembered. It is similar in behaviour
-   to Delphi's TImage.
+   picture name or path is not remembered.
+   It is similar in behaviour of TImage.
    Note that if original image is for instance JPEG format, only the JPEG
-   data will be stored in the DFM (compact) }
+   data will be stored in the DFM (compact) *)
   TGLPersistentImage = class(TGLPictureImage)
   public
     constructor Create(AOwner: TPersistent); override;
@@ -285,8 +285,8 @@ type
     property Picture;
   end;
 
-  {Uses a picture whose data is found in a file (only filename is stored).
-   The image is unloaded after upload to OpenGL. }
+  (* Uses a picture whose data is found in a file (only filename is stored).
+   The image is unloaded after upload to OpenGL. *)
   TGLPicFileImage = class(TGLPictureImage)
   private
     FPictureFileName: string;
@@ -304,8 +304,8 @@ type
     procedure Assign(Source: TPersistent); override;
     // Only picture file name is saved
     procedure SaveToFile(const fileName: string); override;
-    {Load picture file name or use fileName as picture filename.
-       The autodetection is based on the filelength and presence of zeros. }
+    (* Load picture file name or use fileName as picture filename.
+       The autodetection is based on the filelength and presence of zeros. *)
     procedure LoadFromFile(const fileName: string); override;
     class function FriendlyName: string; override;
     class function FriendlyDescription: string; override;
@@ -313,15 +313,15 @@ type
     function GetBitmap32: TGLImage; override;
     procedure Invalidate; override;
   published
-    {Filename of the picture to use. }
+    // Filename of the picture to use.
     property PictureFileName: string read FPictureFileName write SetPictureFileName;
   end;
 
  TGLCubeMapTarget = Integer;
 
-  {A texture image used for specifying and stroing a cube map.
-       Not unlike TGLPictureImage, but storing 6 of them instead of just one.
-       Saving & loading as a whole currently not supported. }
+  (* A texture image used for specifying and stroing a cube map.
+     Not unlike TGLPictureImage, but storing 6 of them instead of just one.
+     Saving & loading as a whole currently not supported. *)
   TGLCubeMapImage = class(TGLTextureImage)
   private
     FImage: TGLImage;
@@ -341,8 +341,8 @@ type
     procedure Assign(Source: TPersistent); override;
     function GetBitmap32: TGLImage; override;
     procedure ReleaseBitmap32; override;
-    {Use this function if you are going to modify the Picture directly.
-     Each invokation MUST be balanced by a call to EndUpdate. }
+    (* Use this function if you are going to modify the Picture directly.
+     Each invokation MUST be balanced by a call to EndUpdate. *)
     procedure BeginUpdate;
     procedure EndUpdate;
     procedure SaveToFile(const fileName: string); override;
@@ -350,7 +350,7 @@ type
     class function FriendlyName: string; override;
     class function FriendlyDescription: string; override;
     property NativeTextureTarget;
-    {Indexed access to the cube map's sub pictures. }
+    // Indexed access to the cube map's sub pictures.
     property Picture[index: TGLCubeMapTarget]: TPicture read GetPicture write SetPicture;
   published
     property PicturePX: TPicture index cmtPX read GetPicture write SetPicture;
@@ -364,11 +364,11 @@ type
   TGLTextureMappingMode = (tmmUser, tmmObjectLinear, tmmEyeLinear, tmmSphere,
     tmmCubeMapReflection, tmmCubeMapNormal, tmmCubeMapLight0, tmmCubeMapCamera);
 
-  {Defines basic texturing properties.
-       You can control texture wrapping, smoothing/filtering and of course define
-       the texture map (note that texturing is disabled by default).
-       A built-in mechanism (through ImageAlpha) allows auto-generation of an
-       Alpha channel for all bitmaps (see TGLTextureImageAlpha). }
+  (* Defines basic texturing properties.
+     You can control texture wrapping, smoothing/filtering and of course define
+     the texture map (note that texturing is disabled by default).
+     A built-in mechanism (through ImageAlpha) allows auto-generation of an
+     Alpha channel for all bitmaps (see TGLTextureImageAlpha). *)
   TGLTexture = class(TGLUpdateAbleObject)
   private
     FTextureHandle: TGLTextureHandle;
@@ -469,11 +469,11 @@ type
     procedure UnApplyMappingMode;
     procedure Apply(var rci: TGLRenderContextInfo);
     procedure UnApply(var rci: TGLRenderContextInfo);
-    {Applies to TEXTURE1 }
+    // Applies to TEXTURE1
     procedure ApplyAsTexture2(var rci: TGLRenderContextInfo; textureMatrix: PMatrix = nil);
     procedure UnApplyAsTexture2(var rci: TGLRenderContextInfo;
       reloadIdentityTextureMatrix: boolean);
-    {N=1 for TEXTURE0, N=2 for TEXTURE1, etc. }
+    // N=1 for TEXTURE0, N=2 for TEXTURE1, etc.
     procedure ApplyAsTextureN(n: Integer; var rci: TGLRenderContextInfo;
       textureMatrix: PMatrix = nil);
     procedure UnApplyAsTextureN(n: Integer; var rci: TGLRenderContextInfo;
@@ -485,102 +485,100 @@ type
     procedure DestroyHandles;
     procedure SetImageClassName(const val: string);
     function GetImageClassName: string;
-    {Returns the OpenGL memory used by the texture.
+    (* Returns the OpenGL memory used by the texture.
       The compressed size is returned if, and only if texture compression
       if active and possible, and the texture has been allocated (Handle
       is defined), otherwise the estimated size (from TextureFormat
-      specification) is returned. }
+      specification) is returned. *)
     function TextureImageRequiredMemory: Integer;
-    {Allocates the texture handle if not already allocated.
+    (* Allocates the texture handle if not already allocated.
       The texture is binded and parameters are setup, but no image data
-      is initialized by this call - for expert use only. }
+      is initialized by this call - for expert use only. *)
     function AllocateHandle: Cardinal;
     function IsHandleAllocated: Boolean;
-    {Returns OpenGL texture format corresponding to current options. }
+    // Returns OpenGL texture format corresponding to current options.
     function OpenGLTextureFormat: Integer;
-    {Returns if of float data type}
+    // Returns if of float data type
     function IsFloatType: Boolean;
-    {Is the texture enabled?.
-      Always equals to 'not Disabled'. }
+    // Is the texture enabled?. Always equals to 'not Disabled'.
     property Enabled: Boolean read GetEnabled write SetEnabled;
-    {Handle to the OpenGL texture object.
+    (* Handle to the OpenGL texture object.
       If the handle hasn't already been allocated, it will be allocated
-      by this call (ie. do not use if no OpenGL context is active!) }
+      by this call (ie. do not use if no OpenGL context is active!) *)
     property Handle: Cardinal read GetHandle;
     property TextureHandle: TGLTextureHandle read FTextureHandle;
-    {Actual width, height and depth used for last texture
-      specification binding. }
+    (* Actual width, height and depth used for last texture
+      specification binding. *)
     property TexWidth: Integer read FTexWidth;
     property TexHeight: Integer read FTexHeight;
     property TexDepth: Integer read FTexDepth;
-    {Give texture rendering context }
+    // Give texture rendering context
   published
-    {Image ClassName for enabling True polymorphism.
+    (* Image ClassName for enabling True polymorphism.
     This is ugly, but since the default streaming mechanism does a
     really bad job at storing	polymorphic owned-object properties,
     and neither TFiler nor TPicture allow proper use of the built-in
     streaming, that's the only way I found to allow a user-extensible
-    mechanism. }
+    mechanism. *)
     property ImageClassName: string read GetImageClassName write
       SetImageClassName stored StoreImageClassName;
-    {Image data for the texture.  }
+    // Image data for the texture.
     property Image: TGLTextureImage read FImage write SetImage;
-    {Automatic Image Alpha setting.
+    (* Automatic Image Alpha setting.
     Allows to control how and if the image's Alpha channel (transparency)
-    is computed. }
+    is computed. *)
     property ImageAlpha: TGLTextureImageAlpha read FImageAlpha write
       SetImageAlpha default tiaDefault;
-    {Texture brightness correction.
+    (* Texture brightness correction.
     This correction is applied upon loading a TGLTextureImage, it's a
     simple saturating scaling applied to the RGB components of
     the 32 bits image, before it is passed to OpenGL, and before
-    gamma correction (if any). }
+    gamma correction (if any). *)
     property ImageBrightness: Single read FImageBrightness write
       SetImageBrightness stored StoreBrightness;
-    {Texture gamma correction.
+    (* Texture gamma correction.
     The gamma correction is applied upon loading a TGLTextureImage,
     applied to the RGB components of the 32 bits image, before it is
-    passed to OpenGL, after brightness correction (if any). }
+    passed to OpenGL, after brightness correction (if any). *)
     property ImageGamma: Single read FImageGamma write SetImageGamma stored StoreGamma;
-    {Texture magnification filter. }
+    // Texture magnification filter.
     property MagFilter: TGLMagFilter read FMagFilter write SetMagFilter default maLinear;
-    {Texture minification filter. }
+    // Texture minification filter.
     property MinFilter: TGLMinFilter read FMinFilter write SetMinFilter default miLinearMipMapLinear;
-    {Texture application mode. }
+    // Texture application mode.
     property TextureMode: TGLTextureMode read FTextureMode write SetTextureMode default tmDecal;
-    {Wrapping mode for the texture. }
+    // Wrapping mode for the texture.
     property TextureWrap: TGLTextureWrap read FTextureWrap write SetTextureWrap default twBoth;
-    {Wrapping mode for the texture when TextureWrap=twSeparate. }
+    // Wrapping mode for the texture when TextureWrap=twSeparate.
     property TextureWrapS: TGLSeparateTextureWrap read FTextureWrapS write
       SetTextureWrapS default twRepeat;
     property TextureWrapT: TGLSeparateTextureWrap read FTextureWrapT write
       SetTextureWrapT default twRepeat;
     property TextureWrapR: TGLSeparateTextureWrap read FTextureWrapR write
       SetTextureWrapR default twRepeat;
-     {Texture format for use by the renderer.
-    See TGLTextureFormat for details. }
+    // Texture format for use by the renderer. See TGLTextureFormat for details
     property TextureFormat: TGLTextureFormat read GetTextureFormat write
       SetTextureFormat default tfDefault;
     property TextureFormatEx: TGLInternalFormat read FTextureFormat write
       SetTextureFormatEx stored StoreTextureFormatEx;
-     {Texture compression control.
+    (* Texture compression control.
     If True the compressed TextureFormat variant (the OpenGL ICD must
-    support GL_ARB_texture_compression, or this option is ignored). }
+    support GL_ARB_texture_compression, or this option is ignored). *)
     property Compression: TGLTextureCompression read FCompression write
       SetCompression default tcDefault;
-    {Specifies texture filtering quality.
+    (* Specifies texture filtering quality.
     You can choose between bilinear and trilinear filetring (anisotropic).
     The OpenGL ICD must support GL_EXT_texture_filter_anisotropic or
-    this property is ignored. }
+    this property is ignored. *)
     property FilteringQuality: TGLTextureFilteringQuality read FFilteringQuality
       write SetFilteringQuality default tfIsotropic;
-     {Texture coordinates mapping mode.
-    This property controls automatic texture coordinates generation. }
+    (* Texture coordinates mapping mode.
+    This property controls automatic texture coordinates generation. *)
     property MappingMode: TGLTextureMappingMode read FMappingMode write
       SetMappingMode default tmmUser;
-    {Texture mapping coordinates mode for S, T, R and Q axis.
+    (* Texture mapping coordinates mode for S, T, R and Q axis.
     This property stores the coordinates for automatic texture
-    coordinates generation. }
+    coordinates generation. *)
     property MappingSCoordinates: TGLCoordinates4 read GetMappingSCoordinates
       write SetMappingSCoordinates stored StoreMappingSCoordinates;
     property MappingTCoordinates: TGLCoordinates4 read GetMappingTCoordinates
@@ -589,16 +587,16 @@ type
       write SetMappingRCoordinates stored StoreMappingRCoordinates;
     property MappingQCoordinates: TGLCoordinates4 read GetMappingQCoordinates
       write SetMappingQCoordinates stored StoreMappingQCoordinates;
-     {Texture Environment color. }
+    // Texture Environment color.
     property EnvColor: TGLColor read FEnvColor write SetEnvColor;
-    {Texture Border color. }
+    // Texture Border color.
     property BorderColor: TGLColor read FBorderColor write SetBorderColor;
-    {If true, the texture is disabled (not used). }
+    // If true, the texture is disabled (not used).
     property Disabled: Boolean read FDisabled write SetDisabled default True;
-     {Normal Map scaling.
+    (* Normal Map scaling.
     Only applies when TextureFormat is tfNormalMap, this property defines
     the scaling that is applied during normal map generation (ie. controls
-    the intensity of the bumps). }
+    the intensity of the bumps). *)
     property NormalMapScale: Single read FNormalMapScale write SetNormalMapScale
       stored StoreNormalMapScale;
      property TextureCompareMode: TGLTextureCompareMode read fTextureCompareMode
@@ -607,21 +605,20 @@ type
       write SetTextureCompareFunc default cfLequal;
     property DepthTextureMode: TGLDepthTextureMode read fDepthTextureMode write
       SetDepthTextureMode default dtmLuminance;
-     {Disable image release after transfering it to VGA. }
+    // Disable image release after transfering it to VGA.
     property KeepImageAfterTransfer: Boolean read FKeepImageAfterTransfer
       write FKeepImageAfterTransfer default False;
   end;
 
   TGLTextureExItem = class(TCollectionItem, IGLTextureNotifyAble)
   private
-    { Private Decalarations }
     FTexture: TGLTexture;
     FTextureIndex: Integer;
     FTextureOffset, FTextureScale: TGLCoordinates;
     FTextureMatrixIsIdentity: Boolean;
     FTextureMatrix: TMatrix;
     FApplied: Boolean;
-     //implementing IInterface
+    // Implementing IInterface
     function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
     function _AddRef: Integer; stdcall;
     function _Release: Integer; stdcall;
@@ -680,8 +677,8 @@ function FindGLTextureImageClassByFriendlyName(const friendlyName: string):
   TGLTextureImageClass;
 // Defines a TStrings with the list of registered TGLTextureImageClass.
 procedure SetGLTextureImageClassesToStrings(aStrings: TStrings);
-{Creates a TStrings with the list of registered TGLTextureImageClass.
- To be freed by caller. }
+(* Creates a TStrings with the list of registered TGLTextureImageClass.
+ To be freed by caller. *)
 function GetGLTextureImageClassesAsStrings: TStrings;
 
 procedure RegisterTGraphicClassFileExtension(const extension: string;

+ 3 - 3
Source/GLUtils.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-  Miscellaneous support utilities & classes. 
-*)
+
 unit GLUtils;
 
+(* Miscellaneous support utilities & classes *)
+
 interface
 
 {$I GLScene.inc}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 24 - 152
Source/GLWindows.pas


+ 3 - 4
Source/dwsVectorGeometry.pas

@@ -1,11 +1,11 @@
 //
 // This unit is part of the GLScene Engine, http://glscene.org
 //
-(*
-  DelphiWebScript symbol creation for GLVectorGeometry types and functions.
-*)
+
 unit dwsVectorGeometry;
 
+(* DelphiWebScript symbol creation for GLVectorGeometry types and functions *)
+
 interface
 
 uses
@@ -28,7 +28,6 @@ procedure Register;
 
 // =========================================================
 implementation
-
 // =========================================================
 
 type

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.