浏览代码

Added DeleteProgram ans DeleteShader in OpenGLAdapter unit

GLScene 5 年之前
父节点
当前提交
9824587ec7

+ 2 - 4
Demos/Delphi/graph/fxy/Unit1.pas

@@ -3,7 +3,6 @@ unit Unit1;
 interface
 interface
 
 
 uses
 uses
-  Winapi.OpenGL,
   System.SysUtils,
   System.SysUtils,
   System.Classes,
   System.Classes,
   System.Math,
   System.Math,
@@ -57,17 +56,16 @@ type
       WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
       WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
     procedure HeightField1GetHeight(const x, y: Single; var z: Single;
     procedure HeightField1GetHeight(const x, y: Single; var z: Single;
       var Color: TVector4f; var TexPoint: TTexPoint);
       var Color: TVector4f; var TexPoint: TTexPoint);
-  private
-     
   public
   public
-     
     mx, my : Integer;
     mx, my : Integer;
   end;
   end;
 
 
 var
 var
   Form1: TForm1;
   Form1: TForm1;
 
 
+//----------------------------------
 implementation
 implementation
+//----------------------------------
 
 
 {$R *.DFM}
 {$R *.DFM}
 
 

+ 5 - 5
Demos/Delphi/graph/fxy/fxy.dproj

@@ -8,7 +8,7 @@
         <AppType>Application</AppType>
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>19.0</ProjectVersion>
         <ProjectVersion>19.0</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>
@@ -150,10 +150,10 @@
                     <Source Name="MainSource">fxy.dpr</Source>
                     <Source Name="MainSource">fxy.dpr</Source>
                 </Source>
                 </Source>
                 <Excluded_Packages>
                 <Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k270.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp270.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k270.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp270.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k260.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp260.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
                 </Excluded_Packages>
                 </Excluded_Packages>
             </Delphi.Personality>
             </Delphi.Personality>
             <Platforms>
             <Platforms>

+ 5 - 4
Demos/Delphi/rendering/Blur/Blur.dproj

@@ -123,6 +123,7 @@
         <VerInfo_Locale>1033</VerInfo_Locale>
         <VerInfo_Locale>1033</VerInfo_Locale>
         <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
         <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
         <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
         <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
+        <DCC_UnitSearchPath>..\..\..\..\Source;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
     </PropertyGroup>
     </PropertyGroup>
     <ItemGroup>
     <ItemGroup>
         <DelphiCompile Include="$(MainSource)">
         <DelphiCompile Include="$(MainSource)">
@@ -152,10 +153,10 @@
                     <Source Name="MainSource">Blur.dpr</Source>
                     <Source Name="MainSource">Blur.dpr</Source>
                 </Source>
                 </Source>
                 <Excluded_Packages>
                 <Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k250.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp250.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k250.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp250.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k260.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp260.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
                 </Excluded_Packages>
                 </Excluded_Packages>
             </Delphi.Personality>
             </Delphi.Personality>
             <Platforms>
             <Platforms>

+ 1 - 1
Demos/Delphi/rendering/Blur/Unit1.pas

@@ -76,7 +76,7 @@ var
   I : Integer;
   I : Integer;
 
 
 begin
 begin
- //SetGLSceneMediaDir();
+  SetGLSceneMediaDir();
   MediaPath := ExtractFilePath(ParamStr(0));
   MediaPath := ExtractFilePath(ParamStr(0));
   I := Pos('Samples', MediaPath);
   I := Pos('Samples', MediaPath);
   if (I <> 0) then
   if (I <> 0) then

+ 22 - 22
Demos/Delphi/rendering/lining/lining.dpr → Demos/Delphi/rendering/LiningShaders/LiningShaders.dpr

@@ -1,22 +1,22 @@
-{: Demo for using the Outline and the Hiddenline shaders.
-
-   The HiddenLine shader provides some kind of 'technical drawing' rendering
-   styles. You can change the settings for front lines and back lines to get
-   various looks.
-
-   The Outline shader is useful for displaying objects as 'selected' or for
-   toon-style shading.
-}
-program lining;
-
-uses
-  Forms,
-  Unit1 in 'Unit1.pas' {Form1};
-
-{$R *.res}
-
-begin
-  Application.Initialize;
-  Application.CreateForm(TForm1, Form1);
-  Application.Run;
-end.
+{: Demo for using the Outline and the Hiddenline shaders.
+
+   The HiddenLine shader provides some kind of 'technical drawing' rendering
+   styles. You can change the settings for front lines and back lines to get
+   various looks.
+
+   The Outline shader is useful for displaying objects as 'selected' or for
+   toon-style shading.
+}
+program LiningShaders;
+
+uses
+  Forms,
+  Unit1 in 'Unit1.pas' {Form1};
+
+{$R *.res}
+
+begin
+  Application.Initialize;
+  Application.CreateForm(TForm1, Form1);
+  Application.Run;
+end.

+ 166 - 164
Demos/Delphi/rendering/lining/lining.dproj → Demos/Delphi/rendering/LiningShaders/LiningShaders.dproj

@@ -1,164 +1,166 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-    <PropertyGroup>
-        <ProjectGuid>{395D6126-6470-44D0-A143-4B514200AB51}</ProjectGuid>
-        <MainSource>lining.dpr</MainSource>
-        <Base>True</Base>
-        <Config Condition="'$(Config)'==''">Debug</Config>
-        <TargetedPlatforms>3</TargetedPlatforms>
-        <AppType>Application</AppType>
-        <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>19.0</ProjectVersion>
-        <Platform Condition="'$(Platform)'==''">Win64</Platform>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
-        <Base_Win32>true</Base_Win32>
-        <CfgParent>Base</CfgParent>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
-        <Base_Win64>true</Base_Win64>
-        <CfgParent>Base</CfgParent>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
-        <Cfg_1>true</Cfg_1>
-        <CfgParent>Base</CfgParent>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
-        <Cfg_1_Win64>true</Cfg_1_Win64>
-        <CfgParent>Cfg_1</CfgParent>
-        <Cfg_1>true</Cfg_1>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
-        <Cfg_2>true</Cfg_2>
-        <CfgParent>Base</CfgParent>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
-        <Cfg_2_Win32>true</Cfg_2_Win32>
-        <CfgParent>Cfg_2</CfgParent>
-        <Cfg_2>true</Cfg_2>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
-        <Cfg_2_Win64>true</Cfg_2_Win64>
-        <CfgParent>Cfg_2</CfgParent>
-        <Cfg_2>true</Cfg_2>
-        <Base>true</Base>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Base)'!=''">
-        <DCC_N>false</DCC_N>
-        <DCC_F>false</DCC_F>
-        <DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
-        <DCC_S>false</DCC_S>
-        <DCC_ImageBase>00400000</DCC_ImageBase>
-        <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=</VerInfo_Keys>
-        <VerInfo_Locale>1049</VerInfo_Locale>
-        <DCC_K>false</DCC_K>
-        <SanitizedProjectName>lining</SanitizedProjectName>
-        <DCC_E>false</DCC_E>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Base_Win32)'!=''">
-        <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
-        <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
-        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
-        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
-        <DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
-        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
-        <VerInfo_Locale>1033</VerInfo_Locale>
-        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Base_Win64)'!=''">
-        <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
-        <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
-        <DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
-        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
-        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
-        <VerInfo_Locale>1033</VerInfo_Locale>
-        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_1)'!=''">
-        <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
-        <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
-        <DCC_DebugInformation>0</DCC_DebugInformation>
-        <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
-        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
-        <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_2)'!=''">
-        <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-        <DCC_Optimize>false</DCC_Optimize>
-        <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
-        <BT_BuildType>Debug</BT_BuildType>
-        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
-        <VerInfo_Locale>1033</VerInfo_Locale>
-        <Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
-        <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
-        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
-        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
-        <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
-    </PropertyGroup>
-    <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
-        <BT_BuildType>Debug</BT_BuildType>
-        <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
-        <VerInfo_Locale>1033</VerInfo_Locale>
-        <Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
-        <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
-        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
-        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
-        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
-        <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
-    </PropertyGroup>
-    <ItemGroup>
-        <DelphiCompile Include="$(MainSource)">
-            <MainSource>MainSource</MainSource>
-        </DelphiCompile>
-        <DCCReference Include="Unit1.pas">
-            <Form>Form1</Form>
-        </DCCReference>
-        <BuildConfiguration Include="Debug">
-            <Key>Cfg_2</Key>
-            <CfgParent>Base</CfgParent>
-        </BuildConfiguration>
-        <BuildConfiguration Include="Base">
-            <Key>Base</Key>
-        </BuildConfiguration>
-        <BuildConfiguration Include="Release">
-            <Key>Cfg_1</Key>
-            <CfgParent>Base</CfgParent>
-        </BuildConfiguration>
-    </ItemGroup>
-    <ProjectExtensions>
-        <Borland.Personality>Delphi.Personality.12</Borland.Personality>
-        <Borland.ProjectType/>
-        <BorlandProject>
-            <Delphi.Personality>
-                <Source>
-                    <Source Name="MainSource">lining.dpr</Source>
-                </Source>
-                <Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k240.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp240.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k240.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
-                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp240.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
-                </Excluded_Packages>
-            </Delphi.Personality>
-            <Platforms>
-                <Platform value="Win32">True</Platform>
-                <Platform value="Win64">True</Platform>
-            </Platforms>
-        </BorlandProject>
-        <ProjectFileVersion>12</ProjectFileVersion>
-    </ProjectExtensions>
-    <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
-    <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
-</Project>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+    <PropertyGroup>
+        <ProjectGuid>{395D6126-6470-44D0-A143-4B514200AB51}</ProjectGuid>
+        <MainSource>LiningShaders.dpr</MainSource>
+        <Base>True</Base>
+        <Config Condition="'$(Config)'==''">Debug</Config>
+        <TargetedPlatforms>3</TargetedPlatforms>
+        <AppType>Application</AppType>
+        <FrameworkType>VCL</FrameworkType>
+        <ProjectVersion>19.0</ProjectVersion>
+        <Platform Condition="'$(Platform)'==''">Win64</Platform>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
+        <Base_Win32>true</Base_Win32>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
+        <Base_Win64>true</Base_Win64>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
+        <Cfg_1>true</Cfg_1>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
+        <Cfg_1_Win64>true</Cfg_1_Win64>
+        <CfgParent>Cfg_1</CfgParent>
+        <Cfg_1>true</Cfg_1>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
+        <Cfg_2>true</Cfg_2>
+        <CfgParent>Base</CfgParent>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
+        <Cfg_2_Win32>true</Cfg_2_Win32>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
+        <Cfg_2_Win64>true</Cfg_2_Win64>
+        <CfgParent>Cfg_2</CfgParent>
+        <Cfg_2>true</Cfg_2>
+        <Base>true</Base>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Base)'!=''">
+        <DCC_N>false</DCC_N>
+        <DCC_F>false</DCC_F>
+        <DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
+        <DCC_S>false</DCC_S>
+        <DCC_ImageBase>00400000</DCC_ImageBase>
+        <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=</VerInfo_Keys>
+        <VerInfo_Locale>1049</VerInfo_Locale>
+        <DCC_K>false</DCC_K>
+        <SanitizedProjectName>LiningShaders</SanitizedProjectName>
+        <DCC_E>false</DCC_E>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win32)'!=''">
+        <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
+        <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
+        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Base_Win64)'!=''">
+        <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
+        <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
+        <DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
+        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1)'!=''">
+        <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
+        <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+        <DCC_DebugInformation>0</DCC_DebugInformation>
+        <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
+        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
+        <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2)'!=''">
+        <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+        <DCC_Optimize>false</DCC_Optimize>
+        <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
+        <BT_BuildType>Debug</BT_BuildType>
+        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
+        <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
+        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
+    </PropertyGroup>
+    <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
+        <BT_BuildType>Debug</BT_BuildType>
+        <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
+        <VerInfo_Locale>1033</VerInfo_Locale>
+        <Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
+        <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
+        <VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)</VerInfo_Keys>
+        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
+        <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
+    </PropertyGroup>
+    <ItemGroup>
+        <DelphiCompile Include="$(MainSource)">
+            <MainSource>MainSource</MainSource>
+        </DelphiCompile>
+        <DCCReference Include="Unit1.pas">
+            <Form>Form1</Form>
+        </DCCReference>
+        <BuildConfiguration Include="Debug">
+            <Key>Cfg_2</Key>
+            <CfgParent>Base</CfgParent>
+        </BuildConfiguration>
+        <BuildConfiguration Include="Base">
+            <Key>Base</Key>
+        </BuildConfiguration>
+        <BuildConfiguration Include="Release">
+            <Key>Cfg_1</Key>
+            <CfgParent>Base</CfgParent>
+        </BuildConfiguration>
+    </ItemGroup>
+    <ProjectExtensions>
+        <Borland.Personality>Delphi.Personality.12</Borland.Personality>
+        <Borland.ProjectType/>
+        <BorlandProject>
+            <Delphi.Personality>
+                <Source>
+                    <Source Name="MainSource">LiningShaders.dpr</Source>
+                </Source>
+                <Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\bcboffice2k240.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\bcbofficexp240.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dcloffice2k240.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+                    <Excluded_Packages Name="$(BDSBIN)\dclofficexp240.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+                </Excluded_Packages>
+            </Delphi.Personality>
+            <Platforms>
+                <Platform value="Win32">True</Platform>
+                <Platform value="Win64">True</Platform>
+            </Platforms>
+            <Deployment> </Deployment>
+        </BorlandProject>
+        <ProjectFileVersion>12</ProjectFileVersion>
+    </ProjectExtensions>
+    <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
+    <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
+    <Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
+</Project>

+ 352 - 351
Demos/Delphi/rendering/lining/Unit1.dfm → Demos/Delphi/rendering/LiningShaders/Unit1.dfm

