浏览代码

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

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

@@ -8,7 +8,7 @@
         <AppType>Application</AppType>
         <FrameworkType>VCL</FrameworkType>
         <ProjectVersion>19.0</ProjectVersion>
-        <Platform Condition="'$(Platform)'==''">Win32</Platform>
+        <Platform Condition="'$(Platform)'==''">Win64</Platform>
     </PropertyGroup>
     <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
         <Base>true</Base>
@@ -150,10 +150,10 @@
                     <Source Name="MainSource">fxy.dpr</Source>
                 </Source>
                 <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>
             </Delphi.Personality>
             <Platforms>

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

@@ -123,6 +123,7 @@
         <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>
         <AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
+        <DCC_UnitSearchPath>..\..\..\..\Source;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
     </PropertyGroup>
     <ItemGroup>
         <DelphiCompile Include="$(MainSource)">
@@ -152,10 +153,10 @@
                     <Source Name="MainSource">Blur.dpr</Source>
                 </Source>
                 <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>
             </Delphi.Personality>
             <Platforms>

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

@@ -76,7 +76,7 @@ var
   I : Integer;
 
 begin
- //SetGLSceneMediaDir();
+  SetGLSceneMediaDir();
   MediaPath := ExtractFilePath(ParamStr(0));
   I := Pos('Samples', MediaPath);
   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">
             <Dependencies/>
         </Projects>
-        <Projects Include="lining\lining.dproj">
+        <Projects Include="lining\LiningShaders.dproj">
             <Dependencies/>
         </Projects>
         <Projects Include="memviewer\memviewer.dproj">
@@ -140,14 +140,14 @@
     <Target Name="invariance:Make">
         <MSBuild Projects="invariance\invariance.dproj" Targets="Make"/>
     </Target>
-    <Target Name="lining">
-        <MSBuild Projects="lining\lining.dproj"/>
+    <Target Name="LiningShaders">
+        <MSBuild Projects="lining\LiningShaders.dproj"/>
     </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 Name="lining:Make">
-        <MSBuild Projects="lining\lining.dproj" Targets="Make"/>
+    <Target Name="LiningShaders:Make">
+        <MSBuild Projects="lining\LiningShaders.dproj" Targets="Make"/>
     </Target>
     <Target Name="memviewer">
         <MSBuild Projects="memviewer\memviewer.dproj"/>
@@ -240,13 +240,13 @@
         <MSBuild Projects="basicsdl\basicsdl.dproj" Targets="Make"/>
     </Target>
     <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 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 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>
     <Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
 </Project>

+ 3 - 2
Packages/GLScene_RT.dpk

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

+ 6 - 5
Packages/GLScene_RT.dproj

@@ -356,6 +356,7 @@
         <DCCReference Include="..\Source\GLS.Memo.pas"/>
         <DCCReference Include="..\Source\GLS.PlugInManager.pas"/>
         <DCCReference Include="..\Source\GLS.OpenGLx.pas"/>
+        <DCCReference Include="..\Source\GLS.vclOpenGL.pas"/>
         <DCCReference Include="..\Source\GLTeapot.pas"/>
         <DCCReference Include="..\Source\GLTerrainRenderer.pas"/>
         <DCCReference Include="..\Source\GLTexCombineShader.pas"/>
@@ -386,13 +387,13 @@
         <DCCReference Include="..\Source\GLWaterPlane.pas"/>
         <DCCReference Include="..\Source\GLSceneViewer.pas"/>
         <DCCReference Include="..\Source\GLWindows.pas"/>
+        <DCCReference Include="..\Source\GLWindowsContext.pas"/>
         <DCCReference Include="..\Source\GLWindowsFont.pas"/>
         <DCCReference Include="..\Source\XCollection.pas"/>
         <DCCReference Include="..\Source\GLzBuffer.pas"/>
         <DCCReference Include="..\Source\OpenGLAdapter.pas"/>
         <DCCReference Include="..\Source\OpenGLTokens.pas"/>
         <DCCReference Include="..\Source\XOpenGL.pas"/>
-        <DCCReference Include="..\Source\GLWindowsContext.pas"/>
         <BuildConfiguration Include="Debug">
             <Key>Cfg_2</Key>
             <CfgParent>Base</CfgParent>
@@ -425,14 +426,14 @@
                 <Platform value="Win64">True</Platform>
             </Platforms>
             <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>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </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>
                         <Overwrite>true</Overwrite>
                     </Platform>

