Browse Source

Assed .h, .hpp, lib/bpi files for c++

GLScene 2 years ago
parent
commit
dd240ee06a
100 changed files with 15210 additions and 9 deletions
  1. BIN
      Bpl/GLScene_Cg_DT.bpl
  2. BIN
      Bpl/GLScene_Cg_RT.bpl
  3. BIN
      Bpl/GLScene_DT.bpl
  4. BIN
      Bpl/GLScene_GPU_DT.bpl
  5. BIN
      Bpl/GLScene_GPU_RT.bpl
  6. BIN
      Bpl/GLScene_Physics_DT.bpl
  7. BIN
      Bpl/GLScene_Physics_RT.bpl
  8. BIN
      Bpl/GLScene_RT.bpl
  9. BIN
      Bpl/GLScene_Sounds_DT.bpl
  10. BIN
      Bpl/GLScene_Sounds_RT.bpl
  11. BIN
      Bpl/Win64/GLScene_Cg_RT.bpl
  12. BIN
      Bpl/Win64/GLScene_Cg_RT.rsm
  13. BIN
      Bpl/Win64/GLScene_GPU_RT.bpl
  14. BIN
      Bpl/Win64/GLScene_GPU_RT.rsm
  15. BIN
      Bpl/Win64/GLScene_Physics_RT.bpl
  16. BIN
      Bpl/Win64/GLScene_Physics_RT.rsm
  17. BIN
      Bpl/Win64/GLScene_RT.bpl
  18. BIN
      Bpl/Win64/GLScene_RT.rsm
  19. BIN
      Bpl/Win64/GLScene_Sounds_RT.bpl
  20. BIN
      Bpl/Win64/GLScene_Sounds_RT.rsm
  21. BIN
      Dcp/GLScene_Cg_DT.dcp
  22. BIN
      Dcp/GLScene_Cg_RT.dcp
  23. BIN
      Dcp/GLScene_DT.dcp
  24. BIN
      Dcp/GLScene_GPU_DT.dcp
  25. BIN
      Dcp/GLScene_GPU_RT.dcp
  26. BIN
      Dcp/GLScene_Physics_DT.dcp
  27. BIN
      Dcp/GLScene_Physics_RT.dcp
  28. BIN
      Dcp/GLScene_RT.dcp
  29. BIN
      Dcp/GLScene_Sounds_DT.dcp
  30. BIN
      Dcp/GLScene_Sounds_RT.dcp
  31. BIN
      Dcp/Win64/GLScene_Cg_RT.dcp
  32. BIN
      Dcp/Win64/GLScene_GPU_RT.dcp
  33. BIN
      Dcp/Win64/GLScene_Physics_RT.dcp
  34. BIN
      Dcp/Win64/GLScene_RT.dcp
  35. BIN
      Dcp/Win64/GLScene_Sounds_RT.dcp
  36. 0 1
      Examples/Demos/behaviours/Torque/fTorqueD.pas
  37. 2 2
      Examples/Demos/materials/cubemap/CubemapC.cbproj
  38. 1 1
      Examples/Demos/materials/cubemap/CubemapD.dproj
  39. 2 2
      Packages/GLScene_Cg_DT.dproj
  40. 1 2
      Readme.txt
  41. 0 1
      Source/GLS.LensFlare.pas
  42. 523 0
      include/Win32/CUDA.APIComps.hpp
  43. 110 0
      include/Win32/CUDA.Compiler.hpp
  44. 250 0
      include/Win32/CUDA.Context.hpp
  45. 171 0
      include/Win32/CUDA.DataAccess.hpp
  46. 106 0
      include/Win32/CUDA.EditorFm.hpp
  47. 93 0
      include/Win32/CUDA.FFTPlan.hpp
  48. 142 0
      include/Win32/CUDA.FourierTransform.hpp
  49. 282 0
      include/Win32/CUDA.Graphics.hpp
  50. 659 0
      include/Win32/CUDA.Import.hpp
  51. 77 0
      include/Win32/CUDA.ParallelPrimitives.hpp
  52. 134 0
      include/Win32/CUDA.Parser.hpp
  53. 143 0
      include/Win32/CUDA.PropEditors.hpp
  54. 51 0
      include/Win32/CUDA.Register.hpp
  55. 374 0
      include/Win32/CUDA.Runtime.hpp
  56. 76 0
      include/Win32/CUDA.Utility.hpp
  57. 201 0
      include/Win32/Cg.BombShader.hpp
  58. 134 0
      include/Win32/Cg.GL.hpp
  59. 257 0
      include/Win32/Cg.Import.hpp
  60. 111 0
      include/Win32/Cg.PostTransformationShader.hpp
  61. 51 0
      include/Win32/Cg.Register.hpp
  62. 369 0
      include/Win32/Cg.Shader.hpp
  63. 113 0
      include/Win32/FRColorEditor.hpp
  64. 87 0
      include/Win32/FRFaceEditor.hpp
  65. 99 0
      include/Win32/FRMaterialPreview.hpp
  66. 98 0
      include/Win32/FRTextureEdit.hpp
  67. 75 0
      include/Win32/FRTrackBarEdit.hpp
  68. 136 0
      include/Win32/FmGuiLayoutEditor.hpp
  69. 203 0
      include/Win32/FmGuiSkinEditor.hpp
  70. 165 0
      include/Win32/FmInfo.hpp
  71. 113 0
      include/Win32/FmLibMaterialPicker.hpp
  72. 89 0
      include/Win32/FmMaterialEditor.hpp
  73. 93 0
      include/Win32/FmPlugInManagerEditor.hpp
  74. 230 0
      include/Win32/FmSceneEditor.hpp
  75. 133 0
      include/Win32/FmShaderMemo.hpp
  76. 104 0
      include/Win32/FmShaderUniformEditor.hpp
  77. 110 0
      include/Win32/FmVectorEditor.hpp
  78. 117 0
      include/Win32/FmXCollectionEditor.hpp
  79. 312 0
      include/Win32/Formats.B3D.hpp
  80. 91 0
      include/Win32/Formats.DDSImage.hpp
  81. 339 0
      include/Win32/Formats.DXTC.hpp
  82. 272 0
      include/Win32/Formats.GL2.hpp
  83. 63 0
      include/Win32/Formats.HDRImage.hpp
  84. 806 0
      include/Win32/Formats.LWO.hpp
  85. 156 0
      include/Win32/Formats.MD2.hpp
  86. 188 0
      include/Win32/Formats.MD3.hpp
  87. 150 0
      include/Win32/Formats.OCT.hpp
  88. 244 0
      include/Win32/Formats.Q3BSP.hpp
  89. 69 0
      include/Win32/Formats.TGA.hpp
  90. 1909 0
      include/Win32/Formats.VFW.hpp
  91. 274 0
      include/Win32/Formats.VRML.hpp
  92. 218 0
      include/Win32/Formats.X.hpp
  93. 254 0
      include/Win32/Formats.m3DS.hpp
  94. 826 0
      include/Win32/Formats.m3DSConst.hpp
  95. 2042 0
      include/Win32/Formats.m3DSTypes.hpp
  96. 109 0
      include/Win32/Formats.m3DSUtils.hpp
  97. 127 0
      include/Win32/GLS.AVIRecorder.hpp
  98. 305 0
      include/Win32/GLS.AnimatedSprite.hpp
  99. 51 0
      include/Win32/GLS.AnimationUtils.hpp
  100. 120 0
      include/Win32/GLS.ApplicationFileIO.hpp

BIN
Bpl/GLScene_Cg_DT.bpl


BIN
Bpl/GLScene_Cg_RT.bpl


BIN
Bpl/GLScene_DT.bpl


BIN
Bpl/GLScene_GPU_DT.bpl


BIN
Bpl/GLScene_GPU_RT.bpl


BIN
Bpl/GLScene_Physics_DT.bpl


BIN
Bpl/GLScene_Physics_RT.bpl


BIN
Bpl/GLScene_RT.bpl


BIN
Bpl/GLScene_Sounds_DT.bpl


BIN
Bpl/GLScene_Sounds_RT.bpl


BIN
Bpl/Win64/GLScene_Cg_RT.bpl


BIN
Bpl/Win64/GLScene_Cg_RT.rsm


BIN
Bpl/Win64/GLScene_GPU_RT.bpl


BIN
Bpl/Win64/GLScene_GPU_RT.rsm


BIN
Bpl/Win64/GLScene_Physics_RT.bpl


BIN
Bpl/Win64/GLScene_Physics_RT.rsm


BIN
Bpl/Win64/GLScene_RT.bpl


BIN
Bpl/Win64/GLScene_RT.rsm


BIN
Bpl/Win64/GLScene_Sounds_RT.bpl


BIN
Bpl/Win64/GLScene_Sounds_RT.rsm


BIN
Dcp/GLScene_Cg_DT.dcp


BIN
Dcp/GLScene_Cg_RT.dcp


BIN
Dcp/GLScene_DT.dcp


BIN
Dcp/GLScene_GPU_DT.dcp


BIN
Dcp/GLScene_GPU_RT.dcp


BIN
Dcp/GLScene_Physics_DT.dcp


BIN
Dcp/GLScene_Physics_RT.dcp


BIN
Dcp/GLScene_RT.dcp


BIN
Dcp/GLScene_Sounds_DT.dcp


BIN
Dcp/GLScene_Sounds_RT.dcp


BIN
Dcp/Win64/GLScene_Cg_RT.dcp


BIN
Dcp/Win64/GLScene_GPU_RT.dcp


BIN
Dcp/Win64/GLScene_Physics_RT.dcp


BIN
Dcp/Win64/GLScene_RT.dcp


BIN
Dcp/Win64/GLScene_Sounds_RT.dcp


+ 0 - 1
Examples/Demos/behaviours/Torque/fTorqueD.pas

@@ -119,7 +119,6 @@ begin
     pickedObject.Material.FrontProperties.Emission.Color := clrYellow;
     pickedObject.Material.FrontProperties.Emission.Color := clrYellow;
     ShowMessage('You clicked the ' + pickedObject.Name);
     ShowMessage('You clicked the ' + pickedObject.Name);
     pickedObject.BuildList(rci);
     pickedObject.BuildList(rci);
-///    HUDText.Text := 'Calculated Volume:+ '#13#10 + 'Vertices:'#13#10#13#10 + 'Faces:'#13#10#13#10 + 'Edges:';
     pickedObject.Material.FrontProperties.Emission.Color := oldColor;
     pickedObject.Material.FrontProperties.Emission.Color := oldColor;
   end;
   end;
 end;
 end;

+ 2 - 2
Examples/Demos/materials/cubemap/CubemapC.cbproj

@@ -8,7 +8,7 @@
         <Base>True</Base>
         <Base>True</Base>
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Config Condition="'$(Config)'==''">Debug</Config>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
-        <TargetedPlatforms>1</TargetedPlatforms>
+        <TargetedPlatforms>3</TargetedPlatforms>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
         <Base>true</Base>
@@ -1565,7 +1565,7 @@
             </Deployment>
             </Deployment>
             <Platforms>
             <Platforms>
                 <Platform value="Win32">True</Platform>
                 <Platform value="Win32">True</Platform>
-                <Platform value="Win64">False</Platform>
+                <Platform value="Win64">True</Platform>
             </Platforms>
             </Platforms>
         </BorlandProject>
         </BorlandProject>
         <ProjectFileVersion>12</ProjectFileVersion>
         <ProjectFileVersion>12</ProjectFileVersion>

+ 1 - 1
Examples/Demos/materials/cubemap/CubemapD.dproj

@@ -8,7 +8,7 @@
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>19.4</ProjectVersion>
         <ProjectVersion>19.4</ProjectVersion>
-        <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <Platform Condition="'$(Platform)'==''">Win64</Platform>
     </PropertyGroup>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
         <Base>true</Base>

+ 2 - 2
Packages/GLScene_Cg_DT.dproj

@@ -166,12 +166,12 @@
                         <Overwrite>true</Overwrite>
                         <Overwrite>true</Overwrite>
                     </Platform>
                     </Platform>
                 </DeployFile>
                 </DeployFile>
-                <DeployFile LocalName="$(BDS)\Redist\iossimulator\libpcre.dylib" Class="DependencyModule">
+                <DeployFile LocalName="$(BDS)\Redist\iossimulator\libPCRE.dylib" Class="DependencyModule">
                     <Platform Name="iOSSimulator">
                     <Platform Name="iOSSimulator">
                         <Overwrite>true</Overwrite>
                         <Overwrite>true</Overwrite>
                     </Platform>
                     </Platform>
                 </DeployFile>
                 </DeployFile>
-                <DeployFile LocalName="$(BDS)\Redist\iossimulator\libPCRE.dylib" Class="DependencyModule">
+                <DeployFile LocalName="$(BDS)\Redist\iossimulator\libpcre.dylib" Class="DependencyModule">
                     <Platform Name="iOSSimulator">
                     <Platform Name="iOSSimulator">
                         <Overwrite>true</Overwrite>
                         <Overwrite>true</Overwrite>
                     </Platform>
                     </Platform>

+ 1 - 2
Readme.txt

@@ -1,5 +1,4 @@
-The release of GLScene v.2023 for Delphi & C++Builder
-using Community Edition of Embarcadero RAD Studio.
+The release GLScene v.2023 for Delphi & C++Builder of Embarcadero RAD Studio.
 
 
 The version includes bug fixes, centralized access to assets for examples.
 The version includes bug fixes, centralized access to assets for examples.
 Support for sound OpenAL, FMOD, BASS, WAVE and physical ODE, NGD libraries is provided
 Support for sound OpenAL, FMOD, BASS, WAVE and physical ODE, NGD libraries is provided

+ 0 - 1
Source/GLS.LensFlare.pas

@@ -1,7 +1,6 @@
 //
 //
 // The graphics platform GLScene https://github.com/glscene
 // The graphics platform GLScene https://github.com/glscene
 //
 //
-
 unit GLS.LensFlare;
 unit GLS.LensFlare;
 
 
 (* Lens flare object. *)
 (* Lens flare object. *)

+ 523 - 0
include/Win32/CUDA.APIComps.hpp

@@ -0,0 +1,523 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.APIComps.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_ApicompsHPP
+#define Cuda_ApicompsHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Types.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.PersistentClasses.hpp>
+#include <GLS.BaseClasses.hpp>
+#include <GLS.Context.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.VectorLists.hpp>
+#include <GLS.Graphics.hpp>
+#include <GLS.Strings.hpp>
+#include <GLS.Utils.hpp>
+#include <CUDA.Import.hpp>
+#include <CUDA.Runtime.hpp>
+#include <CUDA.Parser.hpp>
+#include <CUDA.FourierTransform.hpp>
+#include <CUDA.Compiler.hpp>
+#include <CUDA.Context.hpp>
+#include <CUDA.DataAccess.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Apicomps
+{
+//-- forward type declarations -----------------------------------------------
+struct TChannelTypeAndNum;
+class DELPHICLASS TCUDAComponent;
+class DELPHICLASS TCUDAModule;
+class DELPHICLASS TCUDAGraphicResource;
+class DELPHICLASS TCUDAMemData;
+class DELPHICLASS TCUDAUniform;
+class DELPHICLASS TCUDAConstant;
+class DELPHICLASS TCUDAFuncParam;
+class DELPHICLASS TCUDAFunction;
+class DELPHICLASS TCUDATexture;
+class DELPHICLASS TGLCUDA;
+//-- type declarations -------------------------------------------------------
+enum DECLSPEC_DENUM TCUDAChange : unsigned char { cuchDevice, cuchContext, cuchSize, cuchAddresMode, cuchFlag, cuchFilterMode, cuchArray, cuchFormat, cuchMapping };
+
+typedef System::Set<TCUDAChange, TCUDAChange::cuchDevice, TCUDAChange::cuchMapping> TCUDAChanges;
+
+enum DECLSPEC_DENUM TCuAddresMode : unsigned char { amWrap, amClamp, amMirror };
+
+enum DECLSPEC_DENUM TCuFilterMode : unsigned char { fmPoint, fmLinear };
+
+enum DECLSPEC_DENUM TCUDAChannelType : unsigned char { ctUndefined, ctUInt8, ctUInt16, ctUInt32, ctInt8, ctInt16, ctInt32, ctHalfFloat, ctFloat, ctDouble };
+
+enum DECLSPEC_DENUM TCUDAChannelNum : unsigned char { cnOne, cnTwo, cnThree, cnFour };
+
+struct DECLSPEC_DRECORD TChannelTypeAndNum
+{
+public:
+	TCUDAChannelType F;
+	TCUDAChannelNum C;
+};
+
+
+enum DECLSPEC_DENUM TCUDAMapping : unsigned char { grmDefault, grmReadOnly, grmWriteDiscard };
+
+class PASCALIMPLEMENTATION TCUDAComponent : public Cuda::Context::TCUDAHandlesMaster
+{
+	typedef Cuda::Context::TCUDAHandlesMaster inherited;
+	
+private:
+	TCUDAComponent* FMaster;
+	Gls::Persistentclasses::TGLPersistentObjectList* FItems;
+	void __fastcall SetMaster(TCUDAComponent* AMaster);
+	TCUDAComponent* __fastcall GetItem(const int i);
+	int __fastcall GetItemsCount();
+	
+protected:
+	Cuda::Import::TCUresult FStatus;
+	TCUDAChanges FChanges;
+	virtual Cuda::Context::TCUDAContext* __fastcall GetContext();
+	void __fastcall CollectStatus(Cuda::Import::TCUresult AStatus);
+	DYNAMIC void __fastcall GetChildren(System::Classes::TGetChildProc AProc, System::Classes::TComponent* Root);
+	void __fastcall AddItem(TCUDAComponent* AItem);
+	void __fastcall RemoveItem(TCUDAComponent* AItem);
+	void __fastcall DeleteItems();
+	virtual void __fastcall SetName(const System::Classes::TComponentName NewName);
+	virtual bool __fastcall GetIsAllocated() = 0 ;
+	
+public:
+	__fastcall virtual ~TCUDAComponent();
+	virtual void __fastcall CuNotifyChange(TCUDAChange AChange);
+	DYNAMIC System::Classes::TComponent* __fastcall GetParentComponent();
+	DYNAMIC void __fastcall SetParentComponent(System::Classes::TComponent* Value);
+	DYNAMIC bool __fastcall HasParent();
+	TCUDAComponent* __fastcall GetItemByName(const System::UnicodeString name);
+	System::UnicodeString __fastcall MakeUniqueName(const System::UnicodeString BaseName);
+	__property TCUDAComponent* Master = {read=FMaster, write=SetMaster};
+	__property Cuda::Context::TCUDAContext* Context = {read=GetContext};
+	__property TCUDAComponent* Items[const int i] = {read=GetItem};
+	__property int ItemsCount = {read=GetItemsCount, nodefault};
+	__property Cuda::Import::TCUresult Status = {read=FStatus, nodefault};
+	__property bool IsAllocated = {read=GetIsAllocated, nodefault};
+public:
+	/* TComponent.Create */ inline __fastcall virtual TCUDAComponent(System::Classes::TComponent* AOwner) : Cuda::Context::TCUDAHandlesMaster(AOwner) { }
+	
+};
+
+
+typedef System::TMetaClass* TCUDAComponentClass;
+
+class PASCALIMPLEMENTATION TCUDAModule : public TCUDAComponent
+{
+	typedef TCUDAComponent inherited;
+	
+private:
+	Cuda::Import::TCUmodule *FHandle;
+	System::Classes::TStringList* FCode;
+	Cuda::Compiler::TGLCUDACompilerOutput FCodeType;
+	Cuda::Compiler::TGLCUDACompiler* FCompiler;
+	void __fastcall SetCode(System::Classes::TStringList* const Value);
+	void __fastcall SetCompiler(Cuda::Compiler::TGLCUDACompiler* const Value);
+	TCUDAFunction* __fastcall GetKernelFunction(const System::UnicodeString AName);
+	TCUDATexture* __fastcall GetKernelTexture(const System::UnicodeString AName);
+	TCUDAConstant* __fastcall GetKernelConstant(const System::UnicodeString AName);
+	
+protected:
+	virtual void __fastcall AllocateHandles();
+	virtual void __fastcall DestroyHandles();
+	void __fastcall OnChangeCode(System::TObject* Sender);
+	virtual void __fastcall Loaded();
+	virtual Cuda::Context::TCUDAContext* __fastcall GetContext();
+	virtual bool __fastcall GetIsAllocated();
+	
+public:
+	__fastcall virtual TCUDAModule(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TCUDAModule();
+	virtual void __fastcall Assign(System::Classes::TPersistent* Source);
+	void __fastcall LoadFromFile(const System::UnicodeString AFilename);
+	void __fastcall LoadFromSource();
+	void __fastcall Unload();
+	void __fastcall LoadAndCompile();
+	__property Cuda::Context::TCUDAContext* Context = {read=GetContext};
+	__property Cuda::Compiler::TGLCUDACompilerOutput CodeType = {read=FCodeType, nodefault};
+	__property TCUDAFunction* KernelFunction[const System::UnicodeString AName] = {read=GetKernelFunction};
+	__property TCUDATexture* KernelTexture[const System::UnicodeString AName] = {read=GetKernelTexture};
+	__property TCUDAConstant* KernelConstant[const System::UnicodeString AName] = {read=GetKernelConstant};
+	
+__published:
+	__property System::Classes::TStringList* Code = {read=FCode, write=SetCode};
+	__property Cuda::Compiler::TGLCUDACompiler* Compiler = {read=FCompiler, write=SetCompiler};
+};
+
+
+enum DECLSPEC_DENUM TGLResourceType : unsigned char { rtTexture, rtBuffer };
+
+class PASCALIMPLEMENTATION TCUDAGraphicResource : public TCUDAComponent
+{
+	typedef TCUDAComponent inherited;
+	
+protected:
+	System::StaticArray<Cuda::Import::PCUgraphicsResource, 8> FHandle;
+	TCUDAMapping FMapping;
+	TGLResourceType FResourceType;
+	Gls::Context::TGLVirtualHandle* FGLContextHandle;
+	int FMapCounter;
+	virtual bool __fastcall GetIsAllocated();
+	void __fastcall OnGLHandleAllocate(Gls::Context::TGLVirtualHandle* Sender, unsigned &Handle);
+	void __fastcall OnGLHandleDestroy(Gls::Context::TGLVirtualHandle* Sender, unsigned &Handle);
+	virtual void __fastcall BindArrayToTexture(TCUDAMemData* &cudaArray, unsigned ALeyer, unsigned ALevel) = 0 ;
+	void __fastcall SetArray(TCUDAMemData* &AArray, Cuda::Import::PCUarray AHandle, bool ForGLTexture, bool Volume);
+	virtual unsigned __fastcall GetAttributeArraySize(const System::UnicodeString Attr) = 0 ;
+	virtual void * __fastcall GetAttributeArrayAddress(const System::UnicodeString Attr) = 0 ;
+	virtual unsigned __fastcall GetElementArrayDataSize() = 0 ;
+	virtual void * __fastcall GetElementArrayAddress() = 0 ;
+	virtual void __fastcall SetMapping(const TCUDAMapping Value);
+	__property TCUDAMapping Mapping = {read=FMapping, write=SetMapping, default=0};
+	
+public:
+	virtual void __fastcall MapResources() = 0 ;
+	virtual void __fastcall UnMapResources() = 0 ;
+public:
+	/* TCUDAComponent.Destroy */ inline __fastcall virtual ~TCUDAGraphicResource() { }
+	
+public:
+	/* TComponent.Create */ inline __fastcall virtual TCUDAGraphicResource(System::Classes::TComponent* AOwner) : TCUDAComponent(AOwner) { }
+	
+};
+
+
+enum DECLSPEC_DENUM TCUDAMemType : unsigned char { mtHost, mtDevice, mtArray };
+
+enum DECLSPEC_DENUM TCUDAMemMapFlag : unsigned char { mmfPortable, mmfFastWrite };
+
+typedef System::Set<TCUDAMemMapFlag, TCUDAMemMapFlag::mmfPortable, TCUDAMemMapFlag::mmfFastWrite> TCUDAMemMapFlags;
+
+class PASCALIMPLEMENTATION TCUDAMemData : public TCUDAComponent
+{
+	typedef TCUDAComponent inherited;
+	
+private:
+	void *FData;
+	void *FMappedMemory;
+	Cuda::Import::TCUarray *FHandle;
+	int FWidth;
+	int FHeight;
+	int FDepth;
+	unsigned FPitch;
+	int FElementSize;
+	int FDataSize;
+	TCUDAChannelType FChannelsType;
+	TCUDAChannelNum fChannelsNum;
+	TCUDAMemType FMemoryType;
+	TCUDATexture* FTexture;
+	bool FOpenGLRefArray;
+	bool FMapping;
+	void __fastcall SetMemoryType(const TCUDAMemType AType);
+	void __fastcall SetWidth(const int Value);
+	void __fastcall SetHeight(const int Value);
+	void __fastcall SetDepth(const int Value);
+	void __fastcall SetChannelType(const TCUDAChannelType Value);
+	void __fastcall SetChannelNum(const TCUDAChannelNum Value);
+	void * __fastcall GetData();
+	Cuda::Import::PCUarray __fastcall GetArrayHandle();
+	
+protected:
+	virtual void __fastcall AllocateHandles();
+	virtual void __fastcall DestroyHandles();
+	virtual bool __fastcall GetIsAllocated();
+	
+public:
+	__fastcall virtual TCUDAMemData(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TCUDAMemData();
+	virtual void __fastcall CuNotifyChange(TCUDAChange AChange);
+	void __fastcall Map(const TCUDAMemMapFlags AFlags = TCUDAMemMapFlags() );
+	void __fastcall UnMap();
+	template<typename EType> Cuda::Dataaccess::GCUDAHostElementAccess__1<EType>* __fastcall Data(int X)/* overload */;
+	template<typename EType> Cuda::Dataaccess::GCUDAHostElementAccess__1<EType>* __fastcall Data(int X, int Y)/* overload */;
+	template<typename EType> Cuda::Dataaccess::GCUDAHostElementAccess__1<EType>* __fastcall Data(int X, int Y, int Z)/* overload */;
+	void __fastcall FillMem(const void *Value);
+	void __fastcall CopyTo(TCUDAMemData* const ADstMemData)/* overload */;
+	void __fastcall CopyTo(Gls::Graphics::TGLImage* const AGLImage)/* overload */;
+	void __fastcall CopyTo(TCUDAGraphicResource* const AGLGraphic, System::UnicodeString aAttr = System::UnicodeString())/* overload */;
+	void __fastcall CopyFrom(TCUDAMemData* const ASrcMemData)/* overload */;
+	void __fastcall CopyFrom(Gls::Graphics::TGLImage* const AGLImage)/* overload */;
+	void __fastcall CopyFrom(TCUDAGraphicResource* const AGLGraphic, System::UnicodeString aAttr = System::UnicodeString())/* overload */;
+	void __fastcall SubCopyTo(TCUDAMemData* const ADstMemData, const Cuda::Dataaccess::GCUDAHostElementAccess__1<int>::TVector3 &ASrcXYZ, const Cuda::Dataaccess::GCUDAHostElementAccess__1<int>::TVector3 &ADstXYZ, const Cuda::Dataaccess::GCUDAHostElementAccess__1<int>::TVector3 &ASizes);
+	__property int ElementSize = {read=FElementSize, nodefault};
+	__property int DataSize = {read=FDataSize, nodefault};
+	__property unsigned Pitch = {read=FPitch, nodefault};
+	__property void * RawData = {read=GetData};
+	__property void * MappedMemoryAddress = {read=FMappedMemory};
+	__property Cuda::Import::PCUarray ArrayHandle = {read=GetArrayHandle};
+	
+__published:
+	__property int Width = {read=FWidth, write=SetWidth, default=256};
+	__property int Height = {read=FHeight, write=SetHeight, default=0};
+	__property int Depth = {read=FDepth, write=SetDepth, default=0};
+	__property TCUDAMemType MemoryType = {read=FMemoryType, write=SetMemoryType, default=0};
+	__property TCUDAChannelType ChannelsType = {read=FChannelsType, write=SetChannelType, default=4};
+	__property TCUDAChannelNum ChannelsNum = {read=fChannelsNum, write=SetChannelNum, default=0};
+};
+
+
+class PASCALIMPLEMENTATION TCUDAUniform : public TCUDAComponent
+{
+	typedef TCUDAComponent inherited;
+	
+protected:
+	void *FHandle;
+	unsigned FSize;
+	System::UnicodeString FKernelName;
+	Cuda::Parser::TCUDAType FType;
+	System::UnicodeString FCustomType;
+	bool FRef;
+	bool FDefined;
+	void __fastcall SetKernelName(const System::UnicodeString AName);
+	void __fastcall SetType(Cuda::Parser::TCUDAType AValue);
+	void __fastcall SetCustomType(const System::UnicodeString AValue);
+	void __fastcall SetSize(const unsigned AValue);
+	void __fastcall SetRef(bool AValue);
+	void __fastcall SetDefined(bool AValue);
+	__property System::UnicodeString KernelName = {read=FKernelName, write=SetKernelName};
+	__property Cuda::Parser::TCUDAType DataType = {read=FType, write=SetType, nodefault};
+	__property System::UnicodeString CustomType = {read=FCustomType, write=SetCustomType};
+	__property unsigned Size = {read=FSize, write=SetSize, nodefault};
+	__property bool Reference = {read=FRef, write=SetRef, nodefault};
+	virtual bool __fastcall GetIsAllocated();
+	
+public:
+	__fastcall virtual TCUDAUniform(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TCUDAUniform();
+	__property bool IsValueDefined = {read=FDefined, write=SetDefined, nodefault};
+};
+
+
+class PASCALIMPLEMENTATION TCUDAConstant : public TCUDAUniform
+{
+	typedef TCUDAUniform inherited;
+	
+protected:
+	virtual void __fastcall AllocateHandles();
+	virtual void __fastcall DestroyHandles();
+	void * __fastcall GetDeviceAddress();
+	
+public:
+	__property void * DeviceAddress = {read=GetDeviceAddress};
+	
+__published:
+	__property KernelName = {default=0};
+	__property DataType;
+	__property CustomType = {default=0};
+	__property Size;
+	__property Reference;
+public:
+	/* TCUDAUniform.Create */ inline __fastcall virtual TCUDAConstant(System::Classes::TComponent* AOwner) : TCUDAUniform(AOwner) { }
+	/* TCUDAUniform.Destroy */ inline __fastcall virtual ~TCUDAConstant() { }
+	
+};
+
+
+class PASCALIMPLEMENTATION TCUDAFuncParam : public TCUDAUniform
+{
+	typedef TCUDAUniform inherited;
+	
+protected:
+	virtual void __fastcall AllocateHandles();
+	virtual void __fastcall DestroyHandles();
+	
+public:
+	__fastcall virtual TCUDAFuncParam(System::Classes::TComponent* AOwner);
+	
+__published:
+	__property KernelName = {default=0};
+	__property DataType;
+	__property CustomType = {default=0};
+	__property Size;
+	__property Reference;
+public:
+	/* TCUDAUniform.Destroy */ inline __fastcall virtual ~TCUDAFuncParam() { }
+	
+};
+
+
+class PASCALIMPLEMENTATION TCUDAFunction : public TCUDAComponent
+{
+	typedef TCUDAComponent inherited;
+	
+private:
+	System::UnicodeString FKernelName;
+	Cuda::Import::TCUfunction *FHandle;
+	bool FAutoSync;
+	Cuda::Context::TCUDADimensions* FBlockShape;
+	Cuda::Context::TCUDADimensions* FGrid;
+	int ParamOffset;
+	bool FLaunching;
+	System::Classes::TNotifyEvent FOnParameterSetup;
+	void __fastcall SetBlockShape(Cuda::Context::TCUDADimensions* const AShape);
+	void __fastcall SetGrid(Cuda::Context::TCUDADimensions* const AGrid);
+	void __fastcall SetKernelName(const System::UnicodeString AName);
+	Cuda::Import::PCUfunction __fastcall GetHandle();
+	void __fastcall SetSharedMemorySize(int Value);
+	int __fastcall GetSharedMemorySize();
+	int __fastcall GetMaxThreadPerBlock();
+	int __fastcall GetConstMemorySize();
+	int __fastcall GetLocalMemorySize();
+	int __fastcall GetNumRegisters();
+	TCUDAFuncParam* __fastcall GetParameter(const System::UnicodeString AName);
+	
+protected:
+	virtual void __fastcall AllocateHandles();
+	virtual void __fastcall DestroyHandles();
+	virtual bool __fastcall GetIsAllocated();
+	
+public:
+	__fastcall virtual TCUDAFunction(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TCUDAFunction();
+	void __fastcall SetParam(int Value)/* overload */;
+	void __fastcall SetParam(unsigned Value)/* overload */;
+	void __fastcall SetParam(float Value)/* overload */;
+	void __fastcall SetParam(const Gls::Vectortypes::TVector2i &Value)/* overload */;
+	void __fastcall SetParam(const Gls::Vectortypes::TVector3i &Value)/* overload */;
+	void __fastcall SetParam(const Gls::Vectortypes::TVector4i &Value)/* overload */;
+	void __fastcall SetParam(const Gls::Vectortypes::TVector2f &Value)/* overload */;
+	void __fastcall SetParam(const Gls::Vectortypes::TVector3f &Value)/* overload */;
+	void __fastcall SetParam(const Gls::Vectortypes::TVector4f &Value)/* overload */;
+	void __fastcall SetParam(TCUDAMemData* MemData)/* overload */;
+	void __fastcall SetParam(TCUDATexture* TexRef)/* overload */;
+	void __fastcall SetParam(void * Ptr)/* overload */;
+	__property TCUDAFuncParam* Parameters[const System::UnicodeString AName] = {read=GetParameter};
+	void __fastcall Launch(bool Grided = true);
+	__property Cuda::Import::PCUfunction Handle = {read=GetHandle};
+	__property int SharedMemorySize = {read=GetSharedMemorySize, write=SetSharedMemorySize, nodefault};
+	__property int MaxThreadPerBlock = {read=GetMaxThreadPerBlock, nodefault};
+	__property int ConstMemorySize = {read=GetConstMemorySize, nodefault};
+	__property int LocalMemorySize = {read=GetLocalMemorySize, nodefault};
+	__property int NumRegisters = {read=GetNumRegisters, nodefault};
+	
+__published:
+	__property System::UnicodeString KernelName = {read=FKernelName, write=SetKernelName};
+	__property bool AutoSync = {read=FAutoSync, write=FAutoSync, default=1};
+	__property Cuda::Context::TCUDADimensions* BlockShape = {read=FBlockShape, write=SetBlockShape};
+	__property Cuda::Context::TCUDADimensions* Grid = {read=FGrid, write=SetGrid};
+	__property System::Classes::TNotifyEvent OnParameterSetup = {read=FOnParameterSetup, write=FOnParameterSetup};
+};
+
+
+class PASCALIMPLEMENTATION TCUDATexture : public TCUDAComponent
+{
+	typedef TCUDAComponent inherited;
+	
+private:
+	System::UnicodeString FKernelName;
+	Cuda::Import::TCUtexref *FHandle;
+	TCUDAMemData* fArray;
+	TCuAddresMode fAddressModeS;
+	TCuAddresMode fAddressModeT;
+	TCuAddresMode fAddressModeR;
+	bool fNormalizedCoord;
+	bool fReadAsInteger;
+	TCuFilterMode fFilterMode;
+	TCUDAChannelType fFormat;
+	TCUDAChannelNum fChannelNum;
+	void __fastcall SetKernelName(const System::UnicodeString AName);
+	void __fastcall SetAddressModeS(const TCuAddresMode AMode);
+	void __fastcall SetAddressModeT(const TCuAddresMode AMode);
+	void __fastcall SetAddressModeR(const TCuAddresMode AMode);
+	void __fastcall SetNormalizedCoord(const bool flag);
+	void __fastcall SetReadAsInteger(const bool flag);
+	void __fastcall SetFilterMode(const TCuFilterMode mode);
+	void __fastcall SetFormat(TCUDAChannelType AValue);
+	void __fastcall SetChannelNum(TCUDAChannelNum AValue);
+	void __fastcall SetArray(TCUDAMemData* Value);
+	Cuda::Import::PCUtexref __fastcall GetHandle();
+	
+protected:
+	virtual void __fastcall AllocateHandles();
+	virtual void __fastcall DestroyHandles();
+	virtual bool __fastcall GetIsAllocated();
+	
+public:
+	__fastcall virtual TCUDATexture(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TCUDATexture();
+	__property Cuda::Import::PCUtexref Handle = {read=GetHandle};
+	
+__published:
+	__property System::UnicodeString KernelName = {read=FKernelName, write=SetKernelName};
+	__property TCuAddresMode AddressModeS = {read=fAddressModeS, write=SetAddressModeS, default=1};
+	__property TCuAddresMode AddressModeT = {read=fAddressModeT, write=SetAddressModeT, default=1};
+	__property TCuAddresMode AddressModeR = {read=fAddressModeR, write=SetAddressModeR, default=1};
+	__property bool NormalizedCoord = {read=fNormalizedCoord, write=SetNormalizedCoord, default=1};
+	__property bool ReadAsInteger = {read=fReadAsInteger, write=SetReadAsInteger, default=0};
+	__property TCuFilterMode FilterMode = {read=fFilterMode, write=SetFilterMode, default=0};
+	__property TCUDAChannelType Format = {read=fFormat, write=SetFormat, nodefault};
+	__property TCUDAChannelNum ChannelNum = {read=fChannelNum, write=SetChannelNum, nodefault};
+	__property TCUDAMemData* MemDataArray = {read=fArray, write=SetArray};
+};
+
+
+class PASCALIMPLEMENTATION TGLCUDA : public TCUDAComponent
+{
+	typedef TCUDAComponent inherited;
+	
+private:
+	Cuda::Context::TGLCUDADevice* fDevice;
+	Cuda::Context::TCUDAContext* fContext;
+	Cuda::Context::TOnOpenGLInteropInit FOnOpenGLInteropInit;
+	void __fastcall SetDevice(Cuda::Context::TGLCUDADevice* const Value);
+	void __fastcall SetOnOpenGLInteropInit(Cuda::Context::TOnOpenGLInteropInit AEvent);
+	TCUDAModule* __fastcall GetModule(const int i);
+	
+protected:
+	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
+	virtual Cuda::Context::TCUDAContext* __fastcall GetContext();
+	virtual bool __fastcall GetIsAllocated();
+	
+public:
+	__fastcall virtual TGLCUDA(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TGLCUDA();
+	__property Cuda::Context::TCUDAContext* Context = {read=GetContext};
+	__property TCUDAModule* Modules[const int i] = {read=GetModule};
+	
+__published:
+	__property Cuda::Context::TGLCUDADevice* ComputingDevice = {read=fDevice, write=SetDevice};
+	__property Cuda::Context::TOnOpenGLInteropInit OnOpenGLInteropInit = {read=FOnOpenGLInteropInit, write=SetOnOpenGLInteropInit};
+};
+
+
+typedef System::Int8 _1;
+
+typedef System::Int8 _2;
+
+typedef System::Int8 _3;
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TChannelTypeAndNum __fastcall GetChannelTypeAndNum(Cuda::Parser::TCUDAType AType);
+extern DELPHI_PACKAGE void __fastcall RegisterCUDAComponentNameChangeEvent(System::Classes::TNotifyEvent ANotifyEvent);
+extern DELPHI_PACKAGE void __fastcall DeRegisterCUDAComponentNameChangeEvent(void);
+}	/* namespace Apicomps */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_APICOMPS)
+using namespace Cuda::Apicomps;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_ApicompsHPP

+ 110 - 0
include/Win32/CUDA.Compiler.hpp

@@ -0,0 +1,110 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.Compiler.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_CompilerHPP
+#define Cuda_CompilerHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <Winapi.ShellAPI.hpp>
+#include <Winapi.TlHelp32.hpp>
+#include <System.UITypes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Classes.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <CUDA.Parser.hpp>
+#include <GLS.ApplicationFileIO.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Compiler
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLCUDACompiler;
+//-- type declarations -------------------------------------------------------
+enum DECLSPEC_DENUM TGLCUDACompilerOutput : unsigned char { codeUndefined, codePtx, codeCubin, codeGpu };
+
+enum DECLSPEC_DENUM TGLCUDAVirtArch : unsigned char { compute_10, compute_11, compute_12, compute_13, compute_20 };
+
+enum DECLSPEC_DENUM TGLCUDARealArch : unsigned char { sm_10, sm_11, sm_12, sm_13, sm_20, sm_21 };
+
+typedef System::Set<TGLCUDARealArch, TGLCUDARealArch::sm_10, TGLCUDARealArch::sm_21> TGLCUDARealArchs;
+
+class PASCALIMPLEMENTATION TGLCUDACompiler : public System::Classes::TComponent
+{
+	typedef System::Classes::TComponent inherited;
+	
+private:
+	System::UnicodeString FNVCCPath;
+	System::UnicodeString FCppCompilerPath;
+	System::Classes::TStringList* FProduct;
+	System::UnicodeString FProjectModule;
+	System::UnicodeString FSourceCodeFile;
+	System::UnicodeString FConsoleContent;
+	TGLCUDACompilerOutput FOutputCodeType;
+	TGLCUDAVirtArch FVirtualArch;
+	TGLCUDARealArchs FRealArch;
+	int FMaxRegisterCount;
+	Cuda::Parser::TCUDAModuleInfo* FModuleInfo;
+	void __fastcall SetMaxRegisterCount(int Value);
+	void __fastcall SetOutputCodeType(const TGLCUDACompilerOutput Value);
+	bool __fastcall StoreProjectModule();
+	void __fastcall SetRealArch(TGLCUDARealArchs AValue);
+	void __fastcall SetNVCCPath(const System::UnicodeString AValue);
+	void __fastcall SetCppCompilerPath(const System::UnicodeString AValue);
+	
+protected:
+	virtual void __fastcall Loaded();
+	
+public:
+	__fastcall virtual TGLCUDACompiler(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TGLCUDACompiler();
+	virtual void __fastcall Assign(System::Classes::TPersistent* Source);
+	void __fastcall SetSourceCodeFile(const System::UnicodeString AFileName);
+	bool __fastcall Compile();
+	__property System::Classes::TStringList* Product = {read=FProduct, write=FProduct};
+	__property Cuda::Parser::TCUDAModuleInfo* ModuleInfo = {read=FModuleInfo};
+	__property System::UnicodeString ConsoleContent = {read=FConsoleContent};
+	
+__published:
+	__property System::UnicodeString NVCCPath = {read=FNVCCPath, write=SetNVCCPath};
+	__property System::UnicodeString CppCompilerPath = {read=FCppCompilerPath, write=SetCppCompilerPath};
+	__property System::UnicodeString SourceCodeFile = {read=FSourceCodeFile};
+	__property System::UnicodeString ProjectModule = {read=FProjectModule, write=FProjectModule, stored=StoreProjectModule};
+	__property TGLCUDACompilerOutput OutputCodeType = {read=FOutputCodeType, write=SetOutputCodeType, default=1};
+	__property TGLCUDARealArchs RealArchitecture = {read=FRealArch, write=SetRealArch, default=8};
+	__property TGLCUDAVirtArch VirtualArchitecture = {read=FVirtualArch, write=FVirtualArch, default=3};
+	__property int MaxRegisterCount = {read=FMaxRegisterCount, write=SetMaxRegisterCount, default=32};
+};
+
+
+typedef bool __fastcall (*TFindCuFileFunc)(System::UnicodeString &AModuleName);
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TFindCuFileFunc vFindCuFileFunc;
+}	/* namespace Compiler */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_COMPILER)
+using namespace Cuda::Compiler;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_CompilerHPP

+ 250 - 0
include/Win32/CUDA.Context.hpp

@@ -0,0 +1,250 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.Context.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_ContextHPP
+#define Cuda_ContextHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.Strings.hpp>
+#include <GLS.BaseClasses.hpp>
+#include <GLS.Context.hpp>
+#include <GLS.Generics.hpp>
+#include <CUDA.Import.hpp>
+#include <CUDA.Runtime.hpp>
+#include <System.SyncObjs.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Context
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TCUDADimensions;
+class DELPHICLASS TCUDADevice;
+class DELPHICLASS TGLCUDADevice;
+class DELPHICLASS TCUDAHandlesMaster;
+class DELPHICLASS TCUDAContext;
+class DELPHICLASS CUDAContextManager;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TCUDADimensions : public Gls::Baseclasses::TGLUpdateAbleObject
+{
+	typedef Gls::Baseclasses::TGLUpdateAbleObject inherited;
+	
+private:
+	Cuda::Import::TDim3 FXYZ;
+	Cuda::Import::TDim3 FMaxXYZ;
+	bool FReadOnly;
+	int __fastcall GetDimComponent(int index);
+	void __fastcall SetDimComponent(int index, int Value);
+	int __fastcall GetMaxDimComponent(int index);
+	void __fastcall SetMaxDimComponent(int index, int Value);
+	
+public:
+	__fastcall virtual TCUDADimensions(System::Classes::TPersistent* AOwner);
+	virtual void __fastcall Assign(System::Classes::TPersistent* Source);
+	__property int MaxSizeX = {read=GetMaxDimComponent, write=SetMaxDimComponent, index=0, nodefault};
+	__property int MaxSizeY = {read=GetMaxDimComponent, write=SetMaxDimComponent, index=1, nodefault};
+	__property int MaxSizeZ = {read=GetMaxDimComponent, write=SetMaxDimComponent, index=2, nodefault};
+	__property bool ReadOnlyValue = {read=FReadOnly, write=FReadOnly, nodefault};
+	
+__published:
+	__property int SizeX = {read=GetDimComponent, write=SetDimComponent, index=0, default=1};
+	__property int SizeY = {read=GetDimComponent, write=SetDimComponent, index=1, default=1};
+	__property int SizeZ = {read=GetDimComponent, write=SetDimComponent, index=2, default=1};
+public:
+	/* TPersistent.Destroy */ inline __fastcall virtual ~TCUDADimensions() { }
+	
+};
+
+
+typedef void __fastcall (__closure *TOnOpenGLInteropInit)(/* out */ Gls::Context::TGLContext* &Context);
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TCUDADevice : public System::Classes::TPersistent
+{
+	typedef System::Classes::TPersistent inherited;
+	
+private:
+	int fID;
+	int fHandle;
+	int fGFlops;
+	Cuda::Runtime::TCudaDeviceProp fDeviceProperties;
+	bool FSuitable;
+	bool FUsed;
+	TCUDADimensions* fMaxThreadsDim;
+	TCUDADimensions* fMaxGridSize;
+	
+protected:
+	System::UnicodeString __fastcall GetName();
+	
+public:
+	__fastcall TCUDADevice();
+	__fastcall virtual ~TCUDADevice();
+	virtual void __fastcall Assign(System::Classes::TPersistent* Source);
+	unsigned __fastcall TotalMemory();
+	
+__published:
+	__property System::UnicodeString Name = {read=GetName};
+	__property NativeUInt TotalGlobalMem = {read=fDeviceProperties.totalGlobalMem, nodefault};
+	__property NativeUInt SharedMemPerBlock = {read=fDeviceProperties.sharedMemPerBlock, nodefault};
+	__property int RegsPerBlock = {read=fDeviceProperties.regsPerBlock, nodefault};
+	__property int WarpSize = {read=fDeviceProperties.warpSize, nodefault};
+	__property NativeUInt MemPitch = {read=fDeviceProperties.memPitch, nodefault};
+	__property int MaxThreadsPerBlock = {read=fDeviceProperties.maxThreadsPerBlock, nodefault};
+	__property TCUDADimensions* MaxThreadsDim = {read=fMaxThreadsDim};
+	__property TCUDADimensions* MaxGridSize = {read=fMaxGridSize};
+	__property int ClockRate = {read=fDeviceProperties.clockRate, nodefault};
+	__property NativeUInt TotalConstMem = {read=fDeviceProperties.totalConstMem, nodefault};
+	__property int Major = {read=fDeviceProperties.major, nodefault};
+	__property int Minor = {read=fDeviceProperties.minor, nodefault};
+	__property NativeUInt TextureAlignment = {read=fDeviceProperties.textureAlignment, nodefault};
+	__property int DeviceOverlap = {read=fDeviceProperties.deviceOverlap, nodefault};
+	__property int MultiProcessorCount = {read=fDeviceProperties.multiProcessorCount, nodefault};
+};
+
+#pragma pack(pop)
+
+class PASCALIMPLEMENTATION TGLCUDADevice : public System::Classes::TComponent
+{
+	typedef System::Classes::TComponent inherited;
+	
+private:
+	System::UnicodeString FSelectDeviceName;
+	TCUDADevice* __fastcall GetDevice();
+	void __fastcall SetDevice(TCUDADevice* AValue);
+	void __fastcall SetDeviceName(const System::UnicodeString AName);
+	
+public:
+	__fastcall virtual TGLCUDADevice(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TGLCUDADevice();
+	bool __fastcall Suitable();
+	
+__published:
+	__property System::UnicodeString SelectDevice = {read=FSelectDeviceName, write=SetDeviceName};
+	__property TCUDADevice* Device = {read=GetDevice, write=SetDevice};
+};
+
+
+class PASCALIMPLEMENTATION TCUDAHandlesMaster : public System::Classes::TComponent
+{
+	typedef System::Classes::TComponent inherited;
+	
+protected:
+	virtual TCUDAContext* __fastcall GetContext() = 0 ;
+	virtual void __fastcall AllocateHandles();
+	virtual void __fastcall DestroyHandles();
+public:
+	/* TComponent.Create */ inline __fastcall virtual TCUDAHandlesMaster(System::Classes::TComponent* AOwner) : System::Classes::TComponent(AOwner) { }
+	/* TComponent.Destroy */ inline __fastcall virtual ~TCUDAHandlesMaster() { }
+	
+};
+
+
+typedef Gls::Generics::GThreadList__1<TCUDAHandlesMaster*>* TCUDAHandleList;
+
+class PASCALIMPLEMENTATION TCUDAContext : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+private:
+	Cuda::Import::TCUcontext *fHandle;
+	TCUDADevice* FDevice;
+	TOnOpenGLInteropInit FOnOpenGLInteropInit;
+	Gls::Generics::GThreadList__1<TCUDAHandlesMaster*>* FHandleList;
+	void __fastcall SetDevice(TCUDADevice* ADevice);
+	
+public:
+	__fastcall TCUDAContext();
+	__fastcall virtual ~TCUDAContext();
+	void __fastcall DestroyAllHandles();
+	void __fastcall Requires();
+	void __fastcall Release();
+	bool __fastcall IsValid();
+	__property TCUDADevice* Device = {read=FDevice, write=SetDevice};
+	__property TOnOpenGLInteropInit OnOpenGLInteropInit = {read=FOnOpenGLInteropInit, write=FOnOpenGLInteropInit};
+};
+
+
+typedef Gls::Generics::GList__1<TCUDADevice*>* TCUDADeviceList;
+
+typedef Gls::Generics::GList__1<TCUDAContext*>* TCUDAContextList;
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION CUDAContextManager : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+	
+private:
+	typedef System::DynamicArray<Gls::Generics::GList__1<TCUDAContext*>*> _CUDAContextManager__1;
+	
+	
+private:
+	static Gls::Generics::GList__1<TCUDADevice*>* fDeviceList;
+	static Gls::Generics::GList__1<TCUDAContext*>* fContextList;
+	static _CUDAContextManager__1 FContextStacks;
+	
+protected:
+	__classmethod TCUDADevice* __fastcall GetDevice(int i);
+	__classmethod TCUDADevice* __fastcall GetNextUnusedDevice();
+	__classmethod void __fastcall RegisterContext(TCUDAContext* aContext);
+	__classmethod void __fastcall UnRegisterContext(TCUDAContext* aContext);
+	__classmethod Gls::Generics::GList__1<TCUDAContext*>* __fastcall GetThreadStack();
+	__classmethod TCUDAContext* __fastcall GetContext(int i);
+	
+public:
+	__classmethod void __fastcall Init();
+	__classmethod void __fastcall Done();
+	__classmethod void __fastcall CreateContext(TCUDAContext* aContext);
+	__classmethod void __fastcall DestroyContext(TCUDAContext* aContext);
+	__classmethod void __fastcall CreateContextOf(TCUDADevice* ADevice);
+	__classmethod void __fastcall DestroyContextOf(TCUDADevice* ADevice);
+	__classmethod void __fastcall PushContext(TCUDAContext* aContext);
+	__classmethod TCUDAContext* __fastcall PopContext();
+	__classmethod void __fastcall FillUnusedDeviceList(System::Classes::TStringList* &AList);
+	__classmethod TCUDADevice* __fastcall GetDeviceByName(const System::UnicodeString AName);
+	__classmethod int __fastcall DeviceCount();
+	__property TCUDADevice* Devices[int i] = {read=GetDevice};
+	__classmethod TCUDADevice* __fastcall GetMaxGflopsDevice();
+	__classmethod int __fastcall ContextCount();
+	__classmethod TCUDAContext* __fastcall GetCurrentThreadContext();
+	__property TCUDAContext* Contexts[int i] = {read=GetContext};
+	
+private:
+	// __classmethod void __fastcall Create@();
+	// __classmethod void __fastcall Destroy@();
+public:
+	/* TObject.Create */ inline __fastcall CUDAContextManager() : System::TObject() { }
+	/* TObject.Destroy */ inline __fastcall virtual ~CUDAContextManager() { }
+	
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Context */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_CONTEXT)
+using namespace Cuda::Context;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_ContextHPP

+ 171 - 0
include/Win32/CUDA.DataAccess.hpp

@@ -0,0 +1,171 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.DataAccess.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_DataaccessHPP
+#define Cuda_DataaccessHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.Logger.hpp>
+#include <GLS.Strings.hpp>
+#include <GLS.Utils.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Dataaccess
+{
+//-- forward type declarations -----------------------------------------------
+template<typename TScalar> class DELPHICLASS GCUDAHostElementAccess__1;
+//-- type declarations -------------------------------------------------------
+#pragma pack(push,4)
+// Template declaration generated by Delphi parameterized types is
+// used only for accessing Delphi variables and fields.
+// Don't instantiate with new type parameters in user code.
+template<typename TScalar> class PASCALIMPLEMENTATION GCUDAHostElementAccess__1 : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+	
+public:
+	typedef System::StaticArray<TScalar, 2> TVector2;
+	
+	typedef System::Int8 _1;
+	
+	typedef System::StaticArray<TScalar, 3> TVector3;
+	
+	typedef System::Int8 _2;
+	
+	typedef System::StaticArray<TScalar, 4> TVector4;
+	
+	typedef System::Int8 _3;
+	
+	
+public:
+	static const int ElementSize = int(0x0);
+	
+	
+private:
+	__classmethod void __fastcall CheckElementSize(unsigned ACNum);
+	__classmethod TScalar __fastcall GetScalar();
+	__classmethod System::StaticArray<TScalar, 2> __fastcall GetVector2();
+	__classmethod System::StaticArray<TScalar, 3> __fastcall GetVector3();
+	__classmethod System::StaticArray<TScalar, 4> __fastcall GetVector4();
+	__classmethod void __fastcall SetScalar(const TScalar AValue);
+	__classmethod void __fastcall SetVector2(const System::StaticArray<TScalar, 2> AValue);
+	__classmethod void __fastcall SetVector3(const System::StaticArray<TScalar, 3> AValue);
+	__classmethod void __fastcall SetVector4(const System::StaticArray<TScalar, 4> AValue);
+	
+public:
+	__property TScalar Scalar = {read=GetScalar, write=SetScalar};
+	__property TVector2 Vector2 = {read=GetVector2, write=SetVector2};
+	__property TVector3 Vector3 = {read=GetVector3, write=SetVector3};
+	__property TVector4 Vector4 = {read=GetVector4, write=SetVector4};
+public:
+	/* TObject.Create */ inline __fastcall GCUDAHostElementAccess__1() : System::TObject() { }
+	/* TObject.Destroy */ inline __fastcall virtual ~GCUDAHostElementAccess__1() { }
+	
+};
+
+#pragma pack(pop)
+
+typedef GCUDAHostElementAccess__1<System::Byte>* UByteElement;
+
+typedef GCUDAHostElementAccess__1<System::Int8>* ByteElement;
+
+typedef GCUDAHostElementAccess__1<System::Word>* UShortElement;
+
+typedef GCUDAHostElementAccess__1<short>* ShortElement;
+
+typedef GCUDAHostElementAccess__1<unsigned>* UIntElement;
+
+typedef GCUDAHostElementAccess__1<int>* IntElement;
+
+typedef GCUDAHostElementAccess__1<Gls::Utils::THalfFloat>* HalfElement;
+
+typedef GCUDAHostElementAccess__1<float>* FloatElement;
+
+typedef GCUDAHostElementAccess__1<double>* DoubleElement;
+
+typedef System::Int8 _1;
+
+typedef System::Int8 _2;
+
+typedef System::Int8 _3;
+
+typedef System::Int8 _1;
+
+typedef System::Int8 _2;
+
+typedef System::Int8 _3;
+
+typedef System::Int8 _1;
+
+typedef System::Int8 _2;
+
+typedef System::Int8 _3;
+
+typedef System::Int8 _1;
+
+typedef System::Int8 _2;
+
+typedef System::Int8 _3;
+
+typedef System::Int8 _1;
+
+typedef System::Int8 _2;
+
+typedef System::Int8 _3;
+
+typedef System::Int8 _1;
+
+typedef System::Int8 _2;
+
+typedef System::Int8 _3;
+
+typedef System::Int8 _1;
+
+typedef System::Int8 _2;
+
+typedef System::Int8 _3;
+
+typedef System::Int8 _1;
+
+typedef System::Int8 _2;
+
+typedef System::Int8 _3;
+
+typedef System::Int8 _1;
+
+typedef System::Int8 _2;
+
+typedef System::Int8 _3;
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE System::PByte __fastcall GetElementAccessAddress(void);
+extern DELPHI_PACKAGE unsigned __fastcall GetElementAccessSize(void);
+extern DELPHI_PACKAGE void __fastcall SetElementAccessAddress(System::PByte AValue, unsigned ASize);
+}	/* namespace Dataaccess */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_DATAACCESS)
+using namespace Cuda::Dataaccess;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_DataaccessHPP

+ 106 - 0
include/Win32/CUDA.EditorFm.hpp

@@ -0,0 +1,106 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.EditorFm.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_EditorfmHPP
+#define Cuda_EditorfmHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <Winapi.Messages.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Variants.hpp>
+#include <System.Classes.hpp>
+#include <System.Win.Registry.hpp>
+#include <System.ImageList.hpp>
+#include <Vcl.Graphics.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <Vcl.ImgList.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.ToolWin.hpp>
+#include <DesignIntf.hpp>
+#include <VCLEditors.hpp>
+#include <GLS.Strings.hpp>
+#include <CUDA.APIComps.hpp>
+#include <CUDA.FFTPlan.hpp>
+#include <CUDA.Graphics.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Editorfm
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLCUDAEditorForm;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLCUDAEditorForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Vcl::Comctrls::TToolBar* ToolBar1;
+	Vcl::Comctrls::TToolButton* AddModuleButton;
+	Vcl::Comctrls::TToolButton* DeleteButton;
+	Vcl::Stdctrls::TListBox* ListBox1;
+	Vcl::Controls::TImageList* ImageList1;
+	Vcl::Comctrls::TToolButton* AddMemDataButton;
+	Vcl::Comctrls::TToolButton* AddFFTPlanButton;
+	Vcl::Comctrls::TToolButton* AddGeometryResButton;
+	Vcl::Comctrls::TToolButton* AddImageResButton;
+	void __fastcall AddItemButtonClick(System::TObject* Sender);
+	void __fastcall DeleteButtonClick(System::TObject* Sender);
+	void __fastcall FormCreate(System::TObject* Sender);
+	void __fastcall ListBox1Click(System::TObject* Sender);
+	void __fastcall FormDestroy(System::TObject* Sender);
+	
+private:
+	System::Classes::TList* FClassList;
+	Cuda::Apicomps::TGLCUDA* FCUDA;
+	Designintf::_di_IDesigner FCurrentDesigner;
+	
+protected:
+	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
+	void __fastcall OnCUDAComponentNameChanged(System::TObject* Sender);
+	
+public:
+	void __fastcall SetCUDAEditorClient(Cuda::Apicomps::TGLCUDA* Client, Designintf::_di_IDesigner Designer);
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TGLCUDAEditorForm(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TGLCUDAEditorForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TGLCUDAEditorForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TGLCUDAEditorForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TGLCUDAEditorForm* __fastcall GLCUDAEditorForm(void);
+extern DELPHI_PACKAGE void __fastcall ReleaseGLCUDAEditorForm(void);
+}	/* namespace Editorfm */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_EDITORFM)
+using namespace Cuda::Editorfm;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_EditorfmHPP

+ 93 - 0
include/Win32/CUDA.FFTPlan.hpp

@@ -0,0 +1,93 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.FFTPlan.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_FftplanHPP
+#define Cuda_FftplanHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <CUDA.Import.hpp>
+#include <CUDA.Context.hpp>
+#include <CUDA.APIComps.hpp>
+#include <CUDA.FourierTransform.hpp>
+#include <GLS.Strings.hpp>
+#include <GLS.Logger.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Fftplan
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TCUDAFFTPlan;
+//-- type declarations -------------------------------------------------------
+enum DECLSPEC_DENUM TCUDAFFTransform : unsigned char { fftRealToComplex, fftComplexToReal, fftComplexToComplex, fftDoubleToDoubleComplex, fftDoubleComplexToDouble, fftDoubleComplexToDoubleComplex };
+
+enum DECLSPEC_DENUM TCUDAFFTdir : unsigned char { fftdForward, fftdInverse };
+
+class PASCALIMPLEMENTATION TCUDAFFTPlan : public Cuda::Apicomps::TCUDAComponent
+{
+	typedef Cuda::Apicomps::TCUDAComponent inherited;
+	
+private:
+	Cuda::Fouriertransform::TcufftHandle FHandle;
+	int FWidth;
+	int FHeight;
+	int FDepth;
+	int FBatch;
+	int FSize;
+	int FPaddedSize;
+	TCUDAFFTransform FTransform;
+	Cuda::Fouriertransform::TcufftResult FStatus;
+	void __fastcall SetWidth(int Value);
+	void __fastcall SetHeight(int Value);
+	void __fastcall SetDepth(int Value);
+	void __fastcall SetBatch(int Value);
+	void __fastcall SetTransform(TCUDAFFTransform Value);
+	
+protected:
+	virtual void __fastcall AllocateHandles();
+	virtual void __fastcall DestroyHandles();
+	__classmethod void __fastcall CheckLib();
+	
+public:
+	__fastcall virtual TCUDAFFTPlan(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TCUDAFFTPlan();
+	virtual void __fastcall Assign(System::Classes::TPersistent* Source);
+	void __fastcall Execute(Cuda::Apicomps::TCUDAMemData* ASrc, Cuda::Apicomps::TCUDAMemData* ADst, const TCUDAFFTdir ADir = (TCUDAFFTdir)(0x0));
+	
+__published:
+	__property int Width = {read=FWidth, write=SetWidth, default=256};
+	__property int Height = {read=FHeight, write=SetHeight, default=0};
+	__property int Depth = {read=FDepth, write=SetDepth, default=0};
+	__property int Batch = {read=FBatch, write=SetBatch, default=1};
+	__property TCUDAFFTransform Transform = {read=FTransform, write=SetTransform, default=0};
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Fftplan */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_FFTPLAN)
+using namespace Cuda::Fftplan;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_FftplanHPP

+ 142 - 0
include/Win32/CUDA.FourierTransform.hpp

@@ -0,0 +1,142 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.FourierTransform.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_FouriertransformHPP
+#define Cuda_FouriertransformHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.Strings.hpp>
+#include <CUDA.Import.hpp>
+#include <CUDA.Runtime.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Fouriertransform
+{
+//-- forward type declarations -----------------------------------------------
+//-- type declarations -------------------------------------------------------
+typedef System::StaticArray<System::UnicodeString, 10> Cuda_Fouriertransform__1;
+
+typedef unsigned TcufftHandle;
+
+typedef float TcufftReal;
+
+typedef float *PcufftReal;
+
+typedef float TcufftRealfloat;
+
+typedef double *PcufftDoubleReal;
+
+typedef double TcufftDoubleReal;
+
+typedef Gls::Vectortypes::TVector2d *PcufftDoubleComplex;
+
+typedef Gls::Vectortypes::TVector2d TcufftDoubleComplex;
+
+typedef Gls::Vectortypes::TVector2f *PcufftComplex;
+
+typedef Gls::Vectortypes::TVector2f TcufftComplex;
+
+typedef System::Byte TcufftResult;
+
+typedef unsigned TcufftType;
+
+enum DECLSPEC_DENUM TcudaRoundMode : unsigned char { cudaRoundNearest, cudaRoundZero, cudaRoundPosInf, cudaRoundMinInf };
+
+typedef unsigned TcufftCompatibility;
+
+typedef TcufftResult __stdcall (*TcufftPlan1d)(/* out */ TcufftHandle &plan, int nx, TcufftType atype, int batch);
+
+typedef TcufftResult __stdcall (*TcufftPlan2d)(/* out */ TcufftHandle &plan, int nx, int ny, TcufftType atype);
+
+typedef TcufftResult __stdcall (*TcufftPlan3d)(/* out */ TcufftHandle &plan, int nx, int ny, int nz, TcufftType atype);
+
+typedef TcufftResult __stdcall (*TcufftDestroy)(TcufftHandle plan);
+
+typedef TcufftResult __stdcall (*TcufftPlanMany)(/* out */ TcufftHandle &plan, int rank, int &n, int &inembed, int istride, int idist, int &onembed, int ostride, int odist, TcufftType ctype, int batch);
+
+typedef TcufftResult __stdcall (*TcufftExecC2C)(TcufftHandle plan, PcufftComplex idata, PcufftComplex odata, int direction);
+
+typedef TcufftResult __stdcall (*TcufftExecR2C)(TcufftHandle plan, PcufftReal idata, PcufftComplex odata);
+
+typedef TcufftResult __stdcall (*TcufftExecC2R)(TcufftHandle plan, PcufftComplex idata, PcufftReal odata);
+
+typedef TcufftResult __stdcall (*TcufftExecZ2Z)(TcufftHandle plan, PcufftDoubleComplex idata, PcufftDoubleComplex odata, int direction);
+
+typedef TcufftResult __stdcall (*TcufftExecD2Z)(TcufftHandle plan, PcufftDoubleReal idata, PcufftDoubleComplex odata);
+
+typedef TcufftResult __stdcall (*TcufftExecZ2D)(TcufftHandle plan, PcufftDoubleComplex idata, PcufftDoubleReal odata);
+
+typedef TcufftResult __stdcall (*TcufftSetStream)(TcufftHandle p, int stream);
+
+typedef TcufftResult __stdcall (*TcufftSetCompatibilityMode)(TcufftHandle plan, TcufftCompatibility mode);
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE Cuda_Fouriertransform__1 CUFFTDLLNAMES;
+static const unsigned INVALID_CUFFT_HANDLE = unsigned(0xffffffff);
+extern DELPHI_PACKAGE TcufftResult CUFFT_SUCCESS;
+extern DELPHI_PACKAGE TcufftResult CUFFT_INVALID_PLAN;
+extern DELPHI_PACKAGE TcufftResult CUFFT_ALLOC_FAILED;
+extern DELPHI_PACKAGE TcufftResult CUFFT_INVALID_TYPE;
+extern DELPHI_PACKAGE TcufftResult CUFFT_INVALID_VALUE;
+extern DELPHI_PACKAGE TcufftResult CUFFT_INTERNAL_ERROR;
+extern DELPHI_PACKAGE TcufftResult CUFFT_EXEC_FAILED;
+extern DELPHI_PACKAGE TcufftResult CUFFT_SETUP_FAILED;
+extern DELPHI_PACKAGE TcufftResult CUFFT_INVALID_SIZE;
+static const System::Int8 CUFFT_FORWARD = System::Int8(-1);
+static const System::Int8 CUFFT_INVERSE = System::Int8(0x1);
+extern DELPHI_PACKAGE TcufftType CUFFT_R2C;
+extern DELPHI_PACKAGE TcufftType CUFFT_C2R;
+extern DELPHI_PACKAGE TcufftType CUFFT_C2C;
+extern DELPHI_PACKAGE TcufftType CUFFT_D2Z;
+extern DELPHI_PACKAGE TcufftType CUFFT_Z2D;
+extern DELPHI_PACKAGE TcufftType CUFFT_Z2Z;
+extern DELPHI_PACKAGE TcufftCompatibility CUFFT_COMPATIBILITY_NORMAL;
+extern DELPHI_PACKAGE TcufftCompatibility CUFFT_COMPATIBILITY_FFTW_PADDING;
+extern DELPHI_PACKAGE TcufftCompatibility CUFFT_COMPATIBILITY_FFTW_C2R_ASYMMETRIC;
+extern DELPHI_PACKAGE TcufftCompatibility CUFFT_COMPATIBILITY_FFTW;
+extern DELPHI_PACKAGE TcufftPlan1d cufftPlan1d;
+extern DELPHI_PACKAGE TcufftPlan2d cufftPlan2d;
+extern DELPHI_PACKAGE TcufftPlan3d cufftPlan3d;
+extern DELPHI_PACKAGE TcufftDestroy cufftDestroy;
+extern DELPHI_PACKAGE TcufftPlanMany cufftPlanMany;
+extern DELPHI_PACKAGE TcufftExecC2C cufftExecC2C;
+extern DELPHI_PACKAGE TcufftExecR2C cufftExecR2C;
+extern DELPHI_PACKAGE TcufftExecC2R cufftExecC2R;
+extern DELPHI_PACKAGE TcufftExecZ2Z cufftExecZ2Z;
+extern DELPHI_PACKAGE TcufftExecD2Z cufftExecD2Z;
+extern DELPHI_PACKAGE TcufftExecZ2D cufftExecZ2D;
+extern DELPHI_PACKAGE TcufftSetStream cufftSetStream;
+extern DELPHI_PACKAGE TcufftSetCompatibilityMode cufftSetCompatibilityMode;
+extern DELPHI_PACKAGE bool __fastcall InitCUFFT(void);
+extern DELPHI_PACKAGE void __fastcall CloseCUFFT(void);
+extern DELPHI_PACKAGE bool __fastcall InitCUFFTFromLibrary(const System::WideString LibName);
+extern DELPHI_PACKAGE bool __fastcall IsCUFFTInitialized(void);
+extern DELPHI_PACKAGE System::UnicodeString __fastcall Get_CUDA_FFT_Error_String(TcufftResult AError);
+}	/* namespace Fouriertransform */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_FOURIERTRANSFORM)
+using namespace Cuda::Fouriertransform;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_FouriertransformHPP

+ 282 - 0
include/Win32/CUDA.Graphics.hpp

@@ -0,0 +1,282 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.Graphics.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_GraphicsHPP
+#define Cuda_GraphicsHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.OpenGL.hpp>
+#include <Winapi.OpenGLext.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <CUDA.Import.hpp>
+#include <CUDA.APIComps.hpp>
+#include <GLS.Context.hpp>
+#include <GLS.State.hpp>
+#include <GLS.Scene.hpp>
+#include <GLS.Graphics.hpp>
+#include <GLS.Material.hpp>
+#include <GLS.Strings.hpp>
+#include <GLS.TextureFormat.hpp>
+#include <GLS.Texture.hpp>
+#include <GLSL.Shader.hpp>
+#include <GLSL.ShaderParameter.hpp>
+#include <GLS.PersistentClasses.hpp>
+#include <GLS.RenderContextInfo.hpp>
+#include <GLS.Coordinates.hpp>
+#include <GLS.BaseClasses.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Graphics
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLVertexAttribute;
+class DELPHICLASS TGLVertexAttributes;
+class DELPHICLASS TCUDACustomFeedBackMesh;
+class DELPHICLASS TCUDAFeedbackMesh;
+class DELPHICLASS TCUDAImageResource;
+class DELPHICLASS TCUDAGeometryResource;
+//-- type declarations -------------------------------------------------------
+typedef void __fastcall (__closure *TOnBeforeKernelLaunch)(TGLVertexAttribute* Sender);
+
+class PASCALIMPLEMENTATION TGLVertexAttribute : public System::Classes::TCollectionItem
+{
+	typedef System::Classes::TCollectionItem inherited;
+	
+private:
+	System::UnicodeString FName;
+	Glsl::Shaderparameter::TGLSLDataType FType;
+	Cuda::Apicomps::TCUDAFunction* FFunc;
+	int FLocation;
+	TOnBeforeKernelLaunch FOnBeforeKernelLaunch;
+	void __fastcall SetName(const System::UnicodeString AName);
+	void __fastcall SetType(Glsl::Shaderparameter::TGLSLDataType AType);
+	void __fastcall SetFunc(Cuda::Apicomps::TCUDAFunction* AFunc);
+	int __fastcall GetLocation();
+	HIDESBASE TGLVertexAttributes* __fastcall GetOwner();
+	
+public:
+	__fastcall virtual TGLVertexAttribute(System::Classes::TCollection* ACollection);
+	void __fastcall NotifyChange(System::TObject* Sender);
+	__property int Location = {read=GetLocation, nodefault};
+	
+__published:
+	__property System::UnicodeString Name = {read=FName, write=SetName};
+	__property Glsl::Shaderparameter::TGLSLDataType GLSLType = {read=FType, write=SetType, nodefault};
+	__property Cuda::Apicomps::TCUDAFunction* KernelFunction = {read=FFunc, write=SetFunc};
+	__property TOnBeforeKernelLaunch OnBeforeKernelLaunch = {read=FOnBeforeKernelLaunch, write=FOnBeforeKernelLaunch};
+public:
+	/* TCollectionItem.Destroy */ inline __fastcall virtual ~TGLVertexAttribute() { }
+	
+};
+
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TGLVertexAttributes : public System::Classes::TOwnedCollection
+{
+	typedef System::Classes::TOwnedCollection inherited;
+	
+public:
+	TGLVertexAttribute* operator[](int Index) { return this->Attributes[Index]; }
+	
+private:
+	void __fastcall SetItems(int Index, TGLVertexAttribute* const AValue);
+	TGLVertexAttribute* __fastcall GetItems(int Index);
+	
+public:
+	__fastcall TGLVertexAttributes(System::Classes::TComponent* AOwner);
+	void __fastcall NotifyChange(System::TObject* Sender);
+	System::UnicodeString __fastcall MakeUniqueName(const System::UnicodeString ANameRoot);
+	TGLVertexAttribute* __fastcall GetAttributeByName(const System::UnicodeString AName);
+	HIDESBASE TGLVertexAttribute* __fastcall Add();
+	__property TGLVertexAttribute* Attributes[int Index] = {read=GetItems, write=SetItems/*, default*/};
+public:
+	/* TCollection.Destroy */ inline __fastcall virtual ~TGLVertexAttributes() { }
+	
+};
+
+#pragma pack(pop)
+
+enum DECLSPEC_DENUM TFeedBackMeshPrimitive : unsigned char { fbmpPoint, fbmpLine, fbmpTriangle };
+
+enum DECLSPEC_DENUM TFeedBackMeshLaunching : unsigned char { fblCommon, fblOnePerAtttribute };
+
+class PASCALIMPLEMENTATION TCUDACustomFeedBackMesh : public Gls::Scene::TGLBaseSceneObject
+{
+	typedef Gls::Scene::TGLBaseSceneObject inherited;
+	
+private:
+	Cuda::Apicomps::TCUDAGraphicResource* FGeometryResource;
+	TGLVertexAttributes* FAttributes;
+	Gls::Context::TGLVertexArrayHandle* FVAO;
+	Gls::Context::TGLVBOArrayBufferHandle* FVBO;
+	Gls::Context::TGLVBOElementArrayHandle* FEBO;
+	TFeedBackMeshPrimitive FPrimitiveType;
+	int FVertexNumber;
+	int FElementNumber;
+	Glsl::Shader::TGLSLShader* FShader;
+	Cuda::Apicomps::TCUDAFunction* FCommonFunc;
+	TFeedBackMeshLaunching FLaunching;
+	bool FBlend;
+	void __fastcall SetAttributes(TGLVertexAttributes* AValue);
+	void __fastcall SetPrimitiveType(TFeedBackMeshPrimitive AValue);
+	void __fastcall SetVertexNumber(int AValue);
+	void __fastcall SetElementNumber(int AValue);
+	void __fastcall SetShader(Glsl::Shader::TGLSLShader* AShader);
+	void __fastcall SetCommonFunc(Cuda::Apicomps::TCUDAFunction* AFunc);
+	
+protected:
+	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
+	void __fastcall RefreshAttributes();
+	void __fastcall AllocateHandles();
+	void __fastcall LaunchKernels();
+	__property TGLVertexAttributes* Attributes = {read=FAttributes, write=SetAttributes};
+	__property Glsl::Shader::TGLSLShader* Shader = {read=FShader, write=SetShader};
+	__property TFeedBackMeshPrimitive PrimitiveType = {read=FPrimitiveType, write=SetPrimitiveType, default=0};
+	__property int VertexNumber = {read=FVertexNumber, write=SetVertexNumber, default=1};
+	__property int ElementNumber = {read=FElementNumber, write=SetElementNumber, default=0};
+	__property Cuda::Apicomps::TCUDAFunction* CommonKernelFunction = {read=FCommonFunc, write=SetCommonFunc};
+	__property TFeedBackMeshLaunching Launching = {read=FLaunching, write=FLaunching, default=0};
+	__property bool Blend = {read=FBlend, write=FBlend, default=0};
+	
+public:
+	__fastcall virtual TCUDACustomFeedBackMesh(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TCUDACustomFeedBackMesh();
+	virtual void __fastcall DoRender(Gls::Rendercontextinfo::TGLRenderContextInfo &ARci, bool ARenderSelf, bool ARenderChildren);
+	__property Gls::Context::TGLVBOArrayBufferHandle* ArrayBufferHandle = {read=FVBO};
+	__property Gls::Context::TGLVBOElementArrayHandle* ElementArrayHandle = {read=FEBO};
+public:
+	/* TGLBaseSceneObject.CreateAsChild */ inline __fastcall TCUDACustomFeedBackMesh(Gls::Scene::TGLBaseSceneObject* aParentOwner) : Gls::Scene::TGLBaseSceneObject(aParentOwner) { }
+	
+};
+
+
+class PASCALIMPLEMENTATION TCUDAFeedbackMesh : public TCUDACustomFeedBackMesh
+{
+	typedef TCUDACustomFeedBackMesh inherited;
+	
+__published:
+	__property Attributes;
+	__property Shader;
+	__property PrimitiveType = {default=0};
+	__property VertexNumber = {default=1};
+	__property ElementNumber = {default=0};
+	__property CommonKernelFunction;
+	__property Launching = {default=0};
+	__property Blend = {default=0};
+	__property ObjectsSorting = {default=0};
+	__property VisibilityCulling = {default=0};
+	__property Direction;
+	__property PitchAngle = {default=0};
+	__property Position;
+	__property RollAngle = {default=0};
+	__property Scale;
+	__property ShowAxes = {default=0};
+	__property TurnAngle = {default=0};
+	__property Up;
+	__property Visible = {default=1};
+	__property Pickable = {default=1};
+	__property OnProgress;
+	__property OnPicked;
+	__property Behaviours;
+	__property Effects;
+public:
+	/* TCUDACustomFeedBackMesh.Create */ inline __fastcall virtual TCUDAFeedbackMesh(System::Classes::TComponent* AOwner) : TCUDACustomFeedBackMesh(AOwner) { }
+	/* TCUDACustomFeedBackMesh.Destroy */ inline __fastcall virtual ~TCUDAFeedbackMesh() { }
+	
+public:
+	/* TGLBaseSceneObject.CreateAsChild */ inline __fastcall TCUDAFeedbackMesh(Gls::Scene::TGLBaseSceneObject* aParentOwner) : TCUDACustomFeedBackMesh(aParentOwner) { }
+	
+};
+
+
+class PASCALIMPLEMENTATION TCUDAImageResource : public Cuda::Apicomps::TCUDAGraphicResource
+{
+	typedef Cuda::Apicomps::TCUDAGraphicResource inherited;
+	
+private:
+	Gls::Material::TGLMaterialLibrary* fMaterialLibrary;
+	System::UnicodeString fTextureName;
+	void __fastcall SetMaterialLibrary(Gls::Material::TGLMaterialLibrary* const Value);
+	void __fastcall SetTextureName(const System::UnicodeString Value);
+	
+protected:
+	virtual void __fastcall AllocateHandles();
+	virtual void __fastcall DestroyHandles();
+	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
+	
+public:
+	__fastcall virtual TCUDAImageResource(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TCUDAImageResource();
+	virtual void __fastcall MapResources();
+	virtual void __fastcall UnMapResources();
+	virtual void __fastcall BindArrayToTexture(Cuda::Apicomps::TCUDAMemData* &cudaArray, unsigned ALeyer, unsigned ALevel);
+	
+__published:
+	__property System::UnicodeString TextureName = {read=fTextureName, write=SetTextureName};
+	__property Gls::Material::TGLMaterialLibrary* MaterialLibrary = {read=fMaterialLibrary, write=SetMaterialLibrary};
+	__property Mapping = {default=0};
+};
+
+
+class PASCALIMPLEMENTATION TCUDAGeometryResource : public Cuda::Apicomps::TCUDAGraphicResource
+{
+	typedef Cuda::Apicomps::TCUDAGraphicResource inherited;
+	
+private:
+	TCUDACustomFeedBackMesh* FFeedBackMesh;
+	void __fastcall SetFeedBackMesh(TCUDACustomFeedBackMesh* const Value);
+	unsigned __fastcall GetAttribArraySize(TGLVertexAttribute* AAttr);
+	
+protected:
+	virtual void __fastcall AllocateHandles();
+	virtual void __fastcall DestroyHandles();
+	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
+	virtual unsigned __fastcall GetAttributeArraySize(const System::UnicodeString AName);
+	virtual void * __fastcall GetAttributeArrayAddress(const System::UnicodeString AName);
+	virtual unsigned __fastcall GetElementArrayDataSize();
+	virtual void * __fastcall GetElementArrayAddress();
+	
+public:
+	__fastcall virtual TCUDAGeometryResource(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TCUDAGeometryResource();
+	virtual void __fastcall MapResources();
+	virtual void __fastcall UnMapResources();
+	__property unsigned AttributeDataSize[const System::UnicodeString AttribName] = {read=GetAttributeArraySize};
+	__property void * AttributeDataAddress[const System::UnicodeString AttribName] = {read=GetAttributeArrayAddress};
+	__property unsigned IndexDataSize = {read=GetElementArrayDataSize, nodefault};
+	__property void * IndexDataAddress = {read=GetElementArrayAddress};
+	
+__published:
+	__property TCUDACustomFeedBackMesh* FeedBackMesh = {read=FFeedBackMesh, write=SetFeedBackMesh};
+	__property Mapping = {default=0};
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Graphics */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_GRAPHICS)
+using namespace Cuda::Graphics;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_GraphicsHPP

+ 659 - 0
include/Win32/CUDA.Import.hpp

@@ -0,0 +1,659 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.Import.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_ImportHPP
+#define Cuda_ImportHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Import
+{
+//-- forward type declarations -----------------------------------------------
+struct DECLSPEC_DRECORD TCUcontext
+{
+};
+
+
+struct DECLSPEC_DRECORD TCUmodule
+{
+};
+
+
+struct DECLSPEC_DRECORD TCUfunction
+{
+};
+
+
+struct DECLSPEC_DRECORD TCUarray
+{
+};
+
+
+struct DECLSPEC_DRECORD TCUtexref
+{
+};
+
+
+struct DECLSPEC_DRECORD TCUevent
+{
+};
+
+
+struct DECLSPEC_DRECORD TCUstream
+{
+};
+
+
+struct DECLSPEC_DRECORD TCUgraphicsResource
+{
+};
+
+
+struct TCUdevprop;
+struct TcudaFuncAttributes;
+struct TCUDA_MEMCPY2D;
+struct TCUDA_MEMCPY3D;
+struct TCUDA_ARRAY_DESCRIPTOR;
+struct TCUDA_ARRAY3D_DESCRIPTOR;
+//-- type declarations -------------------------------------------------------
+typedef void * TCUdeviceptr;
+
+typedef int TCUdevice;
+
+typedef TCUcontext *PCUcontext;
+
+typedef TCUmodule *PCUmodule;
+
+typedef TCUfunction *PCUfunction;
+
+typedef TCUarray *PCUarray;
+
+typedef TCUtexref *PCUtexref;
+
+typedef TCUevent *PCUevent;
+
+typedef TCUstream *PCUstream;
+
+typedef TCUgraphicsResource *PCUgraphicsResource;
+
+typedef PCUgraphicsResource *PPCUgraphicsResource;
+
+enum DECLSPEC_DENUM TCUctx_flags : unsigned char { CU_CTX_SCHED_AUTO, CU_CTX_SCHED_SPIN, CU_CTX_SCHED_YIELD, CU_CTX_SCHED_MASK, CU_CTX_BLOCKING_SYNC, CU_CTX_MAP_HOST = 8, CU_CTX_FLAGS_MASK = 15 };
+
+enum DECLSPEC_DENUM TCUevent_flags : unsigned char { CU_EVENT_DEFAULT, CU_EVENT_BLOCKING_SYNC };
+
+enum DECLSPEC_DENUM TCUarray_format : unsigned char { CU_AD_FORMAT_UNSIGNED_INT8 = 1, CU_AD_FORMAT_UNSIGNED_INT16, CU_AD_FORMAT_UNSIGNED_INT32, CU_AD_FORMAT_SIGNED_INT8 = 8, CU_AD_FORMAT_SIGNED_INT16, CU_AD_FORMAT_SIGNED_INT32, CU_AD_FORMAT_HALF = 16, CU_AD_FORMAT_FLOAT = 32 };
+
+enum DECLSPEC_DENUM TCUaddress_mode : unsigned char { CU_TR_ADDRESS_MODE_WRAP, CU_TR_ADDRESS_MODE_CLAMP, CU_TR_ADDRESS_MODE_MIRROR };
+
+enum DECLSPEC_DENUM TCUfilter_mode : unsigned char { CU_TR_FILTER_MODE_POINT, CU_TR_FILTER_MODE_LINEAR };
+
+enum DECLSPEC_DENUM TCUdevice_attribute : unsigned char { CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1, CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y, CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z, CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X, CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y, CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z, CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = 8, CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, CU_DEVICE_ATTRIBUTE_WARP_SIZE, CU_DEVICE_ATTRIBUTE_MAX_PITCH, CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK, CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = 12, CU_DEVICE_ATTRIBUTE_CLOCK_RATE, CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, 
+	CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, CU_DEVICE_ATTRIBUTE_INTEGRATED, CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, CU_DEVICE_ATTRIBUTE_COMPUTE_MODE };
+
+enum DECLSPEC_DENUM TcudaLimit : unsigned char { cudaLimitStackSize, cudaLimitPrintfFifoSize };
+
+struct DECLSPEC_DRECORD TCUdevprop
+{
+public:
+	int maxThreadsPerBlock;
+	System::StaticArray<int, 3> maxThreadsDim;
+	System::StaticArray<int, 3> maxGridSize;
+	int sharedMemPerBlock;
+	int totalConstantMemory;
+	int SIMDWidth;
+	int memPitch;
+	int regsPerBlock;
+	int clockRate;
+	int textureAlign;
+};
+
+
+enum DECLSPEC_DENUM TCUfunction_attribute : unsigned char { CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK, CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES, CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES, CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES, CU_FUNC_ATTRIBUTE_NUM_REGS, CU_FUNC_ATTRIBUTE_MAX };
+
+enum DECLSPEC_DENUM TCUmemorytype : unsigned char { CU_MEMORYTYPE_HOST = 1, CU_MEMORYTYPE_DEVICE, CU_MEMORYTYPE_ARRAY };
+
+enum DECLSPEC_DENUM TCUcomputemode : unsigned char { CU_COMPUTEMODE_DEFAULT, CU_COMPUTEMODE_EXCLUSIVE, CU_COMPUTEMODE_PROHIBITED };
+
+enum DECLSPEC_DENUM TCUjit_option : unsigned char { CU_JIT_MAX_REGISTERS, CU_JIT_THREADS_PER_BLOCK, CU_JIT_WALL_TIME, CU_JIT_INFO_LOG_BUFFER, CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, CU_JIT_ERROR_LOG_BUFFER, CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, CU_JIT_OPTIMIZATION_LEVEL, CU_JIT_TARGET_FROM_CUCONTEXT, CU_JIT_TARGET, CU_JIT_FALLBACK_STRATEGY };
+
+enum DECLSPEC_DENUM TCUjit_target : unsigned char { CU_TARGET_COMPUTE_10, CU_TARGET_COMPUTE_11, CU_TARGET_COMPUTE_12, CU_TARGET_COMPUTE_13 };
+
+enum DECLSPEC_DENUM TCUjit_fallback : unsigned char { CU_PREFER_PTX, CU_PREFER_BINARY };
+
+enum DECLSPEC_DENUM TCUgraphicsRegisterFlags : unsigned char { CU_GRAPHICS_REGISTER_FLAGS_NONE };
+
+enum DECLSPEC_DENUM TCUgraphicsMapResourceFlags : unsigned char { CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE, CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY, CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD };
+
+enum DECLSPEC_DENUM TCUarray_cubemap_face : unsigned char { CU_CUBEMAP_FACE_POSITIVE_X, CU_CUBEMAP_FACE_NEGATIVE_X, CU_CUBEMAP_FACE_POSITIVE_Y, CU_CUBEMAP_FACE_NEGATIVE_Y, CU_CUBEMAP_FACE_POSITIVE_Z, CU_CUBEMAP_FACE_NEGATIVE_Z };
+
+struct DECLSPEC_DRECORD TcudaFuncAttributes
+{
+public:
+	NativeUInt sharedSizeBytes;
+	NativeUInt constSizeBytes;
+	NativeUInt localSizeBytes;
+	int maxThreadsPerBlock;
+	int numRegs;
+	int ptxVersion;
+	int binaryVersion;
+	System::StaticArray<int, 6> __cudaReserved;
+};
+
+
+enum DECLSPEC_DENUM TcudaFuncCache : unsigned char { cudaFuncCachePreferNone, cudaFuncCachePreferShared, cudaFuncCachePreferL1 };
+
+typedef unsigned TCUresult;
+
+typedef TCUDA_MEMCPY2D *PCUDA_MEMCPY2D;
+
+struct DECLSPEC_DRECORD TCUDA_MEMCPY2D
+{
+public:
+	unsigned srcXInBytes;
+	unsigned srcY;
+	TCUmemorytype srcMemoryType;
+	void *srcHost;
+	void *srcDevice;
+	TCUarray *srcArray;
+	unsigned srcPitch;
+	unsigned dstXInBytes;
+	unsigned dstY;
+	TCUmemorytype dstMemoryType;
+	void *dstHost;
+	void *dstDevice;
+	TCUarray *dstArray;
+	unsigned dstPitch;
+	unsigned WidthInBytes;
+	unsigned Height;
+};
+
+
+struct DECLSPEC_DRECORD TCUDA_MEMCPY3D
+{
+public:
+	unsigned srcXInBytes;
+	unsigned srcY;
+	unsigned srcZ;
+	unsigned srcLOD;
+	TCUmemorytype srcMemoryType;
+	void *srcHost;
+	void *srcDevice;
+	TCUarray *srcArray;
+	void *reserved0;
+	unsigned srcPitch;
+	unsigned srcHeight;
+	unsigned dstXInBytes;
+	unsigned dstY;
+	unsigned dstZ;
+	unsigned dstLOD;
+	TCUmemorytype dstMemoryType;
+	void *dstHost;
+	void *dstDevice;
+	TCUarray *dstArray;
+	void *reserved1;
+	unsigned dstPitch;
+	unsigned dstHeight;
+	unsigned WidthInBytes;
+	unsigned Height;
+	unsigned Depth;
+};
+
+
+typedef TCUDA_ARRAY_DESCRIPTOR *PCUDA_ARRAY_DESCRIPTOR;
+
+struct DECLSPEC_DRECORD TCUDA_ARRAY_DESCRIPTOR
+{
+public:
+	unsigned Width;
+	unsigned Height;
+	TCUarray_format Format;
+	unsigned NumChannels;
+};
+
+
+struct DECLSPEC_DRECORD TCUDA_ARRAY3D_DESCRIPTOR
+{
+public:
+	unsigned Width;
+	unsigned Height;
+	unsigned Depth;
+	TCUarray_format Format;
+	unsigned NumChannels;
+	unsigned Flags;
+};
+
+
+enum DECLSPEC_DENUM TCUGLmap_flags : unsigned char { CU_GL_MAP_RESOURCE_FLAGS_NONE, CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY, CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD };
+
+typedef System::StaticArray<unsigned, 3> TDim3;
+
+typedef void * HGPUNV;
+
+typedef TCUresult __stdcall (*TcuInit)(unsigned Flags);
+
+typedef TCUresult __stdcall (*TcuDriverGetVersion)(/* out */ int &driverVersion);
+
+typedef TCUresult __stdcall (*TcuDeviceGet)(int &device, int ordinal);
+
+typedef TCUresult __stdcall (*TcuDeviceGetCount)(int &count);
+
+typedef TCUresult __stdcall (*TcuDeviceGetName)(char * name, int len, int dev);
+
+typedef TCUresult __stdcall (*TcuDeviceComputeCapability)(int &major, int &minor, int dev);
+
+typedef TCUresult __stdcall (*TcuDeviceTotalMem)(PSIZE_T bytes, int dev);
+
+typedef TCUresult __stdcall (*TcuDeviceGetProperties)(TCUdevprop &prop, int dev);
+
+typedef TCUresult __stdcall (*TcuDeviceGetAttribute)(PSIZE_T pi, TCUdevice_attribute attrib, int dev);
+
+typedef TCUresult __stdcall (*TcuCtxCreate)(PCUcontext &pctx, unsigned Flags, int dev);
+
+typedef TCUresult __stdcall (*TcuCtxDestroy)(PCUcontext ctx);
+
+typedef TCUresult __stdcall (*TcuCtxAttach)(PCUcontext &pctx, unsigned Flags);
+
+typedef TCUresult __stdcall (*TcuCtxDetach)(PCUcontext ctx);
+
+typedef TCUresult __stdcall (*TcuCtxPushCurrent)(PCUcontext ctx);
+
+typedef TCUresult __stdcall (*TcuCtxPopCurrent)(PCUcontext &pctx);
+
+typedef TCUresult __stdcall (*TcuCtxGetDevice)(int &device);
+
+typedef TCUresult __stdcall (*TcuCtxSynchronize)(void);
+
+typedef TCUresult __stdcall (*TcuModuleLoad)(PCUmodule &module, const char * fname);
+
+typedef TCUresult __stdcall (*TcuModuleLoadData)(PCUmodule &module, const char * image);
+
+typedef TCUresult __stdcall (*TcuModuleLoadDataEx)(PCUmodule &module, void *image, unsigned numOptions, TCUjit_option &options, void *optionValues);
+
+typedef TCUresult __stdcall (*TcuModuleLoadFatBinary)(PCUmodule &module, void *fatCubin);
+
+typedef TCUresult __stdcall (*TcuModuleUnload)(PCUmodule hmod);
+
+typedef TCUresult __stdcall (*TcuModuleGetFunction)(/* out */ PCUfunction &hfunc, PCUmodule hmod, const char * name);
+
+typedef TCUresult __stdcall (*TcuModuleGetGlobal)(/* out */ void * &dptr, unsigned &bytes, PCUmodule hmod, const char * name);
+
+typedef TCUresult __stdcall (*TcuModuleGetTexRef)(/* out */ PCUtexref &pTexRef, PCUmodule hmod, const char * name);
+
+typedef TCUresult __stdcall (*TcuMemGetInfo)(unsigned &free, unsigned &total);
+
+typedef TCUresult __stdcall (*TcuMemAlloc)(void * &dptr, unsigned bytesize);
+
+typedef TCUresult __stdcall (*TcuMemAllocPitch)(void * &dptr, unsigned &pPitch, unsigned WidthInBytes, unsigned Height, unsigned ElementSizeBytes);
+
+typedef TCUresult __stdcall (*TcuMemFree)(void * dptr);
+
+typedef TCUresult __stdcall (*TcuMemGetAddressRange)(void * &pbase, unsigned &psize, void * dptr);
+
+typedef TCUresult __stdcall (*TcuMemAllocHost)(void *pp, unsigned bytesize);
+
+typedef TCUresult __stdcall (*TcuMemFreeHost)(void * p);
+
+typedef TCUresult __stdcall (*TcuMemHostAlloc)(void * &pp, unsigned bytesize, unsigned Flags);
+
+typedef TCUresult __stdcall (*TcuMemHostGetDevicePointer)(void * &pdptr, void * p, unsigned Flags);
+
+typedef TCUresult __stdcall (*TcuMemHostGetFlags)(unsigned &pFlags, void *p);
+
+typedef TCUresult __stdcall (*TcuMemcpyHtoD)(void * dstDevice, const void * srcHost, unsigned ByteCount);
+
+typedef TCUresult __stdcall (*TcuMemcpyDtoH)(const void * dstHost, void * srcDevice, unsigned ByteCount);
+
+typedef TCUresult __stdcall (*TcuMemcpyDtoD)(void * dstDevice, void * srcDevice, unsigned ByteCount);
+
+typedef TCUresult __stdcall (*TcuMemcpyDtoDAsync)(void * dstDevice, void * srcDevice, unsigned ByteCount, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuMemcpyDtoA)(PCUarray dstArray, unsigned dstIndex, void * srcDevice, unsigned ByteCount);
+
+typedef TCUresult __stdcall (*TcuMemcpyAtoD)(void * dstDevice, PCUarray hSrc, unsigned SrcIndex, unsigned ByteCount);
+
+typedef TCUresult __stdcall (*TcuMemcpyHtoA)(PCUarray dstArray, unsigned dstIndex, void * pSrc, unsigned ByteCount);
+
+typedef TCUresult __stdcall (*TcuMemcpyAtoH)(void * dstHost, PCUarray srcArray, unsigned SrcIndex, unsigned ByteCount);
+
+typedef TCUresult __stdcall (*TcuMemcpyAtoA)(PCUarray dstArray, unsigned dstIndex, PCUarray srcArray, unsigned SrcIndex, unsigned ByteCount);
+
+typedef TCUresult __stdcall (*TcuMemcpy2D)(const PCUDA_MEMCPY2D pCopy);
+
+typedef TCUresult __stdcall (*TcuMemcpy2DUnaligned)(TCUDA_MEMCPY2D &pCopy);
+
+typedef TCUresult __stdcall (*TcuMemcpy3D)(TCUDA_MEMCPY3D &pCopy);
+
+typedef TCUresult __stdcall (*TcuMemcpyHtoDAsync)(void * dstDevice, void *srcHost, unsigned ByteCount, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuMemcpyDtoHAsync)(void *dstHost, void * srcDevice, unsigned ByteCount, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuMemcpyHtoAAsync)(PCUarray dstArray, unsigned dstIndex, void *pSrc, unsigned ByteCount, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuMemcpyAtoHAsync)(void *dstHost, PCUstream srcArray, unsigned SrcIndex, unsigned ByteCount, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuMemcpy2DAsync)(TCUDA_MEMCPY2D &pCopy, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuMemcpy3DAsync)(TCUDA_MEMCPY3D &pCopy, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuMemsetD8)(void * dstDevice, System::Byte ub, unsigned N);
+
+typedef TCUresult __stdcall (*TcuMemsetD16)(void * dstDevice, System::Word uw, unsigned N);
+
+typedef TCUresult __stdcall (*TcuMemsetD32)(void * dstDevice, unsigned ui, unsigned N);
+
+typedef TCUresult __stdcall (*TcuMemsetD2D8)(void * dstDevice, unsigned dstPitch, System::Byte ub, unsigned Width, unsigned Height);
+
+typedef TCUresult __stdcall (*TcuMemsetD2D16)(void * dstDevice, unsigned dstPitch, System::Word uw, unsigned Width, unsigned Height);
+
+typedef TCUresult __stdcall (*TcuMemsetD2D32)(void * dstDevice, unsigned dstPitch, unsigned ui, unsigned Width, unsigned Height);
+
+typedef TCUresult __stdcall (*TcuFuncSetBlockShape)(PCUfunction hfunc, int x, int y, int z);
+
+typedef TCUresult __stdcall (*TcuFuncSetSharedSize)(PCUfunction hfunc, unsigned bytes);
+
+typedef TCUresult __stdcall (*TcuFuncGetAttribute)(int &pi, TCUfunction_attribute attrib, PCUfunction hfunc);
+
+typedef TCUresult __stdcall (*TcuArrayCreate)(PCUarray &pHandle, TCUDA_ARRAY_DESCRIPTOR &pAllocateArray);
+
+typedef TCUresult __stdcall (*TcuArrayGetDescriptor)(TCUDA_ARRAY_DESCRIPTOR &pArrayDescriptor, PCUarray hArray);
+
+typedef TCUresult __stdcall (*TcuArrayDestroy)(PCUarray hArray);
+
+typedef TCUresult __stdcall (*TcuArray3DCreate)(PCUarray &pHandle, TCUDA_ARRAY3D_DESCRIPTOR &pAllocateArray);
+
+typedef TCUresult __stdcall (*TcuArray3DGetDescriptor)(TCUDA_ARRAY3D_DESCRIPTOR &pArrayDescriptor, PCUarray hArray);
+
+typedef TCUresult __stdcall (*TcuTexRefCreate)(PCUtexref &pTexRef);
+
+typedef TCUresult __stdcall (*TcuTexRefDestroy)(PCUtexref hTexRef);
+
+typedef TCUresult __stdcall (*TcuTexRefSetArray)(PCUtexref hTexRef, PCUarray hArray, unsigned Flags);
+
+typedef TCUresult __stdcall (*TcuTexRefSetAddress)(unsigned &ByteOffset, PCUtexref hTexRef, void * dptr, unsigned bytes);
+
+typedef TCUresult __stdcall (*TcuTexRefSetAddress2D)(PCUtexref hTexRef, TCUDA_ARRAY_DESCRIPTOR &desc, void * dptr, unsigned Pitch);
+
+typedef TCUresult __stdcall (*TcuTexRefSetFormat)(PCUtexref hTexRef, TCUarray_format fmt, int NumPackedComponents);
+
+typedef TCUresult __stdcall (*TcuTexRefSetAddressMode)(PCUtexref hTexRef, int dim, TCUaddress_mode am);
+
+typedef TCUresult __stdcall (*TcuTexRefSetFilterMode)(PCUtexref hTexRef, TCUfilter_mode fm);
+
+typedef TCUresult __stdcall (*TcuTexRefSetFlags)(PCUtexref hTexRef, unsigned Flags);
+
+typedef TCUresult __stdcall (*TcuTexRefGetAddress)(void * &pdptr, PCUtexref hTexRef);
+
+typedef TCUresult __stdcall (*TcuTexRefGetArray)(PCUarray &phArray, PCUtexref hTexRef);
+
+typedef TCUresult __stdcall (*TcuTexRefGetAddressMode)(TCUaddress_mode &pam, PCUtexref hTexRef, int dim);
+
+typedef TCUresult __stdcall (*TcuTexRefGetFilterMode)(TCUfilter_mode &pfm, PCUtexref hTexRef);
+
+typedef TCUresult __stdcall (*TcuTexRefGetFormat)(TCUarray_format &pFormat, int &pNumChannels, PCUtexref hTexRef);
+
+typedef TCUresult __stdcall (*TcuTexRefGetFlags)(unsigned &pFlags, PCUtexref hTexRef);
+
+typedef TCUresult __stdcall (*TcuParamSetSize)(PCUfunction hfunc, unsigned numbytes);
+
+typedef TCUresult __stdcall (*TcuParamSeti)(PCUfunction hfunc, int offset, unsigned value);
+
+typedef TCUresult __stdcall (*TcuParamSetf)(PCUfunction hfunc, int offset, float value);
+
+typedef TCUresult __stdcall (*TcuParamSetv)(PCUfunction hfunc, int offset, void *ptr, unsigned numbytes);
+
+typedef TCUresult __stdcall (*TcuParamSetTexRef)(PCUfunction hfunc, int texunit, PCUtexref hTexRef);
+
+typedef TCUresult __stdcall (*TcuLaunch)(PCUfunction f);
+
+typedef TCUresult __stdcall (*TcuLaunchGrid)(PCUfunction f, int grid_width, int grid_height);
+
+typedef TCUresult __stdcall (*TcuLaunchGridAsync)(PCUfunction f, int grid_width, int grid_height, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuEventCreate)(PCUevent &phEvent, unsigned Flags);
+
+typedef TCUresult __stdcall (*TcuEventRecord)(PCUevent hEvent, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuEventQuery)(PCUevent hEvent);
+
+typedef TCUresult __stdcall (*TcuEventSynchronize)(PCUevent hEvent);
+
+typedef TCUresult __stdcall (*TcuEventDestroy)(PCUevent hEvent);
+
+typedef TCUresult __stdcall (*TcuEventElapsedTime)(float &pMilliseconds, PCUevent hStart, PCUevent hEnd);
+
+typedef TCUresult __stdcall (*TcuStreamCreate)(PCUstream &phStream, unsigned Flags);
+
+typedef TCUresult __stdcall (*TcuStreamQuery)(PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuStreamSynchronize)(PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuStreamDestroy)(PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuGLCtxCreate)(PCUcontext &pctx, unsigned Flags, int device);
+
+typedef TCUresult __stdcall (*TcuGraphicsGLRegisterBuffer)(PCUgraphicsResource &pCudaResource, unsigned buffer, TCUgraphicsMapResourceFlags Flags);
+
+typedef TCUresult __stdcall (*TcuGraphicsGLRegisterImage)(PCUgraphicsResource &pCudaResource, unsigned image, unsigned target, TCUgraphicsMapResourceFlags Flags);
+
+typedef TCUresult __stdcall (*TcuWGLGetDevice)(int &pDevice, void * hGpu);
+
+typedef TCUresult __stdcall (*TcuGraphicsUnregisterResource)(PCUgraphicsResource resource);
+
+typedef TCUresult __stdcall (*TcuGraphicsSubResourceGetMappedArray)(PCUarray &pArray, PCUgraphicsResource resource, unsigned arrayIndex, unsigned mipLevel);
+
+typedef TCUresult __stdcall (*TcuGraphicsResourceGetMappedPointer)(void * &pDevPtr, /* out */ unsigned &psize, PCUgraphicsResource resource);
+
+typedef TCUresult __stdcall (*TcuGraphicsResourceSetMapFlags)(PCUgraphicsResource resource, unsigned Flags);
+
+typedef TCUresult __stdcall (*TcuGraphicsMapResources)(unsigned count, PPCUgraphicsResource resources, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuGraphicsUnmapResources)(unsigned count, PPCUgraphicsResource resources, PCUstream hStream);
+
+typedef void __stdcall (*TcuGLInit)(void);
+
+typedef TCUresult __stdcall (*TcuGLRegisterBufferObject)(unsigned buffer);
+
+typedef TCUresult __stdcall (*TcuGLMapBufferObject)(void * &dptr, unsigned &size, unsigned buffer);
+
+typedef TCUresult __stdcall (*TcuGLUnmapBufferObject)(unsigned buffer);
+
+typedef TCUresult __stdcall (*TcuGLUnregisterBufferObject)(unsigned buffer);
+
+typedef TCUresult __stdcall (*TcuGLSetBufferObjectMapFlags)(unsigned buffer, unsigned Flags);
+
+typedef TCUresult __stdcall (*TcuGLMapBufferObjectAsync)(void * &dptr, unsigned &size, unsigned buffer, PCUstream hStream);
+
+typedef TCUresult __stdcall (*TcuGLUnmapBufferObjectAsync)(unsigned buffer, PCUstream hStream);
+
+//-- var, const, procedure ---------------------------------------------------
+#define CUDAAPIDLL L"nvcuda.dll"
+extern DELPHI_PACKAGE TCUresult CUDA_SUCCESS;
+static const System::Int8 CUDA_ERROR_INVALID_VALUE = System::Int8(0x1);
+static const System::Int8 CUDA_ERROR_OUT_OF_MEMORY = System::Int8(0x2);
+static const System::Int8 CUDA_ERROR_NOT_INITIALIZED = System::Int8(0x3);
+static const System::Int8 CUDA_ERROR_DEINITIALIZED = System::Int8(0x4);
+static const System::Int8 CUDA_ERROR_NO_DEVICE = System::Int8(0x64);
+static const System::Int8 CUDA_ERROR_INVALID_DEVICE = System::Int8(0x65);
+static const System::Byte CUDA_ERROR_INVALID_IMAGE = System::Byte(0xc8);
+static const System::Byte CUDA_ERROR_INVALID_CONTEXT = System::Byte(0xc9);
+static const System::Byte CUDA_ERROR_CONTEXT_ALREADY_CURRENT = System::Byte(0xca);
+static const System::Byte CUDA_ERROR_MAP_FAILED = System::Byte(0xcd);
+static const System::Byte CUDA_ERROR_UNMAP_FAILED = System::Byte(0xce);
+static const System::Byte CUDA_ERROR_ARRAY_IS_MAPPED = System::Byte(0xcf);
+static const System::Byte CUDA_ERROR_ALREADY_MAPPED = System::Byte(0xd0);
+static const System::Byte CUDA_ERROR_NO_BINARY_FOR_GPU = System::Byte(0xd1);
+static const System::Byte CUDA_ERROR_ALREADY_ACQUIRED = System::Byte(0xd2);
+static const System::Byte CUDA_ERROR_NOT_MAPPED = System::Byte(0xd3);
+static const System::Byte CUDA_ERROR_NOT_MAPPED_AS_ARRAY = System::Byte(0xd4);
+static const System::Byte CUDA_ERROR_NOT_MAPPED_AS_POINTER = System::Byte(0xd5);
+static const System::Word CUDA_ERROR_INVALID_SOURCE = System::Word(0x12c);
+static const System::Word CUDA_ERROR_FILE_NOT_FOUND = System::Word(0x12d);
+static const System::Word CUDA_ERROR_INVALID_HANDLE = System::Word(0x190);
+static const System::Word CUDA_ERROR_NOT_FOUND = System::Word(0x1f4);
+static const System::Word CUDA_ERROR_NOT_READY = System::Word(0x258);
+static const System::Word CUDA_ERROR_LAUNCH_FAILED = System::Word(0x2bc);
+static const System::Word CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = System::Word(0x2bd);
+static const System::Word CUDA_ERROR_LAUNCH_TIMEOUT = System::Word(0x2be);
+static const System::Word CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = System::Word(0x2bf);
+static const System::Word CUDA_ERROR_POINTER_IS_64BIT = System::Word(0x320);
+static const System::Word CUDA_ERROR_SIZE_IS_64BIT = System::Word(0x321);
+static const System::Word CUDA_ERROR_UNKNOWN = System::Word(0x3e7);
+static const System::Int8 CU_MEMHOSTALLOC_PORTABLE = System::Int8(0x1);
+static const System::Int8 CU_MEMHOSTALLOC_DEVICEMAP = System::Int8(0x2);
+static const System::Int8 CU_MEMHOSTALLOC_WRITECOMBINED = System::Int8(0x4);
+static const System::Int8 CU_TRSA_OVERRIDE_FORMAT = System::Int8(0x1);
+static const System::Int8 CU_TRSF_READ_AS_INTEGER = System::Int8(0x1);
+static const System::Int8 CU_TRSF_NORMALIZED_COORDINATES = System::Int8(0x2);
+static const System::Int8 CU_PARAM_TR_DEFAULT = System::Int8(-1);
+extern DELPHI_PACKAGE TcuInit cuInit;
+extern DELPHI_PACKAGE TcuDriverGetVersion cuDriverGetVersion;
+extern DELPHI_PACKAGE TcuDeviceGet cuDeviceGet;
+extern DELPHI_PACKAGE TcuDeviceGetCount cuDeviceGetCount;
+extern DELPHI_PACKAGE TcuDeviceGetName cuDeviceGetName;
+extern DELPHI_PACKAGE TcuDeviceComputeCapability cuDeviceComputeCapability;
+extern DELPHI_PACKAGE TcuDeviceTotalMem cuDeviceTotalMem;
+extern DELPHI_PACKAGE TcuDeviceGetProperties cuDeviceGetProperties;
+extern DELPHI_PACKAGE TcuDeviceGetAttribute cuDeviceGetAttribute;
+extern DELPHI_PACKAGE TcuCtxCreate cuCtxCreate;
+extern DELPHI_PACKAGE TcuCtxDestroy cuCtxDestroy;
+extern DELPHI_PACKAGE TcuCtxAttach cuCtxAttach;
+extern DELPHI_PACKAGE TcuCtxDetach cuCtxDetach;
+extern DELPHI_PACKAGE TcuCtxPushCurrent cuCtxPushCurrent;
+extern DELPHI_PACKAGE TcuCtxPopCurrent cuCtxPopCurrent;
+extern DELPHI_PACKAGE TcuCtxGetDevice cuCtxGetDevice;
+extern DELPHI_PACKAGE TcuCtxSynchronize cuCtxSynchronize;
+extern DELPHI_PACKAGE TcuModuleLoad cuModuleLoad;
+extern DELPHI_PACKAGE TcuModuleLoadData cuModuleLoadData;
+extern DELPHI_PACKAGE TcuModuleLoadDataEx cuModuleLoadDataEx;
+extern DELPHI_PACKAGE TcuModuleLoadFatBinary cuModuleLoadFatBinary;
+extern DELPHI_PACKAGE TcuModuleUnload cuModuleUnload;
+extern DELPHI_PACKAGE TcuModuleGetFunction cuModuleGetFunction;
+extern DELPHI_PACKAGE TcuModuleGetGlobal cuModuleGetGlobal;
+extern DELPHI_PACKAGE TcuModuleGetTexRef cuModuleGetTexRef;
+extern DELPHI_PACKAGE TcuMemGetInfo cuMemGetInfo;
+extern DELPHI_PACKAGE TcuMemAlloc cuMemAlloc;
+extern DELPHI_PACKAGE TcuMemAllocPitch cuMemAllocPitch;
+extern DELPHI_PACKAGE TcuMemFree cuMemFree;
+extern DELPHI_PACKAGE TcuMemGetAddressRange cuMemGetAddressRange;
+extern DELPHI_PACKAGE TcuMemAllocHost cuMemAllocHost;
+extern DELPHI_PACKAGE TcuMemFreeHost cuMemFreeHost;
+extern DELPHI_PACKAGE TcuMemHostAlloc cuMemHostAlloc;
+extern DELPHI_PACKAGE TcuMemHostGetDevicePointer cuMemHostGetDevicePointer;
+extern DELPHI_PACKAGE TcuMemHostGetFlags cuMemHostGetFlags;
+extern DELPHI_PACKAGE TcuMemcpyHtoD cuMemcpyHtoD;
+extern DELPHI_PACKAGE TcuMemcpyDtoH cuMemcpyDtoH;
+extern DELPHI_PACKAGE TcuMemcpyDtoD cuMemcpyDtoD;
+extern DELPHI_PACKAGE TcuMemcpyDtoDAsync cuMemcpyDtoDAsync;
+extern DELPHI_PACKAGE TcuMemcpyDtoA cuMemcpyDtoA;
+extern DELPHI_PACKAGE TcuMemcpyAtoD cuMemcpyAtoD;
+extern DELPHI_PACKAGE TcuMemcpyHtoA cuMemcpyHtoA;
+extern DELPHI_PACKAGE TcuMemcpyAtoH cuMemcpyAtoH;
+extern DELPHI_PACKAGE TcuMemcpyAtoA cuMemcpyAtoA;
+extern DELPHI_PACKAGE TcuMemcpy2D cuMemcpy2D;
+extern DELPHI_PACKAGE TcuMemcpy2DUnaligned cuMemcpy2DUnaligned;
+extern DELPHI_PACKAGE TcuMemcpy3D cuMemcpy3D;
+extern DELPHI_PACKAGE TcuMemcpyHtoDAsync cuMemcpyHtoDAsync;
+extern DELPHI_PACKAGE TcuMemcpyDtoHAsync cuMemcpyDtoHAsync;
+extern DELPHI_PACKAGE TcuMemcpyHtoAAsync cuMemcpyHtoAAsync;
+extern DELPHI_PACKAGE TcuMemcpyAtoHAsync cuMemcpyAtoHAsync;
+extern DELPHI_PACKAGE TcuMemcpy2DAsync cuMemcpy2DAsync;
+extern DELPHI_PACKAGE TcuMemcpy3DAsync cuMemcpy3DAsync;
+extern DELPHI_PACKAGE TcuMemsetD8 cuMemsetD8;
+extern DELPHI_PACKAGE TcuMemsetD16 cuMemsetD16;
+extern DELPHI_PACKAGE TcuMemsetD32 cuMemsetD32;
+extern DELPHI_PACKAGE TcuMemsetD2D8 cuMemsetD2D8;
+extern DELPHI_PACKAGE TcuMemsetD2D16 cuMemsetD2D16;
+extern DELPHI_PACKAGE TcuMemsetD2D32 cuMemsetD2D32;
+extern DELPHI_PACKAGE TcuFuncSetBlockShape cuFuncSetBlockShape;
+extern DELPHI_PACKAGE TcuFuncSetSharedSize cuFuncSetSharedSize;
+extern DELPHI_PACKAGE TcuFuncGetAttribute cuFuncGetAttribute;
+extern DELPHI_PACKAGE TcuArrayCreate cuArrayCreate;
+extern DELPHI_PACKAGE TcuArrayGetDescriptor cuArrayGetDescriptor;
+extern DELPHI_PACKAGE TcuArrayDestroy cuArrayDestroy;
+extern DELPHI_PACKAGE TcuArray3DCreate cuArray3DCreate;
+extern DELPHI_PACKAGE TcuArray3DGetDescriptor cuArray3DGetDescriptor;
+extern DELPHI_PACKAGE TcuTexRefCreate cuTexRefCreate;
+extern DELPHI_PACKAGE TcuTexRefDestroy cuTexRefDestroy;
+extern DELPHI_PACKAGE TcuTexRefSetArray cuTexRefSetArray;
+extern DELPHI_PACKAGE TcuTexRefSetAddress cuTexRefSetAddress;
+extern DELPHI_PACKAGE TcuTexRefSetAddress2D cuTexRefSetAddress2D;
+extern DELPHI_PACKAGE TcuTexRefSetFormat cuTexRefSetFormat;
+extern DELPHI_PACKAGE TcuTexRefSetAddressMode cuTexRefSetAddressMode;
+extern DELPHI_PACKAGE TcuTexRefSetFilterMode cuTexRefSetFilterMode;
+extern DELPHI_PACKAGE TcuTexRefSetFlags cuTexRefSetFlags;
+extern DELPHI_PACKAGE TcuTexRefGetAddress cuTexRefGetAddress;
+extern DELPHI_PACKAGE TcuTexRefGetArray cuTexRefGetArray;
+extern DELPHI_PACKAGE TcuTexRefGetAddressMode cuTexRefGetAddressMode;
+extern DELPHI_PACKAGE TcuTexRefGetFilterMode cuTexRefGetFilterMode;
+extern DELPHI_PACKAGE TcuTexRefGetFormat cuTexRefGetFormat;
+extern DELPHI_PACKAGE TcuTexRefGetFlags cuTexRefGetFlags;
+extern DELPHI_PACKAGE TcuParamSetSize cuParamSetSize;
+extern DELPHI_PACKAGE TcuParamSeti cuParamSeti;
+extern DELPHI_PACKAGE TcuParamSetf cuParamSetf;
+extern DELPHI_PACKAGE TcuParamSetv cuParamSetv;
+extern DELPHI_PACKAGE TcuParamSetTexRef cuParamSetTexRef;
+extern DELPHI_PACKAGE TcuLaunch cuLaunch;
+extern DELPHI_PACKAGE TcuLaunchGrid cuLaunchGrid;
+extern DELPHI_PACKAGE TcuLaunchGridAsync cuLaunchGridAsync;
+extern DELPHI_PACKAGE TcuEventCreate cuEventCreate;
+extern DELPHI_PACKAGE TcuEventRecord cuEventRecord;
+extern DELPHI_PACKAGE TcuEventQuery cuEventQuery;
+extern DELPHI_PACKAGE TcuEventSynchronize cuEventSynchronize;
+extern DELPHI_PACKAGE TcuEventDestroy cuEventDestroy;
+extern DELPHI_PACKAGE TcuEventElapsedTime cuEventElapsedTime;
+extern DELPHI_PACKAGE TcuStreamCreate cuStreamCreate;
+extern DELPHI_PACKAGE TcuStreamQuery cuStreamQuery;
+extern DELPHI_PACKAGE TcuStreamSynchronize cuStreamSynchronize;
+extern DELPHI_PACKAGE TcuStreamDestroy cuStreamDestroy;
+extern DELPHI_PACKAGE TcuGLInit cuGLInit;
+extern DELPHI_PACKAGE TcuGLCtxCreate cuGLCtxCreate;
+extern DELPHI_PACKAGE TcuGraphicsGLRegisterBuffer cuGraphicsGLRegisterBuffer;
+extern DELPHI_PACKAGE TcuGraphicsGLRegisterImage cuGraphicsGLRegisterImage;
+extern DELPHI_PACKAGE TcuWGLGetDevice cuWGLGetDevice;
+extern DELPHI_PACKAGE TcuGraphicsUnregisterResource cuGraphicsUnregisterResource;
+extern DELPHI_PACKAGE TcuGraphicsSubResourceGetMappedArray cuGraphicsSubResourceGetMappedArray;
+extern DELPHI_PACKAGE TcuGraphicsResourceGetMappedPointer cuGraphicsResourceGetMappedPointer;
+extern DELPHI_PACKAGE TcuGraphicsResourceSetMapFlags cuGraphicsResourceSetMapFlags;
+extern DELPHI_PACKAGE TcuGraphicsMapResources cuGraphicsMapResources;
+extern DELPHI_PACKAGE TcuGraphicsUnmapResources cuGraphicsUnmapResources;
+extern DELPHI_PACKAGE TcuGLRegisterBufferObject cuGLRegisterBufferObject;
+extern DELPHI_PACKAGE TcuGLMapBufferObject cuGLMapBufferObject;
+extern DELPHI_PACKAGE TcuGLUnmapBufferObject cuGLUnmapBufferObject;
+extern DELPHI_PACKAGE TcuGLUnregisterBufferObject cuGLUnregisterBufferObject;
+extern DELPHI_PACKAGE TcuGLSetBufferObjectMapFlags cuGLSetBufferObjectMapFlags;
+extern DELPHI_PACKAGE TcuGLMapBufferObjectAsync cuGLMapBufferObjectAsync;
+extern DELPHI_PACKAGE TcuGLUnmapBufferObjectAsync cuGLUnmapBufferObjectAsync;
+extern DELPHI_PACKAGE bool __fastcall InitCUDA(void);
+extern DELPHI_PACKAGE void __fastcall CloseCUDA(void);
+extern DELPHI_PACKAGE bool __fastcall InitCUDAFromLibrary(const System::WideString LibName);
+extern DELPHI_PACKAGE bool __fastcall IsCUDAInitialized(void);
+extern DELPHI_PACKAGE System::UnicodeString __fastcall Get_CUDA_API_Error_String(TCUresult AError);
+}	/* namespace Import */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_IMPORT)
+using namespace Cuda::Import;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_ImportHPP

+ 77 - 0
include/Win32/CUDA.ParallelPrimitives.hpp

@@ -0,0 +1,77 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.ParallelPrimitives.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_ParallelprimitivesHPP
+#define Cuda_ParallelprimitivesHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Parallelprimitives
+{
+//-- forward type declarations -----------------------------------------------
+struct TCUDPPConfiguration;
+//-- type declarations -------------------------------------------------------
+enum DECLSPEC_DENUM TCUDPPResult : unsigned char { CUDPP_SUCCESS, CUDPP_ERROR_INVALID_HANDLE, CUDPP_ERROR_ILLEGAL_CONFIGURATION, CUDPP_ERROR_UNKNOWN };
+
+enum DECLSPEC_DENUM TCUDPPOption : unsigned char { CUDPP_OPTION_FORWARD, CUDPP_OPTION_BACKWARD, CUDPP_OPTION_EXCLUSIVE, CUDPP_OPTION_INCLUSIVE, CUDPP_OPTION_CTA_LOCAL, CUDPP_OPTION_KEYS_ONLY, CUDPP_OPTION_KEY_VALUE_PAIRS };
+
+enum DECLSPEC_DENUM TCUDPPDatatype : unsigned char { CUDPP_CHAR, CUDPP_UCHAR, CUDPP_INT, CUDPP_UINT, CUDPP_FLOAT };
+
+enum DECLSPEC_DENUM TCUDPPOperator : unsigned char { CUDPP_ADD, CUDPP_MULTIPLY, CUDPP_MIN, CUDPP_MAX };
+
+enum DECLSPEC_DENUM TCUDPPAlgorithm : unsigned char { CUDPP_SCAN, CUDPP_SEGMENTED_SCAN, CUDPP_COMPACT, CUDPP_REDUCE, CUDPP_SORT_RADIX, CUDPP_SPMVMULT, CUDPP_RAND_MD5, CUDPP_ALGORITHM_INVALID };
+
+struct DECLSPEC_DRECORD TCUDPPConfiguration
+{
+public:
+	TCUDPPAlgorithm algorithm;
+	TCUDPPOperator op;
+	TCUDPPDatatype datatype;
+	TCUDPPOption options;
+};
+
+
+typedef NativeUInt TCUDPPHandle;
+
+//-- var, const, procedure ---------------------------------------------------
+#define CUDPPDLL L"cudpp32.dll"
+static const unsigned CUDPP_INVALID_HANDLE = unsigned(0xc0dabad1);
+extern "C" TCUDPPResult __stdcall cudppPlan(NativeUInt &planHandle, TCUDPPConfiguration config, NativeUInt n, NativeUInt rows, NativeUInt rowPitch);
+extern "C" TCUDPPResult __stdcall cudppDestroyPlan(NativeUInt plan);
+extern "C" TCUDPPResult __stdcall cudppScan(NativeUInt planHandle, void *d_out, NativeUInt &d_in, NativeUInt &numElements);
+extern "C" TCUDPPResult __stdcall cudppMultiScan(NativeUInt planHandle, void *d_out, void *d_in, NativeUInt numElements, NativeUInt numRows);
+extern "C" TCUDPPResult __stdcall cudppSegmentedScan(NativeUInt planHandle, void *d_out, void *d_idata, const System::PCardinal d_iflags, NativeUInt numElements);
+extern "C" TCUDPPResult __stdcall cudppCompact(NativeUInt planHandle, void *d_out, NativeUInt &d_numValidElements, void *d_in, const System::PCardinal d_isValid, NativeUInt numElements);
+extern "C" TCUDPPResult __stdcall cudppSort(NativeUInt planHandle, void *d_keys, void *d_values, int keybits, NativeUInt numElements);
+extern "C" TCUDPPResult __stdcall cudppSparseMatrix(NativeUInt &sparseMatrixHandle, TCUDPPConfiguration config, NativeUInt n, NativeUInt rows, void *A, const System::PCardinal h_rowIndices, const System::PCardinal h_indices);
+extern "C" TCUDPPResult __stdcall cudppDestroySparseMatrix(NativeUInt sparseMatrixHandle);
+extern "C" TCUDPPResult __stdcall cudppSparseMatrixVectorMultiply(NativeUInt sparseMatrixHandle, void *d_y, void *d_x);
+extern "C" TCUDPPResult __stdcall cudppRand(NativeUInt planHandle, void *d_out, NativeUInt numElements);
+extern "C" TCUDPPResult __stdcall cudppRandSeed(const NativeUInt planHandle, unsigned seed);
+}	/* namespace Parallelprimitives */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_PARALLELPRIMITIVES)
+using namespace Cuda::Parallelprimitives;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_ParallelprimitivesHPP

+ 134 - 0
include/Win32/CUDA.Parser.hpp

@@ -0,0 +1,134 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.Parser.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_ParserHPP
+#define Cuda_ParserHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <CUDA.Runtime.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Parser
+{
+//-- forward type declarations -----------------------------------------------
+struct TCUDATexRefInfo;
+struct TCUDAFuncArgInfo;
+struct TCUDAFuncInfo;
+struct TCUDAConstantInfo;
+class DELPHICLASS TCUDAModuleInfo;
+//-- type declarations -------------------------------------------------------
+enum DECLSPEC_DENUM TCUDAType : unsigned char { customType, char1, uchar1, char2, uchar2, char3, uchar3, char4, uchar4, short1, ushort1, short2, ushort2, short3, ushort3, short4, ushort4, int1, uint1, int2, uint2, int3, uint3, int4, uint4, long1, ulong1, long2, ulong2, long3, ulong3, long4, ulong4, float1, float2, float3, float4, longlong1, ulonglong1, longlong2, ulonglong2, longlong3, ulonglong3, longlong4, ulonglong4, double1, double2, double3, double4, int8, int16, int32, uint8, uint16, uint32 };
+
+struct DECLSPEC_DRECORD TCUDATexRefInfo
+{
+public:
+	System::UnicodeString Name;
+	TCUDAType DataType;
+	System::Byte Dim;
+	Cuda::Runtime::TcudaTextureReadMode ReadMode;
+};
+
+
+struct DECLSPEC_DRECORD TCUDAFuncArgInfo
+{
+public:
+	System::UnicodeString Name;
+	TCUDAType DataType;
+	System::UnicodeString CustomType;
+	bool Ref;
+};
+
+
+struct DECLSPEC_DRECORD TCUDAFuncInfo
+{
+	
+private:
+	typedef System::DynamicArray<TCUDAFuncArgInfo> _TCUDAFuncInfo__1;
+	
+	
+public:
+	System::UnicodeString Name;
+	System::UnicodeString KernelName;
+	_TCUDAFuncInfo__1 Args;
+};
+
+
+struct DECLSPEC_DRECORD TCUDAConstantInfo
+{
+public:
+	System::UnicodeString Name;
+	TCUDAType DataType;
+	System::UnicodeString CustomType;
+	bool Ref;
+	bool DefValue;
+};
+
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TCUDAModuleInfo : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+	
+private:
+	typedef System::DynamicArray<TCUDATexRefInfo> _TCUDAModuleInfo__1;
+	
+	typedef System::DynamicArray<TCUDAFuncInfo> _TCUDAModuleInfo__2;
+	
+	typedef System::DynamicArray<TCUDAConstantInfo> _TCUDAModuleInfo__3;
+	
+	
+private:
+	System::Classes::TStrings* ping;
+	System::Classes::TStrings* pong;
+	void __fastcall Reset();
+	void __fastcall BreakStrings(System::Classes::TStrings* inlist, System::Classes::TStrings* outlist);
+	void __fastcall RemoveComents(System::Classes::TStrings* inlist, System::Classes::TStrings* outlist);
+	void __fastcall RemoveSpaces(System::Classes::TStrings* inlist, System::Classes::TStrings* outlist);
+	void __fastcall ReplaceUnsigned(System::Classes::TStrings* inlist, System::Classes::TStrings* outlist);
+	void __fastcall FindTexRef(System::Classes::TStrings* inlist);
+	void __fastcall FindConst(System::Classes::TStrings* inlist);
+	void __fastcall FindFunc(System::Classes::TStrings* inlist);
+	void __fastcall FindFuncKernelName(System::Classes::TStrings* inlist);
+	
+public:
+	System::Classes::TComponent* Owner;
+	_TCUDAModuleInfo__1 TexRef;
+	_TCUDAModuleInfo__2 Func;
+	_TCUDAModuleInfo__3 Constant;
+	__fastcall TCUDAModuleInfo();
+	__fastcall virtual ~TCUDAModuleInfo();
+	void __fastcall ParseModule(System::Classes::TStrings* ASource, System::Classes::TStrings* AProduct);
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Parser */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_PARSER)
+using namespace Cuda::Parser;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_ParserHPP

+ 143 - 0
include/Win32/CUDA.PropEditors.hpp

@@ -0,0 +1,143 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.PropEditors.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_PropeditorsHPP
+#define Cuda_PropeditorsHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <ToolsAPI.hpp>
+#include <StrEdit.hpp>
+#include <DesignEditors.hpp>
+#include <DesignIntf.hpp>
+#include <CUDA.APIComps.hpp>
+#include <CUDA.Context.hpp>
+#include <CUDA.Compiler.hpp>
+#include <CUDA.Parser.hpp>
+#include <CUDA.EditorFm.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Propeditors
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLCUDAEditor;
+class DELPHICLASS TGLCUDACompilerEditor;
+class DELPHICLASS TGLCUDACompilerSourceProperty;
+class DELPHICLASS TGLCUDADeviceProperty;
+//-- type declarations -------------------------------------------------------
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TGLCUDAEditor : public Designeditors::TComponentEditor
+{
+	typedef Designeditors::TComponentEditor inherited;
+	
+public:
+	virtual void __fastcall Edit();
+	virtual void __fastcall ExecuteVerb(int Index);
+	virtual System::UnicodeString __fastcall GetVerb(int Index);
+	virtual int __fastcall GetVerbCount();
+public:
+	/* TComponentEditor.Create */ inline __fastcall virtual TGLCUDAEditor(System::Classes::TComponent* AComponent, Designintf::_di_IDesigner ADesigner) : Designeditors::TComponentEditor(AComponent, ADesigner) { }
+	
+public:
+	/* TObject.Destroy */ inline __fastcall virtual ~TGLCUDAEditor() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TGLCUDACompilerEditor : public Designeditors::TComponentEditor
+{
+	typedef Designeditors::TComponentEditor inherited;
+	
+public:
+	virtual void __fastcall Edit();
+	virtual void __fastcall ExecuteVerb(int Index);
+	virtual System::UnicodeString __fastcall GetVerb(int Index);
+	virtual int __fastcall GetVerbCount();
+public:
+	/* TComponentEditor.Create */ inline __fastcall virtual TGLCUDACompilerEditor(System::Classes::TComponent* AComponent, Designintf::_di_IDesigner ADesigner) : Designeditors::TComponentEditor(AComponent, ADesigner) { }
+	
+public:
+	/* TObject.Destroy */ inline __fastcall virtual ~TGLCUDACompilerEditor() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TGLCUDACompilerSourceProperty : public Designeditors::TStringProperty
+{
+	typedef Designeditors::TStringProperty inherited;
+	
+private:
+	System::Classes::TStringList* FModuleList;
+	void __fastcall RefreshModuleList();
+	
+public:
+	__fastcall virtual TGLCUDACompilerSourceProperty(const Designintf::_di_IDesigner ADesigner, int APropCount);
+	__fastcall virtual ~TGLCUDACompilerSourceProperty();
+	virtual Designintf::TPropertyAttributes __fastcall GetAttributes();
+	virtual void __fastcall GetValues(System::Classes::TGetStrProc Proc);
+	virtual void __fastcall SetValue(const System::UnicodeString Value)/* overload */;
+	/* Hoisted overloads: */
+	
+public:
+	inline void __fastcall  SetValue(const System::WideString Value){ Designeditors::TPropertyEditor::SetValue(Value); }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TGLCUDADeviceProperty : public Designeditors::TStringProperty
+{
+	typedef Designeditors::TStringProperty inherited;
+	
+private:
+	System::Classes::TStringList* FDeviceList;
+	
+public:
+	__fastcall virtual TGLCUDADeviceProperty(const Designintf::_di_IDesigner ADesigner, int APropCount);
+	__fastcall virtual ~TGLCUDADeviceProperty();
+	virtual Designintf::TPropertyAttributes __fastcall GetAttributes();
+	virtual void __fastcall GetValues(System::Classes::TGetStrProc Proc);
+	virtual void __fastcall SetValue(const System::UnicodeString Value)/* overload */;
+	/* Hoisted overloads: */
+	
+public:
+	inline void __fastcall  SetValue(const System::WideString Value){ Designeditors::TPropertyEditor::SetValue(Value); }
+	
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE bool __fastcall FindCuFile(System::UnicodeString &AModuleName);
+}	/* namespace Propeditors */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_PROPEDITORS)
+using namespace Cuda::Propeditors;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_PropeditorsHPP

+ 51 - 0
include/Win32/CUDA.Register.hpp

@@ -0,0 +1,51 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.Register.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_RegisterHPP
+#define Cuda_RegisterHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <DesignIntf.hpp>
+#include <DesignEditors.hpp>
+#include <ToolsAPI.hpp>
+#include <StrEdit.hpp>
+#include <GLS.SceneRegister.hpp>
+#include <CUDA.APIComps.hpp>
+#include <CUDA.Context.hpp>
+#include <CUDA.PropEditors.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Register
+{
+//-- forward type declarations -----------------------------------------------
+//-- type declarations -------------------------------------------------------
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE void __fastcall Register(void);
+}	/* namespace Register */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_REGISTER)
+using namespace Cuda::Register;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_RegisterHPP

+ 374 - 0
include/Win32/CUDA.Runtime.hpp

@@ -0,0 +1,374 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.Runtime.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_RuntimeHPP
+#define Cuda_RuntimeHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <CUDA.Import.hpp>
+#include <GLS.Logger.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Runtime
+{
+//-- forward type declarations -----------------------------------------------
+struct TCudaChannelFormatDesc;
+struct DECLSPEC_DRECORD TcudaArray
+{
+};
+
+
+struct TcudaPitchedPtr;
+struct TcudaExtent;
+struct TcudaPos;
+struct TcudaMemcpy3DParms;
+struct TCudaDeviceProp;
+struct TTextureReference;
+//-- type declarations -------------------------------------------------------
+typedef System::StaticArray<System::UnicodeString, 10> Cuda_Runtime__1;
+
+enum DECLSPEC_DENUM TcudaError : unsigned char { cudaSuccess, cudaErrorMissingConfiguration, cudaErrorMemoryAllocation, cudaErrorInitializationError, cudaErrorLaunchFailure, cudaErrorPriorLaunchFailure, cudaErrorLaunchTimeout, cudaErrorLaunchOutOfResources, cudaErrorInvalidDeviceFunction, cudaErrorInvalidConfiguration, cudaErrorInvalidDevice, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidSymbol, cudaErrorMapBufferObjectFailed, cudaErrorUnmapBufferObjectFailed, cudaErrorInvalidHostPointer, cudaErrorInvalidDevicePointer, cudaErrorInvalidTexture, cudaErrorInvalidTextureBinding, cudaErrorInvalidChannelDescriptor, cudaErrorInvalidMemcpyDirection, cudaErrorAddressOfConstant, cudaErrorTextureFetchFailed, cudaErrorTextureNotBound, 
+	cudaErrorSynchronizationError, cudaErrorInvalidFilterSetting, cudaErrorInvalidNormSetting, cudaErrorMixedDeviceExecution, cudaErrorCudartUnloading, cudaErrorUnknown, cudaErrorNotYetImplemented, cudaErrorMemoryValueTooLarge, cudaErrorInvalidResourceHandle, cudaErrorNotReady, cudaErrorStartupFailure, cudaErrorApiFailureBase };
+
+enum DECLSPEC_DENUM TCudaChannelFormatKind : unsigned char { cudaChannelFormatKindSigned, cudaChannelFormatKindUnsigned, cudaChannelFormatKindFloat };
+
+enum DECLSPEC_DENUM TCudaGLMapFlags : unsigned char { cudaGLMapFlagsNone, cudaGLMapFlagsReadOnly, cudaGLMapFlagsWriteDiscard };
+
+typedef TCudaChannelFormatDesc *PcudaChannelFormatDesc;
+
+struct DECLSPEC_DRECORD TCudaChannelFormatDesc
+{
+public:
+	int x;
+	int y;
+	int z;
+	int w;
+	TCudaChannelFormatKind f;
+};
+
+
+enum DECLSPEC_DENUM TcudaMemcpyKind : unsigned char { cudaMemcpyHostToHost, cudaMemcpyHostToDevice, cudaMemcpyDeviceToHost, cudaMemcpyDeviceToDevice };
+
+struct DECLSPEC_DRECORD TcudaPitchedPtr
+{
+public:
+	void *ptr;
+	NativeUInt pitch;
+	NativeUInt xsize;
+	NativeUInt ysize;
+};
+
+
+struct DECLSPEC_DRECORD TcudaExtent
+{
+public:
+	NativeUInt width;
+	NativeUInt height;
+	NativeUInt depth;
+};
+
+
+struct DECLSPEC_DRECORD TcudaPos
+{
+public:
+	NativeUInt x;
+	NativeUInt y;
+	NativeUInt z;
+};
+
+
+struct DECLSPEC_DRECORD TcudaMemcpy3DParms
+{
+public:
+	void *srcArray;
+	TcudaPos srcPos;
+	TcudaPitchedPtr srcPtr;
+	void *dstArray;
+	TcudaPos dstPos;
+	TcudaPitchedPtr dstPtr;
+	TcudaExtent extent;
+	TcudaMemcpyKind kind;
+};
+
+
+typedef TCudaDeviceProp *PCudaDeviceProp;
+
+struct DECLSPEC_DRECORD TCudaDeviceProp
+{
+public:
+	System::StaticArray<char, 256> name;
+	NativeUInt totalGlobalMem;
+	NativeUInt sharedMemPerBlock;
+	int regsPerBlock;
+	int warpSize;
+	NativeUInt memPitch;
+	int maxThreadsPerBlock;
+	System::StaticArray<int, 3> maxThreadsDim;
+	System::StaticArray<int, 3> maxGridSize;
+	int clockRate;
+	NativeUInt totalConstMem;
+	int major;
+	int minor;
+	NativeUInt textureAlignment;
+	int deviceOverlap;
+	int multiProcessorCount;
+	int kernelExecTimeoutEnabled;
+	int egrated;
+	int canMapHostMemory;
+	int computeMode;
+	int maxTexture1D;
+	System::StaticArray<int, 2> maxTexture2D;
+	System::StaticArray<int, 3> maxTexture3D;
+	System::StaticArray<int, 3> maxTexture2DArray;
+	NativeUInt surfaceAlignment;
+	int concurrentKernels;
+	int ECCEnabled;
+	int pciBusID;
+	int pciDeviceID;
+	int tccDriver;
+	System::StaticArray<int, 21> __cudaReserved;
+};
+
+
+enum DECLSPEC_DENUM TcudaTextureAddressMode : unsigned char { cudaAddressModeWrap, cudaAddressModeClamp, cudaAddressModeMirror };
+
+enum DECLSPEC_DENUM TcudaTextureFilterMode : unsigned char { cudaFilterModePoint, cudaFilterModeLinear };
+
+enum DECLSPEC_DENUM TcudaTextureReadMode : unsigned char { cudaReadModeElementType, cudaReadModeNormalizedFloat };
+
+typedef TTextureReference *PTextureReference;
+
+struct DECLSPEC_DRECORD TTextureReference
+{
+public:
+	int normalized;
+	TcudaTextureFilterMode filterMode;
+	System::StaticArray<TcudaTextureAddressMode, 3> addressMode;
+	TCudaChannelFormatDesc channelDesc;
+	System::StaticArray<int, 16> __cudaReserved;
+};
+
+
+typedef TcudaArray *PcudaArray;
+
+typedef TcudaError cudaError_t;
+
+typedef int cudaStream_t;
+
+typedef int cudaEvent_t;
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE Cuda_Runtime__1 CUDARTDLLNAMES;
+extern DELPHI_PACKAGE float CUDART_INF_F;
+extern DELPHI_PACKAGE float CUDART_NAN_F;
+extern DELPHI_PACKAGE float CUDART_MIN_DENORM_F;
+extern DELPHI_PACKAGE float CUDART_MAX_NORMAL_F;
+extern DELPHI_PACKAGE float CUDART_NEG_ZERO_F;
+#define CUDART_ZERO_F  (0.000000E+00)
+#define CUDART_ONE_F  (1.000000E+00)
+static const System::Extended CUDART_SQRT_HALF_F = 7.071068E-01;
+static const System::Extended CUDART_SQRT_TWO_F = 1.414214E+00;
+static const System::Extended CUDART_THIRD_F = 3.333333E-01;
+static const System::Extended CUDART_PIO4_F = 7.853982E-01;
+static const System::Extended CUDART_PIO2_F = 1.570796E+00;
+static const System::Extended CUDART_3PIO4_F = 2.356194E+00;
+static const System::Extended CUDART_2_OVER_PI_F = 6.366198E-01;
+static const System::Extended CUDART_PI_F = 3.141593E+00;
+static const System::Extended CUDART_L2E_F = 1.442695E+00;
+static const System::Extended CUDART_L2T_F = 3.321928E+00;
+static const System::Extended CUDART_LG2_F = 3.010300E-01;
+static const System::Extended CUDART_LGE_F = 4.342945E-01;
+static const System::Extended CUDART_LN2_F = 6.931472E-01;
+static const System::Extended CUDART_LNT_F = 2.302585E+00;
+static const System::Extended CUDART_LNPI_F = 1.144730E+00;
+static const System::Extended CUDART_TWO_TO_M126_F = 1.175494E-38;
+static const System::Extended CUDART_TWO_TO_126_F = 8.507059E+37;
+static const System::Extended CUDART_NORM_HUGE_F = 3.402823E+38;
+#define CUDART_TWO_TO_23_F  (8.388608E+06)
+#define CUDART_TWO_TO_24_F  (1.677722E+07)
+#define CUDART_TWO_TO_31_F  (2.147484E+09)
+#define CUDART_TWO_TO_32_F  (4.294967E+09)
+static const System::Int8 CUDART_REMQUO_BITS_F = System::Int8(0x3);
+static const System::Int8 CUDART_REMQUO_MASK_F = System::Int8(0x3);
+#define CUDART_TRIG_PLOSS_F  (4.803900E+04)
+extern DELPHI_PACKAGE double CUDART_INF;
+extern DELPHI_PACKAGE double CUDART_NAN;
+extern DELPHI_PACKAGE double CUDART_NEG_ZERO;
+extern DELPHI_PACKAGE double CUDART_MIN_DENORM;
+#define CUDART_ZERO  (0.000000E+00)
+#define CUDART_ONE  (1.000000E+00)
+static const System::Extended CUDART_SQRT_TWO = 1.414214E+00;
+static const System::Extended CUDART_SQRT_HALF = 7.071068E-01;
+static const System::Extended CUDART_THIRD = 3.333333E-01;
+static const System::Extended CUDART_TWOTHIRD = 6.666667E-01;
+static const System::Extended CUDART_PIO4 = 7.853982E-01;
+static const System::Extended CUDART_PIO4_HI = 7.853982E-01;
+static const System::Extended CUDART_PIO4_LO = 3.061617E-17;
+static const System::Extended CUDART_PIO2 = 1.570796E+00;
+static const System::Extended CUDART_PIO2_HI = 1.570796E+00;
+static const System::Extended CUDART_PIO2_LO = 6.123234E-17;
+static const System::Extended CUDART_3PIO4 = 2.356194E+00;
+static const System::Extended CUDART_2_OVER_PI = 6.366198E-01;
+static const System::Extended CUDART_PI = 3.141593E+00;
+static const System::Extended CUDART_PI_HI = 3.141593E+00;
+static const System::Extended CUDART_PI_LO = 1.224647E-16;
+static const System::Extended CUDART_SQRT_2PI_HI = 2.506628E+00;
+static const System::Extended CUDART_SQRT_2PI_LO = -1.832858E-16;
+static const System::Extended CUDART_SQRT_PIO2_HI = 1.253314E+00;
+static const System::Extended CUDART_SQRT_PIO2_LO = -9.164290E-17;
+static const System::Extended CUDART_L2E = 1.442695E+00;
+static const System::Extended CUDART_L2E_HI = 1.442695E+00;
+static const System::Extended CUDART_L2E_LO = 2.035527E-17;
+static const System::Extended CUDART_L2T = 3.321928E+00;
+static const System::Extended CUDART_LG2 = 3.010300E-01;
+static const System::Extended CUDART_LG2_HI = 3.010300E-01;
+static const System::Extended CUDART_LG2_LO = -2.803728E-18;
+static const System::Extended CUDART_LGE = 4.342945E-01;
+static const System::Extended CUDART_LGE_HI = 4.342945E-01;
+static const System::Extended CUDART_LGE_LO = 1.098320E-17;
+static const System::Extended CUDART_LN2 = 6.931472E-01;
+static const System::Extended CUDART_LN2_HI = 6.931472E-01;
+static const System::Extended CUDART_LN2_LO = 2.319047E-17;
+static const System::Extended CUDART_LNT = 2.302585E+00;
+static const System::Extended CUDART_LNT_HI = 2.302585E+00;
+static const System::Extended CUDART_LNT_LO = -2.170756E-16;
+static const System::Extended CUDART_LNPI = 1.144730E+00;
+static const System::Extended CUDART_LN2_X_1024 = 7.097827E+02;
+static const System::Extended CUDART_LN2_X_1025 = 7.104759E+02;
+static const System::Extended CUDART_LN2_X_1075 = 7.451332E+02;
+static const System::Extended CUDART_LG2_X_1024 = 3.082547E+02;
+static const System::Extended CUDART_LG2_X_1075 = 3.236072E+02;
+#define CUDART_TWO_TO_23  (8.388608E+06)
+static const System::Extended CUDART_TWO_TO_52 = 4.503600E+15;
+static const System::Extended CUDART_TWO_TO_54 = 1.801440E+16;
+static const System::Extended CUDART_TWO_TO_M54 = 5.551115E-17;
+static const System::Extended CUDART_TWO_TO_M1022 = 2.225074E-308;
+#define CUDART_TRIG_PLOSS  (2.147484E+09)
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaBindTexture)(NativeUInt &offset, const PTextureReference texref, void * &devPtr, TCudaChannelFormatDesc &desc, NativeUInt size);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaBindTexture2D)(NativeUInt &offset, const PTextureReference texref, const void * devPtr, TCudaChannelFormatDesc &desc, NativeUInt width, NativeUInt height, NativeUInt pitch);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaBindTextureToArray)(const PTextureReference texref, const PcudaArray cudaArray);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaUnbindTexture)(const PTextureReference texref);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGetTextureAlignmentOffset)(NativeUInt offset, const PTextureReference texref);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGetTextureReference)(const PTextureReference texref, const char * symbol);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGetChannelDesc)(TCudaChannelFormatDesc &desc, const void * array_);
+extern DELPHI_PACKAGE TCudaChannelFormatDesc __stdcall (*cudaCreateChannelDesc)(int x, int y, int z, int w, TCudaChannelFormatKind f);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMalloc3D)(TcudaPitchedPtr &pitchedDevPtr, TcudaExtent extent);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMalloc3DArray)(PcudaArray &arrayPtr, const TCudaChannelFormatDesc &desc, TcudaExtent extent, unsigned flags);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemset3D)(TcudaPitchedPtr pitchedDevPtr, int value, TcudaExtent extent);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpy3D)(const TcudaMemcpy3DParms &p);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpy3DAsync)(const TcudaMemcpy3DParms &p, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMalloc)(void *devPtr, NativeUInt size);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMallocHost)(void * &ptr, NativeUInt size);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMallocPitch)(void *devPtr, NativeUInt &pitch, NativeUInt width, NativeUInt height);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMallocArray)(void * &aarray, TCudaChannelFormatDesc &desc, NativeUInt width, NativeUInt height);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaFree)(void * devPtr);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaFreeHost)(void * ptr);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaFreeArray)(const void * aarray);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaHostAlloc)(void * &pHost, NativeUInt bytes, unsigned flags);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaHostGetDevicePointer)(void * &pDevice, void * pHost, unsigned flags);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaHostGetFlags)(unsigned &pFlags, void * pHost);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemGetInfo)(NativeUInt &free, NativeUInt &total);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpy)(void * dst, void * src, NativeUInt count, TcudaMemcpyKind kind);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpyToArray)(PcudaArray &dst, NativeUInt wOffset, NativeUInt hOffset, void *src, NativeUInt count, TcudaMemcpyKind kind);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpyFromArray)(void *dst, const PcudaArray src, NativeUInt wOffset, NativeUInt hOffset, NativeUInt count, TcudaMemcpyKind kind);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpyArrayToArray)(PcudaArray dst, NativeUInt wOffsetDst, NativeUInt hOffsetDst, const PcudaArray src, NativeUInt wOffsetSrc, NativeUInt hOffsetSrc, NativeUInt count, const TcudaMemcpyKind kind/* = (TcudaMemcpyKind)(0x3)*/);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpy2D)(void *dst, NativeUInt dpitch, void *src, NativeUInt spitch, NativeUInt width, NativeUInt height, TcudaMemcpyKind kind);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpy2DToArray)(PcudaArray dst, NativeUInt wOffset, NativeUInt hOffset, void *src, NativeUInt spitch, NativeUInt width, NativeUInt height, TcudaMemcpyKind kind);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpy2DFromArray)(void *dst, NativeUInt dpitch, PcudaArray src, NativeUInt wOffset, NativeUInt hOffset, NativeUInt width, NativeUInt height, TcudaMemcpyKind kind);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpy2DArrayToArray)(PcudaArray dst, NativeUInt wOffsetDst, NativeUInt hOffsetDst, PcudaArray src, NativeUInt wOffsetSrc, NativeUInt hOffsetSrc, NativeUInt width, NativeUInt height, const TcudaMemcpyKind kind/* = (TcudaMemcpyKind)(0x3)*/);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpyToSymbol)(char * symbol, void *src, NativeUInt count, const NativeUInt offset/* = (NativeUInt)(0x0)*/, const TcudaMemcpyKind kind/* = (TcudaMemcpyKind)(0x1)*/);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpyFromSymbol)(void *dst, char * symbol, NativeUInt count, const NativeUInt offset/* = (NativeUInt)(0x0)*/, const TcudaMemcpyKind kind/* = (TcudaMemcpyKind)(0x2)*/);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpyAsync)(void *dst, const void *src, NativeUInt count, TcudaMemcpyKind kind, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpyToArrayAsync)(PcudaArray dst, NativeUInt wOffset, NativeUInt hOffset, const void *src, NativeUInt count, TcudaMemcpyKind kind, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpyFromArrayAsync)(void *dst, const PcudaArray src, NativeUInt wOffset, NativeUInt hOffset, NativeUInt count, TcudaMemcpyKind kind, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpy2DAsync)(void *dst, NativeUInt dpitch, const void *src, NativeUInt spitch, NativeUInt width, NativeUInt height, TcudaMemcpyKind kind, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpy2DToArrayAsync)(PcudaArray dst, NativeUInt wOffset, NativeUInt hOffset, const void *src, NativeUInt spitch, NativeUInt width, NativeUInt height, TcudaMemcpyKind kind, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpy2DFromArrayAsync)(void *dst, NativeUInt dpitch, const PcudaArray src, NativeUInt wOffset, NativeUInt hOffset, NativeUInt width, NativeUInt height, TcudaMemcpyKind kind, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpyToSymbolAsync)(const char * symbol, const void *src, NativeUInt count, NativeUInt offset, TcudaMemcpyKind kind, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemcpyFromSymbolAsync)(void *dst, const char * symbol, NativeUInt count, NativeUInt offset, TcudaMemcpyKind kind, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemset)(void *devPtr, int value, NativeUInt count);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaMemset2D)(void *devPtr, NativeUInt pitch, int value, NativeUInt width, NativeUInt height);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGetSymbolAddress)(void * &devPtr, const char * symbol);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGetSymbolSize)(NativeUInt &size, const char * symbol);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGetDeviceCount)(int &count);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGetDeviceProperties)(TCudaDeviceProp &prop, int device);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaChooseDevice)(int &device, const PCudaDeviceProp prop);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaSetDevice)(int device);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGetDevice)(int &device);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaSetDeviceFlags)(int flags);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaSetValidDevices)(System::PInteger device_arr, int len);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaConfigureCall)(const Cuda::Import::TDim3 &gridDim, const Cuda::Import::TDim3 &blockDim, NativeUInt sharedMem, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaSetupArgument)(const void * arg, NativeUInt size, NativeUInt offset);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaFuncSetCacheConfig)(const char * func, Cuda::Import::TcudaFuncCache cacheConfig);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaLaunch)(const char * entry);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaFuncGetAttributes)(Cuda::Import::TcudaFuncAttributes &attr, const char * func);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGetLastError)(void);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGLSetGLDevice)(int device);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGLRegisterBufferObject)(unsigned bufObj);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGraphicsGLRegisterImage)(const Cuda::Import::PCUgraphicsResource resource, unsigned image, unsigned target, unsigned flags);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGraphicsGLRegisterBuffer)(const Cuda::Import::PCUgraphicsResource resource, unsigned buffer, unsigned flags);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGLMapBufferObject)(void * devPtr, unsigned bufObj);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGLUnmapBufferObject)(unsigned bufObj);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGLUnregisterBufferObject)(unsigned bufObj);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGLSetBufferObjectMapFlags)(unsigned bufObj, TCudaGLMapFlags flags);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGLMapBufferObjectAsync)(void * &devPtr, unsigned bufObj, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGLUnmapBufferObjectAsync)(unsigned bufObj, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGraphicsUnregisterResource)(Cuda::Import::PCUgraphicsResource resource);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGraphicsResourceSetMapFlags)(Cuda::Import::PCUgraphicsResource resource, unsigned flags);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGraphicsMapResources)(int count, const Cuda::Import::PCUgraphicsResource resources, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGraphicsUnmapResources)(int count, const Cuda::Import::PCUgraphicsResource resources, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGraphicsResourceGetMappedPointer)(void * &pDevPtr, unsigned &pSize, Cuda::Import::PCUgraphicsResource resource);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaGraphicsSubResourceGetMappedArray)(Cuda::Import::PCUarray &pArray, Cuda::Import::PCUgraphicsResource resource, unsigned arrayIndex, unsigned mipLevel);
+extern DELPHI_PACKAGE char * __stdcall (*cudaGetErrorString)(TcudaError error);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaDriverGetVersion)(/* out */ int &driverVersion);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaRuntimeGetVersion)(/* out */ int &runtimeVersion);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaSetDoubleForDevice)(double &d);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaSetDoubleForHost)(double &d);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaStreamCreate)(int &pStream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaStreamDestroy)(int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaStreamSynchronize)(int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaStreamQuery)(int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaEventCreate)(int &event);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaEventCreateWithFlags)(int &event, int flags);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaEventRecord)(int event, int stream);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaEventQuery)(int event);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaEventSynchronize)(int event);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaEventDestroy)(int event);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaEventElapsedTime)(float &ms, int start, int ending);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaWGLGetDevice)(int &device, void * hGpu);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaThreadExit)(void);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaThreadSynchronize)(void);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaThreadSetLimit)(Cuda::Import::TcudaLimit limit, NativeUInt value);
+extern DELPHI_PACKAGE TcudaError __stdcall (*cudaThreadGetLimit)(NativeUInt &value, Cuda::Import::TcudaLimit limit);
+extern DELPHI_PACKAGE System::UnicodeString __fastcall cudaGetLastErrorString(void);
+extern DELPHI_PACKAGE bool __fastcall InitCUDART(void);
+extern DELPHI_PACKAGE void __fastcall CloseCUDART(void);
+extern DELPHI_PACKAGE bool __fastcall InitCUDARTFromLibrary(const System::WideString LibName);
+extern DELPHI_PACKAGE bool __fastcall IsCUDARTInitialized(void);
+}	/* namespace Runtime */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_RUNTIME)
+using namespace Cuda::Runtime;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_RuntimeHPP

+ 76 - 0
include/Win32/CUDA.Utility.hpp

@@ -0,0 +1,76 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'CUDA.Utility.pas' rev: 35.00 (Windows)
+
+#ifndef Cuda_UtilityHPP
+#define Cuda_UtilityHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cuda
+{
+namespace Utility
+{
+//-- forward type declarations -----------------------------------------------
+//-- type declarations -------------------------------------------------------
+//-- var, const, procedure ---------------------------------------------------
+#define CUTILDLL L"cutil32.dll"
+extern DELPHI_PACKAGE char * __stdcall (*cutFindFilePath)(const char * filename, const char * executablePath);
+extern DELPHI_PACKAGE bool __stdcall (*cutLoadPGMf)(const char * filename, System::PSingle &data, int &w, int &h);
+extern DELPHI_PACKAGE bool __stdcall (*cutSavePGMf)(const char * filename, System::PSingle data, int w, int h);
+extern DELPHI_PACKAGE bool __stdcall (*cutLoadPGMub)(const char * filename, System::PByte &data, int &w, int &h);
+extern DELPHI_PACKAGE bool __stdcall (*cutLoadPPMub)(const char * filename, System::PByte &data, int &w, int &h);
+extern DELPHI_PACKAGE bool __stdcall (*cutLoadPPM4ub)(const char * filename, System::PByte &data, int &w, int &h);
+extern DELPHI_PACKAGE bool __stdcall (*cutLoadPGMi)(const char * filename, System::PInteger &data, int &w, int &h);
+extern DELPHI_PACKAGE bool __stdcall (*cutLoadPGMs)(const char * filename, PWORD &data, int &w, int &h);
+extern DELPHI_PACKAGE bool __stdcall (*cutSavePGMub)(const char * filename, System::PByte data, int w, int h);
+extern DELPHI_PACKAGE bool __stdcall (*cutSavePPMub)(const char * filename, System::PByte data, int w, int h);
+extern DELPHI_PACKAGE bool __stdcall (*cutSavePPM4ub)(const char * filename, System::PByte data, int w, int h);
+extern DELPHI_PACKAGE bool __stdcall (*cutSavePGMi)(const char * filename, System::PInteger data, int w, int h);
+extern DELPHI_PACKAGE bool __stdcall (*cutSavePGMs)(const char * filename, PWORD data, int w, int h);
+extern DELPHI_PACKAGE bool __stdcall (*cutComparef)(const Winapi::Windows::PSingle reference, const Winapi::Windows::PSingle data, const unsigned len);
+extern DELPHI_PACKAGE bool __stdcall (*cutComparei)(const System::PInteger reference, const System::PInteger data, const unsigned len);
+extern DELPHI_PACKAGE bool __stdcall (*cutCompareuit)(const System::PInteger reference, const System::PInteger data, const unsigned len, const float epsilon, const float threshold);
+extern DELPHI_PACKAGE bool __stdcall (*cutCompareub)(const System::PByte reference, const System::PByte data, const unsigned len);
+extern DELPHI_PACKAGE bool __stdcall (*cutCompareubt)(const System::PByte reference, const System::PByte data, const unsigned len, const float epsilon, const float threshold);
+extern DELPHI_PACKAGE bool __stdcall (*cutCompareube)(const System::PByte reference, const System::PByte data, const unsigned len, const float epsilon);
+extern DELPHI_PACKAGE bool __stdcall (*cutComparefe)(const Winapi::Windows::PSingle reference, const Winapi::Windows::PSingle data, const unsigned len, const float epsilon);
+extern DELPHI_PACKAGE bool __stdcall (*cutComparefet)(const Winapi::Windows::PSingle reference, const Winapi::Windows::PSingle data, const unsigned len, const float epsilon, const float threshold);
+extern DELPHI_PACKAGE bool __stdcall (*cutCompareL2fe)(const Winapi::Windows::PSingle reference, const Winapi::Windows::PSingle data, const unsigned len, const float epsilon);
+extern DELPHI_PACKAGE bool __stdcall (*cutCreateTimer)(unsigned &name);
+extern DELPHI_PACKAGE bool __stdcall (*cutStartTimer)(const unsigned name);
+extern DELPHI_PACKAGE bool __stdcall (*cutStopTimer)(const unsigned name);
+extern DELPHI_PACKAGE bool __stdcall (*cutResetTimer)(const unsigned name);
+extern DELPHI_PACKAGE bool __stdcall (*cutDeleteTimer)(const unsigned name);
+extern DELPHI_PACKAGE float __stdcall (*cutGetTimerValue)(const unsigned name);
+extern DELPHI_PACKAGE float __stdcall (*cutGetAverageTimerValue)(const unsigned name);
+extern DELPHI_PACKAGE void __stdcall (*cutFree)(void * ptr);
+extern DELPHI_PACKAGE bool __fastcall InitCUTIL(void);
+extern DELPHI_PACKAGE void __fastcall CloseCUTIL(void);
+extern DELPHI_PACKAGE bool __fastcall InitCUTILFromLibrary(const System::WideString LibName);
+extern DELPHI_PACKAGE bool __fastcall IsCUTILInitialized(void);
+}	/* namespace Utility */
+}	/* namespace Cuda */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA_UTILITY)
+using namespace Cuda::Utility;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CUDA)
+using namespace Cuda;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cuda_UtilityHPP

+ 201 - 0
include/Win32/Cg.BombShader.hpp

@@ -0,0 +1,201 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Cg.BombShader.pas' rev: 35.00 (Windows)
+
+#ifndef Cg_BombshaderHPP
+#define Cg_BombshaderHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.Texture.hpp>
+#include <GLS.Cadencer.hpp>
+#include <GLS.Context.hpp>
+#include <GLS.Strings.hpp>
+#include <GLS.Material.hpp>
+#include <GLS.RenderContextInfo.hpp>
+#include <GLS.TextureFormat.hpp>
+#include <GLS.State.hpp>
+#include <Cg.GL.hpp>
+#include <Cg.Shader.hpp>
+#include <GLS.BaseClasses.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cg
+{
+namespace Bombshader
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS ECgBombShaderException;
+class DELPHICLASS TCgCustomBombShader;
+class DELPHICLASS TCgBombShader;
+//-- type declarations -------------------------------------------------------
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION ECgBombShaderException : public Cg::Shader::ECgShaderException
+{
+	typedef Cg::Shader::ECgShaderException inherited;
+	
+public:
+	/* Exception.Create */ inline __fastcall ECgBombShaderException(const System::UnicodeString Msg) : Cg::Shader::ECgShaderException(Msg) { }
+	/* Exception.CreateFmt */ inline __fastcall ECgBombShaderException(const System::UnicodeString Msg, const System::TVarRec *Args, const int Args_High) : Cg::Shader::ECgShaderException(Msg, Args, Args_High) { }
+	/* Exception.CreateRes */ inline __fastcall ECgBombShaderException(NativeUInt Ident)/* overload */ : Cg::Shader::ECgShaderException(Ident) { }
+	/* Exception.CreateRes */ inline __fastcall ECgBombShaderException(System::PResStringRec ResStringRec)/* overload */ : Cg::Shader::ECgShaderException(ResStringRec) { }
+	/* Exception.CreateResFmt */ inline __fastcall ECgBombShaderException(NativeUInt Ident, const System::TVarRec *Args, const int Args_High)/* overload */ : Cg::Shader::ECgShaderException(Ident, Args, Args_High) { }
+	/* Exception.CreateResFmt */ inline __fastcall ECgBombShaderException(System::PResStringRec ResStringRec, const System::TVarRec *Args, const int Args_High)/* overload */ : Cg::Shader::ECgShaderException(ResStringRec, Args, Args_High) { }
+	/* Exception.CreateHelp */ inline __fastcall ECgBombShaderException(const System::UnicodeString Msg, int AHelpContext) : Cg::Shader::ECgShaderException(Msg, AHelpContext) { }
+	/* Exception.CreateFmtHelp */ inline __fastcall ECgBombShaderException(const System::UnicodeString Msg, const System::TVarRec *Args, const int Args_High, int AHelpContext) : Cg::Shader::ECgShaderException(Msg, Args, Args_High, AHelpContext) { }
+	/* Exception.CreateResHelp */ inline __fastcall ECgBombShaderException(NativeUInt Ident, int AHelpContext)/* overload */ : Cg::Shader::ECgShaderException(Ident, AHelpContext) { }
+	/* Exception.CreateResHelp */ inline __fastcall ECgBombShaderException(System::PResStringRec ResStringRec, int AHelpContext)/* overload */ : Cg::Shader::ECgShaderException(ResStringRec, AHelpContext) { }
+	/* Exception.CreateResFmtHelp */ inline __fastcall ECgBombShaderException(System::PResStringRec ResStringRec, const System::TVarRec *Args, const int Args_High, int AHelpContext)/* overload */ : Cg::Shader::ECgShaderException(ResStringRec, Args, Args_High, AHelpContext) { }
+	/* Exception.CreateResFmtHelp */ inline __fastcall ECgBombShaderException(NativeUInt Ident, const System::TVarRec *Args, const int Args_High, int AHelpContext)/* overload */ : Cg::Shader::ECgShaderException(Ident, Args, Args_High, AHelpContext) { }
+	/* Exception.Destroy */ inline __fastcall virtual ~ECgBombShaderException() { }
+	
+};
+
+#pragma pack(pop)
+
+enum DECLSPEC_DENUM TGLCgBombShaderTextureSource : unsigned char { stsPrimaryTexture, stsSecondadyTexture, stsThirdTexture, stsUserSelectedTexture };
+
+class PASCALIMPLEMENTATION TCgCustomBombShader : public Cg::Shader::TCadencableCustomCgShader
+{
+	typedef Cg::Shader::TCadencableCustomCgShader inherited;
+	
+private:
+	Gls::Material::TGLAbstractMaterialLibrary* FMaterialLibrary;
+	Gls::Texture::TGLTexture* FGradientTexture;
+	Gls::Texture::TGLTexture* FMainTexture;
+	System::UnicodeString FMainTextureName;
+	System::UnicodeString FGradientTextureName;
+	float FSharpness;
+	float FColorRange;
+	float FSpeed;
+	float FDisplacement;
+	float FAlpha;
+	float FTurbDensity;
+	float FColorSharpness;
+	float FGradientTextureShare;
+	float FMainTextureShare;
+	TGLCgBombShaderTextureSource FMainTextureSource;
+	void __fastcall SetGradientTexture(Gls::Texture::TGLTexture* const Value);
+	void __fastcall SetMainTexture(Gls::Texture::TGLTexture* const Value);
+	System::UnicodeString __fastcall GetMainTextureName();
+	void __fastcall SetMainTextureName(const System::UnicodeString Value);
+	System::UnicodeString __fastcall GetGradientTextureName();
+	void __fastcall SetGradientTextureName(const System::UnicodeString Value);
+	bool __fastcall StoreColorRange();
+	bool __fastcall StoreColorSharpness();
+	bool __fastcall StoreDisplacement();
+	bool __fastcall StoreGradientTextureShare();
+	bool __fastcall StoreSharpness();
+	bool __fastcall StoreSpeed();
+	bool __fastcall StoreTurbDensity();
+	bool __fastcall StoreMainTextureShare();
+	Gls::Material::TGLAbstractMaterialLibrary* __fastcall GetMaterialLibrary();
+	
+protected:
+	virtual void __fastcall DoInitialize(Gls::Rendercontextinfo::TGLRenderContextInfo &rci, System::TObject* Sender);
+	virtual void __fastcall DoApply(Gls::Rendercontextinfo::TGLRenderContextInfo &rci, System::TObject* Sender);
+	HIDESBASE virtual void __fastcall OnApplyVP(Cg::Shader::TCgProgram* CgProgram, System::TObject* Sender);
+	HIDESBASE virtual void __fastcall OnApplyFP(Cg::Shader::TCgProgram* CgProgram, System::TObject* Sender);
+	HIDESBASE virtual void __fastcall OnUnApplyFP(Cg::Shader::TCgProgram* CgProgram);
+	virtual void __fastcall SetMaterialLibrary(Gls::Material::TGLAbstractMaterialLibrary* const Value);
+	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
+	
+public:
+	__fastcall virtual TCgCustomBombShader(System::Classes::TComponent* AOwner);
+	__property Gls::Texture::TGLTexture* MainTexture = {read=FMainTexture, write=SetMainTexture};
+	__property System::UnicodeString MainTextureName = {read=GetMainTextureName, write=SetMainTextureName};
+	__property Gls::Texture::TGLTexture* GradientTexture = {read=FGradientTexture, write=SetGradientTexture};
+	__property System::UnicodeString GradientTextureName = {read=GetGradientTextureName, write=SetGradientTextureName};
+	__property float GradientTextureShare = {read=FGradientTextureShare, write=FGradientTextureShare, stored=StoreGradientTextureShare};
+	__property float MainTextureShare = {read=FMainTextureShare, write=FMainTextureShare, stored=StoreMainTextureShare};
+	__property float Alpha = {read=FAlpha, write=FAlpha};
+	__property float Displacement = {read=FDisplacement, write=FDisplacement, stored=StoreDisplacement};
+	__property float Sharpness = {read=FSharpness, write=FSharpness, stored=StoreSharpness};
+	__property float ColorSharpness = {read=FColorSharpness, write=FColorSharpness, stored=StoreColorSharpness};
+	__property float Speed = {read=FSpeed, write=FSpeed, stored=StoreSpeed};
+	__property float TurbDensity = {read=FTurbDensity, write=FTurbDensity, stored=StoreTurbDensity};
+	__property float ColorRange = {read=FColorRange, write=FColorRange, stored=StoreColorRange};
+	__property TGLCgBombShaderTextureSource MainTextureSource = {read=FMainTextureSource, write=FMainTextureSource, nodefault};
+	__property Gls::Material::TGLAbstractMaterialLibrary* MaterialLibrary = {read=FMaterialLibrary, write=SetMaterialLibrary};
+public:
+	/* TCustomCgShader.Destroy */ inline __fastcall virtual ~TCgCustomBombShader() { }
+	
+private:
+	void *__IGLMaterialLibrarySupported;	// Gls::Material::IGLMaterialLibrarySupported 
+	
+public:
+	#if defined(MANAGED_INTERFACE_OPERATORS)
+	// {8E442AF9-D212-4A5E-8A88-92F798BABFD1}
+	operator Gls::Material::_di_IGLMaterialLibrarySupported()
+	{
+		Gls::Material::_di_IGLMaterialLibrarySupported intf;
+		this->GetInterface(intf);
+		return intf;
+	}
+	#else
+	operator Gls::Material::IGLMaterialLibrarySupported*(void) { return (Gls::Material::IGLMaterialLibrarySupported*)&__IGLMaterialLibrarySupported; }
+	#endif
+	
+};
+
+
+class PASCALIMPLEMENTATION TCgBombShader : public TCgCustomBombShader
+{
+	typedef TCgCustomBombShader inherited;
+	
+protected:
+	virtual void __fastcall DoInitialize(Gls::Rendercontextinfo::TGLRenderContextInfo &rci, System::TObject* Sender);
+	virtual void __fastcall DoApply(Gls::Rendercontextinfo::TGLRenderContextInfo &rci, System::TObject* Sender);
+	virtual void __fastcall OnApplyVP(Cg::Shader::TCgProgram* CgProgram, System::TObject* Sender);
+	virtual void __fastcall OnApplyFP(Cg::Shader::TCgProgram* CgProgram, System::TObject* Sender);
+	virtual void __fastcall OnUnApplyFP(Cg::Shader::TCgProgram* CgProgram);
+	
+__published:
+	__property MainTextureShare = {default=0};
+	__property MainTextureName = {default=0};
+	__property GradientTextureShare = {default=0};
+	__property GradientTextureName = {default=0};
+	__property Alpha = {default=0};
+	__property Cadencer;
+	__property Displacement = {default=0};
+	__property Sharpness = {default=0};
+	__property ColorSharpness = {default=0};
+	__property Speed = {default=0};
+	__property TurbDensity = {default=0};
+	__property ColorRange = {default=0};
+	__property MaterialLibrary;
+	__property DesignEnable = {default=0};
+public:
+	/* TCgCustomBombShader.Create */ inline __fastcall virtual TCgBombShader(System::Classes::TComponent* AOwner) : TCgCustomBombShader(AOwner) { }
+	
+public:
+	/* TCustomCgShader.Destroy */ inline __fastcall virtual ~TCgBombShader() { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Bombshader */
+}	/* namespace Cg */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG_BOMBSHADER)
+using namespace Cg::Bombshader;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG)
+using namespace Cg;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cg_BombshaderHPP

+ 134 - 0
include/Win32/Cg.GL.hpp

@@ -0,0 +1,134 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Cg.GL.pas' rev: 35.00 (Windows)
+
+#ifndef Cg_GlHPP
+#define Cg_GlHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <Cg.Import.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cg
+{
+namespace Gl
+{
+//-- forward type declarations -----------------------------------------------
+//-- type declarations -------------------------------------------------------
+typedef unsigned TCGGLenum;
+
+typedef unsigned CGGLenum;
+
+//-- var, const, procedure ---------------------------------------------------
+#define CgGLlibrary L"cgGL.dll"
+static const System::Int8 CG_GL_MATRIX_IDENTITY = System::Int8(0x0);
+static const System::Int8 CG_GL_MATRIX_TRANSPOSE = System::Int8(0x1);
+static const System::Int8 CG_GL_MATRIX_INVERSE = System::Int8(0x2);
+static const System::Int8 CG_GL_MATRIX_INVERSE_TRANSPOSE = System::Int8(0x3);
+static const System::Int8 CG_GL_MODELVIEW_MATRIX = System::Int8(0x4);
+static const System::Int8 CG_GL_PROJECTION_MATRIX = System::Int8(0x5);
+static const System::Int8 CG_GL_TEXTURE_MATRIX = System::Int8(0x6);
+static const System::Int8 CG_GL_MODELVIEW_PROJECTION_MATRIX = System::Int8(0x7);
+static const System::Int8 CG_GL_VERTEX = System::Int8(0x8);
+static const System::Int8 CG_GL_FRAGMENT = System::Int8(0x9);
+extern "C" int __cdecl cgGLIsProfileSupported(Cg::Import::TCGprofile profile);
+extern "C" void __cdecl cgGLEnableProfile(Cg::Import::TCGprofile profile);
+extern "C" void __cdecl cgGLDisableProfile(Cg::Import::TCGprofile profile);
+extern "C" Cg::Import::TCGprofile __cdecl cgGLGetLatestProfile(unsigned profile_type);
+extern "C" void __cdecl cgGLSetOptimalOptions(Cg::Import::TCGprofile profile);
+extern "C" void __cdecl cgGLLoadProgram(Cg::Import::PCGprogram _program);
+extern "C" int __cdecl cgGLIsProgramLoaded(Cg::Import::PCGprogram _program);
+extern "C" void __cdecl cgGLBindProgram(Cg::Import::PCGprogram _program);
+extern "C" void __cdecl cgGLUnbindProgram(Cg::Import::TCGprofile profile);
+extern "C" unsigned __cdecl cgGLGetProgramID(Cg::Import::PCGprogram _program);
+extern "C" void __cdecl cgGLSetParameter1f(Cg::Import::PCGparameter param, float x);
+extern "C" void __cdecl cgGLSetParameter2f(Cg::Import::PCGparameter param, float x, float y);
+extern "C" void __cdecl cgGLSetParameter3f(Cg::Import::PCGparameter param, float x, float y, float z);
+extern "C" void __cdecl cgGLSetParameter4f(Cg::Import::PCGparameter param, float x, float y, float z, float w);
+extern "C" void __cdecl cgGLSetParameter1fv(Cg::Import::PCGparameter param, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLSetParameter2fv(Cg::Import::PCGparameter param, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLSetParameter3fv(Cg::Import::PCGparameter param, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLSetParameter4fv(Cg::Import::PCGparameter param, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLSetParameter1d(Cg::Import::PCGparameter param, double x);
+extern "C" void __cdecl cgGLSetParameter2d(Cg::Import::PCGparameter param, double x, double y);
+extern "C" void __cdecl cgGLSetParameter3d(Cg::Import::PCGparameter param, double x, double y, double z);
+extern "C" void __cdecl cgGLSetParameter4d(Cg::Import::PCGparameter param, double x, double y, double z, double w);
+extern "C" void __cdecl cgGLSetParameter1dv(Cg::Import::PCGparameter param, const System::PDouble v);
+extern "C" void __cdecl cgGLSetParameter2dv(Cg::Import::PCGparameter param, const System::PDouble v);
+extern "C" void __cdecl cgGLSetParameter3dv(Cg::Import::PCGparameter param, const System::PDouble v);
+extern "C" void __cdecl cgGLSetParameter4dv(Cg::Import::PCGparameter param, const System::PDouble v);
+extern "C" void __cdecl cgGLGetParameter1f(Cg::Import::PCGparameter param, Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLGetParameter2f(Cg::Import::PCGparameter param, Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLGetParameter3f(Cg::Import::PCGparameter param, Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLGetParameter4f(Cg::Import::PCGparameter param, Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLGetParameter1d(Cg::Import::PCGparameter param, System::PDouble v);
+extern "C" void __cdecl cgGLGetParameter2d(Cg::Import::PCGparameter param, System::PDouble v);
+extern "C" void __cdecl cgGLGetParameter3d(Cg::Import::PCGparameter param, System::PDouble v);
+extern "C" void __cdecl cgGLGetParameter4d(Cg::Import::PCGparameter param, System::PDouble v);
+extern "C" void __cdecl cgGLSetParameterArray1f(Cg::Import::PCGparameter param, int offset, int nelements, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLSetParameterArray2f(Cg::Import::PCGparameter param, int offset, int nelements, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLSetParameterArray3f(Cg::Import::PCGparameter param, int offset, int nelements, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLSetParameterArray4f(Cg::Import::PCGparameter param, int offset, int nelements, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLSetParameterArray1d(Cg::Import::PCGparameter param, int offset, int nelements, const System::PDouble v);
+extern "C" void __cdecl cgGLSetParameterArray2d(Cg::Import::PCGparameter param, int offset, int nelements, const System::PDouble v);
+extern "C" void __cdecl cgGLSetParameterArray3d(Cg::Import::PCGparameter param, int offset, int nelements, const System::PDouble v);
+extern "C" void __cdecl cgGLSetParameterArray4d(Cg::Import::PCGparameter param, int offset, int nelements, const System::PDouble v);
+extern "C" void __cdecl cgGLGetParameterArray1f(Cg::Import::PCGparameter param, int offset, int nelements, Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLGetParameterArray2f(Cg::Import::PCGparameter param, int offset, int nelements, Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLGetParameterArray3f(Cg::Import::PCGparameter param, int offset, int nelements, Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLGetParameterArray4f(Cg::Import::PCGparameter param, int offset, int nelements, Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgGLGetParameterArray1d(Cg::Import::PCGparameter param, int offset, int nelements, System::PDouble v);
+extern "C" void __cdecl cgGLGetParameterArray2d(Cg::Import::PCGparameter param, int offset, int nelements, System::PDouble v);
+extern "C" void __cdecl cgGLGetParameterArray3d(Cg::Import::PCGparameter param, int offset, int nelements, System::PDouble v);
+extern "C" void __cdecl cgGLGetParameterArray4d(Cg::Import::PCGparameter param, int offset, int nelements, System::PDouble v);
+extern "C" void __cdecl cgGLSetParameterPointer(Cg::Import::PCGparameter param, int fsize, unsigned _type, int stride, const void * _pointer);
+extern "C" void __cdecl cgGLEnableClientState(Cg::Import::PCGparameter param);
+extern "C" void __cdecl cgGLDisableClientState(Cg::Import::PCGparameter param);
+extern "C" void __cdecl cgGLSetMatrixParameterdr(Cg::Import::PCGparameter param, const System::PDouble matrix);
+extern "C" void __cdecl cgGLSetMatrixParameterfr(Cg::Import::PCGparameter param, const Winapi::Windows::PSingle matrix);
+extern "C" void __cdecl cgGLSetMatrixParameterdc(Cg::Import::PCGparameter param, const System::PDouble matrix);
+extern "C" void __cdecl cgGLSetMatrixParameterfc(Cg::Import::PCGparameter param, const Winapi::Windows::PSingle matrix);
+extern "C" void __cdecl cgGLGetMatrixParameterdr(Cg::Import::PCGparameter param, System::PDouble matrix);
+extern "C" void __cdecl cgGLGetMatrixParameterfr(Cg::Import::PCGparameter param, Winapi::Windows::PSingle matrix);
+extern "C" void __cdecl cgGLGetMatrixParameterdc(Cg::Import::PCGparameter param, System::PDouble matrix);
+extern "C" void __cdecl cgGLGetMatrixParameterfc(Cg::Import::PCGparameter param, Winapi::Windows::PSingle matrix);
+extern "C" void __cdecl cgGLSetStateMatrixParameter(Cg::Import::PCGparameter param, unsigned matrix, unsigned transform);
+extern "C" void __cdecl cgGLSetMatrixParameterArrayfc(Cg::Import::PCGparameter param, int offset, int nelements, const Winapi::Windows::PSingle matrices);
+extern "C" void __cdecl cgGLSetMatrixParameterArrayfr(Cg::Import::PCGparameter param, int offset, int nelements, const Winapi::Windows::PSingle matrices);
+extern "C" void __cdecl cgGLSetMatrixParameterArraydc(Cg::Import::PCGparameter param, int offset, int nelements, const System::PDouble matrices);
+extern "C" void __cdecl cgGLSetMatrixParameterArraydr(Cg::Import::PCGparameter param, int offset, int nelements, const System::PDouble matrices);
+extern "C" void __cdecl cgGLGetMatrixParameterArrayfc(Cg::Import::PCGparameter param, int offset, int nelements, Winapi::Windows::PSingle matrices);
+extern "C" void __cdecl cgGLGetMatrixParameterArrayfr(Cg::Import::PCGparameter param, int offset, int nelements, Winapi::Windows::PSingle matrices);
+extern "C" void __cdecl cgGLGetMatrixParameterArraydc(Cg::Import::PCGparameter param, int offset, int nelements, System::PDouble matrices);
+extern "C" void __cdecl cgGLGetMatrixParameterArraydr(Cg::Import::PCGparameter param, int offset, int nelements, System::PDouble matrices);
+extern "C" void __cdecl cgGLSetTextureParameter(Cg::Import::PCGparameter param, unsigned texobj);
+extern "C" unsigned __cdecl cgGLGetTextureParameter(Cg::Import::PCGparameter param);
+extern "C" void __cdecl cgGLEnableTextureParameter(Cg::Import::PCGparameter param);
+extern "C" void __cdecl cgGLDisableTextureParameter(Cg::Import::PCGparameter param);
+extern "C" unsigned __cdecl cgGLGetTextureEnum(Cg::Import::PCGparameter param);
+extern "C" void __cdecl cgGLSetManageTextureParameters(Cg::Import::PCGcontext ctx, int flag);
+extern "C" int __cdecl cgGLGetManageTextureParameters(Cg::Import::PCGcontext ctx);
+}	/* namespace Gl */
+}	/* namespace Cg */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG_GL)
+using namespace Cg::Gl;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG)
+using namespace Cg;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cg_GlHPP

+ 257 - 0
include/Win32/Cg.Import.hpp

@@ -0,0 +1,257 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Cg.Import.pas' rev: 35.00 (Windows)
+
+#ifndef Cg_ImportHPP
+#define Cg_ImportHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cg
+{
+namespace Import
+{
+//-- forward type declarations -----------------------------------------------
+struct DECLSPEC_DRECORD _CGcontext
+{
+};
+
+
+struct DECLSPEC_DRECORD _CGprogram
+{
+};
+
+
+struct DECLSPEC_DRECORD _CGparameter
+{
+};
+
+
+//-- type declarations -------------------------------------------------------
+typedef char * PCharCG;
+
+typedef char * *PPCharCG;
+
+typedef System::AnsiString StringCG;
+
+typedef int TCGbool;
+
+typedef int CGbool;
+
+typedef _CGcontext *PCGcontext;
+
+typedef PCGcontext CGcontext;
+
+typedef _CGprogram *PCGprogram;
+
+typedef PCGprogram CGprogram;
+
+typedef _CGparameter *PCGparameter;
+
+typedef PCGparameter CGparameter;
+
+enum DECLSPEC_DENUM TCGtype : unsigned int { CG_UNKNOWN_TYPE, CG_STRUCT, CG_ARRAY, CG_TYPE_START_ENUM = 1024, CG_HALF, CG_HALF2, CG_HALF3, CG_HALF4, CG_HALF1x1, CG_HALF1x2, CG_HALF1x3, CG_HALF1x4, CG_HALF2x1, CG_HALF2x2, CG_HALF2x3, CG_HALF2x4, CG_HALF3x1, CG_HALF3x2, CG_HALF3x3, CG_HALF3x4, CG_HALF4x1, CG_HALF4x2, CG_HALF4x3, CG_HALF4x4, CG_FLOAT, CG_FLOAT2, CG_FLOAT3, CG_FLOAT4, CG_FLOAT1x1, CG_FLOAT1x2, CG_FLOAT1x3, CG_FLOAT1x4, CG_FLOAT2x1, CG_FLOAT2x2, CG_FLOAT2x3, CG_FLOAT2x4, CG_FLOAT3x1, CG_FLOAT3x2, CG_FLOAT3x3, CG_FLOAT3x4, CG_FLOAT4x1, CG_FLOAT4x2, CG_FLOAT4x3, CG_FLOAT4x4, CG_SAMPLER1D, CG_SAMPLER2D, CG_SAMPLER3D, CG_SAMPLERRECT, CG_SAMPLERCUBE, CG_FIXED, CG_FIXED2, CG_FIXED3, CG_FIXED4, CG_FIXED1x1, CG_FIXED1x2, CG_FIXED1x3, CG_FIXED1x4, 
+	CG_FIXED2x1, CG_FIXED2x2, CG_FIXED2x3, CG_FIXED2x4, CG_FIXED3x1, CG_FIXED3x2, CG_FIXED3x3, CG_FIXED3x4, CG_FIXED4x1, CG_FIXED4x2, CG_FIXED4x3, CG_FIXED4x4, CG_HALF1, CG_FLOAT1, CG_FIXED1, CG_INT, CG_INT1, CG_INT2, CG_INT3, CG_INT4, CG_INT1x1, CG_INT1x2, CG_INT1x3, CG_INT1x4, CG_INT2x1, CG_INT2x2, CG_INT2x3, CG_INT2x4, CG_INT3x1, CG_INT3x2, CG_INT3x3, CG_INT3x4, CG_INT4x1, CG_INT4x2, CG_INT4x3, CG_INT4x4, CG_BOOL, CG_BOOL1, CG_BOOL2, CG_BOOL3, CG_BOOL4, CG_BOOL1x1, CG_BOOL1x2, CG_BOOL1x3, CG_BOOL1x4, CG_BOOL2x1, CG_BOOL2x2, CG_BOOL2x3, CG_BOOL2x4, CG_BOOL3x1, CG_BOOL3x2, CG_BOOL3x3, CG_BOOL3x4, CG_BOOL4x1, CG_BOOL4x2, CG_BOOL4x3, CG_BOOL4x4 };
+
+typedef TCGtype CGtype;
+
+enum DECLSPEC_DENUM TCGresource : unsigned int { CG_TEXUNIT0 = 2048, CG_TEXUNIT1, CG_TEXUNIT2, CG_TEXUNIT3, CG_TEXUNIT4, CG_TEXUNIT5, CG_TEXUNIT6, CG_TEXUNIT7, CG_TEXUNIT8, CG_TEXUNIT9, CG_TEXUNIT10, CG_TEXUNIT11, CG_TEXUNIT12, CG_TEXUNIT13, CG_TEXUNIT14, CG_TEXUNIT15, CG_ATTR0 = 2113, CG_ATTR1, CG_ATTR2, CG_ATTR3, CG_ATTR4, CG_ATTR5, CG_ATTR6, CG_ATTR7, CG_ATTR8, CG_ATTR9, CG_ATTR10, CG_ATTR11, CG_ATTR12, CG_ATTR13, CG_ATTR14, CG_ATTR15, CG_C = 2178, CG_TEX0, CG_TEX1, CG_TEX2, CG_TEX3 = 2192, CG_TEX4, CG_TEX5, CG_TEX6, CG_TEX7, CG_HPOS = 2243, CG_COL0 = 2245, CG_COL1, CG_COL2, CG_COL3, CG_PSIZ = 2309, CG_WPOS = 2373, CG_POSITION0 = 2437, CG_POSITION1, CG_POSITION2, CG_POSITION3, CG_POSITION4, CG_POSITION5, CG_POSITION6, CG_POSITION7, CG_POSITION8, 
+	CG_POSITION9, CG_POSITION10, CG_POSITION11, CG_POSITION12, CG_POSITION13, CG_POSITION14, CG_POSITION15, CG_DIFFUSE0 = 2501, CG_TANGENT0 = 2565, CG_TANGENT1, CG_TANGENT2, CG_TANGENT3, CG_TANGENT4, CG_TANGENT5, CG_TANGENT6, CG_TANGENT7, CG_TANGENT8, CG_TANGENT9, CG_TANGENT10, CG_TANGENT11, CG_TANGENT12, CG_TANGENT13, CG_TANGENT14, CG_TANGENT15, CG_SPECULAR0 = 2629, CG_BLENDINDICES0 = 2693, CG_BLENDINDICES1, CG_BLENDINDICES2, CG_BLENDINDICES3, CG_BLENDINDICES4, CG_BLENDINDICES5, CG_BLENDINDICES6, CG_BLENDINDICES7, CG_BLENDINDICES8, CG_BLENDINDICES9, CG_BLENDINDICES10, CG_BLENDINDICES11, CG_BLENDINDICES12, CG_BLENDINDICES13, CG_BLENDINDICES14, CG_BLENDINDICES15, CG_COLOR0 = 2757, CG_COLOR1, CG_COLOR2, CG_COLOR3, CG_COLOR4, CG_COLOR5, CG_COLOR6, CG_COLOR7, 
+	CG_COLOR8, CG_COLOR9, CG_COLOR10, CG_COLOR11, CG_COLOR12, CG_COLOR13, CG_COLOR14, CG_COLOR15, CG_PSIZE0 = 2821, CG_PSIZE1, CG_PSIZE2, CG_PSIZE3, CG_PSIZE4, CG_PSIZE5, CG_PSIZE6, CG_PSIZE7, CG_PSIZE8, CG_PSIZE9, CG_PSIZE10, CG_PSIZE11, CG_PSIZE12, CG_PSIZE13, CG_PSIZE14, CG_PSIZE15, CG_BINORMAL0 = 2885, CG_BINORMAL1, CG_BINORMAL2, CG_BINORMAL3, CG_BINORMAL4, CG_BINORMAL5, CG_BINORMAL6, CG_BINORMAL7, CG_BINORMAL8, CG_BINORMAL9, CG_BINORMAL10, CG_BINORMAL11, CG_BINORMAL12, CG_BINORMAL13, CG_BINORMAL14, CG_BINORMAL15, CG_FOG0 = 2917, CG_FOG1, CG_FOG2, CG_FOG3, CG_FOG4, CG_FOG5, CG_FOG6, CG_FOG7, CG_FOG8, CG_FOG9, CG_FOG10, CG_FOG11, CG_FOG12, CG_FOG13, CG_FOG14, CG_FOG15, CG_DEPTH0, CG_DEPTH1, CG_DEPTH2, CG_DEPTH3, CG_DEPTH4, CG_DEPTH5, CG_DEPTH6, CG_DEPTH7, 
+	CG_DEPTH8, CG_DEPTH9 = 29542, CG_DEPTH10 = 2943, CG_DEPTH11, CG_DEPTH12, CG_DEPTH13, CG_DEPTH14, CG_DEPTH15, CG_SAMPLE0, CG_SAMPLE1, CG_SAMPLE2, CG_SAMPLE3, CG_SAMPLE4, CG_SAMPLE5, CG_SAMPLE6, CG_SAMPLE7, CG_SAMPLE8, CG_SAMPLE9, CG_SAMPLE10, CG_SAMPLE11, CG_SAMPLE12, CG_SAMPLE13, CG_SAMPLE14, CG_SAMPLE15, CG_BLENDWEIGHT0 = 3028, CG_BLENDWEIGHT1, CG_BLENDWEIGHT2, CG_BLENDWEIGHT3, CG_BLENDWEIGHT4, CG_BLENDWEIGHT5, CG_BLENDWEIGHT6, CG_BLENDWEIGHT7, CG_BLENDWEIGHT8, CG_BLENDWEIGHT9, CG_BLENDWEIGHT10, CG_BLENDWEIGHT11, CG_BLENDWEIGHT12, CG_BLENDWEIGHT13, CG_BLENDWEIGHT14, CG_BLENDWEIGHT15, CG_NORMAL0 = 3092, CG_NORMAL1, CG_NORMAL2, CG_NORMAL3, CG_NORMAL4, CG_NORMAL5, CG_NORMAL6, CG_NORMAL7, CG_NORMAL8, CG_NORMAL9, CG_NORMAL10, CG_NORMAL11, CG_NORMAL12, 
+	CG_NORMAL13, CG_NORMAL14, CG_NORMAL15, CG_FOGCOORD = 3156, CG_TEXCOORD0 = 3220, CG_TEXCOORD1, CG_TEXCOORD2, CG_TEXCOORD3, CG_TEXCOORD4, CG_TEXCOORD5, CG_TEXCOORD6, CG_TEXCOORD7, CG_TEXCOORD8, CG_TEXCOORD9, CG_TEXCOORD10, CG_TEXCOORD11, CG_TEXCOORD12, CG_TEXCOORD13, CG_TEXCOORD14, CG_TEXCOORD15, CG_COMBINER_CONST0 = 3284, CG_COMBINER_CONST1, CG_COMBINER_STAGE_CONST0, CG_COMBINER_STAGE_CONST1, CG_OFFSET_TEXTURE_MATRIX, CG_OFFSET_TEXTURE_SCALE, CG_OFFSET_TEXTURE_BIAS, CG_CONST_EYE, CG_TESSFACTOR = 3255, CG_UNDEFINED };
+
+typedef TCGresource CGresource;
+
+enum DECLSPEC_DENUM TCGprofile : unsigned int { CG_PROFILE_START = 6144, CG_PROFILE_UNKNOWN, CG_PROFILE_VP20, CG_PROFILE_FP20, CG_PROFILE_VP30, CG_PROFILE_FP30, CG_PROFILE_ARBVP1, CG_PROFILE_ARBFP1 = 7000, CG_PROFILE_VP40, CG_PROFILE_FP40 = 6151, CG_PROFILE_VS_1_1 = 6153, CG_PROFILE_VS_2_0, CG_PROFILE_VS_2_X, CG_PROFILE_PS_1_1 = 6159, CG_PROFILE_PS_1_2, CG_PROFILE_PS_1_3, CG_PROFILE_PS_2_0, CG_PROFILE_PS_2_X, CG_PROFILE_MAX = 7100 };
+
+typedef TCGprofile CGprofile;
+
+typedef unsigned *PCGerror;
+
+typedef unsigned TCGerror;
+
+typedef unsigned CGerror;
+
+enum DECLSPEC_DENUM TCGenum : unsigned int { CG_UNKNOWN = 4096, CG_IN, CG_OUT, CG_INOUT, CG_MIXED, CG_VARYING, CG_UNIFORM, CG_CONSTANT, CG_PROGRAM_SOURCE, CG_PROGRAM_ENTRY, CG_COMPILED_PROGRAM, CG_PROGRAM_PROFILE, CG_GLOBAL, CG_PROGRAM, CG_DEFAULT, CG_ERROR, CG_SOURCE, CG_OBJECT, CG_COMPILE_MANUAL, CG_COMPILE_IMMEDIATE, CG_COMPILE_LAZY, CG_CURRENT, CG_LITERAL, CG_VERSION };
+
+typedef TCGenum CGenum;
+
+typedef void __cdecl (*TCGerrorCallbackFunc)(void);
+
+typedef TCGerrorCallbackFunc CGerrorCallbackFunc;
+
+//-- var, const, procedure ---------------------------------------------------
+#define CgLibrary L"cg.dll"
+static const System::Int8 CG_VERSION_1_2 = System::Int8(0x1);
+static const System::Word CG_VERSION_NUM = System::Word(0x4b0);
+static const int CG_FALSE = int(0);
+static const int CG_TRUE = int(1);
+static const System::Int8 CG_NO_ERROR = System::Int8(0x0);
+static const System::Int8 CG_COMPILER_ERROR = System::Int8(0x1);
+static const System::Int8 CG_INVALID_PARAMETER_ERROR = System::Int8(0x2);
+static const System::Int8 CG_INVALID_PROFILE_ERROR = System::Int8(0x3);
+static const System::Int8 CG_PROGRAM_LOAD_ERROR = System::Int8(0x4);
+static const System::Int8 CG_PROGRAM_BIND_ERROR = System::Int8(0x5);
+static const System::Int8 CG_PROGRAM_NOT_LOADED_ERROR = System::Int8(0x6);
+static const System::Int8 CG_UNSUPPORTED_GL_EXTENSION_ERROR = System::Int8(0x7);
+static const System::Int8 CG_INVALID_VALUE_TYPE_ERROR = System::Int8(0x8);
+static const System::Int8 CG_NOT_MATRIX_PARAM_ERROR = System::Int8(0x9);
+static const System::Int8 CG_INVALID_ENUMERANT_ERROR = System::Int8(0xa);
+static const System::Int8 CG_NOT_4x4_MATRIX_ERROR = System::Int8(0xb);
+static const System::Int8 CG_FILE_READ_ERROR = System::Int8(0xc);
+static const System::Int8 CG_FILE_WRITE_ERROR = System::Int8(0xd);
+static const System::Int8 CG_NVPARSE_ERROR = System::Int8(0xe);
+static const System::Int8 CG_MEMORY_ALLOC_ERROR = System::Int8(0xf);
+static const System::Int8 CG_INVALID_CONTEXT_HANDLE_ERROR = System::Int8(0x10);
+static const System::Int8 CG_INVALID_PROGRAM_HANDLE_ERROR = System::Int8(0x11);
+static const System::Int8 CG_INVALID_PARAM_HANDLE_ERROR = System::Int8(0x12);
+static const System::Int8 CG_UNKNOWN_PROFILE_ERROR = System::Int8(0x13);
+static const System::Int8 CG_VAR_ARG_ERROR = System::Int8(0x14);
+static const System::Int8 CG_INVALID_DIMENSION_ERROR = System::Int8(0x15);
+static const System::Int8 CG_ARRAY_PARAM_ERROR = System::Int8(0x16);
+static const System::Int8 CG_OUT_OF_ARRAY_BOUNDS_ERROR = System::Int8(0x17);
+static const System::Int8 CG_CONFLICTING_TYPES_ERROR = System::Int8(0x18);
+static const System::Int8 CG_CONFLICTING_PARAMETER_TYPES_ERROR = System::Int8(0x19);
+static const System::Int8 CG_PARAMETER_IS_NOT_SHARED_ERROR = System::Int8(0x1a);
+static const System::Int8 CG_INVALID_PARAMETER_VARIABILITY_ERROR = System::Int8(0x1b);
+static const System::Int8 CG_CANNOT_DESTROY_PARAMETER_ERROR = System::Int8(0x1c);
+static const System::Int8 CG_NOT_ROOT_PARAMETER_ERROR = System::Int8(0x1d);
+static const System::Int8 CG_PARAMETERS_DO_NOT_MATCH_ERROR = System::Int8(0x1e);
+static const System::Int8 CG_IS_NOT_PROGRAM_PARAMETER_ERROR = System::Int8(0x1f);
+static const System::Int8 CG_INVALID_PARAMETER_TYPE_ERROR = System::Int8(0x20);
+static const System::Int8 CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR = System::Int8(0x21);
+static const System::Int8 CG_INVALID_SIZE_ERROR = System::Int8(0x22);
+static const System::Int8 CG_BIND_CREATES_CYCLE_ERROR = System::Int8(0x23);
+static const System::Int8 CG_ARRAY_TYPES_DO_NOT_MATCH_ERROR = System::Int8(0x24);
+static const System::Int8 CG_ARRAY_DIMENSIONS_DO_NOT_MATCH_ERROR = System::Int8(0x25);
+static const System::Int8 CG_ARRAY_HAS_WRONG_DIMENSION_ERROR = System::Int8(0x26);
+static const System::Int8 CG_TYPE_IS_NOT_DEFINED_IN_PROGRAM_ERROR = System::Int8(0x27);
+extern "C" PCGcontext __cdecl cgCreateContext(void);
+extern "C" void __cdecl cgDestroyContext(PCGcontext ctx);
+extern "C" int __cdecl cgIsContext(PCGcontext ctx);
+extern "C" System::WideChar * __cdecl cgGetLastListing(PCGcontext ctx);
+extern "C" void __cdecl cgSetAutoCompile(PCGcontext ctx, TCGenum flag);
+extern "C" PCGprogram __cdecl cgCreateProgram(PCGcontext ctx, TCGenum program_type, const char * _program, TCGprofile profile, const char * entry, const PPCharCG args);
+extern "C" PCGprogram __cdecl cgCreateProgramFromFile(PCGcontext ctx, TCGenum program_type, const char * program_file, TCGprofile profile, const char * entry, const PPCharCG args);
+extern "C" PCGprogram __cdecl cgCopyProgram(PCGprogram _program);
+extern "C" void __cdecl cgDestroyProgram(PCGprogram _program);
+extern "C" PCGprogram __cdecl cgGetFirstProgram(PCGcontext ctx);
+extern "C" PCGprogram __cdecl cgGetNextProgram(PCGprogram current);
+extern "C" PCGcontext __cdecl cgGetProgramContext(PCGprogram prog);
+extern "C" int __cdecl cgIsProgram(PCGprogram _program);
+extern "C" void __cdecl cgCompileProgram(PCGprogram _program);
+extern "C" int __cdecl cgIsProgramCompiled(PCGprogram _program);
+extern "C" char * __cdecl cgGetProgramString(PCGprogram prog, TCGenum pname);
+extern "C" TCGprofile __cdecl cgGetProgramProfile(PCGprogram prog);
+extern "C" PCGparameter __cdecl cgCreateParameter(PCGcontext ctx, TCGtype type_);
+extern "C" PCGparameter __cdecl cgCreateParameterArray(PCGcontext ctx, TCGtype type_, int length);
+extern "C" PCGparameter __cdecl cgCreateParameterMultiDimArray(PCGcontext ctx, TCGtype type_, int dim, const System::PInteger lengths);
+extern "C" void __cdecl cgDestroyParameter(PCGparameter param);
+extern "C" void __cdecl cgConnectParameter(PCGparameter from, PCGparameter to_);
+extern "C" void __cdecl cgDisconnectParameter(PCGparameter param);
+extern "C" PCGparameter __cdecl cgGetConnectedParameter(PCGparameter param);
+extern "C" int __cdecl cgGetNumConnectedToParameters(PCGparameter param);
+extern "C" PCGparameter __cdecl cgGetConnectedToParameter(PCGparameter param, int index);
+extern "C" PCGparameter __cdecl cgGetNamedParameter(PCGprogram prog, const char * name);
+extern "C" PCGparameter __cdecl cgGetNamedProgramParameter(PCGprogram prog, TCGenum name_space, const char * name);
+extern "C" PCGparameter __cdecl cgGetFirstParameter(PCGprogram prog, TCGenum name_space);
+extern "C" PCGparameter __cdecl cgGetNextParameter(PCGparameter current);
+extern "C" PCGparameter __cdecl cgGetFirstLeafParameter(PCGprogram prog, TCGenum name_space);
+extern "C" PCGparameter __cdecl cgGetNextLeafParameter(PCGparameter current);
+extern "C" PCGparameter __cdecl cgGetFirstStructParameter(PCGparameter param);
+extern "C" PCGparameter __cdecl cgGetNamedStructParameter(PCGparameter param, const char * name);
+extern "C" PCGparameter __cdecl cgGetFirstDependentParameter(PCGparameter param);
+extern "C" PCGparameter __cdecl cgGetArrayParameter(PCGparameter aparam, int index);
+extern "C" int __cdecl cgGetArrayDimension(PCGparameter param);
+extern "C" TCGtype __cdecl cgGetArrayType(PCGparameter param);
+extern "C" int __cdecl cgGetArraySize(PCGparameter param, int dimension);
+extern "C" void __cdecl cgSetArraySize(PCGparameter param, int size);
+extern "C" void __cdecl cgSetMultiDimArraySize(PCGparameter param, const System::PInteger sizes);
+extern "C" PCGprogram __cdecl cgGetParameterProgram(PCGparameter param);
+extern "C" PCGcontext __cdecl cgGetParameterContext(PCGparameter param);
+extern "C" int __cdecl cgIsParameter(PCGparameter param);
+extern "C" char * __cdecl cgGetParameterName(PCGparameter param);
+extern "C" TCGtype __cdecl cgGetParameterType(PCGparameter param);
+extern "C" TCGtype __cdecl cgGetParameterNamedType(PCGparameter param);
+extern "C" char * __cdecl cgGetParameterSemantic(PCGparameter param);
+extern "C" TCGresource __cdecl cgGetParameterResource(PCGparameter param);
+extern "C" TCGresource __cdecl cgGetParameterBaseResource(PCGparameter param);
+extern "C" unsigned __cdecl cgGetParameterResourceIndex(PCGparameter param);
+extern "C" TCGenum __cdecl cgGetParameterVariability(PCGparameter param);
+extern "C" TCGenum __cdecl cgGetParameterDirection(PCGparameter param);
+extern "C" int __cdecl cgIsParameterReferenced(PCGparameter param);
+extern "C" System::PDouble __cdecl cgGetParameterValues(PCGparameter param, TCGenum value_type, /* out */ int &nvalues);
+extern "C" int __cdecl cgGetParameterOrdinalNumber(PCGparameter param);
+extern "C" int __cdecl cgIsParameterGlobal(PCGparameter param);
+extern "C" int __cdecl cgGetParameterIndex(PCGparameter param);
+extern "C" void __cdecl cgSetParameterVariability(PCGparameter param, TCGenum vary);
+extern "C" void __cdecl cgSetParameterSemantic(PCGparameter param, const char * semantic);
+extern "C" void __cdecl cgSetParameter1f(PCGparameter param, float x);
+extern "C" void __cdecl cgSetParameter2f(PCGparameter param, float x, float y);
+extern "C" void __cdecl cgSetParameter3f(PCGparameter param, float x, float y, float z);
+extern "C" void __cdecl cgSetParameter4f(PCGparameter param, float x, float y, float z, float w);
+extern "C" void __cdecl cgSetParameter1d(PCGparameter param, double x);
+extern "C" void __cdecl cgSetParameter2d(PCGparameter param, double x, double y);
+extern "C" void __cdecl cgSetParameter3d(PCGparameter param, double x, double y, double z);
+extern "C" void __cdecl cgSetParameter4d(PCGparameter param, double x, double y, double z, double w);
+extern "C" void __cdecl cgSetParameter1fv(PCGparameter param, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgSetParameter2fv(PCGparameter param, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgSetParameter3fv(PCGparameter param, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgSetParameter4fv(PCGparameter param, const Winapi::Windows::PSingle v);
+extern "C" void __cdecl cgSetParameter1dv(PCGparameter param, const System::PDouble x);
+extern "C" void __cdecl cgSetParameter2dv(PCGparameter param, const System::PDouble x);
+extern "C" void __cdecl cgSetParameter3dv(PCGparameter param, const System::PDouble x);
+extern "C" void __cdecl cgSetParameter4dv(PCGparameter param, const System::PDouble x);
+extern "C" void __cdecl cgSetMatrixParameterdr(PCGparameter param, const System::PDouble matrix);
+extern "C" void __cdecl cgSetMatrixParameterfr(PCGparameter param, const Winapi::Windows::PSingle matrix);
+extern "C" void __cdecl cgSetMatrixParameterdc(PCGparameter param, const System::PDouble matrix);
+extern "C" void __cdecl cgSetMatrixParameterfc(PCGparameter param, const Winapi::Windows::PSingle matrix);
+extern "C" char * __cdecl cgGetTypeString(TCGtype _type);
+extern "C" TCGtype __cdecl cgGetType(const char * type_string);
+extern "C" TCGtype __cdecl cgGetNamedUserType(PCGprogram program_, const char * name);
+extern "C" int __cdecl cgGetNumUserTypes(PCGprogram program_);
+extern "C" TCGtype __cdecl cgGetUserType(PCGprogram program_, int index);
+extern "C" int __cdecl cgGetNumParentTypes(TCGtype type_);
+extern "C" TCGtype __cdecl cgGetParentType(TCGtype type_, int index);
+extern "C" int __cdecl cgIsParentType(TCGtype parent, TCGtype child);
+extern "C" int __cdecl cgIsInterfaceType(TCGtype type_);
+extern "C" char * __cdecl cgGetResourceString(TCGresource resource);
+extern "C" TCGresource __cdecl cgGetResource(const char * resource_string);
+extern "C" char * __cdecl cgGetEnumString(TCGenum en);
+extern "C" TCGenum __cdecl cgGetEnum(const char * enum_string);
+extern "C" char * __cdecl cgGetProfileString(TCGprofile profile);
+extern "C" TCGprofile __cdecl cgGetProfile(const char * profile_string);
+extern "C" unsigned __cdecl cgGetError(void);
+extern "C" char * __cdecl cgGetErrorString(unsigned error);
+extern "C" char * __cdecl cgGetLastErrorString(PCGerror error);
+extern "C" void __cdecl cgSetErrorCallback(TCGerrorCallbackFunc func);
+extern "C" TCGerrorCallbackFunc __cdecl cgGetErrorCallback(void);
+extern "C" char * __cdecl cgGetString(TCGenum sname);
+extern "C" PCGparameter __cdecl cgGetNextParameter_depr1_1(PCGparameter current);
+extern "C" PCGparameter __cdecl cgGetNextLeafParameter_depr1_1(PCGparameter current);
+}	/* namespace Import */
+}	/* namespace Cg */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG_IMPORT)
+using namespace Cg::Import;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG)
+using namespace Cg;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cg_ImportHPP

+ 111 - 0
include/Win32/Cg.PostTransformationShader.hpp

@@ -0,0 +1,111 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Cg.PostTransformationShader.pas' rev: 35.00 (Windows)
+
+#ifndef Cg_PosttransformationshaderHPP
+#define Cg_PosttransformationshaderHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.Texture.hpp>
+#include <GLS.Cadencer.hpp>
+#include <GLS.Context.hpp>
+#include <GLS.Scene.hpp>
+#include <GLS.RenderContextInfo.hpp>
+#include <GLS.TextureFormat.hpp>
+#include <Cg.Import.hpp>
+#include <Cg.GL.hpp>
+#include <Cg.Shader.hpp>
+#include <GLSL.CustomShader.hpp>
+#include <GLS.Material.hpp>
+#include <GLS.BaseClasses.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cg
+{
+namespace Posttransformationshader
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLCustomCGPostTransformationShader;
+class DELPHICLASS TGLCGPostTransformationShader;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLCustomCGPostTransformationShader : public Cg::Shader::TCustomCgShader
+{
+	typedef Cg::Shader::TCustomCgShader inherited;
+	
+private:
+	float FTransformationPower;
+	Gls::Texture::TGLTexture* FTransformationTexture;
+	
+protected:
+	virtual void __fastcall DoApply(Gls::Rendercontextinfo::TGLRenderContextInfo &rci, System::TObject* Sender);
+	void __fastcall DoUseTempTexture(Gls::Context::TGLTextureHandle* const TempTexture, Gls::Textureformat::TGLTextureTarget TextureTarget);
+	Gls::Textureformat::TGLTextureTarget __fastcall GetTextureTarget();
+	
+public:
+	__fastcall virtual TGLCustomCGPostTransformationShader(System::Classes::TComponent* AOwner);
+	__property float TransformationPower = {read=FTransformationPower, write=FTransformationPower};
+	__property Gls::Texture::TGLTexture* TransformationTexture = {read=FTransformationTexture, write=FTransformationTexture};
+public:
+	/* TCustomCgShader.Destroy */ inline __fastcall virtual ~TGLCustomCGPostTransformationShader() { }
+	
+private:
+	void *__IGLPostShader;	// Glsl::Customshader::IGLPostShader 
+	
+public:
+	#if defined(MANAGED_INTERFACE_OPERATORS)
+	// {68A62362-AF0A-4CE8-A9E1-714FE02AFA4A}
+	operator Glsl::Customshader::_di_IGLPostShader()
+	{
+		Glsl::Customshader::_di_IGLPostShader intf;
+		this->GetInterface(intf);
+		return intf;
+	}
+	#else
+	operator Glsl::Customshader::IGLPostShader*(void) { return (Glsl::Customshader::IGLPostShader*)&__IGLPostShader; }
+	#endif
+	
+};
+
+
+class PASCALIMPLEMENTATION TGLCGPostTransformationShader : public TGLCustomCGPostTransformationShader
+{
+	typedef TGLCustomCGPostTransformationShader inherited;
+	
+__published:
+	__property TransformationPower = {default=0};
+	__property TransformationTexture;
+public:
+	/* TGLCustomCGPostTransformationShader.Create */ inline __fastcall virtual TGLCGPostTransformationShader(System::Classes::TComponent* AOwner) : TGLCustomCGPostTransformationShader(AOwner) { }
+	
+public:
+	/* TCustomCgShader.Destroy */ inline __fastcall virtual ~TGLCGPostTransformationShader() { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Posttransformationshader */
+}	/* namespace Cg */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG_POSTTRANSFORMATIONSHADER)
+using namespace Cg::Posttransformationshader;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG)
+using namespace Cg;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cg_PosttransformationshaderHPP

+ 51 - 0
include/Win32/Cg.Register.hpp

@@ -0,0 +1,51 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Cg.Register.pas' rev: 35.00 (Windows)
+
+#ifndef Cg_RegisterHPP
+#define Cg_RegisterHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <DesignIntf.hpp>
+#include <DesignEditors.hpp>
+#include <VCLEditors.hpp>
+#include <GLS.Material.hpp>
+#include <Cg.Import.hpp>
+#include <Cg.GL.hpp>
+#include <GLS.SceneRegister.hpp>
+#include <Cg.Shader.hpp>
+#include <Cg.BombShader.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cg
+{
+namespace Register
+{
+//-- forward type declarations -----------------------------------------------
+//-- type declarations -------------------------------------------------------
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE void __fastcall Register(void);
+}	/* namespace Register */
+}	/* namespace Cg */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG_REGISTER)
+using namespace Cg::Register;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG)
+using namespace Cg;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cg_RegisterHPP

+ 369 - 0
include/Win32/Cg.Shader.hpp

@@ -0,0 +1,369 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Cg.Shader.pas' rev: 35.00 (Windows)
+
+#ifndef Cg_ShaderHPP
+#define Cg_ShaderHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.OpenGL.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.OpenGLTokens.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.VectorLists.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.Texture.hpp>
+#include <GLS.Strings.hpp>
+#include <GLS.Cadencer.hpp>
+#include <GLS.Context.hpp>
+#include <GLS.BaseClasses.hpp>
+#include <GLS.RenderContextInfo.hpp>
+#include <GLS.Material.hpp>
+#include <GLS.TextureFormat.hpp>
+#include <Cg.Import.hpp>
+#include <Cg.GL.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Cg
+{
+namespace Shader
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS ECgShaderException;
+class DELPHICLASS TCgProgram;
+class DELPHICLASS TCgParameter;
+class DELPHICLASS TCgVertexProgram;
+class DELPHICLASS TCgFragmentProgram;
+class DELPHICLASS TCustomCgShader;
+class DELPHICLASS TCadencableCustomCgShader;
+class DELPHICLASS TCgShader;
+//-- type declarations -------------------------------------------------------
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION ECgShaderException : public Gls::Texture::EGLShaderException
+{
+	typedef Gls::Texture::EGLShaderException inherited;
+	
+public:
+	/* Exception.Create */ inline __fastcall ECgShaderException(const System::UnicodeString Msg) : Gls::Texture::EGLShaderException(Msg) { }
+	/* Exception.CreateFmt */ inline __fastcall ECgShaderException(const System::UnicodeString Msg, const System::TVarRec *Args, const int Args_High) : Gls::Texture::EGLShaderException(Msg, Args, Args_High) { }
+	/* Exception.CreateRes */ inline __fastcall ECgShaderException(NativeUInt Ident)/* overload */ : Gls::Texture::EGLShaderException(Ident) { }
+	/* Exception.CreateRes */ inline __fastcall ECgShaderException(System::PResStringRec ResStringRec)/* overload */ : Gls::Texture::EGLShaderException(ResStringRec) { }
+	/* Exception.CreateResFmt */ inline __fastcall ECgShaderException(NativeUInt Ident, const System::TVarRec *Args, const int Args_High)/* overload */ : Gls::Texture::EGLShaderException(Ident, Args, Args_High) { }
+	/* Exception.CreateResFmt */ inline __fastcall ECgShaderException(System::PResStringRec ResStringRec, const System::TVarRec *Args, const int Args_High)/* overload */ : Gls::Texture::EGLShaderException(ResStringRec, Args, Args_High) { }
+	/* Exception.CreateHelp */ inline __fastcall ECgShaderException(const System::UnicodeString Msg, int AHelpContext) : Gls::Texture::EGLShaderException(Msg, AHelpContext) { }
+	/* Exception.CreateFmtHelp */ inline __fastcall ECgShaderException(const System::UnicodeString Msg, const System::TVarRec *Args, const int Args_High, int AHelpContext) : Gls::Texture::EGLShaderException(Msg, Args, Args_High, AHelpContext) { }
+	/* Exception.CreateResHelp */ inline __fastcall ECgShaderException(NativeUInt Ident, int AHelpContext)/* overload */ : Gls::Texture::EGLShaderException(Ident, AHelpContext) { }
+	/* Exception.CreateResHelp */ inline __fastcall ECgShaderException(System::PResStringRec ResStringRec, int AHelpContext)/* overload */ : Gls::Texture::EGLShaderException(ResStringRec, AHelpContext) { }
+	/* Exception.CreateResFmtHelp */ inline __fastcall ECgShaderException(System::PResStringRec ResStringRec, const System::TVarRec *Args, const int Args_High, int AHelpContext)/* overload */ : Gls::Texture::EGLShaderException(ResStringRec, Args, Args_High, AHelpContext) { }
+	/* Exception.CreateResFmtHelp */ inline __fastcall ECgShaderException(NativeUInt Ident, const System::TVarRec *Args, const int Args_High, int AHelpContext)/* overload */ : Gls::Texture::EGLShaderException(Ident, Args, Args_High, AHelpContext) { }
+	/* Exception.Destroy */ inline __fastcall virtual ~ECgShaderException() { }
+	
+};
+
+#pragma pack(pop)
+
+typedef void __fastcall (__closure *TCgApplyEvent)(TCgProgram* CgProgram, System::TObject* Sender);
+
+typedef void __fastcall (__closure *TCgUnApplyEvent)(TCgProgram* CgProgram);
+
+typedef void __fastcall (__closure *TCgShaderEvent)(TCustomCgShader* CgShader);
+
+enum DECLSPEC_DENUM TcgProgramType : unsigned char { ptVertex, ptFragment };
+
+enum DECLSPEC_DENUM TCgVPProfile : unsigned char { vpDetectLatest, vp20, vp30, vp40, arbvp1 };
+
+enum DECLSPEC_DENUM TCgFPProfile : unsigned char { fpDetectLatest, fp20, fp30, fp40, arbfp1 };
+
+enum DECLSPEC_DENUM TPrecisionSetting : unsigned char { psFull, psFast };
+
+class PASCALIMPLEMENTATION TCgProgram : public Gls::Baseclasses::TGLUpdateAbleObject
+{
+	typedef Gls::Baseclasses::TGLUpdateAbleObject inherited;
+	
+private:
+	Cg::Import::_CGcontext *FCgContext;
+	System::Classes::TStrings* FCode;
+	System::UnicodeString FProgramName;
+	Cg::Import::_CGprogram *FHandle;
+	System::Classes::TList* FParams;
+	TCgApplyEvent FOnApply;
+	TCgUnApplyEvent FOnUnApply;
+	System::Classes::TNotifyEvent FOnProgramChanged;
+	bool FEnabled;
+	bool FDetectProfile;
+	TPrecisionSetting FPrecision;
+	void __fastcall SetPrecision(const TPrecisionSetting Value);
+	bool __fastcall GetManualNotification();
+	void __fastcall SetManualNotification(const bool Value);
+	
+protected:
+	TcgProgramType FProgramType;
+	Cg::Import::TCGprofile FProfile;
+	void __fastcall SetCode(System::Classes::TStrings* const val);
+	void __fastcall SetProgramName(const System::UnicodeString val);
+	TCgParameter* __fastcall GetParam(System::UnicodeString index);
+	void __fastcall AddParamsItem(const Cg::Import::PCGparameter Param);
+	void __fastcall BuildParamsList();
+	void __fastcall ClearParamsList();
+	
+public:
+	__fastcall virtual TCgProgram(System::Classes::TPersistent* AOwner);
+	__fastcall virtual ~TCgProgram();
+	virtual Cg::Import::TCGprofile __fastcall GetLatestProfile() = 0 ;
+	virtual void __fastcall Initialize();
+	void __fastcall Finalize();
+	void __fastcall Apply(Gls::Rendercontextinfo::TGLRenderContextInfo &rci, System::TObject* Sender);
+	void __fastcall UnApply(Gls::Rendercontextinfo::TGLRenderContextInfo &rci);
+	TCgParameter* __fastcall ParamByName(const System::UnicodeString name);
+	__property TCgParameter* Param[System::UnicodeString index] = {read=GetParam};
+	__property System::Classes::TList* Params = {read=FParams};
+	Cg::Import::PCGparameter __fastcall DirectParamByName(const System::UnicodeString name);
+	int __fastcall ParamCount();
+	System::UnicodeString __fastcall GetProfileStringA();
+	void __fastcall LoadFromFile(const System::UnicodeString fileName);
+	void __fastcall ListCompilation(System::Classes::TStrings* Output);
+	void __fastcall ListParameters(System::Classes::TStrings* Output);
+	void __fastcall SetParam(System::UnicodeString ParamName, float SingleVal)/* overload */;
+	void __fastcall SetParam(System::UnicodeString ParamName, const Gls::Vectortypes::TVector2f &Vector2fVal)/* overload */;
+	void __fastcall SetParam(System::UnicodeString ParamName, const Gls::Vectortypes::TVector3f &Vector3fVal)/* overload */;
+	void __fastcall SetParam(System::UnicodeString ParamName, const Gls::Vectortypes::TVector4f &Vector4fVal)/* overload */;
+	void __fastcall SetStateMatrix(System::UnicodeString ParamName, unsigned matrix, unsigned Transform);
+	void __fastcall SetTexture(System::UnicodeString ParamName, unsigned TextureID);
+	System::UnicodeString __fastcall LongName();
+	__property Cg::Import::TCGprofile DirectProfile = {read=FProfile, write=FProfile, nodefault};
+	__property System::Classes::TNotifyEvent OnProgramChanged = {read=FOnProgramChanged, write=FOnProgramChanged};
+	__property bool ManualNotification = {read=GetManualNotification, write=SetManualNotification, default=0};
+	
+__published:
+	__property System::Classes::TStrings* Code = {read=FCode, write=SetCode};
+	__property System::UnicodeString ProgramName = {read=FProgramName, write=SetProgramName};
+	__property bool Enabled = {read=FEnabled, write=FEnabled, default=1};
+	__property TPrecisionSetting Precision = {read=FPrecision, write=SetPrecision, default=0};
+	__property TCgApplyEvent OnApply = {read=FOnApply, write=FOnApply};
+	__property TCgUnApplyEvent OnUnApply = {read=FOnUnApply, write=FOnUnApply};
+};
+
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TCgParameter : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+private:
+	TCgProgram* FOwner;
+	System::UnicodeString FName;
+	Cg::Import::_CGparameter *FHandle;
+	Cg::Import::TCGtype FValueType;
+	Cg::Import::TCGenum FDirection;
+	Cg::Import::TCGenum FVariability;
+	
+protected:
+	System::UnicodeString __fastcall TypeMismatchMessage();
+	void __fastcall CheckValueType(Cg::Import::TCGtype aType)/* overload */;
+	void __fastcall CheckValueType(const Cg::Import::TCGtype *types, const int types_High)/* overload */;
+	void __fastcall CheckAllTextureTypes();
+	void __fastcall CheckAllScalarTypes();
+	void __fastcall CheckAllVector2fTypes();
+	void __fastcall CheckAllVector3fTypes();
+	void __fastcall CheckAllVector4fTypes();
+	void __fastcall SetAsVector2f(const Gls::Vectortypes::TVector2f &val);
+	void __fastcall SetAsVector3f(const Gls::Vectortypes::TVector3f &val);
+	void __fastcall SetAsVector4f(const Gls::Vectortypes::TVector4f &val);
+	
+public:
+	__fastcall virtual TCgParameter();
+	__fastcall virtual ~TCgParameter();
+	void __fastcall SetAsScalar(const float val)/* overload */;
+	void __fastcall SetAsScalar(const bool val)/* overload */;
+	void __fastcall SetAsVector(const Gls::Vectortypes::TVector2f &val)/* overload */;
+	void __fastcall SetAsVector(const Gls::Vectortypes::TVector3f &val)/* overload */;
+	void __fastcall SetAsVector(const Gls::Vectortypes::TVector4f &val)/* overload */;
+	void __fastcall SetAsVector(const float *val, const int val_High)/* overload */;
+	void __fastcall SetAsStateMatrix(unsigned matrix, unsigned Transform);
+	void __fastcall SetAsMatrix(const Gls::Vectortypes::TMatrix4f &val);
+	void __fastcall SetAsTexture(unsigned TextureID);
+	void __fastcall SetAsTexture1D(unsigned TextureID);
+	void __fastcall SetAsTexture2D(unsigned TextureID);
+	void __fastcall SetAsTexture3D(unsigned TextureID);
+	void __fastcall SetAsTextureCUBE(unsigned TextureID);
+	void __fastcall SetAsTextureRECT(unsigned TextureID);
+	void __fastcall SetToTextureOf(Gls::Material::TGLLibMaterial* LibMaterial);
+	void __fastcall EnableTexture();
+	void __fastcall DisableTexture();
+	void __fastcall SetParameterPointer(Gls::Vectorlists::TGLVectorList* Values)/* overload */;
+	void __fastcall SetParameterPointer(Gls::Vectorlists::TGLAffineVectorList* Values)/* overload */;
+	void __fastcall EnableClientState();
+	void __fastcall DisableClientState();
+	System::UnicodeString __fastcall LongName();
+	__property TCgProgram* Owner = {read=FOwner};
+	__property System::UnicodeString Name = {read=FName};
+	__property Cg::Import::TCGtype ValueType = {read=FValueType, nodefault};
+	__property Cg::Import::PCGparameter Handle = {read=FHandle, write=FHandle};
+	__property Cg::Import::TCGenum Direction = {read=FDirection, write=FDirection, nodefault};
+	__property Cg::Import::TCGenum Variability = {read=FVariability, write=FVariability, nodefault};
+	__property Gls::Vectortypes::TVector4f AsVector = {write=SetAsVector4f};
+	__property Gls::Vectortypes::TVector3f AsAffineVector = {write=SetAsVector3f};
+	__property Gls::Vectortypes::TVector2f AsVector2f = {write=SetAsVector2f};
+};
+
+#pragma pack(pop)
+
+class PASCALIMPLEMENTATION TCgVertexProgram : public TCgProgram
+{
+	typedef TCgProgram inherited;
+	
+private:
+	TCgVPProfile FVPProfile;
+	void __fastcall SetVPProfile(TCgVPProfile v);
+	
+public:
+	__fastcall virtual TCgVertexProgram(System::Classes::TPersistent* AOwner);
+	virtual Cg::Import::TCGprofile __fastcall GetLatestProfile();
+	
+__published:
+	__property TCgVPProfile Profile = {read=FVPProfile, write=SetVPProfile, default=0};
+public:
+	/* TCgProgram.Destroy */ inline __fastcall virtual ~TCgVertexProgram() { }
+	
+};
+
+
+class PASCALIMPLEMENTATION TCgFragmentProgram : public TCgProgram
+{
+	typedef TCgProgram inherited;
+	
+private:
+	TCgFPProfile FFPProfile;
+	bool FManageTexture;
+	void __fastcall SetFPProfile(TCgFPProfile v);
+	void __fastcall SetManageTexture(const bool Value);
+	
+public:
+	__fastcall virtual TCgFragmentProgram(System::Classes::TPersistent* AOwner);
+	virtual void __fastcall Initialize();
+	virtual Cg::Import::TCGprofile __fastcall GetLatestProfile();
+	
+__published:
+	__property TCgFPProfile Profile = {read=FFPProfile, write=SetFPProfile, default=0};
+	__property bool ManageTexture = {read=FManageTexture, write=SetManageTexture, default=0};
+public:
+	/* TCgProgram.Destroy */ inline __fastcall virtual ~TCgFragmentProgram() { }
+	
+};
+
+
+class PASCALIMPLEMENTATION TCustomCgShader : public Gls::Material::TGLShader
+{
+	typedef Gls::Material::TGLShader inherited;
+	
+private:
+	TCgVertexProgram* FVertexProgram;
+	TCgFragmentProgram* FFragmentProgram;
+	TCgShaderEvent FOnInitialize;
+	bool FDesignEnable;
+	
+protected:
+	void __fastcall SetVertexProgram(TCgVertexProgram* const val);
+	void __fastcall SetOnApplyVertexProgram(const TCgApplyEvent val);
+	TCgApplyEvent __fastcall GetOnApplyVertexProgram();
+	void __fastcall SetOnUnApplyVertexProgram(const TCgUnApplyEvent val);
+	TCgUnApplyEvent __fastcall GetOnUnApplyVertexProgram();
+	void __fastcall SetFragmentProgram(TCgFragmentProgram* const val);
+	void __fastcall SetOnApplyFragmentProgram(const TCgApplyEvent val);
+	TCgApplyEvent __fastcall GetOnApplyFragmentProgram();
+	void __fastcall SetOnUnApplyFragmentProgram(const TCgUnApplyEvent val);
+	TCgUnApplyEvent __fastcall GetOnUnApplyFragmentProgram();
+	TCgShaderEvent __fastcall GetOnInitialize();
+	void __fastcall SetOnInitialize(const TCgShaderEvent val);
+	virtual void __fastcall DoInitialize(Gls::Rendercontextinfo::TGLRenderContextInfo &rci, System::TObject* Sender);
+	virtual void __fastcall DoFinalize();
+	virtual void __fastcall DoApply(Gls::Rendercontextinfo::TGLRenderContextInfo &rci, System::TObject* Sender);
+	virtual bool __fastcall DoUnApply(Gls::Rendercontextinfo::TGLRenderContextInfo &rci);
+	bool __fastcall IsProfileSupported(Cg::Import::TCGprofile Profile);
+	__property TCgApplyEvent OnApplyVP = {read=GetOnApplyVertexProgram, write=SetOnApplyVertexProgram};
+	__property TCgApplyEvent OnApplyFP = {read=GetOnApplyFragmentProgram, write=SetOnApplyFragmentProgram};
+	__property TCgUnApplyEvent OnUnApplyVP = {read=GetOnUnApplyVertexProgram, write=SetOnUnApplyVertexProgram};
+	__property TCgUnApplyEvent OnUnApplyFP = {read=GetOnUnApplyFragmentProgram, write=SetOnUnApplyFragmentProgram};
+	__property TCgShaderEvent OnInitialize = {read=GetOnInitialize, write=SetOnInitialize};
+	__property bool DesignEnable = {read=FDesignEnable, write=FDesignEnable, default=0};
+	__property TCgVertexProgram* VertexProgram = {read=FVertexProgram, write=SetVertexProgram};
+	__property TCgFragmentProgram* FragmentProgram = {read=FFragmentProgram, write=SetFragmentProgram};
+	
+public:
+	__fastcall virtual TCustomCgShader(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TCustomCgShader();
+	void __fastcall LoadShaderPrograms(const System::UnicodeString VPFilename, const System::UnicodeString FPFilename);
+	virtual bool __fastcall ShaderSupported();
+};
+
+
+class PASCALIMPLEMENTATION TCadencableCustomCgShader : public TCustomCgShader
+{
+	typedef TCustomCgShader inherited;
+	
+private:
+	Gls::Cadencer::TGLCadencer* FCadencer;
+	void __fastcall SetCadencer(Gls::Cadencer::TGLCadencer* const Value);
+	
+protected:
+	virtual void __fastcall DoInitialize(Gls::Rendercontextinfo::TGLRenderContextInfo &rci, System::TObject* Sender);
+	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
+	
+public:
+	__property Gls::Cadencer::TGLCadencer* Cadencer = {read=FCadencer, write=SetCadencer};
+public:
+	/* TCustomCgShader.Create */ inline __fastcall virtual TCadencableCustomCgShader(System::Classes::TComponent* AOwner) : TCustomCgShader(AOwner) { }
+	/* TCustomCgShader.Destroy */ inline __fastcall virtual ~TCadencableCustomCgShader() { }
+	
+};
+
+
+class PASCALIMPLEMENTATION TCgShader : public TCustomCgShader
+{
+	typedef TCustomCgShader inherited;
+	
+__published:
+	__property DesignEnable = {default=0};
+	__property ShaderStyle = {default=1};
+	__property FailedInitAction = {default=1};
+	__property VertexProgram;
+	__property FragmentProgram;
+	__property OnApplyVP;
+	__property OnApplyFP;
+	__property OnUnApplyVP;
+	__property OnUnApplyFP;
+	__property OnInitialize;
+public:
+	/* TCustomCgShader.Create */ inline __fastcall virtual TCgShader(System::Classes::TComponent* AOwner) : TCustomCgShader(AOwner) { }
+	/* TCustomCgShader.Destroy */ inline __fastcall virtual ~TCgShader() { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE System::UnicodeString IncludeFilePath;
+extern DELPHI_PACKAGE bool __fastcall IsCgProfileSupported(Cg::Import::TCGprofile Profile);
+}	/* namespace Shader */
+}	/* namespace Cg */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG_SHADER)
+using namespace Cg::Shader;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_CG)
+using namespace Cg;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Cg_ShaderHPP

+ 113 - 0
include/Win32/FRColorEditor.hpp

@@ -0,0 +1,113 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FRColorEditor.pas' rev: 35.00 (Windows)
+
+#ifndef FrcoloreditorHPP
+#define FrcoloreditorHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Types.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.ExtCtrls.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Graphics.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.Color.hpp>
+#include <GLS.Texture.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <System.UITypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Frcoloreditor
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TRColorEditor;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TRColorEditor : public Vcl::Forms::TFrame
+{
+	typedef Vcl::Forms::TFrame inherited;
+	
+	
+private:
+	enum DECLSPEC_DENUM _TRColorEditor__1 : unsigned char { None, Red, Green, Blue, Alpha };
+	
+	
+__published:
+	Vcl::Stdctrls::TLabel* Label1;
+	Vcl::Stdctrls::TLabel* Label2;
+	Vcl::Stdctrls::TLabel* Label3;
+	Vcl::Stdctrls::TLabel* Label4;
+	Vcl::Extctrls::TPanel* PAPreview;
+	Vcl::Dialogs::TColorDialog* ColorDialog;
+	Vcl::Extctrls::TPanel* Panel1;
+	Vcl::Extctrls::TPaintBox* ColorEditorPaintBox;
+	Vcl::Stdctrls::TEdit* RedEdit;
+	Vcl::Stdctrls::TEdit* GreenEdit;
+	Vcl::Stdctrls::TEdit* BlueEdit;
+	Vcl::Stdctrls::TEdit* AlphaEdit;
+	void __fastcall TBEChange(System::TObject* Sender);
+	void __fastcall PAPreviewDblClick(System::TObject* Sender);
+	void __fastcall ColorEditorPaintBoxPaint(System::TObject* Sender);
+	void __fastcall FrameResize(System::TObject* Sender);
+	void __fastcall ColorEditorPaintBoxMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall ColorEditorPaintBoxMouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall ColorEditorPaintBoxMouseUp(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall RedEditChange(System::TObject* Sender);
+	void __fastcall GreenEditChange(System::TObject* Sender);
+	void __fastcall BlueEditChange(System::TObject* Sender);
+	void __fastcall AlphaEditChange(System::TObject* Sender);
+	
+private:
+	System::Classes::TNotifyEvent FOnChange;
+	bool updating;
+	Vcl::Graphics::TBitmap* WorkBitmap;
+	int RedValue;
+	int GreenValue;
+	int BlueValue;
+	int AlphaVAlue;
+	_TRColorEditor__1 DraggingValue;
+	HIDESBASE void __fastcall SetColor(const Gls::Vectortypes::TVector4f &val);
+	Gls::Vectortypes::TVector4f __fastcall GetColor();
+	void __fastcall DrawContents();
+	void __fastcall DragColorSliderToPosition(int XPos);
+	void __fastcall ContentsChanged();
+	
+public:
+	__fastcall virtual TRColorEditor(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TRColorEditor();
+	__property Gls::Vectortypes::TVector4f Color = {read=GetColor, write=SetColor};
+	
+__published:
+	__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TRColorEditor(HWND ParentWindow) : Vcl::Forms::TFrame(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Frcoloreditor */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FRCOLOREDITOR)
+using namespace Frcoloreditor;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FrcoloreditorHPP

+ 87 - 0
include/Win32/FRFaceEditor.hpp

@@ -0,0 +1,87 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FRFaceEditor.pas' rev: 35.00 (Windows)
+
+#ifndef FrfaceeditorHPP
+#define FrfaceeditorHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.ImageList.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.ImgList.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Graphics.hpp>
+#include <FRTrackBarEdit.hpp>
+#include <FRColorEditor.hpp>
+#include <GLS.Texture.hpp>
+#include <GLS.Material.hpp>
+#include <GLS.State.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Frfaceeditor
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TRFaceEditor;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TRFaceEditor : public Vcl::Forms::TFrame
+{
+	typedef Vcl::Forms::TFrame inherited;
+	
+__published:
+	Vcl::Comctrls::TPageControl* PageControl;
+	Vcl::Comctrls::TTabSheet* TSAmbient;
+	Vcl::Comctrls::TTabSheet* TSDiffuse;
+	Vcl::Comctrls::TTabSheet* TSEmission;
+	Vcl::Comctrls::TTabSheet* TSSpecular;
+	Frcoloreditor::TRColorEditor* CEAmbiant;
+	Vcl::Stdctrls::TLabel* Label1;
+	Frtrackbaredit::TRTrackBarEdit* TBEShininess;
+	Vcl::Controls::TImageList* ImageList;
+	Frcoloreditor::TRColorEditor* CEDiffuse;
+	Frcoloreditor::TRColorEditor* CEEmission;
+	Frcoloreditor::TRColorEditor* CESpecular;
+	void __fastcall TBEShininessTrackBarChange(System::TObject* Sender);
+	
+private:
+	System::Classes::TNotifyEvent FOnChange;
+	bool Updating;
+	Gls::Material::TGLFaceProperties* FFaceProperties;
+	void __fastcall SetGLFaceProperties(Gls::Material::TGLFaceProperties* const val);
+	void __fastcall OnColorChange(System::TObject* Sender);
+	
+public:
+	__fastcall virtual TRFaceEditor(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TRFaceEditor();
+	__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
+	__property Gls::Material::TGLFaceProperties* FaceProperties = {read=FFaceProperties, write=SetGLFaceProperties};
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TRFaceEditor(HWND ParentWindow) : Vcl::Forms::TFrame(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Frfaceeditor */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FRFACEEDITOR)
+using namespace Frfaceeditor;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FrfaceeditorHPP

+ 99 - 0
include/Win32/FRMaterialPreview.hpp

@@ -0,0 +1,99 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FRMaterialPreview.pas' rev: 35.00 (Windows)
+
+#ifndef FrmaterialpreviewHPP
+#define FrmaterialpreviewHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Types.hpp>
+#include <System.Classes.hpp>
+#include <Vcl.Graphics.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.Controls.hpp>
+#include <GLS.Scene.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.Objects.hpp>
+#include <GLS.Texture.hpp>
+#include <GLS.HUDObjects.hpp>
+#include <GLS.SceneViewer.hpp>
+#include <GLS.GeomObjects.hpp>
+#include <GLS.Color.hpp>
+#include <GLS.Coordinates.hpp>
+#include <GLS.BaseClasses.hpp>
+#include <GLS.Material.hpp>
+#include <System.UITypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Frmaterialpreview
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TRMaterialPreview;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TRMaterialPreview : public Vcl::Forms::TFrame
+{
+	typedef Vcl::Forms::TFrame inherited;
+	
+__published:
+	Gls::Scene::TGLScene* GLScene;
+	Gls::Sceneviewer::TGLSceneViewer* GLSceneViewer;
+	Vcl::Stdctrls::TComboBox* CBObject;
+	Gls::Scene::TGLCamera* Camera;
+	Gls::Objects::TGLCube* Cube;
+	Gls::Objects::TGLSphere* Sphere;
+	Gls::Scene::TGLLightSource* LightSource;
+	Vcl::Stdctrls::TComboBox* CBBackground;
+	Gls::Hudobjects::TGLHUDSprite* BackGroundSprite;
+	Gls::Geomobjects::TGLTeapot* Teapot;
+	Gls::Objects::TGLDummyCube* World;
+	Gls::Objects::TGLDummyCube* Light;
+	Gls::Objects::TGLSphere* FireSphere;
+	Gls::Material::TGLMaterialLibrary* GLMaterialLibrary;
+	void __fastcall CBObjectChange(System::TObject* Sender);
+	void __fastcall CBBackgroundChange(System::TObject* Sender);
+	void __fastcall SceneViewerMouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall SceneViewerMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall SceneViewerMouseWheel(System::TObject* Sender, System::Classes::TShiftState Shift, int WheelDelta, const System::Types::TPoint &MousePos, bool &Handled);
+	
+private:
+	Gls::Material::TGLAbstractLibMaterial* FLibMaterial;
+	Gls::Material::TGLMaterial* __fastcall GetMaterial();
+	void __fastcall SetMaterial(Gls::Material::TGLMaterial* const Value);
+	Gls::Material::TGLAbstractLibMaterial* __fastcall GetLibMaterial();
+	void __fastcall SetLibMaterial(Gls::Material::TGLAbstractLibMaterial* const Value);
+	
+public:
+	__fastcall virtual TRMaterialPreview(System::Classes::TComponent* AOwner);
+	__property Gls::Material::TGLMaterial* Material = {read=GetMaterial, write=SetMaterial};
+	__property Gls::Material::TGLAbstractLibMaterial* LibMaterial = {read=GetLibMaterial, write=SetLibMaterial};
+public:
+	/* TScrollingWinControl.Destroy */ inline __fastcall virtual ~TRMaterialPreview() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TRMaterialPreview(HWND ParentWindow) : Vcl::Forms::TFrame(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Frmaterialpreview */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FRMATERIALPREVIEW)
+using namespace Frmaterialpreview;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FrmaterialpreviewHPP

+ 98 - 0
include/Win32/FRTextureEdit.hpp

@@ -0,0 +1,98 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FRTextureEdit.pas' rev: 35.00 (Windows)
+
+#ifndef FrtextureeditHPP
+#define FrtextureeditHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.TypInfo.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.Buttons.hpp>
+#include <Vcl.Controls.hpp>
+#include <GLS.Graphics.hpp>
+#include <GLS.TextureFormat.hpp>
+#include <GLS.Texture.hpp>
+#include <GLS.State.hpp>
+#include <GLS.TextureImageEditors.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Frtextureedit
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TRTextureEdit;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TRTextureEdit : public Vcl::Forms::TFrame
+{
+	typedef Vcl::Forms::TFrame inherited;
+	
+__published:
+	Vcl::Stdctrls::TLabel* Label2;
+	Vcl::Buttons::TSpeedButton* SBEditImage;
+	Vcl::Stdctrls::TComboBox* CBMagFilter;
+	Vcl::Stdctrls::TLabel* Label3;
+	Vcl::Stdctrls::TLabel* Label4;
+	Vcl::Stdctrls::TComboBox* CBMinFilter;
+	Vcl::Stdctrls::TComboBox* CBTextureMode;
+	Vcl::Stdctrls::TLabel* Label1;
+	Vcl::Stdctrls::TLabel* Label5;
+	Vcl::Stdctrls::TComboBox* CBTextureWrap;
+	Vcl::Stdctrls::TCheckBox* CBDisabled;
+	Vcl::Stdctrls::TComboBox* CBImageClass;
+	Vcl::Stdctrls::TComboBox* CBImageAlpha;
+	Vcl::Stdctrls::TLabel* Label6;
+	Vcl::Stdctrls::TComboBox* CBFilteringQuality;
+	Vcl::Stdctrls::TLabel* Label7;
+	void __fastcall CBMagFilterChange(System::TObject* Sender);
+	void __fastcall CBMinFilterChange(System::TObject* Sender);
+	void __fastcall CBTextureModeChange(System::TObject* Sender);
+	void __fastcall CBTextureWrapChange(System::TObject* Sender);
+	void __fastcall CBDisabledClick(System::TObject* Sender);
+	void __fastcall SBEditImageClick(System::TObject* Sender);
+	void __fastcall CBImageClassChange(System::TObject* Sender);
+	void __fastcall CBImageAlphaChange(System::TObject* Sender);
+	void __fastcall CBFilteringQualityChange(System::TObject* Sender);
+	
+private:
+	Gls::Texture::TGLTexture* FTexture;
+	System::Classes::TNotifyEvent FOnChange;
+	bool Changeing;
+	
+protected:
+	void __fastcall SetTexture(Gls::Texture::TGLTexture* const val);
+	virtual void __fastcall DoOnChange();
+	
+public:
+	__fastcall virtual TRTextureEdit(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TRTextureEdit();
+	__property Gls::Texture::TGLTexture* Texture = {read=FTexture, write=SetTexture};
+	__property System::Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TRTextureEdit(HWND ParentWindow) : Vcl::Forms::TFrame(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Frtextureedit */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FRTEXTUREEDIT)
+using namespace Frtextureedit;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FrtextureeditHPP

+ 75 - 0
include/Win32/FRTrackBarEdit.hpp

@@ -0,0 +1,75 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FRTrackBarEdit.pas' rev: 35.00 (Windows)
+
+#ifndef FrtrackbareditHPP
+#define FrtrackbareditHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.Controls.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Frtrackbaredit
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TRTrackBarEdit;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TRTrackBarEdit : public Vcl::Forms::TFrame
+{
+	typedef Vcl::Forms::TFrame inherited;
+	
+__published:
+	Vcl::Comctrls::TTrackBar* TrackBar;
+	Vcl::Stdctrls::TEdit* Edit;
+	void __fastcall TrackBarChange(System::TObject* Sender);
+	void __fastcall EditChange(System::TObject* Sender);
+	
+private:
+	void __fastcall SetValue(const int val);
+	int __fastcall GetValue();
+	void __fastcall SetValueMin(const int val);
+	int __fastcall GetValueMin();
+	void __fastcall SetValueMax(const int val);
+	int __fastcall GetValueMax();
+	
+public:
+	__property int Value = {read=GetValue, write=SetValue, nodefault};
+	__property int ValueMin = {read=GetValueMin, write=SetValueMin, nodefault};
+	__property int ValueMax = {read=GetValueMax, write=SetValueMax, nodefault};
+public:
+	/* TCustomFrame.Create */ inline __fastcall virtual TRTrackBarEdit(System::Classes::TComponent* AOwner) : Vcl::Forms::TFrame(AOwner) { }
+	
+public:
+	/* TScrollingWinControl.Destroy */ inline __fastcall virtual ~TRTrackBarEdit() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TRTrackBarEdit(HWND ParentWindow) : Vcl::Forms::TFrame(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Frtrackbaredit */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FRTRACKBAREDIT)
+using namespace Frtrackbaredit;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FrtrackbareditHPP

+ 136 - 0
include/Win32/FmGuiLayoutEditor.hpp

@@ -0,0 +1,136 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmGuiLayoutEditor.pas' rev: 35.00 (Windows)
+
+#ifndef FmguilayouteditorHPP
+#define FmguilayouteditorHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <Winapi.ShellAPI.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Variants.hpp>
+#include <System.Classes.hpp>
+#include <Vcl.Graphics.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <Vcl.Buttons.hpp>
+#include <Vcl.ExtDlgs.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.ExtCtrls.hpp>
+#include <Vcl.Samples.Spin.hpp>
+#include <Vcl.Grids.hpp>
+#include <GLS.BaseClasses.hpp>
+#include <GLS.Gui.hpp>
+#include <GLS.Strings.hpp>
+#include <System.UITypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fmguilayouteditor
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLLayoutEditorForm;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLLayoutEditorForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Vcl::Extctrls::TPanel* Panel1;
+	Vcl::Extctrls::TPanel* Panel2;
+	Vcl::Stdctrls::TListBox* items_list;
+	Vcl::Stdctrls::TLabel* x_label;
+	Vcl::Stdctrls::TLabel* y_label;
+	Vcl::Buttons::TBitBtn* open_image_button;
+	Vcl::Buttons::TBitBtn* open_button;
+	Vcl::Buttons::TBitBtn* save_button;
+	Vcl::Dialogs::TOpenDialog* OpenDialog1;
+	Vcl::Dialogs::TSaveDialog* SaveDialog1;
+	Vcl::Buttons::TBitBtn* delete_item_button;
+	Vcl::Buttons::TBitBtn* add_button;
+	Vcl::Stdctrls::TLabel* Label1;
+	Vcl::Stdctrls::TLabel* Label2;
+	Vcl::Samples::Spin::TSpinEdit* left_edit;
+	Vcl::Samples::Spin::TSpinEdit* top_edit;
+	Vcl::Stdctrls::TLabel* Label3;
+	Vcl::Stdctrls::TLabel* Label4;
+	Vcl::Samples::Spin::TSpinEdit* height_edit;
+	Vcl::Samples::Spin::TSpinEdit* width_edit;
+	Vcl::Stdctrls::TLabel* Label5;
+	Vcl::Stdctrls::TEdit* name_edit;
+	Vcl::Grids::TStringGrid* elements_grid;
+	Vcl::Extctrls::TPanel* Panel3;
+	Vcl::Buttons::TBitBtn* BitBtn4;
+	Vcl::Buttons::TBitBtn* BitBtn5;
+	Vcl::Forms::TScrollBox* ScrollBox1;
+	Vcl::Extctrls::TImage* Image2;
+	Vcl::Extctrls::TPaintBox* PaintBox1;
+	Vcl::Extctrls::TImage* Image1;
+	Vcl::Buttons::TBitBtn* BitBtn6;
+	Vcl::Buttons::TBitBtn* BitBtn1;
+	Gls::Gui::TGLGuiLayout* GLGuiLayout1;
+	void __fastcall open_image_buttonClick(System::TObject* Sender);
+	void __fastcall open_buttonClick(System::TObject* Sender);
+	void __fastcall save_buttonClick(System::TObject* Sender);
+	void __fastcall FormCreate(System::TObject* Sender);
+	void __fastcall Image1MouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall Image1MouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall Image1MouseUp(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall add_buttonClick(System::TObject* Sender);
+	void __fastcall delete_item_buttonClick(System::TObject* Sender);
+	void __fastcall items_listClick(System::TObject* Sender);
+	void __fastcall name_editExit(System::TObject* Sender);
+	void __fastcall name_editKeyPress(System::TObject* Sender, System::WideChar &Key);
+	void __fastcall elements_gridClick(System::TObject* Sender);
+	void __fastcall left_editChange(System::TObject* Sender);
+	void __fastcall top_editChange(System::TObject* Sender);
+	void __fastcall width_editChange(System::TObject* Sender);
+	void __fastcall height_editChange(System::TObject* Sender);
+	void __fastcall BitBtn4Click(System::TObject* Sender);
+	void __fastcall BitBtn6Click(System::TObject* Sender);
+	void __fastcall elements_gridDblClick(System::TObject* Sender);
+	
+private:
+	void __fastcall SyncImages();
+	void __fastcall DrawCurrentElement();
+	void __fastcall RefreshComponentBox();
+	bool __fastcall GetEnabledSpins();
+	void __fastcall SetEnabledSpins(bool Value);
+	
+public:
+	void __fastcall Execute(Gls::Gui::TGLGuiLayout* AGUILayout);
+	__property bool EnabledSpins = {read=GetEnabledSpins, write=SetEnabledSpins, nodefault};
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TGLLayoutEditorForm(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TGLLayoutEditorForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TGLLayoutEditorForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TGLLayoutEditorForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TGLLayoutEditorForm* __fastcall GUILayoutEditorForm(void);
+extern DELPHI_PACKAGE void __fastcall ReleaseGUILayoutEditorForm(void);
+}	/* namespace Fmguilayouteditor */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMGUILAYOUTEDITOR)
+using namespace Fmguilayouteditor;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FmguilayouteditorHPP

+ 203 - 0
include/Win32/FmGuiSkinEditor.hpp

@@ -0,0 +1,203 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmGuiSkinEditor.pas' rev: 35.00 (Windows)
+
+#ifndef FmguiskineditorHPP
+#define FmguiskineditorHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <Winapi.Messages.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Classes.hpp>
+#include <Vcl.Graphics.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.ExtCtrls.hpp>
+#include <Vcl.Menus.hpp>
+#include <GLS.Texture.hpp>
+#include <GLS.Scene.hpp>
+#include <GLS.Objects.hpp>
+#include <GLS.Windows.hpp>
+#include <GLS.HUDObjects.hpp>
+#include <GLS.SceneViewer.hpp>
+#include <GLS.Gui.hpp>
+#include <GLS.Graphics.hpp>
+#include <GLS.Utils.hpp>
+#include <GLS.Coordinates.hpp>
+#include <GLS.BaseClasses.hpp>
+#include <GLS.Material.hpp>
+#include <System.Types.hpp>
+#include <System.UITypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fmguiskineditor
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLSkinEditorForm;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLSkinEditorForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Gls::Scene::TGLScene* GLScene1;
+	Gls::Scene::TGLCamera* GLCamera1;
+	Gls::Windows::TGLPanel* GLPanel1;
+	Gls::Hudobjects::TGLHUDSprite* HUDSprite1;
+	Gls::Scene::TGLMemoryViewer* GLMemoryViewer1;
+	Gls::Scene::TGLLightSource* GLLightSource1;
+	Vcl::Comctrls::TStatusBar* StatusBar;
+	Vcl::Extctrls::TPanel* panBottom;
+	Vcl::Extctrls::TPanel* panZoomImage;
+	Vcl::Extctrls::TImage* imgFull;
+	Vcl::Stdctrls::TScrollBar* sbarHorizontal;
+	Vcl::Stdctrls::TScrollBar* sbarVertical;
+	Vcl::Stdctrls::TButton* Button5;
+	Vcl::Stdctrls::TButton* Button6;
+	Vcl::Extctrls::TPanel* panImageProperties;
+	Vcl::Stdctrls::TLabel* Label5;
+	Vcl::Stdctrls::TLabel* Label6;
+	Vcl::Extctrls::TPanel* Panel2;
+	Vcl::Extctrls::TImage* imgPreview;
+	Vcl::Extctrls::TPanel* Panel3;
+	Vcl::Stdctrls::TLabel* Label2;
+	Vcl::Stdctrls::TLabel* Label1;
+	Vcl::Stdctrls::TButton* Button3;
+	Vcl::Stdctrls::TButton* Button4;
+	Vcl::Stdctrls::TCheckBox* CheckBox1;
+	Vcl::Stdctrls::TEdit* WidthEdit;
+	Vcl::Stdctrls::TEdit* HeightEdit;
+	Vcl::Extctrls::TPanel* panElements;
+	Vcl::Extctrls::TBevel* Bevel2;
+	Vcl::Extctrls::TBevel* Bevel1;
+	Vcl::Stdctrls::TLabel* Label3;
+	Vcl::Stdctrls::TLabel* Label4;
+	Vcl::Stdctrls::TLabel* Label11;
+	Vcl::Stdctrls::TLabel* Label12;
+	Vcl::Stdctrls::TLabel* Label13;
+	Vcl::Stdctrls::TLabel* Label9;
+	Vcl::Stdctrls::TLabel* Label10;
+	Vcl::Stdctrls::TLabel* Label14;
+	Vcl::Stdctrls::TListBox* lbElements;
+	Vcl::Stdctrls::TButton* btnAdd;
+	Vcl::Stdctrls::TButton* btnDelete;
+	Vcl::Stdctrls::TComboBox* ComboBox1;
+	Vcl::Stdctrls::TEdit* LeftEdit;
+	Vcl::Stdctrls::TEdit* TopEdit;
+	Vcl::Stdctrls::TEdit* RightEdit;
+	Vcl::Stdctrls::TEdit* BottomEdit;
+	Vcl::Stdctrls::TEdit* ScaleXEdit;
+	Vcl::Stdctrls::TEdit* ScaleYEdit;
+	Vcl::Menus::TPopupMenu* popElements;
+	Vcl::Menus::TMenuItem* mnuTopLeft;
+	Vcl::Menus::TMenuItem* mnuTop;
+	Vcl::Menus::TMenuItem* mnuTopRight;
+	Vcl::Menus::TMenuItem* mnuLeft;
+	Vcl::Menus::TMenuItem* mnuCenter;
+	Vcl::Menus::TMenuItem* mnuRight;
+	Vcl::Menus::TMenuItem* mnuBottomLeft;
+	Vcl::Menus::TMenuItem* mnuBottom;
+	Vcl::Menus::TMenuItem* mnuBottomRight;
+	Vcl::Menus::TMenuItem* N1;
+	Vcl::Menus::TMenuItem* mnuAddAll;
+	Vcl::Menus::TMenuItem* N2;
+	Vcl::Menus::TMenuItem* mnuAllTop;
+	Vcl::Menus::TMenuItem* mnuAllMiddle;
+	Vcl::Menus::TMenuItem* mnuAllBottom;
+	void __fastcall FormCreate(System::TObject* Sender);
+	void __fastcall FormDestroy(System::TObject* Sender);
+	void __fastcall Button3Click(System::TObject* Sender);
+	void __fastcall Button4Click(System::TObject* Sender);
+	void __fastcall ScrollBarScroll(System::TObject* Sender, System::Uitypes::TScrollCode ScrollCode, int &ScrollPos);
+	void __fastcall ScrollbarChange(System::TObject* Sender);
+	void __fastcall WidthEditChange(System::TObject* Sender);
+	void __fastcall HeightEditChange(System::TObject* Sender);
+	void __fastcall btnAddClick(System::TObject* Sender);
+	void __fastcall lbElementsClick(System::TObject* Sender);
+	void __fastcall ComboBox1Change(System::TObject* Sender);
+	void __fastcall btnDeleteClick(System::TObject* Sender);
+	void __fastcall imgFullMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall imgFullMouseUp(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall imgFullMouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall lbElementsKeyDown(System::TObject* Sender, System::Word &Key, System::Classes::TShiftState Shift);
+	void __fastcall CheckBox1Click(System::TObject* Sender);
+	void __fastcall ScaleXEditChange(System::TObject* Sender);
+	void __fastcall ScaleYEditChange(System::TObject* Sender);
+	void __fastcall LeftEditChange(System::TObject* Sender);
+	void __fastcall TopEditChange(System::TObject* Sender);
+	void __fastcall RightEditChange(System::TObject* Sender);
+	void __fastcall BottomEditChange(System::TObject* Sender);
+	void __fastcall EditKeyPress(System::TObject* Sender, System::WideChar &Key);
+	void __fastcall FormResize(System::TObject* Sender);
+	void __fastcall MenuItemClick(System::TObject* Sender);
+	void __fastcall mnuAddAllClick(System::TObject* Sender);
+	void __fastcall mnuAllTopClick(System::TObject* Sender);
+	void __fastcall mnuAllMiddleClick(System::TObject* Sender);
+	void __fastcall mnuAllBottomClick(System::TObject* Sender);
+	void __fastcall imgPreviewMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall imgPreviewMouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, int X, int Y);
+	
+private:
+	System::Classes::TWndMethod FOriginalWndProc;
+	System::Types::TRect FFocusRect;
+	System::Types::TRect VisibleRect;
+	System::Types::TPoint PreviewMousePoint;
+	int PreviewWidth;
+	int PreviewHeight;
+	System::Types::TPoint FullMousePoint;
+	bool MouseDown;
+	void __fastcall ImageWndProc(Winapi::Messages::TMessage &Message);
+	void __fastcall DrawImageFocusRect(const System::Types::TRect &ARect);
+	void __fastcall AlignZoomPanel();
+	void __fastcall UpdateRegionEdits();
+	void __fastcall SetEditState(Vcl::Controls::TControl* Parent, bool Enabled);
+	void __fastcall AddElement(int Index);
+	void __fastcall DrawCrossair(const System::Types::TPoint &Point);
+	
+public:
+	Gls::Gui::TGLGuiElementList* TheGuiComponent;
+	Gls::Gui::TGLGuiElement* SelectedElement;
+	Gls::Texture::TGLTexture* Tex;
+	float Zoom;
+	int Width;
+	int Height;
+	bool __fastcall Edit(Gls::Gui::TGLGuiElementList* GuiComponent);
+	void __fastcall Render();
+	void __fastcall SetMax(Vcl::Stdctrls::TScrollBar* Scrollbar, int Val);
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TGLSkinEditorForm(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TGLSkinEditorForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TGLSkinEditorForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TGLSkinEditorForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TGLSkinEditorForm* GLSkinEditorForm;
+extern DELPHI_PACKAGE bool __fastcall GUIComponentDialog(Gls::Gui::TGLGuiElementList* GuiComponent);
+}	/* namespace Fmguiskineditor */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMGUISKINEDITOR)
+using namespace Fmguiskineditor;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FmguiskineditorHPP

+ 165 - 0
include/Win32/FmInfo.hpp

@@ -0,0 +1,165 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmInfo.pas' rev: 35.00 (Windows)
+
+#ifndef FminfoHPP
+#define FminfoHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.OpenGL.hpp>
+#include <Winapi.Windows.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Classes.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Buttons.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.ExtCtrls.hpp>
+#include <Vcl.Graphics.hpp>
+#include <Vcl.Menus.hpp>
+#include <Vcl.Imaging.jpeg.hpp>
+#include <GLS.OpenGLTokens.hpp>
+#include <GLS.OpenGLAdapter.hpp>
+#include <GLS.Scene.hpp>
+#include <GLS.SceneViewer.hpp>
+#include <GLS.Context.hpp>
+#include <GLS.Utils.hpp>
+#include <System.UITypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fminfo
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLInfoForm;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLInfoForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Vcl::Stdctrls::TLabel* AccLabel;
+	Vcl::Stdctrls::TLabel* AccumLabel;
+	Vcl::Stdctrls::TLabel* AuxLabel;
+	Vcl::Stdctrls::TLabel* ClipLabel;
+	Vcl::Stdctrls::TLabel* ColorLabel;
+	Vcl::Stdctrls::TLabel* CopyLabel;
+	Vcl::Stdctrls::TLabel* DepthLabel;
+	Vcl::Stdctrls::TLabel* DoubleLabel;
+	Vcl::Stdctrls::TLabel* EvalLabel;
+	Vcl::Extctrls::TImage* Image;
+	Vcl::Stdctrls::TLabel* Label1;
+	Vcl::Stdctrls::TLabel* Label10;
+	Vcl::Stdctrls::TLabel* Label11;
+	Vcl::Stdctrls::TLabel* Label12;
+	Vcl::Stdctrls::TLabel* Label13;
+	Vcl::Stdctrls::TLabel* Label14;
+	Vcl::Stdctrls::TLabel* Label15;
+	Vcl::Stdctrls::TLabel* Label16;
+	Vcl::Stdctrls::TLabel* Label17;
+	Vcl::Stdctrls::TLabel* Label18;
+	Vcl::Stdctrls::TLabel* Label2;
+	Vcl::Stdctrls::TLabel* Label20;
+	Vcl::Stdctrls::TLabel* Label23;
+	Vcl::Stdctrls::TLabel* Label25;
+	Vcl::Stdctrls::TLabel* Label26;
+	Vcl::Stdctrls::TLabel* Label27;
+	Vcl::Stdctrls::TLabel* Label28;
+	Vcl::Stdctrls::TLabel* Label29;
+	Vcl::Stdctrls::TLabel* Label3;
+	Vcl::Stdctrls::TLabel* Label30;
+	Vcl::Stdctrls::TLabel* LabelCommon;
+	Vcl::Stdctrls::TLabel* LabelDepths;
+	Vcl::Stdctrls::TLabel* LabelMaxValues;
+	Vcl::Stdctrls::TLabel* Label34;
+	Vcl::Stdctrls::TLabel* Label35;
+	Vcl::Stdctrls::TLabel* Label37;
+	Vcl::Stdctrls::TLabel* Label4;
+	Vcl::Stdctrls::TLabel* Label5;
+	Vcl::Stdctrls::TLabel* Label6;
+	Vcl::Stdctrls::TLabel* Label7;
+	Vcl::Stdctrls::TLabel* Label8;
+	Vcl::Stdctrls::TLabel* Label9;
+	Vcl::Stdctrls::TLabel* LightLabel;
+	Vcl::Stdctrls::TLabel* ListLabel;
+	Vcl::Stdctrls::TMemo* MemoAbout;
+	Vcl::Stdctrls::TMemo* MemoContributors;
+	Vcl::Stdctrls::TLabel* ModelLabel;
+	Vcl::Stdctrls::TLabel* NameLabel;
+	Vcl::Stdctrls::TLabel* OverlayLabel;
+	Vcl::Comctrls::TPageControl* PageControl;
+	Vcl::Stdctrls::TLabel* PixelLabel;
+	Vcl::Stdctrls::TLabel* ProjLabel;
+	Vcl::Stdctrls::TLabel* RendererLabel;
+	Vcl::Forms::TScrollBox* ScrollBoxInfo;
+	Vcl::Comctrls::TTabSheet* TabSheetInformation;
+	Vcl::Stdctrls::TLabel* StencilLabel;
+	Vcl::Stdctrls::TLabel* StereoLabel;
+	Vcl::Stdctrls::TLabel* SubLabel;
+	Vcl::Comctrls::TTabSheet* TabSheetAbout;
+	Vcl::Comctrls::TTabSheet* TabSheetContributors;
+	Vcl::Stdctrls::TLabel* TexSizeLabel;
+	Vcl::Stdctrls::TLabel* TexStackLabel;
+	Vcl::Stdctrls::TLabel* TexUnitsLabel;
+	Vcl::Stdctrls::TLabel* UnderlayLabel;
+	Vcl::Stdctrls::TLabel* VendorLabel;
+	Vcl::Stdctrls::TLabel* VersionLabel;
+	Vcl::Comctrls::TTabSheet* TabSheetExtensions;
+	Vcl::Stdctrls::TListBox* ListBoxExtensions;
+	Vcl::Menus::TPopupMenu* PMWebLink;
+	Vcl::Menus::TMenuItem* MIRegistryLink;
+	Vcl::Menus::TMenuItem* MIDelphi3D;
+	Vcl::Comctrls::TTabSheet* TabSheetGLScene;
+	Vcl::Stdctrls::TButton* CloseButton;
+	Vcl::Stdctrls::TLabel* VersionLbl;
+	Vcl::Stdctrls::TLabel* ViewLabel;
+	Vcl::Stdctrls::TLabel* lblSfGLScene;
+	Vcl::Stdctrls::TLabel* lblGithubGLScene;
+	void __fastcall CloseButtonClick(System::TObject* Sender);
+	void __fastcall FormCreate(System::TObject* Sender);
+	void __fastcall FormKeyPress(System::TObject* Sender, System::WideChar &Key);
+	void __fastcall FormClose(System::TObject* Sender, System::Uitypes::TCloseAction &Action);
+	void __fastcall ListBoxExtensionsDblClick(System::TObject* Sender);
+	void __fastcall ListBoxExtensionsClick(System::TObject* Sender);
+	void __fastcall ListBoxExtensionsKeyPress(System::TObject* Sender, System::WideChar &Key);
+	void __fastcall FormShow(System::TObject* Sender);
+	void __fastcall MIDelphi3DClick(System::TObject* Sender);
+	void __fastcall lblSfGLSceneClick(System::TObject* Sender);
+	void __fastcall lblGithubGLSceneClick(System::TObject* Sender);
+	
+protected:
+	System::UnicodeString __fastcall GetSceneVersion();
+	
+public:
+	void __fastcall GetInfoFrom(Gls::Scene::TGLSceneBuffer* aSceneBuffer);
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TGLInfoForm(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TGLInfoForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TGLInfoForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TGLInfoForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Fminfo */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMINFO)
+using namespace Fminfo;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FminfoHPP

+ 113 - 0
include/Win32/FmLibMaterialPicker.hpp

@@ -0,0 +1,113 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmLibMaterialPicker.pas' rev: 35.00 (Windows)
+
+#ifndef FmlibmaterialpickerHPP
+#define FmlibmaterialpickerHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.Types.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.Buttons.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Graphics.hpp>
+#include <GLS.Scene.hpp>
+#include <GLS.Objects.hpp>
+#include <GLS.SceneViewer.hpp>
+#include <GLS.Material.hpp>
+#include <GLS.Color.hpp>
+#include <GLS.Coordinates.hpp>
+#include <GLS.BaseClasses.hpp>
+#include <GLS.HUDObjects.hpp>
+#include <GLS.GeomObjects.hpp>
+#include <System.UITypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fmlibmaterialpicker
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLLibMaterialPickerForm;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLLibMaterialPickerForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Vcl::Stdctrls::TListBox* ListBoxMaterials;
+	Vcl::Stdctrls::TLabel* Label1;
+	Vcl::Stdctrls::TLabel* Label2;
+	Vcl::Buttons::TBitBtn* BitBtnOk;
+	Vcl::Buttons::TBitBtn* BitBtnCancel;
+	Gls::Scene::TGLScene* GLScene1;
+	Gls::Sceneviewer::TGLSceneViewer* GLSceneViewer1;
+	Gls::Scene::TGLLightSource* LightSource1;
+	Gls::Objects::TGLDummyCube* dcLight1;
+	Gls::Objects::TGLDummyCube* dcWorld1;
+	Gls::Scene::TGLCamera* Camera1;
+	Gls::Objects::TGLCube* Cube1;
+	Gls::Objects::TGLSphere* Sphere1;
+	Gls::Objects::TGLSphere* FireSphere1;
+	Gls::Geomobjects::TGLTeapot* Teapot1;
+	Gls::Material::TGLMaterialLibrary* GLMaterialLibrary1;
+	Vcl::Stdctrls::TComboBox* ComboBoxObject1;
+	Vcl::Stdctrls::TComboBox* ComboBoxBackGround1;
+	Gls::Hudobjects::TGLHUDSprite* BackGroundSprite1;
+	Gls::Scene::TGLLightSource* LightSource2;
+	void __fastcall ListBoxMaterialsClick(System::TObject* Sender);
+	void __fastcall ListBoxMaterialsKeyPress(System::TObject* Sender, System::WideChar &Key);
+	void __fastcall ListBoxMaterialsDblClick(System::TObject* Sender);
+	void __fastcall ComboBoxObject1Change(System::TObject* Sender);
+	void __fastcall ComboBoxBackGround1Change(System::TObject* Sender);
+	void __fastcall FormCreate(System::TObject* Sender);
+	void __fastcall GLSceneViewer1MouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall GLSceneViewer1MouseWheel(System::TObject* Sender, System::Classes::TShiftState Shift, int WheelDelta, const System::Types::TPoint &MousePos, bool &Handled);
+	void __fastcall GLSceneViewer1MouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
+	
+private:
+	int mx;
+	int my;
+	Gls::Material::TGLAbstractLibMaterial* FLibMaterial1;
+	Gls::Material::TGLMaterial* __fastcall GetMaterial1();
+	void __fastcall SetMaterial1(Gls::Material::TGLMaterial* const Value);
+	Gls::Material::TGLAbstractLibMaterial* __fastcall GetLibMaterial1();
+	void __fastcall SetLibMaterial1(Gls::Material::TGLAbstractLibMaterial* const Value);
+	
+public:
+	bool __fastcall Execute(System::UnicodeString &MaterialName, Gls::Material::TGLAbstractMaterialLibrary* MaterialLibrary);
+	__property Gls::Material::TGLMaterial* Material1 = {read=GetMaterial1, write=SetMaterial1};
+	__property Gls::Material::TGLAbstractLibMaterial* LibMaterial1 = {read=GetLibMaterial1, write=SetLibMaterial1};
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TGLLibMaterialPickerForm(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TGLLibMaterialPickerForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TGLLibMaterialPickerForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TGLLibMaterialPickerForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TGLLibMaterialPickerForm* __fastcall GLLibMaterialPickerForm(void);
+extern DELPHI_PACKAGE void __fastcall ReleaseLibMaterialPickerForm(void);
+}	/* namespace Fmlibmaterialpicker */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMLIBMATERIALPICKER)
+using namespace Fmlibmaterialpicker;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FmlibmaterialpickerHPP

+ 89 - 0
include/Win32/FmMaterialEditor.hpp

@@ -0,0 +1,89 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmMaterialEditor.pas' rev: 35.00 (Windows)
+
+#ifndef FmmaterialeditorHPP
+#define FmmaterialeditorHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <System.Classes.hpp>
+#include <System.TypInfo.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Buttons.hpp>
+#include <GLS.SceneViewer.hpp>
+#include <GLS.State.hpp>
+#include <GLS.Material.hpp>
+#include <GLS.Texture.hpp>
+#include <FRTrackBarEdit.hpp>
+#include <FRMaterialPreview.hpp>
+#include <FRColorEditor.hpp>
+#include <FRFaceEditor.hpp>
+#include <FRTextureEdit.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fmmaterialeditor
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLMaterialEditorForm;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLMaterialEditorForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Vcl::Comctrls::TPageControl* PageControl1;
+	Vcl::Comctrls::TTabSheet* TSFront;
+	Vcl::Comctrls::TTabSheet* TSBack;
+	Vcl::Comctrls::TTabSheet* TSTexture;
+	Frfaceeditor::TRFaceEditor* FEFront;
+	Frfaceeditor::TRFaceEditor* FEBack;
+	Vcl::Stdctrls::TGroupBox* GroupBox1;
+	Frmaterialpreview::TRMaterialPreview* MPPreview;
+	Vcl::Buttons::TBitBtn* BBOk;
+	Vcl::Buttons::TBitBtn* BBCancel;
+	Frtextureedit::TRTextureEdit* RTextureEdit;
+	Vcl::Stdctrls::TComboBox* CBBlending;
+	Vcl::Stdctrls::TLabel* Label1;
+	Vcl::Stdctrls::TLabel* Label2;
+	Vcl::Stdctrls::TComboBox* CBPolygonMode;
+	void __fastcall OnMaterialChanged(System::TObject* Sender);
+	
+public:
+	__fastcall virtual TGLMaterialEditorForm(System::Classes::TComponent* AOwner);
+	bool __fastcall Execute(Gls::Material::TGLMaterial* AMaterial);
+public:
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TGLMaterialEditorForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TGLMaterialEditorForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TGLMaterialEditorForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TGLMaterialEditorForm* __fastcall GLMaterialEditorForm(void);
+extern DELPHI_PACKAGE void __fastcall ReleaseMaterialEditorForm(void);
+}	/* namespace Fmmaterialeditor */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMMATERIALEDITOR)
+using namespace Fmmaterialeditor;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FmmaterialeditorHPP

+ 93 - 0
include/Win32/FmPlugInManagerEditor.hpp

@@ -0,0 +1,93 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmPlugInManagerEditor.pas' rev: 35.00 (Windows)
+
+#ifndef FmpluginmanagereditorHPP
+#define FmpluginmanagereditorHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.ImageList.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Buttons.hpp>
+#include <Vcl.ExtCtrls.hpp>
+#include <Vcl.ImgList.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.ToolWin.hpp>
+#include <GLS.PlugInManager.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fmpluginmanagereditor
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLPlugInManagerEditorForm;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLPlugInManagerEditorForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Vcl::Dialogs::TOpenDialog* OpenDialog;
+	Vcl::Stdctrls::TListBox* ListBox;
+	Vcl::Stdctrls::TLabel* Label1;
+	Vcl::Stdctrls::TGroupBox* GroupBox;
+	Vcl::Stdctrls::TMemo* DescriptionMemo;
+	Vcl::Stdctrls::TLabel* Label2;
+	Vcl::Stdctrls::TLabel* Label3;
+	Vcl::Stdctrls::TLabel* DateLabel;
+	Vcl::Stdctrls::TLabel* SizeLabel;
+	Vcl::Stdctrls::TLabel* Label4;
+	Vcl::Stdctrls::TLabel* Label5;
+	Vcl::Stdctrls::TComboBox* ServiceBox;
+	Vcl::Stdctrls::TComboBox* NameBox;
+	Vcl::Comctrls::TToolBar* ToolBar1;
+	Vcl::Comctrls::TToolButton* ToolButton1;
+	Vcl::Comctrls::TToolButton* ToolButton2;
+	Vcl::Comctrls::TToolButton* ToolButton3;
+	Vcl::Controls::TImageList* ImageList;
+	void __fastcall OKButtonClick(System::TObject* Sender);
+	void __fastcall LoadButtonClick(System::TObject* Sender);
+	void __fastcall ListBoxClick(System::TObject* Sender);
+	void __fastcall UnloadButtonClick(System::TObject* Sender);
+	void __fastcall ServiceBoxChange(System::TObject* Sender);
+	
+private:
+	Gls::Pluginmanager::TGLPlugInManager* FManager;
+	
+public:
+	__classmethod void __fastcall EditPlugIns(Gls::Pluginmanager::TGLPlugInManager* AManager);
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TGLPlugInManagerEditorForm(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TGLPlugInManagerEditorForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TGLPlugInManagerEditorForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TGLPlugInManagerEditorForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Fmpluginmanagereditor */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMPLUGINMANAGEREDITOR)
+using namespace Fmpluginmanagereditor;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FmpluginmanagereditorHPP

+ 230 - 0
include/Win32/FmSceneEditor.hpp

@@ -0,0 +1,230 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmSceneEditor.pas' rev: 35.00 (Windows)
+
+#ifndef FmsceneeditorHPP
+#define FmsceneeditorHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Win.Registry.hpp>
+#include <System.ImageList.hpp>
+#include <System.Actions.hpp>
+#include <Vcl.ActnList.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.ImgList.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <Vcl.Menus.hpp>
+#include <Vcl.ToolWin.hpp>
+#include <Vcl.ExtCtrls.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.Clipbrd.hpp>
+#include <DesignIntf.hpp>
+#include <VCLEditors.hpp>
+#include <GLS.Scene.hpp>
+#include <GLS.SceneViewer.hpp>
+#include <GLS.Strings.hpp>
+#include <FmInfo.hpp>
+#include <GLS.XCollection.hpp>
+#include <GLS.Utils.hpp>
+#include <GLS.SceneRegister.hpp>
+#include <System.Types.hpp>
+#include <System.UITypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fmsceneeditor
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLSceneEditorForm;
+//-- type declarations -------------------------------------------------------
+typedef void __fastcall (__closure *TSetSubItemsEvent)(System::TObject* Sender);
+
+class PASCALIMPLEMENTATION TGLSceneEditorForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Vcl::Menus::TPopupMenu* PopupMenu;
+	Vcl::Menus::TMenuItem* MIAddObject;
+	Vcl::Menus::TMenuItem* N1;
+	Vcl::Menus::TMenuItem* MIDelObject;
+	Vcl::Comctrls::TToolBar* ToolBar;
+	Vcl::Actnlist::TActionList* ActionList;
+	Vcl::Comctrls::TToolButton* TBAddObjects;
+	Vcl::Comctrls::TToolButton* TBMoveUp;
+	Vcl::Menus::TPopupMenu* pmToolBar;
+	Vcl::Comctrls::TToolButton* TBDeleteObject;
+	Vcl::Comctrls::TToolButton* TBMoveDown;
+	Vcl::Actnlist::TAction* acAddObject;
+	Vcl::Controls::TImageList* ImageList;
+	Vcl::Actnlist::TAction* acDeleteObject;
+	Vcl::Actnlist::TAction* acMoveUp;
+	Vcl::Actnlist::TAction* acMoveDown;
+	Vcl::Menus::TMenuItem* N2;
+	Vcl::Menus::TMenuItem* MIMoveUp;
+	Vcl::Menus::TMenuItem* MIMoveDown;
+	Vcl::Actnlist::TAction* acSaveScene;
+	Vcl::Actnlist::TAction* acLoadScene;
+	Vcl::Dialogs::TOpenDialog* OpenDialog;
+	Vcl::Dialogs::TSaveDialog* SaveDialog;
+	Vcl::Comctrls::TToolButton* TBLoadScene;
+	Vcl::Comctrls::TToolButton* TBSaveScene;
+	Vcl::Actnlist::TAction* acInfo;
+	Vcl::Actnlist::TAction* acCopy;
+	Vcl::Actnlist::TAction* acCut;
+	Vcl::Actnlist::TAction* acPaste;
+	Vcl::Menus::TMenuItem* MICopy;
+	Vcl::Menus::TMenuItem* MIPaste;
+	Vcl::Menus::TMenuItem* MICut;
+	Vcl::Comctrls::TToolButton* TBCut;
+	Vcl::Comctrls::TToolButton* TBCopy;
+	Vcl::Comctrls::TToolButton* TBPaste;
+	Vcl::Menus::TPopupMenu* pmBehavioursToolbar;
+	Vcl::Actnlist::TAction* acAddBehaviour;
+	Vcl::Menus::TMenuItem* MIAddBehaviour;
+	Vcl::Menus::TMenuItem* MIAddEffect;
+	Vcl::Menus::TMenuItem* MIBehaviourSeparator;
+	Vcl::Actnlist::TAction* acDeleteBehaviour;
+	Vcl::Menus::TPopupMenu* pmBehaviours;
+	Vcl::Menus::TMenuItem* Delete1;
+	Vcl::Menus::TMenuItem* MoveUp1;
+	Vcl::Menus::TMenuItem* MoveDown1;
+	Vcl::Menus::TMenuItem* N4;
+	Vcl::Menus::TPopupMenu* pmEffectsToolbar;
+	Vcl::Actnlist::TAction* acAddEffect;
+	Vcl::Comctrls::TToolButton* TBCharacterPanels;
+	Vcl::Comctrls::TToolButton* TBStayOnTop;
+	Vcl::Actnlist::TAction* acStayOnTop;
+	Vcl::Comctrls::TToolButton* TBSeparator4;
+	Vcl::Comctrls::TToolButton* TBExpand;
+	Vcl::Actnlist::TAction* acExpand;
+	Vcl::Extctrls::TPanel* PATreeAll;
+	Vcl::Extctrls::TPanel* PATree;
+	Vcl::Comctrls::TTreeView* Tree;
+	Vcl::Comctrls::TToolButton* TBInfo;
+	Vcl::Extctrls::TPanel* PABehaviours;
+	Vcl::Comctrls::TToolBar* ToolBarBehaviours;
+	Vcl::Comctrls::TToolButton* TBAddBehaviours;
+	Vcl::Comctrls::TListView* BehavioursListView;
+	Vcl::Extctrls::TPanel* PAEffects;
+	Vcl::Comctrls::TListView* EffectsListView;
+	Vcl::Comctrls::TToolBar* ToolBarEffects;
+	Vcl::Comctrls::TToolButton* TBAddEffects;
+	Vcl::Comctrls::TToolButton* TBGalleryPanel;
+	Vcl::Comctrls::TTreeView* TreeAll;
+	void __fastcall FormCreate(System::TObject* Sender);
+	void __fastcall TreeEditing(System::TObject* Sender, Vcl::Comctrls::TTreeNode* Node, bool &AllowEdit);
+	void __fastcall TreeDragOver(System::TObject* Sender, System::TObject* Source, int X, int Y, System::Uitypes::TDragState State, bool &Accept);
+	void __fastcall TreeDragDrop(System::TObject* Sender, System::TObject* Source, int X, int Y);
+	void __fastcall TreeAllChange(System::TObject* Sender, Vcl::Comctrls::TTreeNode* Node);
+	void __fastcall TreeChange(System::TObject* Sender, Vcl::Comctrls::TTreeNode* Node);
+	void __fastcall TreeMouseDown(System::TObject* Sender, System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall TreeEnter(System::TObject* Sender);
+	void __fastcall TreeMouseMove(System::TObject* Sender, System::Classes::TShiftState Shift, int X, int Y);
+	void __fastcall acDeleteObjectExecute(System::TObject* Sender);
+	void __fastcall acMoveUpExecute(System::TObject* Sender);
+	void __fastcall acMoveDownExecute(System::TObject* Sender);
+	void __fastcall acAddObjectExecute(System::TObject* Sender);
+	void __fastcall acSaveSceneExecute(System::TObject* Sender);
+	void __fastcall acLoadSceneExecute(System::TObject* Sender);
+	void __fastcall FormDestroy(System::TObject* Sender);
+	void __fastcall acInfoExecute(System::TObject* Sender);
+	void __fastcall acCopyExecute(System::TObject* Sender);
+	void __fastcall acCutExecute(System::TObject* Sender);
+	void __fastcall acPasteExecute(System::TObject* Sender);
+	void __fastcall BehavioursListViewEnter(System::TObject* Sender);
+	void __fastcall EffectsListViewEnter(System::TObject* Sender);
+	void __fastcall acAddBehaviourExecute(System::TObject* Sender);
+	void __fastcall DeleteBaseBehaviour(Vcl::Comctrls::TListView* ListView);
+	void __fastcall pmBehavioursToolbarPopup(System::TObject* Sender);
+	void __fastcall pmEffectsToolbarPopup(System::TObject* Sender);
+	void __fastcall BehavioursListViewSelectItem(System::TObject* Sender, Vcl::Comctrls::TListItem* Item, bool Selected);
+	void __fastcall acAddEffectExecute(System::TObject* Sender);
+	void __fastcall PopupMenuPopup(System::TObject* Sender);
+	void __fastcall TBCharacterPanelsClick(System::TObject* Sender);
+	void __fastcall TreeKeyDown(System::TObject* Sender, System::Word &Key, System::Classes::TShiftState Shift);
+	void __fastcall acStayOnTopExecute(System::TObject* Sender);
+	void __fastcall FormKeyDown(System::TObject* Sender, System::Word &Key, System::Classes::TShiftState Shift);
+	void __fastcall acExpandExecute(System::TObject* Sender);
+	
+private:
+	int FSelectedItems;
+	Gls::Scene::TGLScene* FScene;
+	Vcl::Comctrls::TTreeNode* FObjectNode;
+	Vcl::Comctrls::TTreeNode* FSceneObjects;
+	Designintf::_di_IDesigner FCurrentDesigner;
+	System::Types::TPoint FLastMouseDownPos;
+	System::Classes::TComponent* FPasteOwner;
+	Designintf::_di_IDesignerSelections FPasteSelection;
+	void __fastcall ReadScene();
+	void __fastcall ResetTree();
+	Vcl::Comctrls::TTreeNode* __fastcall AddNodesAll(Vcl::Comctrls::TTreeNode* ANode, Gls::Scene::TGLBaseSceneObject* AObject);
+	Vcl::Comctrls::TTreeNode* __fastcall AddNodes(Vcl::Comctrls::TTreeNode* ANode, Gls::Scene::TGLBaseSceneObject* AObject);
+	void __fastcall AddObjectClick(System::TObject* Sender);
+	void __fastcall AddBehaviourClick(System::TObject* Sender);
+	void __fastcall AddEffectClick(System::TObject* Sender);
+	void __fastcall SetObjectsSubItems(Vcl::Menus::TMenuItem* parent);
+	void __fastcall SetXCollectionSubItems(Vcl::Menus::TMenuItem* parent, Gls::Xcollection::TXCollection* XCollection, TSetSubItemsEvent Event);
+	void __fastcall SetBehavioursSubItems(Vcl::Menus::TMenuItem* parent, Gls::Xcollection::TXCollection* XCollection);
+	void __fastcall SetEffectsSubItems(Vcl::Menus::TMenuItem* parent, Gls::Xcollection::TXCollection* XCollection);
+	void __fastcall OnBaseSceneObjectNameChanged(System::TObject* Sender);
+	bool __fastcall IsValidClipBoardNode();
+	bool __fastcall IsPastePossible();
+	void __fastcall ShowBehaviours(Gls::Scene::TGLBaseSceneObject* BaseSceneObject);
+	void __fastcall ShowEffects(Gls::Scene::TGLBaseSceneObject* BaseSceneObject);
+	void __fastcall ShowBehavioursAndEffects(Gls::Scene::TGLBaseSceneObject* BaseSceneObject);
+	void __fastcall EnableAndDisableActions();
+	bool __fastcall CanPaste(Gls::Scene::TGLBaseSceneObject* obj, Gls::Scene::TGLBaseSceneObject* destination);
+	void __fastcall CopyComponents(System::Classes::TComponent* Root, const Designintf::_di_IDesignerSelections Components);
+	void __fastcall MethodError(System::Classes::TReader* Reader, const System::UnicodeString MethodName, void * &Address, bool &Error);
+	bool __fastcall PasteComponents(System::Classes::TComponent* AOwner, System::Classes::TComponent* AParent, const Designintf::_di_IDesignerSelections Components);
+	void __fastcall ReaderSetName(System::Classes::TReader* Reader, System::Classes::TComponent* Component, System::UnicodeString &Name);
+	void __fastcall ComponentRead(System::Classes::TComponent* Component);
+	System::UnicodeString __fastcall UniqueName(System::Classes::TComponent* Component);
+	void __fastcall TreeEdited(System::TObject* Sender, Vcl::Comctrls::TTreeNode* Node, System::UnicodeString &S);
+	
+protected:
+	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
+	
+public:
+	void __fastcall SetScene(Gls::Scene::TGLScene* Scene, Designintf::_di_IDesigner Designer);
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TGLSceneEditorForm(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TGLSceneEditorForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TGLSceneEditorForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TGLSceneEditorForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+static const System::Int8 SCENE_SELECTED = System::Int8(0x0);
+static const System::Int8 BEHAVIOURS_SELECTED = System::Int8(0x1);
+static const System::Int8 EFFECTS_SELECTED = System::Int8(0x2);
+extern DELPHI_PACKAGE TGLSceneEditorForm* __fastcall GLSceneEditorForm(void);
+extern DELPHI_PACKAGE void __fastcall ReleaseGLSceneEditorForm(void);
+}	/* namespace Fmsceneeditor */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMSCENEEDITOR)
+using namespace Fmsceneeditor;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FmsceneeditorHPP

+ 133 - 0
include/Win32/FmShaderMemo.hpp

@@ -0,0 +1,133 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmShaderMemo.pas' rev: 35.00 (Windows)
+
+#ifndef FmshadermemoHPP
+#define FmshadermemoHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <Winapi.Messages.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Variants.hpp>
+#include <System.Classes.hpp>
+#include <System.Win.Registry.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.ImgList.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <Vcl.Menus.hpp>
+#include <Vcl.ActnList.hpp>
+#include <Vcl.ToolWin.hpp>
+#include <Vcl.ExtCtrls.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.Graphics.hpp>
+#include <GLS.Memo.hpp>
+#include <System.Types.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fmshadermemo
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TShaderMemoForm;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TShaderMemoForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Vcl::Controls::TImageList* ImageList;
+	Vcl::Comctrls::TToolBar* ToolBar;
+	Vcl::Comctrls::TToolButton* TBOpen;
+	Vcl::Comctrls::TToolButton* TBSave;
+	Vcl::Comctrls::TToolButton* TBStayOnTop;
+	Vcl::Comctrls::TToolButton* TBHelp;
+	Vcl::Comctrls::TToolButton* ToolButton2;
+	Vcl::Comctrls::TToolButton* TBCopy;
+	Vcl::Comctrls::TToolButton* TBPaste;
+	Vcl::Comctrls::TToolButton* TBCut;
+	Vcl::Comctrls::TToolButton* ToolButton10;
+	Vcl::Comctrls::TToolButton* TBTemplate;
+	Vcl::Comctrls::TToolButton* TBUndo;
+	Vcl::Comctrls::TToolButton* TBRedo;
+	Vcl::Comctrls::TToolButton* ToolButton4;
+	Gls::Memo::TGLSSynHiMemo* GLSLMemo;
+	Vcl::Dialogs::TOpenDialog* OpenDialog;
+	Vcl::Dialogs::TSaveDialog* SaveDialog;
+	Vcl::Menus::TPopupMenu* TemplateMenu;
+	Vcl::Menus::TMenuItem* GLSL120;
+	Vcl::Menus::TMenuItem* GLSL330;
+	Vcl::Menus::TMenuItem* GLSL400;
+	Vcl::Menus::TMenuItem* N1;
+	Vcl::Menus::TMenuItem* N2;
+	Vcl::Stdctrls::TMemo* CompilatorLog;
+	Vcl::Comctrls::TToolButton* TBIncIndent;
+	Vcl::Comctrls::TToolButton* TBDecIndent;
+	Vcl::Comctrls::TToolButton* TBComment;
+	Vcl::Comctrls::TToolButton* TBUncoment;
+	Vcl::Comctrls::TToolButton* ToolButton1;
+	Vcl::Extctrls::TPanel* Panel1;
+	Vcl::Stdctrls::TButton* CancelButton;
+	Vcl::Stdctrls::TButton* OKButton;
+	Vcl::Stdctrls::TButton* CheckButton;
+	void __fastcall FormCreate(System::TObject* Sender);
+	void __fastcall FormDestroy(System::TObject* Sender);
+	void __fastcall GLSLMemoGutterClick(System::TObject* Sender, int LineNo);
+	void __fastcall GLSLMemoGutterDraw(System::TObject* Sender, Vcl::Graphics::TCanvas* ACanvas, int LineNo, const System::Types::TRect &rct);
+	void __fastcall TBOpenClick(System::TObject* Sender);
+	void __fastcall TBSaveClick(System::TObject* Sender);
+	void __fastcall TBStayOnTopClick(System::TObject* Sender);
+	void __fastcall TBUndoClick(System::TObject* Sender);
+	void __fastcall GLSLMemoUndoChange(System::TObject* Sender, bool CanUndo, bool CanRedo);
+	void __fastcall TBRedoClick(System::TObject* Sender);
+	void __fastcall TBCopyClick(System::TObject* Sender);
+	void __fastcall TBPasteClick(System::TObject* Sender);
+	void __fastcall TBCutClick(System::TObject* Sender);
+	void __fastcall CheckButtonClick(System::TObject* Sender);
+	void __fastcall TBIncIndentClick(System::TObject* Sender);
+	void __fastcall TBDecIndentClick(System::TObject* Sender);
+	void __fastcall TBCommentClick(System::TObject* Sender);
+	void __fastcall TBUncomentClick(System::TObject* Sender);
+	void __fastcall FormShow(System::TObject* Sender);
+	
+private:
+	int FLightLineStyle;
+	System::Classes::TNotifyEvent FOnCheck;
+	void __fastcall OnTemplateClick(System::TObject* Sender);
+	
+public:
+	__property System::Classes::TNotifyEvent OnCheck = {read=FOnCheck, write=FOnCheck};
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TShaderMemoForm(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TShaderMemoForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TShaderMemoForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TShaderMemoForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TShaderMemoForm* __fastcall GLShaderEditorForm(void);
+extern DELPHI_PACKAGE void __fastcall ReleaseGLShaderEditor(void);
+}	/* namespace Fmshadermemo */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMSHADERMEMO)
+using namespace Fmshadermemo;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FmshadermemoHPP

+ 104 - 0
include/Win32/FmShaderUniformEditor.hpp

@@ -0,0 +1,104 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmShaderUniformEditor.pas' rev: 35.00 (Windows)
+
+#ifndef FmshaderuniformeditorHPP
+#define FmshaderuniformeditorHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Variants.hpp>
+#include <System.Classes.hpp>
+#include <Vcl.Graphics.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.ExtCtrls.hpp>
+#include <Vcl.Buttons.hpp>
+#include <GLS.Strings.hpp>
+#include <GLSL.ShaderParameter.hpp>
+#include <GLS.TextureFormat.hpp>
+#include <GLS.VectorGeometry.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fmshaderuniformeditor
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLShaderUniformEditor;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLShaderUniformEditor : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+	
+private:
+	typedef System::DynamicArray<Glsl::Shaderparameter::_di_IShaderParameter> _TGLShaderUniformEditor__1;
+	
+	
+__published:
+	Vcl::Stdctrls::TListBox* LBUniforms;
+	Vcl::Stdctrls::TLabel* Labe1;
+	Vcl::Stdctrls::TComboBox* AutoSetBox;
+	Vcl::Stdctrls::TComboBox* SamplerBox;
+	Vcl::Extctrls::TPanel* Panel1;
+	Vcl::Extctrls::TRadioGroup* RedGroup;
+	Vcl::Extctrls::TRadioGroup* GreenGroup;
+	Vcl::Extctrls::TRadioGroup* BlueGroup;
+	Vcl::Extctrls::TRadioGroup* AlphaGroup;
+	Vcl::Stdctrls::TLabel* Label1;
+	Vcl::Stdctrls::TLabel* Label2;
+	Vcl::Stdctrls::TLabel* Label3;
+	Vcl::Stdctrls::TLabel* Label4;
+	Vcl::Stdctrls::TComboBox* TextureBox;
+	Vcl::Stdctrls::TButton* Button1;
+	void __fastcall FormDestroy(System::TObject* Sender);
+	void __fastcall LBUniformsClick(System::TObject* Sender);
+	void __fastcall ColorGroupClick(System::TObject* Sender);
+	void __fastcall AutoSetBoxChange(System::TObject* Sender);
+	void __fastcall TextureBoxChange(System::TObject* Sender);
+	void __fastcall SamplerBoxChange(System::TObject* Sender);
+	void __fastcall LBUniformsKeyPress(System::TObject* Sender, System::WideChar &Key);
+	
+private:
+	_TGLShaderUniformEditor__1 FUniformList;
+	
+public:
+	void __fastcall Clear();
+	void __fastcall AddTextureName(const System::UnicodeString S);
+	void __fastcall AddSamplerName(const System::UnicodeString S);
+	void __fastcall AddUniform(Glsl::Shaderparameter::_di_IShaderParameter AValue);
+	void __fastcall Execute();
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TGLShaderUniformEditor(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TGLShaderUniformEditor(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TGLShaderUniformEditor() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TGLShaderUniformEditor(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TGLShaderUniformEditor* __fastcall GLShaderUniformEditor(void);
+extern DELPHI_PACKAGE void __fastcall ReleaseShaderUniformEditor(void);
+}	/* namespace Fmshaderuniformeditor */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMSHADERUNIFORMEDITOR)
+using namespace Fmshaderuniformeditor;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FmshaderuniformeditorHPP

+ 110 - 0
include/Win32/FmVectorEditor.hpp

@@ -0,0 +1,110 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmVectorEditor.pas' rev: 35.00 (Windows)
+
+#ifndef FmvectoreditorHPP
+#define FmvectoreditorHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.StdCtrls.hpp>
+#include <Vcl.ToolWin.hpp>
+#include <Vcl.ExtCtrls.hpp>
+#include <Vcl.Buttons.hpp>
+#include <Vcl.Graphics.hpp>
+#include <Vcl.Controls.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.Utils.hpp>
+#include <GLS.VectorTypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fmvectoreditor
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLVectorEditorForm;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLVectorEditorForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Vcl::Stdctrls::TEdit* EDx;
+	Vcl::Stdctrls::TLabel* Label1;
+	Vcl::Stdctrls::TLabel* Label2;
+	Vcl::Stdctrls::TLabel* Label3;
+	Vcl::Stdctrls::TEdit* EDy;
+	Vcl::Stdctrls::TEdit* EDz;
+	Vcl::Buttons::TBitBtn* BBok;
+	Vcl::Buttons::TBitBtn* BBcancel;
+	Vcl::Extctrls::TImage* IMx;
+	Vcl::Extctrls::TImage* IMy;
+	Vcl::Extctrls::TImage* IMz;
+	Vcl::Buttons::TSpeedButton* SpeedButton1;
+	Vcl::Buttons::TSpeedButton* SBmX;
+	Vcl::Buttons::TSpeedButton* SpeedButton3;
+	Vcl::Buttons::TSpeedButton* SBmY;
+	Vcl::Buttons::TSpeedButton* SpeedButton5;
+	Vcl::Buttons::TSpeedButton* SBmZ;
+	Vcl::Buttons::TSpeedButton* SpeedButton7;
+	Vcl::Buttons::TSpeedButton* SBUnit;
+	Vcl::Buttons::TSpeedButton* SpeedButton9;
+	Vcl::Extctrls::TBevel* Bevel1;
+	Vcl::Buttons::TSpeedButton* SBInvert;
+	void __fastcall TBxClick(System::TObject* Sender);
+	void __fastcall TByClick(System::TObject* Sender);
+	void __fastcall TBzClick(System::TObject* Sender);
+	void __fastcall TBnullClick(System::TObject* Sender);
+	void __fastcall EDxChange(System::TObject* Sender);
+	void __fastcall EDyChange(System::TObject* Sender);
+	void __fastcall EDzChange(System::TObject* Sender);
+	void __fastcall SBmXClick(System::TObject* Sender);
+	void __fastcall SBmYClick(System::TObject* Sender);
+	void __fastcall SBmZClick(System::TObject* Sender);
+	void __fastcall SBUnitClick(System::TObject* Sender);
+	void __fastcall SpeedButton9Click(System::TObject* Sender);
+	void __fastcall SBInvertClick(System::TObject* Sender);
+	
+private:
+	float vx;
+	float vy;
+	float vz;
+	void __fastcall TestInput(Vcl::Stdctrls::TEdit* edit, Vcl::Extctrls::TImage* imError, float &dest);
+	
+public:
+	bool __fastcall Execute(float &x, float &y, float &z);
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TGLVectorEditorForm(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TGLVectorEditorForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TGLVectorEditorForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TGLVectorEditorForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TGLVectorEditorForm* __fastcall GLVectorEditorForm(void);
+extern DELPHI_PACKAGE void __fastcall ReleaseVectorEditorForm(void);
+}	/* namespace Fmvectoreditor */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMVECTOREDITOR)
+using namespace Fmvectoreditor;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FmvectoreditorHPP

+ 117 - 0
include/Win32/FmXCollectionEditor.hpp

@@ -0,0 +1,117 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'FmXCollectionEditor.pas' rev: 35.00 (Windows)
+
+#ifndef FmxcollectioneditorHPP
+#define FmxcollectioneditorHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Actions.hpp>
+#include <System.ImageList.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.ImgList.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.ActnList.hpp>
+#include <Vcl.Menus.hpp>
+#include <Vcl.ComCtrls.hpp>
+#include <Vcl.ToolWin.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <DesignIntf.hpp>
+#include <GLS.Strings.hpp>
+#include <GLS.Scene.hpp>
+#include <GLS.Behaviours.hpp>
+#include <GLS.MaterialEx.hpp>
+#include <GLS.XCollection.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Fmxcollectioneditor
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TXCollectionEditorForm;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TXCollectionEditorForm : public Vcl::Forms::TForm
+{
+	typedef Vcl::Forms::TForm inherited;
+	
+__published:
+	Vcl::Comctrls::TListView* ListView;
+	Vcl::Menus::TPopupMenu* PMListView;
+	Vcl::Actnlist::TActionList* ActionList;
+	Vcl::Actnlist::TAction* ACRemove;
+	Vcl::Actnlist::TAction* ACMoveUp;
+	Vcl::Actnlist::TAction* ACMoveDown;
+	Vcl::Controls::TImageList* ImageList;
+	Vcl::Menus::TMenuItem* MIAdd;
+	Vcl::Menus::TMenuItem* N1;
+	Vcl::Menus::TMenuItem* N2;
+	Vcl::Menus::TMenuItem* Moveup1;
+	Vcl::Menus::TMenuItem* Movedown1;
+	Vcl::Comctrls::TToolBar* ToolBar1;
+	Vcl::Comctrls::TToolButton* TBAdd;
+	Vcl::Comctrls::TToolButton* ToolButton2;
+	Vcl::Comctrls::TToolButton* ToolButton3;
+	Vcl::Comctrls::TToolButton* ToolButton4;
+	Vcl::Comctrls::TToolButton* ToolButton5;
+	Vcl::Comctrls::TToolButton* ToolButton6;
+	Vcl::Menus::TPopupMenu* PMToolBar;
+	void __fastcall TBAddClick(System::TObject* Sender);
+	void __fastcall ListViewChange(System::TObject* Sender, Vcl::Comctrls::TListItem* Item, Vcl::Comctrls::TItemChange Change);
+	void __fastcall ACRemoveExecute(System::TObject* Sender);
+	void __fastcall ACMoveUpExecute(System::TObject* Sender);
+	void __fastcall ACMoveDownExecute(System::TObject* Sender);
+	void __fastcall PMToolBarPopup(System::TObject* Sender);
+	void __fastcall PMListViewPopup(System::TObject* Sender);
+	void __fastcall FormCreate(System::TObject* Sender);
+	void __fastcall FormDestroy(System::TObject* Sender);
+	void __fastcall FormHide(System::TObject* Sender);
+	
+private:
+	Gls::Xcollection::TXCollection* FXCollection;
+	Designintf::_di_IDesigner FDesigner;
+	bool UpdatingListView;
+	void __fastcall PrepareListView();
+	void __fastcall PrepareXCollectionItemPopup(Vcl::Menus::TMenuItem* parent);
+	void __fastcall OnAddXCollectionItemClick(System::TObject* Sender);
+	void __fastcall OnNameChanged(System::TObject* Sender);
+	void __fastcall OnXCollectionDestroyed(System::TObject* Sender);
+	
+protected:
+	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
+	
+public:
+	void __fastcall SetXCollection(Gls::Xcollection::TXCollection* aXCollection, Designintf::_di_IDesigner designer);
+public:
+	/* TCustomForm.Create */ inline __fastcall virtual TXCollectionEditorForm(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
+	/* TCustomForm.CreateNew */ inline __fastcall virtual TXCollectionEditorForm(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
+	/* TCustomForm.Destroy */ inline __fastcall virtual ~TXCollectionEditorForm() { }
+	
+public:
+	/* TWinControl.CreateParented */ inline __fastcall TXCollectionEditorForm(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE TXCollectionEditorForm* __fastcall XCollectionEditorForm(void);
+extern DELPHI_PACKAGE void __fastcall ReleaseXCollectionEditor(void);
+}	/* namespace Fmxcollectioneditor */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FMXCOLLECTIONEDITOR)
+using namespace Fmxcollectioneditor;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// FmxcollectioneditorHPP

+ 312 - 0
include/Win32/Formats.B3D.hpp

@@ -0,0 +1,312 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.B3D.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_B3dHPP
+#define Formats_B3dHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.VectorLists.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace B3d
+{
+//-- forward type declarations -----------------------------------------------
+struct TB3DChunk;
+struct TBB3DChunk;
+struct TTEXSChunk;
+struct TBRUSChunk;
+struct TVertexData;
+struct TVRTSChunk;
+struct TTRISChunk;
+struct TMESHChunk;
+struct TBONEChunk;
+struct TKEYSChunk;
+struct TANIMChunk;
+struct TNODEChunk;
+class DELPHICLASS TB3DMaterial;
+class DELPHICLASS TB3DTexture;
+class DELPHICLASS TB3DNode;
+class DELPHICLASS TFileB3D;
+//-- type declarations -------------------------------------------------------
+enum DECLSPEC_DENUM TB3DChunkType : unsigned char { bctUnknown, bctHeader, bctTexture, bctBrush, bctNode, bctVertex, bctTriangle, bctMesh, bctBone, bctKeyFrame, bctAnimation };
+
+typedef TB3DChunk *PB3DChunk;
+
+struct DECLSPEC_DRECORD TB3DChunk
+{
+public:
+	System::StaticArray<System::WideChar, 4> chunk;
+	int length;
+};
+
+
+typedef TBB3DChunk *PBB3DChunk;
+
+struct DECLSPEC_DRECORD TBB3DChunk
+{
+public:
+	int Version;
+};
+
+
+typedef TTEXSChunk *PTEXSChunk;
+
+struct DECLSPEC_DRECORD TTEXSChunk
+{
+public:
+	System::StaticArray<System::WideChar, 256> fileName;
+	int flags;
+	int blend;
+	float x_pos;
+	float y_pos;
+	float x_scale;
+	float y_scale;
+	float rotation;
+};
+
+
+typedef TBRUSChunk *PBRUSChunk;
+
+struct DECLSPEC_DRECORD TBRUSChunk
+{
+	
+private:
+	typedef System::DynamicArray<int> _TBRUSChunk__1;
+	
+	
+public:
+	int n_texs;
+	System::StaticArray<System::WideChar, 256> name;
+	float red;
+	float green;
+	float blue;
+	float alpha;
+	float shininess;
+	int blend;
+	int fx;
+	_TBRUSChunk__1 texture_id;
+};
+
+
+typedef TVertexData *PVertexData;
+
+struct DECLSPEC_DRECORD TVertexData
+{
+	
+private:
+	typedef System::DynamicArray<float> _TVertexData__1;
+	
+	
+public:
+	TVertexData *next;
+	float x;
+	float y;
+	float z;
+	float nx;
+	float ny;
+	float nz;
+	float red;
+	float green;
+	float blue;
+	float alpha;
+	_TVertexData__1 tex_coords;
+};
+
+
+typedef TVRTSChunk *PVRTSChunk;
+
+struct DECLSPEC_DRECORD TVRTSChunk
+{
+public:
+	int flags;
+	int tex_coord_sets;
+	int tex_coord_set_size;
+	TVertexData *vertices;
+};
+
+
+typedef TTRISChunk *PTRISChunk;
+
+struct DECLSPEC_DRECORD TTRISChunk
+{
+	
+private:
+	typedef System::DynamicArray<int> _TTRISChunk__1;
+	
+	
+public:
+	TTRISChunk *next;
+	int brush_id;
+	_TTRISChunk__1 vertex_id;
+};
+
+
+typedef TMESHChunk *PMESHChunk;
+
+struct DECLSPEC_DRECORD TMESHChunk
+{
+public:
+	int brush_id;
+	TVRTSChunk vertices;
+	TTRISChunk *triangles;
+};
+
+
+typedef TBONEChunk *PBONEChunk;
+
+struct DECLSPEC_DRECORD TBONEChunk
+{
+public:
+	int vertex_id;
+	float weight;
+};
+
+
+typedef TKEYSChunk *PKEYSChunk;
+
+struct DECLSPEC_DRECORD TKEYSChunk
+{
+public:
+	TKEYSChunk *next;
+	int flags;
+	int frame;
+	Gls::Vectortypes::TVector3f position;
+	Gls::Vectortypes::TVector3f scale;
+	Gls::Vectortypes::TVector4f rotation;
+};
+
+
+typedef TANIMChunk *PANIMChunk;
+
+struct DECLSPEC_DRECORD TANIMChunk
+{
+public:
+	int flags;
+	int frames;
+	float fps;
+};
+
+
+typedef TNODEChunk *PNODEChunk;
+
+struct DECLSPEC_DRECORD TNODEChunk
+{
+public:
+	System::StaticArray<System::WideChar, 256> name;
+	Gls::Vectortypes::TVector3f position;
+	Gls::Vectortypes::TVector3f scale;
+	Gls::Vectortypes::TVector4f rotation;
+	TMESHChunk *meshes;
+	TKEYSChunk *keys;
+	TNODEChunk *nodes;
+	TANIMChunk animation;
+	TNODEChunk *next;
+	int level;
+};
+
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TB3DMaterial : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+public:
+	TBRUSChunk MaterialData;
+	__fastcall TB3DMaterial();
+	__fastcall virtual ~TB3DMaterial();
+	System::UnicodeString __fastcall GetMaterialName();
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TB3DTexture : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+public:
+	TTEXSChunk TextureData;
+	__fastcall TB3DTexture();
+	__fastcall virtual ~TB3DTexture();
+	System::UnicodeString __fastcall GetTextureName();
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TB3DNode : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+public:
+	TNODEChunk *NodeData;
+	__fastcall TB3DNode();
+	__fastcall virtual ~TB3DNode();
+	System::UnicodeString __fastcall GetNodeName();
+	void __fastcall DestroyNodeData(PNODEChunk Node);
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TFileB3D : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+private:
+	System::Classes::TStringList* fTextures;
+	System::Classes::TStringList* fMaterials;
+	TB3DNode* fNodes;
+	void __fastcall FreeLists();
+	TB3DChunkType __fastcall GetChunkType(const TB3DChunk &aChunk);
+	int __fastcall SkipChunk(System::Classes::TStream* aStream, const TB3DChunk &aChunk);
+	int __fastcall ReadTextureChunk(System::Classes::TStream* aStream, const TB3DChunk &aChunk);
+	int __fastcall ReadMaterialChunk(System::Classes::TStream* aStream, const TB3DChunk &aChunk);
+	int __fastcall ReadNodeChunk(System::Classes::TStream* aStream, const TB3DChunk &aChunk, PNODEChunk Node, int level);
+	int __fastcall ReadMeshChunk(System::Classes::TStream* aStream, const TB3DChunk &aChunk, PMESHChunk Mesh);
+	int __fastcall ReadVerticesChunk(System::Classes::TStream* aStream, const TB3DChunk &aChunk, PVRTSChunk Vertices);
+	int __fastcall ReadTrianglesChunk(System::Classes::TStream* aStream, const TB3DChunk &aChunk, PTRISChunk Triangle);
+	
+public:
+	__fastcall virtual TFileB3D();
+	__fastcall virtual ~TFileB3D();
+	void __fastcall LoadFromStream(System::Classes::TStream* aStream);
+	void __fastcall Check();
+	__property System::Classes::TStringList* Textures = {read=fTextures};
+	__property System::Classes::TStringList* Materials = {read=fMaterials};
+	__property TB3DNode* Nodes = {read=fNodes};
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace B3d */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_B3D)
+using namespace Formats::B3d;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_B3dHPP

+ 91 - 0
include/Win32/Formats.DDSImage.hpp

@@ -0,0 +1,91 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.DDSImage.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_DdsimageHPP
+#define Formats_DdsimageHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <Vcl.Graphics.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.Graphics.hpp>
+#include <GLS.Context.hpp>
+#include <GLS.FileDDS.hpp>
+#include <GLS.TextureFormat.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Ddsimage
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TDDSImage;
+class DELPHICLASS EDDSException;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TDDSImage : public Vcl::Graphics::TBitmap
+{
+	typedef Vcl::Graphics::TBitmap inherited;
+	
+public:
+	virtual void __fastcall LoadFromStream(System::Classes::TStream* stream);
+	virtual void __fastcall SaveToStream(System::Classes::TStream* stream);
+public:
+	/* TBitmap.Create */ inline __fastcall virtual TDDSImage()/* overload */ : Vcl::Graphics::TBitmap() { }
+	/* TBitmap.Create */ inline __fastcall TDDSImage(int AWidth, int AHeight)/* overload */ : Vcl::Graphics::TBitmap(AWidth, AHeight) { }
+	/* TBitmap.Destroy */ inline __fastcall virtual ~TDDSImage() { }
+	
+};
+
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION EDDSException : public System::Sysutils::Exception
+{
+	typedef System::Sysutils::Exception inherited;
+	
+public:
+	/* Exception.Create */ inline __fastcall EDDSException(const System::UnicodeString Msg) : System::Sysutils::Exception(Msg) { }
+	/* Exception.CreateFmt */ inline __fastcall EDDSException(const System::UnicodeString Msg, const System::TVarRec *Args, const int Args_High) : System::Sysutils::Exception(Msg, Args, Args_High) { }
+	/* Exception.CreateRes */ inline __fastcall EDDSException(NativeUInt Ident)/* overload */ : System::Sysutils::Exception(Ident) { }
+	/* Exception.CreateRes */ inline __fastcall EDDSException(System::PResStringRec ResStringRec)/* overload */ : System::Sysutils::Exception(ResStringRec) { }
+	/* Exception.CreateResFmt */ inline __fastcall EDDSException(NativeUInt Ident, const System::TVarRec *Args, const int Args_High)/* overload */ : System::Sysutils::Exception(Ident, Args, Args_High) { }
+	/* Exception.CreateResFmt */ inline __fastcall EDDSException(System::PResStringRec ResStringRec, const System::TVarRec *Args, const int Args_High)/* overload */ : System::Sysutils::Exception(ResStringRec, Args, Args_High) { }
+	/* Exception.CreateHelp */ inline __fastcall EDDSException(const System::UnicodeString Msg, int AHelpContext) : System::Sysutils::Exception(Msg, AHelpContext) { }
+	/* Exception.CreateFmtHelp */ inline __fastcall EDDSException(const System::UnicodeString Msg, const System::TVarRec *Args, const int Args_High, int AHelpContext) : System::Sysutils::Exception(Msg, Args, Args_High, AHelpContext) { }
+	/* Exception.CreateResHelp */ inline __fastcall EDDSException(NativeUInt Ident, int AHelpContext)/* overload */ : System::Sysutils::Exception(Ident, AHelpContext) { }
+	/* Exception.CreateResHelp */ inline __fastcall EDDSException(System::PResStringRec ResStringRec, int AHelpContext)/* overload */ : System::Sysutils::Exception(ResStringRec, AHelpContext) { }
+	/* Exception.CreateResFmtHelp */ inline __fastcall EDDSException(System::PResStringRec ResStringRec, const System::TVarRec *Args, const int Args_High, int AHelpContext)/* overload */ : System::Sysutils::Exception(ResStringRec, Args, Args_High, AHelpContext) { }
+	/* Exception.CreateResFmtHelp */ inline __fastcall EDDSException(NativeUInt Ident, const System::TVarRec *Args, const int Args_High, int AHelpContext)/* overload */ : System::Sysutils::Exception(Ident, Args, Args_High, AHelpContext) { }
+	/* Exception.Destroy */ inline __fastcall virtual ~EDDSException() { }
+	
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Ddsimage */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_DDSIMAGE)
+using namespace Formats::Ddsimage;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_DdsimageHPP

+ 339 - 0
include/Win32/Formats.DXTC.hpp

@@ -0,0 +1,339 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.DXTC.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_DxtcHPP
+#define Formats_DxtcHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.OpenGL.hpp>
+#include <Winapi.OpenGLext.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.TextureFormat.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Dxtc
+{
+//-- forward type declarations -----------------------------------------------
+struct TDDPIXELFORMAT;
+struct TDDSURFACEDESC2;
+struct TDDSHeader;
+struct DXTColBlock;
+struct DXT3AlphaBlock;
+struct DXT5AlphaBlock;
+struct TDDS_HEADER_DXT10;
+struct TGLImageDataFormat;
+//-- type declarations -------------------------------------------------------
+struct DECLSPEC_DRECORD TDDPIXELFORMAT
+{
+public:
+	unsigned dwSize;
+	unsigned dwFlags;
+	unsigned dwFourCC;
+	unsigned dwRGBBitCount;
+	unsigned dwRBitMask;
+	unsigned dwGBitMask;
+	unsigned dwBBitMask;
+	unsigned dwRGBAlphaBitMask;
+};
+
+
+struct DECLSPEC_DRECORD TDDSURFACEDESC2
+{
+public:
+	unsigned dwSize;
+	unsigned dwFlags;
+	unsigned dwHeight;
+	unsigned dwWidth;
+	unsigned dwPitchOrLinearSize;
+	unsigned dwDepth;
+	unsigned dwMipMapCount;
+	System::StaticArray<unsigned, 11> dwReserved1;
+	TDDPIXELFORMAT ddpf;
+	unsigned dwCaps;
+	unsigned dwCaps2;
+	unsigned dwCaps3;
+	unsigned dwCaps4;
+	unsigned dwReserved2;
+};
+
+
+struct DECLSPEC_DRECORD TDDSHeader
+{
+public:
+	unsigned Magic;
+	TDDSURFACEDESC2 SurfaceFormat;
+};
+
+
+struct DECLSPEC_DRECORD DXTColBlock
+{
+public:
+	System::Word col0;
+	System::Word col1;
+	System::StaticArray<System::Byte, 4> row;
+};
+
+
+typedef DXTColBlock *PDXTColBlock;
+
+struct DECLSPEC_DRECORD DXT3AlphaBlock
+{
+public:
+	System::StaticArray<System::Word, 4> row;
+};
+
+
+typedef DXT3AlphaBlock *PDXT3AlphaBlock;
+
+struct DECLSPEC_DRECORD DXT5AlphaBlock
+{
+public:
+	System::Byte alpha0;
+	System::Byte alpha1;
+	System::StaticArray<System::Byte, 6> row;
+};
+
+
+typedef DXT5AlphaBlock *PDXT5AlphaBlock;
+
+struct DECLSPEC_DRECORD TDDS_HEADER_DXT10
+{
+public:
+	int dxgiFormat;
+	int resourceDimension;
+	unsigned miscFlag;
+	unsigned arraySize;
+	unsigned reserved;
+};
+
+
+typedef System::StaticArray<char, 4> TFOURCC;
+
+struct DECLSPEC_DRECORD TGLImageDataFormat
+{
+public:
+	unsigned ColorFlag;
+	unsigned RBits;
+	unsigned GBits;
+	unsigned BBits;
+	unsigned ABits;
+	unsigned colorFormat;
+	Gls::Textureformat::TGLInternalFormat TexFormat;
+	unsigned dType;
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+static const System::Int8 DDSD_CAPS = System::Int8(0x1);
+static const System::Int8 DDSD_HEIGHT = System::Int8(0x2);
+static const System::Int8 DDSD_WIDTH = System::Int8(0x4);
+static const System::Int8 DDSD_PITCH = System::Int8(0x8);
+static const System::Word DDSD_PIXELFORMAT = System::Word(0x1000);
+static const int DDSD_MIPMAPCOUNT = int(0x20000);
+static const int DDSD_LINEARSIZE = int(0x80000);
+static const int DDSD_DEPTH = int(0x800000);
+static const System::Int8 DDPF_ALPHAPIXELS = System::Int8(0x1);
+static const System::Int8 DDPF_A = System::Int8(0x2);
+static const System::Int8 DDPF_FOURCC = System::Int8(0x4);
+static const System::Int8 DDPF_RGB = System::Int8(0x40);
+static const System::Int8 DDPF_RGBA = System::Int8(0x41);
+static const int DDPF_L = int(0x20000);
+static const int DDPF_LA = int(0x20001);
+static const System::Int8 DDSCAPS_COMPLEX = System::Int8(0x8);
+static const System::Word DDSCAPS_TEXTURE = System::Word(0x1000);
+static const int DDSCAPS_MIPMAP = int(0x400000);
+static const System::Word DDSCAPS2_CUBEMAP = System::Word(0x200);
+static const System::Word DDSCAPS2_CUBEMAP_POSITIVEX = System::Word(0x400);
+static const System::Word DDSCAPS2_CUBEMAP_NEGATIVEX = System::Word(0x800);
+static const System::Word DDSCAPS2_CUBEMAP_POSITIVEY = System::Word(0x1000);
+static const System::Word DDSCAPS2_CUBEMAP_NEGATIVEY = System::Word(0x2000);
+static const System::Word DDSCAPS2_CUBEMAP_POSITIVEZ = System::Word(0x4000);
+static const System::Word DDSCAPS2_CUBEMAP_NEGATIVEZ = System::Word(0x8000);
+static const int DDSCAPS2_VOLUME = int(0x200000);
+static const System::Int8 DXGI_FORMAT_FORCE_UINT = System::Int8(-1);
+static const System::Int8 DXGI_FORMAT_UNKNOWN = System::Int8(0x0);
+static const System::Int8 DXGI_FORMAT_R32G32B32A32_TYPELESS = System::Int8(0x1);
+static const System::Int8 DXGI_FORMAT_R32G32B32A32_FLOAT = System::Int8(0x2);
+static const System::Int8 DXGI_FORMAT_R32G32B32A32_UINT = System::Int8(0x3);
+static const System::Int8 DXGI_FORMAT_R32G32B32A32_SINT = System::Int8(0x4);
+static const System::Int8 DXGI_FORMAT_R32G32B32_TYPELESS = System::Int8(0x5);
+static const System::Int8 DXGI_FORMAT_R32G32B32_FLOAT = System::Int8(0x6);
+static const System::Int8 DXGI_FORMAT_R32G32B32_UINT = System::Int8(0x7);
+static const System::Int8 DXGI_FORMAT_R32G32B32_SINT = System::Int8(0x8);
+static const System::Int8 DXGI_FORMAT_R16G16B16A16_TYPELESS = System::Int8(0x9);
+static const System::Int8 DXGI_FORMAT_R16G16B16A16_FLOAT = System::Int8(0xa);
+static const System::Int8 DXGI_FORMAT_R16G16B16A16_UNORM = System::Int8(0xb);
+static const System::Int8 DXGI_FORMAT_R16G16B16A16_UINT = System::Int8(0xc);
+static const System::Int8 DXGI_FORMAT_R16G16B16A16_SNORM = System::Int8(0xd);
+static const System::Int8 DXGI_FORMAT_R16G16B16A16_SINT = System::Int8(0xe);
+static const System::Int8 DXGI_FORMAT_R32G32_TYPELESS = System::Int8(0xf);
+static const System::Int8 DXGI_FORMAT_R32G32_FLOAT = System::Int8(0x10);
+static const System::Int8 DXGI_FORMAT_R32G32_UINT = System::Int8(0x11);
+static const System::Int8 DXGI_FORMAT_R32G32_SINT = System::Int8(0x12);
+static const System::Int8 DXGI_FORMAT_R32G8X24_TYPELESS = System::Int8(0x13);
+static const System::Int8 DXGI_FORMAT_D32_FLOAT_S8X24_UINT = System::Int8(0x14);
+static const System::Int8 DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS = System::Int8(0x15);
+static const System::Int8 DXGI_FORMAT_X32_TYPELESS_G8X24_UINT = System::Int8(0x16);
+static const System::Int8 DXGI_FORMAT_R10G10B10A2_TYPELESS = System::Int8(0x17);
+static const System::Int8 DXGI_FORMAT_R10G10B10A2_UNORM = System::Int8(0x18);
+static const System::Int8 DXGI_FORMAT_R10G10B10A2_UINT = System::Int8(0x19);
+static const System::Int8 DXGI_FORMAT_R11G11B10_FLOAT = System::Int8(0x1a);
+static const System::Int8 DXGI_FORMAT_R8G8B8A8_TYPELESS = System::Int8(0x1b);
+static const System::Int8 DXGI_FORMAT_R8G8B8A8_UNORM = System::Int8(0x1c);
+static const System::Int8 DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = System::Int8(0x1d);
+static const System::Int8 DXGI_FORMAT_R8G8B8A8_UINT = System::Int8(0x1e);
+static const System::Int8 DXGI_FORMAT_R8G8B8A8_SNORM = System::Int8(0x1f);
+static const System::Int8 DXGI_FORMAT_R8G8B8A8_SINT = System::Int8(0x20);
+static const System::Int8 DXGI_FORMAT_R16G16_TYPELESS = System::Int8(0x21);
+static const System::Int8 DXGI_FORMAT_R16G16_FLOAT = System::Int8(0x22);
+static const System::Int8 DXGI_FORMAT_R16G16_UNORM = System::Int8(0x23);
+static const System::Int8 DXGI_FORMAT_R16G16_UINT = System::Int8(0x24);
+static const System::Int8 DXGI_FORMAT_R16G16_SNORM = System::Int8(0x25);
+static const System::Int8 DXGI_FORMAT_R16G16_SINT = System::Int8(0x26);
+static const System::Int8 DXGI_FORMAT_R32_TYPELESS = System::Int8(0x27);
+static const System::Int8 DXGI_FORMAT_D32_FLOAT = System::Int8(0x28);
+static const System::Int8 DXGI_FORMAT_R32_FLOAT = System::Int8(0x29);
+static const System::Int8 DXGI_FORMAT_R32_UINT = System::Int8(0x2a);
+static const System::Int8 DXGI_FORMAT_R32_SINT = System::Int8(0x2b);
+static const System::Int8 DXGI_FORMAT_R24G8_TYPELESS = System::Int8(0x2c);
+static const System::Int8 DXGI_FORMAT_D24_UNORM_S8_UINT = System::Int8(0x2d);
+static const System::Int8 DXGI_FORMAT_R24_UNORM_X8_TYPELESS = System::Int8(0x2e);
+static const System::Int8 DXGI_FORMAT_X24_TYPELESS_G8_UINT = System::Int8(0x2f);
+static const System::Int8 DXGI_FORMAT_R8G8_TYPELESS = System::Int8(0x30);
+static const System::Int8 DXGI_FORMAT_R8G8_UNORM = System::Int8(0x31);
+static const System::Int8 DXGI_FORMAT_R8G8_UINT = System::Int8(0x32);
+static const System::Int8 DXGI_FORMAT_R8G8_SNORM = System::Int8(0x33);
+static const System::Int8 DXGI_FORMAT_R8G8_SINT = System::Int8(0x34);
+static const System::Int8 DXGI_FORMAT_R16_TYPELESS = System::Int8(0x35);
+static const System::Int8 DXGI_FORMAT_R16_FLOAT = System::Int8(0x36);
+static const System::Int8 DXGI_FORMAT_D16_UNORM = System::Int8(0x37);
+static const System::Int8 DXGI_FORMAT_R16_UNORM = System::Int8(0x38);
+static const System::Int8 DXGI_FORMAT_R16_UINT = System::Int8(0x39);
+static const System::Int8 DXGI_FORMAT_R16_SNORM = System::Int8(0x3a);
+static const System::Int8 DXGI_FORMAT_R16_SINT = System::Int8(0x3b);
+static const System::Int8 DXGI_FORMAT_R8_TYPELESS = System::Int8(0x3c);
+static const System::Int8 DXGI_FORMAT_R8_UNORM = System::Int8(0x3d);
+static const System::Int8 DXGI_FORMAT_R8_UINT = System::Int8(0x3e);
+static const System::Int8 DXGI_FORMAT_R8_SNORM = System::Int8(0x3f);
+static const System::Int8 DXGI_FORMAT_R8_SINT = System::Int8(0x40);
+static const System::Int8 DXGI_FORMAT_A8_UNORM = System::Int8(0x41);
+static const System::Int8 DXGI_FORMAT_R1_UNORM = System::Int8(0x42);
+static const System::Int8 DXGI_FORMAT_R9G9B9E5_SHAREDEXP = System::Int8(0x43);
+static const System::Int8 DXGI_FORMAT_R8G8_B8G8_UNORM = System::Int8(0x44);
+static const System::Int8 DXGI_FORMAT_G8R8_G8B8_UNORM = System::Int8(0x45);
+static const System::Int8 DXGI_FORMAT_BC1_TYPELESS = System::Int8(0x46);
+static const System::Int8 DXGI_FORMAT_BC1_UNORM = System::Int8(0x47);
+static const System::Int8 DXGI_FORMAT_BC1_UNORM_SRGB = System::Int8(0x48);
+static const System::Int8 DXGI_FORMAT_BC2_TYPELESS = System::Int8(0x49);
+static const System::Int8 DXGI_FORMAT_BC2_UNORM = System::Int8(0x4a);
+static const System::Int8 DXGI_FORMAT_BC2_UNORM_SRGB = System::Int8(0x4b);
+static const System::Int8 DXGI_FORMAT_BC3_TYPELESS = System::Int8(0x4c);
+static const System::Int8 DXGI_FORMAT_BC3_UNORM = System::Int8(0x4d);
+static const System::Int8 DXGI_FORMAT_BC3_UNORM_SRGB = System::Int8(0x4e);
+static const System::Int8 DXGI_FORMAT_BC4_TYPELESS = System::Int8(0x4f);
+static const System::Int8 DXGI_FORMAT_BC4_UNORM = System::Int8(0x50);
+static const System::Int8 DXGI_FORMAT_BC4_SNORM = System::Int8(0x51);
+static const System::Int8 DXGI_FORMAT_BC5_TYPELESS = System::Int8(0x52);
+static const System::Int8 DXGI_FORMAT_BC5_UNORM = System::Int8(0x53);
+static const System::Int8 DXGI_FORMAT_BC5_SNORM = System::Int8(0x54);
+static const System::Int8 DXGI_FORMAT_B5G6R5_UNORM = System::Int8(0x55);
+static const System::Int8 DXGI_FORMAT_B5G5R5A1_UNORM = System::Int8(0x56);
+static const System::Int8 DXGI_FORMAT_B8G8R8A8_UNORM = System::Int8(0x57);
+static const System::Int8 DXGI_FORMAT_B8G8R8X8_UNORM = System::Int8(0x58);
+static const System::Int8 DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM = System::Int8(0x59);
+static const System::Int8 DXGI_FORMAT_B8G8R8A8_TYPELESS = System::Int8(0x5a);
+static const System::Int8 DXGI_FORMAT_B8G8R8A8_UNORM_SRGB = System::Int8(0x5b);
+static const System::Int8 DXGI_FORMAT_B8G8R8X8_TYPELESS = System::Int8(0x5c);
+static const System::Int8 DXGI_FORMAT_B8G8R8X8_UNORM_SRGB = System::Int8(0x5d);
+static const System::Int8 DXGI_FORMAT_BC6H_TYPELESS = System::Int8(0x5e);
+static const System::Int8 DXGI_FORMAT_BC6H_UF16 = System::Int8(0x5f);
+static const System::Int8 DXGI_FORMAT_BC6H_SF16 = System::Int8(0x60);
+static const System::Int8 DXGI_FORMAT_BC7_TYPELESS = System::Int8(0x61);
+static const System::Int8 DXGI_FORMAT_BC7_UNORM = System::Int8(0x62);
+static const System::Int8 DXGI_FORMAT_BC7_UNORM_SRGB = System::Int8(0x63);
+static const System::Int8 D3D11_RESOURCE_DIMENSION_UNKNOWN = System::Int8(0x0);
+static const System::Int8 D3D11_RESOURCE_DIMENSION_BUFFER = System::Int8(0x1);
+static const System::Int8 D3D11_RESOURCE_DIMENSION_TEXTURE1D = System::Int8(0x2);
+static const System::Int8 D3D11_RESOURCE_DIMENSION_TEXTURE2D = System::Int8(0x3);
+static const System::Int8 D3D11_RESOURCE_DIMENSION_TEXTURE3D = System::Int8(0x4);
+static const System::Int8 FOURCC_UNKNOWN = System::Int8(0x0);
+static const System::Int8 FOURCC_R8G8B8 = System::Int8(0x14);
+static const System::Int8 FOURCC_A8R8G8B8 = System::Int8(0x15);
+static const System::Int8 FOURCC_X8R8G8B8 = System::Int8(0x16);
+static const System::Int8 FOURCC_R5G6B5 = System::Int8(0x17);
+static const System::Int8 FOURCC_X1R5G5B5 = System::Int8(0x18);
+static const System::Int8 FOURCC_A1R5G5B5 = System::Int8(0x19);
+static const System::Int8 FOURCC_A4R4G4B4 = System::Int8(0x1a);
+static const System::Int8 FOURCC_R3G3B2 = System::Int8(0x1b);
+static const System::Int8 FOURCC_A8 = System::Int8(0x1c);
+static const System::Int8 FOURCC_A8R3G3B2 = System::Int8(0x1d);
+static const System::Int8 FOURCC_X4R4G4B4 = System::Int8(0x1e);
+static const System::Int8 FOURCC_A2B10G10R10 = System::Int8(0x1f);
+static const System::Int8 FOURCC_A8B8G8R8 = System::Int8(0x20);
+static const System::Int8 FOURCC_X8B8G8R8 = System::Int8(0x21);
+static const System::Int8 FOURCC_G16R16 = System::Int8(0x22);
+static const System::Int8 FOURCC_A2R10G10B10 = System::Int8(0x23);
+static const System::Int8 FOURCC_A16B16G16R16 = System::Int8(0x24);
+static const System::Int8 FOURCC_L8 = System::Int8(0x32);
+static const System::Int8 FOURCC_A8L8 = System::Int8(0x33);
+static const System::Int8 FOURCC_A4L4 = System::Int8(0x34);
+static const int FOURCC_DXT1 = int(0x31545844);
+static const int FOURCC_DXT2 = int(0x32545844);
+static const int FOURCC_DXT3 = int(0x33545844);
+static const int FOURCC_DXT4 = int(0x34545844);
+static const int FOURCC_DXT5 = int(0x35545844);
+static const int FOURCC_ATI1 = int(0x31495441);
+static const int FOURCC_ATI2 = int(0x32495441);
+static const System::Int8 FOURCC_D16_LOCKABLE = System::Int8(0x46);
+static const System::Int8 FOURCC_D32 = System::Int8(0x47);
+static const System::Int8 FOURCC_D24X8 = System::Int8(0x4d);
+static const System::Int8 FOURCC_D16 = System::Int8(0x50);
+static const System::Int8 FOURCC_D32F_LOCKABLE = System::Int8(0x52);
+static const System::Int8 FOURCC_L16 = System::Int8(0x51);
+static const System::Int8 FOURCC_R16F = System::Int8(0x6f);
+static const System::Int8 FOURCC_G16R16F = System::Int8(0x70);
+static const System::Int8 FOURCC_A16B16G16R16F = System::Int8(0x71);
+static const System::Int8 FOURCC_R32F = System::Int8(0x72);
+static const System::Int8 FOURCC_G32R32F = System::Int8(0x73);
+static const System::Int8 FOURCC_A32B32G32R32F = System::Int8(0x74);
+static const int FOURCC_DX10 = int(0x47495844);
+extern DELPHI_PACKAGE System::StaticArray<TGLImageDataFormat, 4> cImageDataFormat8bits;
+extern DELPHI_PACKAGE System::StaticArray<TGLImageDataFormat, 5> cImageDataFormat16bits;
+extern DELPHI_PACKAGE System::StaticArray<TGLImageDataFormat, 1> cImageDataFormat24bits;
+extern DELPHI_PACKAGE System::StaticArray<TGLImageDataFormat, 7> cImageDataFormat32bits;
+extern DELPHI_PACKAGE void __fastcall DecodeDXT1toBitmap32(System::Sysutils::PByteArray encData, System::Sysutils::PByteArray decData, int w, int h, bool &trans);
+extern DELPHI_PACKAGE void __fastcall DecodeDXT3toBitmap32(System::Sysutils::PByteArray encData, System::Sysutils::PByteArray decData, int w, int h);
+extern DELPHI_PACKAGE void __fastcall DecodeDXT5toBitmap32(System::Sysutils::PByteArray encData, System::Sysutils::PByteArray decData, int w, int h);
+extern DELPHI_PACKAGE void __fastcall flip_blocks_dxtc1(Winapi::Opengl::PGLubyte data, int numBlocks);
+extern DELPHI_PACKAGE void __fastcall flip_blocks_dxtc3(Winapi::Opengl::PGLubyte data, int numBlocks);
+extern DELPHI_PACKAGE void __fastcall flip_dxt5_alpha(PDXT5AlphaBlock block);
+extern DELPHI_PACKAGE void __fastcall flip_blocks_dxtc5(Winapi::Opengl::PGLubyte data, int numBlocks);
+extern DELPHI_PACKAGE bool __fastcall DDSHeaderToGLEnum(const TDDSHeader &DX9header, const TDDS_HEADER_DXT10 &DX11header, const bool useDX11, /* out */ Gls::Textureformat::TGLInternalFormat &iFormat, /* out */ unsigned &colorFormat, /* out */ unsigned &dataType, /* out */ int &bpe);
+extern DELPHI_PACKAGE bool __fastcall GLEnumToDDSHeader(TDDSHeader &DX9header, TDDS_HEADER_DXT10 &DX11header, const bool useDX11, const Gls::Textureformat::TGLInternalFormat iFormat, const unsigned colorFormat, const unsigned dataType, const int bpe);
+extern DELPHI_PACKAGE bool __fastcall FindDDSCompatibleDataFormat(const Gls::Textureformat::TGLInternalFormat iFormat, /* out */ unsigned &colorFormat, /* out */ unsigned &dataType);
+}	/* namespace Dxtc */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_DXTC)
+using namespace Formats::Dxtc;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_DxtcHPP

+ 272 - 0
include/Win32/Formats.GL2.hpp

@@ -0,0 +1,272 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.GL2.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_Gl2HPP
+#define Formats_Gl2HPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.VectorGeometry.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Gl2
+{
+//-- forward type declarations -----------------------------------------------
+struct TGLMHeader;
+struct TGLMSurfaceHeirachy;
+struct TGLMSurfaceHeader;
+struct TGLMTriangle;
+struct TGLMVertex;
+struct TGLMSurface;
+struct TGLMLODInfo;
+struct TGLMLODs;
+struct TGLAHeader;
+struct TGLASkeleton;
+class DELPHICLASS TFileGLM;
+class DELPHICLASS TFileGLA;
+//-- type declarations -------------------------------------------------------
+struct DECLSPEC_DRECORD TGLMHeader
+{
+public:
+	System::StaticArray<System::WideChar, 4> fileID;
+	int version;
+	System::StaticArray<System::WideChar, 64> strFile;
+	System::StaticArray<System::WideChar, 64> animName;
+	int animIndex;
+	int numBones;
+	int numLODs;
+	int ofsLODs;
+	int numSurfaces;
+	int ofsSurfHierarchy;
+	int ofsEnd;
+};
+
+
+typedef System::DynamicArray<int> TGLMSurfaceHeirachyOffsets;
+
+struct DECLSPEC_DRECORD TGLMSurfaceHeirachy
+{
+	
+private:
+	typedef System::DynamicArray<int> _TGLMSurfaceHeirachy__1;
+	
+	
+public:
+	System::StaticArray<System::WideChar, 64> name;
+	unsigned flags;
+	System::StaticArray<System::WideChar, 64> shader;
+	int shaderIndex;
+	int parentIndex;
+	int numChildren;
+	_TGLMSurfaceHeirachy__1 childIndices;
+};
+
+
+struct DECLSPEC_DRECORD TGLMSurfaceHeader
+{
+public:
+	int ident;
+	int thisSurfaceIndex;
+	int ofsHeader;
+	int numVerts;
+	int ofsVerts;
+	int numTriangles;
+	int ofsTriangles;
+	int numBoneReferences;
+	int ofsBoneReferences;
+	int ofsEnd;
+};
+
+
+struct DECLSPEC_DRECORD TGLMTriangle
+{
+public:
+	System::StaticArray<int, 3> indices;
+};
+
+
+struct DECLSPEC_DRECORD TGLMVertex
+{
+public:
+	Gls::Vectortypes::TVector3f normal;
+	Gls::Vectortypes::TVector3f vertex;
+	unsigned uiNumWeightsAndBoneIndices;
+	System::StaticArray<System::Byte, 4> BoneWeightings;
+};
+
+
+struct DECLSPEC_DRECORD TGLMSurface
+{
+	
+private:
+	typedef System::DynamicArray<TGLMTriangle> _TGLMSurface__1;
+	
+	typedef System::DynamicArray<TGLMVertex> _TGLMSurface__2;
+	
+	typedef System::DynamicArray<Gls::Vectortypes::TVector2f> _TGLMSurface__3;
+	
+	typedef System::DynamicArray<int> _TGLMSurface__4;
+	
+	
+public:
+	TGLMSurfaceHeader SurfaceHeader;
+	_TGLMSurface__1 Triangles;
+	_TGLMSurface__2 Vertices;
+	_TGLMSurface__3 TexCoords;
+	_TGLMSurface__4 BoneReferences;
+};
+
+
+struct DECLSPEC_DRECORD TGLMLODInfo
+{
+public:
+	int ofsEnd;
+};
+
+
+typedef System::DynamicArray<int> TGLMLODSurfaceOffsets;
+
+struct DECLSPEC_DRECORD TGLMLODs
+{
+	
+private:
+	typedef System::DynamicArray<TGLMSurface> _TGLMLODs__1;
+	
+	
+public:
+	TGLMLODInfo LODInfo;
+	TGLMLODSurfaceOffsets LODSurfaceOffsets;
+	_TGLMLODs__1 Surfaces;
+};
+
+
+struct DECLSPEC_DRECORD TGLAHeader
+{
+public:
+	System::StaticArray<System::WideChar, 4> fileID;
+	int version;
+	System::StaticArray<System::WideChar, 64> name;
+	float fScale;
+	int numFrames;
+	int ofsFrames;
+	int numBones;
+	int ofsCompBonePool;
+	int ofsSkel;
+	int ofsEnd;
+};
+
+
+typedef System::StaticArray<Gls::Vectortypes::TVector4f, 3> TGLABone;
+
+typedef System::StaticArray<System::Word, 7> TGLACompQuatBone;
+
+typedef System::DynamicArray<int> TGLASkeletonOffsets;
+
+struct DECLSPEC_DRECORD TGLASkeleton
+{
+	
+private:
+	typedef System::DynamicArray<int> _TGLASkeleton__1;
+	
+	
+public:
+	System::StaticArray<System::WideChar, 64> name;
+	unsigned flags;
+	int parent;
+	TGLABone BasePoseMat;
+	TGLABone BasePoseMatInv;
+	int numChildren;
+	_TGLASkeleton__1 children;
+};
+
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TFileGLM : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+	
+private:
+	typedef System::DynamicArray<TGLMSurfaceHeirachy> _TFileGLM__1;
+	
+	typedef System::DynamicArray<TGLMLODs> _TFileGLM__2;
+	
+	
+public:
+	TGLMHeader ModelHeader;
+	TGLMSurfaceHeirachyOffsets SurfaceHeirachyOffsets;
+	_TFileGLM__1 SurfaceHeirachy;
+	_TFileGLM__2 LODs;
+	void __fastcall LoadFromStream(System::Classes::TStream* aStream);
+public:
+	/* TObject.Create */ inline __fastcall TFileGLM() : System::TObject() { }
+	/* TObject.Destroy */ inline __fastcall virtual ~TFileGLM() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TFileGLA : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+	
+private:
+	typedef System::DynamicArray<TGLASkeleton> _TFileGLA__1;
+	
+	typedef System::DynamicArray<int> _TFileGLA__2;
+	
+	typedef System::DynamicArray<TGLACompQuatBone> _TFileGLA__3;
+	
+	
+public:
+	TGLAHeader AnimHeader;
+	TGLASkeletonOffsets SkeletonOffsets;
+	_TFileGLA__1 Skeleton;
+	_TFileGLA__2 BoneIndices;
+	_TFileGLA__3 CompBonePool;
+	TGLACompQuatBone __fastcall GetCompressedMatrix(int Frame, int Bone);
+	Gls::Vectortypes::TMatrix4f __fastcall GetUnCompressedMatrix(int Frame, int Bone);
+	void __fastcall LoadFromStream(System::Classes::TStream* aStream);
+public:
+	/* TObject.Create */ inline __fastcall TFileGLA() : System::TObject() { }
+	/* TObject.Destroy */ inline __fastcall virtual ~TFileGLA() { }
+	
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE int __fastcall G2_GetVertWeights(const TGLMVertex &vert);
+extern DELPHI_PACKAGE int __fastcall G2_GetVertBoneIndex(const TGLMVertex &vert, int iWeightNum);
+extern DELPHI_PACKAGE float __fastcall G2_GetVertBoneWeight(const TGLMVertex &vert, unsigned iWeightNum, float &fTotalWeight, const unsigned iNumWeights);
+extern DELPHI_PACKAGE void __fastcall MC_UnCompressQuat(Gls::Vectortypes::TMatrix4f &mat, const TGLACompQuatBone &comp);
+}	/* namespace Gl2 */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_GL2)
+using namespace Formats::Gl2;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_Gl2HPP

+ 63 - 0
include/Win32/Formats.HDRImage.hpp

@@ -0,0 +1,63 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.HDRImage.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_HdrimageHPP
+#define Formats_HdrimageHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <Vcl.Graphics.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.Graphics.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Hdrimage
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS THDRImage;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION THDRImage : public Vcl::Graphics::TBitmap
+{
+	typedef Vcl::Graphics::TBitmap inherited;
+	
+public:
+	virtual void __fastcall LoadFromStream(System::Classes::TStream* stream);
+	virtual void __fastcall SaveToStream(System::Classes::TStream* stream);
+public:
+	/* TBitmap.Create */ inline __fastcall virtual THDRImage()/* overload */ : Vcl::Graphics::TBitmap() { }
+	/* TBitmap.Create */ inline __fastcall THDRImage(int AWidth, int AHeight)/* overload */ : Vcl::Graphics::TBitmap(AWidth, AHeight) { }
+	/* TBitmap.Destroy */ inline __fastcall virtual ~THDRImage() { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Hdrimage */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_HDRIMAGE)
+using namespace Formats::Hdrimage;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_HdrimageHPP

+ 806 - 0
include/Win32/Formats.LWO.hpp

@@ -0,0 +1,806 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.LWO.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_LwoHPP
+#define Formats_LwoHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.IOUtils.hpp>
+#include <System.Math.hpp>
+#include <GLS.VectorGeometry.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Lwo
+{
+//-- forward type declarations -----------------------------------------------
+struct TLWChunkRec;
+struct TLWSubChunkRec;
+struct TLWPolsInfo;
+struct TLWPntsInfo;
+struct TLWPolyTagMap;
+struct TLWVertexMap;
+class DELPHICLASS TLWChunk;
+class DELPHICLASS TLWSubChunk;
+class DELPHICLASS TLWChunkList;
+class DELPHICLASS TLWParentChunk;
+class DELPHICLASS TLWPnts;
+class DELPHICLASS TLWPols;
+class DELPHICLASS TLWVMap;
+class DELPHICLASS TLWTags;
+class DELPHICLASS TLWSurf;
+class DELPHICLASS TLWLayr;
+class DELPHICLASS TLWPTag;
+class DELPHICLASS TLWObjectFile;
+class DELPHICLASS TLWClip;
+class DELPHICLASS TLWContentDir;
+//-- type declarations -------------------------------------------------------
+typedef System::StaticArray<char, 4> TID4;
+
+typedef TID4 *PID4;
+
+typedef System::DynamicArray<TID4> TID4DynArray;
+
+typedef System::Int8 TI1;
+
+typedef System::Int8 *PI1;
+
+typedef short TI2;
+
+typedef short *PI2;
+
+typedef int TI4;
+
+typedef int *PI4;
+
+typedef System::Byte TU1;
+
+typedef System::Byte *PU1;
+
+typedef System::DynamicArray<System::Byte> TU1DynArray;
+
+typedef System::Word TU2;
+
+typedef System::Word *PU2;
+
+typedef System::StaticArray<System::Word, 65535> TU2Array;
+
+typedef TU2Array *PU2Array;
+
+typedef System::DynamicArray<System::Word> TU2DynArray;
+
+typedef unsigned TU4;
+
+typedef unsigned *PU4;
+
+typedef System::StaticArray<unsigned, 65535> TU4Array;
+
+typedef TU4Array *PU4Array;
+
+typedef System::DynamicArray<unsigned> TU4DynArray;
+
+typedef float TF4;
+
+typedef float *PF4;
+
+typedef System::StaticArray<float, 65535> TF4Array;
+
+typedef TF4Array *PF4Array;
+
+typedef System::DynamicArray<float> TF4DynArray;
+
+typedef float TANG4;
+
+typedef float *PANG4;
+
+typedef System::StaticArray<float, 3> TVec12;
+
+typedef TVec12 *PVec12;
+
+typedef System::StaticArray<System::StaticArray<float, 3>, 65535> TVec12Array;
+
+typedef TVec12Array *PVec12Array;
+
+typedef System::DynamicArray<TVec12> TVec12DynArray;
+
+typedef TVec12 TColr12;
+
+typedef TVec12 *PColr12;
+
+typedef System::DynamicArray<TVec12> TColr12DynArray;
+
+typedef System::StaticArray<System::Byte, 4> TColr4;
+
+typedef TColr4 *PColr4;
+
+typedef TLWChunkRec *PLWChunkRec;
+
+struct DECLSPEC_DRECORD TLWChunkRec
+{
+public:
+	TID4 id;
+	unsigned size;
+	void *data;
+};
+
+
+typedef TLWSubChunkRec *PLWSubChunkRec;
+
+struct DECLSPEC_DRECORD TLWSubChunkRec
+{
+public:
+	TID4 id;
+	System::Word size;
+	void *data;
+};
+
+
+struct DECLSPEC_DRECORD TLWPolsInfo
+{
+public:
+	TVec12 norm;
+	TVec12DynArray vnorms;
+	System::Word surfid;
+};
+
+
+typedef System::DynamicArray<TLWPolsInfo> TLWPolsInfoDynArray;
+
+struct DECLSPEC_DRECORD TLWPntsInfo
+{
+public:
+	System::Word npols;
+	TU2DynArray pols;
+};
+
+
+typedef System::DynamicArray<TLWPntsInfo> TLWPntsInfoDynArray;
+
+typedef TU2DynArray TLWPolsDynArray;
+
+typedef TU2DynArray TLWPolyTagMapDynArray;
+
+struct DECLSPEC_DRECORD TLWPolyTagMap
+{
+public:
+	System::Word poly;
+	System::Word tag;
+};
+
+
+typedef TLWPolyTagMap *PLWPolyTagMap;
+
+struct DECLSPEC_DRECORD TLWVertexMap
+{
+public:
+	System::Word vert;
+	TF4DynArray values;
+};
+
+
+typedef System::DynamicArray<TLWVertexMap> TLWVertexMapDynArray;
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWChunk : public System::Classes::TPersistent
+{
+	typedef System::Classes::TPersistent inherited;
+	
+private:
+	void *FData;
+	TID4 FID;
+	unsigned FSize;
+	TLWParentChunk* FParentChunk;
+	TLWChunkList* FOwner;
+	TLWChunkList* __fastcall GetRootChunks();
+	int __fastcall GetIndex();
+	
+protected:
+	virtual void __fastcall Clear();
+	virtual void __fastcall LoadData(System::Classes::TStream* AStream, unsigned DataStart, unsigned DataSize);
+	virtual void __fastcall Loaded();
+	
+public:
+	__fastcall virtual ~TLWChunk();
+	__classmethod virtual TID4 __fastcall GetID();
+	virtual void __fastcall LoadFromStream(System::Classes::TStream* AStream);
+	__property void * data = {read=FData};
+	__property TID4 id = {read=FID};
+	__property unsigned size = {read=FSize, nodefault};
+	__property TLWParentChunk* ParentChunk = {read=FParentChunk};
+	__property TLWChunkList* RootChunks = {read=GetRootChunks};
+	__property int Index = {read=GetIndex, nodefault};
+	__property TLWChunkList* Owner = {read=FOwner};
+public:
+	/* TObject.Create */ inline __fastcall TLWChunk() : System::Classes::TPersistent() { }
+	
+};
+
+#pragma pack(pop)
+
+typedef System::TMetaClass* TLWChunkClass;
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWSubChunk : public TLWChunk
+{
+	typedef TLWChunk inherited;
+	
+public:
+	virtual void __fastcall LoadFromStream(System::Classes::TStream* AStream);
+public:
+	/* TLWChunk.Destroy */ inline __fastcall virtual ~TLWSubChunk() { }
+	
+public:
+	/* TObject.Create */ inline __fastcall TLWSubChunk() : TLWChunk() { }
+	
+};
+
+#pragma pack(pop)
+
+typedef void __fastcall (*TLWChunkFind)(TLWChunk* AChunk, void * Criteria, bool &Found);
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWChunkList : public System::Classes::TList
+{
+	typedef System::Classes::TList inherited;
+	
+public:
+	TLWChunk* operator[](int Index) { return this->Items[Index]; }
+	
+private:
+	bool FOwnsItems;
+	System::TObject* FOwner;
+	TLWChunk* __fastcall GetItem(int Index);
+	
+protected:
+	virtual void __fastcall Loaded();
+	
+public:
+	__fastcall TLWChunkList(bool AOwnsItems, System::TObject* AOwner);
+	__fastcall virtual ~TLWChunkList();
+	HIDESBASE int __fastcall Add(TLWChunk* AChunk);
+	virtual void __fastcall Clear();
+	HIDESBASE void __fastcall Delete(int Index);
+	int __fastcall FindChunk(TLWChunkFind ChunkFind, void * Criteria, int StartIndex = 0x0);
+	__property TLWChunk* Items[int Index] = {read=GetItem/*, default*/};
+	__property bool OwnsItems = {read=FOwnsItems, nodefault};
+	__property System::TObject* Owner = {read=FOwner};
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWParentChunk : public TLWChunk
+{
+	typedef TLWChunk inherited;
+	
+private:
+	TLWChunkList* FItems;
+	TLWChunkList* __fastcall GetItems();
+	float __fastcall GetFloatParam(TID4 Param);
+	System::Word __fastcall GetWordParam(TID4 Param);
+	TVec12 __fastcall GetVec3Param(TID4 Param);
+	unsigned __fastcall GetLongParam(TID4 Param);
+	System::Word __fastcall GetVXParam(TID4 Param);
+	
+protected:
+	virtual void * __fastcall GetParamAddr(TID4 Param);
+	virtual void __fastcall Clear();
+	virtual void __fastcall Loaded();
+	
+public:
+	__property TLWChunkList* Items = {read=GetItems};
+	__property void * ParamAddr[TID4 Param] = {read=GetParamAddr};
+	__property float FloatParam[TID4 Param] = {read=GetFloatParam};
+	__property System::Word WordParam[TID4 Param] = {read=GetWordParam};
+	__property unsigned LongParam[TID4 Param] = {read=GetLongParam};
+	__property TVec12 Vec3Param[TID4 Param] = {read=GetVec3Param};
+	__property System::Word VXParam[TID4 Param] = {read=GetVXParam};
+public:
+	/* TLWChunk.Destroy */ inline __fastcall virtual ~TLWParentChunk() { }
+	
+public:
+	/* TObject.Create */ inline __fastcall TLWParentChunk() : TLWChunk() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWPnts : public TLWParentChunk
+{
+	typedef TLWParentChunk inherited;
+	
+private:
+	TVec12DynArray FPnts;
+	TLWPntsInfoDynArray FPntsInfo;
+	unsigned __fastcall GetPntsCount();
+	int __fastcall AddPoly(int PntIdx, int PolyIdx);
+	
+protected:
+	virtual void __fastcall Clear();
+	virtual void __fastcall LoadData(System::Classes::TStream* AStream, unsigned DataStart, unsigned DataSize);
+	
+public:
+	__classmethod virtual TID4 __fastcall GetID();
+	bool __fastcall GetVMap(TID4 VMapID, /* out */ TLWVMap* &VMap);
+	__property unsigned PntsCount = {read=GetPntsCount, nodefault};
+	__property TVec12DynArray Pnts = {read=FPnts};
+	__property TLWPntsInfoDynArray PntsInfo = {read=FPntsInfo};
+public:
+	/* TLWChunk.Destroy */ inline __fastcall virtual ~TLWPnts() { }
+	
+public:
+	/* TObject.Create */ inline __fastcall TLWPnts() : TLWParentChunk() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWPols : public TLWParentChunk
+{
+	typedef TLWParentChunk inherited;
+	
+private:
+	TID4 FPolsType;
+	TU2DynArray FPols;
+	TLWPolsInfoDynArray FPolsInfo;
+	int FPolsCount;
+	int __fastcall GetPolsByIndex(System::Word AIndex);
+	unsigned __fastcall GetIndiceCount();
+	System::Word __fastcall GetIndice(int AIndex);
+	int __fastcall GetPolsCount();
+	void __fastcall CalcPolsNormals();
+	void __fastcall CalcPntsNormals();
+	
+protected:
+	virtual void __fastcall Clear();
+	virtual void __fastcall LoadData(System::Classes::TStream* AStream, unsigned DataStart, unsigned DataSize);
+	virtual void __fastcall Loaded();
+	
+public:
+	__classmethod virtual TID4 __fastcall GetID();
+	int __fastcall GetPolsByPntIdx(System::Word VertIdx, TU2DynArray &VertPolys);
+	__property int PolsByIndex[System::Word AIndex] = {read=GetPolsByIndex};
+	__property unsigned IndiceCount = {read=GetIndiceCount, nodefault};
+	__property System::Word Indices[int AIndex] = {read=GetIndice};
+	__property TID4 PolsType = {read=FPolsType};
+	__property int PolsCount = {read=GetPolsCount, nodefault};
+	__property TLWPolsInfoDynArray PolsInfo = {read=FPolsInfo};
+public:
+	/* TLWChunk.Destroy */ inline __fastcall virtual ~TLWPols() { }
+	
+public:
+	/* TObject.Create */ inline __fastcall TLWPols() : TLWParentChunk() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWVMap : public TLWChunk
+{
+	typedef TLWChunk inherited;
+	
+private:
+	System::Word FDimensions;
+	System::UnicodeString FName;
+	TLWVertexMapDynArray FValues;
+	TID4 FVMapType;
+	TLWVertexMap __fastcall GetValue(System::Word AIndex);
+	int __fastcall GetValueCount();
+	
+protected:
+	virtual void __fastcall Clear();
+	virtual void __fastcall LoadData(System::Classes::TStream* AStream, unsigned DataStart, unsigned DataSize);
+	
+public:
+	__classmethod virtual TID4 __fastcall GetID();
+	__property System::Word Dimensions = {read=FDimensions, nodefault};
+	__property System::UnicodeString Name = {read=FName};
+	__property TLWVertexMap Value[System::Word AIndex] = {read=GetValue};
+	__property int ValueCount = {read=GetValueCount, nodefault};
+	__property TID4 VMapType = {read=FVMapType};
+public:
+	/* TLWChunk.Destroy */ inline __fastcall virtual ~TLWVMap() { }
+	
+public:
+	/* TObject.Create */ inline __fastcall TLWVMap() : TLWChunk() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWTags : public TLWChunk
+{
+	typedef TLWChunk inherited;
+	
+private:
+	System::Classes::TStrings* FTags;
+	System::Classes::TStrings* __fastcall GetTags();
+	
+protected:
+	virtual void __fastcall Clear();
+	virtual void __fastcall LoadData(System::Classes::TStream* AStream, unsigned DataStart, unsigned DataSize);
+	
+public:
+	__fastcall virtual ~TLWTags();
+	__classmethod virtual TID4 __fastcall GetID();
+	System::UnicodeString __fastcall TagToName(System::Word tag);
+	__property System::Classes::TStrings* Tags = {read=GetTags};
+public:
+	/* TObject.Create */ inline __fastcall TLWTags() : TLWChunk() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWSurf : public TLWParentChunk
+{
+	typedef TLWParentChunk inherited;
+	
+private:
+	System::UnicodeString FName;
+	System::UnicodeString FSource;
+	int __fastcall GetSurfId();
+	
+protected:
+	virtual void * __fastcall GetParamAddr(TID4 Param);
+	virtual void __fastcall LoadData(System::Classes::TStream* AStream, unsigned DataStart, unsigned DataSize);
+	
+public:
+	__fastcall virtual ~TLWSurf();
+	__classmethod virtual TID4 __fastcall GetID();
+	__property int surfid = {read=GetSurfId, nodefault};
+	__property System::UnicodeString Name = {read=FName};
+	__property System::UnicodeString Source = {read=FSource};
+public:
+	/* TObject.Create */ inline __fastcall TLWSurf() : TLWParentChunk() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWLayr : public TLWParentChunk
+{
+	typedef TLWParentChunk inherited;
+	
+private:
+	System::Word FFlags;
+	System::UnicodeString FName;
+	System::Word FNumber;
+	System::Word FParent;
+	TVec12 FPivot;
+	
+protected:
+	virtual void __fastcall LoadData(System::Classes::TStream* AStream, unsigned DataStart, unsigned DataSize);
+	
+public:
+	__fastcall virtual ~TLWLayr();
+	__classmethod virtual TID4 __fastcall GetID();
+	__property System::Word Flags = {read=FFlags, nodefault};
+	__property System::UnicodeString Name = {read=FName};
+	__property System::Word Number = {read=FNumber, nodefault};
+	__property System::Word Parent = {read=FParent, nodefault};
+	__property TVec12 Pivot = {read=FPivot};
+public:
+	/* TObject.Create */ inline __fastcall TLWLayr() : TLWParentChunk() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWPTag : public TLWChunk
+{
+	typedef TLWChunk inherited;
+	
+public:
+	TLWPolyTagMap operator[](int AIndex) { return this->TagMaps[AIndex]; }
+	
+private:
+	TID4 FMapType;
+	TU2DynArray FTagMaps;
+	TU2DynArray FTags;
+	int __fastcall AddTag(System::Word Value);
+	System::Word __fastcall GetTag(int AIndex);
+	int __fastcall GetTagCount();
+	int __fastcall GetTagMapCount();
+	TLWPolyTagMap __fastcall GetTagMaps(int AIndex);
+	void __fastcall ValidateTagInfo();
+	
+protected:
+	virtual void __fastcall Clear();
+	virtual void __fastcall LoadData(System::Classes::TStream* AStream, unsigned DataStart, unsigned DataSize);
+	
+public:
+	__fastcall TLWPTag();
+	int __fastcall GetPolsByTag(System::Word tag, TU2DynArray &PolyIndices);
+	__classmethod virtual TID4 __fastcall GetID();
+	__property TID4 MapType = {read=FMapType};
+	__property int TagCount = {read=GetTagCount, nodefault};
+	__property int TagMapCount = {read=GetTagMapCount, nodefault};
+	__property TLWPolyTagMap TagMaps[int AIndex] = {read=GetTagMaps/*, default*/};
+	__property System::Word Tags[int AIndex] = {read=GetTag};
+public:
+	/* TLWChunk.Destroy */ inline __fastcall virtual ~TLWPTag() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWObjectFile : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+private:
+	TLWChunkList* FChunks;
+	System::UnicodeString FFileName;
+	TLWChunkList* __fastcall GetChunks();
+	int __fastcall GetCount();
+	TLWSurf* __fastcall GetSurfaceByName(System::UnicodeString Index);
+	TLWSurf* __fastcall GetSurfaceByTag(System::Word Index);
+	
+public:
+	__fastcall TLWObjectFile();
+	__fastcall virtual ~TLWObjectFile();
+	System::UnicodeString __fastcall TagToName(System::Word tag);
+	void __fastcall LoadFromFile(const System::UnicodeString AFilename);
+	void __fastcall LoadFromStream(System::Classes::TStream* AStream);
+	__property int ChunkCount = {read=GetCount, nodefault};
+	__property TLWChunkList* Chunks = {read=GetChunks};
+	__property System::UnicodeString FileName = {read=FFileName};
+	__property TLWSurf* SurfaceByName[System::UnicodeString Index] = {read=GetSurfaceByName};
+	__property TLWSurf* SurfaceByTag[System::Word Index] = {read=GetSurfaceByTag};
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWClip : public TLWParentChunk
+{
+	typedef TLWParentChunk inherited;
+	
+private:
+	unsigned FClipIndex;
+	
+protected:
+	virtual void __fastcall LoadData(System::Classes::TStream* AStream, unsigned DataStart, unsigned DataSize);
+	
+public:
+	__classmethod virtual TID4 __fastcall GetID();
+	__property unsigned ClipIndex = {read=FClipIndex, nodefault};
+public:
+	/* TLWChunk.Destroy */ inline __fastcall virtual ~TLWClip() { }
+	
+public:
+	/* TObject.Create */ inline __fastcall TLWClip() : TLWParentChunk() { }
+	
+};
+
+#pragma pack(pop)
+
+typedef void __fastcall (__closure *TLWContentNotify)(System::TObject* Sender, System::UnicodeString &Content);
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TLWContentDir : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+private:
+	System::Classes::TStrings* FSubDirs;
+	System::UnicodeString FRoot;
+	System::Classes::TStrings* __fastcall GetSubDirs();
+	void __fastcall SetRoot(const System::UnicodeString Value);
+	void __fastcall SetSubDirs(System::Classes::TStrings* const Value);
+	
+public:
+	__fastcall virtual ~TLWContentDir();
+	System::UnicodeString __fastcall FindContent(System::UnicodeString AFilename);
+	__property System::UnicodeString Root = {read=FRoot, write=SetRoot};
+	__property System::Classes::TStrings* SubDirs = {read=GetSubDirs, write=SetSubDirs};
+public:
+	/* TObject.Create */ inline __fastcall TLWContentDir() : System::TObject() { }
+	
+};
+
+#pragma pack(pop)
+
+typedef void __cdecl (*TLWOReadCallback)(TLWChunkRec Chunk, void * data);
+
+//-- var, const, procedure ---------------------------------------------------
+#define ID_NULL L"#0#0#0#0"
+extern DELPHI_PACKAGE TID4 ID_LWSC;
+extern DELPHI_PACKAGE TID4 ID_FORM;
+extern DELPHI_PACKAGE TID4 ID_LWOB;
+extern DELPHI_PACKAGE TID4 ID_LWLO;
+extern DELPHI_PACKAGE TID4 ID_LAYR;
+extern DELPHI_PACKAGE TID4 ID_PNTS;
+extern DELPHI_PACKAGE TID4 ID_SRFS;
+extern DELPHI_PACKAGE TID4 ID_POLS;
+extern DELPHI_PACKAGE TID4 ID_CRVS;
+extern DELPHI_PACKAGE TID4 ID_PCHS;
+extern DELPHI_PACKAGE TID4 ID_SURF;
+extern DELPHI_PACKAGE TID4 ID_COLR;
+extern DELPHI_PACKAGE TID4 ID_FLAG;
+extern DELPHI_PACKAGE TID4 ID_LUMI;
+extern DELPHI_PACKAGE TID4 ID_DIFF;
+extern DELPHI_PACKAGE TID4 ID_SPEC;
+extern DELPHI_PACKAGE TID4 ID_REFL;
+extern DELPHI_PACKAGE TID4 ID_TRAN;
+extern DELPHI_PACKAGE TID4 ID_VLUM;
+extern DELPHI_PACKAGE TID4 ID_VDIF;
+extern DELPHI_PACKAGE TID4 ID_VSPC;
+extern DELPHI_PACKAGE TID4 ID_VRFL;
+extern DELPHI_PACKAGE TID4 ID_VTRN;
+extern DELPHI_PACKAGE TID4 ID_GLOS;
+extern DELPHI_PACKAGE TID4 ID_SIDE;
+extern DELPHI_PACKAGE TID4 ID_RFLT;
+extern DELPHI_PACKAGE TID4 ID_RFOP;
+extern DELPHI_PACKAGE TID4 ID_RIMG;
+extern DELPHI_PACKAGE TID4 ID_RSAN;
+extern DELPHI_PACKAGE TID4 ID_RIND;
+extern DELPHI_PACKAGE TID4 ID_EDGE;
+extern DELPHI_PACKAGE TID4 ID_SMAN;
+extern DELPHI_PACKAGE TID4 ID_ALPH;
+extern DELPHI_PACKAGE TID4 ID_CTEX;
+extern DELPHI_PACKAGE TID4 ID_DTEX;
+extern DELPHI_PACKAGE TID4 ID_STEX;
+extern DELPHI_PACKAGE TID4 ID_RTEX;
+extern DELPHI_PACKAGE TID4 ID_TTEX;
+extern DELPHI_PACKAGE TID4 ID_LTEX;
+extern DELPHI_PACKAGE TID4 ID_BTEX;
+extern DELPHI_PACKAGE TID4 ID_TFLG;
+extern DELPHI_PACKAGE TID4 ID_TSIZ;
+extern DELPHI_PACKAGE TID4 ID_TCTR;
+extern DELPHI_PACKAGE TID4 ID_TFAL;
+extern DELPHI_PACKAGE TID4 ID_TVEL;
+extern DELPHI_PACKAGE TID4 ID_TREF;
+extern DELPHI_PACKAGE TID4 ID_TCLR;
+extern DELPHI_PACKAGE TID4 ID_TVAL;
+extern DELPHI_PACKAGE TID4 ID_TAMP;
+extern DELPHI_PACKAGE TID4 ID_TFP0;
+extern DELPHI_PACKAGE TID4 ID_TFP1;
+extern DELPHI_PACKAGE TID4 ID_TFP2;
+extern DELPHI_PACKAGE TID4 ID_TIP0;
+extern DELPHI_PACKAGE TID4 ID_TIP1;
+extern DELPHI_PACKAGE TID4 ID_TIP2;
+extern DELPHI_PACKAGE TID4 ID_TSP0;
+extern DELPHI_PACKAGE TID4 ID_TSP1;
+extern DELPHI_PACKAGE TID4 ID_TSP2;
+extern DELPHI_PACKAGE TID4 ID_TFRQ;
+extern DELPHI_PACKAGE TID4 ID_TIMG;
+extern DELPHI_PACKAGE TID4 ID_TALP;
+extern DELPHI_PACKAGE TID4 ID_TWRP;
+extern DELPHI_PACKAGE TID4 ID_TAAS;
+extern DELPHI_PACKAGE TID4 ID_TOPC;
+extern DELPHI_PACKAGE TID4 ID_SHDR;
+extern DELPHI_PACKAGE TID4 ID_SDAT;
+extern DELPHI_PACKAGE TID4 ID_IMSQ;
+extern DELPHI_PACKAGE TID4 ID_FLYR;
+extern DELPHI_PACKAGE TID4 ID_IMCC;
+static const System::Int8 SURF_FLAG_LUMINOUS = System::Int8(0x1);
+static const System::Int8 SURF_FLAG_OUTLINE = System::Int8(0x2);
+static const System::Int8 SURF_FLAG_SMOOTHING = System::Int8(0x4);
+static const System::Int8 SURF_FLAG_COLORHIGHLIGHTS = System::Int8(0x8);
+static const System::Int8 SURF_FLAG_COLORFILTER = System::Int8(0x10);
+static const System::Int8 SURF_FLAG_OPAQUEEDGE = System::Int8(0x20);
+static const System::Int8 SURF_FLAG_TRANSPARENTEDGE = System::Int8(0x40);
+static const System::Byte SURF_FLAG_SHARPTERMINATOR = System::Byte(0x80);
+static const System::Word SURF_FLAG_DOUBLESIDED = System::Word(0x100);
+static const System::Word SURF_FLAG_ADDITIVE = System::Word(0x200);
+static const System::Word SURF_FLAG_SHADOWALPHA = System::Word(0x400);
+static const System::Int8 CURV_CONTINUITY_FIRST = System::Int8(0x1);
+static const System::Int8 CURV_CONTINUITY_LAST = System::Int8(0x2);
+static const System::Int8 IMSQ_FLAG_LOOP = System::Int8(0x1);
+static const System::Int8 IMSQ_FLAG_INTERLACE = System::Int8(0x2);
+extern DELPHI_PACKAGE TID4 ID_LWO2;
+extern DELPHI_PACKAGE TID4 ID_VMAP;
+extern DELPHI_PACKAGE TID4 ID_TAGS;
+extern DELPHI_PACKAGE TID4 ID_PTAG;
+extern DELPHI_PACKAGE TID4 ID_VMAD;
+extern DELPHI_PACKAGE TID4 ID_ENVL;
+extern DELPHI_PACKAGE TID4 ID_CLIP;
+extern DELPHI_PACKAGE TID4 ID_BBOX;
+extern DELPHI_PACKAGE TID4 ID_DESC;
+extern DELPHI_PACKAGE TID4 ID_TEXT;
+extern DELPHI_PACKAGE TID4 ID_ICON;
+extern DELPHI_PACKAGE TID4 ENVL_PRE;
+extern DELPHI_PACKAGE TID4 ENVL_POST;
+extern DELPHI_PACKAGE TID4 ENVL_KEY;
+extern DELPHI_PACKAGE TID4 ENVL_SPAN;
+extern DELPHI_PACKAGE TID4 ENVL_CHAN;
+extern DELPHI_PACKAGE TID4 ENVL_NAME;
+extern DELPHI_PACKAGE TID4 ID_STIL;
+extern DELPHI_PACKAGE TID4 ID_ISEQ;
+extern DELPHI_PACKAGE TID4 ID_ANIM;
+extern DELPHI_PACKAGE TID4 ID_STCC;
+extern DELPHI_PACKAGE TID4 ID_CONT;
+extern DELPHI_PACKAGE TID4 ID_BRIT;
+extern DELPHI_PACKAGE TID4 ID_SATR;
+extern DELPHI_PACKAGE TID4 ID_HUE;
+extern DELPHI_PACKAGE TID4 ID_GAMMA;
+extern DELPHI_PACKAGE TID4 ID_NEGA;
+extern DELPHI_PACKAGE TID4 ID_IFLT;
+extern DELPHI_PACKAGE TID4 ID_PFLT;
+extern DELPHI_PACKAGE TID4 POLS_TYPE_FACE;
+extern DELPHI_PACKAGE TID4 POLS_TYPE_CURV;
+extern DELPHI_PACKAGE TID4 POLS_TYPE_PTCH;
+extern DELPHI_PACKAGE TID4 POLS_TYPE_MBAL;
+extern DELPHI_PACKAGE TID4 POLS_TYPE_BONE;
+extern DELPHI_PACKAGE TID4 VMAP_TYPE_PICK;
+extern DELPHI_PACKAGE TID4 VMAP_TYPE_WGHT;
+extern DELPHI_PACKAGE TID4 VMAP_TYPE_MNVW;
+extern DELPHI_PACKAGE TID4 VMAP_TYPE_TXUV;
+extern DELPHI_PACKAGE TID4 VMAP_TYPE_RGB;
+extern DELPHI_PACKAGE TID4 VMAP_TYPE_RGBA;
+extern DELPHI_PACKAGE TID4 VMAP_TYPE_MORF;
+extern DELPHI_PACKAGE TID4 VMAP_TYPE_SPOT;
+extern DELPHI_PACKAGE TID4 PTAG_TYPE_SURF;
+extern DELPHI_PACKAGE TID4 PTAG_TYPE_PART;
+extern DELPHI_PACKAGE TID4 PTAG_TYPE_SMGP;
+static const System::Int8 PRE_POST_RESET = System::Int8(0x0);
+static const System::Int8 PRE_POST_CONSTANT = System::Int8(0x1);
+static const System::Int8 PRE_POST_REPEAT = System::Int8(0x2);
+static const System::Int8 PRE_POST_OSCILLATE = System::Int8(0x3);
+static const System::Int8 PRE_POST_OFFSET = System::Int8(0x4);
+static const System::Int8 PRE_POST_LINEAR = System::Int8(0x5);
+static const System::Word POLS_VCOUNT_MASK = System::Word(0x3ff);
+static const System::Word POLS_FLAGS_MASK = System::Word(0xfc00);
+static const System::Int8 SIDE_FRONT = System::Int8(0x1);
+static const System::Int8 SIDE_BACK = System::Int8(0x2);
+static const System::Int8 SIDE_FRONT_AND_BACK = System::Int8(0x0);
+static const System::Int8 RFOP_BACKDROP = System::Int8(0x0);
+static const System::Int8 RFOP_RAYTRACEANDBACKDROP = System::Int8(0x1);
+static const System::Int8 RFOP_SPHERICALMAP = System::Int8(0x2);
+static const System::Int8 RFOP_RAYTRACEANDSPHERICALMAP = System::Int8(0x3);
+extern DELPHI_PACKAGE System::UnicodeString __fastcall ToDosPath(const System::UnicodeString Path);
+extern DELPHI_PACKAGE System::UnicodeString __fastcall ToUnixPath(const System::UnicodeString Path);
+extern DELPHI_PACKAGE TLWContentDir* __fastcall GetContentDir(void);
+extern DELPHI_PACKAGE void __fastcall FindChunkById(TLWChunk* AChunk, void * data, bool &Found);
+extern DELPHI_PACKAGE void __fastcall FindClipByClipIndex(TLWChunk* AChunk, void * AIndex, bool &Found);
+extern DELPHI_PACKAGE void __fastcall FindSurfaceByName(TLWChunk* AChunk, void * AName, bool &Found);
+extern DELPHI_PACKAGE void __fastcall FindSurfaceByTag(TLWChunk* AChunk, void * ATag, bool &Found);
+extern DELPHI_PACKAGE void __fastcall FindVMapByName(TLWChunk* AChunk, void * AName, bool &Found);
+extern DELPHI_PACKAGE void __fastcall RegisterChunkClass(TLWChunkClass ChunkClass);
+extern DELPHI_PACKAGE unsigned __cdecl LoadLW0FromStream(System::Classes::TStream* Stream, TLWOReadCallback ReadCallback, void * UserData);
+extern DELPHI_PACKAGE unsigned __fastcall LoadLWOFromFile(const System::UnicodeString AFilename, TLWOReadCallback ReadCallback, void * UserData);
+extern DELPHI_PACKAGE void __fastcall ReverseByteOrder(void * ValueIn, int size, int Count = 0x1);
+extern DELPHI_PACKAGE void __fastcall ReadMotorolaNumber(System::Classes::TStream* Stream, void * data, int ElementSize, int Count = 0x1);
+extern DELPHI_PACKAGE int __fastcall WriteMotorolaNumber(System::Classes::TStream* Stream, void * data, int ElementSize, int Count = 0x1);
+extern DELPHI_PACKAGE int __fastcall ReadS0(System::Classes::TStream* Stream, /* out */ System::UnicodeString &Str);
+extern DELPHI_PACKAGE int __fastcall ReadVXAsU4(System::Classes::TStream* Stream, void * data, int Count = 0x1);
+extern DELPHI_PACKAGE void __fastcall WriteS0(System::Classes::TStream* Stream, System::UnicodeString data);
+extern DELPHI_PACKAGE void __fastcall WriteU4AsVX(System::Classes::TStream* Stream, void * data, int Count);
+extern DELPHI_PACKAGE int __fastcall ID4ToInt(const TID4 id);
+}	/* namespace Lwo */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_LWO)
+using namespace Formats::Lwo;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_LwoHPP

+ 156 - 0
include/Win32/Formats.MD2.hpp

@@ -0,0 +1,156 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.MD2.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_Md2HPP
+#define Formats_Md2HPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.VectorTypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Md2
+{
+//-- forward type declarations -----------------------------------------------
+struct TMD2VertexIndex;
+struct TMD2Triangle;
+struct TMD2TriangleVertex;
+struct TMD2AliasFrame;
+struct TMD2Header;
+class DELPHICLASS TFileMD2;
+//-- type declarations -------------------------------------------------------
+typedef TMD2VertexIndex *PMD2VertexIndex;
+
+struct DECLSPEC_DRECORD TMD2VertexIndex
+{
+public:
+	int A;
+	int B;
+	int C;
+	float A_S;
+	float A_T;
+	float B_S;
+	float B_T;
+	float C_S;
+	float C_T;
+};
+
+
+struct DECLSPEC_DRECORD TMD2Triangle
+{
+public:
+	Gls::Vectortypes::TVector3s VertexIndex;
+	Gls::Vectortypes::TVector3s TextureCoordIndex;
+};
+
+
+struct DECLSPEC_DRECORD TMD2TriangleVertex
+{
+public:
+	System::StaticArray<System::Byte, 3> Vert;
+	System::Byte LightnormalIndex;
+};
+
+
+typedef TMD2AliasFrame *PMD2AliasFrame;
+
+struct DECLSPEC_DRECORD TMD2AliasFrame
+{
+public:
+	Gls::Vectortypes::TVector3f Scale;
+	Gls::Vectortypes::TVector3f Translate;
+	System::StaticArray<char, 16> Name;
+	System::StaticArray<TMD2TriangleVertex, 1> Vertices;
+};
+
+
+struct DECLSPEC_DRECORD TMD2Header
+{
+public:
+	int Ident;
+	int Version;
+	int SkinWidth;
+	int SkinHeight;
+	int FrameSize;
+	int Num_Skins;
+	int Num_Vertices;
+	int Num_TextureCoords;
+	int Num_VertexIndices;
+	int Num_GLCommdands;
+	int Num_Frames;
+	int Offset_skins;
+	int Offset_st;
+	int Offset_tris;
+	int Offset_frames;
+	int Offset_glcmds;
+	int Offset_end;
+};
+
+
+typedef System::DynamicArray<TMD2VertexIndex> TIndexList;
+
+typedef System::DynamicArray<Gls::Vectortypes::TVector3f> Formats_Md2__1;
+
+typedef System::DynamicArray<System::DynamicArray<Gls::Vectortypes::TVector3f> > TGLVertexList;
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TFileMD2 : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+private:
+	int FiFrames;
+	int FiVertices;
+	int FiTriangles;
+	void __fastcall FreeLists();
+	
+public:
+	TIndexList fIndexList;
+	TGLVertexList fVertexList;
+	System::Classes::TStrings* FrameNames;
+	__fastcall virtual TFileMD2();
+	__fastcall virtual ~TFileMD2();
+	void __fastcall LoadFromStream(System::Classes::TStream* aStream);
+	__property int iFrames = {read=FiFrames, nodefault};
+	__property int iVertices = {read=FiVertices, nodefault};
+	__property int iTriangles = {read=FiTriangles, nodefault};
+	__property TIndexList IndexList = {read=fIndexList};
+	__property TGLVertexList VertexList = {read=fVertexList};
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+static const System::Word MAX_MD2_TRIANGLES = System::Word(0x1000);
+static const System::Word MAX_MD2_VERTICES = System::Word(0x800);
+static const System::Word MAX_MD2_FRAMES = System::Word(0x200);
+static const System::Int8 MAX_MD2_SKINS = System::Int8(0x20);
+static const System::Int8 MAX_MD2_SKINNAME = System::Int8(0x40);
+}	/* namespace Md2 */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_MD2)
+using namespace Formats::Md2;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_Md2HPP

+ 188 - 0
include/Win32/Formats.MD3.hpp

@@ -0,0 +1,188 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.MD3.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_Md3HPP
+#define Formats_Md3HPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <GLS.VectorTypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Md3
+{
+//-- forward type declarations -----------------------------------------------
+struct TMD3Tag;
+struct TMD3Bone;
+struct TMD3Triangle;
+struct TMD3Face;
+struct TMD3TexCoord;
+struct TMD3Skin;
+struct TMD3Header;
+struct TMD3MeshHeader;
+struct TMD3MeshData;
+class DELPHICLASS TFileMD3;
+//-- type declarations -------------------------------------------------------
+struct DECLSPEC_DRECORD TMD3Tag
+{
+public:
+	System::StaticArray<char, 64> strName;
+	Gls::Vectortypes::TVector3f vPosition;
+	Gls::Vectortypes::TMatrix3f rotation;
+};
+
+
+struct DECLSPEC_DRECORD TMD3Bone
+{
+public:
+	Gls::Vectortypes::TVector3f mins;
+	Gls::Vectortypes::TVector3f maxs;
+	Gls::Vectortypes::TVector3f position;
+	float scale;
+	System::StaticArray<char, 16> creator;
+};
+
+
+struct DECLSPEC_DRECORD TMD3Triangle
+{
+public:
+	Gls::Vectortypes::TVector3s vertex;
+	Gls::Vectortypes::TVector2b normal;
+};
+
+
+struct DECLSPEC_DRECORD TMD3Face
+{
+public:
+	Gls::Vectortypes::TVector3i vertexIndices;
+};
+
+
+struct DECLSPEC_DRECORD TMD3TexCoord
+{
+public:
+	Gls::Vectortypes::TVector2f textureCoord;
+};
+
+
+struct DECLSPEC_DRECORD TMD3Skin
+{
+public:
+	System::StaticArray<char, 64> strName;
+	int shaderIndex;
+};
+
+
+struct DECLSPEC_DRECORD TMD3Header
+{
+public:
+	System::StaticArray<char, 4> fileID;
+	int version;
+	System::StaticArray<char, 64> strFile;
+	int flags;
+	int numFrames;
+	int numTags;
+	int numMeshes;
+	int numMaxSkins;
+	int headerSize;
+	int tagStart;
+	int tagEnd;
+	int fileSize;
+};
+
+
+struct DECLSPEC_DRECORD TMD3MeshHeader
+{
+public:
+	System::StaticArray<char, 4> meshID;
+	System::StaticArray<char, 64> strName;
+	int flags;
+	int numMeshFrames;
+	int numSkins;
+	int numVertices;
+	int numTriangles;
+	int triStart;
+	int headerSize;
+	int uvStart;
+	int vertexStart;
+	int meshSize;
+};
+
+
+struct DECLSPEC_DRECORD TMD3MeshData
+{
+	
+private:
+	typedef System::DynamicArray<TMD3Skin> _TMD3MeshData__1;
+	
+	typedef System::DynamicArray<TMD3Face> _TMD3MeshData__2;
+	
+	typedef System::DynamicArray<TMD3TexCoord> _TMD3MeshData__3;
+	
+	typedef System::DynamicArray<TMD3Triangle> _TMD3MeshData__4;
+	
+	
+public:
+	TMD3MeshHeader MeshHeader;
+	_TMD3MeshData__1 Skins;
+	_TMD3MeshData__2 Triangles;
+	_TMD3MeshData__3 TexCoords;
+	_TMD3MeshData__4 Vertices;
+};
+
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TFileMD3 : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+	
+private:
+	typedef System::DynamicArray<TMD3Bone> _TFileMD3__1;
+	
+	typedef System::DynamicArray<TMD3Tag> _TFileMD3__2;
+	
+	typedef System::DynamicArray<TMD3MeshData> _TFileMD3__3;
+	
+	
+public:
+	TMD3Header ModelHeader;
+	_TFileMD3__1 Bones;
+	_TFileMD3__2 Tags;
+	_TFileMD3__3 MeshData;
+	void __fastcall LoadFromStream(System::Classes::TStream* aStream);
+public:
+	/* TObject.Create */ inline __fastcall TFileMD3() : System::TObject() { }
+	/* TObject.Destroy */ inline __fastcall virtual ~TFileMD3() { }
+	
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Md3 */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_MD3)
+using namespace Formats::Md3;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_Md3HPP

+ 150 - 0
include/Win32/Formats.OCT.hpp

@@ -0,0 +1,150 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.OCT.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_OctHPP
+#define Formats_OctHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.VectorLists.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Oct
+{
+//-- forward type declarations -----------------------------------------------
+struct TOCTHeader;
+struct TOCTVertex;
+struct TOCTFace;
+struct TOCTTexture;
+struct TOCTLightmap;
+struct TOCTLight;
+class DELPHICLASS TOCTFile;
+//-- type declarations -------------------------------------------------------
+struct DECLSPEC_DRECORD TOCTHeader
+{
+public:
+	int numVerts;
+	int numFaces;
+	int numTextures;
+	int numLightmaps;
+	int numLights;
+};
+
+
+struct DECLSPEC_DRECORD TOCTVertex
+{
+public:
+	Gls::Vectorgeometry::TTexPoint tv;
+	Gls::Vectorgeometry::TTexPoint lv;
+	Gls::Vectortypes::TVector3f pos;
+};
+
+
+struct DECLSPEC_DRECORD TOCTFace
+{
+public:
+	int start;
+	int num;
+	int id;
+	int lid;
+	Gls::Vectortypes::TVector4f p;
+};
+
+
+typedef TOCTFace *POCTFace;
+
+struct DECLSPEC_DRECORD TOCTTexture
+{
+public:
+	int id;
+	System::StaticArray<char, 64> Name;
+};
+
+
+struct DECLSPEC_DRECORD TOCTLightmap
+{
+public:
+	int id;
+	System::StaticArray<System::Byte, 49152> map;
+};
+
+
+typedef TOCTLightmap *POCTLightmap;
+
+struct DECLSPEC_DRECORD TOCTLight
+{
+public:
+	Gls::Vectortypes::TVector3f pos;
+	Gls::Vectortypes::TVector3f color;
+	int intensity;
+};
+
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TOCTFile : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+	
+private:
+	typedef System::DynamicArray<TOCTVertex> _TOCTFile__1;
+	
+	typedef System::DynamicArray<TOCTFace> _TOCTFile__2;
+	
+	typedef System::DynamicArray<TOCTTexture> _TOCTFile__3;
+	
+	typedef System::DynamicArray<TOCTLightmap> _TOCTFile__4;
+	
+	typedef System::DynamicArray<TOCTLight> _TOCTFile__5;
+	
+	
+public:
+	TOCTHeader Header;
+	_TOCTFile__1 Vertices;
+	_TOCTFile__2 Faces;
+	_TOCTFile__3 Textures;
+	_TOCTFile__4 Lightmaps;
+	_TOCTFile__5 Lights;
+	Gls::Vectortypes::TVector3f PlayerPos;
+	__fastcall TOCTFile()/* overload */;
+	__fastcall TOCTFile(System::Classes::TStream* octStream)/* overload */;
+	void __fastcall SaveToStream(System::Classes::TStream* aStream);
+	void __fastcall AddTriangles(Gls::Vectorlists::TGLAffineVectorList* vertexCoords, Gls::Vectorlists::TGLAffineVectorList* texMapCoords, const System::UnicodeString textureName);
+	void __fastcall AddLight(const Gls::Vectortypes::TVector3f &lightPos, const Gls::Vectortypes::TVector4f &lightColor, int lightIntensity);
+public:
+	/* TObject.Destroy */ inline __fastcall virtual ~TOCTFile() { }
+	
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Oct */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_OCT)
+using namespace Formats::Oct;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_OctHPP

+ 244 - 0
include/Win32/Formats.Q3BSP.hpp

@@ -0,0 +1,244 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.Q3BSP.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_Q3bspHPP
+#define Formats_Q3bspHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.VectorTypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Q3bsp
+{
+//-- forward type declarations -----------------------------------------------
+struct TBSPHeader;
+struct TBSPLump;
+struct TBSPNode;
+struct TBSPLeaf;
+struct TBSPModel;
+struct TBSPVertex;
+struct TBSPFace;
+struct TBSPTexture;
+struct TBSPLightmap;
+struct TBSPVisData;
+class DELPHICLASS TQ3BSP;
+//-- type declarations -------------------------------------------------------
+struct DECLSPEC_DRECORD TBSPHeader
+{
+public:
+	System::StaticArray<char, 4> StrID;
+	int Version;
+};
+
+
+struct DECLSPEC_DRECORD TBSPLump
+{
+public:
+	int Offset;
+	int Length;
+};
+
+
+typedef System::StaticArray<int, 6> TBSPBBox;
+
+struct DECLSPEC_DRECORD TBSPNode
+{
+public:
+	int Plane;
+	System::StaticArray<int, 2> Children;
+	TBSPBBox BBox;
+};
+
+
+struct DECLSPEC_DRECORD TBSPLeaf
+{
+public:
+	int Cluster;
+	int Area;
+	TBSPBBox BBox;
+	int FirstFace;
+	int NumFaces;
+	int FirstBrush;
+	int NumBrushes;
+};
+
+
+struct DECLSPEC_DRECORD TBSPModel
+{
+public:
+	TBSPBBox BBox;
+	int FirstFace;
+	int NumFaces;
+	int FirstBrush;
+	int NumBrushes;
+};
+
+
+struct DECLSPEC_DRECORD TBSPVertex
+{
+public:
+	Gls::Vectortypes::TVector3f Position;
+	Gls::Vectortypes::TVector2f TextureCoord;
+	Gls::Vectortypes::TVector2f LightmapCoord;
+	Gls::Vectortypes::TVector3f Normal;
+	System::StaticArray<System::Byte, 4> Color;
+};
+
+
+typedef TBSPVertex *PBSPVertex;
+
+struct DECLSPEC_DRECORD TBSPFace
+{
+public:
+	int textureID;
+	int effect;
+	int FaceType;
+	int startVertIndex;
+	int numOfVerts;
+	int meshVertIndex;
+	int numMeshVerts;
+	int lightmapID;
+	System::StaticArray<int, 2> lMapCorner;
+	System::StaticArray<int, 2> lMapSize;
+	Gls::Vectortypes::TVector3f lMapPos;
+	System::StaticArray<Gls::Vectortypes::TVector3f, 2> lMapVecs;
+	Gls::Vectortypes::TVector3f vNormal;
+	System::StaticArray<int, 2> Size;
+};
+
+
+typedef TBSPFace *PBSPFace;
+
+struct DECLSPEC_DRECORD TBSPTexture
+{
+public:
+	System::StaticArray<System::WideChar, 64> TextureName;
+	int flags;
+	int contents;
+};
+
+
+typedef TBSPTexture *PBSPTexture;
+
+struct DECLSPEC_DRECORD TBSPLightmap
+{
+public:
+	System::StaticArray<System::Byte, 49152> imageBits;
+};
+
+
+typedef TBSPLightmap *PBSPLightmap;
+
+struct DECLSPEC_DRECORD TBSPVisData
+{
+	
+private:
+	typedef System::DynamicArray<System::Byte> _TBSPVisData__1;
+	
+	
+public:
+	int numOfClusters;
+	int bytesPerCluster;
+	_TBSPVisData__1 bitSets;
+};
+
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TQ3BSP : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+	
+private:
+	typedef System::DynamicArray<TBSPLump> _TQ3BSP__1;
+	
+	typedef System::DynamicArray<TBSPVertex> _TQ3BSP__2;
+	
+	typedef System::DynamicArray<TBSPNode> _TQ3BSP__3;
+	
+	typedef System::DynamicArray<Gls::Vectortypes::TVector4f> _TQ3BSP__4;
+	
+	typedef System::DynamicArray<TBSPLeaf> _TQ3BSP__5;
+	
+	typedef System::DynamicArray<TBSPFace> _TQ3BSP__6;
+	
+	typedef System::DynamicArray<TBSPTexture> _TQ3BSP__7;
+	
+	typedef System::DynamicArray<TBSPLightmap> _TQ3BSP__8;
+	
+	
+public:
+	TBSPHeader Header;
+	_TQ3BSP__1 Lumps;
+	int numOfVerts;
+	int NumOfNodes;
+	int NumOfPlanes;
+	int NumOfLeaves;
+	int NumOfFaces;
+	int NumOfTextures;
+	int NumOfLightmaps;
+	_TQ3BSP__2 Vertices;
+	_TQ3BSP__3 Nodes;
+	_TQ3BSP__4 Planes;
+	_TQ3BSP__5 Leaves;
+	_TQ3BSP__6 Faces;
+	_TQ3BSP__7 Textures;
+	_TQ3BSP__8 Lightmaps;
+	TBSPVisData VisData;
+	__fastcall TQ3BSP(System::Classes::TStream* bspStream);
+public:
+	/* TObject.Destroy */ inline __fastcall virtual ~TQ3BSP() { }
+	
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+static const System::Int8 FACE_POLYGON = System::Int8(0x1);
+static const System::Word MAX_TEXTURES = System::Word(0x3e8);
+static const System::Int8 kEntities = System::Int8(0x0);
+static const System::Int8 kTextures = System::Int8(0x1);
+static const System::Int8 kPlanes = System::Int8(0x2);
+static const System::Int8 kNodes = System::Int8(0x3);
+static const System::Int8 kLeafs = System::Int8(0x4);
+static const System::Int8 kLeafFaces = System::Int8(0x5);
+static const System::Int8 kLeafBrushes = System::Int8(0x6);
+static const System::Int8 kModels = System::Int8(0x7);
+static const System::Int8 kBrushes = System::Int8(0x8);
+static const System::Int8 kBrushSides = System::Int8(0x9);
+static const System::Int8 kVertices = System::Int8(0xa);
+static const System::Int8 kMeshVerts = System::Int8(0xb);
+static const System::Int8 kShaders = System::Int8(0xc);
+static const System::Int8 kFaces = System::Int8(0xd);
+static const System::Int8 kLightmaps = System::Int8(0xe);
+static const System::Int8 kLightVolumes = System::Int8(0xf);
+static const System::Int8 kVisData = System::Int8(0x10);
+static const System::Int8 kMaxLumps = System::Int8(0x11);
+}	/* namespace Q3bsp */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_Q3BSP)
+using namespace Formats::Q3bsp;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_Q3bspHPP

+ 69 - 0
include/Win32/Formats.TGA.hpp

@@ -0,0 +1,69 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.TGA.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_TgaHPP
+#define Formats_TgaHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.OpenGL.hpp>
+#include <Winapi.OpenGLext.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.OpenGLTokens.hpp>
+#include <GLS.Context.hpp>
+#include <GLS.Graphics.hpp>
+#include <GLS.ApplicationFileIO.hpp>
+#include <GLS.TextureFormat.hpp>
+#include <GLS.BaseClasses.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Tga
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLTGAImage;
+//-- type declarations -------------------------------------------------------
+class PASCALIMPLEMENTATION TGLTGAImage : public Gls::Graphics::TGLBaseImage
+{
+	typedef Gls::Graphics::TGLBaseImage inherited;
+	
+public:
+	virtual void __fastcall LoadFromFile(const System::UnicodeString filename);
+	virtual void __fastcall SaveToFile(const System::UnicodeString filename);
+	virtual void __fastcall LoadFromStream(System::Classes::TStream* stream);
+	virtual void __fastcall SaveToStream(System::Classes::TStream* stream);
+	__classmethod virtual Gls::Applicationfileio::TGLDataFileCapabilities __fastcall Capabilities();
+	HIDESBASE void __fastcall AssignFromTexture(Gls::Context::TGLContext* textureContext, const unsigned textureHandle, Gls::Textureformat::TGLTextureTarget textureTarget, const bool CurrentFormat, const Gls::Textureformat::TGLInternalFormat intFormat);
+public:
+	/* TGLBaseImage.Create */ inline __fastcall virtual TGLTGAImage() : Gls::Graphics::TGLBaseImage() { }
+	/* TGLBaseImage.Destroy */ inline __fastcall virtual ~TGLTGAImage() { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Tga */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_TGA)
+using namespace Formats::Tga;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_TgaHPP

+ 1909 - 0
include/Win32/Formats.VFW.hpp

@@ -0,0 +1,1909 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.VFW.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_VfwHPP
+#define Formats_VfwHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <Winapi.MMSystem.hpp>
+#include <Winapi.Messages.hpp>
+#include <Winapi.CommDlg.hpp>
+#include <Winapi.ActiveX.hpp>
+#include <System.Types.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Vfw
+{
+//-- forward type declarations -----------------------------------------------
+struct TICOPEN;
+struct TICINFO;
+struct TICCOMPRESS;
+struct TICCOMPRESSFRAMES;
+struct TICSETSTATUSPROC;
+struct TICDECOMPRESS;
+struct TICDECOMPRESSEX;
+struct TICDRAWBEGIN;
+struct TICDRAW;
+struct TICDRAWSUGGEST;
+struct TICPALETTE;
+struct TCOMPVARS;
+struct TDRAWDIBTIME;
+struct TMainAVIHeader;
+struct TAVIStreamHeader;
+struct TAVIINDEXENTRY;
+struct TAVIPALCHANGE;
+struct TAVIStreamInfoW;
+struct TAVIStreamInfoA;
+struct TAVIFileInfoW;
+struct TAVIFileInfoA;
+struct TAVICOMPRESSOPTIONS;
+__interface DELPHIINTERFACE IAVIStream;
+typedef System::DelphiInterface<IAVIStream> _di_IAVIStream;
+__interface DELPHIINTERFACE IAVIStreaming;
+typedef System::DelphiInterface<IAVIStreaming> _di_IAVIStreaming;
+__interface DELPHIINTERFACE IAVIEditStream;
+typedef System::DelphiInterface<IAVIEditStream> _di_IAVIEditStream;
+__interface DELPHIINTERFACE IAVIFile;
+typedef System::DelphiInterface<IAVIFile> _di_IAVIFile;
+__interface DELPHIINTERFACE IGetFrame;
+typedef System::DelphiInterface<IGetFrame> _di_IGetFrame;
+struct TVIDEOHDR;
+struct TCHANNEL_CAPS;
+struct TCAPDRIVERCAPS;
+struct TCAPSTATUS;
+struct TCAPTUREPARMS;
+struct TCAPINFOCHUNK;
+//-- type declarations -------------------------------------------------------
+typedef void * PVOID;
+
+typedef int LONG;
+
+typedef int *PLONG;
+
+typedef int Int;
+
+typedef NativeUInt HIC;
+
+typedef System::Word TWOCC;
+
+typedef TICOPEN *PICOPEN;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICOPEN
+{
+public:
+	unsigned dwSize;
+	unsigned fccType;
+	unsigned fccHandler;
+	unsigned dwVersion;
+	unsigned dwFlags;
+	unsigned dwError;
+	void *pV1Reserved;
+	void *pV2Reserved;
+	unsigned dnDevNode;
+};
+#pragma pack(pop)
+
+
+typedef TICINFO *PICINFO;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICINFO
+{
+public:
+	unsigned dwSize;
+	unsigned fccType;
+	unsigned fccHandler;
+	unsigned dwFlags;
+	unsigned dwVersion;
+	unsigned dwVersionICM;
+	System::StaticArray<System::WideChar, 16> szName;
+	System::StaticArray<System::WideChar, 128> szDescription;
+	System::StaticArray<System::WideChar, 128> szDriver;
+};
+#pragma pack(pop)
+
+
+typedef TICCOMPRESS *PICCOMPRESS;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICCOMPRESS
+{
+public:
+	unsigned dwFlags;
+	tagBITMAPINFOHEADER *lpbiOutput;
+	void *lpOutput;
+	tagBITMAPINFOHEADER *lpbiInput;
+	void *lpInput;
+	unsigned *lpckid;
+	unsigned *lpdwFlags;
+	int lFrameNum;
+	unsigned dwFrameSize;
+	unsigned dwQuality;
+	tagBITMAPINFOHEADER *lpbiPrev;
+	void *lpPrev;
+};
+#pragma pack(pop)
+
+
+typedef int __stdcall (*TICCompressProc)(NativeInt lInputOutput, unsigned lFrame, void * lpBits, int len);
+
+typedef TICCOMPRESSFRAMES *PICCOMPRESSFRAMES;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICCOMPRESSFRAMES
+{
+public:
+	unsigned dwFlags;
+	tagBITMAPINFOHEADER *lpbiOutput;
+	NativeInt lOutput;
+	tagBITMAPINFOHEADER *lpbiInput;
+	NativeInt lInput;
+	int lStartFrame;
+	int lFrameCount;
+	int lQuality;
+	int lDataRate;
+	int lKeyRate;
+	unsigned dwRate;
+	unsigned dwScale;
+	unsigned dwOverheadPerFrame;
+	unsigned dwReserved2;
+	TICCompressProc GetData;
+	TICCompressProc PutData;
+};
+#pragma pack(pop)
+
+
+typedef int __stdcall (*TICStatusProc)(NativeInt lParam, unsigned message, int l);
+
+typedef TICSETSTATUSPROC *PICSETSTATUSPROC;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICSETSTATUSPROC
+{
+public:
+	unsigned dwFlags;
+	NativeInt lParam;
+	TICStatusProc Status;
+};
+#pragma pack(pop)
+
+
+typedef TICDECOMPRESS *PICDECOMPRESS;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICDECOMPRESS
+{
+public:
+	unsigned dwFlags;
+	tagBITMAPINFOHEADER *lpbiInput;
+	void *lpInput;
+	tagBITMAPINFOHEADER *lpbiOutput;
+	void *lpOutput;
+	unsigned ckid;
+};
+#pragma pack(pop)
+
+
+typedef TICDECOMPRESSEX *PICDECOMPRESSEX;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICDECOMPRESSEX
+{
+public:
+	unsigned dwFlags;
+	tagBITMAPINFOHEADER *lpbiSrc;
+	void *lpSrc;
+	tagBITMAPINFOHEADER *lpbiDst;
+	void *lpDst;
+	int xDst;
+	int yDst;
+	int dxDst;
+	int dyDst;
+	int xSrc;
+	int ySrc;
+	int dxSrc;
+	int dySrc;
+};
+#pragma pack(pop)
+
+
+typedef TICDRAWBEGIN *PICDRAWBEGIN;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICDRAWBEGIN
+{
+public:
+	unsigned dwFlags;
+	HPALETTE hpal;
+	HWND hwnd;
+	HDC hdc;
+	int xDst;
+	int yDst;
+	int dxDst;
+	int dyDst;
+	tagBITMAPINFOHEADER *lpbi;
+	int xSrc;
+	int ySrc;
+	int dxSrc;
+	int dySrc;
+	unsigned dwRate;
+	unsigned dwScale;
+};
+#pragma pack(pop)
+
+
+typedef TICDRAW *PICDRAW;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICDRAW
+{
+public:
+	unsigned dwFlags;
+	void *lpFormat;
+	void *lpData;
+	unsigned cbData;
+	int lTime;
+};
+#pragma pack(pop)
+
+
+typedef TICDRAWSUGGEST *PICDRAWSUGGEST;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICDRAWSUGGEST
+{
+public:
+	tagBITMAPINFOHEADER *lpbiIn;
+	tagBITMAPINFOHEADER *lpbiSuggest;
+	int dxSrc;
+	int dySrc;
+	int dxDst;
+	int dyDst;
+	NativeUInt hicDecompressor;
+};
+#pragma pack(pop)
+
+
+typedef TICPALETTE *PICPALETTE;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TICPALETTE
+{
+public:
+	unsigned dwFlags;
+	int iStart;
+	int iLen;
+	tagPALETTEENTRY *lppe;
+};
+#pragma pack(pop)
+
+
+typedef TCOMPVARS *PCOMPVARS;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TCOMPVARS
+{
+public:
+	unsigned cbSize;
+	unsigned dwFlags;
+	NativeUInt hic;
+	unsigned fccType;
+	unsigned fccHandler;
+	tagBITMAPINFO *lpbiIn;
+	tagBITMAPINFO *lpbiOut;
+	void *lpBitsOut;
+	void *lpBitsPrev;
+	int lFrame;
+	int lKey;
+	int lDataRate;
+	int lQ;
+	int lKeyCount;
+	void *lpState;
+	int cbState;
+};
+#pragma pack(pop)
+
+
+typedef NativeUInt HDRAWDIB;
+
+typedef TDRAWDIBTIME *PDRAWDIBTIME;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TDRAWDIBTIME
+{
+public:
+	int timeCount;
+	int timeDraw;
+	int timeDecompress;
+	int timeDither;
+	int timeStretch;
+	int timeBlt;
+	int timeSetDIBits;
+};
+#pragma pack(pop)
+
+
+typedef TMainAVIHeader *PMainAVIHeader;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TMainAVIHeader
+{
+public:
+	unsigned dwMicroSecPerFrame;
+	unsigned dwMaxBytesPerSec;
+	unsigned dwPaddingGranularity;
+	unsigned dwFlags;
+	unsigned dwTotalFrames;
+	unsigned dwInitialFrames;
+	unsigned dwStreams;
+	unsigned dwSuggestedBufferSize;
+	unsigned dwWidth;
+	unsigned dwHeight;
+	System::StaticArray<unsigned, 4> dwReserved;
+};
+#pragma pack(pop)
+
+
+typedef TAVIStreamHeader *PAVIStreamHeader;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TAVIStreamHeader
+{
+public:
+	unsigned fccType;
+	unsigned fccHandler;
+	unsigned dwFlags;
+	System::Word wPriority;
+	System::Word wLanguage;
+	unsigned dwInitialFrames;
+	unsigned dwScale;
+	unsigned dwRate;
+	unsigned dwStart;
+	unsigned dwLength;
+	unsigned dwSuggestedBufferSize;
+	unsigned dwQuality;
+	unsigned dwSampleSize;
+	System::Types::TRect rcFrame;
+};
+#pragma pack(pop)
+
+
+typedef TAVIINDEXENTRY *PAVIINDEXENTRY;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TAVIINDEXENTRY
+{
+public:
+	unsigned ckid;
+	unsigned dwFlags;
+	unsigned dwChunkOffset;
+	unsigned dwChunkLength;
+};
+#pragma pack(pop)
+
+
+typedef TAVIPALCHANGE *PAVIPALCHANGE;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TAVIPALCHANGE
+{
+public:
+	System::Byte bFirstEntry;
+	System::Byte bNumEntries;
+	System::Word wFlags;
+	System::StaticArray<tagPALETTEENTRY, 1> peNew;
+};
+#pragma pack(pop)
+
+
+typedef TAVIStreamInfoW *PAVIStreamInfoW;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TAVIStreamInfoW
+{
+public:
+	unsigned fccType;
+	unsigned fccHandler;
+	unsigned dwFlags;
+	unsigned dwCaps;
+	System::Word wPriority;
+	System::Word wLanguage;
+	unsigned dwScale;
+	unsigned dwRate;
+	unsigned dwStart;
+	unsigned dwLength;
+	unsigned dwInitialFrames;
+	unsigned dwSuggestedBufferSize;
+	unsigned dwQuality;
+	unsigned dwSampleSize;
+	System::Types::TRect rcFrame;
+	unsigned dwEditCount;
+	unsigned dwFormatChangeCount;
+	System::StaticArray<System::WideChar, 64> szName;
+};
+#pragma pack(pop)
+
+
+typedef TAVIStreamInfoA *PAVIStreamInfoA;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TAVIStreamInfoA
+{
+public:
+	unsigned fccType;
+	unsigned fccHandler;
+	unsigned dwFlags;
+	unsigned dwCaps;
+	System::Word wPriority;
+	System::Word wLanguage;
+	unsigned dwScale;
+	unsigned dwRate;
+	unsigned dwStart;
+	unsigned dwLength;
+	unsigned dwInitialFrames;
+	unsigned dwSuggestedBufferSize;
+	unsigned dwQuality;
+	unsigned dwSampleSize;
+	System::Types::TRect rcFrame;
+	unsigned dwEditCount;
+	unsigned dwFormatChangeCount;
+	System::StaticArray<char, 64> szName;
+};
+#pragma pack(pop)
+
+
+typedef TAVIStreamInfoW *PAVIStreamInfo;
+
+typedef TAVIStreamInfoW TAVIStreamInfo;
+
+typedef TAVIFileInfoW *PAVIFileInfoW;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TAVIFileInfoW
+{
+public:
+	unsigned dwMaxBytesPerSec;
+	unsigned dwFlags;
+	unsigned dwCaps;
+	unsigned dwStreams;
+	unsigned dwSuggestedBufferSize;
+	unsigned dwWidth;
+	unsigned dwHeight;
+	unsigned dwScale;
+	unsigned dwRate;
+	unsigned dwLength;
+	unsigned dwEditCount;
+	System::StaticArray<System::WideChar, 64> szFileType;
+};
+#pragma pack(pop)
+
+
+typedef TAVIFileInfoA *PAVIFileInfoA;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TAVIFileInfoA
+{
+public:
+	unsigned dwMaxBytesPerSec;
+	unsigned dwFlags;
+	unsigned dwCaps;
+	unsigned dwStreams;
+	unsigned dwSuggestedBufferSize;
+	unsigned dwWidth;
+	unsigned dwHeight;
+	unsigned dwScale;
+	unsigned dwRate;
+	unsigned dwLength;
+	unsigned dwEditCount;
+	System::StaticArray<char, 64> szFileType;
+};
+#pragma pack(pop)
+
+
+typedef TAVIFileInfoW *PAVIFileInfo;
+
+typedef TAVIFileInfoW TAVIFileInfo;
+
+typedef System::LongBool __pascal (*TAVISAVECALLBACK)(int i);
+
+typedef TAVICOMPRESSOPTIONS *PAVICOMPRESSOPTIONS;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TAVICOMPRESSOPTIONS
+{
+public:
+	unsigned fccType;
+	unsigned fccHandler;
+	unsigned dwKeyFrameEvery;
+	unsigned dwQuality;
+	unsigned dwBytesPerSecond;
+	unsigned dwFlags;
+	void *lpFormat;
+	unsigned cbFormat;
+	void *lpParms;
+	unsigned cbParms;
+	unsigned dwInterleaveEvery;
+};
+#pragma pack(pop)
+
+
+__interface IAVIStream  : public System::IInterface 
+{
+	virtual HRESULT __stdcall Create(NativeInt lParam1, NativeInt lParam2) = 0 ;
+	virtual HRESULT __stdcall Info(TAVIStreamInfoW &psi, int lSize) = 0 ;
+	virtual int __stdcall FindSample(int lPos, int lFlags) = 0 ;
+	virtual HRESULT __stdcall ReadFormat(int lPos, void * lpFormat, int &lpcbFormat) = 0 ;
+	virtual HRESULT __stdcall SetFormat(int lPos, void * lpFormat, int cbFormat) = 0 ;
+	virtual HRESULT __stdcall Read(int lStart, int lSamples, void * lpBuffer, int cbBuffer, int &plBytes, int &plSamples) = 0 ;
+	virtual HRESULT __stdcall Write(int lStart, int lSamples, void * lpBuffer, int cbBuffer, unsigned dwFlags, int &plSampWritten, int &plBytesWritten) = 0 ;
+	virtual HRESULT __stdcall Delete(int lStart, int lSamples) = 0 ;
+	virtual HRESULT __stdcall ReadData(unsigned fcc, void * lp, int &lpcb) = 0 ;
+	virtual HRESULT __stdcall WriteData(unsigned fcc, void * lp, int cb) = 0 ;
+	virtual HRESULT __stdcall SetInfo(TAVIStreamInfoW &lpInfo, int cbInfo) = 0 ;
+};
+
+__interface IAVIStreaming  : public System::IInterface 
+{
+	virtual HRESULT __stdcall _Begin(int lStart, int lEnd, int lRate) = 0 ;
+	virtual HRESULT __stdcall _End() = 0 ;
+};
+
+__interface IAVIEditStream  : public System::IInterface 
+{
+	virtual HRESULT __stdcall Cut(int &plStart, int &plLength, _di_IAVIStream &ppResult) = 0 ;
+	virtual HRESULT __stdcall Copy(int &plStart, int &plLength, _di_IAVIStream &ppResult) = 0 ;
+	virtual HRESULT __stdcall Paste(int &plPos, int &plLength, _di_IAVIStream pstream, int lStart, int lEnd) = 0 ;
+	virtual HRESULT __stdcall Clone(_di_IAVIStream &ppResult) = 0 ;
+	virtual HRESULT __stdcall SetInfo(TAVIStreamInfoW &lpInfo, int cbInfo) = 0 ;
+};
+
+__interface IAVIFile  : public System::IInterface 
+{
+	virtual HRESULT __stdcall Info(TAVIFileInfoW &pfi, int iSize) = 0 ;
+	virtual HRESULT __stdcall GetStream(_di_IAVIStream &ppStream, unsigned fccType, int lParam) = 0 ;
+	virtual HRESULT __stdcall CreateStream(_di_IAVIStream &ppStream, TAVIStreamInfoW &psi) = 0 ;
+	virtual HRESULT __stdcall WriteData(unsigned ckid, void * lpData, int cbData) = 0 ;
+	virtual HRESULT __stdcall ReadData(unsigned ckid, void * lpData, PLONG lpcbData) = 0 ;
+	virtual HRESULT __stdcall EndRecord() = 0 ;
+	virtual HRESULT __stdcall DeleteStream(unsigned fccType, int lParam) = 0 ;
+};
+
+__interface IGetFrame  : public System::IInterface 
+{
+	virtual Winapi::Windows::PBitmapInfoHeader __stdcall GetFrame(int lPos) = 0 ;
+	virtual HRESULT __stdcall BeginExtraction(int lStart, int lEnd, int lRate) = 0 ;
+	virtual HRESULT __stdcall EndExtraction() = 0 ;
+	virtual HRESULT __stdcall SetFormat(tagBITMAPINFOHEADER &lpbi, void * lpBits, int x, int y, int dx, int dy) = 0 ;
+};
+
+typedef System::_di_IInterface *PUnknown;
+
+typedef NativeUInt HVIDEO;
+
+typedef NativeUInt *PHVIDEO;
+
+typedef TVIDEOHDR *PVIDEOHDR;
+
+struct DECLSPEC_DRECORD TVIDEOHDR
+{
+public:
+	System::Byte *lpData;
+	unsigned dwBufferLength;
+	unsigned dwBytesUsed;
+	unsigned dwTimeCaptured;
+	unsigned dwUser;
+	unsigned dwFlags;
+	System::StaticArray<unsigned, 4> dwReserved;
+};
+
+
+typedef TCHANNEL_CAPS *PCHANNEL_CAPS;
+
+struct DECLSPEC_DRECORD TCHANNEL_CAPS
+{
+public:
+	unsigned dwFlags;
+	unsigned dwSrcRectXMod;
+	unsigned dwSrcRectYMod;
+	unsigned dwSrcRectWidthMod;
+	unsigned dwSrcRectHeightMod;
+	unsigned dwDstRectXMod;
+	unsigned dwDstRectYMod;
+	unsigned dwDstRectWidthMod;
+	unsigned dwDstRectHeightMod;
+};
+
+
+typedef unsigned __stdcall (*TCAPYIELDCALLBACK)(HWND hWnd);
+
+typedef unsigned __stdcall (*TCAPSTATUSCALLBACKW)(HWND hWnd, int nID, System::WideChar * lpsz);
+
+typedef unsigned __stdcall (*TCAPERRORCALLBACKW)(HWND hWnd, int nID, System::WideChar * lpsz);
+
+typedef unsigned __stdcall (*TCAPSTATUSCALLBACKA)(HWND hWnd, int nID, char * lpsz);
+
+typedef unsigned __stdcall (*TCAPERRORCALLBACKA)(HWND hWnd, int nID, char * lpsz);
+
+typedef TCAPSTATUSCALLBACKA TCAPSTATUSCALLBACK;
+
+typedef TCAPERRORCALLBACKA TCAPERRORCALLBACK;
+
+typedef unsigned __stdcall (*TCAPVIDEOCALLBACK)(HWND hWnd, PVIDEOHDR lpVHdr);
+
+typedef unsigned __stdcall (*TCAPWAVECALLBACK)(HWND hWnd, Winapi::Mmsystem::PWaveHdr lpWHdr);
+
+typedef unsigned __stdcall (*TCAPCONTROLCALLBACK)(HWND hWnd, int nState);
+
+typedef TCAPDRIVERCAPS *PCAPDRIVERCAPS;
+
+struct DECLSPEC_DRECORD TCAPDRIVERCAPS
+{
+public:
+	unsigned wDeviceIndex;
+	System::LongBool fHasOverlay;
+	System::LongBool fHasDlgVideoSource;
+	System::LongBool fHasDlgVideoFormat;
+	System::LongBool fHasDlgVideoDisplay;
+	System::LongBool fCaptureInitialized;
+	System::LongBool fDriverSuppliesPalettes;
+	NativeUInt hVideoIn;
+	NativeUInt hVideoOut;
+	NativeUInt hVideoExtIn;
+	NativeUInt hVideoExtOut;
+};
+
+
+typedef TCAPSTATUS *PCAPSTATUS;
+
+struct DECLSPEC_DRECORD TCAPSTATUS
+{
+public:
+	unsigned uiImageWidth;
+	unsigned uiImageHeight;
+	System::LongBool fLiveWindow;
+	System::LongBool fOverlayWindow;
+	System::LongBool fScale;
+	System::Types::TPoint ptScroll;
+	System::LongBool fUsingDefaultPalette;
+	System::LongBool fAudioHardware;
+	System::LongBool fCapFileExists;
+	unsigned dwCurrentVideoFrame;
+	unsigned dwCurrentVideoFramesDropped;
+	unsigned dwCurrentWaveSamples;
+	unsigned dwCurrentTimeElapsedMS;
+	HPALETTE hPalCurrent;
+	System::LongBool fCapturingNow;
+	unsigned dwReturn;
+	unsigned wNumVideoAllocated;
+	unsigned wNumAudioAllocated;
+};
+
+
+typedef TCAPTUREPARMS *PCAPTUREPARMS;
+
+struct DECLSPEC_DRECORD TCAPTUREPARMS
+{
+public:
+	unsigned dwRequestMicroSecPerFrame;
+	System::LongBool fMakeUserHitOKToCapture;
+	unsigned wPercentDropForError;
+	System::LongBool fYield;
+	unsigned dwIndexSize;
+	unsigned wChunkGranularity;
+	System::LongBool fUsingDOSMemory;
+	unsigned wNumVideoRequested;
+	System::LongBool fCaptureAudio;
+	unsigned wNumAudioRequested;
+	unsigned vKeyAbort;
+	System::LongBool fAbortLeftMouse;
+	System::LongBool fAbortRightMouse;
+	System::LongBool fLimitEnabled;
+	unsigned wTimeLimit;
+	System::LongBool fMCIControl;
+	System::LongBool fStepMCIDevice;
+	unsigned dwMCIStartTime;
+	unsigned dwMCIStopTime;
+	System::LongBool fStepCaptureAt2x;
+	unsigned wStepCaptureAverageFrames;
+	unsigned dwAudioBufferSize;
+	System::LongBool fDisableWriteCache;
+	unsigned AVStreamMaster;
+};
+
+
+typedef TCAPINFOCHUNK *PCAPINFOCHUNK;
+
+struct DECLSPEC_DRECORD TCAPINFOCHUNK
+{
+public:
+	unsigned fccInfoID;
+	void *lpData;
+	unsigned cbData;
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+static const System::Word ICVERSION = System::Word(0x104);
+static const int BI_1632 = int(0x32333631);
+static const int ICTYPE_VIDEO = int(0x63646976);
+static const int ICTYPE_AUDIO = int(0x63647561);
+static const System::Int8 ICERR_OK = System::Int8(0x0);
+static const System::Int8 ICERR_DONTDRAW = System::Int8(0x1);
+static const System::Int8 ICERR_NEWPALETTE = System::Int8(0x2);
+static const System::Int8 ICERR_GOTOKEYFRAME = System::Int8(0x3);
+static const System::Int8 ICERR_STOPDRAWING = System::Int8(0x4);
+static const System::Int8 ICERR_UNSUPPORTED = System::Int8(-1);
+static const System::Int8 ICERR_BADFORMAT = System::Int8(-2);
+static const System::Int8 ICERR_MEMORY = System::Int8(-3);
+static const System::Int8 ICERR_INTERNAL = System::Int8(-4);
+static const System::Int8 ICERR_BADFLAGS = System::Int8(-5);
+static const System::Int8 ICERR_BADPARAM = System::Int8(-6);
+static const System::Int8 ICERR_BADSIZE = System::Int8(-7);
+static const System::Int8 ICERR_BADHANDLE = System::Int8(-8);
+static const System::Int8 ICERR_CANTUPDATE = System::Int8(-9);
+static const System::Int8 ICERR_ABORT = System::Int8(-10);
+static const System::Int8 ICERR_ERROR = System::Int8(-100);
+static const short ICERR_BADBITDEPTH = short(-200);
+static const short ICERR_BADIMAGESIZE = short(-201);
+static const short ICERR_CUSTOM = short(-400);
+static const System::Int8 ICMODE_COMPRESS = System::Int8(0x1);
+static const System::Int8 ICMODE_DECOMPRESS = System::Int8(0x2);
+static const System::Int8 ICMODE_FASTDECOMPRESS = System::Int8(0x3);
+static const System::Int8 ICMODE_QUERY = System::Int8(0x4);
+static const System::Int8 ICMODE_FASTCOMPRESS = System::Int8(0x5);
+static const System::Int8 ICMODE_DRAW = System::Int8(0x8);
+static const System::Int8 AVIIF_LIST = System::Int8(0x1);
+static const System::Int8 AVIIF_TWOCC = System::Int8(0x2);
+static const System::Int8 AVIIF_KEYFRAME = System::Int8(0x10);
+static const System::Int8 ICQUALITY_LOW = System::Int8(0x0);
+static const System::Word ICQUALITY_HIGH = System::Word(0x2710);
+static const System::Int8 ICQUALITY_DEFAULT = System::Int8(-1);
+static const System::Word ICM_USER = System::Word(0x4000);
+static const System::Word ICM_RESERVED_LOW = System::Word(0x5000);
+static const System::Word ICM_RESERVED_HIGH = System::Word(0x6000);
+static const System::Word ICM_RESERVED = System::Word(0x5000);
+static const System::Word ICM_GETSTATE = System::Word(0x5000);
+static const System::Word ICM_SETSTATE = System::Word(0x5001);
+static const System::Word ICM_GETINFO = System::Word(0x5002);
+static const System::Word ICM_CONFIGURE = System::Word(0x500a);
+static const System::Word ICM_ABOUT = System::Word(0x500b);
+static const System::Word ICM_GETDEFAULTQUALITY = System::Word(0x501e);
+static const System::Word ICM_GETQUALITY = System::Word(0x501f);
+static const System::Word ICM_SETQUALITY = System::Word(0x5020);
+static const System::Word ICM_SET = System::Word(0x5028);
+static const System::Word ICM_GET = System::Word(0x5029);
+static const int ICM_FRAMERATE = int(0x526d7246);
+static const int ICM_KEYFRAMERATE = int(0x5279654b);
+static const System::Word ICM_COMPRESS_GET_FORMAT = System::Word(0x4004);
+static const System::Word ICM_COMPRESS_GET_SIZE = System::Word(0x4005);
+static const System::Word ICM_COMPRESS_QUERY = System::Word(0x4006);
+static const System::Word ICM_COMPRESS_BEGIN = System::Word(0x4007);
+static const System::Word ICM_COMPRESS = System::Word(0x4008);
+static const System::Word ICM_COMPRESS_END = System::Word(0x4009);
+static const System::Word ICM_DECOMPRESS_GET_FORMAT = System::Word(0x400a);
+static const System::Word ICM_DECOMPRESS_QUERY = System::Word(0x400b);
+static const System::Word ICM_DECOMPRESS_BEGIN = System::Word(0x400c);
+static const System::Word ICM_DECOMPRESS = System::Word(0x400d);
+static const System::Word ICM_DECOMPRESS_END = System::Word(0x400e);
+static const System::Word ICM_DECOMPRESS_SET_PALETTE = System::Word(0x401d);
+static const System::Word ICM_DECOMPRESS_GET_PALETTE = System::Word(0x401e);
+static const System::Word ICM_DRAW_QUERY = System::Word(0x401f);
+static const System::Word ICM_DRAW_BEGIN = System::Word(0x400f);
+static const System::Word ICM_DRAW_GET_PALETTE = System::Word(0x4010);
+static const System::Word ICM_DRAW_START = System::Word(0x4012);
+static const System::Word ICM_DRAW_STOP = System::Word(0x4013);
+static const System::Word ICM_DRAW_END = System::Word(0x4015);
+static const System::Word ICM_DRAW_GETTIME = System::Word(0x4020);
+static const System::Word ICM_DRAW = System::Word(0x4021);
+static const System::Word ICM_DRAW_WINDOW = System::Word(0x4022);
+static const System::Word ICM_DRAW_SETTIME = System::Word(0x4023);
+static const System::Word ICM_DRAW_REALIZE = System::Word(0x4024);
+static const System::Word ICM_DRAW_FLUSH = System::Word(0x4025);
+static const System::Word ICM_DRAW_RENDERBUFFER = System::Word(0x4026);
+static const System::Word ICM_DRAW_START_PLAY = System::Word(0x4027);
+static const System::Word ICM_DRAW_STOP_PLAY = System::Word(0x4028);
+static const System::Word ICM_DRAW_SUGGESTFORMAT = System::Word(0x4032);
+static const System::Word ICM_DRAW_CHANGEPALETTE = System::Word(0x4033);
+static const System::Word ICM_GETBUFFERSWANTED = System::Word(0x4029);
+static const System::Word ICM_GETDEFAULTKEYFRAMERATE = System::Word(0x402a);
+static const System::Word ICM_DECOMPRESSEX_BEGIN = System::Word(0x403c);
+static const System::Word ICM_DECOMPRESSEX_QUERY = System::Word(0x403d);
+static const System::Word ICM_DECOMPRESSEX = System::Word(0x403e);
+static const System::Word ICM_DECOMPRESSEX_END = System::Word(0x403f);
+static const System::Word ICM_COMPRESS_FRAMES_INFO = System::Word(0x4046);
+static const System::Word ICM_SET_STATUS_PROC = System::Word(0x4048);
+static const System::Int8 VIDCF_QUALITY = System::Int8(0x1);
+static const System::Int8 VIDCF_CRUNCH = System::Int8(0x2);
+static const System::Int8 VIDCF_TEMPORAL = System::Int8(0x4);
+static const System::Int8 VIDCF_COMPRESSFRAMES = System::Int8(0x8);
+static const System::Int8 VIDCF_DRAW = System::Int8(0x10);
+static const System::Int8 VIDCF_FASTTEMPORALC = System::Int8(0x20);
+static const System::Byte VIDCF_FASTTEMPORALD = System::Byte(0x80);
+static const System::Int8 ICCOMPRESS_KEYFRAME = System::Int8(0x1);
+static const System::Int8 ICCOMPRESSFRAMES_PADDING = System::Int8(0x1);
+static const System::Int8 ICSTATUS_START = System::Int8(0x0);
+static const System::Int8 ICSTATUS_STATUS = System::Int8(0x1);
+static const System::Int8 ICSTATUS_END = System::Int8(0x2);
+static const System::Int8 ICSTATUS_ERROR = System::Int8(0x3);
+static const System::Int8 ICSTATUS_YIELD = System::Int8(0x4);
+static const unsigned ICDECOMPRESS_HURRYUP = unsigned(0x80000000);
+static const int ICDECOMPRESS_UPDATE = int(0x40000000);
+static const int ICDECOMPRESS_PREROLL = int(0x20000000);
+static const int ICDECOMPRESS_NULLFRAME = int(0x10000000);
+static const int ICDECOMPRESS_NOTKEYFRAME = int(0x8000000);
+static const System::Int8 ICDRAW_QUERY = System::Int8(0x1);
+static const System::Int8 ICDRAW_FULLSCREEN = System::Int8(0x2);
+static const System::Int8 ICDRAW_HDC = System::Int8(0x4);
+static const System::Int8 ICDRAW_ANIMATE = System::Int8(0x8);
+static const System::Int8 ICDRAW_CONTINUE = System::Int8(0x10);
+static const System::Int8 ICDRAW_MEMORYDC = System::Int8(0x20);
+static const System::Int8 ICDRAW_UPDATING = System::Int8(0x40);
+static const System::Byte ICDRAW_RENDER = System::Byte(0x80);
+static const System::Word ICDRAW_BUFFER = System::Word(0x100);
+static const unsigned ICDRAW_HURRYUP = unsigned(0x80000000);
+static const int ICDRAW_UPDATE = int(0x40000000);
+static const int ICDRAW_PREROLL = int(0x20000000);
+static const int ICDRAW_NULLFRAME = int(0x10000000);
+static const int ICDRAW_NOTKEYFRAME = int(0x8000000);
+static const System::Word ICINSTALL_UNICODE = System::Word(0x8000);
+static const System::Int8 ICINSTALL_FUNCTION = System::Int8(0x1);
+static const System::Int8 ICINSTALL_DRIVER = System::Int8(0x2);
+static const System::Int8 ICINSTALL_HDRV = System::Int8(0x4);
+static const System::Word ICINSTALL_DRIVERW = System::Word(0x8002);
+static const System::Int8 ICMF_CONFIGURE_QUERY = System::Int8(0x1);
+static const System::Int8 ICMF_ABOUT_QUERY = System::Int8(0x1);
+static const System::Int8 ICMF_COMPVARS_VALID = System::Int8(0x1);
+static const System::Int8 ICMF_CHOOSE_KEYFRAME = System::Int8(0x1);
+static const System::Int8 ICMF_CHOOSE_DATARATE = System::Int8(0x2);
+static const System::Int8 ICMF_CHOOSE_PREVIEW = System::Int8(0x4);
+static const System::Int8 ICMF_CHOOSE_ALLCOMPRESSORS = System::Int8(0x8);
+static const System::Int8 DDF_UPDATE = System::Int8(0x2);
+static const System::Int8 DDF_SAME_HDC = System::Int8(0x4);
+static const System::Int8 DDF_SAME_DRAW = System::Int8(0x8);
+static const System::Int8 DDF_DONTDRAW = System::Int8(0x10);
+static const System::Int8 DDF_ANIMATE = System::Int8(0x20);
+static const System::Int8 DDF_BUFFER = System::Int8(0x40);
+static const System::Byte DDF_JUSTDRAWIT = System::Byte(0x80);
+static const System::Word DDF_FULLSCREEN = System::Word(0x100);
+static const System::Word DDF_BACKGROUNDPAL = System::Word(0x200);
+static const System::Word DDF_NOTKEYFRAME = System::Word(0x400);
+static const System::Word DDF_HURRYUP = System::Word(0x800);
+static const System::Word DDF_HALFTONE = System::Word(0x1000);
+static const System::Int8 DDF_PREROLL = System::Int8(0x10);
+static const System::Int8 DDF_SAME_DIB = System::Int8(0x8);
+static const System::Int8 DDF_SAME_SIZE = System::Int8(0x8);
+static const System::Int8 PD_CAN_DRAW_DIB = System::Int8(0x1);
+static const System::Int8 PD_CAN_STRETCHDIB = System::Int8(0x2);
+static const System::Int8 PD_STRETCHDIB_1_1_OK = System::Int8(0x4);
+static const System::Int8 PD_STRETCHDIB_1_2_OK = System::Int8(0x8);
+static const System::Int8 PD_STRETCHDIB_1_N_OK = System::Int8(0x10);
+static const int formtypeAVI = int(0x20495641);
+static const int listtypeAVIHEADER = int(0x6c726468);
+static const int ckidAVIMAINHDR = int(0x68697661);
+static const int listtypeSTREAMHEADER = int(0x6c727473);
+static const int ckidSTREAMHEADER = int(0x68727473);
+static const int ckidSTREAMFORMAT = int(0x66727473);
+static const int ckidSTREAMHANDLERDATA = int(0x64727473);
+static const int ckidSTREAMNAME = int(0x6e727473);
+static const int listtypeAVIMOVIE = int(0x69766f6d);
+static const int listtypeAVIRECORD = int(0x20636572);
+static const int ckidAVINEWINDEX = int(0x31786469);
+static const int streamtypeVIDEO = int(0x73646976);
+static const int streamtypeAUDIO = int(0x73647561);
+static const int streamtypeMIDI = int(0x7364696d);
+static const int streamtypeTEXT = int(0x73747874);
+static const System::Word cktypeDIBbits = System::Word(0x6264);
+static const System::Word cktypeDIBcompressed = System::Word(0x6364);
+static const System::Word cktypePALchange = System::Word(0x6370);
+static const System::Word cktypeWAVEbytes = System::Word(0x6277);
+static const int ckidAVIPADDING = int(0x4b4e554a);
+static const System::Int8 AVIF_HASINDEX = System::Int8(0x10);
+static const System::Int8 AVIF_MUSTUSEINDEX = System::Int8(0x20);
+static const System::Word AVIF_ISINTERLEAVED = System::Word(0x100);
+static const System::Word AVIF_TRUSTCKTYPE = System::Word(0x800);
+static const int AVIF_WASCAPTUREFILE = int(0x10000);
+static const int AVIF_COPYRIGHTED = int(0x20000);
+static const System::Word AVI_HEADERSIZE = System::Word(0x800);
+static const System::Int8 AVISF_DISABLED = System::Int8(0x1);
+static const int AVISF_VIDEO_PALCHANGES = int(0x10000);
+static const System::Word AVIIF_NOTIME = System::Word(0x100);
+static const int AVIIF_COMPUSE = int(0xfff0000);
+static const System::Int8 AVIGETFRAMEF_BESTDISPLAYFMT = System::Int8(0x1);
+static const System::Int8 AVISTREAMINFO_DISABLED = System::Int8(0x1);
+static const int AVISTREAMINFO_FORMATCHANGES = int(0x10000);
+static const System::Int8 AVIFILEINFO_HASINDEX = System::Int8(0x10);
+static const System::Int8 AVIFILEINFO_MUSTUSEINDEX = System::Int8(0x20);
+static const System::Word AVIFILEINFO_ISINTERLEAVED = System::Word(0x100);
+static const int AVIFILEINFO_WASCAPTUREFILE = int(0x10000);
+static const int AVIFILEINFO_COPYRIGHTED = int(0x20000);
+static const System::Int8 AVIFILECAPS_CANREAD = System::Int8(0x1);
+static const System::Int8 AVIFILECAPS_CANWRITE = System::Int8(0x2);
+static const System::Int8 AVIFILECAPS_ALLKEYFRAMES = System::Int8(0x10);
+static const System::Int8 AVIFILECAPS_NOCOMPRESSION = System::Int8(0x20);
+static const System::Int8 AVICOMPRESSF_INTERLEAVE = System::Int8(0x1);
+static const System::Int8 AVICOMPRESSF_DATARATE = System::Int8(0x2);
+static const System::Int8 AVICOMPRESSF_KEYFRAMES = System::Int8(0x4);
+static const System::Int8 AVICOMPRESSF_VALID = System::Int8(0x8);
+extern DELPHI_PACKAGE GUID IID_IAVIFile;
+extern DELPHI_PACKAGE GUID IID_IAVIStream;
+extern DELPHI_PACKAGE GUID IID_IAVIStreaming;
+extern DELPHI_PACKAGE GUID IID_IGetFrame;
+extern DELPHI_PACKAGE GUID IID_IAVIEditStream;
+extern DELPHI_PACKAGE GUID CLSID_AVISimpleUnMarshal;
+extern DELPHI_PACKAGE GUID CLSID_AVIFile;
+static const System::Int8 AVIFILEHANDLER_CANREAD = System::Int8(0x1);
+static const System::Int8 AVIFILEHANDLER_CANWRITE = System::Int8(0x2);
+static const System::Int8 AVIFILEHANDLER_CANACCEPTNONRGB = System::Int8(0x4);
+static const System::Int8 AVISTREAMREAD_CONVENIENT = System::Int8(-1);
+static const System::Int8 FIND_DIR = System::Int8(0xf);
+static const System::Int8 FIND_NEXT = System::Int8(0x1);
+static const System::Int8 FIND_PREV = System::Int8(0x4);
+static const System::Int8 FIND_FROM_START = System::Int8(0x8);
+static const System::Byte FIND_TYPE = System::Byte(0xf0);
+static const System::Int8 FIND_KEY = System::Int8(0x10);
+static const System::Int8 FIND_ANY = System::Int8(0x20);
+static const System::Int8 FIND_FORMAT = System::Int8(0x40);
+static const System::Word FIND_RET = System::Word(0xf000);
+static const System::Int8 FIND_POS = System::Int8(0x0);
+static const System::Word FIND_LENGTH = System::Word(0x1000);
+static const System::Word FIND_OFFSET = System::Word(0x2000);
+static const System::Word FIND_SIZE = System::Word(0x3000);
+static const System::Word FIND_INDEX = System::Word(0x4000);
+static const System::Int8 SEARCH_NEAREST = System::Int8(0x4);
+static const System::Int8 SEARCH_BACKWARD = System::Int8(0x4);
+static const System::Int8 SEARCH_FORWARD = System::Int8(0x1);
+static const System::Int8 SEARCH_KEY = System::Int8(0x10);
+static const System::Int8 SEARCH_ANY = System::Int8(0x20);
+static const int comptypeDIB = int(0x20424944);
+static const System::Int8 AVIERR_OK = System::Int8(0x0);
+static const unsigned AVIERR_UNSUPPORTED = unsigned(0x80044065);
+static const unsigned AVIERR_BADFORMAT = unsigned(0x80044066);
+static const unsigned AVIERR_MEMORY = unsigned(0x80044067);
+static const unsigned AVIERR_INTERNAL = unsigned(0x80044068);
+static const unsigned AVIERR_BADFLAGS = unsigned(0x80044069);
+static const unsigned AVIERR_BADPARAM = unsigned(0x8004406a);
+static const unsigned AVIERR_BADSIZE = unsigned(0x8004406b);
+static const unsigned AVIERR_BADHANDLE = unsigned(0x8004406c);
+static const unsigned AVIERR_FILEREAD = unsigned(0x8004406d);
+static const unsigned AVIERR_FILEWRITE = unsigned(0x8004406e);
+static const unsigned AVIERR_FILEOPEN = unsigned(0x8004406f);
+static const unsigned AVIERR_COMPRESSOR = unsigned(0x80044070);
+static const unsigned AVIERR_NOCOMPRESSOR = unsigned(0x80044071);
+static const unsigned AVIERR_READONLY = unsigned(0x80044072);
+static const unsigned AVIERR_NODATA = unsigned(0x80044073);
+static const unsigned AVIERR_BUFFERTOOSMALL = unsigned(0x80044074);
+static const unsigned AVIERR_CANTCOMPRESS = unsigned(0x80044075);
+static const unsigned AVIERR_USERABORT = unsigned(0x800440c6);
+static const unsigned AVIERR_ERROR = unsigned(0x800440c7);
+#define MCIWND_WINDOW_CLASS L"MCIWndClass"
+static const System::Int8 MCIWNDOPENF_NEW = System::Int8(0x1);
+static const System::Int8 MCIWNDF_NOAUTOSIZEWINDOW = System::Int8(0x1);
+static const System::Int8 MCIWNDF_NOPLAYBAR = System::Int8(0x2);
+static const System::Int8 MCIWNDF_NOAUTOSIZEMOVIE = System::Int8(0x4);
+static const System::Int8 MCIWNDF_NOMENU = System::Int8(0x8);
+static const System::Int8 MCIWNDF_SHOWNAME = System::Int8(0x10);
+static const System::Int8 MCIWNDF_SHOWPOS = System::Int8(0x20);
+static const System::Int8 MCIWNDF_SHOWMODE = System::Int8(0x40);
+static const System::Int8 MCIWNDF_SHOWALL = System::Int8(0x70);
+static const System::Word MCIWNDF_NOTIFYMODE = System::Word(0x100);
+static const System::Word MCIWNDF_NOTIFYPOS = System::Word(0x200);
+static const System::Word MCIWNDF_NOTIFYSIZE = System::Word(0x400);
+static const System::Word MCIWNDF_NOTIFYERROR = System::Word(0x1000);
+static const System::Word MCIWNDF_NOTIFYALL = System::Word(0x1f00);
+static const System::Byte MCIWNDF_NOTIFYANSI = System::Byte(0x80);
+static const System::Word MCIWNDF_NOTIFYMEDIAA = System::Word(0x880);
+static const System::Word MCIWNDF_NOTIFYMEDIAW = System::Word(0x800);
+static const System::Word MCIWNDF_NOTIFYMEDIA = System::Word(0x880);
+static const System::Word MCIWNDF_RECORD = System::Word(0x2000);
+static const System::Word MCIWNDF_NOERRORDLG = System::Word(0x4000);
+static const System::Word MCIWNDF_NOOPEN = System::Word(0x8000);
+static const System::Word MCIWNDM_GETDEVICEID = System::Word(0x464);
+static const System::Word MCIWNDM_GETSTART = System::Word(0x467);
+static const System::Word MCIWNDM_GETLENGTH = System::Word(0x468);
+static const System::Word MCIWNDM_GETEND = System::Word(0x469);
+static const System::Word MCIWNDM_EJECT = System::Word(0x46b);
+static const System::Word MCIWNDM_SETZOOM = System::Word(0x46c);
+static const System::Word MCIWNDM_GETZOOM = System::Word(0x46d);
+static const System::Word MCIWNDM_SETVOLUME = System::Word(0x46e);
+static const System::Word MCIWNDM_GETVOLUME = System::Word(0x46f);
+static const System::Word MCIWNDM_SETSPEED = System::Word(0x470);
+static const System::Word MCIWNDM_GETSPEED = System::Word(0x471);
+static const System::Word MCIWNDM_SETREPEAT = System::Word(0x472);
+static const System::Word MCIWNDM_GETREPEAT = System::Word(0x473);
+static const System::Word MCIWNDM_REALIZE = System::Word(0x476);
+static const System::Word MCIWNDM_VALIDATEMEDIA = System::Word(0x479);
+static const System::Word MCIWNDM_PLAYFROM = System::Word(0x47a);
+static const System::Word MCIWNDM_PLAYTO = System::Word(0x47b);
+static const System::Word MCIWNDM_GETPALETTE = System::Word(0x47e);
+static const System::Word MCIWNDM_SETPALETTE = System::Word(0x47f);
+static const System::Word MCIWNDM_SETTIMERS = System::Word(0x481);
+static const System::Word MCIWNDM_SETACTIVETIMER = System::Word(0x482);
+static const System::Word MCIWNDM_SETINACTIVETIMER = System::Word(0x483);
+static const System::Word MCIWNDM_GETACTIVETIMER = System::Word(0x484);
+static const System::Word MCIWNDM_GETINACTIVETIMER = System::Word(0x485);
+static const System::Word MCIWNDM_CHANGESTYLES = System::Word(0x487);
+static const System::Word MCIWNDM_GETSTYLES = System::Word(0x488);
+static const System::Word MCIWNDM_GETALIAS = System::Word(0x489);
+static const System::Word MCIWNDM_PLAYREVERSE = System::Word(0x48b);
+static const System::Word MCIWNDM_GET_SOURCE = System::Word(0x48c);
+static const System::Word MCIWNDM_PUT_SOURCE = System::Word(0x48d);
+static const System::Word MCIWNDM_GET_DEST = System::Word(0x48e);
+static const System::Word MCIWNDM_PUT_DEST = System::Word(0x48f);
+static const System::Word MCIWNDM_CAN_PLAY = System::Word(0x490);
+static const System::Word MCIWNDM_CAN_WINDOW = System::Word(0x491);
+static const System::Word MCIWNDM_CAN_RECORD = System::Word(0x492);
+static const System::Word MCIWNDM_CAN_SAVE = System::Word(0x493);
+static const System::Word MCIWNDM_CAN_EJECT = System::Word(0x494);
+static const System::Word MCIWNDM_CAN_CONFIG = System::Word(0x495);
+static const System::Word MCIWNDM_PALETTEKICK = System::Word(0x496);
+static const System::Word MCIWNDM_OPENINTERFACE = System::Word(0x497);
+static const System::Word MCIWNDM_SETOWNER = System::Word(0x498);
+static const System::Word MCIWNDM_SENDSTRINGA = System::Word(0x465);
+static const System::Word MCIWNDM_GETPOSITIONA = System::Word(0x466);
+static const System::Word MCIWNDM_GETMODEA = System::Word(0x46a);
+static const System::Word MCIWNDM_SETTIMEFORMATA = System::Word(0x477);
+static const System::Word MCIWNDM_GETTIMEFORMATA = System::Word(0x478);
+static const System::Word MCIWNDM_GETFILENAMEA = System::Word(0x47c);
+static const System::Word MCIWNDM_GETDEVICEA = System::Word(0x47d);
+static const System::Word MCIWNDM_GETERRORA = System::Word(0x480);
+static const System::Word MCIWNDM_NEWA = System::Word(0x486);
+static const System::Word MCIWNDM_RETURNSTRINGA = System::Word(0x48a);
+static const System::Word MCIWNDM_OPENA = System::Word(0x499);
+static const System::Word MCIWNDM_SENDSTRINGW = System::Word(0x4c9);
+static const System::Word MCIWNDM_GETPOSITIONW = System::Word(0x4ca);
+static const System::Word MCIWNDM_GETMODEW = System::Word(0x4ce);
+static const System::Word MCIWNDM_SETTIMEFORMATW = System::Word(0x4db);
+static const System::Word MCIWNDM_GETTIMEFORMATW = System::Word(0x4dc);
+static const System::Word MCIWNDM_GETFILENAMEW = System::Word(0x4e0);
+static const System::Word MCIWNDM_GETDEVICEW = System::Word(0x4e1);
+static const System::Word MCIWNDM_GETERRORW = System::Word(0x4e4);
+static const System::Word MCIWNDM_NEWW = System::Word(0x4ea);
+static const System::Word MCIWNDM_RETURNSTRINGW = System::Word(0x4ee);
+static const System::Word MCIWNDM_OPENW = System::Word(0x4fc);
+static const System::Word MCIWNDM_SENDSTRING = System::Word(0x465);
+static const System::Word MCIWNDM_GETPOSITION = System::Word(0x466);
+static const System::Word MCIWNDM_GETMODE = System::Word(0x46a);
+static const System::Word MCIWNDM_SETTIMEFORMAT = System::Word(0x477);
+static const System::Word MCIWNDM_GETTIMEFORMAT = System::Word(0x478);
+static const System::Word MCIWNDM_GETFILENAME = System::Word(0x47c);
+static const System::Word MCIWNDM_GETDEVICE = System::Word(0x47d);
+static const System::Word MCIWNDM_GETERROR = System::Word(0x480);
+static const System::Word MCIWNDM_NEW = System::Word(0x486);
+static const System::Word MCIWNDM_RETURNSTRING = System::Word(0x48a);
+static const System::Word MCIWNDM_OPEN = System::Word(0x499);
+static const System::Word MCIWNDM_NOTIFYMODE = System::Word(0x4c8);
+static const System::Word MCIWNDM_NOTIFYPOS = System::Word(0x4c9);
+static const System::Word MCIWNDM_NOTIFYSIZE = System::Word(0x4ca);
+static const System::Word MCIWNDM_NOTIFYMEDIA = System::Word(0x4cb);
+static const System::Word MCIWNDM_NOTIFYERROR = System::Word(0x4cd);
+static const unsigned MCIWND_START = unsigned(0xffffffff);
+static const unsigned MCIWND_END = unsigned(0xfffffffe);
+static const System::Int8 DV_ERR_OK = System::Int8(0x0);
+static const System::Int8 DV_ERR_BASE = System::Int8(0x1);
+static const System::Int8 DV_ERR_NONSPECIFIC = System::Int8(0x1);
+static const System::Int8 DV_ERR_BADFORMAT = System::Int8(0x2);
+static const System::Int8 DV_ERR_STILLPLAYING = System::Int8(0x3);
+static const System::Int8 DV_ERR_UNPREPARED = System::Int8(0x4);
+static const System::Int8 DV_ERR_SYNC = System::Int8(0x5);
+static const System::Int8 DV_ERR_TOOMANYCHANNELS = System::Int8(0x6);
+static const System::Int8 DV_ERR_NOTDETECTED = System::Int8(0x7);
+static const System::Int8 DV_ERR_BADINSTALL = System::Int8(0x8);
+static const System::Int8 DV_ERR_CREATEPALETTE = System::Int8(0x9);
+static const System::Int8 DV_ERR_SIZEFIELD = System::Int8(0xa);
+static const System::Int8 DV_ERR_PARAM1 = System::Int8(0xb);
+static const System::Int8 DV_ERR_PARAM2 = System::Int8(0xc);
+static const System::Int8 DV_ERR_CONFIG1 = System::Int8(0xd);
+static const System::Int8 DV_ERR_CONFIG2 = System::Int8(0xe);
+static const System::Int8 DV_ERR_FLAGS = System::Int8(0xf);
+static const System::Int8 DV_ERR_13 = System::Int8(0x10);
+static const System::Int8 DV_ERR_NOTSUPPORTED = System::Int8(0x11);
+static const System::Int8 DV_ERR_NOMEM = System::Int8(0x12);
+static const System::Int8 DV_ERR_ALLOCATED = System::Int8(0x13);
+static const System::Int8 DV_ERR_BADDEVICEID = System::Int8(0x14);
+static const System::Int8 DV_ERR_INVALHANDLE = System::Int8(0x15);
+static const System::Int8 DV_ERR_BADERRNUM = System::Int8(0x16);
+static const System::Int8 DV_ERR_NO_BUFFERS = System::Int8(0x17);
+static const System::Int8 DV_ERR_MEM_CONFLICT = System::Int8(0x18);
+static const System::Int8 DV_ERR_IO_CONFLICT = System::Int8(0x19);
+static const System::Int8 DV_ERR_DMA_CONFLICT = System::Int8(0x1a);
+static const System::Int8 DV_ERR_INT_CONFLICT = System::Int8(0x1b);
+static const System::Int8 DV_ERR_PROTECT_ONLY = System::Int8(0x1c);
+static const System::Int8 DV_ERR_LASTERROR = System::Int8(0x1c);
+static const System::Word DV_ERR_USER_MSG = System::Word(0x3e9);
+static const System::Word DV_VM_OPEN = System::Word(0x3d0);
+static const System::Word DV_VM_CLOSE = System::Word(0x3d1);
+static const System::Word DV_VM_DATA = System::Word(0x3d2);
+static const System::Word DV_VM_ERROR = System::Word(0x3d3);
+static const System::Int8 VHDR_DONE = System::Int8(0x1);
+static const System::Int8 VHDR_PREPARED = System::Int8(0x2);
+static const System::Int8 VHDR_INQUEUE = System::Int8(0x4);
+static const System::Int8 VHDR_KEYFRAME = System::Int8(0x8);
+static const System::Int8 VCAPS_OVERLAY = System::Int8(0x1);
+static const System::Int8 VCAPS_SRC_CAN_CLIP = System::Int8(0x2);
+static const System::Int8 VCAPS_DST_CAN_CLIP = System::Int8(0x4);
+static const System::Int8 VCAPS_CAN_SCALE = System::Int8(0x8);
+static const System::Int8 VIDEO_EXTERNALIN = System::Int8(0x1);
+static const System::Int8 VIDEO_EXTERNALOUT = System::Int8(0x2);
+static const System::Int8 VIDEO_IN = System::Int8(0x4);
+static const System::Int8 VIDEO_OUT = System::Int8(0x8);
+static const System::Int8 VIDEO_DLG_QUERY = System::Int8(0x10);
+static const System::Word VIDEO_CONFIGURE_QUERY = System::Word(0x8000);
+static const System::Word VIDEO_CONFIGURE_SET = System::Word(0x1000);
+static const System::Word VIDEO_CONFIGURE_GET = System::Word(0x2000);
+static const System::Int8 VIDEO_CONFIGURE_QUERYSIZE = System::Int8(0x1);
+static const System::Int8 VIDEO_CONFIGURE_CURRENT = System::Int8(0x10);
+static const System::Int8 VIDEO_CONFIGURE_NOMINAL = System::Int8(0x20);
+static const System::Int8 VIDEO_CONFIGURE_MIN = System::Int8(0x40);
+static const System::Byte VIDEO_CONFIGURE_MAX = System::Byte(0x80);
+static const System::Word DVM_USER = System::Word(0x4000);
+static const System::Word DVM_CONFIGURE_START = System::Word(0x1000);
+static const System::Word DVM_CONFIGURE_END = System::Word(0x1fff);
+static const System::Word DVM_PALETTE = System::Word(0x1001);
+static const System::Word DVM_FORMAT = System::Word(0x1002);
+static const System::Word DVM_PALETTERGB555 = System::Word(0x1003);
+static const System::Word DVM_SRC_RECT = System::Word(0x1004);
+static const System::Word DVM_DST_RECT = System::Word(0x1005);
+static const System::Word WM_CAP_START = System::Word(0x400);
+static const System::Word WM_CAP_UNICODE_START = System::Word(0x464);
+static const System::Word WM_CAP_GET_CAPSTREAMPTR = System::Word(0x401);
+static const System::Word WM_CAP_SET_CALLBACK_ERRORW = System::Word(0x466);
+static const System::Word WM_CAP_SET_CALLBACK_STATUSW = System::Word(0x467);
+static const System::Word WM_CAP_SET_CALLBACK_ERRORA = System::Word(0x402);
+static const System::Word WM_CAP_SET_CALLBACK_STATUSA = System::Word(0x403);
+static const System::Word WM_CAP_SET_CALLBACK_ERROR = System::Word(0x402);
+static const System::Word WM_CAP_SET_CALLBACK_STATUS = System::Word(0x403);
+static const System::Word WM_CAP_SET_CALLBACK_YIELD = System::Word(0x404);
+static const System::Word WM_CAP_SET_CALLBACK_FRAME = System::Word(0x405);
+static const System::Word WM_CAP_SET_CALLBACK_VIDEOSTREAM = System::Word(0x406);
+static const System::Word WM_CAP_SET_CALLBACK_WAVESTREAM = System::Word(0x407);
+static const System::Word WM_CAP_GET_USER_DATA = System::Word(0x408);
+static const System::Word WM_CAP_SET_USER_DATA = System::Word(0x409);
+static const System::Word WM_CAP_DRIVER_CONNECT = System::Word(0x40a);
+static const System::Word WM_CAP_DRIVER_DISCONNECT = System::Word(0x40b);
+static const System::Word WM_CAP_DRIVER_GET_NAMEA = System::Word(0x40c);
+static const System::Word WM_CAP_DRIVER_GET_VERSIONA = System::Word(0x40d);
+static const System::Word WM_CAP_DRIVER_GET_NAMEW = System::Word(0x470);
+static const System::Word WM_CAP_DRIVER_GET_VERSIONW = System::Word(0x471);
+static const System::Word WM_CAP_DRIVER_GET_NAME = System::Word(0x40c);
+static const System::Word WM_CAP_DRIVER_GET_VERSION = System::Word(0x40d);
+static const System::Word WM_CAP_DRIVER_GET_CAPS = System::Word(0x40e);
+static const System::Word WM_CAP_FILE_SET_CAPTURE_FILEA = System::Word(0x414);
+static const System::Word WM_CAP_FILE_GET_CAPTURE_FILEA = System::Word(0x415);
+static const System::Word WM_CAP_FILE_SAVEASA = System::Word(0x417);
+static const System::Word WM_CAP_FILE_SAVEDIBA = System::Word(0x419);
+static const System::Word WM_CAP_FILE_SET_CAPTURE_FILEW = System::Word(0x478);
+static const System::Word WM_CAP_FILE_GET_CAPTURE_FILEW = System::Word(0x479);
+static const System::Word WM_CAP_FILE_SAVEASW = System::Word(0x47b);
+static const System::Word WM_CAP_FILE_SAVEDIBW = System::Word(0x47d);
+static const System::Word WM_CAP_FILE_SET_CAPTURE_FILE = System::Word(0x414);
+static const System::Word WM_CAP_FILE_GET_CAPTURE_FILE = System::Word(0x415);
+static const System::Word WM_CAP_FILE_SAVEAS = System::Word(0x417);
+static const System::Word WM_CAP_FILE_SAVEDIB = System::Word(0x419);
+static const System::Word WM_CAP_FILE_ALLOCATE = System::Word(0x416);
+static const System::Word WM_CAP_FILE_SET_INFOCHUNK = System::Word(0x418);
+static const System::Word WM_CAP_EDIT_COPY = System::Word(0x41e);
+static const System::Word WM_CAP_SET_AUDIOFORMAT = System::Word(0x423);
+static const System::Word WM_CAP_GET_AUDIOFORMAT = System::Word(0x424);
+static const System::Word WM_CAP_DLG_VIDEOFORMAT = System::Word(0x429);
+static const System::Word WM_CAP_DLG_VIDEOSOURCE = System::Word(0x42a);
+static const System::Word WM_CAP_DLG_VIDEODISPLAY = System::Word(0x42b);
+static const System::Word WM_CAP_GET_VIDEOFORMAT = System::Word(0x42c);
+static const System::Word WM_CAP_SET_VIDEOFORMAT = System::Word(0x42d);
+static const System::Word WM_CAP_DLG_VIDEOCOMPRESSION = System::Word(0x42e);
+static const System::Word WM_CAP_SET_PREVIEW = System::Word(0x432);
+static const System::Word WM_CAP_SET_OVERLAY = System::Word(0x433);
+static const System::Word WM_CAP_SET_PREVIEWRATE = System::Word(0x434);
+static const System::Word WM_CAP_SET_SCALE = System::Word(0x435);
+static const System::Word WM_CAP_GET_STATUS = System::Word(0x436);
+static const System::Word WM_CAP_SET_SCROLL = System::Word(0x437);
+static const System::Word WM_CAP_GRAB_FRAME = System::Word(0x43c);
+static const System::Word WM_CAP_GRAB_FRAME_NOSTOP = System::Word(0x43d);
+static const System::Word WM_CAP_SEQUENCE = System::Word(0x43e);
+static const System::Word WM_CAP_SEQUENCE_NOFILE = System::Word(0x43f);
+static const System::Word WM_CAP_SET_SEQUENCE_SETUP = System::Word(0x440);
+static const System::Word WM_CAP_GET_SEQUENCE_SETUP = System::Word(0x441);
+static const System::Word WM_CAP_SET_MCI_DEVICEA = System::Word(0x442);
+static const System::Word WM_CAP_GET_MCI_DEVICEA = System::Word(0x443);
+static const System::Word WM_CAP_SET_MCI_DEVICEW = System::Word(0x4a6);
+static const System::Word WM_CAP_GET_MCI_DEVICEW = System::Word(0x4a7);
+static const System::Word WM_CAP_SET_MCI_DEVICE = System::Word(0x442);
+static const System::Word WM_CAP_GET_MCI_DEVICE = System::Word(0x443);
+static const System::Word WM_CAP_STOP = System::Word(0x444);
+static const System::Word WM_CAP_ABORT = System::Word(0x445);
+static const System::Word WM_CAP_SINGLE_FRAME_OPEN = System::Word(0x446);
+static const System::Word WM_CAP_SINGLE_FRAME_CLOSE = System::Word(0x447);
+static const System::Word WM_CAP_SINGLE_FRAME = System::Word(0x448);
+static const System::Word WM_CAP_PAL_OPENA = System::Word(0x450);
+static const System::Word WM_CAP_PAL_SAVEA = System::Word(0x451);
+static const System::Word WM_CAP_PAL_OPENW = System::Word(0x4b4);
+static const System::Word WM_CAP_PAL_SAVEW = System::Word(0x4b5);
+static const System::Word WM_CAP_PAL_OPEN = System::Word(0x450);
+static const System::Word WM_CAP_PAL_SAVE = System::Word(0x451);
+static const System::Word WM_CAP_PAL_PASTE = System::Word(0x452);
+static const System::Word WM_CAP_PAL_AUTOCREATE = System::Word(0x453);
+static const System::Word WM_CAP_PAL_MANUALCREATE = System::Word(0x454);
+static const System::Word WM_CAP_SET_CALLBACK_CAPCONTROL = System::Word(0x455);
+static const System::Word WM_CAP_UNICODE_END = System::Word(0x4b5);
+static const System::Word WM_CAP_END = System::Word(0x4b5);
+static const System::Int8 AVSTREAMMASTER_AUDIO = System::Int8(0x0);
+static const System::Int8 AVSTREAMMASTER_NONE = System::Int8(0x1);
+static const System::Int8 CONTROLCALLBACK_PREROLL = System::Int8(0x1);
+static const System::Int8 CONTROLCALLBACK_CAPTURING = System::Int8(0x2);
+static const int infotypeDIGITIZATION_TIME = int(0x54494449);
+static const int infotypeSMPTE_TIME = int(0x504d5349);
+static const System::Word IDS_CAP_BEGIN = System::Word(0x12c);
+static const System::Word IDS_CAP_END = System::Word(0x12d);
+static const System::Word IDS_CAP_INFO = System::Word(0x191);
+static const System::Word IDS_CAP_OUTOFMEM = System::Word(0x192);
+static const System::Word IDS_CAP_FILEEXISTS = System::Word(0x193);
+static const System::Word IDS_CAP_ERRORPALOPEN = System::Word(0x194);
+static const System::Word IDS_CAP_ERRORPALSAVE = System::Word(0x195);
+static const System::Word IDS_CAP_ERRORDIBSAVE = System::Word(0x196);
+static const System::Word IDS_CAP_DEFAVIEXT = System::Word(0x197);
+static const System::Word IDS_CAP_DEFPALEXT = System::Word(0x198);
+static const System::Word IDS_CAP_CANTOPEN = System::Word(0x199);
+static const System::Word IDS_CAP_SEQ_MSGSTART = System::Word(0x19a);
+static const System::Word IDS_CAP_SEQ_MSGSTOP = System::Word(0x19b);
+static const System::Word IDS_CAP_VIDEDITERR = System::Word(0x19c);
+static const System::Word IDS_CAP_READONLYFILE = System::Word(0x19d);
+static const System::Word IDS_CAP_WRITEERROR = System::Word(0x19e);
+static const System::Word IDS_CAP_NODISKSPACE = System::Word(0x19f);
+static const System::Word IDS_CAP_SETFILESIZE = System::Word(0x1a0);
+static const System::Word IDS_CAP_SAVEASPERCENT = System::Word(0x1a1);
+static const System::Word IDS_CAP_DRIVER_ERROR = System::Word(0x1a2);
+static const System::Word IDS_CAP_WAVE_OPEN_ERROR = System::Word(0x1a3);
+static const System::Word IDS_CAP_WAVE_ALLOC_ERROR = System::Word(0x1a4);
+static const System::Word IDS_CAP_WAVE_PREPARE_ERROR = System::Word(0x1a5);
+static const System::Word IDS_CAP_WAVE_ADD_ERROR = System::Word(0x1a6);
+static const System::Word IDS_CAP_WAVE_SIZE_ERROR = System::Word(0x1a7);
+static const System::Word IDS_CAP_VIDEO_OPEN_ERROR = System::Word(0x1a8);
+static const System::Word IDS_CAP_VIDEO_ALLOC_ERROR = System::Word(0x1a9);
+static const System::Word IDS_CAP_VIDEO_PREPARE_ERROR = System::Word(0x1aa);
+static const System::Word IDS_CAP_VIDEO_ADD_ERROR = System::Word(0x1ab);
+static const System::Word IDS_CAP_VIDEO_SIZE_ERROR = System::Word(0x1ac);
+static const System::Word IDS_CAP_FILE_OPEN_ERROR = System::Word(0x1ad);
+static const System::Word IDS_CAP_FILE_WRITE_ERROR = System::Word(0x1ae);
+static const System::Word IDS_CAP_RECORDING_ERROR = System::Word(0x1af);
+static const System::Word IDS_CAP_RECORDING_ERROR2 = System::Word(0x1b0);
+static const System::Word IDS_CAP_AVI_INIT_ERROR = System::Word(0x1b1);
+static const System::Word IDS_CAP_NO_FRAME_CAP_ERROR = System::Word(0x1b2);
+static const System::Word IDS_CAP_NO_PALETTE_WARN = System::Word(0x1b3);
+static const System::Word IDS_CAP_MCI_CONTROL_ERROR = System::Word(0x1b4);
+static const System::Word IDS_CAP_MCI_CANT_STEP_ERROR = System::Word(0x1b5);
+static const System::Word IDS_CAP_NO_AUDIO_CAP_ERROR = System::Word(0x1b6);
+static const System::Word IDS_CAP_AVI_DRAWDIB_ERROR = System::Word(0x1b7);
+static const System::Word IDS_CAP_COMPRESSOR_ERROR = System::Word(0x1b8);
+static const System::Word IDS_CAP_AUDIO_DROP_ERROR = System::Word(0x1b9);
+static const System::Word IDS_CAP_STAT_LIVE_MODE = System::Word(0x1f4);
+static const System::Word IDS_CAP_STAT_OVERLAY_MODE = System::Word(0x1f5);
+static const System::Word IDS_CAP_STAT_CAP_INIT = System::Word(0x1f6);
+static const System::Word IDS_CAP_STAT_CAP_FINI = System::Word(0x1f7);
+static const System::Word IDS_CAP_STAT_PALETTE_BUILD = System::Word(0x1f8);
+static const System::Word IDS_CAP_STAT_OPTPAL_BUILD = System::Word(0x1f9);
+static const System::Word IDS_CAP_STAT_I_FRAMES = System::Word(0x1fa);
+static const System::Word IDS_CAP_STAT_L_FRAMES = System::Word(0x1fb);
+static const System::Word IDS_CAP_STAT_CAP_L_FRAMES = System::Word(0x1fc);
+static const System::Word IDS_CAP_STAT_CAP_AUDIO = System::Word(0x1fd);
+static const System::Word IDS_CAP_STAT_VIDEOCURRENT = System::Word(0x1fe);
+static const System::Word IDS_CAP_STAT_VIDEOAUDIO = System::Word(0x1ff);
+static const System::Word IDS_CAP_STAT_VIDEOONLY = System::Word(0x200);
+static const System::Word IDS_CAP_STAT_FRAMESDROPPED = System::Word(0x201);
+extern DELPHI_PACKAGE unsigned __fastcall MKFOURCC(char ch0, char ch1, char ch2, char ch3);
+extern DELPHI_PACKAGE unsigned __fastcall mmioFOURCC(char ch0, char ch1, char ch2, char ch3);
+extern DELPHI_PACKAGE System::Word __fastcall aviTWOCC(char ch0, char ch1);
+extern DELPHI_PACKAGE System::LongBool __fastcall ICQueryAbout(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICAbout(NativeUInt hic, HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall ICQueryConfigure(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICConfigure(NativeUInt hic, HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall ICGetState(NativeUInt hic, void * pv, unsigned cb);
+extern DELPHI_PACKAGE unsigned __fastcall ICSetState(NativeUInt hic, void * pv, unsigned cb);
+extern DELPHI_PACKAGE unsigned __fastcall ICGetStateSize(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICGetDefaultQuality(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICGetDefaultKeyFrameRate(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawWindow(NativeUInt hic, System::Types::PRect prc);
+extern DELPHI_PACKAGE unsigned __fastcall ICCompressBegin(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiInput, Winapi::Windows::PBitmapInfoHeader lpbiOutput);
+extern DELPHI_PACKAGE unsigned __fastcall ICCompressQuery(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiInput, Winapi::Windows::PBitmapInfoHeader lpbiOutput);
+extern DELPHI_PACKAGE unsigned __fastcall ICCompressGetFormat(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiInput, Winapi::Windows::PBitmapInfoHeader lpbiOutput);
+extern DELPHI_PACKAGE unsigned __fastcall ICCompressGetFormatSize(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbi);
+extern DELPHI_PACKAGE unsigned __fastcall ICCompressGetSize(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiInput, Winapi::Windows::PBitmapInfoHeader lpbiOutput);
+extern DELPHI_PACKAGE unsigned __fastcall ICCompressEnd(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICDecompressBegin(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiInput, Winapi::Windows::PBitmapInfoHeader lpbiOutput);
+extern DELPHI_PACKAGE unsigned __fastcall ICDecompressQuery(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiInput, Winapi::Windows::PBitmapInfoHeader lpbiOutput);
+extern DELPHI_PACKAGE unsigned __fastcall ICDecompressGetFormat(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiInput, Winapi::Windows::PBitmapInfoHeader lpbiOutput);
+extern DELPHI_PACKAGE unsigned __fastcall ICDecompressGetFormatSize(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbi);
+extern DELPHI_PACKAGE unsigned __fastcall ICDecompressGetPalette(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiInput, Winapi::Windows::PBitmapInfoHeader lpbiOutput);
+extern DELPHI_PACKAGE unsigned __fastcall ICDecompressSetPalette(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiPalette);
+extern DELPHI_PACKAGE unsigned __fastcall ICDecompressEnd(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __stdcall ICDecompressEx(NativeUInt hic, unsigned dwFlags, Winapi::Windows::PBitmapInfoHeader lpbiSrc, void * lpSrc, int xSrc, int ySrc, int dxSrc, int dySrc, Winapi::Windows::PBitmapInfoHeader lpbiDst, void * lpDst, int xDst, int yDst, int dxDst, int dyDst);
+extern DELPHI_PACKAGE unsigned __stdcall ICDecompressExBegin(NativeUInt hic, unsigned dwFlags, Winapi::Windows::PBitmapInfoHeader lpbiSrc, void * lpSrc, int xSrc, int ySrc, int dxSrc, int dySrc, Winapi::Windows::PBitmapInfoHeader lpbiDst, void * lpDst, int xDst, int yDst, int dxDst, int dyDst);
+extern DELPHI_PACKAGE unsigned __stdcall ICDecompressExQuery(NativeUInt hic, unsigned dwFlags, Winapi::Windows::PBitmapInfoHeader lpbiSrc, void * lpSrc, int xSrc, int ySrc, int dxSrc, int dySrc, Winapi::Windows::PBitmapInfoHeader lpbiDst, void * lpDst, int xDst, int yDst, int dxDst, int dyDst);
+extern DELPHI_PACKAGE unsigned __fastcall ICDecompressExEnd(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __stdcall ICDrawSuggestFormat(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiIn, Winapi::Windows::PBitmapInfoHeader lpbiOut, int dxSrc, int dySrc, int dxDst, int dyDst, NativeUInt hicDecomp);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawQuery(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiInput);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawChangePalette(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiInput);
+extern DELPHI_PACKAGE unsigned __fastcall ICGetBuffersWanted(NativeUInt hic, unsigned* lpdwBuffers);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawEnd(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawStart(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawStartPlay(NativeUInt hic, unsigned lFrom, unsigned lTo);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawStop(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawStopPlay(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawGetTime(NativeUInt hic, unsigned* lplTime);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawSetTime(NativeUInt hic, unsigned lTime);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawRealize(NativeUInt hic, HDC hdc, System::LongBool fBackground);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawFlush(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __fastcall ICDrawRenderBuffer(NativeUInt hic);
+extern DELPHI_PACKAGE unsigned __stdcall ICSetStatusProc(NativeUInt hic, unsigned dwFlags, unsigned lParam, TICStatusProc fpfnStatus);
+extern DELPHI_PACKAGE NativeUInt __fastcall ICDecompressOpen(unsigned fccType, unsigned fccHandler, Winapi::Windows::PBitmapInfoHeader lpbiIn, Winapi::Windows::PBitmapInfoHeader lpbiOut);
+extern DELPHI_PACKAGE NativeUInt __fastcall ICDrawOpen(unsigned fccType, unsigned fccHandler, Winapi::Windows::PBitmapInfoHeader lpbiIn);
+extern DELPHI_PACKAGE System::LongBool __fastcall DrawDibUpdate(NativeUInt hdd, HDC hdc, int x, int y);
+extern DELPHI_PACKAGE System::Byte __fastcall FromHex(System::Byte n);
+extern DELPHI_PACKAGE System::Byte __fastcall StreamFromFOURCC(unsigned fcc);
+extern DELPHI_PACKAGE System::Word __fastcall TWOCCFromFOURCC(unsigned fcc);
+extern DELPHI_PACKAGE System::Byte __fastcall ToHex(System::Byte n);
+extern DELPHI_PACKAGE unsigned __fastcall MAKEAVICKID(System::Word tcc, System::Byte stream);
+extern DELPHI_PACKAGE int __fastcall AVIStreamSampleToSample(_di_IAVIStream pavi1, _di_IAVIStream pavi2, int l);
+extern DELPHI_PACKAGE int __fastcall AVIStreamNextSample(_di_IAVIStream pavi, int l);
+extern DELPHI_PACKAGE int __fastcall AVIStreamPrevSample(_di_IAVIStream pavi, int l);
+extern DELPHI_PACKAGE int __fastcall AVIStreamNearestSample(_di_IAVIStream pavi, int l);
+extern DELPHI_PACKAGE int __fastcall AVIStreamNextKeyFrame(_di_IAVIStream pavi, int l);
+extern DELPHI_PACKAGE int __fastcall AVIStreamPrevKeyFrame(_di_IAVIStream pavi, int l);
+extern DELPHI_PACKAGE int __fastcall AVIStreamNearestKeyFrame(_di_IAVIStream pavi, int l);
+extern DELPHI_PACKAGE System::LongBool __fastcall AVIStreamIsKeyFrame(_di_IAVIStream pavi, int l);
+extern DELPHI_PACKAGE int __fastcall AVIStreamPrevSampleTime(_di_IAVIStream pavi, int t);
+extern DELPHI_PACKAGE int __fastcall AVIStreamNextSampleTime(_di_IAVIStream pavi, int t);
+extern DELPHI_PACKAGE int __fastcall AVIStreamNearestSampleTime(_di_IAVIStream pavi, int t);
+extern DELPHI_PACKAGE int __fastcall AVIStreamNextKeyFrameTime(_di_IAVIStream pavi, int t);
+extern DELPHI_PACKAGE int __fastcall AVIStreamPrevKeyFrameTime(_di_IAVIStream pavi, int t);
+extern DELPHI_PACKAGE int __fastcall AVIStreamNearestKeyFrameTime(_di_IAVIStream pavi, int t);
+extern DELPHI_PACKAGE int __fastcall AVIStreamStartTime(_di_IAVIStream pavi);
+extern DELPHI_PACKAGE int __fastcall AVIStreamLengthTime(_di_IAVIStream pavi);
+extern DELPHI_PACKAGE int __fastcall AVIStreamEnd(_di_IAVIStream pavi);
+extern DELPHI_PACKAGE int __fastcall AVIStreamEndTime(_di_IAVIStream pavi);
+extern DELPHI_PACKAGE int __fastcall AVIStreamSampleSize(_di_IAVIStream pavi, int lPos, PLONG plSize);
+extern DELPHI_PACKAGE HRESULT __fastcall AVIStreamFormatSize(_di_IAVIStream pavi, int lPos, PLONG plSize);
+extern DELPHI_PACKAGE HRESULT __fastcall AVIStreamDataSize(_di_IAVIStream pavi, unsigned fcc, PLONG plSize);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndSM(HWND hWnd, unsigned Msg, NativeUInt wParam, NativeInt lParam);
+extern DELPHI_PACKAGE System::LongBool __fastcall MCIWndCanPlay(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall MCIWndCanRecord(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall MCIWndCanSave(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall MCIWndCanWindow(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall MCIWndCanEject(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall MCIWndCanConfig(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall MCIWndPaletteKick(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndSave(HWND hwnd, char * szFile);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndSaveDialog(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndNew(HWND hwnd, void * lp);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndRecord(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndOpen(HWND hwnd, char * sz, System::LongBool f);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndOpenDialog(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndClose(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndPlay(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndStop(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndPause(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndResume(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndSeek(HWND hwnd, unsigned lPos);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndEject(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndHome(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndEnd(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetSource(HWND hwnd, System::Types::PRect prc);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndPutSource(HWND hwnd, System::Types::PRect prc);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetDest(HWND hwnd, System::Types::PRect prc);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndPutDest(HWND hwnd, System::Types::PRect prc);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndPlayReverse(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndPlayFrom(HWND hwnd, unsigned lPos);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndPlayTo(HWND hwnd, unsigned lPos);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndPlayFromTo(HWND hwnd, unsigned lStart, unsigned lEnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetDeviceID(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetAlias(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetMode(HWND hwnd, char * lp, unsigned len);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetPosition(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetPositionString(HWND hwnd, char * lp, unsigned len);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetStart(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetLength(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetEnd(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndStep(HWND hwnd, unsigned n);
+extern DELPHI_PACKAGE void __fastcall MCIWndDestroy(HWND hwnd);
+extern DELPHI_PACKAGE void __fastcall MCIWndSetZoom(HWND hwnd, unsigned iZoom);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetZoom(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndSetVolume(HWND hwnd, unsigned iVol);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetVolume(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndSetSpeed(HWND hwnd, unsigned iSpeed);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetSpeed(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndSetTimeFormat(HWND hwnd, char * lp);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetTimeFormat(HWND hwnd, char * lp, unsigned len);
+extern DELPHI_PACKAGE void __fastcall MCIWndValidateMedia(HWND hwnd);
+extern DELPHI_PACKAGE void __fastcall MCIWndSetRepeat(HWND hwnd, System::LongBool f);
+extern DELPHI_PACKAGE System::LongBool __fastcall MCIWndGetRepeat(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndUseFrames(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndUseTime(HWND hwnd);
+extern DELPHI_PACKAGE void __fastcall MCIWndSetActiveTimer(HWND hwnd, unsigned active);
+extern DELPHI_PACKAGE void __fastcall MCIWndSetInactiveTimer(HWND hwnd, unsigned inactive);
+extern DELPHI_PACKAGE void __fastcall MCIWndSetTimers(HWND hwnd, unsigned active, unsigned inactive);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetActiveTimer(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetInactiveTimer(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndRealize(HWND hwnd, System::LongBool fBkgnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndSendString(HWND hwnd, char * sz);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndReturnString(HWND hwnd, char * lp, unsigned len);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetError(HWND hwnd, char * lp, unsigned len);
+extern DELPHI_PACKAGE HPALETTE __fastcall MCIWndGetPalette(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndSetPalette(HWND hwnd, HPALETTE hpal);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetFileName(HWND hwnd, char * lp, unsigned len);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetDevice(HWND hwnd, char * lp, unsigned len);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndGetStyles(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndChangeStyles(HWND hwnd, unsigned mask, unsigned value);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndOpenInterface(HWND hwnd, PUnknown pUnk);
+extern DELPHI_PACKAGE unsigned __fastcall MCIWndSetOwner(HWND hwnd, HWND hwndP);
+extern DELPHI_PACKAGE unsigned __fastcall AVICapSM(HWND hwnd, unsigned m, NativeUInt w, NativeInt l);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetCallbackOnError(HWND hwnd, TCAPERRORCALLBACKA fpProc);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetCallbackOnStatus(HWND hwnd, TCAPSTATUSCALLBACKA fpProc);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetCallbackOnYield(HWND hwnd, TCAPYIELDCALLBACK fpProc);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetCallbackOnFrame(HWND hwnd, TCAPVIDEOCALLBACK fpProc);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetCallbackOnVideoStream(HWND hwnd, TCAPVIDEOCALLBACK fpProc);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetCallbackOnWaveStream(HWND hwnd, TCAPWAVECALLBACK fpProc);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetCallbackOnCapControl(HWND hwnd, TCAPCONTROLCALLBACK fpProc);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetUserData(HWND hwnd, unsigned lUser);
+extern DELPHI_PACKAGE unsigned __fastcall capGetUserData(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capDriverConnect(HWND hwnd, int i);
+extern DELPHI_PACKAGE System::LongBool __fastcall capDriverDisconnect(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capDriverGetName(HWND hwnd, char * szName, System::Word wSize);
+extern DELPHI_PACKAGE System::LongBool __fastcall capDriverGetVersion(HWND hwnd, char * szVer, System::Word wSize);
+extern DELPHI_PACKAGE System::LongBool __fastcall capDriverGetCaps(HWND hwnd, PCAPDRIVERCAPS s, System::Word wSize);
+extern DELPHI_PACKAGE System::LongBool __fastcall capFileSetCaptureFile(HWND hwnd, char * szName);
+extern DELPHI_PACKAGE System::LongBool __fastcall capFileGetCaptureFile(HWND hwnd, char * szName, System::Word wSize);
+extern DELPHI_PACKAGE System::LongBool __fastcall capFileAlloc(HWND hwnd, unsigned dwSize);
+extern DELPHI_PACKAGE System::LongBool __fastcall capFileSaveAs(HWND hwnd, char * szName);
+extern DELPHI_PACKAGE System::LongBool __fastcall capFileSetInfoChunk(HWND hwnd, PCAPINFOCHUNK lpInfoChunk);
+extern DELPHI_PACKAGE System::LongBool __fastcall capFileSaveDIB(HWND hwnd, char * szName);
+extern DELPHI_PACKAGE System::LongBool __fastcall capEditCopy(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetAudioFormat(HWND hwnd, Winapi::Mmsystem::PWaveFormatEx s, System::Word wSize);
+extern DELPHI_PACKAGE unsigned __fastcall capGetAudioFormat(HWND hwnd, Winapi::Mmsystem::PWaveFormatEx s, System::Word wSize);
+extern DELPHI_PACKAGE unsigned __fastcall capGetAudioFormatSize(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capDlgVideoFormat(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capDlgVideoSource(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capDlgVideoDisplay(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capDlgVideoCompression(HWND hwnd);
+extern DELPHI_PACKAGE unsigned __fastcall capGetVideoFormat(HWND hwnd, void * s, System::Word wSize);
+extern DELPHI_PACKAGE unsigned __fastcall capGetVideoFormatSize(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetVideoFormat(HWND hwnd, void * s, System::Word wSize);
+extern DELPHI_PACKAGE System::LongBool __fastcall capPreview(HWND hwnd, System::LongBool f);
+extern DELPHI_PACKAGE System::LongBool __fastcall capPreviewRate(HWND hwnd, System::Word wMS);
+extern DELPHI_PACKAGE System::LongBool __fastcall capOverlay(HWND hwnd, System::LongBool f);
+extern DELPHI_PACKAGE System::LongBool __fastcall capPreviewScale(HWND hwnd, System::LongBool f);
+extern DELPHI_PACKAGE System::LongBool __fastcall capGetStatus(HWND hwnd, PCAPSTATUS s, System::Word wSize);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetScrollPos(HWND hwnd, System::Types::PPoint lpP);
+extern DELPHI_PACKAGE System::LongBool __fastcall capGrabFrame(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capGrabFrameNoStop(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capCaptureSequence(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capCaptureSequenceNoFile(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capCaptureStop(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capCaptureAbort(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capCaptureSingleFrameOpen(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capCaptureSingleFrameClose(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capCaptureSingleFrame(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capCaptureGetSetup(HWND hwnd, PCAPTUREPARMS s, System::Word wSize);
+extern DELPHI_PACKAGE System::LongBool __fastcall capCaptureSetSetup(HWND hwnd, PCAPTUREPARMS s, System::Word wSize);
+extern DELPHI_PACKAGE System::LongBool __fastcall capSetMCIDeviceName(HWND hwnd, char * szName);
+extern DELPHI_PACKAGE System::LongBool __fastcall capGetMCIDeviceName(HWND hwnd, char * szName, System::Word wSize);
+extern DELPHI_PACKAGE System::LongBool __fastcall capPaletteOpen(HWND hwnd, char * szName);
+extern DELPHI_PACKAGE System::LongBool __fastcall capPaletteSave(HWND hwnd, char * szName);
+extern DELPHI_PACKAGE System::LongBool __fastcall capPalettePaste(HWND hwnd);
+extern DELPHI_PACKAGE System::LongBool __fastcall capPaletteAuto(HWND hwnd, int iFrames, int iColors);
+extern DELPHI_PACKAGE System::LongBool __fastcall capPaletteManual(HWND hwnd, System::LongBool fGrab, int iColors);
+extern "C" unsigned __pascal VideoForWindowsVersion(void);
+extern "C" System::LongBool __stdcall ICInfo(unsigned fccType, unsigned fccHandler, PICINFO lpicinfo);
+extern "C" System::LongBool __stdcall ICInstall(unsigned fccType, unsigned fccHandler, NativeInt lParam, char * szDesc, unsigned wFlags);
+extern "C" System::LongBool __stdcall ICRemove(unsigned fccType, unsigned fccHandler, unsigned wFlags);
+extern "C" unsigned __stdcall ICGetInfo(NativeUInt hic, PICINFO picinfo, unsigned cb);
+extern "C" NativeUInt __stdcall ICOpen(unsigned fccType, unsigned fccHandler, unsigned wMode);
+extern "C" NativeUInt __stdcall ICOpenFunction(unsigned fccType, unsigned fccHandler, unsigned wMode, void * lpfnHandler);
+extern "C" unsigned __stdcall ICClose(NativeUInt hic);
+extern "C" unsigned __stdcall ICSendMessage(NativeUInt hic, unsigned msg, unsigned dw1, unsigned dw2);
+extern "C" unsigned __cdecl ICCompress(NativeUInt hic, unsigned dwFlags, Winapi::Windows::PBitmapInfoHeader lpbiOutput, void * lpData, Winapi::Windows::PBitmapInfoHeader lpbiInput, void * lpBits, unsigned* lpckid, unsigned* lpdwFlags, unsigned lFrameNum, unsigned dwFrameSize, unsigned dwQuality, Winapi::Windows::PBitmapInfoHeader lpbiPrev, void * lpPrev);
+extern "C" unsigned __cdecl ICDecompress(NativeUInt hic, unsigned dwFlags, Winapi::Windows::PBitmapInfoHeader lpbiFormat, void * lpData, Winapi::Windows::PBitmapInfoHeader lpbi, void * lpBits);
+extern "C" unsigned __cdecl ICDrawBegin(NativeUInt hic, unsigned dwFlags, HPALETTE hpal, HWND hwnd, HDC hdc, int xDst, int yDst, int dxDst, int dyDst, Winapi::Windows::PBitmapInfoHeader lpbi, int xSrc, int ySrc, int dxSrc, int dySrc, unsigned dwRate, unsigned dwScale);
+extern "C" unsigned __cdecl ICDraw(NativeUInt hic, unsigned dwFlags, void * lpFormat, void * lpData, unsigned cbData, unsigned lTime);
+extern "C" NativeUInt __stdcall ICLocate(unsigned fccType, unsigned fccHandler, Winapi::Windows::PBitmapInfoHeader lpbiIn, Winapi::Windows::PBitmapInfoHeader lpbiOut, System::Word wFlags);
+extern "C" NativeUInt __stdcall ICGetDisplayFormat(NativeUInt hic, Winapi::Windows::PBitmapInfoHeader lpbiIn, Winapi::Windows::PBitmapInfoHeader lpbiOut, int BitDepth, int dx, int dy);
+extern "C" NativeUInt __stdcall ICImageCompress(NativeUInt hic, unsigned uiFlags, Winapi::Windows::PBitmapInfo lpbiIn, void * lpBits, Winapi::Windows::PBitmapInfo lpbiOut, int lQuality, unsigned* plSize);
+extern "C" NativeUInt __stdcall ICImageDecompress(NativeUInt hic, unsigned uiFlags, Winapi::Windows::PBitmapInfo lpbiIn, void * lpBits, Winapi::Windows::PBitmapInfo lpbiOut);
+extern "C" System::LongBool __stdcall ICCompressorChoose(HWND hwnd, unsigned uiFlags, void * pvIn, void * lpData, PCOMPVARS pc, char * lpszTitle);
+extern "C" System::LongBool __stdcall ICSeqCompressFrameStart(PCOMPVARS pc, Winapi::Windows::PBitmapInfo lpbiIn);
+extern "C" void __stdcall ICSeqCompressFrameEnd(PCOMPVARS pc);
+extern "C" void * __stdcall ICSeqCompressFrame(PCOMPVARS pc, unsigned uiFlags, void * lpBits, PBOOL pfKey, unsigned* plSize);
+extern "C" void __stdcall ICCompressorFree(PCOMPVARS pc);
+extern "C" NativeUInt __stdcall DrawDibOpen(void);
+extern "C" System::LongBool __stdcall DrawDibClose(NativeUInt hdd);
+extern "C" void * __stdcall DrawDibGetBuffer(NativeUInt hdd, Winapi::Windows::PBitmapInfoHeader lpbi, unsigned dwSize, unsigned dwFlags);
+extern "C" HPALETTE __stdcall DrawDibGetPalette(NativeUInt hdd);
+extern "C" System::LongBool __stdcall DrawDibSetPalette(NativeUInt hdd, HPALETTE hpal);
+extern "C" System::LongBool __stdcall DrawDibChangePalette(NativeUInt hdd, int iStart, int iLen, Winapi::Windows::PPaletteEntry lppe);
+extern "C" unsigned __stdcall DrawDibRealize(NativeUInt hdd, HDC hdc, System::LongBool fBackground);
+extern "C" System::LongBool __stdcall DrawDibStart(NativeUInt hdd, unsigned rate);
+extern "C" System::LongBool __stdcall DrawDibStop(NativeUInt hdd);
+extern "C" System::LongBool __stdcall DrawDibBegin(NativeUInt hdd, HDC hdc, int dxDst, int dyDst, Winapi::Windows::PBitmapInfoHeader lpbi, int dxSrc, int dySrc, unsigned wFlags);
+extern "C" System::LongBool __stdcall DrawDibDraw(NativeUInt hdd, HDC hdc, int xDst, int yDst, int dxDst, int dyDst, Winapi::Windows::PBitmapInfoHeader lpbi, void * lpBits, int xSrc, int ySrc, int dxSrc, int dySrc, unsigned wFlags);
+extern "C" System::LongBool __stdcall DrawDibEnd(NativeUInt hdd);
+extern "C" System::LongBool __stdcall DrawDibTime(NativeUInt hdd, PDRAWDIBTIME lpddtime);
+extern "C" unsigned __stdcall DrawDibProfileDisplay(Winapi::Windows::PBitmapInfoHeader lpbi);
+extern "C" void __stdcall AVIFileInit(void);
+extern "C" void __stdcall AVIFileExit(void);
+extern "C" unsigned __stdcall AVIFileAddRef(_di_IAVIFile pfile);
+extern "C" unsigned __stdcall AVIFileRelease(_di_IAVIFile pfile);
+extern "C" HRESULT __stdcall AVIFileOpenA(_di_IAVIFile &ppfile, char * szFile, unsigned uMode, System::PGUID lpHandler);
+extern "C" HRESULT __stdcall AVIFileOpenW(_di_IAVIFile &ppfile, System::WideChar * szFile, unsigned uMode, System::PGUID lpHandler);
+extern "C" HRESULT __stdcall AVIFileOpen(_di_IAVIFile &ppfile, System::WideChar * szFile, unsigned uMode, System::PGUID lpHandler);
+extern "C" HRESULT __stdcall AVIFileInfoW(_di_IAVIFile pfile, TAVIFileInfoW &pfi, int lSize);
+extern "C" HRESULT __stdcall AVIFileInfoA(_di_IAVIFile pfile, TAVIFileInfoA &pfi, int lSize);
+extern "C" HRESULT __stdcall AVIFileInfo(_di_IAVIFile pfile, TAVIFileInfoW &pfi, int lSize);
+extern "C" HRESULT __stdcall AVIFileGetStream(_di_IAVIFile pfile, _di_IAVIStream &ppavi, unsigned fccType, int lParam);
+extern "C" HRESULT __stdcall AVIFileCreateStreamW(_di_IAVIFile pfile, _di_IAVIStream &ppavi, TAVIStreamInfoW &psi);
+extern "C" HRESULT __stdcall AVIFileCreateStreamA(_di_IAVIFile pfile, _di_IAVIStream &ppavi, TAVIStreamInfoA &psi);
+extern "C" HRESULT __stdcall AVIFileCreateStream(_di_IAVIFile pfile, _di_IAVIStream &ppavi, TAVIStreamInfoW &psi);
+extern "C" HRESULT __stdcall AVIFileWriteData(_di_IAVIFile pfile, unsigned ckid, void * lpData, int cbData);
+extern "C" HRESULT __stdcall AVIFileReadData(_di_IAVIFile pfile, unsigned ckid, void * lpData, int &lpcbData);
+extern "C" HRESULT __stdcall AVIFileEndRecord(_di_IAVIFile pfile);
+extern "C" unsigned __stdcall AVIStreamAddRef(_di_IAVIStream pavi);
+extern "C" unsigned __stdcall AVIStreamRelease(_di_IAVIStream pavi);
+extern "C" HRESULT __stdcall AVIStreamInfoW(_di_IAVIStream pavi, TAVIStreamInfoW &psi, int lSize);
+extern "C" HRESULT __stdcall AVIStreamInfoA(_di_IAVIStream pavi, TAVIStreamInfoA &psi, int lSize);
+extern "C" HRESULT __stdcall AVIStreamInfo(_di_IAVIStream pavi, TAVIStreamInfoW &psi, int lSize);
+extern "C" int __stdcall AVIStreamFindSample(_di_IAVIStream pavi, int lPos, int lFlags);
+extern "C" HRESULT __stdcall AVIStreamReadFormat(_di_IAVIStream pavi, int lPos, void * lpFormat, PLONG lpcbFormat);
+extern "C" HRESULT __stdcall AVIStreamSetFormat(_di_IAVIStream pavi, int lPos, void * lpFormat, int cbFormat);
+extern "C" HRESULT __stdcall AVIStreamReadData(_di_IAVIStream pavi, unsigned fcc, void * lp, PLONG lpcb);
+extern "C" HRESULT __stdcall AVIStreamWriteData(_di_IAVIStream pavi, unsigned fcc, void * lp, int cb);
+extern "C" HRESULT __stdcall AVIStreamRead(_di_IAVIStream pavi, int lStart, int lSamples, void * lpBuffer, int cbBuffer, PLONG plBytes, PLONG plSamples);
+extern "C" HRESULT __stdcall AVIStreamWrite(_di_IAVIStream pavi, int lStart, int lSamples, void * lpBuffer, int cbBuffer, unsigned dwFlags, PLONG plSampWritten, PLONG plBytesWritten);
+extern "C" int __stdcall AVIStreamStart(_di_IAVIStream pavi);
+extern "C" int __stdcall AVIStreamLength(_di_IAVIStream pavi);
+extern "C" int __stdcall AVIStreamTimeToSample(_di_IAVIStream pavi, int lTime);
+extern "C" int __stdcall AVIStreamSampleToTime(_di_IAVIStream pavi, int lSample);
+extern "C" HRESULT __stdcall AVIStreamBeginStreaming(_di_IAVIStream pavi, int lStart, int lEnd, int lRate);
+extern "C" HRESULT __stdcall AVIStreamEndStreaming(_di_IAVIStream pavi);
+extern "C" Winapi::Windows::PBitmapInfoHeader __stdcall AVIStreamGetFrame(_di_IGetFrame pg, int lPos);
+extern "C" HRESULT __stdcall AVIStreamGetFrameClose(_di_IGetFrame pg);
+extern DELPHI_PACKAGE _di_IGetFrame __stdcall AVIStreamGetFrameOpen(_di_IAVIStream pavi, Winapi::Windows::PBitmapInfoHeader lpbiWanted);
+extern "C" HRESULT __stdcall AVIStreamOpenFromFileA(_di_IAVIStream &ppavi, char * szFile, unsigned fccType, int lParam, unsigned mode, System::PGUID pclsidHandler);
+extern "C" HRESULT __stdcall AVIStreamOpenFromFileW(_di_IAVIStream &ppavi, System::WideChar * szFile, unsigned fccType, int lParam, unsigned mode, System::PGUID pclsidHandler);
+extern "C" HRESULT __stdcall AVIStreamOpenFromFile(_di_IAVIStream &ppavi, System::WideChar * szFile, unsigned fccType, int lParam, unsigned mode, System::PGUID pclsidHandler);
+extern "C" HRESULT __stdcall AVIStreamCreate(_di_IAVIStream &ppavi, int lParam1, int lParam2, System::PGUID pclsidHandler);
+extern "C" unsigned __stdcall AVIStreamFindKeyFrame(_di_IAVIStream &pavi, int lPos, int lFlags);
+extern "C" unsigned __stdcall AVIStreamClose(_di_IAVIStream pavi);
+extern "C" unsigned __stdcall AVIFileClose(_di_IAVIFile pfile);
+extern "C" void __stdcall AVIStreamInit(void);
+extern "C" void __stdcall AVIStreamExit(void);
+extern "C" HRESULT __stdcall AVIMakeCompressedStream(_di_IAVIStream &ppsCompressed, _di_IAVIStream ppsSource, PAVICOMPRESSOPTIONS lpOptions, System::PGUID pclsidHandler);
+extern "C" HRESULT __stdcall AVISaveVA(char * szFile, System::PGUID pclsidHandler, TAVISAVECALLBACK lpfnCallback, int nStreams, _di_IAVIStream &ppavi, PAVICOMPRESSOPTIONS &plpOptions);
+extern "C" HRESULT __stdcall AVISaveVW(System::WideChar * szFile, System::PGUID pclsidHandler, TAVISAVECALLBACK lpfnCallback, int nStreams, _di_IAVIStream &ppavi, PAVICOMPRESSOPTIONS &plpOptions);
+extern "C" HRESULT __stdcall AVISaveV(char * szFile, System::PGUID pclsidHandler, TAVISAVECALLBACK lpfnCallback, int nStreams, _di_IAVIStream &ppavi, PAVICOMPRESSOPTIONS &plpOptions);
+extern "C" System::LongBool __stdcall AVISaveOptions(HWND hwnd, unsigned uiFlags, int nStreams, _di_IAVIStream &ppavi, PAVICOMPRESSOPTIONS &plpOptions);
+extern "C" HRESULT __stdcall AVISaveOptionsFree(int nStreams, PAVICOMPRESSOPTIONS &plpOptions);
+extern "C" HRESULT __stdcall AVIBuildFilterW(System::WideChar * lpszFilter, int cbFilter, System::LongBool fSaving);
+extern "C" HRESULT __stdcall AVIBuildFilterA(char * lpszFilter, int cbFilter, System::LongBool fSaving);
+extern "C" HRESULT __stdcall AVIBuildFilter(char * lpszFilter, int cbFilter, System::LongBool fSaving);
+extern "C" HRESULT __stdcall AVIMakeFileFromStreams(_di_IAVIFile &ppfile, int nStreams, _di_IAVIStream &papStreams);
+extern "C" HRESULT __stdcall AVIMakeStreamFromClipboard(unsigned cfFormat, NativeUInt hGlobal, _di_IAVIStream &ppstream);
+extern "C" HRESULT __stdcall AVIPutFileOnClipboard(_di_IAVIFile pf);
+extern "C" HRESULT __stdcall AVIGetFromClipboard(_di_IAVIFile &lppf);
+extern "C" HRESULT __stdcall AVIClearClipboard(void);
+extern "C" HRESULT __stdcall CreateEditableStream(_di_IAVIStream &ppsEditable, _di_IAVIStream psSource);
+extern "C" HRESULT __stdcall EditStreamCut(_di_IAVIStream pavi, int &plStart, int &plLength, _di_IAVIStream &ppResult);
+extern "C" HRESULT __stdcall EditStreamCopy(_di_IAVIStream pavi, int &plStart, int &plLength, _di_IAVIStream &ppResult);
+extern "C" HRESULT __stdcall EditStreamPaste(_di_IAVIStream pavi, int &plPos, int &plLength, _di_IAVIStream pstream, int lStart, int lEnd);
+extern "C" HRESULT __stdcall EditStreamClone(_di_IAVIStream pavi, _di_IAVIStream &ppResult);
+extern "C" HRESULT __stdcall EditStreamSetNameA(_di_IAVIStream pavi, char * lpszName);
+extern "C" HRESULT __stdcall EditStreamSetNameW(_di_IAVIStream pavi, System::WideChar * lpszName);
+extern "C" HRESULT __stdcall EditStreamSetInfoW(_di_IAVIStream pavi, PAVIStreamInfoW lpInfo, int cbInfo);
+extern "C" HRESULT __stdcall EditStreamSetInfoA(_di_IAVIStream pavi, PAVIStreamInfoA lpInfo, int cbInfo);
+extern "C" HRESULT __stdcall EditStreamSetInfo(_di_IAVIStream pavi, PAVIStreamInfoA lpInfo, int cbInfo);
+extern "C" HRESULT __stdcall EditStreamSetName(_di_IAVIStream pavi, char * lpszName);
+extern "C" HWND __cdecl MCIWndCreateA(HWND hwndParent, NativeUInt hInstance, unsigned dwStyle, char * szFile);
+extern "C" HWND __cdecl MCIWndCreateW(HWND hwndParent, NativeUInt hInstance, unsigned dwStyle, System::WideChar * szFile);
+extern "C" HWND __cdecl MCIWndCreate(HWND hwndParent, NativeUInt hInstance, unsigned dwStyle, char * szFile);
+extern "C" System::LongBool __cdecl MCIWndRegisterClass(void);
+extern "C" HWND __stdcall capCreateCaptureWindowA(char * lpszWindowName, unsigned dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, int nID);
+extern "C" System::LongBool __stdcall capGetDriverDescriptionA(unsigned wDriverIndex, char * lpszName, int cbName, char * lpszVer, int cbVer);
+extern "C" HWND __stdcall capCreateCaptureWindowW(System::WideChar * lpszWindowName, unsigned dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, int nID);
+extern "C" System::LongBool __stdcall capGetDriverDescriptionW(unsigned wDriverIndex, System::WideChar * lpszName, int cbName, System::WideChar * lpszVer, int cbVer);
+extern "C" HWND __stdcall capCreateCaptureWindow(char * lpszWindowName, unsigned dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, int nID);
+extern "C" System::LongBool __stdcall capGetDriverDescription(unsigned wDriverIndex, char * lpszName, int cbName, char * lpszVer, int cbVer);
+extern "C" System::LongBool __stdcall GetOpenFileNamePreviewA(Winapi::Commdlg::POpenFilenameA lpofn);
+extern "C" System::LongBool __stdcall GetSaveFileNamePreviewA(Winapi::Commdlg::POpenFilenameA lpofn);
+extern "C" System::LongBool __stdcall GetOpenFileNamePreviewW(Winapi::Commdlg::POpenFilenameW lpofn);
+extern "C" System::LongBool __stdcall GetSaveFileNamePreviewW(Winapi::Commdlg::POpenFilenameW lpofn);
+extern "C" System::LongBool __stdcall GetOpenFileNamePreview(Winapi::Commdlg::POpenFilenameA lpofn);
+extern "C" System::LongBool __stdcall GetSaveFileNamePreview(Winapi::Commdlg::POpenFilenameA lpofn);
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIFileOpen(_di_IAVIFile &ppfile, System::WideChar * szFile, unsigned uMode, System::PGUID lpHandler)
+{
+	return AVIFileOpenW(ppfile, szFile, uMode, lpHandler);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIFileOpen(_di_IAVIFile &ppfile, System::WideChar * szFile, unsigned uMode, System::PGUID lpHandler)
+{
+	return AVIFileOpenA(ppfile, szFile, uMode, lpHandler);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIFileInfo(_di_IAVIFile pfile, TAVIFileInfoW &pfi, int lSize)
+{
+	return AVIFileInfoW(pfile, pfi, lSize);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIFileInfo(_di_IAVIFile pfile, TAVIFileInfoW &pfi, int lSize)
+{
+	return AVIFileInfoA(pfile, pfi, lSize);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIFileCreateStream(_di_IAVIFile pfile, _di_IAVIStream &ppavi, TAVIStreamInfoW &psi)
+{
+	return AVIFileCreateStreamW(pfile, ppavi, psi);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIFileCreateStream(_di_IAVIFile pfile, _di_IAVIStream &ppavi, TAVIStreamInfoW &psi)
+{
+	return AVIFileCreateStreamA(pfile, ppavi, psi);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIStreamInfo(_di_IAVIStream pavi, TAVIStreamInfoW &psi, int lSize)
+{
+	return AVIStreamInfoW(pavi, psi, lSize);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIStreamInfo(_di_IAVIStream pavi, TAVIStreamInfoW &psi, int lSize)
+{
+	return AVIStreamInfoA(pavi, psi, lSize);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIStreamOpenFromFile(_di_IAVIStream &ppavi, System::WideChar * szFile, unsigned fccType, int lParam, unsigned mode, System::PGUID pclsidHandler)
+{
+	return AVIStreamOpenFromFileW(ppavi, szFile, fccType, lParam, mode, pclsidHandler);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIStreamOpenFromFile(_di_IAVIStream &ppavi, System::WideChar * szFile, unsigned fccType, int lParam, unsigned mode, System::PGUID pclsidHandler)
+{
+	return AVIStreamOpenFromFileA(ppavi, szFile, fccType, lParam, mode, pclsidHandler);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HRESULT __stdcall AVISaveV(char * szFile, System::PGUID pclsidHandler, TAVISAVECALLBACK lpfnCallback, int nStreams, _di_IAVIStream &ppavi, PAVICOMPRESSOPTIONS &plpOptions)
+{
+	return AVISaveVW(szFile, pclsidHandler, lpfnCallback, nStreams, ppavi, plpOptions);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HRESULT __stdcall AVISaveV(char * szFile, System::PGUID pclsidHandler, TAVISAVECALLBACK lpfnCallback, int nStreams, _di_IAVIStream &ppavi, PAVICOMPRESSOPTIONS &plpOptions)
+{
+	return AVISaveVA(szFile, pclsidHandler, lpfnCallback, nStreams, ppavi, plpOptions);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIBuildFilter(char * lpszFilter, int cbFilter, System::LongBool fSaving)
+{
+	return AVIBuildFilterW(lpszFilter, cbFilter, fSaving);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HRESULT __stdcall AVIBuildFilter(char * lpszFilter, int cbFilter, System::LongBool fSaving)
+{
+	return AVIBuildFilterA(lpszFilter, cbFilter, fSaving);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HRESULT __stdcall EditStreamSetInfo(_di_IAVIStream pavi, PAVIStreamInfoA lpInfo, int cbInfo)
+{
+	return EditStreamSetInfoW(pavi, lpInfo, cbInfo);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HRESULT __stdcall EditStreamSetInfo(_di_IAVIStream pavi, PAVIStreamInfoA lpInfo, int cbInfo)
+{
+	return EditStreamSetInfoA(pavi, lpInfo, cbInfo);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HRESULT __stdcall EditStreamSetName(_di_IAVIStream pavi, char * lpszName)
+{
+	return EditStreamSetNameW(pavi, lpszName);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HRESULT __stdcall EditStreamSetName(_di_IAVIStream pavi, char * lpszName)
+{
+	return EditStreamSetNameA(pavi, lpszName);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HWND __cdecl MCIWndCreate(HWND hwndParent, NativeUInt hInstance, unsigned dwStyle, char * szFile)
+{
+	return MCIWndCreateW(hwndParent, hInstance, dwStyle, szFile);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HWND __cdecl MCIWndCreate(HWND hwndParent, NativeUInt hInstance, unsigned dwStyle, char * szFile)
+{
+	return MCIWndCreateA(hwndParent, hInstance, dwStyle, szFile);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline HWND __stdcall capCreateCaptureWindow(char * lpszWindowName, unsigned dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, int nID)
+{
+	return capCreateCaptureWindowW(lpszWindowName, dwStyle, x, y, nWidth, nHeight, hwndParent, nID);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline HWND __stdcall capCreateCaptureWindow(char * lpszWindowName, unsigned dwStyle, int x, int y, int nWidth, int nHeight, HWND hwndParent, int nID)
+{
+	return capCreateCaptureWindowA(lpszWindowName, dwStyle, x, y, nWidth, nHeight, hwndParent, nID);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline System::LongBool __stdcall capGetDriverDescription(unsigned wDriverIndex, char * lpszName, int cbName, char * lpszVer, int cbVer)
+{
+	return capGetDriverDescriptionW(wDriverIndex, lpszName, cbName, lpszVer, cbVer);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline System::LongBool __stdcall capGetDriverDescription(unsigned wDriverIndex, char * lpszName, int cbName, char * lpszVer, int cbVer)
+{
+	return capGetDriverDescriptionA(wDriverIndex, lpszName, cbName, lpszVer, cbVer);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline System::LongBool __stdcall GetOpenFileNamePreview(Winapi::Commdlg::POpenFilenameA lpofn)
+{
+	return GetOpenFileNamePreviewW(lpofn);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline System::LongBool __stdcall GetOpenFileNamePreview(Winapi::Commdlg::POpenFilenameA lpofn)
+{
+	return GetOpenFileNamePreviewA(lpofn);
+}
+#pragma option pop
+
+#endif
+
+
+#if defined(UNICODE)
+#pragma option push -w-inl
+inline System::LongBool __stdcall GetSaveFileNamePreview(Winapi::Commdlg::POpenFilenameA lpofn)
+{
+	return GetSaveFileNamePreviewW(lpofn);
+}
+#pragma option pop
+
+#else
+#pragma option push -w-inl
+inline System::LongBool __stdcall GetSaveFileNamePreview(Winapi::Commdlg::POpenFilenameA lpofn)
+{
+	return GetSaveFileNamePreviewA(lpofn);
+}
+#pragma option pop
+
+#endif
+
+}	/* namespace Vfw */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_VFW)
+using namespace Formats::Vfw;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_VfwHPP

+ 274 - 0
include/Win32/Formats.VRML.hpp

@@ -0,0 +1,274 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.VRML.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_VrmlHPP
+#define Formats_VrmlHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Types.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.VectorLists.hpp>
+#include <GLS.Utils.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace Vrml
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TVRMLNode;
+class DELPHICLASS TVRMLSingleArray;
+class DELPHICLASS TVRMLIntegerArray;
+class DELPHICLASS TVRMLMaterial;
+class DELPHICLASS TVRMLUse;
+class DELPHICLASS TVRMLShapeHints;
+class DELPHICLASS TVRMLTransform;
+class DELPHICLASS TVRMLParser;
+//-- type declarations -------------------------------------------------------
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TVRMLNode : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+public:
+	TVRMLNode* operator[](int index) { return this->Nodes[index]; }
+	
+private:
+	System::Classes::TList* FNodes;
+	TVRMLNode* FParent;
+	System::UnicodeString FName;
+	System::UnicodeString FDefName;
+	TVRMLNode* __fastcall GetNode(int index);
+	
+public:
+	__fastcall virtual TVRMLNode();
+	__fastcall TVRMLNode(TVRMLNode* AParent);
+	__fastcall virtual ~TVRMLNode();
+	int __fastcall Count();
+	void __fastcall Clear();
+	void __fastcall Add(TVRMLNode* node);
+	void __fastcall Remove(TVRMLNode* node);
+	void __fastcall Delete(int index);
+	__property TVRMLNode* Nodes[int index] = {read=GetNode/*, default*/};
+	__property TVRMLNode* Parent = {read=FParent};
+	__property System::UnicodeString Name = {read=FName, write=FName};
+	__property System::UnicodeString DefName = {read=FDefName, write=FDefName};
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TVRMLSingleArray : public TVRMLNode
+{
+	typedef TVRMLNode inherited;
+	
+private:
+	Gls::Vectorlists::TGLSingleList* FValues;
+	
+public:
+	__fastcall virtual TVRMLSingleArray();
+	__fastcall virtual ~TVRMLSingleArray();
+	__property Gls::Vectorlists::TGLSingleList* Values = {read=FValues};
+public:
+	/* TVRMLNode.CreateOwned */ inline __fastcall TVRMLSingleArray(TVRMLNode* AParent) : TVRMLNode(AParent) { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TVRMLIntegerArray : public TVRMLNode
+{
+	typedef TVRMLNode inherited;
+	
+private:
+	Gls::Vectorlists::TGLIntegerList* FValues;
+	
+public:
+	__fastcall virtual TVRMLIntegerArray();
+	__fastcall virtual ~TVRMLIntegerArray();
+	__property Gls::Vectorlists::TGLIntegerList* Values = {read=FValues};
+public:
+	/* TVRMLNode.CreateOwned */ inline __fastcall TVRMLIntegerArray(TVRMLNode* AParent) : TVRMLNode(AParent) { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TVRMLMaterial : public TVRMLNode
+{
+	typedef TVRMLNode inherited;
+	
+private:
+	Gls::Vectortypes::TVector3f FDiffuseColor;
+	Gls::Vectortypes::TVector3f FAmbientColor;
+	Gls::Vectortypes::TVector3f FSpecularColor;
+	Gls::Vectortypes::TVector3f FEmissiveColor;
+	float FTransparency;
+	float FShininess;
+	bool FHasDiffuse;
+	bool FHasAmbient;
+	bool FHasSpecular;
+	bool FHasEmissive;
+	bool FHasTransparency;
+	bool FHasShininess;
+	
+public:
+	__fastcall virtual TVRMLMaterial();
+	__property Gls::Vectortypes::TVector3f DiffuseColor = {read=FDiffuseColor, write=FDiffuseColor};
+	__property Gls::Vectortypes::TVector3f AmbientColor = {read=FAmbientColor, write=FAmbientColor};
+	__property Gls::Vectortypes::TVector3f SpecularColor = {read=FSpecularColor, write=FSpecularColor};
+	__property Gls::Vectortypes::TVector3f EmissiveColor = {read=FEmissiveColor, write=FEmissiveColor};
+	__property float Transparency = {read=FTransparency, write=FTransparency};
+	__property float Shininess = {read=FShininess, write=FShininess};
+	__property bool HasDiffuse = {read=FHasDiffuse, write=FHasDiffuse, nodefault};
+	__property bool HasAmbient = {read=FHasAmbient, write=FHasAmbient, nodefault};
+	__property bool HasSpecular = {read=FHasSpecular, write=FHasSpecular, nodefault};
+	__property bool HasEmissive = {read=FHasEmissive, write=FHasEmissive, nodefault};
+	__property bool HasTransparency = {read=FHasTransparency, write=FHasTransparency, nodefault};
+	__property bool HasShininess = {read=FHasShininess, write=FHasShininess, nodefault};
+public:
+	/* TVRMLNode.CreateOwned */ inline __fastcall TVRMLMaterial(TVRMLNode* AParent) : TVRMLNode(AParent) { }
+	/* TVRMLNode.Destroy */ inline __fastcall virtual ~TVRMLMaterial() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TVRMLUse : public TVRMLNode
+{
+	typedef TVRMLNode inherited;
+	
+private:
+	System::UnicodeString FValue;
+	
+public:
+	__property System::UnicodeString Value = {read=FValue, write=FValue};
+public:
+	/* TVRMLNode.Create */ inline __fastcall virtual TVRMLUse() : TVRMLNode() { }
+	/* TVRMLNode.CreateOwned */ inline __fastcall TVRMLUse(TVRMLNode* AParent) : TVRMLNode(AParent) { }
+	/* TVRMLNode.Destroy */ inline __fastcall virtual ~TVRMLUse() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TVRMLShapeHints : public TVRMLNode
+{
+	typedef TVRMLNode inherited;
+	
+private:
+	float FCreaseAngle;
+	
+public:
+	__property float CreaseAngle = {read=FCreaseAngle, write=FCreaseAngle};
+public:
+	/* TVRMLNode.Create */ inline __fastcall virtual TVRMLShapeHints() : TVRMLNode() { }
+	/* TVRMLNode.CreateOwned */ inline __fastcall TVRMLShapeHints(TVRMLNode* AParent) : TVRMLNode(AParent) { }
+	/* TVRMLNode.Destroy */ inline __fastcall virtual ~TVRMLShapeHints() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TVRMLTransform : public TVRMLNode
+{
+	typedef TVRMLNode inherited;
+	
+private:
+	Gls::Vectortypes::TVector3f FCenter;
+	Gls::Vectortypes::TVector4f FRotation;
+	Gls::Vectortypes::TVector3f FScaleFactor;
+	
+public:
+	__fastcall virtual TVRMLTransform();
+	__property Gls::Vectortypes::TVector3f Center = {read=FCenter, write=FCenter};
+	__property Gls::Vectortypes::TVector4f Rotation = {read=FRotation, write=FRotation};
+	__property Gls::Vectortypes::TVector3f ScaleFactor = {read=FScaleFactor, write=FScaleFactor};
+public:
+	/* TVRMLNode.CreateOwned */ inline __fastcall TVRMLTransform(TVRMLNode* AParent) : TVRMLNode(AParent) { }
+	/* TVRMLNode.Destroy */ inline __fastcall virtual ~TVRMLTransform() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TVRMLParser : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+private:
+	int FCursor;
+	System::Classes::TStringList* FTokens;
+	TVRMLNode* FRootNode;
+	TVRMLNode* FCurrentNode;
+	bool FAllowUnknownNodes;
+	System::Classes::TList* FDefines;
+	
+protected:
+	System::UnicodeString __fastcall ReadToken();
+	float __fastcall ReadSingle();
+	Gls::Vectortypes::TVector3f __fastcall ReadVector3f();
+	Gls::Vectortypes::TVector4f __fastcall ReadVector4f();
+	void __fastcall ReadUnknownArray(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadUnknownHeirachy(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadUnknown(System::UnicodeString unknown_token, System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadPointArray(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadCoordIndexArray(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadNormalIndexArray(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadTextureCoordIndexArray(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadCoordinate3(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadNormal(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadTextureCoordinate2(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadMaterial(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadIndexedFaceSet(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadTransform(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadShapeHints(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadSeparator(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadGroup(System::UnicodeString DefName = System::UnicodeString());
+	void __fastcall ReadDef();
+	void __fastcall ReadUse();
+	
+public:
+	__fastcall TVRMLParser();
+	__fastcall virtual ~TVRMLParser();
+	void __fastcall Parse(System::UnicodeString Text);
+	__property TVRMLNode* RootNode = {read=FRootNode};
+	__property bool AllowUnknownNodes = {read=FAllowUnknownNodes, write=FAllowUnknownNodes, nodefault};
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Vrml */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_VRML)
+using namespace Formats::Vrml;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_VrmlHPP

+ 218 - 0
include/Win32/Formats.X.hpp

@@ -0,0 +1,218 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.X.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_XHPP
+#define Formats_XHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.VectorLists.hpp>
+#include <GLS.PersistentClasses.hpp>
+#include <GLS.Utils.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace X
+{
+//-- forward type declarations -----------------------------------------------
+struct TDXFileHeader;
+class DELPHICLASS TDXNode;
+class DELPHICLASS TDXMaterial;
+class DELPHICLASS TDXMaterialList;
+class DELPHICLASS TDXFrame;
+class DELPHICLASS TDXMesh;
+class DELPHICLASS TDXFile;
+//-- type declarations -------------------------------------------------------
+struct DECLSPEC_DRECORD TDXFileHeader
+{
+public:
+	System::StaticArray<char, 4> Magic;
+	System::StaticArray<char, 2> Major;
+	System::StaticArray<char, 2> Minor;
+	System::StaticArray<char, 4> FileType;
+	System::StaticArray<char, 4> FloatType;
+};
+
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TDXNode : public System::Classes::TList
+{
+	typedef System::Classes::TList inherited;
+	
+private:
+	System::UnicodeString FName;
+	System::UnicodeString FTypeName;
+	TDXNode* FOwner;
+	TDXNode* __fastcall GetItem(int index);
+	
+public:
+	__fastcall TDXNode(TDXNode* AOwner);
+	__fastcall virtual TDXNode();
+	virtual void __fastcall Clear();
+	__property System::UnicodeString Name = {read=FName, write=FName};
+	__property System::UnicodeString TypeName = {read=FTypeName, write=FTypeName};
+	__property TDXNode* Owner = {read=FOwner};
+	__property TDXNode* Items[int index] = {read=GetItem};
+public:
+	/* TList.Destroy */ inline __fastcall virtual ~TDXNode() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TDXMaterial : public Gls::Persistentclasses::TGLPersistentObject
+{
+	typedef Gls::Persistentclasses::TGLPersistentObject inherited;
+	
+private:
+	Gls::Vectortypes::TVector4f FDiffuse;
+	float FSpecPower;
+	Gls::Vectortypes::TVector3f FSpecular;
+	Gls::Vectortypes::TVector3f FEmissive;
+	System::UnicodeString FTexture;
+	
+public:
+	__fastcall TDXMaterial(TDXMaterialList* AOwner);
+	__property Gls::Vectortypes::TVector4f Diffuse = {read=FDiffuse, write=FDiffuse};
+	__property float SpecPower = {read=FSpecPower, write=FSpecPower};
+	__property Gls::Vectortypes::TVector3f Specular = {read=FSpecular, write=FSpecular};
+	__property Gls::Vectortypes::TVector3f Emissive = {read=FEmissive, write=FEmissive};
+	__property System::UnicodeString Texture = {read=FTexture, write=FTexture};
+public:
+	/* TGLPersistentObject.Create */ inline __fastcall virtual TDXMaterial() : Gls::Persistentclasses::TGLPersistentObject() { }
+	/* TGLPersistentObject.CreateFromFiler */ inline __fastcall TDXMaterial(Gls::Persistentclasses::TGLVirtualReader* reader) : Gls::Persistentclasses::TGLPersistentObject(reader) { }
+	/* TGLPersistentObject.Destroy */ inline __fastcall virtual ~TDXMaterial() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TDXMaterialList : public TDXNode
+{
+	typedef TDXNode inherited;
+	
+private:
+	TDXMaterial* __fastcall GetMaterial(int index);
+	
+public:
+	__property TDXMaterial* Items[int index] = {read=GetMaterial};
+public:
+	/* TDXNode.CreateOwned */ inline __fastcall TDXMaterialList(TDXNode* AOwner) : TDXNode(AOwner) { }
+	/* TDXNode.Create */ inline __fastcall virtual TDXMaterialList() : TDXNode() { }
+	
+public:
+	/* TList.Destroy */ inline __fastcall virtual ~TDXMaterialList() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TDXFrame : public TDXNode
+{
+	typedef TDXNode inherited;
+	
+private:
+	Gls::Vectortypes::TMatrix4f FMatrix;
+	
+public:
+	__fastcall virtual TDXFrame();
+	Gls::Vectortypes::TMatrix4f __fastcall GlobalMatrix();
+	__property Gls::Vectortypes::TMatrix4f Matrix = {read=FMatrix, write=FMatrix};
+public:
+	/* TDXNode.CreateOwned */ inline __fastcall TDXFrame(TDXNode* AOwner) : TDXNode(AOwner) { }
+	
+public:
+	/* TList.Destroy */ inline __fastcall virtual ~TDXFrame() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TDXMesh : public TDXNode
+{
+	typedef TDXNode inherited;
+	
+private:
+	Gls::Vectorlists::TGLAffineVectorList* FVertices;
+	Gls::Vectorlists::TGLAffineVectorList* FNormals;
+	Gls::Vectorlists::TGLAffineVectorList* FTexCoords;
+	Gls::Vectorlists::TGLIntegerList* FVertexIndices;
+	Gls::Vectorlists::TGLIntegerList* FNormalIndices;
+	Gls::Vectorlists::TGLIntegerList* FMaterialIndices;
+	Gls::Vectorlists::TGLIntegerList* FVertCountIndices;
+	TDXMaterialList* FMaterialList;
+	
+public:
+	__fastcall virtual TDXMesh();
+	__fastcall virtual ~TDXMesh();
+	__property Gls::Vectorlists::TGLAffineVectorList* Vertices = {read=FVertices};
+	__property Gls::Vectorlists::TGLAffineVectorList* Normals = {read=FNormals};
+	__property Gls::Vectorlists::TGLAffineVectorList* TexCoords = {read=FTexCoords};
+	__property Gls::Vectorlists::TGLIntegerList* VertexIndices = {read=FVertexIndices};
+	__property Gls::Vectorlists::TGLIntegerList* NormalIndices = {read=FNormalIndices};
+	__property Gls::Vectorlists::TGLIntegerList* MaterialIndices = {read=FMaterialIndices};
+	__property Gls::Vectorlists::TGLIntegerList* VertCountIndices = {read=FVertCountIndices};
+	__property TDXMaterialList* MaterialList = {read=FMaterialList};
+public:
+	/* TDXNode.CreateOwned */ inline __fastcall TDXMesh(TDXNode* AOwner) : TDXNode(AOwner) { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TDXFile : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+private:
+	TDXNode* FRootNode;
+	TDXFileHeader FHeader;
+	
+protected:
+	void __fastcall ParseText(System::Classes::TStream* Stream);
+	void __fastcall ParseBinary(System::Classes::TStream* Stream);
+	
+public:
+	__fastcall TDXFile();
+	__fastcall virtual ~TDXFile();
+	void __fastcall LoadFromStream(System::Classes::TStream* Stream);
+	__property TDXFileHeader Header = {read=FHeader};
+	__property TDXNode* RootNode = {read=FRootNode};
+};
+
+#pragma pack(pop)
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace X */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_X)
+using namespace Formats::X;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_XHPP

+ 254 - 0
include/Win32/Formats.m3DS.hpp

@@ -0,0 +1,254 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.m3DS.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_M3dsHPP
+#define Formats_M3dsHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <Formats.m3DSTypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace M3ds
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TMaterialList;
+class DELPHICLASS TObjectList;
+class DELPHICLASS TKeyFramer;
+class DELPHICLASS TFile3DS;
+//-- type declarations -------------------------------------------------------
+typedef void __fastcall (__closure *TLoadProgress)(int StreamPos, int StreamMax);
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TMaterialList : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+public:
+	Formats::M3dstypes::PMaterial3DS operator[](int Index) { return this->Material[Index]; }
+	
+private:
+	TFile3DS* FOwner;
+	System::Classes::TList* FLocalList;
+	int __fastcall GetCount();
+	Formats::M3dstypes::PMaterial3DS __fastcall GetMaterial(int Index);
+	Formats::M3dstypes::PMaterial3DS __fastcall GetMaterialByName(const System::UnicodeString Name);
+	
+public:
+	__fastcall virtual TMaterialList(TFile3DS* AOwner);
+	__fastcall virtual ~TMaterialList();
+	void __fastcall ClearList();
+	__property int Count = {read=GetCount, nodefault};
+	__property Formats::M3dstypes::PMaterial3DS Material[int Index] = {read=GetMaterial/*, default*/};
+	__property Formats::M3dstypes::PMaterial3DS MaterialByName[const System::UnicodeString Name] = {read=GetMaterialByName};
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TObjectList : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+private:
+	TFile3DS* FOwner;
+	System::Classes::TList* FMeshList;
+	System::Classes::TList* FOmniList;
+	System::Classes::TList* FSpotList;
+	System::Classes::TList* FCameraList;
+	Formats::M3dstypes::PCamera3DS __fastcall GetCamera(int Index);
+	int __fastcall GetCamCount();
+	int __fastcall GetMeshObjectCount();
+	Formats::M3dstypes::PMesh3DS __fastcall GetMesh(int Index);
+	int __fastcall GetOmniCount();
+	Formats::M3dstypes::PLight3DS __fastcall GetOmniLight(int Index);
+	int __fastcall GetSpotCount();
+	Formats::M3dstypes::PLight3DS __fastcall GetSpotLight(int Index);
+	
+public:
+	__fastcall virtual TObjectList(TFile3DS* AOwner);
+	__fastcall virtual ~TObjectList();
+	void __fastcall ClearLists();
+	__property int CameraCount = {read=GetCamCount, nodefault};
+	__property int MeshCount = {read=GetMeshObjectCount, nodefault};
+	__property int OmniLightCount = {read=GetOmniCount, nodefault};
+	__property int SpotLightCount = {read=GetSpotCount, nodefault};
+	__property Formats::M3dstypes::PMesh3DS Mesh[int Index] = {read=GetMesh};
+	__property Formats::M3dstypes::PCamera3DS Camera[int Index] = {read=GetCamera};
+	__property Formats::M3dstypes::PLight3DS OmniLight[int Index] = {read=GetOmniLight};
+	__property Formats::M3dstypes::PLight3DS SpotLight[int Index] = {read=GetSpotLight};
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TKeyFramer : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+public:
+	Formats::M3dstypes::PKFMesh3DS operator[](int Index) { return this->MeshMotion[Index]; }
+	
+private:
+	TFile3DS* FOwner;
+	System::Classes::TList* FMeshMotionList;
+	System::Classes::TList* FOmniMotionList;
+	System::Classes::TList* FSpotMotionList;
+	System::Classes::TList* FCameraMotionList;
+	Formats::M3dstypes::TKFAmbient3DS *FAmbientMotion;
+	Formats::M3dstypes::PKFAmbient3DS __fastcall GetAmbientMotion();
+	Formats::M3dstypes::PKFCamera3DS __fastcall GetCameraMotion(int Index);
+	int __fastcall GetCamMotionCount();
+	Formats::M3dstypes::TKFSets3DS __fastcall GetKFSets();
+	int __fastcall GetMeshMotionCount();
+	Formats::M3dstypes::PKFMesh3DS __fastcall GetMeshMotion(int Index);
+	int __fastcall GetOmniMotionCount();
+	Formats::M3dstypes::PKFOmni3DS __fastcall GetOmniLightMotion(int Index);
+	int __fastcall GetSpotMotionCount();
+	Formats::M3dstypes::PKFSpot3DS __fastcall GetSpotLightMotion(int Index);
+	
+public:
+	__fastcall virtual TKeyFramer(TFile3DS* AOwner);
+	__fastcall virtual ~TKeyFramer();
+	void __fastcall ClearLists();
+	__property Formats::M3dstypes::PKFAmbient3DS AmbientLightMotion = {read=GetAmbientMotion};
+	__property int CameraMotionCount = {read=GetCamMotionCount, nodefault};
+	__property int MeshMotionCount = {read=GetMeshMotionCount, nodefault};
+	__property int OmniLightMotionCount = {read=GetOmniMotionCount, nodefault};
+	__property int SpotLightMotionCount = {read=GetSpotMotionCount, nodefault};
+	__property Formats::M3dstypes::PKFMesh3DS MeshMotion[int Index] = {read=GetMeshMotion/*, default*/};
+	__property Formats::M3dstypes::PKFCamera3DS CameraMotion[int Index] = {read=GetCameraMotion};
+	__property Formats::M3dstypes::PKFOmni3DS OmniLightMotion[int Index] = {read=GetOmniLightMotion};
+	__property Formats::M3dstypes::TKFSets3DS Settings = {read=GetKFSets};
+	__property Formats::M3dstypes::PKFSpot3DS SpotLightMotion[int Index] = {read=GetSpotLightMotion};
+};
+
+#pragma pack(pop)
+
+class PASCALIMPLEMENTATION TFile3DS : public System::TObject
+{
+	typedef System::TObject inherited;
+	
+private:
+	Formats::M3dstypes::TNodeList *FNodeList;
+	Formats::M3dstypes::TDatabase3DS FDatabase;
+	System::Classes::TStream* FStream;
+	bool FOwnStream;
+	TMaterialList* FMaterialList;
+	TObjectList* FObjectList;
+	TKeyFramer* FKeyFramer;
+	System::UnicodeString FFileName;
+	TLoadProgress FOnLoadProgress;
+	Formats::M3dstypes::TAtmosphere3DS __fastcall GetAtmosphereData();
+	Formats::M3dstypes::TBackground3DS __fastcall GetBackgroundData();
+	Formats::M3dstypes::TDBType3DS __fastcall GetDatabaseType();
+	Formats::M3dstypes::TMeshSet3DS __fastcall GetMeshSettings();
+	Formats::M3dstypes::TViewport3DS __fastcall GetViewportData();
+	Formats::M3dstypes::TReleaseLevel __fastcall GetDatabaseRelease();
+	Formats::M3dstypes::TReleaseLevel __fastcall GetMeshRelease();
+	
+protected:
+	void __fastcall AddToNodeList(Formats::M3dstypes::PChunk3DS Chunk);
+	void __fastcall AssignParentNames();
+	void __fastcall CheckListNodeIDs();
+	void __fastcall CreateDatabase();
+	Formats::M3dstypes::PNodeList __fastcall FindNodeByID(short ID);
+	short __fastcall GetChunkNodeID(Formats::M3dstypes::PChunk3DS Chunk);
+	void __fastcall InitDatabase();
+	bool __fastcall IsNode(System::Word Tag);
+	void __fastcall KFAddParentName(Formats::M3dstypes::PChunk3DS Chunk, const System::UTF8String Name);
+	void __fastcall MakeNode(Formats::M3dstypes::PNodeList &Node);
+	void __fastcall ParseDatabase();
+	void __fastcall ReadChildren(Formats::M3dstypes::PChunk3DS Parent);
+	void __fastcall ReadXDataEntryChildren(Formats::M3dstypes::PChunk3DS Parent);
+	void __fastcall ReleaseDatabase();
+	void __fastcall ReleaseNodeList();
+	void __fastcall ReleaseStream();
+	
+public:
+	__fastcall virtual TFile3DS();
+	__fastcall virtual TFile3DS(const System::UnicodeString FileName);
+	__fastcall virtual ~TFile3DS();
+	void __fastcall ClearLists();
+	void __fastcall DumpDataBase(System::Classes::TStrings* Strings, Formats::M3dstypes::TDumpLevel DumpLevel);
+	void __fastcall LoadFromFile(const System::UnicodeString FileName);
+	void __fastcall LoadFromStream(System::Classes::TStream* const aStream);
+	System::Byte __fastcall ReadByte();
+	unsigned __fastcall ReadCardinal();
+	void __fastcall ReadChunkData(Formats::M3dstypes::PChunk3DS Chunk);
+	void __fastcall ReadData(int Size, void * Data);
+	double __fastcall ReadDouble();
+	Formats::M3dstypes::TFace3DS __fastcall ReadFace();
+	void __fastcall ReadHeader(System::Word &ChunkType, unsigned &ChunkSize);
+	int __fastcall ReadInteger();
+	Formats::M3dstypes::TKeyHeader3DS __fastcall ReadKeyHeader();
+	Formats::M3dstypes::TPoint3DS __fastcall ReadPoint();
+	short __fastcall ReadShort();
+	float __fastcall ReadSingle();
+	char * __fastcall ReadString();
+	Formats::M3dstypes::TTexVert3DS __fastcall ReadTexVert();
+	Formats::M3dstypes::TTrackHeader3DS __fastcall ReadTrackHeader();
+	System::Word __fastcall ReadWord();
+	void __fastcall FinishHeader(unsigned StartPos, unsigned EndPos);
+	void * __fastcall InitChunkData(Formats::M3dstypes::PChunk3DS Chunk);
+	void __fastcall SeekChild(Formats::M3dstypes::PChunk3DS Chunk);
+	void __fastcall Skip(int AValue);
+	void __fastcall WriteByte(System::Byte AValue);
+	void __fastcall WriteCardinal(unsigned AValue);
+	void __fastcall WriteData(int Size, void * Data);
+	void __fastcall WriteDouble(double AValue);
+	void __fastcall WriteFace(const Formats::M3dstypes::TFace3DS &F);
+	void __fastcall WriteFixedString(const System::UTF8String AValue, int Len);
+	void __fastcall WriteHeader(System::Word ChunkType, unsigned ChunkSize);
+	void __fastcall WriteInteger(int AValue);
+	void __fastcall WriteKeyHeader(const Formats::M3dstypes::TKeyHeader3DS &K);
+	void __fastcall WritePoint(const Formats::M3dstypes::TPoint3DS &P);
+	void __fastcall WriteShort(short AValue);
+	void __fastcall WriteSingle(float AValue);
+	void __fastcall WriteString(const System::UTF8String AValue);
+	void __fastcall WriteTexVertex(const Formats::M3dstypes::TTexVert3DS &T);
+	void __fastcall WriteTrackHeader(const Formats::M3dstypes::TTrackHeader3DS &T);
+	void __fastcall WriteWord(System::Word AValue);
+	__property Formats::M3dstypes::TAtmosphere3DS Atmosphere = {read=GetAtmosphereData};
+	__property Formats::M3dstypes::TBackground3DS Background = {read=GetBackgroundData};
+	__property Formats::M3dstypes::TReleaseLevel DatabaseRelease = {read=GetDatabaseRelease, nodefault};
+	__property Formats::M3dstypes::TDBType3DS DatabaseType = {read=GetDatabaseType, nodefault};
+	__property System::UnicodeString FileName = {read=FFileName};
+	__property TKeyFramer* KeyFramer = {read=FKeyFramer};
+	__property TMaterialList* Materials = {read=FMaterialList};
+	__property Formats::M3dstypes::TReleaseLevel MeshRelease = {read=GetMeshRelease, nodefault};
+	__property Formats::M3dstypes::TMeshSet3DS MeshSettings = {read=GetMeshSettings};
+	__property TObjectList* Objects = {read=FObjectList};
+	__property Formats::M3dstypes::TViewport3DS Viewport = {read=GetViewportData};
+	__property TLoadProgress OnLoadProgress = {read=FOnLoadProgress, write=FOnLoadProgress};
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace M3ds */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_M3DS)
+using namespace Formats::M3ds;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_M3dsHPP

+ 826 - 0
include/Win32/Formats.m3DSConst.hpp

@@ -0,0 +1,826 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.m3DSConst.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_M3dsconstHPP
+#define Formats_M3dsconstHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Formats.m3DSTypes.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace M3dsconst
+{
+//-- forward type declarations -----------------------------------------------
+//-- type declarations -------------------------------------------------------
+//-- var, const, procedure ---------------------------------------------------
+static const System::Int8 FaceCAVisable3DS = System::Int8(0x1);
+static const System::Int8 FaceBCVisable3DS = System::Int8(0x2);
+static const System::Int8 FaceABVisable3DS = System::Int8(0x4);
+static const System::Int8 FaceUWrap3DS = System::Int8(0x8);
+static const System::Int8 FaceVWrap3DS = System::Int8(0x10);
+static const System::Int8 KeyUsesTension3DS = System::Int8(0x1);
+static const System::Int8 KeyUsesCont3DS = System::Int8(0x2);
+static const System::Int8 KeyUsesBias3DS = System::Int8(0x4);
+static const System::Int8 KeyUsesEaseTo3DS = System::Int8(0x8);
+static const System::Int8 KeyUsesEaseFrom3DS = System::Int8(0x10);
+static const System::Int8 TrackSingle3DS = System::Int8(0x0);
+static const System::Int8 TrackLoops3DS = System::Int8(0x3);
+static const System::Int8 TrackRepeats3DS = System::Int8(0x2);
+static const System::Int8 TrackLockX3DS = System::Int8(0x8);
+static const System::Int8 TrackLockY3DS = System::Int8(0x10);
+static const System::Int8 TrackLockZ3DS = System::Int8(0x20);
+static const System::Word TrackNoLinkX3DS = System::Word(0x100);
+static const System::Word TrackNoLinkY3DS = System::Word(0x200);
+static const System::Word TrackNoLinkZ3DS = System::Word(0x400);
+extern DELPHI_PACKAGE Formats::M3dstypes::TPoint3DS DefPoint3DS;
+extern DELPHI_PACKAGE Formats::M3dstypes::TTexVert3DS DefTextVert3DS;
+extern DELPHI_PACKAGE Formats::M3dstypes::TFace3DS DefFace3DS;
+extern DELPHI_PACKAGE Formats::M3dstypes::TTrackHeader3DS DefTrackHeader3DS;
+extern DELPHI_PACKAGE Formats::M3dstypes::TKeyHeader3DS DefKeyHeader3DS;
+extern DELPHI_PACKAGE Formats::M3dstypes::TObjMat3DS DefObjMat3DS;
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFRotKey3DS DefKFRotKey3DS;
+static const int LayerFogBgnd = int(0x100000);
+static const System::Int8 NoFalloff = System::Int8(0x0);
+static const System::Int8 TopFalloff = System::Int8(0x2);
+static const System::Int8 BottomFalloff = System::Int8(0x1);
+static const System::Int8 InitNoExtras3DS = System::Int8(0x0);
+static const System::Int8 InitVertexArray3DS = System::Int8(0x1);
+static const System::Int8 InitTextArray3DS = System::Int8(0x2);
+static const System::Int8 InitFaceArray3DS = System::Int8(0x4);
+static const System::Int8 InitMatArray3DS = System::Int8(0x8);
+static const System::Int8 InitSmoothArray3DS = System::Int8(0x10);
+static const System::Int8 InitProcData3DS = System::Int8(0x20);
+static const System::Int8 InitVFlagArray3DS = System::Int8(0x40);
+static const System::Int8 RelVertexArray3ds = System::Int8(0x1);
+static const System::Int8 RelTextArray3ds = System::Int8(0x2);
+static const System::Int8 RelFaceArray3ds = System::Int8(0x4);
+static const System::Int8 RelMatArray3ds = System::Int8(0x8);
+static const System::Int8 RelSmoothArray3ds = System::Int8(0x10);
+static const System::Int8 RelProcData3ds = System::Int8(0x20);
+static const System::Int8 RelVFlagArray3ds = System::Int8(0x40);
+static const System::Word RelAll3DS = System::Word(0xffff);
+static const System::Int8 Smooth01Group3DS = System::Int8(0x1);
+static const System::Int8 Smooth02Group3DS = System::Int8(0x2);
+static const System::Int8 Smooth03Group3DS = System::Int8(0x4);
+static const System::Int8 Smooth04Group3DS = System::Int8(0x8);
+static const System::Int8 Smooth05Group3DS = System::Int8(0x10);
+static const System::Int8 Smooth06Group3DS = System::Int8(0x20);
+static const System::Int8 Smooth07Group3DS = System::Int8(0x30);
+static const System::Byte Smooth08Group3DS = System::Byte(0x80);
+static const System::Word Smooth09Group3DS = System::Word(0x100);
+static const System::Word Smooth10Group3DS = System::Word(0x200);
+static const System::Word Smooth11Group3DS = System::Word(0x400);
+static const System::Word Smooth12Group3DS = System::Word(0x800);
+static const System::Word Smooth13Group3DS = System::Word(0x1000);
+static const System::Word Smooth14Group3DS = System::Word(0x2000);
+static const System::Word Smooth15Group3DS = System::Word(0x4000);
+static const System::Word Smooth16Group3DS = System::Word(0x8000);
+static const int Smooth17Group3DS = int(0x10000);
+static const int Smooth18Group3DS = int(0x20000);
+static const int Smooth19Group3DS = int(0x40000);
+static const int Smooth20Group3DS = int(0x80000);
+static const int Smooth21Group3DS = int(0x100000);
+static const int Smooth22Group3DS = int(0x200000);
+static const int Smooth23Group3DS = int(0x400000);
+static const int Smooth24Group3DS = int(0x800000);
+static const int Smooth25Group3DS = int(0x1000000);
+static const int Smooth26Group3DS = int(0x2000000);
+static const int Smooth27Group3DS = int(0x4000000);
+static const int Smooth28Group3DS = int(0x8000000);
+static const int Smooth29Group3DS = int(0x10000000);
+static const int Smooth30Group3DS = int(0x20000000);
+static const int Smooth31Group3DS = int(0x40000000);
+static const unsigned Smooth32Group3DS = unsigned(0x80000000);
+#define DummyName3DS L"$$$DUMMY"
+static const System::Int8 KfNodeOff3DS = System::Int8(0x8);
+static const System::Word KfHideNode3DS = System::Word(0x800);
+static const System::Word KfFastNode3DS = System::Word(0x1000);
+static const System::Int8 KfNodeHasPath3DS = System::Int8(0x1);
+static const System::Int8 KfNodeAutoSmooth3DS = System::Int8(0x2);
+static const System::Int8 KfNodeFrozen3DS = System::Int8(0x4);
+static const System::Int8 KfMotionBlur3DS = System::Int8(0x10);
+static const System::Int8 KfBlurBranch3DS = System::Int8(0x20);
+static const System::Int8 KfMorphMtl3DS = System::Int8(0x40);
+static const System::Byte KfMorphOb3DS = System::Byte(0x80);
+static const System::Word FileNameStrMax3DS = System::Word(0x200);
+static const System::Byte FileAttrStrMax3DS = System::Byte(0x80);
+static const System::Int8 MasterScaleMin3DS = System::Int8(0x0);
+static const System::Int8 LoShadowBiasMin3DS = System::Int8(0x0);
+static const System::Int8 HiShadowBiasMin3DS = System::Int8(0x0);
+static const System::Int8 ShadowMapSizeMin3DS = System::Int8(0x0);
+static const System::Int8 ShadowSamplesMin3DS = System::Int8(0x0);
+static const System::Int8 ShadowRangeMin3DS = System::Int8(0x0);
+static const System::Int8 ShadowFilterMin3DS = System::Int8(0x1);
+static const System::Int8 ShadowFilterMax3DS = System::Int8(0xa);
+static const System::Int8 BitMapStrMax3DS = System::Int8(0xc);
+static const System::Int8 VGradientMin3DS = System::Int8(0x0);
+static const System::Int8 VGradientMax3DS = System::Int8(0x1);
+static const System::Int8 FogMin3DS = System::Int8(0x0);
+static const System::Int8 FogMax3DS = System::Int8(0x1);
+static const System::Int8 DistanceCueMin3DS = System::Int8(0x0);
+static const System::Int8 DistanceCueMax3DS = System::Int8(0x1);
+static const System::Int8 ViewCameraStrMax3DS = System::Int8(0xa);
+static const System::Int8 MatNameStrMax3DS = System::Int8(0x10);
+static const System::Int8 MatShadingMin3DS = System::Int8(0x0);
+static const System::Int8 MatShadingMax3DS = System::Int8(0x3);
+static const System::Int8 MatACubicFMin3DS = System::Int8(0x1);
+static const System::Int8 MatACubicAMin3DS = System::Int8(0x0);
+static const System::Int8 MatACubicAMax3DS = System::Int8(0x3);
+static const System::Int8 ACubicFirst3DS = System::Int8(0x9);
+static const System::Int8 ACubicFlat3DS = System::Int8(0x11);
+static const System::Int8 PointArrayMin3DS = System::Int8(0x3);
+static const System::Int8 FaceArrayMin3DS = System::Int8(0x1);
+static const System::Int8 MshMatGroupMin3DS = System::Int8(0x1);
+static const System::Int8 MshMatGroupStrMax3DS = System::Int8(0x10);
+static const System::Int8 ProcNameStrMax3DS = System::Int8(0xc);
+static const System::Int8 DLSpotlightMin3DS = System::Int8(0x0);
+static const System::Byte DLSpotlightMax3DS = System::Byte(0xa0);
+static const System::Int8 DLLocalShadow2SMin3DS = System::Int8(0xa);
+static const System::Word DLLocalShadow2SMax3DS = System::Word(0x1000);
+static const System::Int8 DLLocalShadow2FMin3DS = System::Int8(0x1);
+static const System::Int8 DLLocalShadow2FMax3DS = System::Int8(0xa);
+static const System::Int8 ColorFMin3DS = System::Int8(0x0);
+static const System::Int8 ColorFMax3DS = System::Int8(0x1);
+static const System::Int8 IntPercentageMax3DS = System::Int8(0x64);
+static const System::Int8 FloatPercentageMax3DS = System::Int8(0x1);
+static const System::Int8 MatMapNameStrMax3DS = System::Int8(0xc);
+static const System::Int8 NamedObjectStrMax3DS = System::Int8(0xa);
+static const System::Extended NCameraFOVMin3DS = 2.500000E-04;
+static const System::Byte NCameraFOVMax3DS = System::Byte(0xa0);
+#define NCameraFocMin3DS  (1.078130E+01)
+static const int NCameraFocMax3DS = int(0x989680);
+static const System::Int8 KFHdrStrMax3DS = System::Int8(0xc);
+static const System::Int8 NodeHdrStrMax3DS = System::Int8(0xa);
+static const System::Int8 InstanceNameStrMax3DS = System::Int8(0xa);
+static const System::Int8 MorphTrackStrMax3DS = System::Int8(0xa);
+static const System::Int8 MorphSmoothMin3DS = System::Int8(0x0);
+static const System::Word MorphSmoothMax3DS = System::Word(0x168);
+static const System::Int8 KFTensionMin3DS = System::Int8(-1);
+static const System::Int8 KFTensionMax3DS = System::Int8(0x1);
+static const System::Int8 KFContinuityMin3DS = System::Int8(-1);
+static const System::Int8 KFContinuityMax3DS = System::Int8(0x1);
+static const System::Int8 KFBiasMin3DS = System::Int8(-1);
+static const System::Int8 KFBiasMax3DS = System::Int8(0x1);
+static const System::Int8 KFEaseToMin3DS = System::Int8(0x0);
+static const System::Int8 KFEaseToMax3DS = System::Int8(0x1);
+static const System::Int8 KFEaseFromMin3DS = System::Int8(0x0);
+static const System::Int8 KFEaseFromMax3DS = System::Int8(0x1);
+static const System::Int8 TrackHeaderKeysMin3DS = System::Int8(0x1);
+static const System::Int8 ColTrackTagMin3DS = System::Int8(0x0);
+static const System::Int8 ColTrackTagMax3DS = System::Int8(0x1);
+static const System::Extended FOVTrackTagMin3DS = 2.500000E-04;
+static const System::Byte FOVTrackTagMax3DS = System::Byte(0xa0);
+static const System::Int8 HotTrackTagMin3DS = System::Int8(0x0);
+static const System::Byte HotTrackTagMax3DS = System::Byte(0xa0);
+static const System::Int8 FallTrackTagMin3DS = System::Int8(0x0);
+static const System::Byte FallTrackTagMax3DS = System::Byte(0xa0);
+static const System::Int8 KNoID = System::Int8(-1);
+static const System::Int8 TEX_DECAL = System::Int8(0x1);
+static const System::Int8 TEX_MIRROR = System::Int8(0x2);
+static const System::Int8 TEX_UNUSED1 = System::Int8(0x4);
+static const System::Int8 TEX_INVERT = System::Int8(0x8);
+static const System::Int8 TEX_NOWRAP = System::Int8(0x10);
+static const System::Int8 TEX_SAT = System::Int8(0x20);
+static const System::Int8 TEX_ALPHA_SOURCE = System::Int8(0x40);
+static const System::Byte TEX_TINT = System::Byte(0x80);
+static const System::Word TEX_DONT_USE_ALPHA = System::Word(0x100);
+static const System::Word TEX_RGB_TINT = System::Word(0x200);
+static const System::Int8 NODE_RENDOB_HIDE = System::Int8(0x4);
+static const System::Int8 NODE_OFF = System::Int8(0x8);
+static const System::Int8 ATKEY1 = System::Int8(0x10);
+static const System::Int8 ATKEY2 = System::Int8(0x20);
+static const System::Int8 ATKEY3 = System::Int8(0x40);
+static const System::Byte ATKEY4 = System::Byte(0x80);
+static const System::Word ATKEY5 = System::Word(0x100);
+static const System::Word ATKEYFLAGS = System::Word(0x1f0);
+static const System::Word MARK_NODE = System::Word(0x200);
+static const System::Word DISABLE_NODE = System::Word(0x400);
+static const System::Word HIDE_NODE = System::Word(0x800);
+static const System::Word FAST_NODE = System::Word(0x1000);
+static const System::Word PRIMARY_NODE = System::Word(0x4000);
+static const System::Word NODE_CALC_PATH = System::Word(0x8000);
+static const System::Int8 NODE_HAS_PATH = System::Int8(0x1);
+static const System::Int8 NODE_AUTO_SMOOTH = System::Int8(0x2);
+static const System::Int8 NODE_FROZEN = System::Int8(0x4);
+static const System::Int8 NODE_ANI_HIDDEN = System::Int8(0x8);
+static const System::Int8 NODE_MOTION_BLUR = System::Int8(0x10);
+static const System::Int8 NODE_BLUR_BRANCH = System::Int8(0x20);
+static const System::Int8 NODE_MORPH_MTL = System::Int8(0x40);
+static const System::Byte NODE_MORPH_OB = System::Byte(0x80);
+static const System::Int8 NULL_CHUNK = System::Int8(0x0);
+static const System::Word ChunkType = System::Word(0x995);
+static const System::Word ChunkUnique = System::Word(0x996);
+static const System::Word NotChunk = System::Word(0x997);
+static const System::Word Container = System::Word(0x998);
+static const System::Word IsChunk = System::Word(0x999);
+static const System::Word DUMMY = System::Word(0xffff);
+static const System::Word POINT_ARRAY_ENTRY = System::Word(0xf110);
+static const System::Word POINT_FLAG_ARRAY_ENTRY = System::Word(0xf111);
+static const System::Word FACE_ARRAY_ENTRY = System::Word(0xf120);
+static const System::Word MSH_MAT_GROUP_ENTRY = System::Word(0xf130);
+static const System::Word TEX_VERTS_ENTRY = System::Word(0xf140);
+static const System::Word SMOOTH_GROUP_ENTRY = System::Word(0xf150);
+static const System::Word POS_TRACK_TAG_KEY = System::Word(0xf020);
+static const System::Word ROT_TRACK_TAG_KEY = System::Word(0xf021);
+static const System::Word SCL_TRACK_TAG_KEY = System::Word(0xf022);
+static const System::Word FOV_TRACK_TAG_KEY = System::Word(0xf023);
+static const System::Word ROLL_TRACK_TAG_KEY = System::Word(0xf024);
+static const System::Word COL_TRACK_TAG_KEY = System::Word(0xf025);
+static const System::Word MORPH_TRACK_TAG_KEY = System::Word(0xf026);
+static const System::Word HOT_TRACK_TAG_KEY = System::Word(0xf027);
+static const System::Word FALL_TRACK_TAG_KEY = System::Word(0xf028);
+static const System::Word M3DMAGIC = System::Word(0x4d4d);
+static const System::Word SMAGIC = System::Word(0x2d2d);
+static const System::Word LMAGIC = System::Word(0x2d3d);
+static const System::Word MLIBMAGIC = System::Word(0x3daa);
+static const System::Word MATMAGIC = System::Word(0x3dff);
+static const System::Int8 M3D_VERSION = System::Int8(0x2);
+static const System::Int8 M3D_KFVERSION = System::Int8(0x5);
+static const System::Word MDATA = System::Word(0x3d3d);
+static const System::Word MESH_VERSION = System::Word(0x3d3e);
+static const System::Int8 COLOR_F = System::Int8(0x10);
+static const System::Int8 COLOR_24 = System::Int8(0x11);
+static const System::Int8 LIN_COLOR_24 = System::Int8(0x12);
+static const System::Int8 LIN_COLOR_F = System::Int8(0x13);
+static const System::Int8 INT_PERCENTAGE = System::Int8(0x30);
+static const System::Int8 FLOAT_PERCENTAGE = System::Int8(0x31);
+static const System::Word MASTER_SCALE = System::Word(0x100);
+static const System::Word BIT_MAP = System::Word(0x1100);
+static const System::Word USE_BIT_MAP = System::Word(0x1101);
+static const System::Word SOLID_BGND = System::Word(0x1200);
+static const System::Word USE_SOLID_BGND = System::Word(0x1201);
+static const System::Word V_GRADIENT = System::Word(0x1300);
+static const System::Word USE_V_GRADIENT = System::Word(0x1301);
+static const System::Word LO_SHADOW_BIAS = System::Word(0x1400);
+static const System::Word HI_SHADOW_BIAS = System::Word(0x1410);
+static const System::Word SHADOW_MAP_SIZE = System::Word(0x1420);
+static const System::Word SHADOW_SAMPLES = System::Word(0x1430);
+static const System::Word SHADOW_RANGE = System::Word(0x1440);
+static const System::Word SHADOW_FILTER = System::Word(0x1450);
+static const System::Word RAY_BIAS = System::Word(0x1460);
+static const System::Word O_CONSTS = System::Word(0x1500);
+static const System::Word AMBIENT_LIGHT = System::Word(0x2100);
+static const System::Word FOG = System::Word(0x2200);
+static const System::Word USE_FOG = System::Word(0x2201);
+static const System::Word FOG_BGND = System::Word(0x2210);
+static const System::Word DISTANCE_CUE = System::Word(0x2300);
+static const System::Word USE_DISTANCE_CUE = System::Word(0x2301);
+static const System::Word LAYER_FOG = System::Word(0x2302);
+static const System::Word USE_LAYER_FOG = System::Word(0x2303);
+static const System::Word DCUE_BGND = System::Word(0x2310);
+static const System::Word DEFAULT_VIEW = System::Word(0x3000);
+static const System::Word VIEW_TOP = System::Word(0x3010);
+static const System::Word VIEW_BOTTOM = System::Word(0x3020);
+static const System::Word VIEW_LEFT = System::Word(0x3030);
+static const System::Word VIEW_RIGHT = System::Word(0x3040);
+static const System::Word VIEW_FRONT = System::Word(0x3050);
+static const System::Word VIEW_BACK = System::Word(0x3060);
+static const System::Word VIEW_USER = System::Word(0x3070);
+static const System::Word VIEW_CAMERA = System::Word(0x3080);
+static const System::Word VIEW_WINDOW = System::Word(0x3090);
+static const System::Word NAMED_OBJECT = System::Word(0x4000);
+static const System::Word OBJ_HIDDEN = System::Word(0x4010);
+static const System::Word OBJ_VIS_LOFTER = System::Word(0x4011);
+static const System::Word OBJ_DOESNT_CAST = System::Word(0x4012);
+static const System::Word OBJ_MATTE = System::Word(0x4013);
+static const System::Word OBJ_FAST = System::Word(0x4014);
+static const System::Word OBJ_PROCEDURAL = System::Word(0x4015);
+static const System::Word OBJ_FROZEN = System::Word(0x4016);
+static const System::Word OBJ_DONT_RCVSHADOW = System::Word(0x4017);
+static const System::Word N_TRI_OBJECT = System::Word(0x4100);
+static const System::Word POINT_ARRAY = System::Word(0x4110);
+static const System::Word POINT_FLAG_ARRAY = System::Word(0x4111);
+static const System::Word FACE_ARRAY = System::Word(0x4120);
+static const System::Word MSH_MAT_GROUP = System::Word(0x4130);
+static const System::Word OLD_MAT_GROUP = System::Word(0x4131);
+static const System::Word TEX_VERTS = System::Word(0x4140);
+static const System::Word SMOOTH_GROUP = System::Word(0x4150);
+static const System::Word MESH_MATRIX = System::Word(0x4160);
+static const System::Word MESH_COLOR = System::Word(0x4165);
+static const System::Word MESH_TEXTURE_INFO = System::Word(0x4170);
+static const System::Word PROC_NAME = System::Word(0x4181);
+static const System::Word PROC_DATA = System::Word(0x4182);
+static const System::Word MSH_BOXMAP = System::Word(0x4190);
+static const System::Word N_D_L_OLD = System::Word(0x4400);
+static const System::Word N_CAM_OLD = System::Word(0x4500);
+static const System::Word N_DIRECT_LIGHT = System::Word(0x4600);
+static const System::Word DL_SPOTLIGHT = System::Word(0x4610);
+static const System::Word DL_OFF = System::Word(0x4620);
+static const System::Word DL_ATTENUATE = System::Word(0x4625);
+static const System::Word DL_RAYSHAD = System::Word(0x4627);
+static const System::Word DL_SHADOWED = System::Word(0x4630);
+static const System::Word DL_LOCAL_SHADOW = System::Word(0x4640);
+static const System::Word DL_LOCAL_SHADOW2 = System::Word(0x4641);
+static const System::Word DL_SEE_CONE = System::Word(0x4650);
+static const System::Word DL_SPOT_RECTANGULAR = System::Word(0x4651);
+static const System::Word DL_SPOT_OVERSHOOT = System::Word(0x4652);
+static const System::Word DL_SPOT_PROJECTOR = System::Word(0x4653);
+static const System::Word DL_EXCLUDE = System::Word(0x4654);
+static const System::Word DL_RANGE = System::Word(0x4655);
+static const System::Word DL_SPOT_ROLL = System::Word(0x4656);
+static const System::Word DL_SPOT_ASPECT = System::Word(0x4657);
+static const System::Word DL_RAY_BIAS = System::Word(0x4658);
+static const System::Word DL_INNER_RANGE = System::Word(0x4659);
+static const System::Word DL_OUTER_RANGE = System::Word(0x465a);
+static const System::Word DL_MULTIPLIER = System::Word(0x465b);
+static const System::Word N_AMBIENT_LIGHT = System::Word(0x4680);
+static const System::Word N_CAMERA = System::Word(0x4700);
+static const System::Word CAM_SEE_CONE = System::Word(0x4710);
+static const System::Word CAM_RANGES = System::Word(0x4720);
+static const System::Word HIERARCHY = System::Word(0x4f00);
+static const System::Word PARENT_OBJECT = System::Word(0x4f10);
+static const System::Word PIVOT_OBJECT = System::Word(0x4f20);
+static const System::Word PIVOT_LIMITS = System::Word(0x4f30);
+static const System::Word PIVOT_ORDER = System::Word(0x4f40);
+static const System::Word XLATE_RANGE = System::Word(0x4f50);
+static const System::Word POLY_2D = System::Word(0x5000);
+static const System::Word SHAPE_OK = System::Word(0x5010);
+static const System::Word SHAPE_NOT_OK = System::Word(0x5011);
+static const System::Word SHAPE_HOOK = System::Word(0x5020);
+static const System::Word PATH_3D = System::Word(0x6000);
+static const System::Word PATH_MATRIX = System::Word(0x6005);
+static const System::Word SHAPE_2D = System::Word(0x6010);
+static const System::Word M_SCALE = System::Word(0x6020);
+static const System::Word M_TWIST = System::Word(0x6030);
+static const System::Word M_TEETER = System::Word(0x6040);
+static const System::Word M_FIT = System::Word(0x6050);
+static const System::Word M_BEVEL = System::Word(0x6060);
+static const System::Word XZ_CURVE = System::Word(0x6070);
+static const System::Word YZ_CURVE = System::Word(0x6080);
+static const System::Word INTERPCT = System::Word(0x6090);
+static const System::Word DEFORM_LIMIT = System::Word(0x60a0);
+static const System::Word USE_CONTOUR = System::Word(0x6100);
+static const System::Word USE_TWEEN = System::Word(0x6110);
+static const System::Word USE_SCALE = System::Word(0x6120);
+static const System::Word USE_TWIST = System::Word(0x6130);
+static const System::Word USE_TEETER = System::Word(0x6140);
+static const System::Word USE_FIT = System::Word(0x6150);
+static const System::Word USE_BEVEL = System::Word(0x6160);
+static const System::Word VIEWPORT_LAYOUT_OLD = System::Word(0x7000);
+static const System::Word VIEWPORT_DATA_OLD = System::Word(0x7010);
+static const System::Word VIEWPORT_LAYOUT = System::Word(0x7001);
+static const System::Word VIEWPORT_DATA = System::Word(0x7011);
+static const System::Word VIEWPORT_DATA_3 = System::Word(0x7012);
+static const System::Word VIEWPORT_SIZE = System::Word(0x7020);
+static const System::Word NETWORK_VIEW = System::Word(0x7030);
+static const System::Word XDATA_SECTION = System::Word(0x8000);
+static const System::Word XDATA_ENTRY = System::Word(0x8001);
+static const System::Word XDATA_APPNAME = System::Word(0x8002);
+static const System::Word XDATA_STRING = System::Word(0x8003);
+static const System::Word XDATA_FLOAT = System::Word(0x8004);
+static const System::Word XDATA_DOUBLE = System::Word(0x8005);
+static const System::Word XDATA_SHORT = System::Word(0x8006);
+static const System::Word XDATA_LONG = System::Word(0x8007);
+static const System::Word XDATA_VOID = System::Word(0x8008);
+static const System::Word XDATA_GROUP = System::Word(0x8009);
+static const System::Word XDATA_RFU6 = System::Word(0x800a);
+static const System::Word XDATA_RFU5 = System::Word(0x800b);
+static const System::Word XDATA_RFU4 = System::Word(0x800c);
+static const System::Word XDATA_RFU3 = System::Word(0x800d);
+static const System::Word XDATA_RFU2 = System::Word(0x800e);
+static const System::Word XDATA_RFU1 = System::Word(0x800f);
+static const System::Word PARENT_NAME = System::Word(0x80f0);
+static const System::Word MAT_ENTRY = System::Word(0xafff);
+static const System::Word MAT_NAME = System::Word(0xa000);
+static const System::Word MAT_AMBIENT = System::Word(0xa010);
+static const System::Word MAT_DIFFUSE = System::Word(0xa020);
+static const System::Word MAT_SPECULAR = System::Word(0xa030);
+static const System::Word MAT_SHININESS = System::Word(0xa040);
+static const System::Word MAT_SHIN2PCT = System::Word(0xa041);
+static const System::Word MAT_SHIN3PCT = System::Word(0xa042);
+static const System::Word MAT_TRANSPARENCY = System::Word(0xa050);
+static const System::Word MAT_XPFALL = System::Word(0xa052);
+static const System::Word MAT_REFBLUR = System::Word(0xa053);
+static const System::Word MAT_SELF_ILLUM = System::Word(0xa080);
+static const System::Word MAT_TWO_SIDE = System::Word(0xa081);
+static const System::Word MAT_DECAL = System::Word(0xa082);
+static const System::Word MAT_ADDITIVE = System::Word(0xa083);
+static const System::Word MAT_SELF_ILPCT = System::Word(0xa084);
+static const System::Word MAT_WIRE = System::Word(0xa085);
+static const System::Word MAT_SUPERSMP = System::Word(0xa086);
+static const System::Word MAT_WIRESIZE = System::Word(0xa087);
+static const System::Word MAT_FACEMAP = System::Word(0xa088);
+static const System::Word MAT_XPFALLIN = System::Word(0xa08a);
+static const System::Word MAT_PHONGSOFT = System::Word(0xa08c);
+static const System::Word MAT_WIREABS = System::Word(0xa08e);
+static const System::Word MAT_SHADING = System::Word(0xa100);
+static const System::Word MAT_TEXMAP = System::Word(0xa200);
+static const System::Word MAT_OPACMAP = System::Word(0xa210);
+static const System::Word MAT_REFLMAP = System::Word(0xa220);
+static const System::Word MAT_BUMPMAP = System::Word(0xa230);
+static const System::Word MAT_SPECMAP = System::Word(0xa204);
+static const System::Word MAT_USE_XPFALL = System::Word(0xa240);
+static const System::Word MAT_USE_REFBLUR = System::Word(0xa250);
+static const System::Word MAT_BUMP_PERCENT = System::Word(0xa252);
+static const System::Word MAT_MAPNAME = System::Word(0xa300);
+static const System::Word MAT_ACUBIC = System::Word(0xa310);
+static const System::Word MAT_SXP_TEXT_DATA = System::Word(0xa320);
+static const System::Word MAT_SXP_TEXT2_DATA = System::Word(0xa321);
+static const System::Word MAT_SXP_OPAC_DATA = System::Word(0xa322);
+static const System::Word MAT_SXP_BUMP_DATA = System::Word(0xa324);
+static const System::Word MAT_SXP_SPEC_DATA = System::Word(0xa325);
+static const System::Word MAT_SXP_SHIN_DATA = System::Word(0xa326);
+static const System::Word MAT_SXP_SELFI_DATA = System::Word(0xa328);
+static const System::Word MAT_SXP_TEXT_MASKDATA = System::Word(0xa32a);
+static const System::Word MAT_SXP_TEXT2_MASKDATA = System::Word(0xa32c);
+static const System::Word MAT_SXP_OPAC_MASKDATA = System::Word(0xa32e);
+static const System::Word MAT_SXP_BUMP_MASKDATA = System::Word(0xa330);
+static const System::Word MAT_SXP_SPEC_MASKDATA = System::Word(0xa332);
+static const System::Word MAT_SXP_SHIN_MASKDATA = System::Word(0xa334);
+static const System::Word MAT_SXP_SELFI_MASKDATA = System::Word(0xa336);
+static const System::Word MAT_SXP_REFL_MASKDATA = System::Word(0xa338);
+static const System::Word MAT_TEX2MAP = System::Word(0xa33a);
+static const System::Word MAT_SHINMAP = System::Word(0xa33c);
+static const System::Word MAT_SELFIMAP = System::Word(0xa33d);
+static const System::Word MAT_TEXMASK = System::Word(0xa33e);
+static const System::Word MAT_TEX2MASK = System::Word(0xa340);
+static const System::Word MAT_OPACMASK = System::Word(0xa342);
+static const System::Word MAT_BUMPMASK = System::Word(0xa344);
+static const System::Word MAT_SHINMASK = System::Word(0xa346);
+static const System::Word MAT_SPECMASK = System::Word(0xa348);
+static const System::Word MAT_SELFIMASK = System::Word(0xa34a);
+static const System::Word MAT_REFLMASK = System::Word(0xa34c);
+static const System::Word MAT_MAP_TILINGOLD = System::Word(0xa350);
+static const System::Word MAT_MAP_TILING = System::Word(0xa351);
+static const System::Word MAT_MAP_TEXBLUR_OLD = System::Word(0xa352);
+static const System::Word MAT_MAP_TEXBLUR = System::Word(0xa353);
+static const System::Word MAT_MAP_USCALE = System::Word(0xa354);
+static const System::Word MAT_MAP_VSCALE = System::Word(0xa356);
+static const System::Word MAT_MAP_UOFFSET = System::Word(0xa358);
+static const System::Word MAT_MAP_VOFFSET = System::Word(0xa35a);
+static const System::Word MAT_MAP_ANG = System::Word(0xa35c);
+static const System::Word MAT_MAP_COL1 = System::Word(0xa360);
+static const System::Word MAT_MAP_COL2 = System::Word(0xa362);
+static const System::Word MAT_MAP_RCOL = System::Word(0xa364);
+static const System::Word MAT_MAP_GCOL = System::Word(0xa366);
+static const System::Word MAT_MAP_BCOL = System::Word(0xa368);
+static const System::Word KFDATA = System::Word(0xb000);
+static const System::Word KFHDR = System::Word(0xb00a);
+static const System::Word AMBIENT_NODE_TAG = System::Word(0xb001);
+static const System::Word OBJECT_NODE_TAG = System::Word(0xb002);
+static const System::Word CAMERA_NODE_TAG = System::Word(0xb003);
+static const System::Word TARGET_NODE_TAG = System::Word(0xb004);
+static const System::Word LIGHT_NODE_TAG = System::Word(0xb005);
+static const System::Word L_TARGET_NODE_TAG = System::Word(0xb006);
+static const System::Word SPOTLIGHT_NODE_TAG = System::Word(0xb007);
+static const System::Word KFSEG = System::Word(0xb008);
+static const System::Word KFCURTIME = System::Word(0xb009);
+static const System::Word NODE_HDR = System::Word(0xb010);
+static const System::Word INSTANCE_NAME = System::Word(0xb011);
+static const System::Word PRESCALE = System::Word(0xb012);
+static const System::Word PIVOT = System::Word(0xb013);
+static const System::Word BOUNDBOX = System::Word(0xb014);
+static const System::Word MORPH_SMOOTH = System::Word(0xb015);
+static const System::Word POS_TRACK_TAG = System::Word(0xb020);
+static const System::Word ROT_TRACK_TAG = System::Word(0xb021);
+static const System::Word SCL_TRACK_TAG = System::Word(0xb022);
+static const System::Word FOV_TRACK_TAG = System::Word(0xb023);
+static const System::Word ROLL_TRACK_TAG = System::Word(0xb024);
+static const System::Word COL_TRACK_TAG = System::Word(0xb025);
+static const System::Word MORPH_TRACK_TAG = System::Word(0xb026);
+static const System::Word HOT_TRACK_TAG = System::Word(0xb027);
+static const System::Word FALL_TRACK_TAG = System::Word(0xb028);
+static const System::Word HIDE_TRACK_TAG = System::Word(0xb029);
+static const System::Word NODE_ID = System::Word(0xb030);
+static const System::Word CMAGIC = System::Word(0xc23d);
+static const System::Word C_MDRAWER = System::Word(0xc010);
+static const System::Word C_TDRAWER = System::Word(0xc020);
+static const System::Word C_SHPDRAWER = System::Word(0xc030);
+static const System::Word C_MODDRAWER = System::Word(0xc040);
+static const System::Word C_RIPDRAWER = System::Word(0xc050);
+static const System::Word C_TXDRAWER = System::Word(0xc060);
+static const System::Word C_PDRAWER = System::Word(0xc062);
+static const System::Word C_MTLDRAWER = System::Word(0xc064);
+static const System::Word C_FLIDRAWER = System::Word(0xc066);
+static const System::Word C_CUBDRAWER = System::Word(0xc067);
+static const System::Word C_MFILE = System::Word(0xc070);
+static const System::Word C_SHPFILE = System::Word(0xc080);
+static const System::Word C_MODFILE = System::Word(0xc090);
+static const System::Word C_RIPFILE = System::Word(0xc0a0);
+static const System::Word C_TXFILE = System::Word(0xc0b0);
+static const System::Word C_PFILE = System::Word(0xc0b2);
+static const System::Word C_MTLFILE = System::Word(0xc0b4);
+static const System::Word C_FLIFILE = System::Word(0xc0b6);
+static const System::Word C_PALFILE = System::Word(0xc0b8);
+static const System::Word C_TX_STRING = System::Word(0xc0c0);
+static const System::Word C_CONSTS = System::Word(0xc0d0);
+static const System::Word C_SNAPS = System::Word(0xc0e0);
+static const System::Word C_GRIDS = System::Word(0xc0f0);
+static const System::Word C_ASNAPS = System::Word(0xc100);
+static const System::Word C_GRID_RANGE = System::Word(0xc110);
+static const System::Word C_RENDTYPE = System::Word(0xc120);
+static const System::Word C_PROGMODE = System::Word(0xc130);
+static const System::Word C_PREVMODE = System::Word(0xc140);
+static const System::Word C_MODWMODE = System::Word(0xc150);
+static const System::Word C_MODMODEL = System::Word(0xc160);
+static const System::Word C_ALL_LINES = System::Word(0xc170);
+static const System::Word C_BACK_TYPE = System::Word(0xc180);
+static const System::Word C_MD_CS = System::Word(0xc190);
+static const System::Word C_MD_CE = System::Word(0xc1a0);
+static const System::Word C_MD_SML = System::Word(0xc1b0);
+static const System::Word C_MD_SMW = System::Word(0xc1c0);
+static const System::Word C_LOFT_WITH_TEXTURE = System::Word(0xc1c3);
+static const System::Word C_LOFT_L_REPEAT = System::Word(0xc1c4);
+static const System::Word C_LOFT_W_REPEAT = System::Word(0xc1c5);
+static const System::Word C_LOFT_UV_NORMALIZE = System::Word(0xc1c6);
+static const System::Word C_WELD_LOFT = System::Word(0xc1c7);
+static const System::Word C_MD_PDET = System::Word(0xc1d0);
+static const System::Word C_MD_SDET = System::Word(0xc1e0);
+static const System::Word C_RGB_RMODE = System::Word(0xc1f0);
+static const System::Word C_RGB_HIDE = System::Word(0xc200);
+static const System::Word C_RGB_MAPSW = System::Word(0xc202);
+static const System::Word C_RGB_TWOSIDE = System::Word(0xc204);
+static const System::Word C_RGB_SHADOW = System::Word(0xc208);
+static const System::Word C_RGB_AA = System::Word(0xc210);
+static const System::Word C_RGB_OVW = System::Word(0xc220);
+static const System::Word C_RGB_OVH = System::Word(0xc230);
+static const System::Word C_RGB_PICTYPE = System::Word(0xc240);
+static const System::Word C_RGB_OUTPUT = System::Word(0xc250);
+static const System::Word C_RGB_TODISK = System::Word(0xc253);
+static const System::Word C_RGB_COMPRESS = System::Word(0xc254);
+static const System::Word C_JPEG_COMPRESSION = System::Word(0xc255);
+static const System::Word C_RGB_DISPDEV = System::Word(0xc256);
+static const System::Word C_RGB_HARDDEV = System::Word(0xc259);
+static const System::Word C_RGB_PATH = System::Word(0xc25a);
+static const System::Word C_BITMAP_DRAWER = System::Word(0xc25b);
+static const System::Word C_RGB_FILE = System::Word(0xc260);
+static const System::Word C_RGB_OVASPECT = System::Word(0xc270);
+static const System::Word C_RGB_ANIMTYPE = System::Word(0xc271);
+static const System::Word C_RENDER_ALL = System::Word(0xc272);
+static const System::Word C_REND_FROM = System::Word(0xc273);
+static const System::Word C_REND_TO = System::Word(0xc274);
+static const System::Word C_REND_NTH = System::Word(0xc275);
+static const System::Word C_PAL_TYPE = System::Word(0xc276);
+static const System::Word C_RND_TURBO = System::Word(0xc277);
+static const System::Word C_RND_MIP = System::Word(0xc278);
+static const System::Word C_BGND_METHOD = System::Word(0xc279);
+static const System::Word C_AUTO_REFLECT = System::Word(0xc27a);
+static const System::Word C_VP_FROM = System::Word(0xc27b);
+static const System::Word C_VP_TO = System::Word(0xc27c);
+static const System::Word C_VP_NTH = System::Word(0xc27d);
+static const System::Word C_REND_TSTEP = System::Word(0xc27e);
+static const System::Word C_VP_TSTEP = System::Word(0xc27f);
+static const System::Word C_SRDIAM = System::Word(0xc280);
+static const System::Word C_SRDEG = System::Word(0xc290);
+static const System::Word C_SRSEG = System::Word(0xc2a0);
+static const System::Word C_SRDIR = System::Word(0xc2b0);
+static const System::Word C_HETOP = System::Word(0xc2c0);
+static const System::Word C_HEBOT = System::Word(0xc2d0);
+static const System::Word C_HEHT = System::Word(0xc2e0);
+static const System::Word C_HETURNS = System::Word(0xc2f0);
+static const System::Word C_HEDEG = System::Word(0xc300);
+static const System::Word C_HESEG = System::Word(0xc310);
+static const System::Word C_HEDIR = System::Word(0xc320);
+static const System::Word C_QUIKSTUFF = System::Word(0xc330);
+static const System::Word C_SEE_LIGHTS = System::Word(0xc340);
+static const System::Word C_SEE_CAMERAS = System::Word(0xc350);
+static const System::Word C_SEE_3D = System::Word(0xc360);
+static const System::Word C_MESHSEL = System::Word(0xc370);
+static const System::Word C_MESHUNSEL = System::Word(0xc380);
+static const System::Word C_POLYSEL = System::Word(0xc390);
+static const System::Word C_POLYUNSEL = System::Word(0xc3a0);
+static const System::Word C_SHPLOCAL = System::Word(0xc3a2);
+static const System::Word C_MSHLOCAL = System::Word(0xc3a4);
+static const System::Word C_NUM_FORMAT = System::Word(0xc3b0);
+static const System::Word C_ARCH_DENOM = System::Word(0xc3c0);
+static const System::Word C_IN_DEVICE = System::Word(0xc3d0);
+static const System::Word C_MSCALE = System::Word(0xc3e0);
+static const System::Word C_COMM_PORT = System::Word(0xc3f0);
+static const System::Word C_TAB_BASES = System::Word(0xc400);
+static const System::Word C_TAB_DIVS = System::Word(0xc410);
+static const System::Word C_MASTER_SCALES = System::Word(0xc420);
+static const System::Word C_SHOW_1STVERT = System::Word(0xc430);
+static const System::Word C_SHAPER_OK = System::Word(0xc440);
+static const System::Word C_LOFTER_OK = System::Word(0xc450);
+static const System::Word C_EDITOR_OK = System::Word(0xc460);
+static const System::Word C_KEYFRAMER_OK = System::Word(0xc470);
+static const System::Word C_PICKSIZE = System::Word(0xc480);
+static const System::Word C_MAPTYPE = System::Word(0xc490);
+static const System::Word C_MAP_DISPLAY = System::Word(0xc4a0);
+static const System::Word C_TILE_XY = System::Word(0xc4b0);
+static const System::Word C_MAP_XYZ = System::Word(0xc4c0);
+static const System::Word C_MAP_SCALE = System::Word(0xc4d0);
+static const System::Word C_MAP_MATRIX_OLD = System::Word(0xc4e0);
+static const System::Word C_MAP_MATRIX = System::Word(0xc4e1);
+static const System::Word C_MAP_WID_HT = System::Word(0xc4f0);
+static const System::Word C_OBNAME = System::Word(0xc500);
+static const System::Word C_CAMNAME = System::Word(0xc510);
+static const System::Word C_LTNAME = System::Word(0xc520);
+static const System::Word C_CUR_MNAME = System::Word(0xc525);
+static const System::Word C_CURMTL_FROM_MESH = System::Word(0xc526);
+static const System::Word C_GET_SHAPE_MAKE_FACES = System::Word(0xc527);
+static const System::Word C_DETAIL = System::Word(0xc530);
+static const System::Word C_VERTMARK = System::Word(0xc540);
+static const System::Word C_MSHAX = System::Word(0xc550);
+static const System::Word C_MSHCP = System::Word(0xc560);
+static const System::Word C_USERAX = System::Word(0xc570);
+static const System::Word C_SHOOK = System::Word(0xc580);
+static const System::Word C_RAX = System::Word(0xc590);
+static const System::Word C_STAPE = System::Word(0xc5a0);
+static const System::Word C_LTAPE = System::Word(0xc5b0);
+static const System::Word C_ETAPE = System::Word(0xc5c0);
+static const System::Word C_KTAPE = System::Word(0xc5c8);
+static const System::Word C_SPHSEGS = System::Word(0xc5d0);
+static const System::Word C_GEOSMOOTH = System::Word(0xc5e0);
+static const System::Word C_HEMISEGS = System::Word(0xc5f0);
+static const System::Word C_PRISMSEGS = System::Word(0xc600);
+static const System::Word C_PRISMSIDES = System::Word(0xc610);
+static const System::Word C_TUBESEGS = System::Word(0xc620);
+static const System::Word C_TUBESIDES = System::Word(0xc630);
+static const System::Word C_TORSEGS = System::Word(0xc640);
+static const System::Word C_TORSIDES = System::Word(0xc650);
+static const System::Word C_CONESIDES = System::Word(0xc660);
+static const System::Word C_CONESEGS = System::Word(0xc661);
+static const System::Word C_NGPARMS = System::Word(0xc670);
+static const System::Word C_PTHLEVEL = System::Word(0xc680);
+static const System::Word C_MSCSYM = System::Word(0xc690);
+static const System::Word C_MFTSYM = System::Word(0xc6a0);
+static const System::Word C_MTTSYM = System::Word(0xc6b0);
+static const System::Word C_SMOOTHING = System::Word(0xc6c0);
+static const System::Word C_MODICOUNT = System::Word(0xc6d0);
+static const System::Word C_FONTSEL = System::Word(0xc6e0);
+static const System::Word C_TESS_TYPE = System::Word(0xc6f0);
+static const System::Word C_TESS_TENSION = System::Word(0xc6f1);
+static const System::Word C_SEG_START = System::Word(0xc700);
+static const System::Word C_SEG_END = System::Word(0xc705);
+static const System::Word C_CURTIME = System::Word(0xc710);
+static const System::Word C_ANIMLENGTH = System::Word(0xc715);
+static const System::Word C_PV_FROM = System::Word(0xc720);
+static const System::Word C_PV_TO = System::Word(0xc725);
+static const System::Word C_PV_DOFNUM = System::Word(0xc730);
+static const System::Word C_PV_RNG = System::Word(0xc735);
+static const System::Word C_PV_NTH = System::Word(0xc740);
+static const System::Word C_PV_TYPE = System::Word(0xc745);
+static const System::Word C_PV_METHOD = System::Word(0xc750);
+static const System::Word C_PV_FPS = System::Word(0xc755);
+static const System::Word C_VTR_FRAMES = System::Word(0xc765);
+static const System::Word C_VTR_HDTL = System::Word(0xc770);
+static const System::Word C_VTR_HD = System::Word(0xc771);
+static const System::Word C_VTR_TL = System::Word(0xc772);
+static const System::Word C_VTR_IN = System::Word(0xc775);
+static const System::Word C_VTR_PK = System::Word(0xc780);
+static const System::Word C_VTR_SH = System::Word(0xc785);
+static const System::Word C_WORK_MTLS = System::Word(0xc790);
+static const System::Word C_WORK_MTLS_2 = System::Word(0xc792);
+static const System::Word C_WORK_MTLS_3 = System::Word(0xc793);
+static const System::Word C_WORK_MTLS_4 = System::Word(0xc794);
+static const System::Word C_WORK_MTLS_5 = System::Word(0xcb00);
+static const System::Word C_WORK_MTLS_6 = System::Word(0xcb01);
+static const System::Word C_WORK_MTLS_7 = System::Word(0xcb02);
+static const System::Word C_WORK_MTLS_8 = System::Word(0xcb03);
+static const System::Word C_WORKMTL = System::Word(0xcb04);
+static const System::Word C_SXP_TEXT_DATA = System::Word(0xcb10);
+static const System::Word C_SXP_TEXT2_DATA = System::Word(0xcb20);
+static const System::Word C_SXP_OPAC_DATA = System::Word(0xcb11);
+static const System::Word C_SXP_BUMP_DATA = System::Word(0xcb12);
+static const System::Word C_SXP_SPEC_DATA = System::Word(0xcb24);
+static const System::Word C_SXP_SHIN_DATA = System::Word(0xcb13);
+static const System::Word C_SXP_SELFI_DATA = System::Word(0xcb28);
+static const System::Word C_SXP_TEXT_MASKDATA = System::Word(0xcb30);
+static const System::Word C_SXP_TEXT2_MASKDATA = System::Word(0xcb32);
+static const System::Word C_SXP_OPAC_MASKDATA = System::Word(0xcb34);
+static const System::Word C_SXP_BUMP_MASKDATA = System::Word(0xcb36);
+static const System::Word C_SXP_SPEC_MASKDATA = System::Word(0xcb38);
+static const System::Word C_SXP_SHIN_MASKDATA = System::Word(0xcb3a);
+static const System::Word C_SXP_SELFI_MASKDATA = System::Word(0xc3cb);
+static const System::Word C_SXP_REFL_MASKDATA = System::Word(0xcb3e);
+static const System::Word C_BGTYPE = System::Word(0xc7a1);
+static const System::Word C_MEDTILE = System::Word(0xc7b0);
+static const System::Word C_LO_CONTRAST = System::Word(0xc7d0);
+static const System::Word C_HI_CONTRAST = System::Word(0xc7d1);
+static const System::Word C_FROZ_DISPLAY = System::Word(0xc7e0);
+static const System::Word C_BOOLWELD = System::Word(0xc7f0);
+static const System::Word C_BOOLTYPE = System::Word(0xc7f1);
+static const System::Word C_ANG_THRESH = System::Word(0xc900);
+static const System::Word C_SS_THRESH = System::Word(0xc901);
+static const System::Word C_TEXTURE_BLUR_DEFAULT = System::Word(0xc903);
+static const System::Word C_MAPDRAWER = System::Word(0xca00);
+static const System::Word C_MAPDRAWER1 = System::Word(0xca01);
+static const System::Word C_MAPDRAWER2 = System::Word(0xca02);
+static const System::Word C_MAPDRAWER3 = System::Word(0xca03);
+static const System::Word C_MAPDRAWER4 = System::Word(0xca04);
+static const System::Word C_MAPDRAWER5 = System::Word(0xca05);
+static const System::Word C_MAPDRAWER6 = System::Word(0xca06);
+static const System::Word C_MAPDRAWER7 = System::Word(0xca07);
+static const System::Word C_MAPDRAWER8 = System::Word(0xca08);
+static const System::Word C_MAPDRAWER9 = System::Word(0xca09);
+static const System::Word C_MAPDRAWER_ENTRY = System::Word(0xca10);
+static const System::Word C_BACKUP_FILE = System::Word(0xca20);
+static const System::Word C_DITHER_256 = System::Word(0xca21);
+static const System::Word C_SAVE_LAST = System::Word(0xca22);
+static const System::Word C_USE_ALPHA = System::Word(0xca23);
+static const System::Word C_TGA_DEPTH = System::Word(0xca24);
+static const System::Word C_REND_FIELDS = System::Word(0xca25);
+static const System::Word C_REFLIP = System::Word(0xca26);
+static const System::Word C_SEL_ITEMTOG = System::Word(0xca27);
+static const System::Word C_SEL_RESET = System::Word(0xca28);
+static const System::Word C_STICKY_KEYINF = System::Word(0xca29);
+static const System::Word C_WELD_THRESHOLD = System::Word(0xca2a);
+static const System::Word C_ZCLIP_POINT = System::Word(0xca2b);
+static const System::Word C_ALPHA_SPLIT = System::Word(0xca2c);
+static const System::Word C_KF_SHOW_BACKFACE = System::Word(0xca30);
+static const System::Word C_OPTIMIZE_LOFT = System::Word(0xca40);
+static const System::Word C_TENS_DEFAULT = System::Word(0xca42);
+static const System::Word C_CONT_DEFAULT = System::Word(0xca44);
+static const System::Word C_BIAS_DEFAULT = System::Word(0xca46);
+static const System::Word C_DXFNAME_SRC = System::Word(0xca50);
+static const System::Word C_AUTO_WELD = System::Word(0xca60);
+static const System::Word C_AUTO_UNIFY = System::Word(0xca70);
+static const System::Word C_AUTO_SMOOTH = System::Word(0xca80);
+static const System::Word C_DXF_SMOOTH_ANG = System::Word(0xca90);
+static const System::Word C_SMOOTH_ANG = System::Word(0xcaa0);
+static const System::Word C_NET_USE_VPOST = System::Word(0xcc00);
+static const System::Word C_NET_USE_GAMMA = System::Word(0xcc10);
+static const System::Word C_NET_FIELD_ORDER = System::Word(0xcc20);
+static const System::Word C_BLUR_FRAMES = System::Word(0xcd00);
+static const System::Word C_BLUR_SAMPLES = System::Word(0xcd10);
+static const System::Word C_BLUR_DUR = System::Word(0xcd20);
+static const System::Word C_HOT_METHOD = System::Word(0xcd30);
+static const System::Word C_HOT_CHECK = System::Word(0xcd40);
+static const System::Word C_PIXEL_SIZE = System::Word(0xcd50);
+static const System::Word C_DISP_GAMMA = System::Word(0xcd60);
+static const System::Word C_FBUF_GAMMA = System::Word(0xcd70);
+static const System::Word C_FILE_OUT_GAMMA = System::Word(0xcd80);
+static const System::Word C_FILE_IN_GAMMA = System::Word(0xcd82);
+static const System::Word C_GAMMA_CORRECT = System::Word(0xcd84);
+static const System::Word C_APPLY_DISP_GAMMA = System::Word(0xcd90);
+static const System::Word C_APPLY_FBUF_GAMMA = System::Word(0xcda0);
+static const System::Word C_APPLY_FILE_GAMMA = System::Word(0xcdb0);
+static const System::Word C_FORCE_WIRE = System::Word(0xcdc0);
+static const System::Word C_RAY_SHADOWS = System::Word(0xcdd0);
+static const System::Word C_MASTER_AMBIENT = System::Word(0xcde0);
+static const System::Word C_SUPER_SAMPLE = System::Word(0xcdf0);
+static const System::Word C_OBJECT_MBLUR = System::Word(0xce00);
+static const System::Word C_MBLUR_DITHER = System::Word(0xce10);
+static const System::Word C_DITHER_24 = System::Word(0xce20);
+static const System::Word C_SUPER_BLACK = System::Word(0xce30);
+static const System::Word C_SAFE_FRAME = System::Word(0xce40);
+static const System::Word C_VIEW_PRES_RATIO = System::Word(0xce50);
+static const System::Word C_BGND_PRES_RATIO = System::Word(0xce60);
+static const System::Word C_NTH_SERIAL_NUM = System::Word(0xce70);
+static const System::Word VPDATA = System::Word(0xd000);
+static const System::Word P_QUEUE_ENTRY = System::Word(0xd100);
+static const System::Word P_QUEUE_IMAGE = System::Word(0xd110);
+static const System::Word P_QUEUE_USEIGAMMA = System::Word(0xd114);
+static const System::Word P_QUEUE_PROC = System::Word(0xd120);
+static const System::Word P_QUEUE_SOLID = System::Word(0xd130);
+static const System::Word P_QUEUE_GRADIENT = System::Word(0xd140);
+static const System::Word P_QUEUE_KF = System::Word(0xd150);
+static const System::Word P_QUEUE_MOTBLUR = System::Word(0xd152);
+static const System::Word P_QUEUE_MB_REPEAT = System::Word(0xd153);
+static const System::Word P_QUEUE_NONE = System::Word(0xd160);
+static const System::Word P_QUEUE_RESIZE = System::Word(0xd180);
+static const System::Word P_QUEUE_OFFSET = System::Word(0xd185);
+static const System::Word P_QUEUE_ALIGN = System::Word(0xd190);
+static const System::Word P_CUSTOM_SIZE = System::Word(0xd1a0);
+static const System::Word P_ALPH_NONE = System::Word(0xd210);
+static const System::Word P_ALPH_PSEUDO = System::Word(0xd220);
+static const System::Word P_ALPH_OP_PSEUDO = System::Word(0xd221);
+static const System::Word P_ALPH_BLUR = System::Word(0xd222);
+static const System::Word P_ALPH_PCOL = System::Word(0xd225);
+static const System::Word P_ALPH_C0 = System::Word(0xd230);
+static const System::Word P_ALPH_OP_KEY = System::Word(0xd231);
+static const System::Word P_ALPH_KCOL = System::Word(0xd235);
+static const System::Word P_ALPH_OP_NOCONV = System::Word(0xd238);
+static const System::Word P_ALPH_IMAGE = System::Word(0xd240);
+static const System::Word P_ALPH_ALPHA = System::Word(0xd250);
+static const System::Word P_ALPH_QUES = System::Word(0xd260);
+static const System::Word P_ALPH_QUEIMG = System::Word(0xd265);
+static const System::Word P_ALPH_CUTOFF = System::Word(0xd270);
+static const System::Word P_ALPHANEG = System::Word(0xd280);
+static const System::Word P_TRAN_NONE = System::Word(0xd300);
+static const System::Word P_TRAN_IMAGE = System::Word(0xd310);
+static const System::Word P_TRAN_FRAMES = System::Word(0xd312);
+static const System::Word P_TRAN_FADEIN = System::Word(0xd320);
+static const System::Word P_TRAN_FADEOUT = System::Word(0xd330);
+static const System::Word P_TRANNEG = System::Word(0xd340);
+static const System::Word P_RANGES = System::Word(0xd400);
+static const System::Word P_PROC_DATA = System::Word(0xd500);
+static const System::Int8 NodeTagCount = System::Int8(0x6);
+extern DELPHI_PACKAGE System::StaticArray<System::Word, 6> NodeTags;
+}	/* namespace M3dsconst */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_M3DSCONST)
+using namespace Formats::M3dsconst;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_M3dsconstHPP

+ 2042 - 0
include/Win32/Formats.m3DSTypes.hpp

@@ -0,0 +1,2042 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.m3DSTypes.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_M3dstypesHPP
+#define Formats_M3dstypesHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace M3dstypes
+{
+//-- forward type declarations -----------------------------------------------
+struct TPoint3DS;
+struct TFColor3DS;
+struct TFace3DS;
+struct TTexVert3DS;
+struct TTrackHeader3DS;
+struct TKeyHeader3DS;
+struct TKFRotKey3DS;
+struct TChunkListEntry3DS;
+struct TChunkList3DS;
+struct TNodeList;
+struct TDatabase3DS;
+struct TViewSize3DS;
+struct TOrthoView3DS;
+struct TUserView3DS;
+struct TViewport3DS;
+struct TShadowSets3DS;
+struct TMeshSet3DS;
+struct TFogSettings3DS;
+struct TLayerFogSettings3DS;
+struct TDCueSettings3DS;
+struct TAtmosphere3DS;
+struct TVGradientBgnd3DS;
+struct TBackground3DS;
+struct TACubic3DS;
+struct TBitmap3DS;
+struct TMapSet3DS;
+struct TRMapSet3DS;
+struct TMaterial3DS;
+struct TMapInfo3DS;
+struct TObjMat3DS;
+struct TMesh3DS;
+struct TSpotShadow3DS;
+struct TSpotCone3DS;
+struct TSpotProjector3DS;
+struct TSpotLight3DS;
+struct TLiteAttenuate3DS;
+struct TLight3DS;
+struct TCamRanges3DS;
+struct TCamera3DS;
+struct TKFKeyInfo3DS;
+struct TKFSegment3DS;
+struct TKFSets3DS;
+struct TKFCamera3DS;
+struct TKFAmbient3DS;
+struct TKFMesh3DS;
+struct TKFOmni3DS;
+struct TKFSpot3DS;
+struct TXDataRaw3DS;
+struct TColorF;
+struct TColor24;
+struct TFog;
+struct TLayerFog;
+struct TDistanceCue;
+struct TViewStandard;
+struct TViewUser;
+struct TMatAcubic;
+struct TIpasData;
+struct TPointArray;
+struct TPointFlagArray;
+struct TFaceArray;
+struct TMshMatGroup;
+struct TSmoothGroup;
+struct TTexVerts;
+struct TMeshTextureInfo;
+struct TDlSpotlight;
+struct TDlLocalShadow2;
+struct TNCamera;
+struct TCamRanges;
+struct TViewportLayout;
+struct TViewportSize;
+struct TViewportData;
+struct TKFHdr;
+struct TKFSeg;
+struct TNodeHdr;
+struct TBoundBox;
+struct TPosTrackTag;
+struct TColTrackTag;
+struct TRotTrackTag;
+struct TScaleTrackTag;
+struct TMorphTrackTag;
+struct THideTrackTag;
+struct TFovTrackTag;
+struct TRollTrackTag;
+struct THotTrackTag;
+struct TFallTrackTag;
+struct TXDataEntry;
+struct TChunkData;
+struct TChunk3DS;
+//-- type declarations -------------------------------------------------------
+enum DECLSPEC_DENUM TDumpLevel : unsigned int { dlTerseDump, dlMediumDump, dlMaximumDump };
+
+typedef char * PChar3DS;
+
+typedef System::UTF8String String3DS;
+
+typedef System::SmallString<64> String64;
+
+typedef System::StaticArray<System::Word, 536870912> TWordList;
+
+typedef TWordList *PWordList;
+
+typedef System::StaticArray<int, 268435456> TIntegerArray;
+
+typedef TIntegerArray *PIntegerArray;
+
+typedef System::StaticArray<unsigned, 268435456> TCardinalArray;
+
+typedef TCardinalArray *PCardinalArray;
+
+typedef System::StaticArray<float, 268435456> TSingleList;
+
+typedef TSingleList *PSingleList;
+
+typedef TPoint3DS *PPoint3DS;
+
+struct DECLSPEC_DRECORD TPoint3DS
+{
+public:
+	float X;
+	float Y;
+	float Z;
+};
+
+
+typedef System::StaticArray<TPoint3DS, 89478486> TPointList;
+
+typedef TPointList *PPointList;
+
+typedef TFColor3DS *PFColor3DS;
+
+struct DECLSPEC_DRECORD TFColor3DS
+{
+public:
+	float R;
+	float G;
+	float B;
+};
+
+
+typedef System::StaticArray<TFColor3DS, 89478486> TFColorList;
+
+typedef TFColorList *PFColorList;
+
+typedef TFace3DS *PFace3DS;
+
+#pragma pack(push,1)
+struct DECLSPEC_DRECORD TFace3DS
+{
+	
+public:
+	union
+	{
+		struct 
+		{
+			System::StaticArray<System::Word, 4> FaceRec;
+		};
+		struct 
+		{
+			System::Word V1;
+			System::Word V2;
+			System::Word V3;
+			System::Word Flag;
+		};
+		
+	};
+};
+#pragma pack(pop)
+
+
+typedef System::StaticArray<TFace3DS, 134217728> TFaceList;
+
+typedef TFaceList *PFaceList;
+
+typedef TTexVert3DS *PTexVert3DS;
+
+struct DECLSPEC_DRECORD TTexVert3DS
+{
+public:
+	float U;
+	float V;
+};
+
+
+typedef System::StaticArray<TTexVert3DS, 134217728> TTexVertList;
+
+typedef TTexVertList *PTexVertList;
+
+typedef TTrackHeader3DS *PTrackHeader3DS;
+
+struct DECLSPEC_DRECORD TTrackHeader3DS
+{
+public:
+	System::Word Flags;
+	int nu1;
+	int nu2;
+	int KeyCount;
+};
+
+
+typedef TKeyHeader3DS *PKeyHeader3DS;
+
+struct DECLSPEC_DRECORD TKeyHeader3DS
+{
+public:
+	int Time;
+	System::Word RFlags;
+	float Tension;
+	float Continuity;
+	float Bias;
+	float EaseTo;
+	float EaseFrom;
+};
+
+
+typedef System::StaticArray<TKeyHeader3DS, 38347923> TKeyHeaderList;
+
+typedef TKeyHeaderList *PKeyHeaderList;
+
+typedef TKFRotKey3DS *PKFRotKey3DS;
+
+struct DECLSPEC_DRECORD TKFRotKey3DS
+{
+public:
+	float Angle;
+	float X;
+	float Y;
+	float Z;
+};
+
+
+typedef System::StaticArray<TKFRotKey3DS, 67108864> TKFRotKeyList;
+
+typedef TKFRotKeyList *PKFRotKeyList;
+
+typedef System::UnicodeString *PKFMorphKey3DS;
+
+typedef System::UnicodeString TKFMorphKey3DS;
+
+typedef System::StaticArray<System::UnicodeString, 268435456> TKFMorphKeyList;
+
+typedef TKFMorphKeyList *PKFMorphKeyList;
+
+typedef TChunk3DS *PChunk3DS;
+
+typedef TChunkListEntry3DS *PChunkListEntry3DS;
+
+struct DECLSPEC_DRECORD TChunkListEntry3DS
+{
+public:
+	System::UnicodeString NameStr;
+	TChunk3DS *Chunk;
+};
+
+
+typedef System::StaticArray<TChunkListEntry3DS, 134217728> TChunkList;
+
+typedef TChunkList *PChunkList;
+
+typedef TChunkList3DS *PChunkList3DS;
+
+struct DECLSPEC_DRECORD TChunkList3DS
+{
+public:
+	int Count;
+	TChunkList *List;
+};
+
+
+enum DECLSPEC_DENUM TDBType3DS : unsigned int { dbUnknown, dbMeshFile, dbProjectFile, dbMaterialFile };
+
+typedef TNodeList *PNodeList;
+
+struct DECLSPEC_DRECORD TNodeList
+{
+public:
+	short ID;
+	System::Word Tag;
+	System::UnicodeString Name;
+	System::UnicodeString InstStr;
+	short ParentID;
+	TNodeList *Next;
+};
+
+
+typedef TDatabase3DS *PDatabase3DS;
+
+struct DECLSPEC_DRECORD TDatabase3DS
+{
+public:
+	TChunk3DS *TopChunk;
+	bool ObjListDirty;
+	bool MatListDirty;
+	bool NodeListDirty;
+	TChunkList3DS *ObjList;
+	TChunkList3DS *MatList;
+	TChunkList3DS *NodeList;
+};
+
+
+enum DECLSPEC_DENUM TViewType3DS : unsigned int { vtNoView3DS, vtTopView3DS, vtBottomView3DS, vtLeftView3DS, vtRightView3DS, vtFrontView3DS, vtBackView3DS, vtUserView3DS, vtCameraView3DS, vtSpotlightView3DS };
+
+typedef TViewSize3DS *PViewSize3DS;
+
+struct DECLSPEC_DRECORD TViewSize3DS
+{
+public:
+	System::Word XPos;
+	System::Word YPos;
+	System::Word Width;
+	System::Word Height;
+};
+
+
+typedef TOrthoView3DS *POrthoView3DS;
+
+struct DECLSPEC_DRECORD TOrthoView3DS
+{
+public:
+	TPoint3DS Center;
+	float Zoom;
+};
+
+
+typedef TUserView3DS *PUserView3DS;
+
+struct DECLSPEC_DRECORD TUserView3DS
+{
+public:
+	TPoint3DS Center;
+	float Zoom;
+	float HorAng;
+	float VerAng;
+};
+
+
+typedef TViewport3DS *PViewport3DS;
+
+struct DECLSPEC_DRECORD TViewport3DS
+{
+public:
+	TViewType3DS AType;
+	TViewSize3DS Size;
+	TOrthoView3DS Ortho;
+	TUserView3DS User;
+	System::UnicodeString CameraStr;
+};
+
+
+enum DECLSPEC_DENUM TShadowStyle3DS : unsigned int { ssUseShadowMap, ssUseRayTraceShadow };
+
+typedef TShadowSets3DS *PShadowSets3DS;
+
+struct DECLSPEC_DRECORD TShadowSets3DS
+{
+public:
+	TShadowStyle3DS AType;
+	float Bias;
+	float RayBias;
+	short MapSize;
+	float Filter;
+};
+
+
+typedef TMeshSet3DS *PMeshSet3DS;
+
+struct DECLSPEC_DRECORD TMeshSet3DS
+{
+public:
+	float MasterScale;
+	TShadowSets3DS Shadow;
+	TFColor3DS AmbientLight;
+	TPoint3DS OConsts;
+};
+
+
+enum DECLSPEC_DENUM TAtmosphereType3DS : unsigned int { atNoAtmo, atUseFog, atUseLayerFog, atUseDistanceCue };
+
+enum DECLSPEC_DENUM TLayerFogFalloff3DS : unsigned int { lfNoFall, lfTopFall, lfBottomFall };
+
+typedef TFogSettings3DS *PFogSettings3DS;
+
+struct DECLSPEC_DRECORD TFogSettings3DS
+{
+public:
+	float NearPlane;
+	float NearDensity;
+	float FarPlane;
+	float FarDensity;
+	TFColor3DS FogColor;
+	bool FogBgnd;
+};
+
+
+typedef TLayerFogSettings3DS *PLayerFogSettings3DS;
+
+struct DECLSPEC_DRECORD TLayerFogSettings3DS
+{
+public:
+	float ZMin;
+	float ZMax;
+	float Density;
+	TFColor3DS FogColor;
+	TLayerFogFalloff3DS FallOff;
+	bool FogBgnd;
+};
+
+
+typedef TDCueSettings3DS *PDCueSettings3DS;
+
+struct DECLSPEC_DRECORD TDCueSettings3DS
+{
+public:
+	float NearPlane;
+	float NearDim;
+	float FarPlane;
+	float FarDim;
+	bool DCueBgnd;
+};
+
+
+typedef TAtmosphere3DS *PAtmosphere3DS;
+
+struct DECLSPEC_DRECORD TAtmosphere3DS
+{
+public:
+	TFogSettings3DS Fog;
+	TLayerFogSettings3DS LayerFog;
+	TDCueSettings3DS DCue;
+	TAtmosphereType3DS ActiveAtmo;
+};
+
+
+enum DECLSPEC_DENUM TBackgroundType3DS : unsigned int { btNoBgnd, btUseSolidBgnd, btUseVGradientBgnd, btUseBitmapBgnd };
+
+typedef System::AnsiString *PBitmapBgnd3DS;
+
+typedef System::AnsiString TBitmapBgnd3DS;
+
+typedef TFColor3DS TSolidBgnd3DS;
+
+typedef TVGradientBgnd3DS *PVGradientBgnd3DS;
+
+struct DECLSPEC_DRECORD TVGradientBgnd3DS
+{
+public:
+	float GradPercent;
+	TFColor3DS Top;
+	TFColor3DS Mid;
+	TFColor3DS Bottom;
+};
+
+
+typedef TBackground3DS *PBackground3DS;
+
+struct DECLSPEC_DRECORD TBackground3DS
+{
+public:
+	System::AnsiString Bitmap;
+	TFColor3DS Solid;
+	TVGradientBgnd3DS VGradient;
+	TBackgroundType3DS BgndUsed;
+};
+
+
+enum DECLSPEC_DENUM TShadeType3DS : unsigned int { stWire, stFlat, stGouraud, stPhong, stMetal };
+
+enum DECLSPEC_DENUM TTileType3DS : unsigned int { ttTile, ttDecal, ttBoth };
+
+enum DECLSPEC_DENUM TFilterType3DS : unsigned int { ftPyramidal, ftSummedArea };
+
+enum DECLSPEC_DENUM TTintType3DS : unsigned int { ttRGB, ttAlpha, ttRGBLumaTint, ttAlphaTint, ttRGBTint };
+
+typedef TACubic3DS *PACubic3DS;
+
+struct DECLSPEC_DRECORD TACubic3DS
+{
+public:
+	bool FirstFrame;
+	bool Flat;
+	int Size;
+	int nthFrame;
+};
+
+
+typedef TBitmap3DS *PBitmap3DS;
+
+struct DECLSPEC_DRECORD TBitmap3DS
+{
+public:
+	System::AnsiString NameStr;
+	float Percent;
+	TTileType3DS Tiling;
+	bool IgnoreAlpha;
+	TFilterType3DS Filter;
+	float Blur;
+	bool Mirror;
+	bool Negative;
+	float UScale;
+	float VScale;
+	float UOffset;
+	float VOffset;
+	float Rotation;
+	TTintType3DS Source;
+	TFColor3DS Tint1;
+	TFColor3DS Tint2;
+	TFColor3DS RedTint;
+	TFColor3DS GreenTint;
+	TFColor3DS BlueTint;
+	int DataSize;
+	void *Data;
+};
+
+
+typedef TMapSet3DS *PMapSet3DS;
+
+struct DECLSPEC_DRECORD TMapSet3DS
+{
+public:
+	TBitmap3DS Map;
+	TBitmap3DS Mask;
+};
+
+
+struct DECLSPEC_DRECORD TRMapSet3DS
+{
+public:
+	TBitmap3DS Map;
+	bool UseAuto;
+	TACubic3DS AutoMap;
+	TBitmap3DS Mask;
+};
+
+
+typedef TMaterial3DS *PMaterial3DS;
+
+struct DECLSPEC_DRECORD TMaterial3DS
+{
+public:
+	System::AnsiString NameStr;
+	TFColor3DS Ambient;
+	TFColor3DS Diffuse;
+	TFColor3DS Specular;
+	float Shininess;
+	float ShinStrength;
+	float Blur;
+	float Transparency;
+	float TransFallOff;
+	float SelfIllumPct;
+	float WireSize;
+	TShadeType3DS Shading;
+	bool UseBlur;
+	bool UseFall;
+	bool TwoSided;
+	bool SelFillum;
+	bool Additive;
+	bool UseWire;
+	bool UseWireAbs;
+	bool FaceMap;
+	bool Soften;
+	TMapSet3DS Texture;
+	TMapSet3DS Texture2;
+	TMapSet3DS Opacity;
+	TMapSet3DS Bump;
+	TMapSet3DS SpecMap;
+	TMapSet3DS ShinMap;
+	TMapSet3DS IllumMap;
+	TRMapSet3DS Reflect;
+};
+
+
+typedef System::StaticArray<float, 12> TMeshMatrix;
+
+typedef TMeshMatrix *PMeshMatrix;
+
+typedef TMapInfo3DS *PMapInfo3DS;
+
+struct DECLSPEC_DRECORD TMapInfo3DS
+{
+public:
+	System::Word MapType;
+	float TileX;
+	float TileY;
+	float CenX;
+	float CenY;
+	float CenZ;
+	float Scale;
+	TMeshMatrix Matrix;
+	float PW;
+	float PH;
+	float CH;
+};
+
+
+typedef TObjMat3DS *PObjMat3DS;
+
+struct DECLSPEC_DRECORD TObjMat3DS
+{
+public:
+	System::AnsiString NameStr;
+	System::Word NFaces;
+	TWordList *FaceIndex;
+};
+
+
+typedef System::StaticArray<TObjMat3DS, 89478486> TObjMatList;
+
+typedef TObjMatList *PObjMatList;
+
+typedef TMesh3DS *PMesh3DS;
+
+struct DECLSPEC_DRECORD TMesh3DS
+{
+	
+private:
+	typedef System::StaticArray<System::UnicodeString, 6> _TMesh3DS__1;
+	
+	
+public:
+	System::AnsiString NameStr;
+	bool IsHidden;
+	bool IsvisLofter;
+	bool IsMatte;
+	bool IsNoCast;
+	bool IsFast;
+	bool IsNorcvShad;
+	bool IsFrozen;
+	System::Word NVertices;
+	TPointList *VertexArray;
+	System::Word NVFlags;
+	TWordList *VFlagArray;
+	System::Word NTextVerts;
+	TTexVertList *TextArray;
+	bool UseMapInfo;
+	TMapInfo3DS Map;
+	TMeshMatrix LocMatrix;
+	System::Word NFaces;
+	TFaceList *FaceArray;
+	TCardinalArray *SmoothArray;
+	bool UseBoxMap;
+	_TMesh3DS__1 BoxMapStr;
+	System::Byte MeshColor;
+	System::Word NMats;
+	TObjMatList *MatArray;
+	bool UseProc;
+	int ProcSize;
+	System::UnicodeString ProcNameStr;
+	void *ProcData;
+};
+
+
+enum DECLSPEC_DENUM TConeStyle3DS : unsigned int { csCircular, csRectangular };
+
+typedef TSpotShadow3DS *PSpotShadow3DS;
+
+struct DECLSPEC_DRECORD TSpotShadow3DS
+{
+public:
+	bool Cast;
+	TShadowStyle3DS AType;
+	bool Local;
+	float Bias;
+	float Filter;
+	System::Word MapSize;
+	float RayBias;
+};
+
+
+typedef TSpotCone3DS *PSpotCone3DS;
+
+struct DECLSPEC_DRECORD TSpotCone3DS
+{
+public:
+	TConeStyle3DS AType;
+	bool Show;
+	bool Overshoot;
+};
+
+
+typedef TSpotProjector3DS *PSpotProjector3DS;
+
+struct DECLSPEC_DRECORD TSpotProjector3DS
+{
+public:
+	bool Use;
+	System::UnicodeString BitmapStr;
+};
+
+
+typedef TSpotLight3DS *PSpotLight3DS;
+
+struct DECLSPEC_DRECORD TSpotLight3DS
+{
+public:
+	TPoint3DS Target;
+	float Hotspot;
+	float FallOff;
+	float Roll;
+	float Aspect;
+	TSpotShadow3DS Shadows;
+	TSpotCone3DS Cone;
+	TSpotProjector3DS Projector;
+};
+
+
+typedef TLiteAttenuate3DS *PLiteAttenuate3DS;
+
+struct DECLSPEC_DRECORD TLiteAttenuate3DS
+{
+public:
+	bool IsOn;
+	float Inner;
+	float Outer;
+};
+
+
+typedef TLight3DS *PLight3DS;
+
+struct DECLSPEC_DRECORD TLight3DS
+{
+public:
+	System::AnsiString NameStr;
+	TPoint3DS Pos;
+	TFColor3DS Color;
+	float Multiplier;
+	bool DLOff;
+	TLiteAttenuate3DS Attenuation;
+	System::Classes::TStringList* Exclude;
+	TSpotLight3DS *Spot;
+};
+
+
+typedef TCamRanges3DS *PCamRanges3DS;
+
+struct DECLSPEC_DRECORD TCamRanges3DS
+{
+public:
+	float CamNear;
+	float CamFar;
+};
+
+
+typedef TCamera3DS *PCamera3DS;
+
+struct DECLSPEC_DRECORD TCamera3DS
+{
+public:
+	System::AnsiString NameStr;
+	TPoint3DS Position;
+	TPoint3DS Target;
+	float Roll;
+	float FOV;
+	bool ShowCone;
+	TCamRanges3DS Ranges;
+};
+
+
+typedef TKFKeyInfo3DS *PKFKeyInfo3DS;
+
+struct DECLSPEC_DRECORD TKFKeyInfo3DS
+{
+public:
+	int Length;
+	int CurFrame;
+};
+
+
+typedef TKFSegment3DS *PKFSegment3DS;
+
+struct DECLSPEC_DRECORD TKFSegment3DS
+{
+public:
+	bool Use;
+	int SegBegin;
+	int SegEnd;
+};
+
+
+typedef TKFSets3DS *PKFSets3DS;
+
+struct DECLSPEC_DRECORD TKFSets3DS
+{
+public:
+	TKFKeyInfo3DS Anim;
+	TKFSegment3DS Seg;
+};
+
+
+typedef TKFCamera3DS *PKFCamera3DS;
+
+struct DECLSPEC_DRECORD TKFCamera3DS
+{
+public:
+	System::AnsiString NameStr;
+	System::AnsiString ParentStr;
+	System::Word Flags1;
+	System::Word Flags2;
+	int NPKeys;
+	System::Word NPFlag;
+	TKeyHeaderList *PKeys;
+	TPointList *Pos;
+	int NFKeys;
+	System::Word NFFlag;
+	TKeyHeaderList *FKeys;
+	TSingleList *FOV;
+	int NRKeys;
+	System::Word NRFlag;
+	TKeyHeaderList *RKeys;
+	TSingleList *Roll;
+	System::UnicodeString TParentStr;
+	int NTKeys;
+	System::Word NTFlag;
+	TKeyHeaderList *TKeys;
+	TPointList *TPos;
+	System::Word TFlags1;
+	System::Word TFlags2;
+};
+
+
+typedef TKFAmbient3DS *PKFAmbient3DS;
+
+struct DECLSPEC_DRECORD TKFAmbient3DS
+{
+public:
+	System::Word Flags1;
+	System::Word Flags2;
+	int NCKeys;
+	System::Word NCFlag;
+	TKeyHeaderList *CKeys;
+	TFColorList *Color;
+};
+
+
+typedef TKFMesh3DS *PKFMesh3DS;
+
+struct DECLSPEC_DRECORD TKFMesh3DS
+{
+public:
+	System::AnsiString NameStr;
+	System::AnsiString ParentStr;
+	System::Word Flags1;
+	System::Word Flags2;
+	TPoint3DS Pivot;
+	System::AnsiString InstanceStr;
+	TPoint3DS BoundMin;
+	TPoint3DS BoundMax;
+	int NPKeys;
+	short NPFlag;
+	TKeyHeaderList *PKeys;
+	TPointList *Pos;
+	int NRKeys;
+	short NRFlag;
+	TKeyHeaderList *RKeys;
+	TKFRotKeyList *Rot;
+	int NSKeys;
+	short NSFlag;
+	TKeyHeaderList *SKeys;
+	TPointList *Scale;
+	int NMKeys;
+	short NMFlag;
+	TKeyHeaderList *MKeys;
+	TKFMorphKeyList *Morph;
+	int NHKeys;
+	short NHFlag;
+	TKeyHeaderList *HKeys;
+	float MSAngle;
+};
+
+
+typedef TKFOmni3DS *PKFOmni3DS;
+
+struct DECLSPEC_DRECORD TKFOmni3DS
+{
+public:
+	System::AnsiString Name;
+	System::AnsiString Parent;
+	System::Word Flags1;
+	System::Word Flags2;
+	int NPKeys;
+	System::Word NPFlag;
+	TKeyHeaderList *PKeys;
+	TPointList *Pos;
+	int NCKeys;
+	System::Word NCFlag;
+	TKeyHeaderList *CKeys;
+	TFColorList *Color;
+};
+
+
+typedef TKFSpot3DS *PKFSpot3DS;
+
+struct DECLSPEC_DRECORD TKFSpot3DS
+{
+public:
+	System::AnsiString Name;
+	System::AnsiString Parent;
+	System::Word Flags1;
+	System::Word Flags2;
+	int NPKeys;
+	System::Word NPFlag;
+	TKeyHeaderList *PKeys;
+	TPointList *Pos;
+	int NCKeys;
+	System::Word NCFlag;
+	TKeyHeaderList *CKeys;
+	TFColorList *Color;
+	int NHKeys;
+	System::Word NHFlag;
+	TKeyHeaderList *HKeys;
+	TSingleList *Hot;
+	int NFKeys;
+	System::Word NFFlag;
+	TKeyHeaderList *FKeys;
+	TSingleList *Fall;
+	int NRKeys;
+	System::Word NRFlag;
+	TKeyHeaderList *RKeys;
+	TSingleList *Roll;
+	System::AnsiString TParent;
+	int NTKeys;
+	System::Word NTFlag;
+	TKeyHeaderList *TKeys;
+	TPointList *TPos;
+	System::Word TFlags1;
+	System::Word TFlags2;
+};
+
+
+typedef TXDataRaw3DS *PXDataRaw3DS;
+
+struct DECLSPEC_DRECORD TXDataRaw3DS
+{
+public:
+	int Size;
+	void *Data;
+};
+
+
+enum DECLSPEC_DENUM TTargetType3DS : unsigned int { ttLightTarget, ttCameraTarget };
+
+typedef unsigned *PM3dVersion;
+
+typedef unsigned TM3dVersion;
+
+typedef TColorF *PColorF;
+
+struct DECLSPEC_DRECORD TColorF
+{
+public:
+	float Red;
+	float Green;
+	float Blue;
+};
+
+
+typedef TColorF *PLinColorF;
+
+typedef TColorF TLinColorF;
+
+typedef TColor24 *PColor24;
+
+struct DECLSPEC_DRECORD TColor24
+{
+public:
+	System::Byte Red;
+	System::Byte Green;
+	System::Byte Blue;
+};
+
+
+typedef TColor24 *PLinColor24;
+
+typedef TColor24 TLinColor24;
+
+typedef TColor24 *PMatMapRCol;
+
+typedef TColor24 TMatMapRCol;
+
+typedef TColor24 *PMatMapGCol;
+
+typedef TColor24 TMatMapGCol;
+
+typedef TColor24 *PMatMapBCol;
+
+typedef TColor24 TMatMapBCol;
+
+typedef TColor24 *PMatMapCol1;
+
+typedef TColor24 TMatMapCol1;
+
+typedef TColor24 *PMatMapCol2;
+
+typedef TColor24 TMatMapCol2;
+
+typedef short *PIntPercentage;
+
+typedef short TIntPercentage;
+
+typedef short *PMatBumpPercent;
+
+typedef short TMatBumpPercent;
+
+typedef float *PFloatPercentage;
+
+typedef float TFloatPercentage;
+
+typedef char * PMatMapname;
+
+typedef int *PMeshVersion;
+
+typedef int TMeshVersion;
+
+typedef float *PMasterScale;
+
+typedef float TMasterScale;
+
+typedef float *PLoShadowBias;
+
+typedef float TLoShadowBias;
+
+typedef float *PHiShadowBias;
+
+typedef float THiShadowBias;
+
+typedef float *PRayBias;
+
+typedef float TRayBias;
+
+typedef short *PShadowMapSize;
+
+typedef short TShadowMapSize;
+
+typedef short *PShadowSamples;
+
+typedef short TShadowSamples;
+
+typedef int *PShadowRange;
+
+typedef int TShadowRange;
+
+typedef float *PShadowFilter;
+
+typedef float TShadowFilter;
+
+typedef TPoint3DS *POConsts;
+
+typedef TPoint3DS TOConsts;
+
+typedef char * PBitMapName;
+
+typedef float *PVGradient;
+
+typedef float TVGradient;
+
+typedef TFog *PFog;
+
+struct DECLSPEC_DRECORD TFog
+{
+public:
+	float NearPlaneDist;
+	float NearPlaneDensity;
+	float FarPlaneDist;
+	float FarPlaneDensity;
+};
+
+
+typedef TLayerFog *PLayerFog;
+
+struct DECLSPEC_DRECORD TLayerFog
+{
+public:
+	float ZMin;
+	float ZMax;
+	float Density;
+	unsigned AType;
+};
+
+
+typedef TDistanceCue *PDistanceCue;
+
+struct DECLSPEC_DRECORD TDistanceCue
+{
+public:
+	float NearPlaneDist;
+	float NearPlaneDimming;
+	float FarPlaneDist;
+	float FarPlaneDimming;
+};
+
+
+typedef TViewStandard *PViewStandard;
+
+struct DECLSPEC_DRECORD TViewStandard
+{
+public:
+	TPoint3DS ViewTargetCoord;
+	float ViewWidth;
+};
+
+
+typedef TViewUser *PViewUser;
+
+struct DECLSPEC_DRECORD TViewUser
+{
+public:
+	TPoint3DS ViewTargetCoord;
+	float ViewWidth;
+	float XYViewangle;
+	float YZViewangle;
+	float BankAngle;
+};
+
+
+typedef char * PViewCamera;
+
+typedef char * PMatName;
+
+typedef short *PMatShading;
+
+typedef short TMatShading;
+
+typedef TMatAcubic *PMatAcubic;
+
+struct DECLSPEC_DRECORD TMatAcubic
+{
+public:
+	System::Byte ShadeLevel;
+	System::Byte Antialias;
+	short Flags;
+	unsigned MapSize;
+	unsigned FrameInterval;
+};
+
+
+typedef TIpasData *PIpasData;
+
+struct DECLSPEC_DRECORD TIpasData
+{
+public:
+	int Size;
+	void *Data;
+};
+
+
+typedef float *PMatWireSize;
+
+typedef float TMatWireSize;
+
+typedef System::Word *PMatMapTiling;
+
+typedef System::Word TMatMapTiling;
+
+typedef float *PMatMapTexblur;
+
+typedef float TMatMapTexblur;
+
+typedef float *PMatMapUScale;
+
+typedef float TMatMapUScale;
+
+typedef float *PMatMapVScale;
+
+typedef float TMatMapVScale;
+
+typedef float *PMatMapUOffset;
+
+typedef float TMatMapUOffset;
+
+typedef float *PMatMapVOffset;
+
+typedef float TMatMapVOffset;
+
+typedef float *PMatMapAng;
+
+typedef float TMatMapAng;
+
+typedef char * PNamedObject;
+
+typedef TPointArray *PPointArray;
+
+struct DECLSPEC_DRECORD TPointArray
+{
+public:
+	System::Word Vertices;
+	TPointList *PointList;
+};
+
+
+typedef TPointFlagArray *PPointFlagArray;
+
+struct DECLSPEC_DRECORD TPointFlagArray
+{
+public:
+	System::Word Flags;
+	TWordList *FlagList;
+};
+
+
+typedef TFaceArray *PFaceArray;
+
+struct DECLSPEC_DRECORD TFaceArray
+{
+public:
+	System::Word Faces;
+	TFaceList *FaceList;
+};
+
+
+typedef TMshMatGroup *PMshMatGroup;
+
+struct DECLSPEC_DRECORD TMshMatGroup
+{
+public:
+	System::AnsiString MatNameStr;
+	System::Word Faces;
+	TWordList *FaceList;
+};
+
+
+typedef System::StaticArray<System::AnsiString, 6> TMshBoxmap;
+
+typedef TMshBoxmap *PMshBoxmap;
+
+typedef TSmoothGroup *PSmoothGroup;
+
+struct DECLSPEC_DRECORD TSmoothGroup
+{
+public:
+	System::Word Groups;
+	TCardinalArray *GroupList;
+};
+
+
+typedef TTexVerts *PTexVerts;
+
+struct DECLSPEC_DRECORD TTexVerts
+{
+public:
+	System::Word NumCoords;
+	TTexVertList *TextVertList;
+};
+
+
+typedef System::Byte *PMeshColor;
+
+typedef System::Byte TMeshColor;
+
+typedef TMeshTextureInfo *PMeshTextureInfo;
+
+struct DECLSPEC_DRECORD TMeshTextureInfo
+{
+public:
+	System::Word MapType;
+	float XTiling;
+	float YTiling;
+	TPoint3DS IconPos;
+	float IconScaling;
+	TMeshMatrix XMatrix;
+	float IconWidth;
+	float IconHeight;
+	float CylIconHeight;
+};
+
+
+typedef char * PProcName;
+
+typedef TPoint3DS *PNDirectLight;
+
+typedef TPoint3DS TNDirectLight;
+
+typedef char * PDlExclude;
+
+typedef TDlSpotlight *PDlSpotlight;
+
+struct DECLSPEC_DRECORD TDlSpotlight
+{
+public:
+	TPoint3DS SpotLightTarg;
+	float HotspotAngle;
+	float FalloffAngle;
+};
+
+
+typedef float *PDlOuterRange;
+
+typedef float TDlOuterRange;
+
+typedef float *PDlInnerRange;
+
+typedef float TDlInnerRange;
+
+typedef float *PDlMultiplier;
+
+typedef float TDlMultiplier;
+
+typedef float *PDlSpotRoll;
+
+typedef float TDlSpotRoll;
+
+typedef float *PDlSpotAspect;
+
+typedef float TDlSpotAspect;
+
+typedef char * PDlSpotProjector;
+
+typedef float *PDlRayBias;
+
+typedef float TDlRayBias;
+
+typedef TDlLocalShadow2 *PDlLocalShadow2;
+
+struct DECLSPEC_DRECORD TDlLocalShadow2
+{
+public:
+	float LocalShadowBias;
+	float LocalShadowFilter;
+	short LocalShadowMapSize;
+};
+
+
+typedef TNCamera *PNCamera;
+
+struct DECLSPEC_DRECORD TNCamera
+{
+public:
+	TPoint3DS CameraPos;
+	TPoint3DS TargetPos;
+	float CameraBank;
+	float CameraFocalLength;
+};
+
+
+typedef TCamRanges *PCamRanges;
+
+struct DECLSPEC_DRECORD TCamRanges
+{
+public:
+	float NearPlane;
+	float FarPlane;
+};
+
+
+typedef TViewportLayout *PViewportLayout;
+
+struct DECLSPEC_DRECORD TViewportLayout
+{
+public:
+	short Form;
+	short Top;
+	short Ready;
+	short WState;
+	short SwapWS;
+	short SwapPort;
+	short SwapCur;
+};
+
+
+typedef TViewportSize *PViewportSize;
+
+struct DECLSPEC_DRECORD TViewportSize
+{
+public:
+	System::Word XPos;
+	System::Word YPos;
+	System::Word Width;
+	System::Word Height;
+};
+
+
+typedef TViewportData *PViewportData;
+
+struct DECLSPEC_DRECORD TViewportData
+{
+public:
+	System::Word Flags;
+	System::Word AxisLockout;
+	System::Word WinXPos;
+	System::Word WinYPos;
+	System::Word WinWidth;
+	System::Word WinHeight;
+	System::Word View;
+	float ZoomFactor;
+	TPoint3DS Center;
+	float HorizAng;
+	float VertAng;
+	System::AnsiString CamNameStr;
+};
+
+
+typedef TViewportData *PViewportData3;
+
+typedef TViewportData TViewportData3;
+
+typedef TKFHdr *PKFHdr;
+
+struct DECLSPEC_DRECORD TKFHdr
+{
+public:
+	short Revision;
+	System::UnicodeString Filename;
+	int AnimLength;
+};
+
+
+typedef short *PKFId;
+
+typedef short TKFId;
+
+typedef TKFSeg *PKFSeg;
+
+struct DECLSPEC_DRECORD TKFSeg
+{
+public:
+	int First;
+	int Last;
+};
+
+
+typedef int *PKFCurtime;
+
+typedef int TKFCurtime;
+
+typedef TNodeHdr *PNodeHdr;
+
+struct DECLSPEC_DRECORD TNodeHdr
+{
+public:
+	System::UnicodeString ObjNameStr;
+	System::Word Flags1;
+	System::Word Flags2;
+	short ParentIndex;
+};
+
+
+typedef TPoint3DS *PPivot;
+
+typedef TPoint3DS TPivot;
+
+typedef char * PInstanceName;
+
+typedef float *PMorphSmooth;
+
+typedef float TMorphSmooth;
+
+typedef TBoundBox *PBoundBox;
+
+struct DECLSPEC_DRECORD TBoundBox
+{
+public:
+	TPoint3DS Min;
+	TPoint3DS Max;
+};
+
+
+typedef TPosTrackTag *PPosTrackTag;
+
+struct DECLSPEC_DRECORD TPosTrackTag
+{
+public:
+	TTrackHeader3DS TrackHdr;
+	TKeyHeaderList *KeyHdrList;
+	TPointList *PositionList;
+};
+
+
+typedef TColTrackTag *PColTrackTag;
+
+struct DECLSPEC_DRECORD TColTrackTag
+{
+public:
+	TTrackHeader3DS TrackHdr;
+	TKeyHeaderList *KeyHdrList;
+	TFColorList *ColorList;
+};
+
+
+typedef TRotTrackTag *PRotTrackTag;
+
+struct DECLSPEC_DRECORD TRotTrackTag
+{
+public:
+	TTrackHeader3DS TrackHdr;
+	TKeyHeaderList *KeyHdrList;
+	TKFRotKeyList *RotationList;
+};
+
+
+typedef TScaleTrackTag *PScaleTrackTag;
+
+struct DECLSPEC_DRECORD TScaleTrackTag
+{
+public:
+	TTrackHeader3DS TrackHdr;
+	TKeyHeaderList *KeyHdrList;
+	TPointList *ScaleList;
+};
+
+
+typedef TMorphTrackTag *PMorphTrackTag;
+
+struct DECLSPEC_DRECORD TMorphTrackTag
+{
+public:
+	TTrackHeader3DS TrackHdr;
+	TKeyHeaderList *KeyHdrList;
+	TKFMorphKeyList *MorphList;
+};
+
+
+typedef THideTrackTag *PHideTrackTag;
+
+struct DECLSPEC_DRECORD THideTrackTag
+{
+public:
+	TTrackHeader3DS TrackHdr;
+	TKeyHeaderList *KeyHdrList;
+};
+
+
+typedef TFovTrackTag *PFovTrackTag;
+
+struct DECLSPEC_DRECORD TFovTrackTag
+{
+public:
+	TTrackHeader3DS TrackHdr;
+	TKeyHeaderList *KeyHdrList;
+	TSingleList *FOVAngleList;
+};
+
+
+typedef TRollTrackTag *PRollTrackTag;
+
+struct DECLSPEC_DRECORD TRollTrackTag
+{
+public:
+	TTrackHeader3DS TrackHdr;
+	TKeyHeaderList *KeyHdrList;
+	TSingleList *RollAngleList;
+};
+
+
+typedef THotTrackTag *PHotTrackTag;
+
+struct DECLSPEC_DRECORD THotTrackTag
+{
+public:
+	TTrackHeader3DS TrackHdr;
+	TKeyHeaderList *KeyHdrList;
+	TSingleList *HotspotAngleList;
+};
+
+
+typedef TFallTrackTag *PFallTrackTag;
+
+struct DECLSPEC_DRECORD TFallTrackTag
+{
+public:
+	TTrackHeader3DS TrackHdr;
+	TKeyHeaderList *KeyHdrList;
+	TSingleList *FalloffAngleList;
+};
+
+
+typedef TXDataEntry *PXDataEntry;
+
+struct DECLSPEC_DRECORD TXDataEntry
+{
+public:
+	int Size;
+	void *Data;
+};
+
+
+typedef char * PXDataAppName;
+
+typedef char * PXDataString;
+
+typedef float *PXDataFloat;
+
+typedef float TXDataFloat;
+
+typedef double *PXDataDouble;
+
+typedef double TXDataDouble;
+
+typedef short *PXDataShort;
+
+typedef short TXDataShort;
+
+typedef int *PXDataLong;
+
+typedef int TXDataLong;
+
+typedef void * *PXDataVoid;
+
+typedef void * TXDataVoid;
+
+enum DECLSPEC_DENUM TReleaseLevel : unsigned int { rlRelease1, rlRelease2, rlRelease3, rlReleaseNotKnown };
+
+struct DECLSPEC_DRECORD TChunkData
+{
+	
+public:
+	union
+	{
+		struct 
+		{
+			void *Dummy;
+		};
+		struct 
+		{
+			THideTrackTag *HideTrackTag;
+		};
+		struct 
+		{
+			TFallTrackTag *FallTrackTag;
+		};
+		struct 
+		{
+			THotTrackTag *HotTrackTag;
+		};
+		struct 
+		{
+			TRollTrackTag *RollTrackTag;
+		};
+		struct 
+		{
+			TFovTrackTag *FovTrackTag;
+		};
+		struct 
+		{
+			TMorphTrackTag *MorphTrackTag;
+		};
+		struct 
+		{
+			TScaleTrackTag *ScaleTrackTag;
+		};
+		struct 
+		{
+			TRotTrackTag *RotTrackTag;
+		};
+		struct 
+		{
+			TColTrackTag *ColTrackTag;
+		};
+		struct 
+		{
+			TPosTrackTag *PosTrackTag;
+		};
+		struct 
+		{
+			TBoundBox *BoundBox;
+		};
+		struct 
+		{
+			float *MorphSmooth;
+		};
+		struct 
+		{
+			char *InstanceName;
+		};
+		struct 
+		{
+			TPoint3DS *Pivot;
+		};
+		struct 
+		{
+			TNodeHdr *NodeHdr;
+		};
+		struct 
+		{
+			short *KFId;
+		};
+		struct 
+		{
+			int *KFCurtime;
+		};
+		struct 
+		{
+			TKFSeg *KFSeg;
+		};
+		struct 
+		{
+			TKFHdr *KFHdr;
+		};
+		struct 
+		{
+			char *XDataString;
+		};
+		struct 
+		{
+			char *XDataAppName;
+		};
+		struct 
+		{
+			TXDataEntry *XDataEntry;
+		};
+		struct 
+		{
+			TViewportData *ViewportData;
+		};
+		struct 
+		{
+			TViewportSize *ViewportSize;
+		};
+		struct 
+		{
+			TViewportLayout *ViewportLayout;
+		};
+		struct 
+		{
+			TCamRanges *CamRanges;
+		};
+		struct 
+		{
+			TNCamera *NCamera;
+		};
+		struct 
+		{
+			float *DlRayBias;
+		};
+		struct 
+		{
+			char *DlSpotProjector;
+		};
+		struct 
+		{
+			float *DlSpotAspect;
+		};
+		struct 
+		{
+			float *DlSpotRoll;
+		};
+		struct 
+		{
+			TDlLocalShadow2 *DlLocalShadow2;
+		};
+		struct 
+		{
+			TDlSpotlight *DlSpotlight;
+		};
+		struct 
+		{
+			float *DlMultiplier;
+		};
+		struct 
+		{
+			float *DlOuterRange;
+		};
+		struct 
+		{
+			float *DlInnerRange;
+		};
+		struct 
+		{
+			char *DlExclude;
+		};
+		struct 
+		{
+			TPoint3DS *NDirectLight;
+		};
+		struct 
+		{
+			char *ProcName;
+		};
+		struct 
+		{
+			TMeshTextureInfo *MeshTextureInfo;
+		};
+		struct 
+		{
+			System::Byte *MeshColor;
+		};
+		struct 
+		{
+			TMeshMatrix *MeshMatrix;
+		};
+		struct 
+		{
+			TTexVerts *TexVerts;
+		};
+		struct 
+		{
+			TSmoothGroup *SmoothGroup;
+		};
+		struct 
+		{
+			TMshBoxmap *MshBoxmap;
+		};
+		struct 
+		{
+			TMshMatGroup *MshMatGroup;
+		};
+		struct 
+		{
+			TFaceArray *FaceArray;
+		};
+		struct 
+		{
+			TPointFlagArray *PointFlagArray;
+		};
+		struct 
+		{
+			TPointArray *PointArray;
+		};
+		struct 
+		{
+			char *NamedObject;
+		};
+		struct 
+		{
+			short *MatBumpPercent;
+		};
+		struct 
+		{
+			TColor24 *MatMapBCol;
+		};
+		struct 
+		{
+			TColor24 *MatMapGCol;
+		};
+		struct 
+		{
+			TColor24 *MatMapRCol;
+		};
+		struct 
+		{
+			TColor24 *MatMapCol2;
+		};
+		struct 
+		{
+			TColor24 *MatMapCol1;
+		};
+		struct 
+		{
+			float *MatMapAng;
+		};
+		struct 
+		{
+			float *MatMapVOffset;
+		};
+		struct 
+		{
+			float *MatMapUOffset;
+		};
+		struct 
+		{
+			float *MatMapVScale;
+		};
+		struct 
+		{
+			float *MatMapUScale;
+		};
+		struct 
+		{
+			float *MatMapTexblur;
+		};
+		struct 
+		{
+			System::Word *MatMapTiling;
+		};
+		struct 
+		{
+			float *MatWireSize;
+		};
+		struct 
+		{
+			TIpasData *IpasData;
+		};
+		struct 
+		{
+			TMatAcubic *MatAcubic;
+		};
+		struct 
+		{
+			short *MatShading;
+		};
+		struct 
+		{
+			char *MatName;
+		};
+		struct 
+		{
+			char *ViewCamera;
+		};
+		struct 
+		{
+			TViewUser *ViewUser;
+		};
+		struct 
+		{
+			TViewStandard *ViewStandard;
+		};
+		struct 
+		{
+			TDistanceCue *DistanceCue;
+		};
+		struct 
+		{
+			TLayerFog *LayerFog;
+		};
+		struct 
+		{
+			TFog *Fog;
+		};
+		struct 
+		{
+			float *VGradient;
+		};
+		struct 
+		{
+			char *BitMapName;
+		};
+		struct 
+		{
+			TPoint3DS *OConsts;
+		};
+		struct 
+		{
+			short *ShadowSamples;
+		};
+		struct 
+		{
+			short *ShadowMapSize;
+		};
+		struct 
+		{
+			float *RayBias;
+		};
+		struct 
+		{
+			float *HiShadowBias;
+		};
+		struct 
+		{
+			int *ShadowRange;
+		};
+		struct 
+		{
+			float *ShadowFilter;
+		};
+		struct 
+		{
+			float *LoShadowBias;
+		};
+		struct 
+		{
+			float *MasterScale;
+		};
+		struct 
+		{
+			int *MeshVersion;
+		};
+		struct 
+		{
+			unsigned *M3dVersion;
+		};
+		struct 
+		{
+			char *MatMapname;
+		};
+		struct 
+		{
+			float *FloatPercentage;
+		};
+		struct 
+		{
+			short *IntPercentage;
+		};
+		struct 
+		{
+			TColor24 *LinColor24;
+		};
+		struct 
+		{
+			TColor24 *Color24;
+		};
+		struct 
+		{
+			TColorF *LinColorF;
+		};
+		struct 
+		{
+			TColorF *ColorF;
+		};
+		
+	};
+};
+
+
+struct DECLSPEC_DRECORD TChunk3DS
+{
+public:
+	System::Word Tag;
+	unsigned Size;
+	unsigned Position;
+	TChunkData Data;
+	TChunk3DS *Sibling;
+	TChunk3DS *Children;
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace M3dstypes */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_M3DSTYPES)
+using namespace Formats::M3dstypes;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_M3dstypesHPP

+ 109 - 0
include/Win32/Formats.m3DSUtils.hpp

@@ -0,0 +1,109 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'Formats.m3DSUtils.pas' rev: 35.00 (Windows)
+
+#ifndef Formats_M3dsutilsHPP
+#define Formats_M3dsutilsHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <Formats.m3DS.hpp>
+#include <Formats.m3DSTypes.hpp>
+#include <Formats.m3DSConst.hpp>
+#include <GLS.Strings.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Formats
+{
+namespace M3dsutils
+{
+//-- forward type declarations -----------------------------------------------
+//-- type declarations -------------------------------------------------------
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE void __fastcall ShowError(const System::UnicodeString ErrorMessage);
+extern DELPHI_PACKAGE void __fastcall ShowErrorFormatted(const System::UnicodeString ErrorMessage, const System::TVarRec *Args, const int Args_High);
+extern DELPHI_PACKAGE Formats::M3dstypes::TMeshSet3DS __fastcall GetMeshSet(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE Formats::M3dstypes::TAtmosphere3DS __fastcall GetAtmosphere(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE Formats::M3dstypes::TBackground3DS __fastcall GetBackground(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE Formats::M3dstypes::TViewport3DS __fastcall GetViewport(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE System::UnicodeString __fastcall ChunkTagToString(System::Word Tag);
+extern DELPHI_PACKAGE void __fastcall ChunkHeaderReport(System::Classes::TStrings* &Strings, Formats::M3dstypes::PChunk3DS Chunk, int IndentLevel);
+extern DELPHI_PACKAGE void __fastcall DumpKeyHeader(System::Classes::TStrings* Strings, const Formats::M3dstypes::TKeyHeader3DS &Key, int IndentLevel);
+extern DELPHI_PACKAGE void __fastcall DumpChunk(Formats::M3ds::TFile3DS* const Source, System::Classes::TStrings* &Strings, Formats::M3dstypes::PChunk3DS Chunk, int IndentLevel, Formats::M3dstypes::TDumpLevel DumpLevel);
+extern DELPHI_PACKAGE void __fastcall AddChild(Formats::M3dstypes::PChunk3DS Parent, Formats::M3dstypes::PChunk3DS Child);
+extern DELPHI_PACKAGE void __fastcall AddChildOrdered(Formats::M3dstypes::PChunk3DS Parent, Formats::M3dstypes::PChunk3DS Child);
+extern DELPHI_PACKAGE Formats::M3dstypes::PChunk3DS __fastcall FindChunk(Formats::M3dstypes::PChunk3DS Top, System::Word Tag);
+extern DELPHI_PACKAGE Formats::M3dstypes::PChunk3DS __fastcall FindNextChunk(Formats::M3dstypes::PChunk3DS Local, System::Word Tag);
+extern DELPHI_PACKAGE void __fastcall FreeChunkData(Formats::M3dstypes::PChunk3DS &Chunk);
+extern DELPHI_PACKAGE void __fastcall InitChunk(Formats::M3dstypes::PChunk3DS &Chunk);
+extern DELPHI_PACKAGE void __fastcall ReleaseChunk(Formats::M3dstypes::PChunk3DS &Chunk);
+extern DELPHI_PACKAGE void __fastcall ReleaseChunkList(Formats::M3dstypes::PChunkList3DS &List);
+extern DELPHI_PACKAGE int __fastcall GetMaterialCount(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE void __fastcall ReleaseMaterial(Formats::M3dstypes::PMaterial3DS Mat);
+extern DELPHI_PACKAGE Formats::M3dstypes::PChunk3DS __fastcall FindNamedObjectByIndex(Formats::M3ds::TFile3DS* Source, const Formats::M3dstypes::TDatabase3DS &DB, System::Word AType, int Index);
+extern DELPHI_PACKAGE void __fastcall DeleteChunk(Formats::M3dstypes::PChunk3DS &Chunk);
+extern DELPHI_PACKAGE int __fastcall GetChunkValue(System::Word Tag);
+extern DELPHI_PACKAGE Formats::M3dstypes::TMaterial3DS __fastcall GetMaterialByIndex(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, int Index);
+extern DELPHI_PACKAGE int __fastcall GetMeshCount(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE void __fastcall ReleaseMeshObj(Formats::M3dstypes::PMesh3DS Mesh);
+extern DELPHI_PACKAGE Formats::M3dstypes::TMesh3DS __fastcall GetMeshByIndex(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, int Index);
+extern DELPHI_PACKAGE int __fastcall GetOmnilightCount(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE int __fastcall GetSpotlightCount(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE void __fastcall ReleaseLight(Formats::M3dstypes::PLight3DS Light);
+extern DELPHI_PACKAGE Formats::M3dstypes::TLight3DS __fastcall GetOmnilightByIndex(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, int Index);
+extern DELPHI_PACKAGE Formats::M3dstypes::TLight3DS __fastcall GetSpotlightByIndex(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, int Index);
+extern DELPHI_PACKAGE void __fastcall ReleaseCamera(Formats::M3dstypes::PCamera3DS Camera);
+extern DELPHI_PACKAGE int __fastcall GetCameraCount(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE Formats::M3dstypes::TCamera3DS __fastcall GetCameraByIndex(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, int Index);
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFSets3DS __fastcall GetKFSettings(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE void __fastcall ReleaseCameraMotion(Formats::M3dstypes::PKFCamera3DS Camera);
+extern DELPHI_PACKAGE void __fastcall GetCameraNodeNameList(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, System::Classes::TStringList* List);
+extern DELPHI_PACKAGE int __fastcall GetCameraNodeCount(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFCamera3DS __fastcall GetCameraMotion(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::PChunk3DS CamChunk, Formats::M3dstypes::PChunk3DS TargetChunk);
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFCamera3DS __fastcall GetCameraMotionByIndex(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, int Index);
+extern DELPHI_PACKAGE void __fastcall ReleaseAmbientLightMotion(Formats::M3dstypes::PKFAmbient3DS Light);
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFAmbient3DS __fastcall GetAmbientLightMotion(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE void __fastcall InitObjectMotion(Formats::M3dstypes::TKFMesh3DS &Obj, unsigned NewNPKeys, unsigned NewNRKeys, unsigned NewNSKeys, unsigned NewNMKeys, unsigned NewNHKeys);
+extern DELPHI_PACKAGE void __fastcall ReleaseObjectMotion(Formats::M3dstypes::PKFMesh3DS Obj);
+extern DELPHI_PACKAGE int __fastcall GetObjectNodeCount(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE void __fastcall GetObjectNodeNameList(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, System::Classes::TStringList* List);
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFMesh3DS __fastcall GetObjectMotionByName(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, const System::UnicodeString Name);
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFMesh3DS __fastcall GetObjectMotionByIndex(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, unsigned Index);
+extern DELPHI_PACKAGE void __fastcall ReleaseOmnilightMotion(Formats::M3dstypes::PKFOmni3DS Light);
+extern DELPHI_PACKAGE unsigned __fastcall GetOmnilightNodeCount(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE void __fastcall GetOmnilightNodeNameList(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, System::Classes::TStringList* List);
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFOmni3DS __fastcall GetOmnilightMotionByName(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, const System::UnicodeString Name);
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFOmni3DS __fastcall GetOmnilightMotionByIndex(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, unsigned Index);
+extern DELPHI_PACKAGE void __fastcall ReleaseSpotlightMotion(Formats::M3dstypes::PKFSpot3DS Spot);
+extern DELPHI_PACKAGE unsigned __fastcall GetSpotlightNodeCount(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE void __fastcall GetSpotlightNodeNameList(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, System::Classes::TStringList* List);
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFSpot3DS __fastcall GetSpotlightMotionByName(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, const System::UnicodeString Name);
+extern DELPHI_PACKAGE Formats::M3dstypes::TKFSpot3DS __fastcall GetSpotlightMotionByIndex(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB, unsigned Index);
+extern DELPHI_PACKAGE Formats::M3dstypes::TReleaseLevel __fastcall GetM3dMagicRelease(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE Formats::M3dstypes::TReleaseLevel __fastcall GetMeshRelease(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE Formats::M3dstypes::TReleaseLevel __fastcall GetKfRelease(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+extern DELPHI_PACKAGE Formats::M3dstypes::TReleaseLevel __fastcall GetDatabaseRelease(Formats::M3ds::TFile3DS* const Source, Formats::M3dstypes::TDatabase3DS &DB);
+}	/* namespace M3dsutils */
+}	/* namespace Formats */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_M3DSUTILS)
+using namespace Formats::M3dsutils;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
+using namespace Formats;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Formats_M3dsutilsHPP

+ 127 - 0
include/Win32/GLS.AVIRecorder.hpp

@@ -0,0 +1,127 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'GLS.AVIRecorder.pas' rev: 35.00 (Windows)
+
+#ifndef Gls_AvirecorderHPP
+#define Gls_AvirecorderHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.UITypes.hpp>
+#include <Vcl.Controls.hpp>
+#include <Vcl.Forms.hpp>
+#include <Vcl.ExtCtrls.hpp>
+#include <Vcl.Graphics.hpp>
+#include <Vcl.Dialogs.hpp>
+#include <Formats.VFW.hpp>
+#include <GLS.Graphics.hpp>
+#include <GLS.Scene.hpp>
+#include <GLS.SceneViewer.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Gls
+{
+namespace Avirecorder
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLAVIRecorder;
+//-- type declarations -------------------------------------------------------
+enum DECLSPEC_DENUM TAVICompressor : unsigned char { acDefault, acShowDialog, acDivX };
+
+typedef Formats::Vfw::_di_IAVIStream *PAVIStream;
+
+enum DECLSPEC_DENUM TAVISizeRestriction : unsigned char { srNoRestriction, srForceBlock2x2, srForceBlock4x4, srForceBlock8x8 };
+
+enum DECLSPEC_DENUM TAVIRecorderState : unsigned char { rsNone, rsRecording };
+
+enum DECLSPEC_DENUM TAVIImageRetrievalMode : unsigned char { irmSnapShot, irmRenderToBitmap, irmBitBlt };
+
+typedef void __fastcall (__closure *TAVIRecorderPostProcessEvent)(System::TObject* Sender, Vcl::Graphics::TBitmap* frame);
+
+class PASCALIMPLEMENTATION TGLAVIRecorder : public System::Classes::TComponent
+{
+	typedef System::Classes::TComponent inherited;
+	
+private:
+	Vcl::Graphics::TBitmap* AVIBitmap;
+	int AVIFrameIndex;
+	int AVI_DPI;
+	Formats::Vfw::TAVIStreamInfoW asi;
+	Formats::Vfw::_di_IAVIFile pfile;
+	Formats::Vfw::_di_IAVIStream Stream;
+	Formats::Vfw::_di_IAVIStream Stream_c;
+	tagBITMAPINFOHEADER *FBitmapInfo;
+	void *FBitmapBits;
+	unsigned FBitmapSize;
+	System::UnicodeString FTempName;
+	System::UnicodeString FAVIFilename;
+	System::Byte FFPS;
+	int FWidth;
+	int FHeight;
+	TAVISizeRestriction FSizeRestriction;
+	TAVIImageRetrievalMode FImageRetrievalMode;
+	TAVIRecorderState RecorderState;
+	TAVIRecorderPostProcessEvent FOnPostProcessEvent;
+	Gls::Scene::TGLSceneBuffer* FBuffer;
+	void __fastcall SetHeight(const int val);
+	void __fastcall SetWidth(const int val);
+	void __fastcall SetSizeRestriction(const TAVISizeRestriction val);
+	void __fastcall SetGLSceneViewer(Gls::Sceneviewer::TGLSceneViewer* const Value);
+	void __fastcall SetGLNonVisualViewer(Gls::Scene::TGLNonVisualViewer* const Value);
+	
+protected:
+	Gls::Sceneviewer::TGLSceneViewer* FGLSceneViewer;
+	Gls::Scene::TGLNonVisualViewer* FGLNonVisualViewer;
+	TAVICompressor FCompressor;
+	int __fastcall Restricted(int s);
+	void __fastcall InternalAddAVIFrame();
+	
+public:
+	__fastcall virtual TGLAVIRecorder(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TGLAVIRecorder();
+	bool __fastcall CreateAVIFile(int DPI = 0x0);
+	void __fastcall AddAVIFrame()/* overload */;
+	void __fastcall AddAVIFrame(Vcl::Graphics::TBitmap* bmp)/* overload */;
+	void __fastcall CloseAVIFile(bool UserAbort = false);
+	bool __fastcall Recording();
+	
+__published:
+	__property System::Byte FPS = {read=FFPS, write=FFPS, default=25};
+	__property Gls::Sceneviewer::TGLSceneViewer* GLSceneViewer = {read=FGLSceneViewer, write=SetGLSceneViewer};
+	__property Gls::Scene::TGLNonVisualViewer* GLNonVisualViewer = {read=FGLNonVisualViewer, write=SetGLNonVisualViewer};
+	__property int Width = {read=FWidth, write=SetWidth, nodefault};
+	__property int Height = {read=FHeight, write=SetHeight, nodefault};
+	__property System::UnicodeString Filename = {read=FAVIFilename, write=FAVIFilename};
+	__property TAVICompressor Compressor = {read=FCompressor, write=FCompressor, default=0};
+	__property TAVISizeRestriction SizeRestriction = {read=FSizeRestriction, write=SetSizeRestriction, default=3};
+	__property TAVIImageRetrievalMode ImageRetrievalMode = {read=FImageRetrievalMode, write=FImageRetrievalMode, default=2};
+	__property TAVIRecorderPostProcessEvent OnPostProcessEvent = {read=FOnPostProcessEvent, write=FOnPostProcessEvent};
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Avirecorder */
+}	/* namespace Gls */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_GLS_AVIRECORDER)
+using namespace Gls::Avirecorder;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_GLS)
+using namespace Gls;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Gls_AvirecorderHPP

+ 305 - 0
include/Win32/GLS.AnimatedSprite.hpp

@@ -0,0 +1,305 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'GLS.AnimatedSprite.pas' rev: 35.00 (Windows)
+
+#ifndef Gls_AnimatedspriteHPP
+#define Gls_AnimatedspriteHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.OpenGL.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Math.hpp>
+#include <GLS.OpenGLTokens.hpp>
+#include <GLS.Scene.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.VectorGeometry.hpp>
+#include <GLS.Material.hpp>
+#include <GLS.PersistentClasses.hpp>
+#include <GLS.XCollection.hpp>
+#include <GLS.RenderContextInfo.hpp>
+#include <GLS.BaseClasses.hpp>
+#include <GLS.Context.hpp>
+#include <GLS.State.hpp>
+#include <GLS.Coordinates.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Gls
+{
+namespace Animatedsprite
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLSpriteAnimFrame;
+class DELPHICLASS TGLSpriteAnimFrameList;
+class DELPHICLASS TGLSpriteAnimMargins;
+class DELPHICLASS TGLSpriteAnimation;
+class DELPHICLASS TGLSpriteAnimationList;
+class DELPHICLASS TGLAnimatedSprite;
+//-- type declarations -------------------------------------------------------
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TGLSpriteAnimFrame : public Gls::Xcollection::TXCollectionItem
+{
+	typedef Gls::Xcollection::TXCollectionItem inherited;
+	
+private:
+	int FOffsetX;
+	int FOffsetY;
+	int FWidth;
+	int FHeight;
+	void __fastcall DoChanged();
+	
+protected:
+	void __fastcall SetOffsetX(const int Value);
+	void __fastcall SetOffsetY(const int Value);
+	void __fastcall SetWidth(const int Value);
+	void __fastcall SetHeight(const int Value);
+	virtual void __fastcall WriteToFiler(System::Classes::TWriter* writer);
+	virtual void __fastcall ReadFromFiler(System::Classes::TReader* reader);
+	
+public:
+	__classmethod virtual System::UnicodeString __fastcall FriendlyName();
+	__classmethod virtual System::UnicodeString __fastcall FriendlyDescription();
+	
+__published:
+	__property int OffsetX = {read=FOffsetX, write=SetOffsetX, nodefault};
+	__property int OffsetY = {read=FOffsetY, write=SetOffsetY, nodefault};
+	__property int Width = {read=FWidth, write=SetWidth, nodefault};
+	__property int Height = {read=FHeight, write=SetHeight, nodefault};
+public:
+	/* TXCollectionItem.Create */ inline __fastcall virtual TGLSpriteAnimFrame(Gls::Xcollection::TXCollection* aOwner) : Gls::Xcollection::TXCollectionItem(aOwner) { }
+	/* TXCollectionItem.Destroy */ inline __fastcall virtual ~TGLSpriteAnimFrame() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TGLSpriteAnimFrameList : public Gls::Xcollection::TXCollection
+{
+	typedef Gls::Xcollection::TXCollection inherited;
+	
+public:
+	__fastcall virtual TGLSpriteAnimFrameList(System::Classes::TPersistent* aOwner);
+	__classmethod virtual Gls::Xcollection::TXCollectionItemClass __fastcall ItemsClass();
+public:
+	/* TXCollection.Destroy */ inline __fastcall virtual ~TGLSpriteAnimFrameList() { }
+	
+};
+
+#pragma pack(pop)
+
+enum DECLSPEC_DENUM TGLSpriteFrameDimensions : unsigned char { sfdAuto, sfdManual };
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TGLSpriteAnimMargins : public System::Classes::TPersistent
+{
+	typedef System::Classes::TPersistent inherited;
+	
+private:
+	TGLSpriteAnimation* FOwner;
+	int FLeft;
+	int FTop;
+	int FRight;
+	int FBottom;
+	
+protected:
+	void __fastcall SetLeft(const int Value);
+	void __fastcall SetTop(const int Value);
+	void __fastcall SetRight(const int Value);
+	void __fastcall SetBottom(const int Value);
+	void __fastcall DoChanged();
+	
+public:
+	__fastcall TGLSpriteAnimMargins(TGLSpriteAnimation* Animation);
+	__property TGLSpriteAnimation* Owner = {read=FOwner};
+	
+__published:
+	__property int Left = {read=FLeft, write=SetLeft, nodefault};
+	__property int Top = {read=FTop, write=SetTop, nodefault};
+	__property int Right = {read=FRight, write=SetRight, nodefault};
+	__property int Bottom = {read=FBottom, write=SetBottom, nodefault};
+public:
+	/* TPersistent.Destroy */ inline __fastcall virtual ~TGLSpriteAnimMargins() { }
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TGLSpriteAnimation : public Gls::Xcollection::TXCollectionItem
+{
+	typedef Gls::Xcollection::TXCollectionItem inherited;
+	
+private:
+	int FCurrentFrame;
+	int FStartFrame;
+	int FEndFrame;
+	int FFrameWidth;
+	int FFrameHeight;
+	int FInterval;
+	TGLSpriteAnimFrameList* FFrames;
+	System::UnicodeString FLibMaterialName;
+	Gls::Material::TGLLibMaterial* FLibMaterialCached;
+	TGLSpriteFrameDimensions FDimensions;
+	TGLSpriteAnimMargins* FMargins;
+	void __fastcall DoChanged();
+	
+protected:
+	void __fastcall SetCurrentFrame(const int Value);
+	void __fastcall SetFrameWidth(const int Value);
+	void __fastcall SetFrameHeight(const int Value);
+	virtual void __fastcall WriteToFiler(System::Classes::TWriter* writer);
+	virtual void __fastcall ReadFromFiler(System::Classes::TReader* reader);
+	void __fastcall SetDimensions(const TGLSpriteFrameDimensions Value);
+	void __fastcall SetLibMaterialName(const System::UnicodeString val);
+	Gls::Material::TGLLibMaterial* __fastcall GetLibMaterialCached();
+	void __fastcall SetInterval(const int Value);
+	void __fastcall SetFrameRate(const float Value);
+	float __fastcall GetFrameRate();
+	Gls::Material::TGLAbstractMaterialLibrary* __fastcall GetMaterialLibrary();
+	
+public:
+	__fastcall virtual TGLSpriteAnimation(Gls::Xcollection::TXCollection* aOwner);
+	__fastcall virtual ~TGLSpriteAnimation();
+	__classmethod virtual System::UnicodeString __fastcall FriendlyName();
+	__classmethod virtual System::UnicodeString __fastcall FriendlyDescription();
+	__property Gls::Material::TGLLibMaterial* LibMaterialCached = {read=GetLibMaterialCached};
+	
+__published:
+	__property int CurrentFrame = {read=FCurrentFrame, write=SetCurrentFrame, nodefault};
+	__property int StartFrame = {read=FStartFrame, write=FStartFrame, nodefault};
+	__property int EndFrame = {read=FEndFrame, write=FEndFrame, nodefault};
+	__property int FrameWidth = {read=FFrameWidth, write=SetFrameWidth, nodefault};
+	__property int FrameHeight = {read=FFrameHeight, write=SetFrameHeight, nodefault};
+	__property System::UnicodeString LibMaterialName = {read=FLibMaterialName, write=SetLibMaterialName};
+	__property TGLSpriteAnimFrameList* Frames = {read=FFrames};
+	__property TGLSpriteFrameDimensions Dimensions = {read=FDimensions, write=SetDimensions, nodefault};
+	__property int Interval = {read=FInterval, write=SetInterval, nodefault};
+	__property float FrameRate = {read=GetFrameRate, write=SetFrameRate};
+	__property TGLSpriteAnimMargins* Margins = {read=FMargins};
+private:
+	void *__IGLMaterialLibrarySupported;	// Gls::Material::IGLMaterialLibrarySupported 
+	
+public:
+	#if defined(MANAGED_INTERFACE_OPERATORS)
+	// {8E442AF9-D212-4A5E-8A88-92F798BABFD1}
+	operator Gls::Material::_di_IGLMaterialLibrarySupported()
+	{
+		Gls::Material::_di_IGLMaterialLibrarySupported intf;
+		this->GetInterface(intf);
+		return intf;
+	}
+	#else
+	operator Gls::Material::IGLMaterialLibrarySupported*(void) { return (Gls::Material::IGLMaterialLibrarySupported*)&__IGLMaterialLibrarySupported; }
+	#endif
+	
+};
+
+#pragma pack(pop)
+
+#pragma pack(push,4)
+class PASCALIMPLEMENTATION TGLSpriteAnimationList : public Gls::Xcollection::TXCollection
+{
+	typedef Gls::Xcollection::TXCollection inherited;
+	
+public:
+	__fastcall virtual TGLSpriteAnimationList(System::Classes::TPersistent* aOwner);
+	__classmethod virtual Gls::Xcollection::TXCollectionItemClass __fastcall ItemsClass();
+public:
+	/* TXCollection.Destroy */ inline __fastcall virtual ~TGLSpriteAnimationList() { }
+	
+};
+
+#pragma pack(pop)
+
+enum DECLSPEC_DENUM TGLSpriteAnimationMode : unsigned char { samNone, samPlayOnce, samLoop, samBounceForward, samBounceBackward, samLoopBackward };
+
+class PASCALIMPLEMENTATION TGLAnimatedSprite : public Gls::Scene::TGLBaseSceneObject
+{
+	typedef Gls::Scene::TGLBaseSceneObject inherited;
+	
+private:
+	TGLSpriteAnimationList* FAnimations;
+	Gls::Material::TGLMaterialLibrary* FMaterialLibrary;
+	int FAnimationIndex;
+	int FInterval;
+	int FRotation;
+	int FPixelRatio;
+	bool FMirrorU;
+	bool FMirrorV;
+	TGLSpriteAnimationMode FAnimationMode;
+	double FCurrentFrameDelta;
+	System::Classes::TNotifyEvent FOnFrameChanged;
+	System::Classes::TNotifyEvent FOnEndFrameReached;
+	System::Classes::TNotifyEvent FOnStartFrameReached;
+	
+protected:
+	virtual void __fastcall DefineProperties(System::Classes::TFiler* Filer);
+	void __fastcall WriteAnimations(System::Classes::TStream* Stream);
+	void __fastcall ReadAnimations(System::Classes::TStream* Stream);
+	virtual void __fastcall Notification(System::Classes::TComponent* AComponent, System::Classes::TOperation Operation);
+	void __fastcall SetInterval(const int val);
+	void __fastcall SetAnimationIndex(const int val);
+	void __fastcall SetAnimationMode(const TGLSpriteAnimationMode val);
+	void __fastcall SetMaterialLibrary(Gls::Material::TGLMaterialLibrary* const val);
+	void __fastcall SetPixelRatio(const int val);
+	HIDESBASE void __fastcall SetRotation(const int val);
+	void __fastcall SetMirrorU(const bool val);
+	void __fastcall SetMirrorV(const bool val);
+	void __fastcall SetFrameRate(const float Value);
+	float __fastcall GetFrameRate();
+	
+public:
+	__fastcall virtual TGLAnimatedSprite(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TGLAnimatedSprite();
+	virtual void __fastcall BuildList(Gls::Rendercontextinfo::TGLRenderContextInfo &rci);
+	virtual void __fastcall DoProgress(const Gls::Baseclasses::TGLProgressTimes &progressTime);
+	void __fastcall NextFrame();
+	
+__published:
+	__property TGLSpriteAnimationList* Animations = {read=FAnimations};
+	__property Gls::Material::TGLMaterialLibrary* MaterialLibrary = {read=FMaterialLibrary, write=SetMaterialLibrary};
+	__property int Interval = {read=FInterval, write=SetInterval, nodefault};
+	__property int AnimationIndex = {read=FAnimationIndex, write=SetAnimationIndex, nodefault};
+	__property TGLSpriteAnimationMode AnimationMode = {read=FAnimationMode, write=SetAnimationMode, nodefault};
+	__property int PixelRatio = {read=FPixelRatio, write=SetPixelRatio, nodefault};
+	__property int Rotation = {read=FRotation, write=SetRotation, nodefault};
+	__property bool MirrorU = {read=FMirrorU, write=SetMirrorU, nodefault};
+	__property bool MirrorV = {read=FMirrorV, write=SetMirrorV, nodefault};
+	__property float FrameRate = {read=GetFrameRate, write=SetFrameRate};
+	__property Position;
+	__property Scale;
+	__property Visible = {default=1};
+	__property System::Classes::TNotifyEvent OnFrameChanged = {read=FOnFrameChanged, write=FOnFrameChanged};
+	__property System::Classes::TNotifyEvent OnEndFrameReached = {read=FOnEndFrameReached, write=FOnEndFrameReached};
+	__property System::Classes::TNotifyEvent OnStartFrameReached = {read=FOnStartFrameReached, write=FOnStartFrameReached};
+public:
+	/* TGLBaseSceneObject.CreateAsChild */ inline __fastcall TGLAnimatedSprite(Gls::Scene::TGLBaseSceneObject* aParentOwner) : Gls::Scene::TGLBaseSceneObject(aParentOwner) { }
+	
+};
+
+
+//-- var, const, procedure ---------------------------------------------------
+}	/* namespace Animatedsprite */
+}	/* namespace Gls */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_GLS_ANIMATEDSPRITE)
+using namespace Gls::Animatedsprite;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_GLS)
+using namespace Gls;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Gls_AnimatedspriteHPP

+ 51 - 0
include/Win32/GLS.AnimationUtils.hpp

@@ -0,0 +1,51 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'GLS.AnimationUtils.pas' rev: 35.00 (Windows)
+
+#ifndef Gls_AnimationutilsHPP
+#define Gls_AnimationutilsHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <System.SysUtils.hpp>
+#include <System.Classes.hpp>
+#include <System.Math.hpp>
+#include <GLS.VectorTypes.hpp>
+#include <GLS.VectorGeometry.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Gls
+{
+namespace Animationutils
+{
+//-- forward type declarations -----------------------------------------------
+//-- type declarations -------------------------------------------------------
+enum DECLSPEC_DENUM TEaseType : unsigned char { etLinear, etQuadIn, etQuadOut, etQuadInOut, etQuadOutIn, etCubicIn, etCubicOut, etCubicInOut, etCubicOutIn, etQuintIn, etQuintOut, etQuintInOut, etQuintOutIn, etSineIn, etSineOut, etSineInOut, etSineOutIn, etCircIn, etCircOut, etCircInOut, etCircOutIn, etExpoIn, etExpoOut, etExpoInOut, etExpoOutIn, etElasticIn, etElasticOut, etElasticInOut, etElasticOutIn, etBackIn, etBackOut, etBackInOut, etBackOutIn, etBounceIn, etBounceOut, etBounceInOut, etBounceOutIn };
+
+//-- var, const, procedure ---------------------------------------------------
+extern DELPHI_PACKAGE Gls::Vectortypes::TVector3f __fastcall Tweener(const Gls::Vectortypes::TVector3f &Current, const Gls::Vectortypes::TVector3f &Target, float Time, float Duration, TEaseType EaseType)/* overload */;
+extern DELPHI_PACKAGE Gls::Vectortypes::TVector4f __fastcall Tweener(const Gls::Vectortypes::TVector4f &Current, const Gls::Vectortypes::TVector4f &Target, float Time, float Duration, TEaseType EaseType)/* overload */;
+extern DELPHI_PACKAGE Gls::Vectortypes::TVector2f __fastcall Tweener(const Gls::Vectortypes::TVector2f &Current, const Gls::Vectortypes::TVector2f &Target, float Time, float Duration, TEaseType EaseType)/* overload */;
+extern DELPHI_PACKAGE float __fastcall Tweener(float Current, float Target, float Time, float Duration, TEaseType EaseType)/* overload */;
+}	/* namespace Animationutils */
+}	/* namespace Gls */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_GLS_ANIMATIONUTILS)
+using namespace Gls::Animationutils;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_GLS)
+using namespace Gls;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Gls_AnimationutilsHPP

+ 120 - 0
include/Win32/GLS.ApplicationFileIO.hpp

@@ -0,0 +1,120 @@
+// CodeGear C++Builder
+// Copyright (c) 1995, 2022 by Embarcadero Technologies, Inc.
+// All rights reserved
+
+// (DO NOT EDIT: machine generated header) 'GLS.ApplicationFileIO.pas' rev: 35.00 (Windows)
+
+#ifndef Gls_ApplicationfileioHPP
+#define Gls_ApplicationfileioHPP
+
+#pragma delphiheader begin
+#pragma option push
+#pragma option -w-      // All warnings off
+#pragma option -Vx      // Zero-length empty class member 
+#pragma pack(push,8)
+#include <System.hpp>
+#include <SysInit.hpp>
+#include <Winapi.Windows.hpp>
+#include <System.Classes.hpp>
+#include <System.SysUtils.hpp>
+#include <GLS.BaseClasses.hpp>
+#include <GLS.Strings.hpp>
+#include <GLS.Logger.hpp>
+
+//-- user supplied -----------------------------------------------------------
+
+namespace Gls
+{
+namespace Applicationfileio
+{
+//-- forward type declarations -----------------------------------------------
+class DELPHICLASS TGLApplicationFileIO;
+class DELPHICLASS TGLDataFile;
+//-- type declarations -------------------------------------------------------
+enum DECLSPEC_DENUM TGLApplicationResource : unsigned char { aresNone, aresSplash, aresTexture, aresMaterial, aresSampler, aresFont, aresMesh };
+
+typedef System::Classes::TStream* __fastcall (*TAFIOCreateFileStream)(const System::UnicodeString fileName, System::Word mode);
+
+typedef bool __fastcall (*TAFIOFileStreamExists)(const System::UnicodeString fileName);
+
+typedef void __fastcall (__closure *TAFIOFileStreamEvent)(const System::UnicodeString fileName, System::Word mode, System::Classes::TStream* &Stream);
+
+typedef bool __fastcall (__closure *TAFIOFileStreamExistsEvent)(const System::UnicodeString fileName);
+
+class PASCALIMPLEMENTATION TGLApplicationFileIO : public System::Classes::TComponent
+{
+	typedef System::Classes::TComponent inherited;
+	
+private:
+	TAFIOFileStreamEvent FOnFileStream;
+	TAFIOFileStreamExistsEvent FOnFileStreamExists;
+	
+public:
+	__fastcall virtual TGLApplicationFileIO(System::Classes::TComponent* AOwner);
+	__fastcall virtual ~TGLApplicationFileIO();
+	
+__published:
+	__property TAFIOFileStreamEvent OnFileStream = {read=FOnFileStream, write=FOnFileStream};
+	__property TAFIOFileStreamExistsEvent OnFileStreamExists = {read=FOnFileStreamExists, write=FOnFileStreamExists};
+};
+
+
+enum DECLSPEC_DENUM TGLDataFileCapability : unsigned char { dfcRead, dfcWrite };
+
+typedef System::Set<TGLDataFileCapability, TGLDataFileCapability::dfcRead, TGLDataFileCapability::dfcWrite> TGLDataFileCapabilities;
+
+class PASCALIMPLEMENTATION TGLDataFile : public Gls::Baseclasses::TGLUpdateAbleObject
+{
+	typedef Gls::Baseclasses::TGLUpdateAbleObject inherited;
+	
+private:
+	System::UnicodeString FResourceName;
+	void __fastcall SetResourceName(const System::UnicodeString AName);
+	
+public:
+	__classmethod virtual TGLDataFileCapabilities __fastcall Capabilities();
+	virtual TGLDataFile* __fastcall CreateCopy(System::Classes::TPersistent* AOwner);
+	virtual void __fastcall LoadFromFile(const System::UnicodeString fileName);
+	virtual void __fastcall SaveToFile(const System::UnicodeString fileName);
+	virtual void __fastcall LoadFromStream(System::Classes::TStream* Stream);
+	virtual void __fastcall SaveToStream(System::Classes::TStream* Stream);
+	virtual void __fastcall Initialize();
+	__property System::UnicodeString ResourceName = {read=FResourceName, write=SetResourceName};
+public:
+	/* TGLUpdateAbleObject.Create */ inline __fastcall virtual TGLDataFile(System::Classes::TPersistent* AOwner) : Gls::Baseclasses::TGLUpdateAbleObject(AOwner) { }
+	
+public:
+	/* TPersistent.Destroy */ inline __fastcall virtual ~TGLDataFile() { }
+	
+};
+
+
+typedef System::TMetaClass* TGLDataFileClass;
+
+typedef System::Classes::TResourceStream TGLResourceStream;
+
+//-- var, const, procedure ---------------------------------------------------
+#define GLS_RC_DDS_Type (System::WideChar *)(0xa)
+#define GLS_RC_JPG_Type (System::WideChar *)(0xa)
+#define GLS_RC_XML_Type (System::WideChar *)(0xa)
+#define GLS_RC_String_Type (System::WideChar *)(0xa)
+extern DELPHI_PACKAGE TAFIOCreateFileStream vAFIOCreateFileStream;
+extern DELPHI_PACKAGE TAFIOFileStreamExists vAFIOFileStreamExists;
+extern DELPHI_PACKAGE bool __fastcall ApplicationFileIODefined(void);
+extern DELPHI_PACKAGE bool __fastcall FileStreamExists(const System::UnicodeString fileName);
+extern DELPHI_PACKAGE System::Classes::TResourceStream* __fastcall CreateResourceStream(const System::UnicodeString ResName, System::WideChar * ResType);
+extern DELPHI_PACKAGE TGLApplicationResource __fastcall StrToGLSResType(const System::UnicodeString AStrRes);
+}	/* namespace Applicationfileio */
+}	/* namespace Gls */
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_GLS_APPLICATIONFILEIO)
+using namespace Gls::Applicationfileio;
+#endif
+#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_GLS)
+using namespace Gls;
+#endif
+#pragma pack(pop)
+#pragma option pop
+
+#pragma delphiheader end.
+//-- end unit ----------------------------------------------------------------
+#endif	// Gls_ApplicationfileioHPP

Some files were not shown because too many files changed in this diff