@@ -1,351 +1,352 @@
-object Form1: TForm1
-  Left = 206
-  Top = 117
-  Caption = 'Lining Shaders'
-  ClientHeight = 309
-  ClientWidth = 532
-  Color = clBtnFace
-  Font.Charset = DEFAULT_CHARSET
-  Font.Color = clWindowText
-  Font.Height = -11
-  Font.Name = 'MS Sans Serif'
-  Font.Style = []
-  OldCreateOrder = False
-  WindowState = wsMaximized
-  PixelsPerInch = 96
-  TextHeight = 13
-  object GLSceneViewer1: TGLSceneViewer
-    Left = 0
-    Top = 0
-    Width = 377
-    Height = 309
-    Camera = GLCamera1
-    Buffer.AntiAliasing = aa4xHQ
-    FieldOfView = 144.134292602539100000
-    Align = alClient
-    OnMouseDown = GLSceneViewer1MouseDown
-    OnMouseMove = GLSceneViewer1MouseMove
-    TabOrder = 0
-  end
-  object Panel1: TPanel
-    Left = 377
-    Top = 0
-    Width = 155
-    Height = 309
-    Align = alRight
-    BevelOuter = bvSpace
-    Font.Charset = ANSI_CHARSET
-    Font.Color = clWindowText
-    Font.Height = -11
-    Font.Name = 'Tahoma'
-    Font.Style = []
-    ParentFont = False
-    TabOrder = 1
-    object Label1: TLabel
-      Left = 17
-      Top = 226
-      Width = 50
-      Height = 13
-      Caption = 'Drag with:'
-    end
-    object Label2: TLabel
-      Left = 17
-      Top = 242
-      Width = 123
-      Height = 13
-      Caption = 'LMB - move around scene'
-    end
-    object Label3: TLabel
-      Left = 17
-      Top = 258
-      Width = 89
-      Height = 13
-      Caption = 'RMB - rotate torus'
-    end
-    object Bevel1: TBevel
-      Left = 11
-      Top = 218
-      Width = 131
-      Height = 9
-      Shape = bsTopLine
-    end
-    object CheckBox1: TCheckBox
-      Left = 6
-      Top = 186
-      Width = 131
-      Height = 17
-      Caption = 'Outline Shader Enabled'
-      Checked = True
-      State = cbChecked
-      TabOrder = 0
-      OnClick = CheckBox1Click
-    end
-    object GroupBox1: TGroupBox
-      Left = 9
-      Top = 58
-      Width = 137
-      Height = 111
-      Caption = 'Shader on Torus'
-      Font.Charset = ANSI_CHARSET
-      Font.Color = clWindowText
-      Font.Height = -11
-      Font.Name = 'Tahoma'
-      Font.Style = []
-      ParentFont = False
-      TabOrder = 1
-      object Bevel2: TBevel
-        Left = 8
-        Top = 52
-        Width = 117
-        Height = 9
-        Shape = bsTopLine
-      end
-      object CheckBox2: TCheckBox
-        Left = 10
-        Top = 16
-        Width = 97
-        Height = 17
-        Caption = 'Enabled'
-        Checked = True
-        State = cbChecked
-        TabOrder = 0
-        OnClick = CheckBox2Click
-      end
-      object CheckBox3: TCheckBox
-        Left = 10
-        Top = 56
-        Width = 97
-        Height = 17
-        Caption = 'Solid'
-        TabOrder = 1
-        OnClick = CheckBox3Click
-      end
-      object CheckBox4: TCheckBox
-        Left = 10
-        Top = 32
-        Width = 113
-        Height = 17
-        Caption = 'Dotted Hidden Line'
-        Checked = True
-        State = cbChecked
-        TabOrder = 2
-        OnClick = CheckBox4Click
-      end
-      object CheckBox5: TCheckBox
-        Left = 26
-        Top = 72
-        Width = 79
-        Height = 17
-        Caption = 'Surface Lit'
-        TabOrder = 3
-        OnClick = CheckBox5Click
-      end
-      object CheckBox6: TCheckBox
-        Left = 26
-        Top = 88
-        Width = 63
-        Height = 17
-        Caption = 'Flat'
-        TabOrder = 4
-        OnClick = CheckBox6Click
-      end
-    end
-    object Panel2: TPanel
-      Left = 1
-      Top = 1
-      Width = 153
-      Height = 43
-      Align = alTop
-      BevelOuter = bvNone
-      Caption = 'Lining Shaders'
-      Color = clBtnHighlight
-      Font.Charset = ANSI_CHARSET
-      Font.Color = clWindowText
-      Font.Height = -19
-      Font.Name = 'Trebuchet MS'
-      Font.Style = [fsBold]
-      ParentFont = False
-      TabOrder = 2
-    end
-  end
-  object GLScene1: TGLScene
-    ObjectsSorting = osRenderFarthestFirst
-    Left = 8
-    Top = 8
-    object GLLightSource1: TGLLightSource
-      Ambient.Color = {0000803F0000803F0000803F0000803F}
-      ConstAttenuation = 1.000000000000000000
-      Position.Coordinates = {00002041000000410000E0400000803F}
-      Specular.Color = {0000803F0000803F0000803F0000803F}
-      SpotCutOff = 180.000000000000000000
-    end
-    object Torus1: TGLTorus
-      Material.MaterialLibrary = GLMaterialLibrary1
-      Material.LibMaterialName = 'LibMaterial2'
-      Direction.Coordinates = {000000000000803F0000000000000000}
-      Up.Coordinates = {0000000000000000000080BF00000000}
-      MajorRadius = 2.500000000000000000
-      MinorRadius = 1.500000000000000000
-      StopAngle = 360.000000000000000000
-      Parts = [toSides, toStartDisk, toStopDisk]
-    end
-    object Sphere1: TGLSphere
-      ShowAxes = True
-      Radius = 0.500000000000000000
-    end
-    object GLAnnulusOutlined: TGLAnnulus
-      Material.MaterialLibrary = GLMaterialLibrary1
-      Material.LibMaterialName = 'LibMaterial'
-      Position.Coordinates = {0000E04000000000000000000000803F}
-      Scale.Coordinates = {00000040000000400000004000000000}
-      BottomRadius = 0.500000000000000000
-      Height = 1.000000000000000000
-      BottomInnerRadius = 0.300000011920929000
-      TopInnerRadius = 0.300000011920929000
-      TopRadius = 0.500000000000000000
-    end
-    object GLAnnulusPink: TGLAnnulus
-      Material.MaterialLibrary = GLMaterialLibrary1
-      Material.LibMaterialName = 'LibMaterial4'
-      Position.Coordinates = {0000E0C000000000000000000000803F}
-      Scale.Coordinates = {00000040000000400000004000000000}
-      BottomRadius = 0.500000000000000000
-      Height = 1.000000000000000000
-      BottomInnerRadius = 0.300000011920929000
-      TopInnerRadius = 0.300000011920929000
-      TopRadius = 0.500000000000000000
-    end
-    object GLAnnulusDotted: TGLAnnulus
-      Material.MaterialLibrary = GLMaterialLibrary1
-      Material.LibMaterialName = 'LibMaterial1'
-      Position.Coordinates = {00000000000000000000E0C00000803F}
-      Scale.Coordinates = {00000040000000400000004000000000}
-      BottomRadius = 0.500000000000000000
-      Height = 1.000000000000000000
-      BottomInnerRadius = 0.300000011920929000
-      TopInnerRadius = 0.300000011920929000
-      TopRadius = 0.500000000000000000
-    end
-    object GLCubeGreen: TGLCube
-      Material.MaterialLibrary = GLMaterialLibrary1
-      Material.LibMaterialName = 'LibMaterial5'
-      Position.Coordinates = {00000000000000000000E0400000803F}
-      Scale.Coordinates = {00000040000000400000004000000000}
-    end
-    object GLCubeTransparent: TGLCube
-      Material.MaterialLibrary = GLMaterialLibrary1
-      Material.LibMaterialName = 'LibMaterial3'
-      Position.Coordinates = {0000000000008040000000000000803F}
-      CubeSize = {000040400000404000004040}
-    end
-    object GLCamera1: TGLCamera
-      DepthOfView = 100.000000000000000000
-      FocalLength = 50.000000000000000000
-      TargetObject = Torus1
-      Position.Coordinates = {00006041000020410000C0400000803F}
-    end
-  end
-  object GLMaterialLibrary1: TGLMaterialLibrary
-    Materials = <
-      item
-        Name = 'LibMaterial'
-        Tag = 0
-        Material.FrontProperties.Ambient.Color = {9190903D9190903D8786863E0000803F}
-        Material.FrontProperties.Diffuse.Color = {9796163F0000803F0000803F0000803F}
-        Material.FrontProperties.Shininess = 128
-        Shader = GLOutlineShader1
-      end
-      item
-        Name = 'LibMaterial1'
-        Tag = 0
-        Shader = GLHiddenLineShader1
-      end
-      item
-        Name = 'LibMaterial2'
-        Tag = 0
-        Material.FrontProperties.Ambient.Color = {C5C4443EBFBEBE3EB5B4343E0000803F}
-        Material.FrontProperties.Diffuse.Color = {0000803FEBEAEA3E8180803C0000803F}
-        Material.FrontProperties.Shininess = 128
-        Material.FrontProperties.Specular.Color = {0000803F0000803F0000803F0000803F}
-        Material.BlendingMode = bmTransparency
-        Shader = GLHiddenLineShader2
-      end
-      item
-        Name = 'LibMaterial3'
-        Tag = 0
-        Shader = GLHiddenLineShader3
-      end
-      item
-        Name = 'LibMaterial4'
-        Tag = 0
-        Shader = GLHiddenLineShader4
-      end
-      item
-        Name = 'LibMaterial5'
-        Tag = 0
-        Material.FrontProperties.Diffuse.Color = {9998183E9796163F9190103E17D92E3F}
-        Material.BlendingMode = bmTransparency
-        Shader = GLHiddenLineShader5
-      end>
-    Left = 8
-    Top = 40
-  end
-  object GLOutlineShader1: TGLOutlineShader
-    LineColor.Color = {0000803F00000000000000000000803F}
-    LineSmooth = True
-    LineWidth = 4.000000000000000000
-    Left = 8
-    Top = 72
-  end
-  object GLHiddenLineShader1: TGLHiddenLineShader
-    FrontLine.Width = 1.000000000000000000
-    FrontLine.Color.Color = {938C0C3E938C0C3E938E0E3F0000803F}
-    FrontLine.Pattern = 10101
-    BackLine.Width = 2.000000000000000000
-    LineSmooth = True
-    Solid = True
-    Left = 40
-    Top = 8
-  end
-  object GLHiddenLineShader2: TGLHiddenLineShader
-    FrontLine.Width = 2.000000000000000000
-    BackLine.Width = 1.000000000000000000
-    BackLine.Color.Color = {000000000000003F000000000000803F}
-    BackLine.Pattern = 65280
-    LineSmooth = True
-    SurfaceLit = False
-    Left = 40
-    Top = 40
-  end
-  object GLHiddenLineShader3: TGLHiddenLineShader
-    FrontLine.Width = 5.000000000000000000
-    FrontLine.Color.Color = {EC51B83E0000803ECDCC4C3E9A99193F}
-    BackLine.Width = 5.000000000000000000
-    BackLine.Color.Color = {0000003F0000003F0000003F9A99993E}
-    LineSmooth = True
-    Left = 40
-    Top = 72
-  end
-  object GLHiddenLineShader4: TGLHiddenLineShader
-    FrontLine.Width = 2.000000000000000000
-    FrontLine.Color.Color = {B81E053F14AEC73E14AEC73E0000803F}
-    BackLine.Width = 1.000000000000000000
-    BackLine.Color.Color = {E4DB5B3FEBE0E03E9A93133F0000803F}
-    LineSmooth = True
-    Left = 72
-    Top = 8
-  end
-  object GLHiddenLineShader5: TGLHiddenLineShader
-    FrontLine.Width = 2.000000000000000000
-    FrontLine.Color.Color = {9A93133FE4DB5B3FEBE0E03E3333333F}
-    BackLine.Width = 2.000000000000000000
-    BackLine.Color.Color = {000000000000003F000000000000803F}
-    BackLine.Pattern = 65280
-    LineSmooth = True
-    Solid = True
-    BackgroundColor.Color = {938C0C3E938E0E3F938C0C3E3333333F}
-    SurfaceLit = False
-    Left = 72
-    Top = 40
-  end
-end
+object Form1: TForm1
+  Left = 206
+  Top = 117
+  Caption = 'Lining Shaders'
+  ClientHeight = 309
+  ClientWidth = 532
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  WindowState = wsMaximized
+  PixelsPerInch = 96
+  TextHeight = 13
+  object GLSceneViewer1: TGLSceneViewer
+    Left = 0
+    Top = 0
+    Width = 377
+    Height = 309
+    Camera = GLCamera1
+    Buffer.AntiAliasing = aa4xHQ
+    FieldOfView = 144.134292602539100000
+    PenAsTouch = False
+    Align = alClient
+    OnMouseDown = GLSceneViewer1MouseDown
+    OnMouseMove = GLSceneViewer1MouseMove
+    TabOrder = 0
+  end
+  object Panel1: TPanel
+    Left = 377
+    Top = 0
+    Width = 155
+    Height = 309
+    Align = alRight
+    BevelOuter = bvSpace
+    Font.Charset = ANSI_CHARSET
+    Font.Color = clWindowText
+    Font.Height = -11
+    Font.Name = 'Tahoma'
+    Font.Style = []
+    ParentFont = False
+    TabOrder = 1
+    object Label1: TLabel
+      Left = 17
+      Top = 226
+      Width = 50
+      Height = 13
+      Caption = 'Drag with:'
+    end
+    object Label2: TLabel
+      Left = 17
+      Top = 242
+      Width = 123
+      Height = 13
+      Caption = 'LMB - move around scene'
+    end
+    object Label3: TLabel
+      Left = 17
+      Top = 258
+      Width = 89
+      Height = 13
+      Caption = 'RMB - rotate torus'
+    end
+    object Bevel1: TBevel
+      Left = 11
+      Top = 218
+      Width = 131
+      Height = 9
+      Shape = bsTopLine
+    end
+    object CheckBox1: TCheckBox
+      Left = 6
+      Top = 186
+      Width = 131
+      Height = 17
+      Caption = 'Outline Shader Enabled'
+      Checked = True
+      State = cbChecked
+      TabOrder = 0
+      OnClick = CheckBox1Click
+    end
+    object GroupBox1: TGroupBox
+      Left = 9
+      Top = 58
+      Width = 137
+      Height = 111
+      Caption = 'Shader on Torus'
+      Font.Charset = ANSI_CHARSET
+      Font.Color = clWindowText
+      Font.Height = -11
+      Font.Name = 'Tahoma'
+      Font.Style = []
+      ParentFont = False
+      TabOrder = 1
+      object Bevel2: TBevel
+        Left = 8
+        Top = 52
+        Width = 117
+        Height = 9
+        Shape = bsTopLine
+      end
+      object CheckBox2: TCheckBox
+        Left = 10
+        Top = 16
+        Width = 97
+        Height = 17
+        Caption = 'Enabled'
+        Checked = True
+        State = cbChecked
+        TabOrder = 0
+        OnClick = CheckBox2Click
+      end
+      object CheckBox3: TCheckBox
+        Left = 10
+        Top = 56
+        Width = 97
+        Height = 17
+        Caption = 'Solid'
+        TabOrder = 1
+        OnClick = CheckBox3Click
+      end
+      object CheckBox4: TCheckBox
+        Left = 10
+        Top = 32
+        Width = 113
+        Height = 17
+        Caption = 'Dotted Hidden Line'
+        Checked = True
+        State = cbChecked
+        TabOrder = 2
+        OnClick = CheckBox4Click
+      end
+      object CheckBox5: TCheckBox
+        Left = 26
+        Top = 72
+        Width = 79
+        Height = 17
+        Caption = 'Surface Lit'
+        TabOrder = 3
+        OnClick = CheckBox5Click
+      end
+      object CheckBox6: TCheckBox
+        Left = 26
+        Top = 88
+        Width = 63
+        Height = 17
+        Caption = 'Flat'
+        TabOrder = 4
+        OnClick = CheckBox6Click
+      end
+    end
+    object Panel2: TPanel
+      Left = 1
+      Top = 1
+      Width = 153
+      Height = 43
+      Align = alTop
+      BevelOuter = bvNone
+      Caption = 'Lining Shaders'
+      Color = clBtnHighlight
+      Font.Charset = ANSI_CHARSET
+      Font.Color = clWindowText
+      Font.Height = -19
+      Font.Name = 'Trebuchet MS'
+      Font.Style = [fsBold]
+      ParentFont = False
+      TabOrder = 2
+    end
+  end
+  object GLScene1: TGLScene
+    ObjectsSorting = osRenderFarthestFirst
+    Left = 8
+    Top = 8
+    object GLLightSource1: TGLLightSource
+      Ambient.Color = {0000803F0000803F0000803F0000803F}
+      ConstAttenuation = 1.000000000000000000
+      Position.Coordinates = {00002041000000410000E0400000803F}
+      Specular.Color = {0000803F0000803F0000803F0000803F}
+      SpotCutOff = 180.000000000000000000
+    end
+    object Torus1: TGLTorus
+      Material.MaterialLibrary = GLMaterialLibrary1
+      Material.LibMaterialName = 'LibMaterial2'
+      Direction.Coordinates = {000000000000803F0000000000000000}
+      Up.Coordinates = {0000000000000000000080BF00000000}
+      MajorRadius = 2.500000000000000000
+      MinorRadius = 1.500000000000000000
+      StopAngle = 360.000000000000000000
+      Parts = [toSides, toStartDisk, toStopDisk]
+    end
+    object Sphere1: TGLSphere
+      ShowAxes = True
+      Radius = 0.500000000000000000
+    end
+    object GLAnnulusOutlined: TGLAnnulus
+      Material.MaterialLibrary = GLMaterialLibrary1
+      Material.LibMaterialName = 'LibMaterial'
+      Position.Coordinates = {0000E04000000000000000000000803F}
+      Scale.Coordinates = {00000040000000400000004000000000}
+      BottomRadius = 0.500000000000000000
+      Height = 1.000000000000000000
+      BottomInnerRadius = 0.300000011920929000
+      TopInnerRadius = 0.300000011920929000
+      TopRadius = 0.500000000000000000
+    end
+    object GLAnnulusPink: TGLAnnulus
+      Material.MaterialLibrary = GLMaterialLibrary1
+      Material.LibMaterialName = 'LibMaterial4'
+      Position.Coordinates = {0000E0C000000000000000000000803F}
+      Scale.Coordinates = {00000040000000400000004000000000}
+      BottomRadius = 0.500000000000000000
+      Height = 1.000000000000000000
+      BottomInnerRadius = 0.300000011920929000
+      TopInnerRadius = 0.300000011920929000
+      TopRadius = 0.500000000000000000
+    end
+    object GLAnnulusDotted: TGLAnnulus
+      Material.MaterialLibrary = GLMaterialLibrary1
+      Material.LibMaterialName = 'LibMaterial1'
+      Position.Coordinates = {00000000000000000000E0C00000803F}
+      Scale.Coordinates = {00000040000000400000004000000000}
+      BottomRadius = 0.500000000000000000
+      Height = 1.000000000000000000
+      BottomInnerRadius = 0.300000011920929000
+      TopInnerRadius = 0.300000011920929000
+      TopRadius = 0.500000000000000000
+    end
+    object GLCubeGreen: TGLCube
+      Material.MaterialLibrary = GLMaterialLibrary1
+      Material.LibMaterialName = 'LibMaterial5'
+      Position.Coordinates = {00000000000000000000E0400000803F}
+      Scale.Coordinates = {00000040000000400000004000000000}
+    end
+    object GLCubeTransparent: TGLCube
+      Material.MaterialLibrary = GLMaterialLibrary1
+      Material.LibMaterialName = 'LibMaterial3'
+      Position.Coordinates = {0000000000008040000000000000803F}
+      CubeSize = {000040400000404000004040}
+    end
+    object GLCamera1: TGLCamera
+      DepthOfView = 100.000000000000000000
+      FocalLength = 50.000000000000000000
+      TargetObject = Torus1
+      Position.Coordinates = {00006041000020410000C0400000803F}
+    end
+  end
+  object GLMaterialLibrary1: TGLMaterialLibrary
+    Materials = <
+      item
+        Name = 'LibMaterial'
+        Tag = 0
+        Material.FrontProperties.Ambient.Color = {9190903D9190903D8786863E0000803F}
+        Material.FrontProperties.Diffuse.Color = {9796163F0000803F0000803F0000803F}
+        Material.FrontProperties.Shininess = 128
+        Shader = GLOutlineShader1
+      end
+      item
+        Name = 'LibMaterial1'
+        Tag = 0
+        Shader = GLHiddenLineShader1
+      end
+      item
+        Name = 'LibMaterial2'
+        Tag = 0
+        Material.FrontProperties.Ambient.Color = {C5C4443EBFBEBE3EB5B4343E0000803F}
+        Material.FrontProperties.Diffuse.Color = {0000803FEBEAEA3E8180803C0000803F}
+        Material.FrontProperties.Shininess = 128
+        Material.FrontProperties.Specular.Color = {0000803F0000803F0000803F0000803F}
+        Material.BlendingMode = bmTransparency
+        Shader = GLHiddenLineShader2
+      end
+      item
+        Name = 'LibMaterial3'
+        Tag = 0
+        Shader = GLHiddenLineShader3
+      end
+      item
+        Name = 'LibMaterial4'
+        Tag = 0
+        Shader = GLHiddenLineShader4
+      end
+      item
+        Name = 'LibMaterial5'
+        Tag = 0
+        Material.FrontProperties.Diffuse.Color = {9998183E9796163F9190103E17D92E3F}
+        Material.BlendingMode = bmTransparency
+        Shader = GLHiddenLineShader5
+      end>
+    Left = 8
+    Top = 40
+  end
+  object GLOutlineShader1: TGLOutlineShader
+    LineColor.Color = {0000803F00000000000000000000803F}
+    LineSmooth = True
+    LineWidth = 4.000000000000000000
+    Left = 8
+    Top = 72
+  end
+  object GLHiddenLineShader1: TGLHiddenLineShader
+    FrontLine.Width = 1.000000000000000000
+    FrontLine.Color.Color = {938C0C3E938C0C3E938E0E3F0000803F}
+    FrontLine.Pattern = 10101
+    BackLine.Width = 2.000000000000000000
+    LineSmooth = True
+    Solid = True
+    Left = 40
+    Top = 8
+  end
+  object GLHiddenLineShader2: TGLHiddenLineShader
+    FrontLine.Width = 2.000000000000000000
+    BackLine.Width = 1.000000000000000000
+    BackLine.Color.Color = {000000000000003F000000000000803F}
+    BackLine.Pattern = 65280
+    LineSmooth = True
+    SurfaceLit = False
+    Left = 40
+    Top = 40
+  end
+  object GLHiddenLineShader3: TGLHiddenLineShader
+    FrontLine.Width = 5.000000000000000000
+    FrontLine.Color.Color = {EC51B83E0000803ECDCC4C3E9A99193F}
+    BackLine.Width = 5.000000000000000000
+    BackLine.Color.Color = {0000003F0000003F0000003F9A99993E}
+    LineSmooth = True
+    Left = 40
+    Top = 72
+  end
+  object GLHiddenLineShader4: TGLHiddenLineShader
+    FrontLine.Width = 2.000000000000000000
+    FrontLine.Color.Color = {B81E053F14AEC73E14AEC73E0000803F}
+    BackLine.Width = 1.000000000000000000
+    BackLine.Color.Color = {E4DB5B3FEBE0E03E9A93133F0000803F}
+    LineSmooth = True
+    Left = 72
+    Top = 8
+  end
+  object GLHiddenLineShader5: TGLHiddenLineShader
+    FrontLine.Width = 2.000000000000000000
+    FrontLine.Color.Color = {9A93133FE4DB5B3FEBE0E03E3333333F}
+    BackLine.Width = 2.000000000000000000
+    BackLine.Color.Color = {000000000000003F000000000000803F}
+    BackLine.Pattern = 65280
+    LineSmooth = True
+    Solid = True
+    BackgroundColor.Color = {938C0C3E938E0E3F938C0C3E3333333F}
+    SurfaceLit = False
+    Left = 72
+    Top = 40
+  end
+end

+ 143 - 143
Demos/Delphi/rendering/lining/Unit1.pas → Demos/Delphi/rendering/LiningShaders/Unit1.pas