+ 8 - 8
Source/FInfo.pas

@@ -12,7 +12,6 @@ interface
 
 uses
   Winapi.Windows,
-  Winapi.OpenGL,
   System.SysUtils,
   System.Classes,
   Vcl.Forms,
@@ -25,7 +24,8 @@ uses
   Vcl.Menus,
   Vcl.Imaging.jpeg,
 
-  GLS.OpenGLx,
+  OpenGLTokens,
+  OpenGLAdapter,
   GLScene,
   GLSceneViewer,
   GLContext,
@@ -188,8 +188,8 @@ begin
     with aSceneBuffer do
     begin
       // 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();
       pixelFormat := GetPixelFormat(dc);
       DescribePixelFormat(dc, pixelFormat, SizeOf(pfd), pfd);
@@ -200,8 +200,8 @@ begin
         AccLabel.Caption := 'Mini-Client Driver'
       else if (DRIVER_MASK and pfd.dwFlags) = PFD_GENERIC_FORMAT then
         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;
       while Length(ExtStr) > 0 do
       begin
@@ -223,9 +223,9 @@ begin
         StereoLabel.Caption := 'no';
 
       // Include WGL extensions
-      if WGL_ARB_extensions_string then
+      if GL.W_ARB_extensions_string then
       begin
-        ExtStr := String(wglGetExtensionsStringARB(dc));
+        ExtStr := String(gl.WGetExtensionsStringARB(dc));
         while Length(ExtStr) > 0 do
         begin
           i := Pos(' ', ExtStr);

+ 1 - 1
Source/GLBumpShader.pas

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

+ 1 - 1
Source/GLFile3DSSceneObjects.pas

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

+ 1 - 1
Source/GLFilePNG.pas

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

+ 7 - 2
Source/GLFileSTL.pas

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

+ 36 - 47
Source/GLFireFX.pas

@@ -33,7 +33,6 @@ uses
   GLTextureFormat;
 
 type
-
   PFireParticle = ^TFireParticle;
   TFireParticle = record
     Position: TVector;
@@ -46,9 +45,9 @@ type
 
   TGLBFireFX = class;
 
-  { Fire special effect manager.
+  (* Fire special effect manager.
     Defines the looks and behaviour of a particle system that can be made
-    to look fire-like. }
+    to look fire-like. *)
   TGLFireFXManager = class(TGLCadenceAbleComponent)
   private
     FClients: TList;
@@ -83,76 +82,76 @@ type
   public
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
-    {Reinitializes the fire. }
+    // Reinitializes the fire.
     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
-       privilegied direction in the initial vector. }
+       privilegied direction in the initial vector. *)
     procedure IsotropicExplosion(minInitialSpeed, maxInitialSpeed, lifeBoostFactor: Single;
       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
        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;
       const ringVectorX, ringVectorY: TAffineVector;
       nbParticles: Integer = -1);
-    {Current Nb of particles. }
+    // Current Nb of particles.
     property ParticleCount: Integer read NP;
     procedure DoProgress(const progressTime: TGLProgressTimes); override;
   published
-    {Adjusts the acceleration direction (abs coordinates). }
+    // Adjusts the acceleration direction (abs coordinates).
     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;