@@ -1,143 +1,143 @@
-unit Unit1;
-
-interface
-
-uses
-  Winapi.OpenGL,
-  System.SysUtils,
-  System.Classes,
-  Vcl.Graphics,
-  Vcl.Controls,
-  Vcl.Forms,
-  Vcl.Dialogs,
-  Vcl.StdCtrls,
-  Vcl.ExtCtrls,
-  
-  GLScene,
-  GLObjects,
-  GLSceneViewer,
-  GLTexture,
-  GLGeomObjects,
-  GLHiddenLineShader,
-  GLOutlineShader,
-  GLCrossPlatform,
-  GLMaterial,
-  GLCoordinates,
-  GLBaseClasses;
-
-type
-  TForm1 = class(TForm)
-    GLScene1: TGLScene;
-    GLSceneViewer1: TGLSceneViewer;
-    GLCamera1: TGLCamera;
-    GLLightSource1: TGLLightSource;
-    Torus1: TGLTorus;
-    Sphere1: TGLSphere;
-    GLMaterialLibrary1: TGLMaterialLibrary;
-    GLAnnulusOutlined: TGLAnnulus;
-    GLAnnulusPink: TGLAnnulus;
-    GLCubeGreen: TGLCube;
-    GLCubeTransparent: TGLCube;
-    GLOutlineShader1: TGLOutlineShader;
-    GLHiddenLineShader1: TGLHiddenLineShader;
-    GLHiddenLineShader2: TGLHiddenLineShader;
-    GLHiddenLineShader3: TGLHiddenLineShader;
-    GLHiddenLineShader4: TGLHiddenLineShader;
-    Panel1: TPanel;
-    CheckBox1: TCheckBox;
-    GroupBox1: TGroupBox;
-    CheckBox2: TCheckBox;
-    CheckBox3: TCheckBox;
-    Label1: TLabel;
-    CheckBox4: TCheckBox;
-    Label2: TLabel;
-    Label3: TLabel;
-    GLHiddenLineShader5: TGLHiddenLineShader;
-    GLAnnulusDotted: TGLAnnulus;
-    Bevel1: TBevel;
-    Panel2: TPanel;
-    CheckBox5: TCheckBox;
-    CheckBox6: TCheckBox;
-    Bevel2: TBevel;
-    procedure GLSceneViewer1MouseDown(Sender: TObject;
-      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-    procedure GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState;
-      X, Y: Integer);
-    procedure CheckBox1Click(Sender: TObject);
-    procedure CheckBox2Click(Sender: TObject);
-    procedure CheckBox3Click(Sender: TObject);
-    procedure CheckBox4Click(Sender: TObject);
-    procedure CheckBox5Click(Sender: TObject);
-    procedure CheckBox6Click(Sender: TObject);
-  private
-     
-  public
-     
-    mx, my : Integer;
-  end;
-
-var
-  Form1: TForm1;
-
-implementation
-
-{$R *.dfm}
-
-procedure TForm1.CheckBox1Click(Sender: TObject);
-begin
-  GLOutlineShader1.Enabled:=CheckBox1.Checked;
-end;
-
-procedure TForm1.CheckBox2Click(Sender: TObject);
-begin
-  GLHiddenLineShader2.Enabled:=CheckBox2.Checked;
-end;
-
-procedure TForm1.CheckBox3Click(Sender: TObject);
-begin
-  GLHiddenLineShader2.Solid:=CheckBox3.Checked;
-end;
-
-procedure TForm1.CheckBox4Click(Sender: TObject);
-begin
-  with GLHiddenLineShader2.BackLine do
-    if CheckBox4.Checked then
-      Pattern:=$FF00  // bit pattern
-    else
-      Pattern:=$FFFF;
-end;
-
-procedure TForm1.CheckBox5Click(Sender: TObject);
-begin
-  GLHiddenLineShader2.SurfaceLit:=CheckBox5.Checked;
-end;
-
-procedure TForm1.CheckBox6Click(Sender: TObject);
-begin
-  if CheckBox6.Checked then
-    GLHiddenLineShader2.ShadeModel:=smFlat
-  else
-    GLHiddenLineShader2.ShadeModel:=smSmooth;
-end;
-
-//
-// Classic mouse movement bits
-//
-
-procedure TForm1.GLSceneViewer1MouseDown(Sender: TObject;
-  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-begin
-   mx:=x; my:=y;
-end;
-
-procedure TForm1.GLSceneViewer1MouseMove(Sender: TObject;
-  Shift: TShiftState; X, Y: Integer);
-begin
-   if Shift=[ssLeft] then
-      GLCamera1.MoveAroundTarget(my-y, mx-x)
-   else if Shift=[ssRight] then
-      GLCamera1.RotateTarget(my-y, mx-x);
-   mx:=x; my:=y;
-end;
-
-end.
+unit Unit1;
+
+interface
+
+uses
+  System.SysUtils,
+  System.Classes,
+  Vcl.Graphics,
+  Vcl.Controls,
+  Vcl.Forms,
+  Vcl.Dialogs,
+  Vcl.StdCtrls,
+  Vcl.ExtCtrls,
+
+  GLScene,
+  GLObjects,
+  GLSceneViewer,
+  GLTexture,
+  GLGeomObjects,
+  GLHiddenLineShader,
+  GLOutlineShader,
+  GLCrossPlatform,
+  GLMaterial,
+  GLCoordinates,
+  GLBaseClasses;
+
+type
+  TForm1 = class(TForm)
+    GLScene1: TGLScene;
+    GLSceneViewer1: TGLSceneViewer;
+    GLCamera1: TGLCamera;
+    GLLightSource1: TGLLightSource;
+    Torus1: TGLTorus;
+    Sphere1: TGLSphere;
+    GLMaterialLibrary1: TGLMaterialLibrary;
+    GLAnnulusOutlined: TGLAnnulus;
+    GLAnnulusPink: TGLAnnulus;
+    GLCubeGreen: TGLCube;
+    GLCubeTransparent: TGLCube;
+    GLOutlineShader1: TGLOutlineShader;
+    GLHiddenLineShader1: TGLHiddenLineShader;
+    GLHiddenLineShader2: TGLHiddenLineShader;
+    GLHiddenLineShader3: TGLHiddenLineShader;
+    GLHiddenLineShader4: TGLHiddenLineShader;
+    Panel1: TPanel;
+    CheckBox1: TCheckBox;
+    GroupBox1: TGroupBox;
+    CheckBox2: TCheckBox;
+    CheckBox3: TCheckBox;
+    Label1: TLabel;
+    CheckBox4: TCheckBox;
+    Label2: TLabel;
+    Label3: TLabel;
+    GLHiddenLineShader5: TGLHiddenLineShader;
+    GLAnnulusDotted: TGLAnnulus;
+    Bevel1: TBevel;
+    Panel2: TPanel;
+    CheckBox5: TCheckBox;
+    CheckBox6: TCheckBox;
+    Bevel2: TBevel;
+    procedure GLSceneViewer1MouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState;
+      X, Y: Integer);
+    procedure CheckBox1Click(Sender: TObject);
+    procedure CheckBox2Click(Sender: TObject);
+    procedure CheckBox3Click(Sender: TObject);
+    procedure CheckBox4Click(Sender: TObject);
+    procedure CheckBox5Click(Sender: TObject);
+    procedure CheckBox6Click(Sender: TObject);
+  public
+    mx, my: Integer;
+  end;
+
+var
+  Form1: TForm1;
+
+// --------------------------------------
+implementation
+// --------------------------------------
+
+{$R *.dfm}
+
+procedure TForm1.CheckBox1Click(Sender: TObject);
+begin
+  GLOutlineShader1.Enabled := CheckBox1.Checked;
+end;
+
+procedure TForm1.CheckBox2Click(Sender: TObject);
+begin
+  GLHiddenLineShader2.Enabled := CheckBox2.Checked;
+end;
+
+procedure TForm1.CheckBox3Click(Sender: TObject);
+begin
+  GLHiddenLineShader2.Solid := CheckBox3.Checked;
+end;
+
+procedure TForm1.CheckBox4Click(Sender: TObject);
+begin
+  with GLHiddenLineShader2.BackLine do
+    if CheckBox4.Checked then
+      Pattern := $FF00 // bit pattern
+    else
+      Pattern := $FFFF;
+end;
+
+procedure TForm1.CheckBox5Click(Sender: TObject);
+begin
+  GLHiddenLineShader2.SurfaceLit := CheckBox5.Checked;
+end;
+
+procedure TForm1.CheckBox6Click(Sender: TObject);
+begin
+  if CheckBox6.Checked then
+    GLHiddenLineShader2.ShadeModel := smFlat
+  else
+    GLHiddenLineShader2.ShadeModel := smSmooth;
+end;
+
+//
+// Classic mouse movement bits
+//
+
+procedure TForm1.GLSceneViewer1MouseDown(Sender: TObject; Button: TMouseButton;
+  Shift: TShiftState; X, Y: Integer);
+begin
+  mx := X;
+  my := Y;
+end;
+
+procedure TForm1.GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState;
+  X, Y: Integer);
+begin
+  if Shift = [ssLeft] then
+    GLCamera1.MoveAroundTarget(my - Y, mx - X)
+  else if Shift = [ssRight] then
+    GLCamera1.RotateTarget(my - Y, mx - X);
+  mx := X;
+  my := Y;
+end;
+
+end.

+ 10 - 10
Demos/Delphi/rendering/Rendering.groupproj

@@ -27,7 +27,7 @@
         <Projects Include="invariance\invariance.dproj">
         <Projects Include="invariance\invariance.dproj">
             <Dependencies/>
             <Dependencies/>
         </Projects>
         </Projects>
-        <Projects Include="lining\lining.dproj">
+        <Projects Include="lining\LiningShaders.dproj">
             <Dependencies/>
             <Dependencies/>
         </Projects>
         </Projects>
         <Projects Include="memviewer\memviewer.dproj">
         <Projects Include="memviewer\memviewer.dproj">
@@ -140,14 +140,14 @@
     <Target Name="invariance:Make">
     <Target Name="invariance:Make">
         <MSBuild Projects="invariance\invariance.dproj" Targets="Make"/>
         <MSBuild Projects="invariance\invariance.dproj" Targets="Make"/>
     </Target>
     </Target>
-    <Target Name="lining">
-        <MSBuild Projects="lining\lining.dproj"/>
+    <Target Name="LiningShaders">
+        <MSBuild Projects="lining\LiningShaders.dproj"/>
     </Target>
     </Target>
-    <Target Name="lining:Clean">
-        <MSBuild Projects="lining\lining.dproj" Targets="Clean"/>
+    <Target Name="LiningShaders:Clean">
+        <MSBuild Projects="lining\LiningShaders.dproj" Targets="Clean"/>
     </Target>
     </Target>
-    <Target Name="lining:Make">
-        <MSBuild Projects="lining\lining.dproj" Targets="Make"/>
+    <Target Name="LiningShaders:Make">
+        <MSBuild Projects="lining\LiningShaders.dproj" Targets="Make"/>
     </Target>
     </Target>
     <Target Name="memviewer">
     <Target Name="memviewer">
         <MSBuild Projects="memviewer\memviewer.dproj"/>
         <MSBuild Projects="memviewer\memviewer.dproj"/>
@@ -240,13 +240,13 @@
         <MSBuild Projects="basicsdl\basicsdl.dproj" Targets="Make"/>
         <MSBuild Projects="basicsdl\basicsdl.dproj" Targets="Make"/>
     </Target>
     </Target>
     <Target Name="Build">
     <Target Name="Build">
-        <CallTarget Targets="Blur;BlurAdvanced;bunnybump;celshading;culling;fog;fullscreen;invariance;lining;memviewer;multiproxy;MultiSampleTextures;OctreeDemo;phong;QuadtreeVisCulling;RenderToTexture;SkyBox;tobitmap;basicsdl"/>
+        <CallTarget Targets="Blur;BlurAdvanced;bunnybump;celshading;culling;fog;fullscreen;invariance;LiningShaders;memviewer;multiproxy;MultiSampleTextures;OctreeDemo;phong;QuadtreeVisCulling;RenderToTexture;SkyBox;tobitmap;basicsdl"/>
     </Target>
     </Target>
     <Target Name="Clean">
     <Target Name="Clean">
-        <CallTarget Targets="Blur:Clean;BlurAdvanced:Clean;bunnybump:Clean;celshading:Clean;culling:Clean;fog:Clean;fullscreen:Clean;invariance:Clean;lining:Clean;memviewer:Clean;multiproxy:Clean;MultiSampleTextures:Clean;OctreeDemo:Clean;phong:Clean;QuadtreeVisCulling:Clean;RenderToTexture:Clean;SkyBox:Clean;tobitmap:Clean;basicsdl:Clean"/>
+        <CallTarget Targets="Blur:Clean;BlurAdvanced:Clean;bunnybump:Clean;celshading:Clean;culling:Clean;fog:Clean;fullscreen:Clean;invariance:Clean;LiningShaders:Clean;memviewer:Clean;multiproxy:Clean;MultiSampleTextures:Clean;OctreeDemo:Clean;phong:Clean;QuadtreeVisCulling:Clean;RenderToTexture:Clean;SkyBox:Clean;tobitmap:Clean;basicsdl:Clean"/>
     </Target>
     </Target>
     <Target Name="Make">
     <Target Name="Make">
-        <CallTarget Targets="Blur:Make;BlurAdvanced:Make;bunnybump:Make;celshading:Make;culling:Make;fog:Make;fullscreen:Make;invariance:Make;lining:Make;memviewer:Make;multiproxy:Make;MultiSampleTextures:Make;OctreeDemo:Make;phong:Make;QuadtreeVisCulling:Make;RenderToTexture:Make;SkyBox:Make;tobitmap:Make;basicsdl:Make"/>
+        <CallTarget Targets="Blur:Make;BlurAdvanced:Make;bunnybump:Make;celshading:Make;culling:Make;fog:Make;fullscreen:Make;invariance:Make;LiningShaders:Make;memviewer:Make;multiproxy:Make;MultiSampleTextures:Make;OctreeDemo:Make;phong:Make;QuadtreeVisCulling:Make;RenderToTexture:Make;SkyBox:Make;tobitmap:Make;basicsdl:Make"/>
     </Target>
     </Target>
     <Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
     <Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
 </Project>
 </Project>

+ 3 - 2
Packages/GLScene_RT.dpk

@@ -253,6 +253,7 @@ contains
   GLS.Memo in '..\Source\GLS.Memo.pas',
   GLS.Memo in '..\Source\GLS.Memo.pas',
   GLS.PlugInManager in '..\Source\GLS.PlugInManager.pas',
   GLS.PlugInManager in '..\Source\GLS.PlugInManager.pas',
   GLS.OpenGLx in '..\Source\GLS.OpenGLx.pas',
   GLS.OpenGLx in '..\Source\GLS.OpenGLx.pas',
+  GLS.vclOpenGL in '..\Source\GLS.vclOpenGL.pas',
   GLTeapot in '..\Source\GLTeapot.pas',
   GLTeapot in '..\Source\GLTeapot.pas',
   GLTerrainRenderer in '..\Source\GLTerrainRenderer.pas',
   GLTerrainRenderer in '..\Source\GLTerrainRenderer.pas',
   GLTexCombineShader in '..\Source\GLTexCombineShader.pas',
   GLTexCombineShader in '..\Source\GLTexCombineShader.pas',
@@ -283,13 +284,13 @@ contains
   GLWaterPlane in '..\Source\GLWaterPlane.pas',
   GLWaterPlane in '..\Source\GLWaterPlane.pas',
   GLSceneViewer in '..\Source\GLSceneViewer.pas',
   GLSceneViewer in '..\Source\GLSceneViewer.pas',
   GLWindows in '..\Source\GLWindows.pas',
   GLWindows in '..\Source\GLWindows.pas',
+  GLWindowsContext in '..\Source\GLWindowsContext.pas',
   GLWindowsFont in '..\Source\GLWindowsFont.pas',
   GLWindowsFont in '..\Source\GLWindowsFont.pas',
   XCollection in '..\Source\XCollection.pas',
   XCollection in '..\Source\XCollection.pas',
   GLzBuffer in '..\Source\GLzBuffer.pas',
   GLzBuffer in '..\Source\GLzBuffer.pas',
   OpenGLAdapter in '..\Source\OpenGLAdapter.pas',
   OpenGLAdapter in '..\Source\OpenGLAdapter.pas',
   OpenGLTokens in '..\Source\OpenGLTokens.pas',
   OpenGLTokens in '..\Source\OpenGLTokens.pas',
-  XOpenGL in '..\Source\XOpenGL.pas',
-  GLWindowsContext in '..\Source\GLWindowsContext.pas';
+  XOpenGL in '..\Source\XOpenGL.pas';
 
 
 end.
 end.
 
 

+ 6 - 5
Packages/GLScene_RT.dproj

@@ -356,6 +356,7 @@
         <DCCReference Include="..\Source\GLS.Memo.pas"/>
         <DCCReference Include="..\Source\GLS.Memo.pas"/>
         <DCCReference Include="..\Source\GLS.PlugInManager.pas"/>
         <DCCReference Include="..\Source\GLS.PlugInManager.pas"/>
         <DCCReference Include="..\Source\GLS.OpenGLx.pas"/>
         <DCCReference Include="..\Source\GLS.OpenGLx.pas"/>
+        <DCCReference Include="..\Source\GLS.vclOpenGL.pas"/>
         <DCCReference Include="..\Source\GLTeapot.pas"/>
         <DCCReference Include="..\Source\GLTeapot.pas"/>
         <DCCReference Include="..\Source\GLTerrainRenderer.pas"/>
         <DCCReference Include="..\Source\GLTerrainRenderer.pas"/>
         <DCCReference Include="..\Source\GLTexCombineShader.pas"/>
         <DCCReference Include="..\Source\GLTexCombineShader.pas"/>
@@ -386,13 +387,13 @@
         <DCCReference Include="..\Source\GLWaterPlane.pas"/>
         <DCCReference Include="..\Source\GLWaterPlane.pas"/>
         <DCCReference Include="..\Source\GLSceneViewer.pas"/>
         <DCCReference Include="..\Source\GLSceneViewer.pas"/>
         <DCCReference Include="..\Source\GLWindows.pas"/>
         <DCCReference Include="..\Source\GLWindows.pas"/>
+        <DCCReference Include="..\Source\GLWindowsContext.pas"/>
         <DCCReference Include="..\Source\GLWindowsFont.pas"/>
         <DCCReference Include="..\Source\GLWindowsFont.pas"/>
         <DCCReference Include="..\Source\XCollection.pas"/>
         <DCCReference Include="..\Source\XCollection.pas"/>
         <DCCReference Include="..\Source\GLzBuffer.pas"/>
         <DCCReference Include="..\Source\GLzBuffer.pas"/>
         <DCCReference Include="..\Source\OpenGLAdapter.pas"/>
         <DCCReference Include="..\Source\OpenGLAdapter.pas"/>
         <DCCReference Include="..\Source\OpenGLTokens.pas"/>
         <DCCReference Include="..\Source\OpenGLTokens.pas"/>
         <DCCReference Include="..\Source\XOpenGL.pas"/>
         <DCCReference Include="..\Source\XOpenGL.pas"/>
-        <DCCReference Include="..\Source\GLWindowsContext.pas"/>
         <BuildConfiguration Include="Debug">
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <Key>Cfg_2</Key>
             <CfgParent>Base</CfgParent>
             <CfgParent>Base</CfgParent>
@@ -425,14 +426,14 @@
                 <Platform value="Win64">True</Platform>
                 <Platform value="Win64">True</Platform>
             </Platforms>
             </Platforms>
             <Deployment Version="3">
             <Deployment Version="3">
-                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\GLScene_RT.bpl" Configuration="Debug" Class="ProjectOutput">
-                    <Platform Name="Win32">
+                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl\Win64\GLScene_RT.bpl" Configuration="Debug" Class="ProjectOutput">
+                    <Platform Name="Win64">
                         <RemoteName>GLScene_RT.bpl</RemoteName>
                         <RemoteName>GLScene_RT.bpl</RemoteName>
                         <Overwrite>true</Overwrite>
                         <Overwrite>true</Overwrite>
                     </Platform>
                     </Platform>
                 </DeployFile>
                 </DeployFile>