-    {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;
-    {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;
-    {Size of the particle, in absolute units. }
+    // Size of the particle, in absolute units.
     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;
-    {Outer color of a particle. }
+    // Outer color of a particle.
     property OuterColor: TGLcolor read FOuterColor write SetOuterColor; // default clrWhite;
     property FireDensity: Single read FFireDensity write FFireDensity;
     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
        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;
-    {Life length of particle. }
+    // Life length of particle.
     property ParticleLife: Integer read FParticleLife write FParticleLife default 3;
     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;
-    {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;
-    {When paused, the fire animation is freezed. }
+    // When paused, the fire animation is freezed.
     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;
-    {Enable/disable use of ParticleInterval. 
+    (* Enable/disable use of ParticleInterval.
        If true ParticleInterval is used, if False, the system will attempt
        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;
-    {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;
-    {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
        fireplaces or static torches) and dynamic fire trails.
        The absolute position of the reference object is 'central' spawning
        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;
   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)
   private
     FManager: TGLFireFXManager;
@@ -170,22 +169,21 @@ type
     class function FriendlyDescription: string; override;
     procedure Render(var rci: TGLRenderContextInfo); override;
   published
-   {Refers the collision manager. }
+   // Refers the collision manager.
     property Manager: TGLFireFXManager read FManager write SetManager;
   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;
-{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;
 
 // ------------------------------------------------------------------
 implementation
 // ------------------------------------------------------------------
 
-
 function GetOrCreateFireFX(effects: TGLEffects): TGLBFireFX;
 var
   i: Integer;
@@ -197,7 +195,6 @@ begin
     Result := TGLBFireFX.Create(effects);
 end;
 
-
 function GetOrCreateFireFX(obj: TGLBaseSceneObject): TGLBFireFX;
 begin
   Result := GetOrCreateFireFX(obj.Effects);
@@ -464,7 +461,6 @@ begin
   end;
 end;
 
-
 procedure TGLFireFXManager.CalcFire(deltaTime: Double;
   particleInterval, particleLife: Single; fireAlpha: Single);
 var
@@ -529,7 +525,6 @@ begin
   end;
 end;
 
-
 procedure TGLFireFXManager.AffParticle3d(Color2: TColorVector; const mat: TMatrix);
 var
   vx, vy: TVector;
@@ -568,13 +563,11 @@ end;
 // ------------------ TGLBFireFX ------------------
 // ------------------
 
-
 constructor TGLBFireFX.Create(aOwner: TXCollection);
 begin
   inherited Create(aOwner);
 end;
 
- 
 destructor TGLBFireFX.Destroy;
 begin
   Manager := nil;
@@ -587,13 +580,11 @@ begin
   Result := 'FireFX';
 end;
 
-
 class function TGLBFireFX.FriendlyDescription: string;
 begin
   Result := 'Fire FX';
 end;
 
-
 procedure TGLBFireFX.WriteToFiler(writer: TWriter);
 begin
   with writer do
@@ -623,7 +614,6 @@ begin
   end;
 end;
 
-
 procedure TGLBFireFX.Loaded;
 var
   mng: TComponent;
@@ -638,7 +628,6 @@ begin
   end;
 end;
 
-
 procedure TGLBFireFX.Assign(Source: TPersistent);
 begin
   if Source is TGLBFireFX then

+ 11 - 11
Source/GLGameMenu.pas

@@ -14,7 +14,7 @@ uses
   System.Classes,
   System.SysUtils,
 
-  Winapi.OpenGL,
+  OpenGLTokens,
   GLVectorTypes,
   GLScene,
   GLCoordinates,
@@ -222,16 +222,16 @@ begin
         begin
           libMat.Apply(rci);
           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));
         end;
       end;

+ 1 - 1
Source/GLGeomObjects.pas

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

+ 1 - 1
Source/GLHUDObjects.pas

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

+ 1 - 1
Source/GLLinePFX.pas

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

+ 3 - 2
Source/GLMirror.pas

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

+ 25 - 24
Source/GLNodes.pas

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

+ 15 - 15
Source/GLODEManager.pas

@@ -11,12 +11,12 @@ interface
 {$I GLScene.inc}
 
 uses
-  Winapi.OpenGL,
   System.Classes,
   System.SysUtils,
   System.Math,
   System.Types,
 
+  OpenGLTokens,
   GLScene,
   GLContext,
   GLVectorGeometry,
@@ -1589,20 +1589,20 @@ begin
   if not(csDesigning in ComponentState) then
     if not VisibleAtRunTime then
       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
   begin
     if ODEBehaviours[i] is TGLODEDynamic then
       if TGLODEDynamic(ODEBehaviours[i]).GetEnabled then
-        glColor4fv(PGLFloat(GeomColorDynE.AsAddress))
+        gl.Color4fv(PGLFloat(GeomColorDynE.AsAddress))
       else
-        glColor4fv(PGLFloat(GeomColorDynD.AsAddress))
+        gl.Color4fv(PGLFloat(GeomColorDynD.AsAddress))
     else
-      glColor4fv(PGLFloat(GeomColorStat.AsAddress));
+      gl.Color4fv(PGLFloat(GeomColorStat.AsAddress));
 
     ODEBehaviours[i].Render(rci);
   end;
@@ -5206,14 +5206,14 @@ var
 begin
   if FRenderContacts and (FContactRenderPoints.Count>0) then
   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
-      glVertex3fv(@FContactRenderPoints.List[i]);
-    glEnd;
-    glPopAttrib;
+      gl.Vertex3fv(@FContactRenderPoints.List[i]);
+    gl.End_;
+    gl.PopAttrib;
   end;
   FContactRenderPoints.Clear;
 end;

+ 3 - 3
Source/GLObjects.pas

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

+ 0 - 1
Source/GLPhysics.pas

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

+ 5 - 6
Source/GLPipelineTransformation.pas

@@ -11,8 +11,7 @@ interface
 {$I GLScene.inc}
 
 uses
-  Winapi.OpenGL,
-  Winapi.OpenGLext,
+  OpenGLTokens,
   GLVectorGeometry,
   GLVectorTypes,
   GLS.Logger;
@@ -116,9 +115,9 @@ end;
 
 procedure TGLTransformation.LoadProjectionMatrix;
 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;
 
 function TGLTransformation.GetModelViewMatrix: PMatrix;
@@ -134,7 +133,7 @@ end;
 
 procedure TGLTransformation.LoadModelViewMatrix;
 begin
-  glLoadMatrixf(PGLFloat(GetModelViewMatrix));
+  gl.LoadMatrixf(PGLFloat(GetModelViewMatrix));
 end;
 
 procedure TGLTransformation.IdentityAll;

+ 27 - 26
Source/GLPolyhedron.pas

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

+ 27 - 27
Source/GLRandomHDS.pas

@@ -46,7 +46,6 @@ unit GLRandomHDS;
 interface
 
 uses
-  Winapi.OpenGL,
   Winapi.Windows,
   System.Classes,
   System.Math,
@@ -57,6 +56,7 @@ uses
   Vcl.Imaging.jpeg,
   Vcl.Forms,
 
+  OpenGLTokens,
   GLScene,
   GLVectorTypes,
   GLVectorGeometry,
@@ -2685,9 +2685,9 @@ const
     end;
     SinCos(WaterPhase(px, py) * FWaveSpeed, sa, ca);
     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;
 
 begin
@@ -2696,16 +2696,16 @@ begin
   FTerrainRenderer.MaterialLibrary.ApplyMaterial(FSeaMaterialName, rci);
   repeat
     // 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
     begin
@@ -2729,8 +2729,8 @@ begin
       IssuePoint(0, 0);
       gl.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;
     // WaterPolyCount:=heightDatas.Count*8;
   until not FTerrainRenderer.MaterialLibrary.UnApplyMaterial(rci);
@@ -2763,9 +2763,9 @@ const
       alpha := ClampValue(alpha, 0.5, 1);
     end;
     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;
 
 begin
@@ -2774,16 +2774,16 @@ begin
   FTerrainRenderer.MaterialLibrary.ApplyMaterial(FSeaMaterialName, rci);
   repeat
     // 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
     begin
@@ -2807,8 +2807,8 @@ begin
       IssuePoint(0, 0);
       gl.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;
     // WaterPolyCount:=heightDatas.Count*8;
   until not FTerrainRenderer.MaterialLibrary.UnApplyMaterial(rci);

+ 178 - 210
Source/GLS.OpenGLx.pas

@@ -48,104 +48,72 @@ const
 {$ENDIF}
 
 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;
   PGLboolean = ^TGLboolean;
 
-  GLbitfield = UINT;
-{$EXTERNALSYM GLbitfield}
   TGLbitfield = UINT;
   PGLbitfield = ^TGLbitfield;
 
-  GLbyte = ShortInt;
-{$EXTERNALSYM GLbyte}
   TGLbyte = ShortInt;
   PGLbyte = ^TGLbyte;
 
-  GLshort = SmallInt;
-{$EXTERNALSYM GLshort}
   TGLshort = SmallInt;
   PGLshort = ^TGLshort;
 
-  GLint = Integer;
-{$EXTERNALSYM GLint}
   TGLint = Integer;
   PGLint = ^Integer;
 
-  GLsizei = Integer;
-{$EXTERNALSYM GLsizei}
   TGLsizei = Integer;
   PGLsizei = ^TGLsizei;
 
-  GLint64 = Int64;
-{$EXTERNALSYM GLint64}
   TGLint64 = Int64;
   PGLint64 = ^TGLint64;
 
-  GLint64EXT = Int64;
   TGLint64EXT = Int64;
   PGLint64EXT = ^TGLint64EXT;
 
-  GLuint64 = UInt64;
   TGLuint64 = UInt64;
   PGLuint64 = ^TGLuint64;
 
-  GLuint64EXT = UInt64;
   TGLuint64EXT = UInt64;
   PGLuint64EXT = ^TGLuint64EXT;
 
-  GLubyte = Byte;
-{$EXTERNALSYM GLubyte}
   TGLubyte = Byte;
   PGLubyte = System.PByte;
 
-  GLushort = Word;
-{$EXTERNALSYM GLushort}
   TGLushort = Word;
   PGLushort = System.PWord;
 
-  GLuint = UINT;
-{$EXTERNALSYM GLuint}
   TGLuint = UINT;
   PGLuint = ^TGLuint;
 
-  GLfloat = Single;
-{$EXTERNALSYM GLfloat}
   TGLfloat = Single;
   PGLfloat = System.PSingle;
 
-  GLclampf = Single;
-{$EXTERNALSYM GLclampf}
   TGLclampf = Single;
   PGLclampf = ^TGLclampf;
 
-  GLdouble = Double;
-{$EXTERNALSYM GLdouble}
   TGLdouble = Double;
   PGLdouble = System.PDouble;
 
-  GLclampd = Double;
   TGLclampd = Double;
   PGLclampd = ^TGLclampd;
 
-  GLhandleARB = Cardinal;
-  PGLhandleARB = ^GLhandleARB;
+  TGLhandleARB = Cardinal;
+  PGLhandleARB = ^TGLhandleARB;
 
   PGLPCharArray = ^PGLChar;
   PGLvoid = Pointer;
@@ -7449,17 +7417,17 @@ var
    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)
-   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)
    // (no functions or procedures)
@@ -7473,7 +7441,7 @@ var
    glBlendEquationSeparate: procedure(modeRGB: TGLenum; modeAlpha: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
    // 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)
    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}
    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}
-   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}
    glVertexAttrib1d: procedure(index:TGLuint; x: TGLdouble); {$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;
      const piAttributes: PGLint; piValues: PGLFloat) : BOOL; stdcall;
    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)
    wglMakeContextCurrentARB: function(hDrawDC: HDC; hReadDC: HDC; _hglrc: HGLRC): BOOL; stdcall;
    wglGetCurrentReadDCARB: function(): HDC; stdcall;
 
    // 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;
    wglGetPbufferDCARB: function(hPbuffer: HPBUFFERARB) : HDC; stdcall;
    wglReleasePbufferDCARB: function(hPbuffer: HPBUFFERARB; DC: HDC) : Integer; stdcall;