-                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl\Win64\GLScene_RT.bpl" Configuration="Debug" Class="ProjectOutput">
-                    <Platform Name="Win64">
+                <DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\GLScene_RT.bpl" Configuration="Debug" Class="ProjectOutput">
+                    <Platform Name="Win32">
                         <RemoteName>GLScene_RT.bpl</RemoteName>
                         <RemoteName>GLScene_RT.bpl</RemoteName>
                         <Overwrite>true</Overwrite>
                         <Overwrite>true</Overwrite>
                     </Platform>
                     </Platform>

+ 8 - 8
Source/FInfo.pas

@@ -12,7 +12,6 @@ interface
 
 
 uses
 uses
   Winapi.Windows,
   Winapi.Windows,
-  Winapi.OpenGL,
   System.SysUtils,
   System.SysUtils,
   System.Classes,
   System.Classes,
   Vcl.Forms,
   Vcl.Forms,
@@ -25,7 +24,8 @@ uses
   Vcl.Menus,
   Vcl.Menus,
   Vcl.Imaging.jpeg,
   Vcl.Imaging.jpeg,
 
 
-  GLS.OpenGLx,
+  OpenGLTokens,
+  OpenGLAdapter,
   GLScene,
   GLScene,
   GLSceneViewer,
   GLSceneViewer,
   GLContext,
   GLContext,
@@ -188,8 +188,8 @@ begin
     with aSceneBuffer do
     with aSceneBuffer do
     begin
     begin
       // common properties
       // common properties
-      VendorLabel.Caption := String(glGetString(GL_VENDOR));
-      RendererLabel.Caption := String(glGetString(GL_RENDERER));
+      VendorLabel.Caption := String(gl.GetString(GL_VENDOR));
+      RendererLabel.Caption := String(gl.GetString(GL_RENDERER));
       dc := wglGetCurrentDC();
       dc := wglGetCurrentDC();
       pixelFormat := GetPixelFormat(dc);
       pixelFormat := GetPixelFormat(dc);
       DescribePixelFormat(dc, pixelFormat, SizeOf(pfd), pfd);
       DescribePixelFormat(dc, pixelFormat, SizeOf(pfd), pfd);
@@ -200,8 +200,8 @@ begin
         AccLabel.Caption := 'Mini-Client Driver'
         AccLabel.Caption := 'Mini-Client Driver'
       else if (DRIVER_MASK and pfd.dwFlags) = PFD_GENERIC_FORMAT then
       else if (DRIVER_MASK and pfd.dwFlags) = PFD_GENERIC_FORMAT then
         AccLabel.Caption := 'Generic Software Driver';
         AccLabel.Caption := 'Generic Software Driver';
-      VersionLabel.Caption := String(glGetString(GL_VERSION));
-      ExtStr := String(glGetString(GL_EXTENSIONS));
+      VersionLabel.Caption := String(gl.GetString(GL_VERSION));
+      ExtStr := String(gl.GetString(GL_EXTENSIONS));
       ListBoxExtensions.Clear;
       ListBoxExtensions.Clear;
       while Length(ExtStr) > 0 do
       while Length(ExtStr) > 0 do
       begin
       begin
@@ -223,9 +223,9 @@ begin
         StereoLabel.Caption := 'no';
         StereoLabel.Caption := 'no';
 
 
       // Include WGL extensions
       // Include WGL extensions
-      if WGL_ARB_extensions_string then
+      if GL.W_ARB_extensions_string then
       begin
       begin
-        ExtStr := String(wglGetExtensionsStringARB(dc));
+        ExtStr := String(gl.WGetExtensionsStringARB(dc));
         while Length(ExtStr) > 0 do
         while Length(ExtStr) > 0 do
         begin
         begin
           i := Pos(' ', ExtStr);
           i := Pos(' ', ExtStr);

+ 1 - 1
Source/GLBumpShader.pas

@@ -35,12 +35,12 @@ uses
   System.Classes,
   System.Classes,
   System.SysUtils,
   System.SysUtils,
 
 
+  OpenGLTokens,
   GLVectorTypes,
   GLVectorTypes,
   GLVectorGeometry,
   GLVectorGeometry,
   GLMaterial,
   GLMaterial,
   GLGraphics,
   GLGraphics,
   GLUtils,
   GLUtils,
-  OpenGLTokens,
   GLContext,
   GLContext,
   GLVectorLists,
   GLVectorLists,
   GLColor,
   GLColor,

+ 1 - 1
Source/GLFile3DSSceneObjects.pas

@@ -15,9 +15,9 @@ uses
   System.SysUtils,
   System.SysUtils,
   System.Math,
   System.Math,
   
   
+  OpenGLTokens,
   OpenGLAdapter,
   OpenGLAdapter,
   GLVectorGeometry,
   GLVectorGeometry,
-  OpenGLTokens,
   GLContext,
   GLContext,
   GLScene,
   GLScene,
   GLVectorFileObjects,
   GLVectorFileObjects,

+ 1 - 1
Source/GLFilePNG.pas

@@ -15,7 +15,7 @@ uses
   System.SysUtils,
   System.SysUtils,
   VCL.Imaging.pngimage,
   VCL.Imaging.pngimage,
 
 
-  Winapi.OpenGL,
+  OpenGLTokens,
   GLS.Strings,
   GLS.Strings,
   GLContext,
   GLContext,
   GLGraphics,
   GLGraphics,

+ 7 - 2
Source/GLFileSTL.pas

@@ -55,8 +55,13 @@ type
     procedure SaveToStream(aStream: TStream); override;
     procedure SaveToStream(aStream: TStream); override;
   end;
   end;
 
 
-  threadvar STLUseEmbeddedColors: Boolean;
-
+{$IFDEF USE_MULTITHREAD}
+  threadvar
+{$ELSE}
+  var
+{$ENDIF}
+  STLUseEmbeddedColors: Boolean;
+  
 // ------------------------------------------------------------------
 // ------------------------------------------------------------------
 implementation
 implementation
 // ------------------------------------------------------------------
 // ------------------------------------------------------------------

+ 36 - 47
Source/GLFireFX.pas

@@ -33,7 +33,6 @@ uses
   GLTextureFormat;
   GLTextureFormat;
 
 
 type
 type
-
   PFireParticle = ^TFireParticle;
   PFireParticle = ^TFireParticle;
   TFireParticle = record
   TFireParticle = record
     Position: TVector;
     Position: TVector;
@@ -46,9 +45,9 @@ type
 
 
   TGLBFireFX = class;
   TGLBFireFX = class;
 
 
-  { Fire special effect manager.
+  (* Fire special effect manager.
     Defines the looks and behaviour of a particle system that can be made
     Defines the looks and behaviour of a particle system that can be made
-    to look fire-like. }
+    to look fire-like. *)
   TGLFireFXManager = class(TGLCadenceAbleComponent)
   TGLFireFXManager = class(TGLCadenceAbleComponent)
   private
   private
     FClients: TList;
     FClients: TList;
@@ -83,76 +82,76 @@ type
   public
   public
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
     destructor Destroy; override;
-    {Reinitializes the fire. }
+    // Reinitializes the fire.
     procedure FireInit;
     procedure FireInit;
-    {Spawns a large quantity of particles to simulate an isotropic explosion. 
+    (* Spawns a large quantity of particles to simulate an isotropic explosion.
        This method generates an isotropic explosion, i.e. there is no
        This method generates an isotropic explosion, i.e. there is no
-       privilegied direction in the initial vector. }
+       privilegied direction in the initial vector. *)
     procedure IsotropicExplosion(minInitialSpeed, maxInitialSpeed, lifeBoostFactor: Single;
     procedure IsotropicExplosion(minInitialSpeed, maxInitialSpeed, lifeBoostFactor: Single;
       nbParticles: Integer = -1);
       nbParticles: Integer = -1);
-    {Spawns a large quantity of particles to simulate a ring explosion. 
+    (* Spawns a large quantity of particles to simulate a ring explosion.
        This method generates a ring explosion. The plane of the ring is described
        This method generates a ring explosion. The plane of the ring is described
        by ringVectorX/Y, which should be of unit length (but you may not
        by ringVectorX/Y, which should be of unit length (but you may not
-       make them of unit length if you want "elliptic" rings). }
+       make them of unit length if you want "elliptic" rings). *)
     procedure RingExplosion(minInitialSpeed, maxInitialSpeed, lifeBoostFactor: Single;
     procedure RingExplosion(minInitialSpeed, maxInitialSpeed, lifeBoostFactor: Single;
       const ringVectorX, ringVectorY: TAffineVector;
       const ringVectorX, ringVectorY: TAffineVector;
       nbParticles: Integer = -1);
       nbParticles: Integer = -1);
-    {Current Nb of particles. }
+    // Current Nb of particles.
     property ParticleCount: Integer read NP;
     property ParticleCount: Integer read NP;
     procedure DoProgress(const progressTime: TGLProgressTimes); override;
     procedure DoProgress(const progressTime: TGLProgressTimes); override;
   published
   published
-    {Adjusts the acceleration direction (abs coordinates). }
+    // Adjusts the acceleration direction (abs coordinates).
     property FireDir: TGLCoordinates read FFireDir write SetFireDir;
     property FireDir: TGLCoordinates read FFireDir write SetFireDir;
-    {Adjusts the initial direction (abs coordinates). }
+    // Adjusts the initial direction (abs coordinates).
     property InitialDir: TGLCoordinates read FInitialDir write SetInitialDir;
     property InitialDir: TGLCoordinates read FInitialDir write SetInitialDir;
-    {The cadencer that will "drive" the animation of the system. }
+    // The cadencer that will "drive" the animation of the system.
     property Cadencer: TGLCadencer read FCadencer write SetCadencer;
     property Cadencer: TGLCadencer read FCadencer write SetCadencer;
-    {Maximum number of simultaneous particles in the system. }
+    // Maximum number of simultaneous particles in the system.
     property MaxParticles: Integer read FMaxParticles write SetMaxParticles default 256;
     property MaxParticles: Integer read FMaxParticles write SetMaxParticles default 256;
-    {Size of the particle, in absolute units. }
+    // Size of the particle, in absolute units.
     property ParticleSize: Single read FParticleSize write FParticleSize stored StoreParticleSize;
     property ParticleSize: Single read FParticleSize write FParticleSize stored StoreParticleSize;
-    {Inner color of a particle. }
+    // Inner color of a particle.
     property InnerColor: TGLcolor read FInnerColor write SetInnerColor;
     property InnerColor: TGLcolor read FInnerColor write SetInnerColor;
-    {Outer color of a particle. }
+    // Outer color of a particle.
     property OuterColor: TGLcolor read FOuterColor write SetOuterColor; // default clrWhite;
     property OuterColor: TGLcolor read FOuterColor write SetOuterColor; // default clrWhite;
     property FireDensity: Single read FFireDensity write FFireDensity;
     property FireDensity: Single read FFireDensity write FFireDensity;
     property FireEvaporation: Single read FFireEvaporation write FFireEvaporation;
     property FireEvaporation: Single read FFireEvaporation write FFireEvaporation;
-    {Adjust a crown (circular) radius on which particles are spawned. 
+    (* Adjust a crown (circular) radius on which particles are spawned.
        With a value of zero, the particles are spawned in the FireRadius
        With a value of zero, the particles are spawned in the FireRadius
        cube around the origin, with a non zero value, they appear in
        cube around the origin, with a non zero value, they appear in
-       a torus of major radius FireCrown, and minor radius FireRadius*1.73. }
+       a torus of major radius FireCrown, and minor radius FireRadius*1.73. *)
     property FireCrown: Single read FFireCrown write FFireCrown;
     property FireCrown: Single read FFireCrown write FFireCrown;
-    {Life length of particle. }
+    // Life length of particle.
     property ParticleLife: Integer read FParticleLife write FParticleLife default 3;
     property ParticleLife: Integer read FParticleLife write FParticleLife default 3;
     property FireBurst: Single read FFireBurst write FFireBurst;
     property FireBurst: Single read FFireBurst write FFireBurst;
-    {Adjusts the random birth radius for particles (actually a birth cube). }
+    // Adjusts the random birth radius for particles (actually a birth cube).
     property FireRadius: Single read FFireRadius write FFireRadius;
     property FireRadius: Single read FFireRadius write FFireRadius;
-    {If true, no new particles are spawn. 
-       But current ones continue to live and die. }
+    (* If true, no new particles are spawn.
+       But current ones continue to live and die. *)
     property Disabled: Boolean read FDisabled write FDisabled;
     property Disabled: Boolean read FDisabled write FDisabled;
-    {When paused, the fire animation is freezed. }
+    // When paused, the fire animation is freezed.
     property Paused: Boolean read FPaused write FPaused;
     property Paused: Boolean read FPaused write FPaused;
-    {Interval between particles births (in sec). 
-       The interval may not be honoured if MawParticles is reached. }
+    (* Interval between particles births (in sec).
+       The interval may not be honoured if MawParticles is reached. *)
     property ParticleInterval: Single read FParticleInterval write FParticleInterval;
     property ParticleInterval: Single read FParticleInterval write FParticleInterval;
-    {Enable/disable use of ParticleInterval. 
+    (* Enable/disable use of ParticleInterval.
        If true ParticleInterval is used, if False, the system will attempt
        If true ParticleInterval is used, if False, the system will attempt
        to maintain a particle count of MaxParticles, by spawning new
        to maintain a particle count of MaxParticles, by spawning new
-       particles to replace the dead ones ASAP. }
+       particles to replace the dead ones ASAP. *)
     property UseInterval: Boolean read FUseInterval write FUseInterval;
     property UseInterval: Boolean read FUseInterval write FUseInterval;
-    {Particle's render won't write to Z-Buffer }
+    // Particle's render won't write to Z-Buffer
     property NoZWrite: Boolean read FNoZWrite write FNoZWrite default True;
     property NoZWrite: Boolean read FNoZWrite write FNoZWrite default True;
-    {Specifies an optional object whose position to use as reference.
+    (* Specifies an optional object whose position to use as reference.
        This property allows switching between static/shared fires (for
        This property allows switching between static/shared fires (for
        fireplaces or static torches) and dynamic fire trails.
        fireplaces or static torches) and dynamic fire trails.
        The absolute position of the reference object is 'central' spawning
        The absolute position of the reference object is 'central' spawning
        point for new particles, usually, the object will be the one and only
        point for new particles, usually, the object will be the one and only
-       one on which the effect is applied. }
+       one on which the effect is applied. *)
     property Reference: TGLBaseSceneObject read FReference write SetReference;
     property Reference: TGLBaseSceneObject read FReference write SetReference;
   end;
   end;
 
 
-  { Fire special effect.
-    This effect works as a client of TFireFXManager }
+  (* Fire special effect.
+    This effect works as a client of TFireFXManager *)
   TGLBFireFX = class(TGLObjectPostEffect)
   TGLBFireFX = class(TGLObjectPostEffect)
   private
   private
     FManager: TGLFireFXManager;
     FManager: TGLFireFXManager;
@@ -170,22 +169,21 @@ type
     class function FriendlyDescription: string; override;
     class function FriendlyDescription: string; override;
     procedure Render(var rci: TGLRenderContextInfo); override;
     procedure Render(var rci: TGLRenderContextInfo); override;
   published
   published
-   {Refers the collision manager. }
+   // Refers the collision manager.
     property Manager: TGLFireFXManager read FManager write SetManager;
     property Manager: TGLFireFXManager read FManager write SetManager;
   end;
   end;
 
 
-  {Returns or creates the TGLBFireFX within the given behaviours. 
-   This helper function is convenient way to access a TGLBFireFX. }
+(* Returns or creates the TGLBFireFX within the given behaviours.
+   This helper function is convenient way to access a TGLBFireFX. *)
 function GetOrCreateFireFX(effects: TGLEffects): TGLBFireFX; overload;
 function GetOrCreateFireFX(effects: TGLEffects): TGLBFireFX; overload;
-{Returns or creates the TGLBFireFX within the given object's behaviours. 
- This helper function is convenient way to access a TGLBFireFX. }
+(* Returns or creates the TGLBFireFX within the given object's behaviours.
+   This helper function is convenient way to access a TGLBFireFX. *)
 function GetOrCreateFireFX(obj: TGLBaseSceneObject): TGLBFireFX; overload;
 function GetOrCreateFireFX(obj: TGLBaseSceneObject): TGLBFireFX; overload;
 
 
 // ------------------------------------------------------------------
 // ------------------------------------------------------------------
 implementation
 implementation
 // ------------------------------------------------------------------
 // ------------------------------------------------------------------
 
 
-
 function GetOrCreateFireFX(effects: TGLEffects): TGLBFireFX;
 function GetOrCreateFireFX(effects: TGLEffects): TGLBFireFX;
 var
 var
   i: Integer;
   i: Integer;
@@ -197,7 +195,6 @@ begin
     Result := TGLBFireFX.Create(effects);
     Result := TGLBFireFX.Create(effects);
 end;
 end;
 
 
-
 function GetOrCreateFireFX(obj: TGLBaseSceneObject): TGLBFireFX;
 function GetOrCreateFireFX(obj: TGLBaseSceneObject): TGLBFireFX;
 begin
 begin
   Result := GetOrCreateFireFX(obj.Effects);
   Result := GetOrCreateFireFX(obj.Effects);
@@ -464,7 +461,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLFireFXManager.CalcFire(deltaTime: Double;
 procedure TGLFireFXManager.CalcFire(deltaTime: Double;
   particleInterval, particleLife: Single; fireAlpha: Single);
   particleInterval, particleLife: Single; fireAlpha: Single);
 var
 var
@@ -529,7 +525,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLFireFXManager.AffParticle3d(Color2: TColorVector; const mat: TMatrix);
 procedure TGLFireFXManager.AffParticle3d(Color2: TColorVector; const mat: TMatrix);
 var
 var
   vx, vy: TVector;
   vx, vy: TVector;
@@ -568,13 +563,11 @@ end;
 // ------------------ TGLBFireFX ------------------
 // ------------------ TGLBFireFX ------------------
 // ------------------
 // ------------------
 
 
-
 constructor TGLBFireFX.Create(aOwner: TXCollection);
 constructor TGLBFireFX.Create(aOwner: TXCollection);
 begin
 begin
   inherited Create(aOwner);
   inherited Create(aOwner);
 end;
 end;
 
 
- 
 destructor TGLBFireFX.Destroy;
 destructor TGLBFireFX.Destroy;
 begin
 begin
   Manager := nil;
   Manager := nil;
@@ -587,13 +580,11 @@ begin
   Result := 'FireFX';
   Result := 'FireFX';
 end;
 end;
 
 
-
 class function TGLBFireFX.FriendlyDescription: string;
 class function TGLBFireFX.FriendlyDescription: string;
 begin
 begin
   Result := 'Fire FX';
   Result := 'Fire FX';
 end;
 end;
 
 
-
 procedure TGLBFireFX.WriteToFiler(writer: TWriter);
 procedure TGLBFireFX.WriteToFiler(writer: TWriter);
 begin
 begin
   with writer do
   with writer do
@@ -623,7 +614,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLBFireFX.Loaded;
 procedure TGLBFireFX.Loaded;
 var
 var
   mng: TComponent;
   mng: TComponent;
@@ -638,7 +628,6 @@ begin
   end;
   end;
 end;
 end;
 
 
-
 procedure TGLBFireFX.Assign(Source: TPersistent);
 procedure TGLBFireFX.Assign(Source: TPersistent);
 begin
 begin
   if Source is TGLBFireFX then
   if Source is TGLBFireFX then

+ 11 - 11
Source/GLGameMenu.pas

@@ -14,7 +14,7 @@ uses
   System.Classes,
   System.Classes,
   System.SysUtils,
   System.SysUtils,
 
 