@@ -7860,8 +7828,8 @@ var
    glXReleaseBuffersMESA: function(dpy: PDisplay; d: GLXDrawable): 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
    glXMakeCurrentReadSGI: function(dpy: PDisplay; draw: GLXDrawable; read: GLXDrawable; ctx: GLXContext): TGLboolean; cdecl;
@@ -7923,8 +7891,8 @@ var
                          srcLevel: TGLuint; srcX: TGLuint;
                          srcY: TGLuint; srcZ: TGLuint;
                          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}
 
    //  ###########################################################
@@ -8031,81 +7999,81 @@ var
    glWindowPos3svARB: procedure(v : PGLshort);{$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
    // 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)
-   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)
    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}
 
    // 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)
-   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)
-   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)
    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}
    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}
-   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}
    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}
@@ -8636,7 +8604,7 @@ var
    glActiveStencilFaceEXT: procedure(face: TGLenum); {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
 
    // 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)
    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}
 
    // 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}
 
    // 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)
    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}
    glGetIntegerui64vNV: procedure(value: TGLenum; result: PGLuint64EXT);{$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}
    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}
@@ -8838,7 +8806,7 @@ var
 
    // Special Gremedy debugger extension
    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.SysUtils,
 
-  Winapi.OpenGL,
+  OpenGLTokens,
   GLVectorGeometry,
   GLVectorLists,
   GLVectorTypes,

+ 17 - 17
Source/GLTeapot.pas

@@ -10,9 +10,9 @@ interface
 {$I GLScene.inc}
 
 uses
-  Winapi.OpenGL,
   System.Classes,
 
+  OpenGLTokens,
   GLScene,
   GLPersistentClasses,
   GLState,
@@ -113,9 +113,9 @@ begin
   GRD := FGrid;
 
   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
   begin
     for J := 0 to 3 do
@@ -140,23 +140,23 @@ begin
         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
     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;
-  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;
 end;
 

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


+ 1 - 1
Source/OpenGLTokens.pas

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

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