-  Winapi.OpenGL,
+  OpenGLTokens,
   GLVectorTypes,
   GLVectorTypes,
   GLScene,
   GLScene,
   GLCoordinates,
   GLCoordinates,
@@ -222,16 +222,16 @@ begin
         begin
         begin
           libMat.Apply(rci);
           libMat.Apply(rci);
           repeat
           repeat
-            glBegin(GL_QUADS);
-            glTexCoord2f(0, 0);
-            glVertex2f(Position.X - TitleWidth div 2, Y + TitleHeight);
-            glTexCoord2f(1, 0);
-            glVertex2f(Position.X + TitleWidth div 2, Y + TitleHeight);
-            glTexCoord2f(1, 1);
-            glVertex2f(Position.X + TitleWidth div 2, Y);
-            glTexCoord2f(0, 1);
-            glVertex2f(Position.X - TitleWidth div 2, Y);
-            glEnd;
+            gl.Begin_(GL_QUADS);
+            gl.TexCoord2f(0, 0);
+            gl.Vertex2f(Position.X - TitleWidth div 2, Y + TitleHeight);
+            gl.TexCoord2f(1, 0);
+            gl.Vertex2f(Position.X + TitleWidth div 2, Y + TitleHeight);
+            gl.TexCoord2f(1, 1);
+            gl.Vertex2f(Position.X + TitleWidth div 2, Y);
+            gl.TexCoord2f(0, 1);
+            gl.Vertex2f(Position.X - TitleWidth div 2, Y);
+            gl.End_;
           until (not libMat.UnApply(rci));
           until (not libMat.UnApply(rci));
         end;
         end;
       end;
       end;

+ 1 - 1
Source/GLGeomObjects.pas

@@ -13,6 +13,7 @@ interface
 uses
 uses
   System.Math,
   System.Math,
   System.Classes,
   System.Classes,
+  
   OpenGLTokens,
   OpenGLTokens,
   OpenGLAdapter,
   OpenGLAdapter,
   GLScene,
   GLScene,
@@ -453,7 +454,6 @@ end;
 procedure TGLDisk.BuildList(var rci: TGLRenderContextInfo);
 procedure TGLDisk.BuildList(var rci: TGLRenderContextInfo);
 var
 var
   quadric: PGLUquadric;
   quadric: PGLUquadric;
-//  quadric: GLUquadricObj;  from Winapi.OpenGL
 
 
 begin
 begin
   quadric := gluNewQuadric();
   quadric := gluNewQuadric();

+ 1 - 1
Source/GLHUDObjects.pas

@@ -14,7 +14,7 @@ uses
   System.Classes,
   System.Classes,
   Vcl.StdCtrls,
   Vcl.StdCtrls,
 
 
-  Winapi.OpenGL,
+  OpenGLTokens,
   GLScene,
   GLScene,
   GLVectorTypes,
   GLVectorTypes,
   GLCoordinates,
   GLCoordinates,

+ 1 - 1
Source/GLLinePFX.pas

@@ -14,7 +14,7 @@ uses
   System.Classes,
   System.Classes,
   System.SysUtils,
   System.SysUtils,
 
 
-  Winapi.OpenGL,
+  OpenGLTokens,
   GLPersistentClasses,
   GLPersistentClasses,
   GLVectorGeometry,
   GLVectorGeometry,
   GLParticleFX,
   GLParticleFX,

+ 3 - 2
Source/GLMirror.pas

@@ -15,9 +15,10 @@ interface
 {$I GLScene.inc}
 {$I GLScene.inc}
 
 
 uses
 uses
-  Winapi.OpenGL,
   System.Classes,
   System.Classes,
   
   
+  OpenGLTokens,
+  OpenGLAdapter,
   GLScene,
   GLScene,
   GLVectorGeometry,
   GLVectorGeometry,
   GLContext,
   GLContext,
@@ -285,7 +286,7 @@ end;
 procedure TGLMirror.BuildList(var ARci: TGLRenderContextInfo);
 procedure TGLMirror.BuildList(var ARci: TGLRenderContextInfo);
 var
 var
   hw, hh: Single;
   hw, hh: Single;
-  quadric: GLUquadricObj;
+  quadric: PGLUquadricObj;
 begin
 begin
   if msRect = FShape then
   if msRect = FShape then
   begin
   begin

+ 25 - 24
Source/GLNodes.pas

@@ -11,9 +11,10 @@ interface
 {$I GLScene.inc}
 {$I GLScene.inc}
 
 
 uses
 uses
-  Winapi.OpenGL,
   System.Classes,
   System.Classes,
 
 
+  OpenGLTokens,
+  OpenGLAdapter,
   GLVectorTypes,
   GLVectorTypes,
   GLVectorGeometry,
   GLVectorGeometry,
   GLContext,
   GLContext,
@@ -29,8 +30,8 @@ type
     procedure SetAsVector(const Value: TVector);
     procedure SetAsVector(const Value: TVector);
     procedure SetAsAffineVector(const Value: TAffineVector);
     procedure SetAsAffineVector(const Value: TAffineVector);
     function GetAsAffineVector: TAffineVector;
     function GetAsAffineVector: TAffineVector;
-    procedure SetCoordinate(AIndex: Integer; AValue: GLFloat);
-    function GetCoordinate(const Index: Integer): GLFloat;
+    procedure SetCoordinate(AIndex: Integer; AValue: TGLFloat);
+    function GetCoordinate(const Index: Integer): TGLFloat;
   protected
   protected
     function StoreCoordinate(AIndex: Integer): Boolean;
     function StoreCoordinate(AIndex: Integer): Boolean;
     function GetDisplayName: string; override;
     function GetDisplayName: string; override;
@@ -48,12 +49,12 @@ type
       if you don't want so, use DirectVector instead.
       if you don't want so, use DirectVector instead.
       The W component is automatically adjustes depending on style. *)
       The W component is automatically adjustes depending on style. *)
     property AsAffineVector: TAffineVector read GetAsAffineVector write SetAsAffineVector;
     property AsAffineVector: TAffineVector read GetAsAffineVector write SetAsAffineVector;
-    property W: GLFloat index 3 read GetCoordinate write SetCoordinate stored StoreCoordinate;
+    property W: TGLFloat index 3 read GetCoordinate write SetCoordinate stored StoreCoordinate;
     property TagObject: TObject read FTagObject write FTagObject;
     property TagObject: TObject read FTagObject write FTagObject;
   published
   published
-    property X: GLFloat index 0 read GetCoordinate write SetCoordinate stored StoreCoordinate;
-    property Y: GLFloat index 1 read GetCoordinate write SetCoordinate stored StoreCoordinate;
-    property Z: GLFloat index 2 read GetCoordinate write SetCoordinate stored StoreCoordinate;
+    property X: TGLFloat index 0 read GetCoordinate write SetCoordinate stored StoreCoordinate;
+    property Y: TGLFloat index 1 read GetCoordinate write SetCoordinate stored StoreCoordinate;
+    property Z: TGLFloat index 2 read GetCoordinate write SetCoordinate stored StoreCoordinate;
   end;
   end;
 
 
   TGLNodes = class(TOwnedCollection)
   TGLNodes = class(TOwnedCollection)
@@ -73,7 +74,7 @@ type
     procedure EndUpdate; override;
     procedure EndUpdate; override;
     // AddNode (TGLCustomCoordinates)
     // AddNode (TGLCustomCoordinates)
     procedure AddNode(const Coords: TGLCustomCoordinates); overload;
     procedure AddNode(const Coords: TGLCustomCoordinates); overload;
-    procedure AddNode(const X, Y, Z: GLfloat); overload;
+    procedure AddNode(const X, Y, Z: TGLfloat); overload;
     procedure AddNode(const Value: TVector); overload;
     procedure AddNode(const Value: TVector); overload;
     procedure AddNode(const Value: TAffineVector); overload;
     procedure AddNode(const Value: TAffineVector); overload;
     procedure AddXYArc(XRadius, YRadius: Single; StartAngle, StopAngle: Single; NbSegments: Integer;
     procedure AddXYArc(XRadius, YRadius: Single; StartAngle, StopAngle: Single; NbSegments: Integer;
@@ -168,12 +169,12 @@ begin
   SetVector(Result, FCoords);
   SetVector(Result, FCoords);
 end;
 end;
 
 
-function TGLNode.GetCoordinate(const Index: Integer): GLFloat;
+function TGLNode.GetCoordinate(const Index: Integer): TGLFloat;
 begin
 begin
   Result := FCoords.V[Index];
   Result := FCoords.V[Index];
 end;
 end;
 
 
-procedure TGLNode.SetCoordinate(AIndex: Integer; AValue: GLFloat);
+procedure TGLNode.SetCoordinate(AIndex: Integer; AValue: TGLFloat);
 begin
 begin
   FCoords.V[AIndex] := AValue;
   FCoords.V[AIndex] := AValue;
   (Collection as TGLNodes).NotifyChange;
   (Collection as TGLNodes).NotifyChange;
@@ -500,9 +501,9 @@ var
   I: Integer;
   I: Integer;
   Xa, Ya, Za: PFloatArray;
   Xa, Ya, Za: PFloatArray;
 begin
 begin
-  GetMem(Xa, SizeOf(GLFloat) * Count);
-  GetMem(Ya, SizeOf(GLFloat) * Count);
-  GetMem(Za, SizeOf(GLFloat) * Count);
+  GetMem(Xa, SizeOf(TGLFloat) * Count);
+  GetMem(Ya, SizeOf(TGLFloat) * Count);
+  GetMem(Za, SizeOf(TGLFloat) * Count);
   for I := 0 to Count - 1 do
   for I := 0 to Count - 1 do
     with Items[I] do
     with Items[I] do
     begin
     begin
@@ -527,7 +528,7 @@ begin
   Result := @NewVertices[NbExtraVertices - 1];
   Result := @NewVertices[NbExtraVertices - 1];
 end;
 end;
 
 
-procedure TessError(Errno: Cardinal);
+procedure TessError(Errno: TGLuint);
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 begin
 begin
   Assert(False, IntToStr(Errno) + ': ' + string(GluErrorString(Errno)));
   Assert(False, IntToStr(Errno) + ': ' + string(GluErrorString(Errno)));
@@ -537,7 +538,7 @@ procedure TessIssueVertex(VertexData: Pointer);
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 begin
 begin
   xgl.TexCoord2fv(VertexData);
   xgl.TexCoord2fv(VertexData);
-  glVertex3fv(VertexData);
+  gl.Vertex3fv(VertexData);
 end;
 end;
 
 
 procedure TessCombine(Coords: PDoubleVector; Vertex_data: Pointer; Weight: PGLFloat; var OutData: Pointer);
 procedure TessCombine(Coords: PDoubleVector; Vertex_data: Pointer; Weight: PGLFloat; var OutData: Pointer);
@@ -551,7 +552,7 @@ procedure TGLNodes.RenderTesselatedPolygon(ATextured: Boolean; ANormal: PAffineV
   AInvertNormals: Boolean = False);
   AInvertNormals: Boolean = False);
 var
 var
   I: Integer;
   I: Integer;
-  Tess: GLUTesselator;
+  Tess: PGLUTesselator;
   DblVector: TAffineDblVector;
   DblVector: TAffineDblVector;
   Spline: TCubicSpline;
   Spline: TCubicSpline;
   SplinePos: PAffineVector;
   SplinePos: PAffineVector;
@@ -562,19 +563,19 @@ begin
   begin
   begin
     // Creates and initialize the GLU tesselator
     // Creates and initialize the GLU tesselator
     Tess := gluNewTess;
     Tess := gluNewTess;
-    gluTessCallback(Tess, GLU_TESS_BEGIN, @glBegin);
+    gluTessCallback(Tess, GLU_TESS_BEGIN, @gl.Begin_);
     if ATextured then
     if ATextured then
       gluTessCallback(Tess, GLU_TESS_VERTEX, @TessIssueVertex)
       gluTessCallback(Tess, GLU_TESS_VERTEX, @TessIssueVertex)
     else
     else
-      gluTessCallback(Tess, GLU_TESS_VERTEX, @glVertex3fv);
-    gluTessCallback(Tess, GLU_TESS_END, @glEnd);
+      gluTessCallback(Tess, GLU_TESS_VERTEX, @gl.Vertex3fv);
+    gluTessCallback(Tess, GLU_TESS_END, @gl.End_);
     gluTessCallback(Tess, GLU_TESS_ERROR, @TessError);
     gluTessCallback(Tess, GLU_TESS_ERROR, @TessError);
     gluTessCallback(Tess, GLU_TESS_COMBINE, @TessCombine);
     gluTessCallback(Tess, GLU_TESS_COMBINE, @TessCombine);
     NbExtraVertices := 0;
     NbExtraVertices := 0;
     // Issue normal
     // Issue normal
     if Assigned(ANormal) then
     if Assigned(ANormal) then
     begin
     begin
-      glNormal3fv(PGLFloat(ANormal));
+      gl.Normal3fv(PGLFloat(ANormal));
       gluTessNormal(Tess, ANormal^.X, ANormal^.Y, ANormal^.Z);
       gluTessNormal(Tess, ANormal^.X, ANormal^.Y, ANormal^.Z);
     end;
     end;
     // Issue polygon
     // Issue polygon
@@ -589,7 +590,7 @@ begin
         for I := Count - 1 downto 0 do
         for I := Count - 1 downto 0 do
         begin
         begin
           SetVector(DblVector, PAffineVector(Items[I].AsAddress)^);
           SetVector(DblVector, PAffineVector(Items[I].AsAddress)^);
-          gluTessVertex(Tess, @DblVector, Items[I].AsAddress);
+          gluTessVertex(Tess, DblVector, Items[I].AsAddress);
         end;
         end;
       end
       end
       else
       else
@@ -597,7 +598,7 @@ begin
         for I := 0 to Count - 1 do
         for I := 0 to Count - 1 do
         begin
         begin
           SetVector(DblVector, PAffineVector(Items[I].AsAddress)^);
           SetVector(DblVector, PAffineVector(Items[I].AsAddress)^);
-          gluTessVertex(Tess, @DblVector, Items[I].AsAddress);
+          gluTessVertex(Tess, DblVector, Items[I].AsAddress);
         end;
         end;
       end;
       end;
     end
     end
@@ -614,7 +615,7 @@ begin
           SplinePos := AllocNewVertex;
           SplinePos := AllocNewVertex;
           Spline.SplineAffineVector(I * F, SplinePos^);
           Spline.SplineAffineVector(I * F, SplinePos^);
           SetVector(DblVector, SplinePos^);
           SetVector(DblVector, SplinePos^);
-          gluTessVertex(Tess, @DblVector, SplinePos);
+          gluTessVertex(Tess, DblVector, SplinePos);
         end;
         end;
       end
       end
       else
       else
@@ -624,7 +625,7 @@ begin
           SplinePos := AllocNewVertex;
           SplinePos := AllocNewVertex;
           Spline.SplineAffineVector(I * F, SplinePos^);
           Spline.SplineAffineVector(I * F, SplinePos^);
           SetVector(DblVector, SplinePos^);
           SetVector(DblVector, SplinePos^);
-          gluTessVertex(Tess, @DblVector, SplinePos);
+          gluTessVertex(Tess, DblVector, SplinePos);
         end;
         end;
       end;
       end;
       Spline.Free;
       Spline.Free;

+ 15 - 15
Source/GLODEManager.pas

@@ -11,12 +11,12 @@ interface
 {$I GLScene.inc}
 {$I GLScene.inc}
 
 
 uses
 uses
-  Winapi.OpenGL,
   System.Classes,
   System.Classes,
   System.SysUtils,
   System.SysUtils,
   System.Math,
   System.Math,
   System.Types,
   System.Types,
 
 
+  OpenGLTokens,
   GLScene,
   GLScene,
   GLContext,
   GLContext,
   GLVectorGeometry,
   GLVectorGeometry,
@@ -1589,20 +1589,20 @@ begin
   if not(csDesigning in ComponentState) then
   if not(csDesigning in ComponentState) then
     if not VisibleAtRunTime then
     if not VisibleAtRunTime then
       Exit;
       Exit;
-  glPushAttrib(GL_ENABLE_BIT + GL_CURRENT_BIT + GL_POLYGON_BIT);
-  glDisable(GL_LIGHTING);
-  glEnable(GL_POLYGON_OFFSET_LINE);
-  glPolygonOffset(1, 2);
+  gl.PushAttrib(GL_ENABLE_BIT + GL_CURRENT_BIT + GL_POLYGON_BIT);
+  gl.Disable(GL_LIGHTING);
+  gl.Enable(GL_POLYGON_OFFSET_LINE);
+  gl.PolygonOffset(1, 2);
 
 
   for i := 0 to FODEBehaviours.Count - 1 do
   for i := 0 to FODEBehaviours.Count - 1 do
   begin
   begin
     if ODEBehaviours[i] is TGLODEDynamic then
     if ODEBehaviours[i] is TGLODEDynamic then
       if TGLODEDynamic(ODEBehaviours[i]).GetEnabled then
       if TGLODEDynamic(ODEBehaviours[i]).GetEnabled then
-        glColor4fv(PGLFloat(GeomColorDynE.AsAddress))
+        gl.Color4fv(PGLFloat(GeomColorDynE.AsAddress))
       else
       else
-        glColor4fv(PGLFloat(GeomColorDynD.AsAddress))
+        gl.Color4fv(PGLFloat(GeomColorDynD.AsAddress))
     else
     else
-      glColor4fv(PGLFloat(GeomColorStat.AsAddress));
+      gl.Color4fv(PGLFloat(GeomColorStat.AsAddress));
 
 
     ODEBehaviours[i].Render(rci);
     ODEBehaviours[i].Render(rci);
   end;
   end;
@@ -5206,14 +5206,14 @@ var
 begin
 begin
   if FRenderContacts and (FContactRenderPoints.Count>0) then
   if FRenderContacts and (FContactRenderPoints.Count>0) then
   begin
   begin
-    glPushAttrib(GL_CURRENT_BIT);
-    glColor3fv(PGLfloat(FContactColor.AsAddress));
-    glPointSize(FPointSize);
-    glBegin(GL_POINTS);
+    gl.PushAttrib(GL_CURRENT_BIT);
+    gl.Color3fv(PGLfloat(FContactColor.AsAddress));
+    gl.PointSize(FPointSize);
+    gl.Begin_(GL_POINTS);
     for i := 0 to FContactRenderPoints.Count - 1 do
     for i := 0 to FContactRenderPoints.Count - 1 do
-      glVertex3fv(@FContactRenderPoints.List[i]);
-    glEnd;
-    glPopAttrib;
+      gl.Vertex3fv(@FContactRenderPoints.List[i]);
+    gl.End_;
+    gl.PopAttrib;
   end;
   end;
   FContactRenderPoints.Clear;
   FContactRenderPoints.Clear;
 end;
 end;

+ 3 - 3
Source/GLObjects.pas

@@ -20,16 +20,16 @@ interface
 {$I GLScene.inc}
 {$I GLScene.inc}
 
 
 uses
 uses
-  Winapi.OpenGL,
   System.Types,
   System.Types,
   System.Classes,
   System.Classes,
   System.SysUtils,
   System.SysUtils,
   System.Math,
   System.Math,
+
+  OpenGLTokens,
+  OpenGLAdapter,
   GLVectorGeometry,
   GLVectorGeometry,
   GLVectorTypes,
   GLVectorTypes,
   GLScene,
   GLScene,
-  OpenGLAdapter,
-  OpenGLTokens,
   GLVectorLists,
   GLVectorLists,
   GLPipelineTransformation,
   GLPipelineTransformation,
   GLContext,
   GLContext,

+ 0 - 1
Source/GLPhysics.pas

@@ -11,7 +11,6 @@ uses
   System.SysUtils,
   System.SysUtils,
   Vcl.Dialogs,
   Vcl.Dialogs,
 
 
-  Winapi.OpenGL,
   XCollection,
   XCollection,
   GLScene,
   GLScene,
   GLVectorGeometry,
   GLVectorGeometry,

+ 5 - 6
Source/GLPipelineTransformation.pas

@@ -11,8 +11,7 @@ interface
 {$I GLScene.inc}
 {$I GLScene.inc}
 
 
 uses
 uses
-  Winapi.OpenGL,
-  Winapi.OpenGLext,
+  OpenGLTokens,
   GLVectorGeometry,
   GLVectorGeometry,
   GLVectorTypes,
   GLVectorTypes,
   GLS.Logger;
   GLS.Logger;
@@ -116,9 +115,9 @@ end;
 
 
 procedure TGLTransformation.LoadProjectionMatrix;
 procedure TGLTransformation.LoadProjectionMatrix;
 begin
 begin
-  glMatrixMode(GL_PROJECTION);
-  glLoadMatrixf(PGLFloat(@FStack[FStackPos].FProjectionMatrix));
-  glMatrixMode(GL_MODELVIEW);
+  gl.MatrixMode(GL_PROJECTION);
+  gl.LoadMatrixf(PGLFloat(@FStack[FStackPos].FProjectionMatrix));
+  gl.MatrixMode(GL_MODELVIEW);
 end;
 end;
 
 
 function TGLTransformation.GetModelViewMatrix: PMatrix;
 function TGLTransformation.GetModelViewMatrix: PMatrix;
@@ -134,7 +133,7 @@ end;
 
 
 procedure TGLTransformation.LoadModelViewMatrix;
 procedure TGLTransformation.LoadModelViewMatrix;
 begin
 begin
-  glLoadMatrixf(PGLFloat(GetModelViewMatrix));
+  gl.LoadMatrixf(PGLFloat(GetModelViewMatrix));
 end;
 end;
 
 
 procedure TGLTransformation.IdentityAll;
 procedure TGLTransformation.IdentityAll;

+ 27 - 26
Source/GLPolyhedron.pas

@@ -11,10 +11,11 @@ interface
 {$I GLScene.inc}
 {$I GLScene.inc}
 
 
 uses
 uses
-  Winapi.OpenGL,
   System.Classes,
   System.Classes,
 
 
+  OpenGLTokens,
   GLScene,
   GLScene,
+  GLContext,
   GLVectorGeometry,
   GLVectorGeometry,
   GLObjects,
   GLObjects,
   GLVectorFileObjects,
   GLVectorFileObjects,
@@ -90,11 +91,11 @@ begin
     faceIndices := @triangles[i, 0];
     faceIndices := @triangles[i, 0];
     n := CalcPlaneNormal(vertices[faceIndices^[0]], vertices[faceIndices^[1]],
     n := CalcPlaneNormal(vertices[faceIndices^[0]], vertices[faceIndices^[1]],
       vertices[faceIndices^[2]]);
       vertices[faceIndices^[2]]);
-    glNormal3fv(@n);
-    glBegin(GL_TRIANGLES);
+    gl.Normal3fv(@n);
+    gl.Begin_(GL_TRIANGLES);
       for j := 0 to 2 do
       for j := 0 to 2 do
-        glVertex3fv(@vertices[faceIndices^[j]]);
-    glEnd;
+        gl.Vertex3fv(@vertices[faceIndices^[j]]);
+    gl.End_();
   end;
   end;
 end;
 end;
 
 
@@ -132,11 +133,11 @@ begin
 
 
     n := CalcPlaneNormal(vertices[faceIndices^[0]], vertices[faceIndices^[1]],
     n := CalcPlaneNormal(vertices[faceIndices^[0]], vertices[faceIndices^[1]],
       vertices[faceIndices^[2]]);
       vertices[faceIndices^[2]]);
-    glNormal3fv(@n);
-    glBegin(GL_TRIANGLES);
+    gl.Normal3fv(@n);
+    gl.Begin_(GL_TRIANGLES);
     for j := 0 to 2 do
     for j := 0 to 2 do
-      glVertex3fv(@vertices[faceIndices^[j]]);
-    glEnd;
+      gl.Vertex3fv(@vertices[faceIndices^[j]]);
+    gl.End_();
   end;
   end;
 end;
 end;
 
 
@@ -172,11 +173,11 @@ begin
   begin
   begin
     faceIndices := @Quadrangles[i, 0];
     faceIndices := @Quadrangles[i, 0];
     n := CalcPlaneNormal(vertices[faceIndices^[0]], vertices[faceIndices^[1]], vertices[faceIndices^[2]]);
     n := CalcPlaneNormal(vertices[faceIndices^[0]], vertices[faceIndices^[1]], vertices[faceIndices^[2]]);
-    glNormal3fv(@n);
-    glBegin(GL_QUADS);
+    gl.Normal3fv(@n);
+    gl.Begin_(GL_QUADS);
       for j := 0 to 7 do
       for j := 0 to 7 do
-      glVertex3fv(@vertices[faceIndices^[j]]);
-    glEnd;
+      gl.Vertex3fv(@vertices[faceIndices^[j]]);
+    gl.End_();
   end;
   end;
 end;
 end;
 
 
@@ -214,21 +215,21 @@ begin
     faceIndices := @polygons[i, 0];
     faceIndices := @polygons[i, 0];
     n := CalcPlaneNormal(vertices[faceIndices^[0]], vertices[faceIndices^[1]],
     n := CalcPlaneNormal(vertices[faceIndices^[0]], vertices[faceIndices^[1]],
       vertices[faceIndices^[2]]);
       vertices[faceIndices^[2]]);
-    glNormal3fv(@n);
+    gl.Normal3fv(@n);
 
 
-//    glBegin(GL_TRIANGLE_FAN);
+//    gl.Begin_(GL_TRIANGLE_FAN);
 //    for j := 0 to 4 do
 //    for j := 0 to 4 do
-//      glVertex3fv(@vertices[faceIndices^[j]]);
-//    glEnd;
+//      gl.Vertex3fv(@vertices[faceIndices^[j]]);
+//    gl.End_();
 
 
-    glBegin(GL_TRIANGLES);
+    gl.Begin_(GL_TRIANGLES);
     for j := 1 to 3 do
     for j := 1 to 3 do
     begin
     begin
-      glVertex3fv(@vertices[faceIndices^[0]]);
-      glVertex3fv(@vertices[faceIndices^[j]]);
-      glVertex3fv(@vertices[faceIndices^[j+1]]);
+      gl.Vertex3fv(@vertices[faceIndices^[0]]);
+      gl.Vertex3fv(@vertices[faceIndices^[j]]);
+      gl.Vertex3fv(@vertices[faceIndices^[j+1]]);
     end;
     end;
-    glEnd;
+    gl.End_();
   end;
   end;
 end;
 end;
 
 
@@ -263,12 +264,12 @@ begin
 
 
     n := CalcPlaneNormal(vertices[faceIndices^[0]], vertices[faceIndices^[1]],
     n := CalcPlaneNormal(vertices[faceIndices^[0]], vertices[faceIndices^[1]],
       vertices[faceIndices^[2]]);
       vertices[faceIndices^[2]]);
-    glNormal3fv(@n);
+    gl.Normal3fv(@n);
 
 
-    glBegin(GL_TRIANGLES);
+    gl.Begin_(GL_TRIANGLES);
     for j := 0 to 2 do
     for j := 0 to 2 do
-      glVertex3fv(@vertices[faceIndices^[j]]);
-    glEnd;
+      gl.Vertex3fv(@vertices[faceIndices^[j]]);
+    gl.End_();
   end;
   end;
 end;
 end;
 
 

+ 27 - 27
Source/GLRandomHDS.pas

@@ -46,7 +46,6 @@ unit GLRandomHDS;
 interface
 interface
 
 
 uses
 uses
-  Winapi.OpenGL,
   Winapi.Windows,
   Winapi.Windows,
   System.Classes,
   System.Classes,
   System.Math,
   System.Math,
@@ -57,6 +56,7 @@ uses
   Vcl.Imaging.jpeg,
   Vcl.Imaging.jpeg,
   Vcl.Forms,
   Vcl.Forms,
 
 
+  OpenGLTokens,
   GLScene,
   GLScene,
   GLVectorTypes,
   GLVectorTypes,
   GLVectorGeometry,
   GLVectorGeometry,
@@ -2685,9 +2685,9 @@ const
     end;
     end;
     SinCos(WaterPhase(px, py) * FWaveSpeed, sa, ca);
     SinCos(WaterPhase(px, py) * FWaveSpeed, sa, ca);
     colorRatio := 1 - alpha * 0.1;
     colorRatio := 1 - alpha * 0.1;
-    glColor4f(r * colorRatio, g * colorRatio, b, alpha);
-    glTexCoord2f(px * 0.01 + 0.002 * sa, py * 0.01 + 0.0022 * ca - t * 0.01);
-    glVertex3f(px, py, FSeaLevel + FWaveAmplitude * sa * VSF);
+    gl.Color4f(r * colorRatio, g * colorRatio, b, alpha);
+    gl.TexCoord2f(px * 0.01 + 0.002 * sa, py * 0.01 + 0.0022 * ca - t * 0.01);
+    gl.Vertex3f(px, py, FSeaLevel + FWaveAmplitude * sa * VSF);
   end;
   end;
 
 
 begin
 begin
@@ -2696,16 +2696,16 @@ begin
   FTerrainRenderer.MaterialLibrary.ApplyMaterial(FSeaMaterialName, rci);
   FTerrainRenderer.MaterialLibrary.ApplyMaterial(FSeaMaterialName, rci);
   repeat
   repeat
     // if not WasAboveWater then InverTGLFrontFace;
     // if not WasAboveWater then InverTGLFrontFace;
-    glPushAttrib(GL_ENABLE_BIT);
+    gl.PushAttrib(GL_ENABLE_BIT);
 
 
-    glDisable(GL_LIGHTING);
-    glDisable(GL_NORMALIZE);
+    gl.Disable(GL_LIGHTING);
+    gl.Disable(GL_NORMALIZE);
 
 
-    glStencilFunc(GL_ALWAYS, 1, 255);
-    glStencilMask(255);
-    glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
-    glEnable(GL_STENCIL_TEST);
-    glNormal3f(0, 0, 1);
+    gl.StencilFunc(GL_ALWAYS, 1, 255);
+    gl.StencilMask(255);
+    gl.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
+    gl.Enable(GL_STENCIL_TEST);
+    gl.Normal3f(0, 0, 1);
 
 
     for i := 0 to HeightDatas.Count - 1 do
     for i := 0 to HeightDatas.Count - 1 do
     begin
     begin
@@ -2729,8 +2729,8 @@ begin
       IssuePoint(0, 0);
       IssuePoint(0, 0);
       gl.End_;
       gl.End_;
     end;
     end;
-    glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
-    glPopAttrib;
+    gl.StencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
+    gl.PopAttrib;
     // if not WasAboveWater then InverTGLFrontFace;
     // if not WasAboveWater then InverTGLFrontFace;
     // WaterPolyCount:=heightDatas.Count*8;
     // WaterPolyCount:=heightDatas.Count*8;
   until not FTerrainRenderer.MaterialLibrary.UnApplyMaterial(rci);
   until not FTerrainRenderer.MaterialLibrary.UnApplyMaterial(rci);
@@ -2763,9 +2763,9 @@ const
       alpha := ClampValue(alpha, 0.5, 1);
       alpha := ClampValue(alpha, 0.5, 1);
     end;
     end;
     colorRatio := 1 - alpha * 0.1;
     colorRatio := 1 - alpha * 0.1;
-    glColor4f(r * colorRatio, g * colorRatio, b, alpha);
-    glTexCoord2f(px * 0.01, py * 0.01 + t);
-    glVertex3f(px, py, FSeaLevel);
+    gl.Color4f(r * colorRatio, g * colorRatio, b, alpha);
+    gl.TexCoord2f(px * 0.01, py * 0.01 + t);
+    gl.Vertex3f(px, py, FSeaLevel);
   end;
   end;
 
 
 begin
 begin
@@ -2774,16 +2774,16 @@ begin
   FTerrainRenderer.MaterialLibrary.ApplyMaterial(FSeaMaterialName, rci);
   FTerrainRenderer.MaterialLibrary.ApplyMaterial(FSeaMaterialName, rci);
   repeat
   repeat
     // if not WasAboveWater then InverTGLFrontFace;
     // if not WasAboveWater then InverTGLFrontFace;
-    glPushAttrib(GL_ENABLE_BIT);
+    gl.PushAttrib(GL_ENABLE_BIT);
 
 
-    glDisable(GL_LIGHTING);
-    glDisable(GL_NORMALIZE);
+    gl.Disable(GL_LIGHTING);
+    gl.Disable(GL_NORMALIZE);
 
 
-    glStencilFunc(GL_ALWAYS, 1, 255);
-    glStencilMask(255);
-    glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
-    glEnable(GL_STENCIL_TEST);
-    glNormal3f(0, 0, 1);
+    gl.StencilFunc(GL_ALWAYS, 1, 255);
+    gl.StencilMask(255);
+    gl.StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
+    gl.Enable(GL_STENCIL_TEST);
+    gl.Normal3f(0, 0, 1);
 
 
     for i := 0 to HeightDatas.Count - 1 do
     for i := 0 to HeightDatas.Count - 1 do
     begin
     begin
@@ -2807,8 +2807,8 @@ begin
       IssuePoint(0, 0);
       IssuePoint(0, 0);
       gl.End_;
       gl.End_;
     end;
     end;
-    glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
-    glPopAttrib;
+    gl.StencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
+    gl.PopAttrib;
     // if not WasAboveWater then InverTGLFrontFace;
     // if not WasAboveWater then InverTGLFrontFace;
     // WaterPolyCount:=heightDatas.Count*8;
     // WaterPolyCount:=heightDatas.Count*8;
   until not FTerrainRenderer.MaterialLibrary.UnApplyMaterial(rci);
   until not FTerrainRenderer.MaterialLibrary.UnApplyMaterial(rci);

+ 178 - 210
Source/GLS.OpenGLx.pas

@@ -48,104 +48,72 @@ const
 {$ENDIF}
 {$ENDIF}
 
 
 type
 type
-   TRCOptions = set of (
-      opDoubleBuffered,
-      opGDI,
-      opStereo
-   );
+  TRCOptions = set of (
+     opDoubleBuffered,
+     opGDI,
+     opStereo
+  );
 
 
-   PGLChar     = PAnsiChar;
-   TGLString   = AnsiString;
+  PGLChar     = PAnsiChar;
+  TGLString   = AnsiString;
 
 
 
 
-   GLenum      = Cardinal;
-   {$EXTERNALSYM GLenum}
-   TGLenum     = Cardinal; 
-   PGLenum     = ^TGLenum;
+  TGLenum     = Cardinal;
+  PGLenum     = ^TGLenum;
 
 
-  GLboolean = BYTEBOOL;
-{$EXTERNALSYM GLboolean}
   TGLboolean = BYTEBOOL;
   TGLboolean = BYTEBOOL;
   PGLboolean = ^TGLboolean;
   PGLboolean = ^TGLboolean;
 
 
-  GLbitfield = UINT;
-{$EXTERNALSYM GLbitfield}
   TGLbitfield = UINT;
   TGLbitfield = UINT;
   PGLbitfield = ^TGLbitfield;
   PGLbitfield = ^TGLbitfield;
 
 
-  GLbyte = ShortInt;
-{$EXTERNALSYM GLbyte}
   TGLbyte = ShortInt;
   TGLbyte = ShortInt;
   PGLbyte = ^TGLbyte;
   PGLbyte = ^TGLbyte;
 
 
-  GLshort = SmallInt;
-{$EXTERNALSYM GLshort}
   TGLshort = SmallInt;
   TGLshort = SmallInt;
   PGLshort = ^TGLshort;
   PGLshort = ^TGLshort;
 
 
-  GLint = Integer;
-{$EXTERNALSYM GLint}
   TGLint = Integer;
   TGLint = Integer;
   PGLint = ^Integer;
   PGLint = ^Integer;
 
 
-  GLsizei = Integer;
-{$EXTERNALSYM GLsizei}
   TGLsizei = Integer;
   TGLsizei = Integer;
   PGLsizei = ^TGLsizei;
   PGLsizei = ^TGLsizei;
 
 
-  GLint64 = Int64;
-{$EXTERNALSYM GLint64}
   TGLint64 = Int64;
   TGLint64 = Int64;
   PGLint64 = ^TGLint64;
   PGLint64 = ^TGLint64;
 
 
-  GLint64EXT = Int64;
   TGLint64EXT = Int64;
   TGLint64EXT = Int64;
   PGLint64EXT = ^TGLint64EXT;
   PGLint64EXT = ^TGLint64EXT;
 
 
-  GLuint64 = UInt64;
   TGLuint64 = UInt64;
   TGLuint64 = UInt64;
   PGLuint64 = ^TGLuint64;
   PGLuint64 = ^TGLuint64;
 
 
-  GLuint64EXT = UInt64;
   TGLuint64EXT = UInt64;
   TGLuint64EXT = UInt64;
   PGLuint64EXT = ^TGLuint64EXT;
   PGLuint64EXT = ^TGLuint64EXT;
 
 
-  GLubyte = Byte;
-{$EXTERNALSYM GLubyte}
   TGLubyte = Byte;
   TGLubyte = Byte;
   PGLubyte = System.PByte;
   PGLubyte = System.PByte;
 
 
-  GLushort = Word;
-{$EXTERNALSYM GLushort}
   TGLushort = Word;
   TGLushort = Word;
   PGLushort = System.PWord;
   PGLushort = System.PWord;
 
 
-  GLuint = UINT;
-{$EXTERNALSYM GLuint}
   TGLuint = UINT;
   TGLuint = UINT;
   PGLuint = ^TGLuint;
   PGLuint = ^TGLuint;
 
 
-  GLfloat = Single;
-{$EXTERNALSYM GLfloat}
   TGLfloat = Single;
   TGLfloat = Single;
   PGLfloat = System.PSingle;
   PGLfloat = System.PSingle;
 
 
-  GLclampf = Single;
-{$EXTERNALSYM GLclampf}
   TGLclampf = Single;
   TGLclampf = Single;
   PGLclampf = ^TGLclampf;
   PGLclampf = ^TGLclampf;
 
 
-  GLdouble = Double;
-{$EXTERNALSYM GLdouble}
   TGLdouble = Double;
   TGLdouble = Double;
   PGLdouble = System.PDouble;
   PGLdouble = System.PDouble;
 
 
-  GLclampd = Double;
   TGLclampd = Double;
   TGLclampd = Double;
   PGLclampd = ^TGLclampd;
   PGLclampd = ^TGLclampd;
 
 
-  GLhandleARB = Cardinal;
-  PGLhandleARB = ^GLhandleARB;
+  TGLhandleARB = Cardinal;
+  PGLhandleARB = ^TGLhandleARB;
 
 
   PGLPCharArray = ^PGLChar;
   PGLPCharArray = ^PGLChar;
   PGLvoid = Pointer;
   PGLvoid = Pointer;
@@ -7449,17 +7417,17 @@ var
    glGetQueryObjectuiv: procedure(id: TGLuint; pname: TGLenum; params: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glGetQueryObjectuiv: procedure(id: TGLuint; pname: TGLenum; params: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // promoted to core v1.5 from GL_ARB_vertex_buffer_object (#28)
    // promoted to core v1.5 from GL_ARB_vertex_buffer_object (#28)
-   glBindBuffer: procedure(target: GLenum; buffer: GLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glDeleteBuffers: procedure(n: GLsizei; const buffers: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGenBuffers: procedure(n: GLsizei; buffers: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glIsBuffer: function(buffer: GLuint): GLboolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glBufferData: procedure(target: GLenum; size: GLsizei; const data: Pointer; usage: GLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glBufferSubData: procedure(target: GLenum; offset: GLuint; size: GLsizei; const data: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetBufferSubData: procedure(target: GLenum; offset: GLuint; size: GLsizei; data: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glMapBuffer: function(target: GLenum; access: GLenum): Pointer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUnmapBuffer: function(target: GLenum): GLboolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetBufferParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetBufferPointerv: procedure(target: GLenum; pname: GLenum; params: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glBindBuffer: procedure(target: TGLenum; buffer: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glDeleteBuffers: procedure(n: TGLsizei; const buffers: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGenBuffers: procedure(n: TGLsizei; buffers: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glIsBuffer: function(buffer: TGLuint): TGLboolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glBufferData: procedure(target: TGLenum; size: TGLsizei; const data: Pointer; usage: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glBufferSubData: procedure(target: TGLenum; offset: TGLuint; size: TGLsizei; const data: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetBufferSubData: procedure(target: TGLenum; offset: TGLuint; size: TGLsizei; data: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glMapBuffer: function(target: TGLenum; access: TGLenum): Pointer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUnmapBuffer: function(target: TGLenum): TGLboolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetBufferParameteriv: procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetBufferPointerv: procedure(target: TGLenum; pname: TGLenum; params: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // promoted to core v1.5 from GL_EXT_shadow_funcs (#267)
    // promoted to core v1.5 from GL_EXT_shadow_funcs (#267)
    // (no functions or procedures)
    // (no functions or procedures)
@@ -7473,7 +7441,7 @@ var
    glBlendEquationSeparate: procedure(modeRGB: TGLenum; modeAlpha: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glBlendEquationSeparate: procedure(modeRGB: TGLenum; modeAlpha: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // promoted to core v2.0 from GL_ARB_draw_buffers (#37)
    // promoted to core v2.0 from GL_ARB_draw_buffers (#37)
-   glDrawBuffers: procedure(n: GLSizei; const bufs: PGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glDrawBuffers: procedure(n: TGLsizei; const bufs: PGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // promoted to core v2.0 from GL_ARB_stencil_two_side (no # found)
    // promoted to core v2.0 from GL_ARB_stencil_two_side (no # found)
    glStencilOpSeparate: procedure(face, sfail, dpfail, dppass: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glStencilOpSeparate: procedure(face, sfail, dpfail, dppass: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -7512,25 +7480,25 @@ var
    glLinkProgram: procedure(_program: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glLinkProgram: procedure(_program: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glShaderSource: procedure(shader: TGLuint; count: TGLsizei; const _string: PGLPCharArray; const length: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glShaderSource: procedure(shader: TGLuint; count: TGLsizei; const _string: PGLPCharArray; const length: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glUseProgram: procedure(_program: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glUseProgram: procedure(_program: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform1f: procedure(location: GLint; v0: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform2f: procedure(location: GLint; v0: GLfloat; v1: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform3f: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform4f: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat; v3: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform1i: procedure(location: GLint; v0: GLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform2i: procedure(location: GLint; v0: GLint; v1: GLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform3i: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform4i: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint; v3: GLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform1fv: procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform2fv: procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform3fv: procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform4fv: procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform1iv: procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform2iv: procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform3iv: procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform4iv: procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniformMatrix2fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniformMatrix3fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniformMatrix4fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform1f: procedure(location: TGLint; v0: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform2f: procedure(location: TGLint; v0: TGLfloat; v1: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform3f: procedure(location: TGLint; v0: TGLfloat; v1: TGLfloat; v2: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform4f: procedure(location: TGLint; v0: TGLfloat; v1: TGLfloat; v2: TGLfloat; v3: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform1i: procedure(location: TGLint; v0: TGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform2i: procedure(location: TGLint; v0: TGLint; v1: TGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform3i: procedure(location: TGLint; v0: TGLint; v1: TGLint; v2: TGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform4i: procedure(location: TGLint; v0: TGLint; v1: TGLint; v2: TGLint; v3: TGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform1fv: procedure(location: TGLint; count: TGLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform2fv: procedure(location: TGLint; count: TGLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform3fv: procedure(location: TGLint; count: TGLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform4fv: procedure(location: TGLint; count: TGLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform1iv: procedure(location: TGLint; count: TGLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform2iv: procedure(location: TGLint; count: TGLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform3iv: procedure(location: TGLint; count: TGLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform4iv: procedure(location: TGLint; count: TGLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniformMatrix2fv: procedure(location: TGLint; count: TGLsizei; transpose: TGLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniformMatrix3fv: procedure(location: TGLint; count: TGLsizei; transpose: TGLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniformMatrix4fv: procedure(location: TGLint; count: TGLsizei; transpose: TGLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glValidateProgram: procedure(_program: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glValidateProgram: procedure(_program: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glVertexAttrib1d: procedure(index:TGLuint; x: TGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glVertexAttrib1d: procedure(index:TGLuint; x: TGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glVertexAttrib1dv: procedure(index:TGLuint; v: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glVertexAttrib1dv: procedure(index:TGLuint; v: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -7761,14 +7729,14 @@ var
    wglGetPixelFormatAttribfvARB: function(DC: HDC; iPixelFormat, iLayerPlane: Integer; nAttributes: TGLenum;
    wglGetPixelFormatAttribfvARB: function(DC: HDC; iPixelFormat, iLayerPlane: Integer; nAttributes: TGLenum;
      const piAttributes: PGLint; piValues: PGLFloat) : BOOL; stdcall;
      const piAttributes: PGLint; piValues: PGLFloat) : BOOL; stdcall;
    wglChoosePixelFormatARB: function(DC: HDC; const piAttribIList: PGLint; const pfAttribFList: PGLFloat;
    wglChoosePixelFormatARB: function(DC: HDC; const piAttribIList: PGLint; const pfAttribFList: PGLFloat;
-     nMaxFormats: GLuint; piFormats: PGLint; nNumFormats: PGLenum) : BOOL; stdcall;
+     nMaxFormats: TGLuint; piFormats: PGLint; nNumFormats: PGLenum) : BOOL; stdcall;
 
 
    // WGL_make_current_read (ARB #10)
    // WGL_make_current_read (ARB #10)
    wglMakeContextCurrentARB: function(hDrawDC: HDC; hReadDC: HDC; _hglrc: HGLRC): BOOL; stdcall;
    wglMakeContextCurrentARB: function(hDrawDC: HDC; hReadDC: HDC; _hglrc: HGLRC): BOOL; stdcall;
    wglGetCurrentReadDCARB: function(): HDC; stdcall;
    wglGetCurrentReadDCARB: function(): HDC; stdcall;
 
 
    // WGL_ARB_pbuffer (ARB #11)
    // WGL_ARB_pbuffer (ARB #11)
-   wglCreatePbufferARB: function(DC: HDC; iPixelFormat: GLInt; iWidth, iHeight : GLInt;
+   wglCreatePbufferARB: function(DC: HDC; iPixelFormat: TGLint; iWidth, iHeight : TGLint;
      const piAttribList: PGLint) : HPBUFFERARB; stdcall;
      const piAttribList: PGLint) : HPBUFFERARB; stdcall;
    wglGetPbufferDCARB: function(hPbuffer: HPBUFFERARB) : HDC; stdcall;
    wglGetPbufferDCARB: function(hPbuffer: HPBUFFERARB) : HDC; stdcall;
    wglReleasePbufferDCARB: function(hPbuffer: HPBUFFERARB; DC: HDC) : Integer; stdcall;
    wglReleasePbufferDCARB: function(hPbuffer: HPBUFFERARB; DC: HDC) : Integer; stdcall;
@@ -7860,8 +7828,8 @@ var
    glXReleaseBuffersMESA: function(dpy: PDisplay; d: GLXDrawable): TGLboolean; cdecl;
    glXReleaseBuffersMESA: function(dpy: PDisplay; d: GLXDrawable): TGLboolean; cdecl;
    glXSet3DfxModeMESA: function(mode: TGLint): TGLboolean; cdecl;
    glXSet3DfxModeMESA: function(mode: TGLint): TGLboolean; cdecl;
 
 
-   glXBindTexImageEXT: procedure(dpy: PDisplay; drawable: GLXDrawable; buffer: GLint; const attrib_list: PGLint); cdecl;
-   glXReleaseTexImageEXT: procedure(dpy: PDisplay; drawable: GLXDrawable; buffer: GLint); cdecl;
+   glXBindTexImageEXT: procedure(dpy: PDisplay; drawable: GLXDrawable; buffer: TGLint; const attrib_list: PGLint); cdecl;
+   glXReleaseTexImageEXT: procedure(dpy: PDisplay; drawable: GLXDrawable; buffer: TGLint); cdecl;
 
 
    //GLX 1.4
    //GLX 1.4
    glXMakeCurrentReadSGI: function(dpy: PDisplay; draw: GLXDrawable; read: GLXDrawable; ctx: GLXContext): TGLboolean; cdecl;
    glXMakeCurrentReadSGI: function(dpy: PDisplay; draw: GLXDrawable; read: GLXDrawable; ctx: GLXContext): TGLboolean; cdecl;
@@ -7923,8 +7891,8 @@ var
                          srcLevel: TGLuint; srcX: TGLuint;
                          srcLevel: TGLuint; srcX: TGLuint;
                          srcY: TGLuint; srcZ: TGLuint;
                          srcY: TGLuint; srcZ: TGLuint;
                          dstCtx:GLXContext; dstName:TGLuint; dstTarget: TGLenum; dstLevel: TGLint;
                          dstCtx:GLXContext; dstName:TGLuint; dstTarget: TGLenum; dstLevel: TGLint;
-                         dstX: TGLint; dstY: TGLint; dstZ: TGLint; width: GLsizei; height: GLsizei;
-                         depth: GLsizei); cdecl;
+                         dstX: TGLint; dstY: TGLint; dstZ: TGLint; width: TGLsizei; height: TGLsizei;
+                         depth: TGLsizei); cdecl;
 {$ENDIF}
 {$ENDIF}
 
 
    //  ###########################################################
    //  ###########################################################
@@ -8031,81 +7999,81 @@ var
    glWindowPos3svARB: procedure(v : PGLshort);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glWindowPos3svARB: procedure(v : PGLshort);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_ARB_vertex_program (ARB #26)
    // GL_ARB_vertex_program (ARB #26)
-   glVertexAttrib1dARB: procedure(index: GLuint; x: GLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib1dvARB: procedure(index: GLuint; const v: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib1fARB: procedure(index: GLuint; x: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib1fvARB: procedure(index: GLuint; const v: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib1sARB: procedure(index: GLuint; x: GLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib1svARB: procedure(index: GLuint; const v: PGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib2dARB: procedure(index: GLuint; x: GLdouble; y: GLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib2dvARB: procedure(index: GLuint; const v: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib2fARB: procedure(index: GLuint; x: GLfloat; y: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib2fvARB: procedure(index: GLuint; const v: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib2sARB: procedure(index: GLuint; x: GLshort; y: GLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib2svARB: procedure(index: GLuint; const v: PGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib3dARB: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib3dvARB: procedure(index: GLuint; const v: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib3fARB: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib3fvARB: procedure(index: GLuint; const v: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib3sARB: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib3svARB: procedure(index: GLuint; const v: PGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4NbvARB: procedure(index: GLuint; const v: PGLbyte); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4NivARB: procedure(index: GLuint; const v: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4NsvARB: procedure(index: GLuint; const v: PGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4NubARB: procedure(index: GLuint; x: GLubyte; y: GLubyte; z: GLubyte; w: GLubyte); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4NubvARB: procedure(index: GLuint; const v: PGLubyte); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4NuivARB: procedure(index: GLuint; const v: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4NusvARB: procedure(index: GLuint; const v: PGLushort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4bvARB: procedure(index: GLuint; const v: PGLbyte); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4dARB: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4dvARB: procedure(index: GLuint; const v: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4fARB: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4fvARB: procedure(index: GLuint; const v: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4ivARB: procedure(index: GLuint; const v: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4sARB: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort; w: GLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4svARB: procedure(index: GLuint; const v: PGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4ubvARB: procedure(index: GLuint; const v: PGLubyte); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4uivARB: procedure(index: GLuint; const v: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttrib4usvARB: procedure(index: GLuint; const v: PGLushort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glVertexAttribPointerARB: procedure(index: GLuint; size: GLint; _type: GLenum; normalized: GLboolean; stride: GLsizei; const _pointer: pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glEnableVertexAttribArrayARB: procedure(index: GLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glDisableVertexAttribArrayARB: procedure(index: GLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glProgramStringARB: procedure(target: GLenum; format: GLenum; len: GLsizei; const _string: pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glBindProgramARB: procedure(target: GLenum; _program: GLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glDeleteProgramsARB: procedure(n: GLsizei; const programs: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGenProgramsARB: procedure(n: GLsizei; programs: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glProgramEnvParameter4dARB: procedure(target: GLenum; index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glProgramEnvParameter4dvARB: procedure(target: GLenum; index: GLuint; const params: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glProgramEnvParameter4fARB: procedure(target: GLenum; index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glProgramEnvParameter4fvARB: procedure(target: GLenum; index: GLuint; const params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glProgramLocalParameter4dARB: procedure(target: GLenum; index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glProgramLocalParameter4dvARB: procedure(target: GLenum; index: GLuint; const params: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glProgramLocalParameter4fARB: procedure(target: GLenum; index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glProgramLocalParameter4fvARB: procedure(target: GLenum; index: GLuint; const params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetProgramEnvParameterdvARB: procedure(target: GLenum; index: GLuint; params: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetProgramEnvParameterfvARB: procedure(target: GLenum; index: GLuint; params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetProgramLocalParameterdvARB: procedure(target: GLenum; index: GLuint; params: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetProgramLocalParameterfvARB: procedure(target: GLenum; index: GLuint; params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetProgramivARB: procedure(target: GLenum; pname: GLenum; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetProgramStringARB: procedure(target: GLenum; pname: GLenum; _string: pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetVertexAttribdvARB: procedure(index: GLuint; pname: GLenum; params: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetVertexAttribfvARB: procedure(index: GLuint; pname: GLenum; params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetVertexAttribivARB: procedure(index: GLuint; pname: GLenum; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetVertexAttribPointervARB: procedure(index: GLuint; pname: GLenum; _pointer: pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glIsProgramARB: function(_program: GLuint): GLboolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib1dARB: procedure(index: TGLuint; x: TGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib1dvARB: procedure(index: TGLuint; const v: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib1fARB: procedure(index: TGLuint; x: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib1fvARB: procedure(index: TGLuint; const v: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib1sARB: procedure(index: TGLuint; x: TGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib1svARB: procedure(index: TGLuint; const v: PGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib2dARB: procedure(index: TGLuint; x: TGLdouble; y: TGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib2dvARB: procedure(index: TGLuint; const v: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib2fARB: procedure(index: TGLuint; x: TGLfloat; y: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib2fvARB: procedure(index: TGLuint; const v: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib2sARB: procedure(index: TGLuint; x: TGLshort; y: TGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib2svARB: procedure(index: TGLuint; const v: PGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib3dARB: procedure(index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib3dvARB: procedure(index: TGLuint; const v: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib3fARB: procedure(index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib3fvARB: procedure(index: TGLuint; const v: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib3sARB: procedure(index: TGLuint; x: TGLshort; y: TGLshort; z: TGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib3svARB: procedure(index: TGLuint; const v: PGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4NbvARB: procedure(index: TGLuint; const v: PGLbyte); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4NivARB: procedure(index: TGLuint; const v: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4NsvARB: procedure(index: TGLuint; const v: PGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4NubARB: procedure(index: TGLuint; x: TGLubyte; y: TGLubyte; z: TGLubyte; w: TGLubyte); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4NubvARB: procedure(index: TGLuint; const v: PGLubyte); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4NuivARB: procedure(index: TGLuint; const v: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4NusvARB: procedure(index: TGLuint; const v: PGLushort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4bvARB: procedure(index: TGLuint; const v: PGLbyte); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4dARB: procedure(index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4dvARB: procedure(index: TGLuint; const v: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4fARB: procedure(index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4fvARB: procedure(index: TGLuint; const v: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4ivARB: procedure(index: TGLuint; const v: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4sARB: procedure(index: TGLuint; x: TGLshort; y: TGLshort; z: TGLshort; w: TGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4svARB: procedure(index: TGLuint; const v: PGLshort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4ubvARB: procedure(index: TGLuint; const v: PGLubyte); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4uivARB: procedure(index: TGLuint; const v: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttrib4usvARB: procedure(index: TGLuint; const v: PGLushort); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glVertexAttribPointerARB: procedure(index: TGLuint; size: TGLint; _type: TGLenum; normalized: TGLboolean; stride: TGLsizei; const _pointer: pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glEnableVertexAttribArrayARB: procedure(index: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glDisableVertexAttribArrayARB: procedure(index: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glProgramStringARB: procedure(target: TGLenum; format: TGLenum; len: TGLsizei; const _string: pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glBindProgramARB: procedure(target: TGLenum; _program: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glDeleteProgramsARB: procedure(n: TGLsizei; const programs: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGenProgramsARB: procedure(n: TGLsizei; programs: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glProgramEnvParameter4dARB: procedure(target: TGLenum; index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glProgramEnvParameter4dvARB: procedure(target: TGLenum; index: TGLuint; const params: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glProgramEnvParameter4fARB: procedure(target: TGLenum; index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glProgramEnvParameter4fvARB: procedure(target: TGLenum; index: TGLuint; const params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glProgramLocalParameter4dARB: procedure(target: TGLenum; index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glProgramLocalParameter4dvARB: procedure(target: TGLenum; index: TGLuint; const params: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glProgramLocalParameter4fARB: procedure(target: TGLenum; index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glProgramLocalParameter4fvARB: procedure(target: TGLenum; index: TGLuint; const params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetProgramEnvParameterdvARB: procedure(target: TGLenum; index: TGLuint; params: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetProgramEnvParameterfvARB: procedure(target: TGLenum; index: TGLuint; params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetProgramLocalParameterdvARB: procedure(target: TGLenum; index: TGLuint; params: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetProgramLocalParameterfvARB: procedure(target: TGLenum; index: TGLuint; params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetProgramivARB: procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetProgramStringARB: procedure(target: TGLenum; pname: TGLenum; _string: pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetVertexAttribdvARB: procedure(index: TGLuint; pname: TGLenum; params: PGLdouble); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetVertexAttribfvARB: procedure(index: TGLuint; pname: TGLenum; params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetVertexAttribivARB: procedure(index: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetVertexAttribPointervARB: procedure(index: TGLuint; pname: TGLenum; _pointer: pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glIsProgramARB: function(_program: TGLuint): TGLboolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_ARB_vertex_buffer_object (ARB #28)
    // GL_ARB_vertex_buffer_object (ARB #28)
-   glBindBufferARB: procedure(target: GLenum; buffer: GLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glDeleteBuffersARB: procedure(n: GLsizei; const buffers: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGenBuffersARB: procedure(n: GLsizei; buffers: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glIsBufferARB: function(buffer: GLuint): GLboolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glBufferDataARB: procedure(target: GLenum; size: GLsizei; const data: Pointer; usage: GLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glBufferSubDataARB: procedure(target: GLenum; offset: GLuint; size: GLsizei; const data: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetBufferSubDataARB: procedure(target: GLenum; offset: GLuint; size: GLsizei; data: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glMapBufferARB: function(target: GLenum; access: GLenum): Pointer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUnmapBufferARB: function(target: GLenum): GLboolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetBufferParameterivARB: procedure(target: GLenum; pname: GLenum; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetBufferPointervARB: procedure(target: GLenum; pname: GLenum; params: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glBindBufferARB: procedure(target: TGLenum; buffer: TGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glDeleteBuffersARB: procedure(n: TGLsizei; const buffers: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGenBuffersARB: procedure(n: TGLsizei; buffers: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glIsBufferARB: function(buffer: TGLuint): TGLboolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glBufferDataARB: procedure(target: TGLenum; size: TGLsizei; const data: Pointer; usage: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glBufferSubDataARB: procedure(target: TGLenum; offset: TGLuint; size: TGLsizei; const data: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetBufferSubDataARB: procedure(target: TGLenum; offset: TGLuint; size: TGLsizei; data: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glMapBufferARB: function(target: TGLenum; access: TGLenum): Pointer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUnmapBufferARB: function(target: TGLenum): TGLboolean; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetBufferParameterivARB: procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetBufferPointervARB: procedure(target: TGLenum; pname: TGLenum; params: Pointer); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_ARB_occlusion_query (ARB #29)
    // GL_ARB_occlusion_query (ARB #29)
    glGenQueriesARB: procedure(n: TGLsizei; ids: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glGenQueriesARB: procedure(n: TGLsizei; ids: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -8118,53 +8086,53 @@ var
    glGetQueryObjectuivARB: procedure(id: TGLuint; pname: TGLenum; params: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glGetQueryObjectuivARB: procedure(id: TGLuint; pname: TGLenum; params: PGLuint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_ARB_shader_objects (ARB #30)
    // GL_ARB_shader_objects (ARB #30)
-   glDeleteObjectARB: procedure(obj: GLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetHandleARB: function(pname: GLenum): GLhandleARB; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glDetachObjectARB: procedure(containerObj: GLhandleARB; attachedObj: GLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glCreateShaderObjectARB: function(shaderType: GLenum): GLhandleARB; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glShaderSourceARB: procedure(shaderObj: GLhandleARB; count: GLsizei; const _string: PGLPCharArray; const length: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glCompileShaderARB: procedure(shaderObj: GLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glCreateProgramObjectARB: function(): GLhandleARB; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glAttachObjectARB: procedure(containerObj: GLhandleARB; obj: GLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glLinkProgramARB: procedure(programObj: GLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUseProgramObjectARB: procedure(programObj: GLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glValidateProgramARB: procedure(programObj: GLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform1fARB: procedure(location: GLint; v0: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform2fARB: procedure(location: GLint; v0: GLfloat; v1: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform3fARB: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform4fARB: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat; v3: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform1iARB: procedure(location: GLint; v0: GLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform2iARB: procedure(location: GLint; v0: GLint; v1: GLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform3iARB: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform4iARB: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint; v3: GLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform1fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform2fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform3fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform4fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform1ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform2ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform3ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniform4ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniformMatrix2fvARB: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniformMatrix3fvARB: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniformMatrix4fvARB: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetObjectParameterfvARB: procedure(obj: GLhandleARB; pname: GLenum; params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetObjectParameterivARB: procedure(obj: GLhandleARB; pname: GLenum; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetInfoLogARB: procedure(obj: GLhandleARB; maxLength: GLsizei; length: PGLsizei; infoLog: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetAttachedObjectsARB: procedure(containerObj: GLhandleARB; maxCount: GLsizei; count: PGLsizei; obj: PGLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetUniformLocationARB: function(programObj: GLhandleARB; const name: PGLChar): GLint; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetActiveUniformARB: procedure(programObj: GLhandleARB; index: GLuint; maxLength: GLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetUniformfvARB: procedure(programObj: GLhandleARB; location: GLint; params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetUniformivARB: procedure(programObj: GLhandleARB; location: GLint; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetShaderSourceARB: procedure(obj: GLhandleARB; maxLength: GLsizei; length: PGLsizei; source: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glDeleteObjectARB: procedure(obj: TGLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetHandleARB: function(pname: TGLenum): TGLhandleARB; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glDetachObjectARB: procedure(containerObj: TGLhandleARB; attachedObj: TGLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glCreateShaderObjectARB: function(shaderType: TGLenum): TGLhandleARB; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glShaderSourceARB: procedure(shaderObj: TGLhandleARB; count: TGLsizei; const _string: PGLPCharArray; const length: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glCompileShaderARB: procedure(shaderObj: TGLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glCreateProgramObjectARB: function(): TGLhandleARB; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glAttachObjectARB: procedure(containerObj: TGLhandleARB; obj: TGLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glLinkProgramARB: procedure(programObj: TGLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUseProgramObjectARB: procedure(programObj: TGLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glValidateProgramARB: procedure(programObj: TGLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform1fARB: procedure(location: TGLint; v0: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform2fARB: procedure(location: TGLint; v0: TGLfloat; v1: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform3fARB: procedure(location: TGLint; v0: TGLfloat; v1: TGLfloat; v2: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform4fARB: procedure(location: TGLint; v0: TGLfloat; v1: TGLfloat; v2: TGLfloat; v3: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform1iARB: procedure(location: TGLint; v0: TGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform2iARB: procedure(location: TGLint; v0: TGLint; v1: TGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform3iARB: procedure(location: TGLint; v0: TGLint; v1: TGLint; v2: TGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform4iARB: procedure(location: TGLint; v0: TGLint; v1: TGLint; v2: TGLint; v3: TGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform1fvARB: procedure(location: TGLint; count: TGLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform2fvARB: procedure(location: TGLint; count: TGLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform3fvARB: procedure(location: TGLint; count: TGLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform4fvARB: procedure(location: TGLint; count: TGLsizei; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform1ivARB: procedure(location: TGLint; count: TGLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform2ivARB: procedure(location: TGLint; count: TGLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform3ivARB: procedure(location: TGLint; count: TGLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniform4ivARB: procedure(location: TGLint; count: TGLsizei; value: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniformMatrix2fvARB: procedure(location: TGLint; count: TGLsizei; transpose: TGLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniformMatrix3fvARB: procedure(location: TGLint; count: TGLsizei; transpose: TGLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniformMatrix4fvARB: procedure(location: TGLint; count: TGLsizei; transpose: TGLboolean; value: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetObjectParameterfvARB: procedure(obj: TGLhandleARB; pname: TGLenum; params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetObjectParameterivARB: procedure(obj: TGLhandleARB; pname: TGLenum; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetInfoLogARB: procedure(obj: TGLhandleARB; maxLength: TGLsizei; length: PGLsizei; infoLog: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetAttachedObjectsARB: procedure(containerObj: TGLhandleARB; maxCount: TGLsizei; count: PGLsizei; obj: PGLhandleARB); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetUniformLocationARB: function(programObj: TGLhandleARB; const name: PGLChar): TGLint; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetActiveUniformARB: procedure(programObj: TGLhandleARB; index: TGLuint; maxLength: TGLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetUniformfvARB: procedure(programObj: TGLhandleARB; location: TGLint; params: PGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetUniformivARB: procedure(programObj: TGLhandleARB; location: TGLint; params: PGLint); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetShaderSourceARB: procedure(obj: TGLhandleARB; maxLength: TGLsizei; length: PGLsizei; source: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_ARB_vertex_shader (ARB #31)
    // GL_ARB_vertex_shader (ARB #31)
-   glBindAttribLocationARB: procedure(programObj: GLhandleARB; index: GLuint; const name: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetActiveAttribARB: procedure(programObj: GLhandleARB; index: GLuint; maxLength: GLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glGetAttribLocationARB: function(programObj: GLhandleARB; const name: PGLChar): GLint; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glBindAttribLocationARB: procedure(programObj: TGLhandleARB; index: TGLuint; const name: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetActiveAttribARB: procedure(programObj: TGLhandleARB; index: TGLuint; maxLength: TGLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glGetAttribLocationARB: function(programObj: TGLhandleARB; const name: PGLChar): TGLint; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_ARB_DrawBuffers (ARB #37)
    // GL_ARB_DrawBuffers (ARB #37)
-   glDrawBuffersARB: procedure (n: GLSizei; const bufs: PGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glDrawBuffersARB: procedure (n: TGLsizei; const bufs: PGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_ARB_color_buffer_float (ARB #39)
    // GL_ARB_color_buffer_float (ARB #39)
    glClampColorARB: procedure (target: TGLenum; clamp: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glClampColorARB: procedure (target: TGLenum; clamp: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -8304,14 +8272,14 @@ var
    glTexCoordP3uiv: procedure(_type: TGLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glTexCoordP3uiv: procedure(_type: TGLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glTexCoordP4ui: procedure(_type: TGLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glTexCoordP4ui: procedure(_type: TGLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glTexCoordP4uiv: procedure(_type: TGLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glTexCoordP4uiv: procedure(_type: TGLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glMultiTexCoordP1ui: procedure(texture: TGLenum; _type: GLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glMultiTexCoordP1uiv: procedure(texture: TGLenum; _type: GLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glMultiTexCoordP2ui: procedure(texture: TGLenum; _type: GLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glMultiTexCoordP2uiv: procedure(texture: TGLenum; _type: GLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glMultiTexCoordP3ui: procedure(texture: TGLenum; _type: GLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glMultiTexCoordP3uiv: procedure(texture: TGLenum; _type: GLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glMultiTexCoordP4ui: procedure(texture: TGLenum; _type: GLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glMultiTexCoordP4uiv: procedure(texture: TGLenum; _type: GLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glMultiTexCoordP1ui: procedure(texture: TGLenum; _type: TGLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glMultiTexCoordP1uiv: procedure(texture: TGLenum; _type: TGLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glMultiTexCoordP2ui: procedure(texture: TGLenum; _type: TGLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glMultiTexCoordP2uiv: procedure(texture: TGLenum; _type: TGLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glMultiTexCoordP3ui: procedure(texture: TGLenum; _type: TGLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glMultiTexCoordP3uiv: procedure(texture: TGLenum; _type: TGLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glMultiTexCoordP4ui: procedure(texture: TGLenum; _type: TGLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glMultiTexCoordP4uiv: procedure(texture: TGLenum; _type: TGLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glNormalP3ui: procedure(_type: TGLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glNormalP3ui: procedure(_type: TGLenum; coords: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glNormalP3uiv: procedure(_type: TGLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glNormalP3uiv: procedure(_type: TGLenum; const coords: PGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glColorP3ui: procedure(_type: TGLenum; color: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glColorP3ui: procedure(_type: TGLenum; color: TGLuint);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -8636,7 +8604,7 @@ var
    glActiveStencilFaceEXT: procedure(face: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glActiveStencilFaceEXT: procedure(face: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_ATI_draw_buffers (EXT #277)
    // GL_ATI_draw_buffers (EXT #277)
-   glDrawBuffersATI: procedure(n: GLsizei; const bufs: PGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glDrawBuffersATI: procedure(n: TGLsizei; const bufs: PGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_NV_primitive_restart (EXT #285)
    // GL_NV_primitive_restart (EXT #285)
    glPrimitiveRestartNV: procedure();{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glPrimitiveRestartNV: procedure();{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -8799,12 +8767,12 @@ var
    glGetTransformFeedbackVaryingEXT: procedure(_program: TGLuint; index: TGLuint; bufSize: TGLsizei; length: PGLsizei; size: PGLsizei; _type: PGLenum; name: PGLChar);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glGetTransformFeedbackVaryingEXT: procedure(_program: TGLuint; index: TGLuint; bufSize: TGLsizei; length: PGLsizei; size: PGLsizei; _type: PGLenum; name: PGLChar);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_AMD_vertex_shader_tessellator (#363)
    // GL_AMD_vertex_shader_tessellator (#363)
-   glTessellationFactorAMD: procedure(factor: GLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glTessellationFactorAMD: procedure(factor: TGLfloat); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glTessellationModeAMD: procedure(mode: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glTessellationModeAMD: procedure(mode: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_NV_copy_image (#376)
    // GL_NV_copy_image (#376)
-   glCopyImageSubDataNV: procedure(srcName: GLuint; srcTarget: GLenum; srcLevel: GLint; srcX: GLint; srcY: GLint; srcZ: GLint; dstName: GLuint; dstTarget: GLenum; dstLevel: GLint; dstX: GLint; dstY: GLint; dstZ: GLint;
-     width: GLsizei; height: GLsizei; depth: GLsizei);  {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glCopyImageSubDataNV: procedure(srcName: TGLuint; srcTarget: TGLenum; srcLevel: TGLint; srcX: TGLint; srcY: TGLint; srcZ: TGLint; dstName: TGLuint; dstTarget: TGLenum; dstLevel: TGLint; dstX: TGLint; dstY: TGLint; dstZ: TGLint;
+     width: TGLsizei; height: TGLsizei; depth: TGLsizei);  {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
    // GL_NV_shader_buffer_load (#379)
    // GL_NV_shader_buffer_load (#379)
    glMakeBufferResidentNV: procedure(target: TGLenum; access: TGLenum);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glMakeBufferResidentNV: procedure(target: TGLenum; access: TGLenum);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -8817,7 +8785,7 @@ var
    glGetNamedBufferParameterui64vNV: procedure(buffer: TGLuint; pname: TGLenum; params: PGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glGetNamedBufferParameterui64vNV: procedure(buffer: TGLuint; pname: TGLenum; params: PGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glGetIntegerui64vNV: procedure(value: TGLenum; result: PGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glGetIntegerui64vNV: procedure(value: TGLenum; result: PGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glUniformui64NV: procedure(location: TGLint; value: TGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glUniformui64NV: procedure(location: TGLint; value: TGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glUniformui64vNV: procedure(location: GLint; count: TGLsizei; const value: PGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glUniformui64vNV: procedure(location: TGLint; count: TGLsizei; const value: PGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glGetUniformui64vNV: procedure(_program: TGLuint; location: TGLint; params: PGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glGetUniformui64vNV: procedure(_program: TGLuint; location: TGLint; params: PGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glProgramUniformui64NV: procedure(_program: TGLuint; location: TGLint; value: TGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glProgramUniformui64NV: procedure(_program: TGLuint; location: TGLint; value: TGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glProgramUniformui64vNV: procedure(_program: TGLuint; location: TGLint; count: TGLsizei; const value: PGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glProgramUniformui64vNV: procedure(_program: TGLuint; location: TGLint; count: TGLsizei; const value: PGLuint64EXT);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
@@ -8838,7 +8806,7 @@ var
 
 
    // Special Gremedy debugger extension
    // Special Gremedy debugger extension
    glFrameTerminatorGREMEDY: procedure(); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
    glFrameTerminatorGREMEDY: procedure(); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
-   glStringMarkerGREMEDY: procedure(len: GLsizei; str: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
+   glStringMarkerGREMEDY: procedure(len: TGLsizei; str: PGLChar); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
 
 
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------

+ 1 - 1
Source/GLS.cgShader.pas

@@ -12,7 +12,7 @@ uses
   System.Classes,
   System.Classes,
   System.SysUtils,
   System.SysUtils,
 
 
-  Winapi.OpenGL,
+  OpenGLTokens,
   GLVectorGeometry,
   GLVectorGeometry,
   GLVectorLists,
   GLVectorLists,
   GLVectorTypes,
   GLVectorTypes,

+ 17 - 17
Source/GLTeapot.pas

@@ -10,9 +10,9 @@ interface
 {$I GLScene.inc}
 {$I GLScene.inc}
 
 
 uses
 uses
-  Winapi.OpenGL,
   System.Classes,
   System.Classes,
 
 
+  OpenGLTokens,
   GLScene,
   GLScene,
   GLPersistentClasses,
   GLPersistentClasses,
   GLState,
   GLState,
@@ -113,9 +113,9 @@ begin
   GRD := FGrid;
   GRD := FGrid;
 
 
   rci.GLStates.InvertGLFrontFace;
   rci.GLStates.InvertGLFrontFace;
-  glEnable(GL_AUTO_NORMAL);
-  glEnable(GL_MAP2_VERTEX_3);
-  glEnable(GL_MAP2_TEXTURE_COORD_2);
+  gl.Enable(GL_AUTO_NORMAL);
+  gl.Enable(GL_MAP2_VERTEX_3);
+  gl.Enable(GL_MAP2_TEXTURE_COORD_2);
   for I := 0 to 9 do
   for I := 0 to 9 do
   begin
   begin
     for J := 0 to 3 do
     for J := 0 to 3 do
@@ -140,23 +140,23 @@ begin
         end;
         end;
       end;
       end;
     end;
     end;
-    glMapGrid2f(GRD, 0, 1, GRD, 0, 1);
-    glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, @Tex[0, 0, 0]);
-    glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, @P[0, 0, 0]);
-    glEvalMesh2(GL_FILL, 0, GRD, 0, GRD);
-    glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, @Q[0, 0, 0]);
-    glEvalMesh2(GL_FILL, 0, GRD, 0, GRD);
+    gl.MapGrid2f(GRD, 0, 1, GRD, 0, 1);
+    gl.Map2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, @Tex[0, 0, 0]);
+    gl.Map2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, @P[0, 0, 0]);
+    gl.EvalMesh2(GL_FILL, 0, GRD, 0, GRD);
+    gl.Map2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, @Q[0, 0, 0]);
+    gl.EvalMesh2(GL_FILL, 0, GRD, 0, GRD);
     if I < 6 then
     if I < 6 then
     begin
     begin
-      glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, @R[0, 0, 0]);
-      glEvalMesh2(GL_FILL, 0, GRD, 0, GRD);
-      glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, @S[0, 0, 0]);
-      glEvalMesh2(GL_FILL, 0, GRD, 0, GRD);
+      gl.Map2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, @R[0, 0, 0]);
+      gl.EvalMesh2(GL_FILL, 0, GRD, 0, GRD);
+      gl.Map2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, @S[0, 0, 0]);
+      gl.EvalMesh2(GL_FILL, 0, GRD, 0, GRD);
     end;
     end;
   end;
   end;
-  glDisable(GL_AUTO_NORMAL);
-  glDisable(GL_MAP2_VERTEX_3);
-  glDisable(GL_MAP2_TEXTURE_COORD_2);
+  gl.Disable(GL_AUTO_NORMAL);
+  gl.Disable(GL_MAP2_VERTEX_3);
+  gl.Disable(GL_MAP2_TEXTURE_COORD_2);
   rci.GLStates.InvertGLFrontFace;
   rci.GLStates.InvertGLFrontFace;
 end;
 end;
 
 

文件差异内容过多而无法显示
+ 433 - 706
Source/OpenGLAdapter.pas


+ 1 - 1
Source/OpenGLTokens.pas

@@ -16,7 +16,7 @@ uses
   GLVectorTypes;
   GLVectorTypes;
 
 
 type
 type
-  TGLboolean = BYTEBOOL;  //GLBoolean = byte in Winapi.OpenGL
+  TGLboolean = BYTEBOOL; 
   PGLboolean = ^TGLboolean;
   PGLboolean = ^TGLboolean;
 
 
   TGLbitfield = UINT;
   TGLbitfield = UINT;

部分文件因为文件数量过多而无法显示