From b72e164f0fb64e3301ae8ca217449daf6a9d301d Mon Sep 17 00:00:00 2001 From: FGSFDSFGS Date: Sun, 10 Apr 2016 23:29:32 +0300 Subject: [PATCH] initial commit --- src/editor/Editor.lpi | 264 + src/editor/Editor.lpr | 73 + src/editor/Editor.res | Bin 0 -> 4284 bytes src/editor/Icon.ico | Bin 0 -> 3262 bytes src/editor/f_about.lfm | 117 + src/editor/f_about.pas | 79 + src/editor/f_activationtype.lfm | 75 + src/editor/f_activationtype.pas | 34 + src/editor/f_addresource.lfm | 86 + src/editor/f_addresource.pas | 215 + src/editor/f_addresource_sky.lfm | 31 + src/editor/f_addresource_sky.pas | 211 + src/editor/f_addresource_sound.lfm | 79 + src/editor/f_addresource_sound.pas | 333 + src/editor/f_addresource_texture.lfm | 77 + src/editor/f_addresource_texture.pas | 516 + src/editor/f_choosetype.lfm | 35 + src/editor/f_choosetype.pas | 29 + src/editor/f_keys.lfm | 67 + src/editor/f_keys.pas | 33 + src/editor/f_main.lfm | 3434 ++++++ src/editor/f_main.pas | 6348 ++++++++++ src/editor/f_mapcheck.lfm | 70 + src/editor/f_mapcheck.pas | 160 + src/editor/f_mapoptimization.lfm | 174 + src/editor/f_mapoptimization.pas | 348 + src/editor/f_mapoptions.lfm | 664 ++ src/editor/f_mapoptions.pas | 298 + src/editor/f_maptest.lfm | 223 + src/editor/f_maptest.pas | 182 + src/editor/f_options.lfm | 280 + src/editor/f_options.pas | 242 + src/editor/f_packmap.lfm | 179 + src/editor/f_packmap.pas | 360 + src/editor/f_savemap.lfm | 77 + src/editor/f_savemap.pas | 151 + src/editor/f_saveminimap.lfm | 84 + src/editor/f_saveminimap.pas | 164 + src/editor/f_selectlang.lfm | 42 + src/editor/f_selectlang.pas | 37 + src/editor/f_selectmap.lfm | 58 + src/editor/f_selectmap.pas | 94 + src/editor/g_basic.pas | 306 + src/editor/g_language.pas | 2466 ++++ src/editor/g_map.pas | 2872 +++++ src/editor/g_textures.pas | 311 + src/editor/img/1_new.BMP | Bin 0 -> 1782 bytes src/editor/img/2_open.BMP | Bin 0 -> 1782 bytes src/editor/img/3_save.BMP | Bin 0 -> 1782 bytes src/editor/img/4_map.BMP | Bin 0 -> 1782 bytes src/editor/img/5_layers.BMP | Bin 0 -> 1782 bytes src/editor/img/6_step.BMP | Bin 0 -> 1782 bytes src/editor/img/7_dots.BMP | Bin 0 -> 1784 bytes src/editor/img/8_16.bmp | Bin 0 -> 824 bytes src/editor/img/8_test.bmp | Bin 0 -> 1784 bytes src/editor/img/8_test_en.bmp | Bin 0 -> 1784 bytes src/editor/img/9_SelectMap.bmp | Bin 0 -> 1782 bytes src/editor/img/Arrow-B.bmp | Bin 0 -> 824 bytes src/editor/img/Arrow-BL.bmp | Bin 0 -> 824 bytes src/editor/img/Arrow-BR.bmp | Bin 0 -> 824 bytes src/editor/img/Arrow-L.bmp | Bin 0 -> 824 bytes src/editor/img/Arrow-R.bmp | Bin 0 -> 824 bytes src/editor/img/Arrow-T.bmp | Bin 0 -> 824 bytes src/editor/img/Arrow-TL.bmp | Bin 0 -> 824 bytes src/editor/img/Arrow-TR.bmp | Bin 0 -> 824 bytes src/editor/img/Thumbs.db | Bin 0 -> 56320 bytes src/editor/img/add.bmp | Bin 0 -> 824 bytes src/editor/img/areas.bmp | Bin 0 -> 824 bytes src/editor/img/copy.bmp | Bin 0 -> 824 bytes src/editor/img/cut.bmp | Bin 0 -> 824 bytes src/editor/img/delete.bmp | Bin 0 -> 824 bytes src/editor/img/dots.bmp | Bin 0 -> 824 bytes src/editor/img/editor.bmp | Bin 0 -> 824 bytes src/editor/img/exit.bmp | Bin 0 -> 824 bytes src/editor/img/items.bmp | Bin 0 -> 824 bytes src/editor/img/layers.bmp | Bin 0 -> 824 bytes src/editor/img/map_border.bmp | Bin 0 -> 824 bytes src/editor/img/minimap.bmp | Bin 0 -> 824 bytes src/editor/img/monsters.bmp | Bin 0 -> 824 bytes src/editor/img/new.bmp | Bin 0 -> 824 bytes src/editor/img/open.bmp | Bin 0 -> 824 bytes src/editor/img/optimize.bmp | Bin 0 -> 824 bytes src/editor/img/panels.bmp | Bin 0 -> 824 bytes src/editor/img/paste.bmp | Bin 0 -> 822 bytes src/editor/img/play.bmp | Bin 0 -> 374 bytes src/editor/img/proverka.bmp | Bin 0 -> 824 bytes src/editor/img/save.bmp | Bin 0 -> 824 bytes src/editor/img/save_a_copy.bmp | Bin 0 -> 824 bytes src/editor/img/save_minimap.bmp | Bin 0 -> 824 bytes src/editor/img/select_map.bmp | Bin 0 -> 824 bytes src/editor/img/selectall.bmp | Bin 0 -> 824 bytes src/editor/img/stop.bmp | Bin 0 -> 374 bytes src/editor/img/test.bmp | Bin 0 -> 824 bytes src/editor/img/triggers.bmp | Bin 0 -> 824 bytes src/editor/img/undo.bmp | Bin 0 -> 824 bytes src/editor/img/view.bmp | Bin 0 -> 824 bytes src/editor/img/vpered.bmp | Bin 0 -> 824 bytes src/editor/spectrum.pas | 233 + src/engine/e_fixedbuffer.pas | 300 + src/engine/e_graphics.pas | 1646 +++ src/engine/e_input.pas | 502 + src/engine/e_log.pas | 71 + src/engine/e_sound.pas | 1000 ++ src/engine/e_textures.pas | 435 + src/lib/dgl/GL.pas | 2226 ++++ src/lib/dgl/dglOpenGL.pas | 15296 +++++++++++++++++++++++++ src/lib/dgl/glExt.pas | 9483 +++++++++++++++ src/lib/fmod/fmod.inc | 23 + src/lib/fmod/fmod.pas | 1004 ++ src/lib/fmod/fmoderrors.pas | 125 + src/lib/fmod/fmodpresets.pas | 81 + src/lib/fmod/fmodtypes.pas | 2181 ++++ src/shared/BinEditor.pas | 664 ++ src/shared/CONFIG.pas | 307 + src/shared/CONFIGSIMPLE.pas | 142 + src/shared/MAPDEF.pas | 323 + src/shared/MAPREADER.pas | 394 + src/shared/MAPSTRUCT.pas | 129 + src/shared/MAPWRITER.pas | 325 + src/shared/WADEDITOR.pas | 881 ++ src/shared/WADSTRUCT.pas | 45 + src/shared/codepage.pas | 32 + src/shared/console.pas | 60 + 123 files changed, 59886 insertions(+) create mode 100644 src/editor/Editor.lpi create mode 100644 src/editor/Editor.lpr create mode 100644 src/editor/Editor.res create mode 100644 src/editor/Icon.ico create mode 100644 src/editor/f_about.lfm create mode 100644 src/editor/f_about.pas create mode 100644 src/editor/f_activationtype.lfm create mode 100644 src/editor/f_activationtype.pas create mode 100644 src/editor/f_addresource.lfm create mode 100644 src/editor/f_addresource.pas create mode 100644 src/editor/f_addresource_sky.lfm create mode 100644 src/editor/f_addresource_sky.pas create mode 100644 src/editor/f_addresource_sound.lfm create mode 100644 src/editor/f_addresource_sound.pas create mode 100644 src/editor/f_addresource_texture.lfm create mode 100644 src/editor/f_addresource_texture.pas create mode 100644 src/editor/f_choosetype.lfm create mode 100644 src/editor/f_choosetype.pas create mode 100644 src/editor/f_keys.lfm create mode 100644 src/editor/f_keys.pas create mode 100644 src/editor/f_main.lfm create mode 100644 src/editor/f_main.pas create mode 100644 src/editor/f_mapcheck.lfm create mode 100644 src/editor/f_mapcheck.pas create mode 100644 src/editor/f_mapoptimization.lfm create mode 100644 src/editor/f_mapoptimization.pas create mode 100644 src/editor/f_mapoptions.lfm create mode 100644 src/editor/f_mapoptions.pas create mode 100644 src/editor/f_maptest.lfm create mode 100644 src/editor/f_maptest.pas create mode 100644 src/editor/f_options.lfm create mode 100644 src/editor/f_options.pas create mode 100644 src/editor/f_packmap.lfm create mode 100644 src/editor/f_packmap.pas create mode 100644 src/editor/f_savemap.lfm create mode 100644 src/editor/f_savemap.pas create mode 100644 src/editor/f_saveminimap.lfm create mode 100644 src/editor/f_saveminimap.pas create mode 100644 src/editor/f_selectlang.lfm create mode 100644 src/editor/f_selectlang.pas create mode 100644 src/editor/f_selectmap.lfm create mode 100644 src/editor/f_selectmap.pas create mode 100644 src/editor/g_basic.pas create mode 100644 src/editor/g_language.pas create mode 100644 src/editor/g_map.pas create mode 100644 src/editor/g_textures.pas create mode 100644 src/editor/img/1_new.BMP create mode 100644 src/editor/img/2_open.BMP create mode 100644 src/editor/img/3_save.BMP create mode 100644 src/editor/img/4_map.BMP create mode 100644 src/editor/img/5_layers.BMP create mode 100644 src/editor/img/6_step.BMP create mode 100644 src/editor/img/7_dots.BMP create mode 100644 src/editor/img/8_16.bmp create mode 100644 src/editor/img/8_test.bmp create mode 100644 src/editor/img/8_test_en.bmp create mode 100644 src/editor/img/9_SelectMap.bmp create mode 100644 src/editor/img/Arrow-B.bmp create mode 100644 src/editor/img/Arrow-BL.bmp create mode 100644 src/editor/img/Arrow-BR.bmp create mode 100644 src/editor/img/Arrow-L.bmp create mode 100644 src/editor/img/Arrow-R.bmp create mode 100644 src/editor/img/Arrow-T.bmp create mode 100644 src/editor/img/Arrow-TL.bmp create mode 100644 src/editor/img/Arrow-TR.bmp create mode 100644 src/editor/img/Thumbs.db create mode 100644 src/editor/img/add.bmp create mode 100644 src/editor/img/areas.bmp create mode 100644 src/editor/img/copy.bmp create mode 100644 src/editor/img/cut.bmp create mode 100644 src/editor/img/delete.bmp create mode 100644 src/editor/img/dots.bmp create mode 100644 src/editor/img/editor.bmp create mode 100644 src/editor/img/exit.bmp create mode 100644 src/editor/img/items.bmp create mode 100644 src/editor/img/layers.bmp create mode 100644 src/editor/img/map_border.bmp create mode 100644 src/editor/img/minimap.bmp create mode 100644 src/editor/img/monsters.bmp create mode 100644 src/editor/img/new.bmp create mode 100644 src/editor/img/open.bmp create mode 100644 src/editor/img/optimize.bmp create mode 100644 src/editor/img/panels.bmp create mode 100644 src/editor/img/paste.bmp create mode 100644 src/editor/img/play.bmp create mode 100644 src/editor/img/proverka.bmp create mode 100644 src/editor/img/save.bmp create mode 100644 src/editor/img/save_a_copy.bmp create mode 100644 src/editor/img/save_minimap.bmp create mode 100644 src/editor/img/select_map.bmp create mode 100644 src/editor/img/selectall.bmp create mode 100644 src/editor/img/stop.bmp create mode 100644 src/editor/img/test.bmp create mode 100644 src/editor/img/triggers.bmp create mode 100644 src/editor/img/undo.bmp create mode 100644 src/editor/img/view.bmp create mode 100644 src/editor/img/vpered.bmp create mode 100644 src/editor/spectrum.pas create mode 100644 src/engine/e_fixedbuffer.pas create mode 100644 src/engine/e_graphics.pas create mode 100644 src/engine/e_input.pas create mode 100644 src/engine/e_log.pas create mode 100644 src/engine/e_sound.pas create mode 100644 src/engine/e_textures.pas create mode 100644 src/lib/dgl/GL.pas create mode 100644 src/lib/dgl/dglOpenGL.pas create mode 100644 src/lib/dgl/glExt.pas create mode 100644 src/lib/fmod/fmod.inc create mode 100644 src/lib/fmod/fmod.pas create mode 100644 src/lib/fmod/fmoderrors.pas create mode 100644 src/lib/fmod/fmodpresets.pas create mode 100644 src/lib/fmod/fmodtypes.pas create mode 100644 src/shared/BinEditor.pas create mode 100644 src/shared/CONFIG.pas create mode 100644 src/shared/CONFIGSIMPLE.pas create mode 100644 src/shared/MAPDEF.pas create mode 100644 src/shared/MAPREADER.pas create mode 100644 src/shared/MAPSTRUCT.pas create mode 100644 src/shared/MAPWRITER.pas create mode 100644 src/shared/WADEDITOR.pas create mode 100644 src/shared/WADSTRUCT.pas create mode 100644 src/shared/codepage.pas create mode 100644 src/shared/console.pas diff --git a/src/editor/Editor.lpi b/src/editor/Editor.lpi new file mode 100644 index 0000000..46e8ea6 --- /dev/null +++ b/src/editor/Editor.lpi @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + <UseAppBundle Value="False"/> + <ResourceType Value="res"/> + </General> + <i18n> + <EnableI18N LFM="False"/> + </i18n> + <VersionInfo> + <StringTable ProductVersion=""/> + </VersionInfo> + <BuildModes Count="1"> + <Item1 Name="Default" Default="True"/> + </BuildModes> + <PublishOptions> + <Version Value="2"/> + </PublishOptions> + <RunParams> + <local> + <FormatVersion Value="1"/> + </local> + </RunParams> + <RequiredPackages Count="1"> + <Item1> + <PackageName Value="LCL"/> + </Item1> + </RequiredPackages> + <Units Count="40"> + <Unit0> + <Filename Value="Editor.lpr"/> + <IsPartOfProject Value="True"/> + </Unit0> + <Unit1> + <Filename Value="../lib/dgl/dglOpenGL.pas"/> + <IsPartOfProject Value="True"/> + </Unit1> + <Unit2> + <Filename Value="../engine/e_graphics.pas"/> + <IsPartOfProject Value="True"/> + </Unit2> + <Unit3> + <Filename Value="../engine/e_log.pas"/> + <IsPartOfProject Value="True"/> + </Unit3> + <Unit4> + <Filename Value="../engine/e_textures.pas"/> + <IsPartOfProject Value="True"/> + </Unit4> + <Unit5> + <Filename Value="../shared/MAPSTRUCT.pas"/> + <IsPartOfProject Value="True"/> + </Unit5> + <Unit6> + <Filename Value="../shared/MAPREADER.pas"/> + <IsPartOfProject Value="True"/> + </Unit6> + <Unit7> + <Filename Value="../shared/MAPWRITER.pas"/> + <IsPartOfProject Value="True"/> + </Unit7> + <Unit8> + <Filename Value="../shared/MAPDEF.pas"/> + <IsPartOfProject Value="True"/> + </Unit8> + <Unit9> + <Filename Value="../shared/WADEDITOR.pas"/> + <IsPartOfProject Value="True"/> + </Unit9> + <Unit10> + <Filename Value="../shared/WADSTRUCT.pas"/> + <IsPartOfProject Value="True"/> + </Unit10> + <Unit11> + <Filename Value="../shared/CONFIG.pas"/> + <IsPartOfProject Value="True"/> + </Unit11> + <Unit12> + <Filename Value="f_about.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit12> + <Unit13> + <Filename Value="f_options.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit13> + <Unit14> + <Filename Value="f_main.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit14> + <Unit15> + <Filename Value="g_map.pas"/> + <IsPartOfProject Value="True"/> + </Unit15> + <Unit16> + <Filename Value="f_mapoptions.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit16> + <Unit17> + <Filename Value="f_activationtype.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit17> + <Unit18> + <Filename Value="f_addresource.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit18> + <Unit19> + <Filename Value="f_keys.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit19> + <Unit20> + <Filename Value="f_mapcheck.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit20> + <Unit21> + <Filename Value="f_mapoptimization.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit21> + <Unit22> + <Filename Value="g_basic.pas"/> + <IsPartOfProject Value="True"/> + </Unit22> + <Unit23> + <Filename Value="g_textures.pas"/> + <IsPartOfProject Value="True"/> + </Unit23> + <Unit24> + <Filename Value="f_addresource_texture.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit24> + <Unit25> + <Filename Value="f_savemap.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit25> + <Unit26> + <Filename Value="f_selectmap.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit26> + <Unit27> + <Filename Value="f_addresource_sky.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit27> + <Unit28> + <Filename Value="f_addresource_sound.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit28> + <Unit29> + <Filename Value="spectrum.pas"/> + <IsPartOfProject Value="True"/> + </Unit29> + <Unit30> + <Filename Value="f_saveminimap.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit30> + <Unit31> + <Filename Value="f_packmap.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit31> + <Unit32> + <Filename Value="f_maptest.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit32> + <Unit33> + <Filename Value="f_choosetype.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit33> + <Unit34> + <Filename Value="../lib/fmod/fmod.pas"/> + <IsPartOfProject Value="True"/> + </Unit34> + <Unit35> + <Filename Value="../lib/fmod/fmoderrors.pas"/> + <IsPartOfProject Value="True"/> + </Unit35> + <Unit36> + <Filename Value="../lib/fmod/fmodpresets.pas"/> + <IsPartOfProject Value="True"/> + </Unit36> + <Unit37> + <Filename Value="../lib/fmod/fmodtypes.pas"/> + <IsPartOfProject Value="True"/> + </Unit37> + <Unit38> + <Filename Value="g_language.pas"/> + <IsPartOfProject Value="True"/> + </Unit38> + <Unit39> + <Filename Value="f_selectlang.pas"/> + <IsPartOfProject Value="True"/> + <HasResources Value="True"/> + </Unit39> + </Units> + </ProjectOptions> + <CompilerOptions> + <Version Value="11"/> + <Target> + <Filename Value="../../bin/editor"/> + </Target> + <SearchPaths> + <IncludeFiles Value="..;../lib/dgl;../engine;../shared;../lib/fmod;$(ProjOutDir)"/> + <OtherUnitFiles Value="..;../lib/dgl;../engine;../shared;../lib/fmod"/> + <UnitOutputDirectory Value="../../tmp"/> + <ObjectPath Value=".."/> + </SearchPaths> + <Parsing> + <SyntaxOptions> + <SyntaxMode Value="Delphi"/> + </SyntaxOptions> + </Parsing> + <Linking> + <Debugging> + <GenerateDebugInfo Value="False"/> + </Debugging> + <Options> + <Win32> + <GraphicApplication Value="True"/> + </Win32> + </Options> + </Linking> + <Other> + <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/> + </Other> + </CompilerOptions> + <Debugging> + <Exceptions Count="3"> + <Item1> + <Name Value="EAbort"/> + </Item1> + <Item2> + <Name Value="ECodetoolError"/> + </Item2> + <Item3> + <Name Value="EFOpenError"/> + </Item3> + </Exceptions> + </Debugging> +</CONFIG> diff --git a/src/editor/Editor.lpr b/src/editor/Editor.lpr new file mode 100644 index 0000000..a0da9ce --- /dev/null +++ b/src/editor/Editor.lpr @@ -0,0 +1,73 @@ +program Editor; + +{$MODE Delphi} + +uses + Forms, Interfaces, + dglOpenGL in '../lib/dgl/dglOpenGL.pas', + e_graphics in '../engine/e_graphics.pas', + e_log in '../engine/e_log.pas', + e_textures in '../engine/e_textures.pas', + MAPSTRUCT in '../shared/MAPSTRUCT.pas', + MAPREADER in '../shared/MAPREADER.pas', + MAPWRITER in '../shared/MAPWRITER.pas', + MAPDEF in '../shared/MAPDEF.pas', + WADEDITOR in '../shared/WADEDITOR.pas', + WADSTRUCT in '../shared/WADSTRUCT.pas', + CONFIG in '../shared/CONFIG.pas', + f_about in 'f_about.pas' {AboutForm}, + f_options in 'f_options.pas' {OptionsForm}, + f_main in 'f_main.pas' {MainForm}, + g_map in 'g_map.pas', + f_mapoptions in 'f_mapoptions.pas' {MapOptionsForm}, + f_activationtype in 'f_activationtype.pas' {ActivationTypeForm}, + f_addresource in 'f_addresource.pas' {AddResourceForm}, + f_keys in 'f_keys.pas' {KeysForm}, + f_mapcheck in 'f_mapcheck.pas' {MapCheckForm}, + f_mapoptimization in 'f_mapoptimization.pas' {MapOptimizationForm}, + g_basic in 'g_basic.pas', + g_textures in 'g_textures.pas', + f_addresource_texture in 'f_addresource_texture.pas' {AddTextureForm}, + f_savemap in 'f_savemap.pas' {SaveMapForm}, + f_selectmap in 'f_selectmap.pas' {SelectMapForm}, + f_addresource_sky in 'f_addresource_sky.pas' {AddSkyForm}, + f_addresource_sound in 'f_addresource_sound.pas' {AddSoundForm}, + spectrum in 'spectrum.pas', + f_saveminimap in 'f_saveminimap.pas' {SaveMiniMapForm}, + f_packmap in 'f_packmap.pas' {PackMapForm}, + f_maptest in 'f_maptest.pas' {MapTestForm}, + f_choosetype in 'f_choosetype.pas' {ChooseTypeForm}, + fmod in '../lib/fmod/fmod.pas', + fmoderrors in '../lib/fmod/fmoderrors.pas', + fmodpresets in '../lib/fmod/fmodpresets.pas', + fmodtypes in '../lib/fmod/fmodtypes.pas', + g_language in 'g_language.pas', + f_selectlang in 'f_selectlang.pas' {SelectLanguageForm}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TMainForm, MainForm); + Application.CreateForm(TOptionsForm, OptionsForm); + Application.CreateForm(TAboutForm, AboutForm); + Application.CreateForm(TMapOptionsForm, MapOptionsForm); + Application.CreateForm(TActivationTypeForm, ActivationTypeForm); + Application.CreateForm(TAddResourceForm, AddResourceForm); + Application.CreateForm(TKeysForm, KeysForm); + Application.CreateForm(TMapCheckForm, MapCheckForm); + Application.CreateForm(TMapOptimizationForm, MapOptimizationForm); + Application.CreateForm(TAddTextureForm, AddTextureForm); + Application.CreateForm(TSaveMapForm, SaveMapForm); + Application.CreateForm(TSelectMapForm, SelectMapForm); + Application.CreateForm(TAddSkyForm, AddSkyForm); + Application.CreateForm(TAddSoundForm, AddSoundForm); + Application.CreateForm(TSaveMiniMapForm, SaveMiniMapForm); + Application.CreateForm(TPackMapForm, PackMapForm); + Application.CreateForm(TMapTestForm, MapTestForm); + Application.CreateForm(TChooseTypeForm, ChooseTypeForm); + Application.CreateForm(TSelectLanguageForm, SelectLanguageForm); + if ParamStr(1) <> '' then OpenMap(ParamStr(1), ''); + + Application.Run; +end. diff --git a/src/editor/Editor.res b/src/editor/Editor.res new file mode 100644 index 0000000000000000000000000000000000000000..510ce0f4ab0d2e4bdfe1d327c36d09259fa79dd7 GIT binary patch literal 4284 zcmeH~O-NKx6vxlxi-ICu6lDayMT=-*Y7>+Tv;3&&!zd9U$RtgrX<b#6>$>*wT$l zTNo)6BG`AL`I%)VY9UjprP82Hislzh|9kJe>H3^`PLqokUhjGL-1pA?opaB*BU~aP z72<LUfx4*O-Kc#Jf{lrP3keBTG^1TmR7fnuMBDHrx`{PMF)~?g|5*l(Tuj@Oblm@L z5Pnrv)zc?Wbq441bK%0zjxcn~<!N1AU299L{090;@oQ>oUN$!B;48>~@#1-BXXmo~ z)0XW0smaD&K!lCZA3u5A{_53IINs>;lTlm<7sef{ES4*H!i8WqH#hh8_6lA142)k? zR8(4eTc8>m8s5F@(qTQ*!1yI4CFSMi)z#JDyngfAZnt}YIwdfESy@?SW#z+1kJ{VX zKD_@hJUpz!dZq^a3&n*;von@<tgX0HQCnNv)YR0|(=#+UI6gi;Gc&Wmn};kE1Aam2 zEx1_PvGD%=2le&!Z@aoaefsEdIHsqky~1G`7$5%!IyyS~`};>nM<*vI0iR!3&_(_) z@wc?L^!4?9`TE7_{4qB-2fkN$!0~r?cMl8<jE%X|4i3uX)kR?Wv46BX9N(s<rbOi8 zB>3XPg{RBEUxWINjEqc7Ow7;EgDDPxulRLN{p35H-)CoMJ#d5g1LOak{wc#(oUeob z6(1=Q-5~!W=kn9f{LAU`#h0-jeU<M?g;yo8{GbGWb~u%5x2hXwz_qwdex|Siw={mH ztq>}4OE5+z1TjH^AnPF7dp_d261+&9nCnIIxtWL}ATHM?I!TA<7@dN|Q4&V2$@dy| zn=z59idzl41)0beMDDv%h}XN2EyxU13Z11iJQL^)v}4>u8uyn7owaAm_g{j)2D7yw zi}4`;N~B;EH!b%I3~!hTcm<S4Ib@|QO2lZPOpvW~iE{Dv9=C}gGeyz??ADAJ_TqgE z1%np{n=53ablBg(uG2BgWKg=!|H3H)7R)9JS~#>kcwy}V?ZA4?Up!Xj(?uSK4e{i_ z(#q}P-Ro5l;wc)rO5~JGx`s7*n4g4K8^#29$iZ6XgVkld#82V2`4Tq@(L_S_L0ApX zQyA>oz6-dm6;z9~BURa_n3V`6S~;x5D6xu4(U`?zrXnt}M_)0rjhvz_;GY0Hi<4RA zY{(hQd=_QHE8zrL@TW@e^7)MAhV7N@m}QZ*-Jr?5WPDG@*G%L(9r|Ug(OL{`fNheS z%PP(GrsbZ^MAhUBhJ#cHVJ(%{>NM8p!oyY6sX)pMExUhTH8S%WE#~SgrLWU=zHf2v nSk$au+D_wnv?+Z5+V1|GWTKt?S0FNF#VQLd<+B#53@N_>!{3Ix literal 0 HcmV?d00001 diff --git a/src/editor/Icon.ico b/src/editor/Icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..693426ff7fd22858fe0e18e184e19a01ecd0feb1 GIT binary patch literal 3262 zcmeH{KTKLd9LLW%bZO#dyVcRn)v=o<9ooU6Nr#%~;6T%%9Sm{kMh7~wFxr78kZ1@A z{)-ZjKPr|Y0W{>PSPP^t;u8Y$FVQa^eK`-fzCIZ`aPRlM``x{}&+nJtJs@NN&&UWt z|CD@tOvo@HWE8>@c@8z#o9z?cO=4`S-~O`-Ow7C;d-+1U3DURQ?HlVG+=e$F-XnxY zLmJ$1cItM!L%|Tc0>4*$r_;IZ^KtMV^0&4&Baz5o`L7If<FBX0Mj><$_1D(dcK7z$ z;aK77GrKU45MskAgW(-|grLkoAdpBTsL%EK_(r4AZ2m$~Ua$AyAj)CYsXo5RWU^YV z4u=Dr{qOsdB&k5o(Z{z~EH;~MWp#CTXXohfD3i%>SamAkPcO_*&ds(P&Mtmkbh%u9 zzds(2|2#X(=kt|HrE%9(GIa#}kLJ$^(QY`nw6yH;cz#5qCnv|UESJmWj&SVM$H)Ib zI2=x;Qn_5NSS$iwZ#1~fACiAC6ig<Q=fBPs<*HVzf!`6XJO5ZLmQJTHE?Q*=2iMdw zguePn$C51nE|p3&bNVH8<0FJ>?C)1_zu9cIP$<;vbuj4%&@F#1s7Ah`Tvn@96)wnM zAOE_1&BA-m=ivXuM~SEj>Q8IV_8RNYma7||#j1Xvua=^tqpv==0*!{C?A`T!aRqMf px8f;zmTt*+N}fQ()Y1^frU*0u4MLBgKkIkn4d(ZxV9tw)c?-L2^tu25 literal 0 HcmV?d00001 diff --git a/src/editor/f_about.lfm b/src/editor/f_about.lfm new file mode 100644 index 0000000..2f3e0aa --- /dev/null +++ b/src/editor/f_about.lfm @@ -0,0 +1,117 @@ +object AboutForm: TAboutForm + Left = 414 + Top = 220 + BorderIcons = [biSystemMenu] + BorderStyle = bsSingle + Caption = 'О программе' + ClientHeight = 196 + ClientWidth = 294 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + PixelsPerInch = 96 + object ButtonOK: TButton + Left = 8 + Top = 168 + Width = 281 + Height = 25 + Cancel = True + Caption = 'ОК' + TabOrder = 0 + OnClick = ButtonOKClick + end + object PanelAbout: TPanel + Left = 8 + Top = 8 + Width = 281 + Height = 153 + TabOrder = 1 + object Bevel1: TBevel + Left = 6 + Top = 6 + Width = 265 + Height = 41 + Shape = bsFrame + end + object Bevel2: TBevel + Left = 6 + Top = 54 + Width = 265 + Height = 89 + Shape = bsFrame + end + object LabelTitle: TLabel + Left = 10 + Top = 10 + Width = 87 + Height = 26 + Caption = 'Редактор карт Doom 2D: Forever' + WordWrap = True + end + object LabelVer: TLabel + Left = 200 + Top = 22 + Width = 64 + Height = 13 + Caption = 'Версия 2.0.3' + end + object LabelAuthor: TLabel + Left = 10 + Top = 62 + Width = 76 + Height = 13 + Caption = 'Автор: rs.falcon' + end + object LabelMail: TLabel + Left = 172 + Top = 62 + Width = 92 + Height = 13 + Cursor = crHandPoint + Caption = 'rmw.falcon@mail.ru' + OnClick = LabelMailClick + OnMouseMove = LabelMailMouseMove + OnMouseLeave = LabelMailMouseLeave + end + object LabelSite: TLabel + Left = 10 + Top = 118 + Width = 114 + Height = 13 + Caption = 'Сайт Doom 2D: Forever' + end + object LabelHttp: TLabel + Left = 180 + Top = 118 + Width = 83 + Height = 13 + Cursor = crHandPoint + Caption = 'www.doom2d.org' + OnClick = LabelHttpClick + OnMouseMove = LabelMailMouseMove + OnMouseLeave = LabelMailMouseLeave + end + object LabelAuthor2: TLabel + Left = 10 + Top = 90 + Width = 93 + Height = 13 + Caption = 'Дорабатывал: Pss' + end + object LabelMail2: TLabel + Left = 197 + Top = 90 + Width = 67 + Height = 13 + Cursor = crHandPoint + Caption = 'pssxx@mail.ru' + OnClick = LabelMail2Click + OnMouseMove = LabelMailMouseMove + OnMouseLeave = LabelMailMouseLeave + end + end +end diff --git a/src/editor/f_about.pas b/src/editor/f_about.pas new file mode 100644 index 0000000..3fdd29e --- /dev/null +++ b/src/editor/f_about.pas @@ -0,0 +1,79 @@ +unit f_about; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls, + ExtCtrls; + +type + TAboutForm = class (TForm) + PanelAbout: TPanel; + LabelTitle: TLabel; + LabelVer: TLabel; + LabelAuthor: TLabel; + LabelMail: TLabel; + LabelSite: TLabel; + LabelHttp: TLabel; + Bevel1: TBevel; + Bevel2: TBevel; + ButtonOK: TButton; + LabelAuthor2: TLabel; + LabelMail2: TLabel; + + procedure LabelMailClick(Sender: TObject); + procedure LabelMailMouseMove(Sender: TObject; Shift: TShiftState; X, + Y: Integer); + procedure LabelMailMouseLeave(Sender: TObject); + procedure LabelHttpClick(Sender: TObject); + procedure ButtonOKClick(Sender: TObject); + procedure LabelMail2Click(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + AboutForm: TAboutForm; + +implementation + +{$R *.lfm} + +procedure TAboutForm.LabelMailClick(Sender: TObject); +begin + OpenDocument(PChar('mailto:rmw.falcon@mail.ru')); { *Преобразовано из ShellExecute* } +end; + +procedure TAboutForm.LabelMailMouseMove(Sender: TObject; Shift: TShiftState; + X, Y: Integer); +begin + (Sender as TLabel).Font.Color := clBlue; +end; + +procedure TAboutForm.LabelMailMouseLeave(Sender: TObject); +begin + (Sender as TLabel).Font.Color := clWindowText; +end; + +procedure TAboutForm.LabelHttpClick(Sender: TObject); +begin + OpenDocument(PChar('www.doom2d.org')); { *Преобразовано из ShellExecute* } +end; + +procedure TAboutForm.ButtonOKClick(Sender: TObject); +begin + Close(); +end; + +procedure TAboutForm.LabelMail2Click(Sender: TObject); +begin + OpenDocument(PChar('mailto:pssxx@mail.ru')); { *Преобразовано из ShellExecute* } +end; + +end. diff --git a/src/editor/f_activationtype.lfm b/src/editor/f_activationtype.lfm new file mode 100644 index 0000000..86a58f2 --- /dev/null +++ b/src/editor/f_activationtype.lfm @@ -0,0 +1,75 @@ +object ActivationTypeForm: TActivationTypeForm + Left = 231 + Top = 196 + BorderIcons = [biSystemMenu] + BorderStyle = bsToolWindow + Caption = 'Тип активации' + ClientHeight = 149 + ClientWidth = 124 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + PixelsPerInch = 96 + object cbPlayerCollide: TCheckBox + Left = 2 + Top = 0 + Width = 97 + Height = 17 + Caption = 'Игрок близко' + TabOrder = 0 + end + object cbMonsterCollide: TCheckBox + Left = 2 + Top = 16 + Width = 97 + Height = 17 + Caption = 'Монстр близко' + TabOrder = 1 + end + object cbPlayerPress: TCheckBox + Left = 2 + Top = 32 + Width = 97 + Height = 17 + Caption = 'Игрок нажал' + TabOrder = 2 + end + object bOK: TButton + Left = 2 + Top = 120 + Width = 121 + Height = 25 + Caption = 'OK' + Default = True + ModalResult = 1 + TabOrder = 3 + end + object cbMonsterPress: TCheckBox + Left = 2 + Top = 48 + Width = 97 + Height = 17 + Caption = 'Монстр нажал' + TabOrder = 4 + end + object cbShot: TCheckBox + Left = 2 + Top = 64 + Width = 97 + Height = 17 + Caption = 'Выстрел' + TabOrder = 5 + end + object cbNoMonster: TCheckBox + Left = 2 + Top = 80 + Width = 97 + Height = 17 + Caption = 'Монстров нет' + TabOrder = 6 + end +end diff --git a/src/editor/f_activationtype.pas b/src/editor/f_activationtype.pas new file mode 100644 index 0000000..8d9a873 --- /dev/null +++ b/src/editor/f_activationtype.pas @@ -0,0 +1,34 @@ +unit f_activationtype; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls; + +type + TActivationTypeForm = class (TForm) + cbPlayerCollide: TCheckBox; + cbMonsterCollide: TCheckBox; + cbPlayerPress: TCheckBox; + cbMonsterPress: TCheckBox; + cbShot: TCheckBox; + cbNoMonster: TCheckBox; + bOK: TButton; + + private + { Private declarations } + public + { Public declarations } + end; + +var + ActivationTypeForm: TActivationTypeForm; + +implementation + +{$R *.lfm} + +end. diff --git a/src/editor/f_addresource.lfm b/src/editor/f_addresource.lfm new file mode 100644 index 0000000..ef51f91 --- /dev/null +++ b/src/editor/f_addresource.lfm @@ -0,0 +1,86 @@ +object AddResourceForm: TAddResourceForm + Left = 271 + Top = 208 + BorderIcons = [biSystemMenu] + BorderStyle = bsSingle + ClientHeight = 268 + ClientWidth = 204 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + ShowHint = True + OnActivate = FormActivate + PixelsPerInch = 96 + object LabelWADs: TLabel + Left = 4 + Top = 4 + Width = 110 + Height = 13 + Caption = 'Список WAD-файлов:' + end + object LabelSections: TLabel + Left = 4 + Top = 44 + Width = 143 + Height = 13 + Caption = 'Список секций WAD-файла:' + end + object bOK: TButton + Left = 36 + Top = 236 + Width = 75 + Height = 25 + Caption = 'ОК' + Default = True + ModalResult = 1 + TabOrder = 0 + OnClick = bOKClick + end + object bCancel: TButton + Left = 124 + Top = 236 + Width = 75 + Height = 25 + Cancel = True + Caption = 'Отмена' + ModalResult = 2 + TabOrder = 1 + end + object cbWADList: TComboBox + Left = 4 + Top = 20 + Width = 193 + Height = 21 + AutoComplete = False + Style = csDropDownList + ItemHeight = 13 + TabOrder = 2 + OnChange = cbWADListChange + end + object lbResourcesList: TListBox + Left = 4 + Top = 84 + Width = 193 + Height = 145 + ItemHeight = 13 + MultiSelect = True + TabOrder = 3 + OnClick = lbResourcesListClick + end + object cbSectionsList: TComboBox + Left = 4 + Top = 60 + Width = 193 + Height = 21 + AutoComplete = False + Style = csDropDownList + ItemHeight = 13 + Sorted = True + TabOrder = 4 + OnChange = cbSectionsListChange + end +end diff --git a/src/editor/f_addresource.pas b/src/editor/f_addresource.pas new file mode 100644 index 0000000..71e1c1d --- /dev/null +++ b/src/editor/f_addresource.pas @@ -0,0 +1,215 @@ +unit f_addresource; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, + ExtDlgs, e_Log, e_textures, WADEDITOR; + +type + TOKFunction = function: Boolean; + + TAddResourceForm = class (TForm) + LabelWADs: TLabel; + cbWADList: TComboBox; + LabelSections: TLabel; + cbSectionsList: TComboBox; + lbResourcesList: TListBox; + bOK: TButton; + bCancel: TButton; + + procedure FormActivate(Sender: TObject); + procedure bOKClick(Sender: TObject); + procedure cbWADListChange(Sender: TObject); + procedure cbSectionsListChange(Sender: TObject); + procedure lbResourcesListClick(Sender: TObject); + + protected + FResourceName: String; + FFullResourceName: String; + FResourceSelected: Boolean; + FOKFunction: TOKFunction; + + public + property ResourceName: String read FResourceName; + property FullResourceName: String read FFullResourceName; + property OKFunction: TOKFunction read FOKFunction write FOKFunction; + end; + +var + AddResourceForm: TAddResourceForm; + +implementation + +uses + f_main, WADSTRUCT, g_language; + +{$R *.lfm} + +const + STANDART_WAD = 'Standart.wad'; + +procedure TAddResourceForm.FormActivate(Sender: TObject); +var + SR: TSearchRec; + +begin + cbWADList.Clear(); + cbSectionsList.Clear(); + lbResourcesList.Clear(); + + FResourceName := ''; + FFullResourceName := ''; + FResourceSelected := False; + + ChDir(EditorDir); + if FindFirst(EditorDir+'wads\*.wad', faAnyFile, SR) = 0 then + repeat + cbWADList.Items.Add(SR.Name); + until FindNext(SR) <> 0; + FindClose(SR); + +// "Standart.wad" в начало списка: + if cbWADList.Items.IndexOf(STANDART_WAD) > 0 then + begin + cbWADList.Items.Delete(cbWADList.Items.IndexOf(STANDART_WAD)); + cbWADList.Items.Insert(0, STANDART_WAD); + end; + +// WAD карты: + if OpenedMap <> '' then + cbWADList.Items.Add(_lc[I_WAD_SPECIAL_MAP]); +end; + +procedure TAddResourceForm.bOKClick(Sender: TObject); +begin + if FResourceName = '' then + begin + MessageBox(0, PChar(_lc[I_MSG_CHOOSE_RES]), + PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR); + Exit; + end; + + if @FOKFunction <> nil then + begin + if FOKFunction() then + Close(); + end + else + Close(); +end; + +procedure TAddResourceForm.cbWADListChange(Sender: TObject); +var + WAD: TWADEditor_1; + SectionList: SArray; + i: Integer; + FileName, fn, sn, rn: String; + +begin + WAD := TWADEditor_1.Create(); + +// Внешний WAD: + if cbWADList.Text <> _lc[I_WAD_SPECIAL_MAP] then + FileName := EditorDir+'wads\'+cbWADList.Text + else // WAD карты: + begin + g_ProcessResourceStr(OpenedMap, fn, sn, rn); + FileName := fn; + end; + +// Читаем секции: + WAD.ReadFile(FileName); + SectionList := WAD.GetSectionList(); + WAD.Free(); + + cbSectionsList.Clear(); + lbResourcesList.Clear(); + + if SectionList <> nil then + for i := 0 to High(SectionList) do + if SectionList[i] <> '' then + cbSectionsList.Items.Add(SectionList[i]) + else + cbSectionsList.Items.Add('..'); +end; + +procedure TAddResourceForm.cbSectionsListChange(Sender: TObject); +var + ResourceList: SArray; + WAD: TWADEditor_1; + i: DWORD; + FileName, SectionName, fn, sn, rn: String; + +begin + WAD := TWADEditor_1.Create(); + +// Внешний WAD: + if cbWADList.Text <> _lc[I_WAD_SPECIAL_MAP] then + FileName := EditorDir+'wads\'+cbWADList.Text + else // WAD карты: + begin + g_ProcessResourceStr(OpenedMap, fn, sn, rn); + FileName := fn; + end; + +// Читаем WAD: + WAD.ReadFile(FileName); + + if cbSectionsList.Text <> '..' then + SectionName := cbSectionsList.Text + else + SectionName := ''; + +// Читаем ресурсы выбранной секции: + ResourceList := WAD.GetResourcesList(SectionName); + + WAD.Free(); + + lbResourcesList.Clear(); + + if ResourceList <> nil then + for i := 0 to High(ResourceList) do + lbResourcesList.Items.Add(ResourceList[i]); +end; + +procedure TAddResourceForm.lbResourcesListClick(Sender: TObject); +var + FileName, SectionName, fn: String; + +begin + FResourceSelected := (lbResourcesList.SelCount > 0) or + (lbResourcesList.ItemIndex > -1); + + if not FResourceSelected then + begin + FResourceName := ''; + FFullResourceName := ''; + Exit; + end; + + if cbSectionsList.Text = '..' then + SectionName := '' + else + SectionName := cbSectionsList.Text; + + if cbWADList.Text[1] <> '<' then + FileName := cbWADList.Text + else + FileName := ''; + + FResourceName := FileName+':'+SectionName+'\'+lbResourcesList.Items[lbResourcesList.ItemIndex]; + + if FileName <> '' then + FFullResourceName := EditorDir+'wads\'+FResourceName + else + begin + g_ProcessResourceStr(OpenedMap, @fn, nil, nil); + FFullResourceName := fn+FResourceName; + end; +end; + +end. diff --git a/src/editor/f_addresource_sky.lfm b/src/editor/f_addresource_sky.lfm new file mode 100644 index 0000000..3f94104 --- /dev/null +++ b/src/editor/f_addresource_sky.lfm @@ -0,0 +1,31 @@ +inherited AddSkyForm: TAddSkyForm + Left = 225 + Top = 145 + Caption = 'Выберите текстуру для неба' + ClientHeight = 250 + ClientWidth = 529 + PixelsPerInch = 96 + inherited bOK: TButton + Top = 220 + end + inherited bCancel: TButton + Top = 220 + end + inherited lbResourcesList: TListBox + Height = 127 + end + object PanelTexPreview: TPanel + Left = 204 + Top = 4 + Width = 322 + Height = 242 + BevelOuter = bvLowered + TabOrder = 5 + object iPreview: TImage + Left = 0 + Top = 0 + Width = 320 + Height = 240 + end + end +end diff --git a/src/editor/f_addresource_sky.pas b/src/editor/f_addresource_sky.pas new file mode 100644 index 0000000..fb5bd5f --- /dev/null +++ b/src/editor/f_addresource_sky.pas @@ -0,0 +1,211 @@ +unit f_addresource_sky; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, f_addresource, + ExtCtrls, StdCtrls; + +type + TAddSkyForm = class (TAddResourceForm) + PanelTexPreview: TPanel; + iPreview: TImage; + + procedure bOKClick(Sender: TObject); + procedure lbResourcesListClick(Sender: TObject); + procedure FormActivate(Sender: TObject); + + private + FSetResource: String; + + public + property SetResource: String read FSetResource write FSetResource; + end; + +var + AddSkyForm: TAddSkyForm; + +implementation + +uses + BinEditor, WADEDITOR, f_main, g_language; + +{$R *.lfm} + +procedure SwapRGB(data: Pointer; Size: Integer); +asm + mov ebx, eax + mov ecx, size + +@@loop : + mov al,[ebx+0] + mov ah,[ebx+2] + mov [ebx+2],al + mov [ebx+0],ah + add ebx,3 + dec ecx + jnz @@loop +end; + +function ShowTGATexture(ResourceStr: String): TBitMap; +var + TGAHeader: packed record // Header type for TGA images + FileType: Byte; + ColorMapType: Byte; + ImageType: Byte; + ColorMapSpec: Array[0..4] of Byte; + OrigX: Array [0..1] of Byte; + OrigY: Array [0..1] of Byte; + Width: Array [0..1] of Byte; + Height: Array [0..1] of Byte; + BPP: Byte; + ImageInfo: Byte; + end; + image: Pointer; {or PRGBTRIPLE} + Width, + Height: Integer; + ColorDepth: Integer; + ImageSize: Integer; + I: Integer; + BitMap: TBitMap; + + TextureData: Pointer; + WAD: TWADEditor_1; + WADName: String; + SectionName: String; + ResourceName: String; + +begin + Result := nil; + +// Загружаем ресурс текстуры из WAD: + g_ProcessResourceStr(ResourceStr, WADName, SectionName, ResourceName); + + WAD := TWADEditor_1.Create(); + WAD.ReadFile(WADName); + + WAD.GetResource(SectionName, ResourceName, TextureData, ImageSize); + + WAD.Free(); + +// Заголовок TGA: + CopyMemory(@TGAHeader, TextureData, SizeOf(TGAHeader)); + + if TGAHeader.ImageType <> 2 then + Exit; + if TGAHeader.ColorMapType <> 0 then + Exit; + if TGAHeader.BPP < 24 then + Exit; + + Width := TGAHeader.Width[0]+TGAHeader.Width[1]*256; + Height := TGAHeader.Height[0]+TGAHeader.Height[1]*256; + ColorDepth := TGAHeader.BPP; + ImageSize := Width*Height*(ColorDepth div 8); + +// Само изображение: + GetMem(Image, ImageSize); + + CopyMemory(Image, Pointer(Integer(TextureData)+SizeOf(TGAHeader)), ImageSize); + + BitMap := TBitMap.Create(); + + if TGAHeader.BPP = 24 then + BitMap.PixelFormat := pf24bit + else + BitMap.PixelFormat := pf32bit; + + BitMap.Width := Width; + BitMap.Height := Height; + +// Копируем изображение в BitMap: + for I := Height-1 downto 0 do + CopyMemory(BitMap.ScanLine[Height-1-I], + Pointer(Integer(Image)+(Width*I*(TGAHeader.BPP div 8))), + Width*(TGAHeader.BPP div 8)); + + FreeMem(Image, ImageSize); + FreeMem(TextureData); + Result := BitMap; +end; + +procedure TAddSkyForm.bOKClick(Sender: TObject); +begin + Inherited; + + if not FResourceSelected then + Exit; +end; + +procedure TAddSkyForm.lbResourcesListClick(Sender: TObject); +var + Texture: TBitMap; + +begin + Inherited; + + if lbResourcesList.ItemIndex = -1 then + Exit; + if FResourceName = '' then + Exit; + + Texture := ShowTGATexture(FFullResourceName); + iPreview.Canvas.FillRect(iPreview.Canvas.ClipRect); + if Texture = nil then + Exit; + iPreview.Canvas.StretchDraw(iPreview.Canvas.ClipRect, Texture); + Texture.Free(); +end; + +procedure TAddSkyForm.FormActivate(Sender: TObject); +var + FileName, + SectionName, + ResourceName: String; + a: Integer; + +begin + Inherited; + + iPreview.Canvas.FillRect(iPreview.Canvas.ClipRect); + +// Уже есть выбранный ресурс: + if FSetResource <> '' then + begin + g_ProcessResourceStr(FSetResource, FileName, SectionName, ResourceName); + + if FileName = '' then + FileName := _lc[I_WAD_SPECIAL_MAP]; + if SectionName = '' then + SectionName := '..'; + + // WAD файл: + a := cbWADList.Items.IndexOf(FileName); + if a <> -1 then + begin + cbWADList.ItemIndex := a; + cbWADList.OnChange(nil); + end; + + // Секция: + a := cbSectionsList.Items.IndexOf(SectionName); + if a <> -1 then + begin + cbSectionsList.ItemIndex := a; + cbSectionsList.OnChange(nil); + end; + + // Ресурс: + a := lbResourcesList.Items.IndexOf(ResourceName); + if a <> -1 then + begin + lbResourcesList.ItemIndex := a; + lbResourcesList.OnClick(nil); + end; + end; +end; + +end. diff --git a/src/editor/f_addresource_sound.lfm b/src/editor/f_addresource_sound.lfm new file mode 100644 index 0000000..31e837f --- /dev/null +++ b/src/editor/f_addresource_sound.lfm @@ -0,0 +1,79 @@ +inherited AddSoundForm: TAddSoundForm + Left = 272 + Top = 110 + Caption = 'Выберите звук или музыку' + ClientWidth = 450 + OnClose = FormClose + OnCreate = FormCreate + OnDestroy = FormDestroy + PixelsPerInch = 96 + object pSpectrum: TPanel + Left = 204 + Top = 52 + Width = 240 + Height = 61 + BevelOuter = bvNone + TabOrder = 5 + end + object bbPlay: TBitBtn + Left = 205 + Top = 16 + Width = 25 + Height = 25 + TabOrder = 6 + OnClick = bbPlayClick + Glyph.Data = { + 76010000424D7601000000000000760000002800000020000000100000000100 + 04000000000000010000130B0000130B00001000000000000000000000000000 + 800000800000008080008000000080008000808000007F7F7F00BFBFBF000000 + FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333 + 33333333333333333333EEEEEEEEEEEEEEE333FFFFFFFFFFFFF3E00000000000 + 00E337777777777777F3E0F77777777770E337F33333333337F3E0F333333333 + 70E337F3333F333337F3E0F33303333370E337F3337FF33337F3E0F333003333 + 70E337F33377FF3337F3E0F33300033370E337F333777FF337F3E0F333000033 + 70E337F33377773337F3E0F33300033370E337F33377733337F3E0F333003333 + 70E337F33377333337F3E0F33303333370E337F33373333337F3E0F333333333 + 70E337F33333333337F3E0FFFFFFFFFFF0E337FFFFFFFFFFF7F3E00000000000 + 00E33777777777777733EEEEEEEEEEEEEEE33333333333333333} + NumGlyphs = 2 + end + object bbStop: TBitBtn + Left = 229 + Top = 16 + Width = 25 + Height = 25 + TabOrder = 7 + OnClick = bbStopClick + Glyph.Data = { + 76010000424D7601000000000000760000002800000020000000100000000100 + 04000000000000010000130B0000130B00001000000000000000000000000000 + 800000800000008080008000000080008000808000007F7F7F00BFBFBF000000 + FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333 + 33333333333333333333EEEEEEEEEEEEEEE333FFFFFFFFFFFFF3E00000000000 + 00E337777777777777F3E0F77777777770E337F33333333337F3E0F333333333 + 70E337F33333333337F3E0F33333333370E337F333FFFFF337F3E0F330000033 + 70E337F3377777F337F3E0F33000003370E337F3377777F337F3E0F330000033 + 70E337F3377777F337F3E0F33000003370E337F3377777F337F3E0F330000033 + 70E337F33777773337F3E0F33333333370E337F33333333337F3E0F333333333 + 70E337F33333333337F3E0FFFFFFFFFFF0E337FFFFFFFFFFF7F3E00000000000 + 00E33777777777777733EEEEEEEEEEEEEEE33333333333333333} + NumGlyphs = 2 + end + object bEmpty: TButton + Left = 216 + Top = 236 + Width = 75 + Height = 25 + Caption = 'Нет звука' + ModalResult = 1 + TabOrder = 8 + OnClick = bEmptyClick + end + object Timer: TTimer + Enabled = False + Interval = 20 + OnTimer = TimerTimer + Left = 264 + Top = 144 + end +end diff --git a/src/editor/f_addresource_sound.pas b/src/editor/f_addresource_sound.pas new file mode 100644 index 0000000..4efa987 --- /dev/null +++ b/src/editor/f_addresource_sound.pas @@ -0,0 +1,333 @@ +unit f_addresource_sound; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, f_addresource, + ExtCtrls, StdCtrls, spectrum, Buttons, ComCtrls; + +type + TAddSoundForm = class (TAddResourceForm) + pSpectrum: TPanel; + bbPlay: TBitBtn; + bbStop: TBitBtn; + Timer: TTimer; + bEmpty: TButton; + + procedure FormCreate(Sender: TObject); + procedure bbPlayClick(Sender: TObject); + procedure TimerTimer(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure bbStopClick(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure bOKClick(Sender: TObject); + procedure bEmptyClick(Sender: TObject); + + private + FSpectrum: TMiniSpectrum; + FSetResource: String; + + procedure ShowSpectrum(); + + public + property SetResource: String read FSetResource write FSetResource; + end; + +var + AddSoundForm: TAddSoundForm; + +implementation + +uses + BinEditor, fmod, fmodtypes, fmoderrors, WADEDITOR, e_log, f_main, + g_language; + +{$R *.lfm} + +var + F_System: FMOD_SYSTEM; + SoundData: Pointer = nil; + Sound: FMOD_SOUND = nil; + Channel: FMOD_CHANNEL = nil; + Playing: Boolean = False; + +procedure TAddSoundForm.FormCreate(Sender: TObject); +var + res: FMOD_RESULT; + ver: Cardinal; + +begin + Inherited; + + res := FMOD_OK; + + try + res := FMOD_System_Create(F_System); + if res <> FMOD_OK then + raise Exception.Create('FMOD_System_Create failed!'); + + res := FMOD_System_GetVersion(F_System, ver); + if res <> FMOD_OK then + raise Exception.Create('FMOD_System_GetVersion failed!'); + + if ver < FMOD_VERSION then + raise Exception.Create('FMOD version is too old! Need '+IntToStr(FMOD_VERSION)); + + res := FMOD_System_SetOutput(F_System, FMOD_OUTPUTTYPE_WINMM); + if res <> FMOD_OK then + raise Exception.Create('FMOD_System_SetOutput failed!'); + + res := FMOD_System_SetSoftwareFormat(F_System, 48000, + FMOD_SOUND_FORMAT_PCM16, 0, 0, FMOD_DSP_RESAMPLER_LINEAR); + if res <> FMOD_OK then + raise Exception.Create('FMOD_System_SetSoftwareFormat failed!'); + + res := FMOD_System_Init(F_System, 64, FMOD_INIT_NORMAL, nil); + if res <> FMOD_OK then + raise Exception.Create('FMOD_System_Init failed!'); + + except + Application.MessageBox(FMOD_ErrorString(res), 'Initialization', MB_OK or MB_ICONHAND); + raise; + end; + + FSpectrum := TMiniSpectrum.Create(pSpectrum); + FSpectrum.Align := alClient; + FSpectrum.Enabled := True; + FSpectrum.Style := ssBlock; +end; + +function CreateSoundWAD(Resource: String): Boolean; +var + WAD: TWADEditor_1; + FileName, SectionName, ResourceName: String; + ResLength, sz: Integer; + soundExInfo: FMOD_CREATESOUNDEXINFO; + res: FMOD_RESULT; + +begin + Result := False; + + SoundData := nil; + Sound := nil; + Channel := nil; + + g_ProcessResourceStr(Resource, FileName, SectionName, ResourceName); + + WAD := TWADEditor_1.Create; + WAD.ReadFile(FileName); + + if WAD.GetResource(SectionName, ResourceName, SoundData, ResLength) then + begin + sz := SizeOf(FMOD_CREATESOUNDEXINFO); + FillMemory(@soundExInfo, sz, 0); + soundExInfo.cbsize := sz; + soundExInfo.length := ResLength; + + res := FMOD_System_CreateStream(F_System, SoundData, + FMOD_LOOP_OFF + FMOD_2D + FMOD_SOFTWARE + FMOD_OPENMEMORY, + @soundExInfo, Sound); + + if res <> FMOD_OK then + begin + e_WriteLog(Format('Error creating sound %s', [Resource]), MSG_WARNING); + e_WriteLog(FMOD_ErrorString(res), MSG_WARNING); + WAD.Free(); + Exit; + end; + end + else + begin + e_WriteLog(Format('Error loading sound %s', [Resource]), MSG_WARNING); + e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING); + WAD.Free(); + Exit; + end; + + WAD.Free(); + Result := True; +end; + +procedure TAddSoundForm.bbPlayClick(Sender: TObject); +var + res: FMOD_RESULT; + +begin + Inherited; + + if FResourceSelected then + begin + if Playing then + bbStop.Click(); + + if not CreateSoundWAD(FFullResourceName) then + Exit; + + res := FMOD_System_PlaySound(F_System, FMOD_CHANNEL_FREE, + Sound, False, Channel); + if res <> FMOD_OK then + begin + Application.MessageBox(FMOD_ErrorString(res), + PChar(_lc[I_MSG_SOUND_ERROR]), + MB_OK or MB_ICONHAND); + Exit; + end; + + Playing := True; + + FMOD_Channel_SetVolume(Channel, 1.0); + + FSpectrum.SetChannel(Channel); + end; +end; + +procedure TAddSoundForm.ShowSpectrum; +begin + if FSpectrum.Enabled then + FSpectrum.Draw(); +end; + +procedure TAddSoundForm.TimerTimer(Sender: TObject); +var + res: FMOD_RESULT; + b: LongBool; + +begin + Inherited; + + FMOD_System_Update(F_System); + + ShowSpectrum(); + + res := FMOD_Channel_IsPlaying(Channel, b); + if (res <> FMOD_OK) or (not b) then + bbStop.Click(); +end; + +procedure TAddSoundForm.FormDestroy(Sender: TObject); +var + res: FMOD_RESULT; + +begin + Inherited; + + FSpectrum.Free; + + res := FMOD_System_Close(F_System); + if res <> FMOD_OK then + begin + e_WriteLog('Error closing FMOD system!', MSG_FATALERROR); + e_WriteLog(FMOD_ErrorString(res), MSG_FATALERROR); + Exit; + end; + + res := FMOD_System_Release(F_System); + if res <> FMOD_OK then + begin + e_WriteLog('Error releasing FMOD system!', MSG_FATALERROR); + e_WriteLog(FMOD_ErrorString(res), MSG_FATALERROR); + end; +end; + +procedure Sound_StopRelease(); +begin + Playing := False; + + if Channel <> nil then + FMOD_Channel_Stop(Channel); + + if Sound <> nil then + FMOD_Sound_Release(Sound); + + if SoundData <> nil then + FreeMem(SoundData); + + SoundData := nil; + Sound := nil; + Channel := nil; +end; + +procedure TAddSoundForm.FormClose(Sender: TObject; + var Action: TCloseAction); +begin + Inherited; + + Timer.Enabled := False; + + FSpectrum.SetChannel(nil); + Sound_StopRelease(); +end; + +procedure TAddSoundForm.bbStopClick(Sender: TObject); +begin + Inherited; + + FSpectrum.SetChannel(nil); + Sound_StopRelease(); +end; + +procedure TAddSoundForm.FormActivate(Sender: TObject); +var + FileName, SectionName, ResourceName: String; + a: Integer; + +begin + Inherited; + + Timer.Enabled := True; + +// Уже есть выбранный ресурс: + if FSetResource <> '' then + begin + g_ProcessResourceStr(FSetResource, FileName, SectionName, ResourceName); + + if FileName = '' then + FileName := _lc[I_WAD_SPECIAL_MAP]; + + if SectionName = '' then + SectionName := '..'; + + // WAD файл: + a := cbWADList.Items.IndexOf(FileName); + if a <> -1 then + begin + cbWADList.ItemIndex := a; + cbWADList.OnChange(nil); + end; + + // Секция: + a := cbSectionsList.Items.IndexOf(SectionName); + if a <> -1 then + begin + cbSectionsList.ItemIndex := a; + cbSectionsList.OnChange(nil); + end; + + // Ресурс: + a := lbResourcesList.Items.IndexOf(ResourceName); + if a <> -1 then + begin + lbResourcesList.ItemIndex := a; + lbResourcesList.OnClick(nil); + end; + end; +end; + +procedure TAddSoundForm.bOKClick(Sender: TObject); +begin + inherited; + + ModalResult := mrOk; +end; + +procedure TAddSoundForm.bEmptyClick(Sender: TObject); +begin + FResourceName := ''; + ModalResult := mrOk; +end; + +end. diff --git a/src/editor/f_addresource_texture.lfm b/src/editor/f_addresource_texture.lfm new file mode 100644 index 0000000..520bf27 --- /dev/null +++ b/src/editor/f_addresource_texture.lfm @@ -0,0 +1,77 @@ +inherited AddTextureForm: TAddTextureForm + Left = 371 + Top = 194 + Caption = 'Выберите текстуру' + ClientHeight = 302 + ClientWidth = 466 + PixelsPerInch = 96 + inherited bOK: TButton + Left = 11 + Top = 272 + Width = 22 + Height = 17 + Visible = False + OnClick = nil + end + inherited bCancel: TButton + Left = 35 + Top = 271 + Width = 22 + Height = 18 + Visible = False + end + inherited lbResourcesList: TListBox + Top = 112 + Height = 150 + end + object PanelTexPreview: TPanel + Left = 204 + Top = 4 + Width = 258 + Height = 258 + BevelOuter = bvLowered + TabOrder = 5 + object iPreview: TImage + Left = 0 + Top = 0 + Width = 256 + Height = 256 + end + end + object eTextureName: TEdit + Left = 4 + Top = 88 + Width = 193 + Height = 21 + TabOrder = 6 + OnChange = eTextureNameChange + end + object bAddTexture: TButton + Left = 160 + Top = 272 + Width = 81 + Height = 25 + Caption = 'Добавить' + Default = True + TabOrder = 7 + OnClick = bAddTextureClick + end + object bClose: TButton + Left = 248 + Top = 272 + Width = 81 + Height = 25 + Caption = 'Закрыть' + TabOrder = 8 + OnClick = bCloseClick + end + object bAddClose: TButton + Left = 336 + Top = 272 + Width = 121 + Height = 25 + Caption = 'Добавить и закрыть' + TabOrder = 9 + OnClick = bAddCloseClick + end +end diff --git a/src/editor/f_addresource_texture.pas b/src/editor/f_addresource_texture.pas new file mode 100644 index 0000000..f9ebe0a --- /dev/null +++ b/src/editor/f_addresource_texture.pas @@ -0,0 +1,516 @@ +unit f_addresource_texture; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, f_addresource, + StdCtrls, ExtCtrls; + +type + TAddTextureForm = class (TAddResourceForm) + PanelTexPreview: TPanel; + iPreview: TImage; + eTextureName: TEdit; + bAddTexture: TButton; + bClose: TButton; + bAddClose: TButton; + + procedure FormActivate(Sender: TObject); + procedure lbResourcesListClick(Sender: TObject); + procedure eTextureNameChange(Sender: TObject); + procedure cbWADListChange(Sender: TObject); + procedure cbSectionsListChange(Sender: TObject); + procedure bCloseClick(Sender: TObject); + procedure bAddTextureClick(Sender: TObject); + procedure bAddCloseClick(Sender: TObject); + + private + {} + public + {} + end; + +var + AddTextureForm: TAddTextureForm; + +function IsAnim(Res: String): Boolean; +function GetFrame(Res: String; var Data: Pointer; + var Width, Height: Word): Boolean; + +implementation + +uses + BinEditor, WADEDITOR, f_main, g_textures, WADSTRUCT, CONFIG, g_map, + g_language; + +type + TTGAHeader = packed record + FileType: Byte; + ColorMapType: Byte; + ImageType: Byte; + ColorMapSpec: Array [0..4] of Byte; + OrigX: Array [0..1] of Byte; + OrigY: Array [0..1] of Byte; + Width: Array [0..1] of Byte; + Height: Array [0..1] of Byte; + BPP: Byte; + ImageInfo: Byte; + end; + +{$R *.lfm} + +function IsAnim(Res: String): Boolean; +var + WAD: TWADEditor_1; + WADName: String; + SectionName: String; + ResourceName: String; + Data: Pointer; + Size: Integer; + Sign: Array [0..4] of Char; + Sections, + Resources: SArray; + a: Integer; + ok: Boolean; + +begin + Result := False; + +// Читаем файл и ресурс в нем: + g_ProcessResourceStr(Res, WADName, SectionName, ResourceName); + + WAD := TWADEditor_1.Create(); + + if (not WAD.ReadFile(WADName)) or + (not WAD.GetResource(SectionName, ResourceName, Data, Size)) then + begin + WAD.Free(); + Exit; + end; + + WAD.FreeWAD(); + +// Проверка сигнатуры. Если есть - это WAD внутри WAD: + CopyMemory(@Sign[0], Data, 5); + + if not (Sign = DFWAD_SIGNATURE) then + begin + WAD.Free(); + FreeMem(Data); + Exit; + end; + +// Пробуем прочитать данные: + if not WAD.ReadMemory(Data, Size) then + begin + WAD.Free(); + FreeMem(Data); + Exit; + end; + + FreeMem(Data); + +// Читаем секции: + Sections := WAD.GetSectionList(); + + if Sections = nil then + begin + WAD.Free(); + Exit; + end; + +// Ищем в секциях "TEXT": + ok := False; + for a := 0 to High(Sections) do + if Sections[a] = 'TEXT' then + begin + ok := True; + Break; + end; + +// Ищем в секциях лист текстур - "TEXTURES": + for a := 0 to High(Sections) do + if Sections[a] = 'TEXTURES' then + begin + ok := ok and True; + Break; + end; + + if not ok then + begin + WAD.Free(); + Exit; + end; + +// Получаем ресурсы секции "TEXT": + Resources := WAD.GetResourcesList('TEXT'); + + if Resources = nil then + begin + WAD.Free(); + Exit; + end; + +// Ищем в них описание анимации - "AINM": + ok := False; + for a := 0 to High(Resources) do + if Resources[a] = 'ANIM' then + begin + ok := True; + Break; + end; + + WAD.Free(); + +// Если все получилось, то это аним. текстура: + Result := ok; +end; + +function GetFrame(Res: String; var Data: Pointer; + var Width, Height: Word): Boolean; +var + AnimWAD: Pointer; + WAD: TWADEditor_1; + WADName: String; + SectionName: String; + ResourceName: String; + Len: Integer; + config: TConfig; + TextData: Pointer; + +begin + Result := False; + +// Читаем WAD: + g_ProcessResourceStr(Res, WADName, SectionName, ResourceName); + + WAD := TWADEditor_1.Create(); + + if not WAD.ReadFile(WADName) then + begin + WAD.Free(); + Exit; + end; + +// Читаем WAD-ресурс из WAD: + if not WAD.GetResource(SectionName, ResourceName, AnimWAD, Len) then + begin + WAD.Free(); + Exit; + end; + + WAD.FreeWAD(); + +// Читаем WAD в WAD'е: + if not WAD.ReadMemory(AnimWAD, Len) then + begin + FreeMem(AnimWAD); + WAD.Free(); + Exit; + end; + +// Читаем описание анимации: + if not WAD.GetResource('TEXT', 'ANIM', TextData, Len) then + begin + FreeMem(TextData); + FreeMem(AnimWAD); + WAD.Free(); + Exit; + end; + + config := TConfig.CreateMem(TextData, Len); + +// Читаем ресурс - лист текстур: + if not WAD.GetResource('TEXTURES', config.ReadStr('', 'resource', ''), Data, Len) then + begin + FreeMem(TextData); + FreeMem(AnimWAD); + WAD.Free(); + Exit; + end; + + Height := config.ReadInt('', 'frameheight', 0); + Width := config.ReadInt('', 'framewidth', 0); + + config.Free(); + WAD.Free(); + + FreeMem(TextData); + FreeMem(AnimWAD); + + Result := True; +end; + +function CreateBitMap(Data: Pointer): TBitMap; +var + TGAHeader: TTGAHeader; + image: Pointer; + Width, + Height: Integer; + ColorDepth: Integer; + ImageSize: Integer; + i: Integer; + BitMap: TBitMap; + +begin + Result := nil; + +// Читаем заголовок TGA: + CopyMemory(@TGAHeader, Data, SizeOf(TGAHeader)); + + if TGAHeader.ImageType <> 2 then + Exit; + if TGAHeader.ColorMapType <> 0 then + Exit; + if TGAHeader.BPP < 24 then + Exit; + + Width := TGAHeader.Width[0]+TGAHeader.Width[1]*256; + Height := TGAHeader.Height[0]+TGAHeader.Height[1]*256; + ColorDepth := TGAHeader.BPP; + ImageSize := Width*Height*(ColorDepth div 8); + +// Само изображение: + GetMem(Image, ImageSize); + + CopyMemory(Image, Pointer(Integer(Data)+SizeOf(TGAHeader)), ImageSize); + + BitMap := TBitMap.Create(); + + if TGAHeader.BPP = 24 then + BitMap.PixelFormat := pf24bit + else + BitMap.PixelFormat := pf32bit; + + BitMap.Width := Width; + BitMap.Height := Height; + +// Копируем в BitMap: + for I := Height-1 downto 0 do + CopyMemory(BitMap.ScanLine[Height-1-I], + Pointer(Integer(Image)+(Width*I*(TGAHeader.BPP div 8))), + Width*(TGAHeader.BPP div 8)); + + FreeMem(Image, ImageSize); + + Result := BitMap; +end; + +function ShowAnim(Res: String): TBitMap; +var + AnimWAD: Pointer; + WAD: TWADEditor_1; + WADName: String; + SectionName: String; + ResourceName: String; + Len: Integer; + config: TConfig; + TextData: Pointer; + TextureData: Pointer; + +begin + Result := nil; + +// Читаем WAD файл и ресурс в нем: + g_ProcessResourceStr(Res, WADName, SectionName, ResourceName); + + WAD := TWADEditor_1.Create(); + WAD.ReadFile(WADName); + WAD.GetResource(SectionName, ResourceName, AnimWAD, Len); + WAD.FreeWAD(); + +// Читаем описание анимации: + WAD.ReadMemory(AnimWAD, Len); + WAD.GetResource('TEXT', 'ANIM', TextData, Len); + + config := TConfig.CreateMem(TextData, Len); + +// Читаем лист текстур: + WAD.GetResource('TEXTURES', config.ReadStr('', 'resource', ''), TextureData, Len); + + if (TextureData <> nil) and + (WAD.GetLastError = DFWAD_NOERROR) then + begin + // Создаем BitMap из листа текстур: + Result := CreateBitMap(TextureData); + + // Размеры одного кадра - виден только первый кадр: + Result.Height := config.ReadInt('', 'frameheight', 0); + Result.Width := config.ReadInt('', 'framewidth', 0); + end; + + config.Free(); + WAD.Free(); + + FreeMem(TextureData); + FreeMem(TextData); + FreeMem(AnimWAD); +end; + +function ShowTGATexture(ResourceStr: String): TBitMap; +var + TextureData: Pointer; + WAD: TWADEditor_1; + WADName: String; + SectionName: String; + ResourceName: String; + Len: Integer; + +begin + Result := nil; + +// Читаем WAD: + g_ProcessResourceStr(ResourceStr, WADName, SectionName, ResourceName); + + WAD := TWADEditor_1.Create(); + if not WAD.ReadFile(WADName) then + begin + WAD.Free(); + Exit; + end; + +// Читаем ресурс текстуры в нем: + WAD.GetResource(SectionName, ResourceName, TextureData, Len); + + WAD.Free(); + +// Создаем на его основе BitMap: + Result := CreateBitMap(TextureData); + + FreeMem(TextureData, Len); +end; + +procedure TAddTextureForm.FormActivate(Sender: TObject); +begin + Inherited; + + cbWADList.Items.Add(_lc[I_WAD_SPECIAL_TEXS]); + + eTextureName.Text := ''; + iPreview.Canvas.FillRect(iPreview.Canvas.ClipRect); + + bOK.Visible := False; + bCancel.Visible := False; +end; + +procedure TAddTextureForm.lbResourcesListClick(Sender: TObject); +var + Texture: TBitMap; + wad: String; + +begin + Inherited; + + if lbResourcesList.ItemIndex = -1 then + Exit; + if FResourceName = '' then + Exit; + if cbWADList.Text = _lc[I_WAD_SPECIAL_TEXS] then + Exit; + + g_ProcessResourceStr(FFullResourceName, @wad, nil, nil); + if wad = _lc[I_WAD_SPECIAL_TEXS] then + Exit; + + if IsAnim(FFullResourceName) then + Texture := ShowAnim(FFullResourceName) + else + Texture := ShowTGATexture(FFullResourceName); + + if Texture = nil then + Exit; + iPreview.Canvas.FillRect(iPreview.Canvas.ClipRect); + iPreview.Canvas.CopyRect(Texture.Canvas.ClipRect, Texture.Canvas, Texture.Canvas.ClipRect); + Texture.Free(); +end; + +procedure TAddTextureForm.eTextureNameChange(Sender: TObject); +var + a: Integer; + first: Boolean; + +begin +// Убираем старые выделения: + for a := 0 to lbResourcesList.Items.Count-1 do + lbResourcesList.Selected[a] := False; + +// Нечего искать: + if (lbResourcesList.Items.Count = 0) or + (eTextureName.Text = '') then + Exit; + + first := True; + + for a := 0 to lbResourcesList.Items.Count-1 do + if LowerCase(Copy(lbResourcesList.Items[a], 1, + Length(eTextureName.Text))) = + LowerCase(eTextureName.Text) then + begin + lbResourcesList.Selected[a] := True; + + if first then + begin + // Показываем первую текстуру из найденных: + lbResourcesList.TopIndex := a; + lbResourcesList.OnClick(nil); + + first := False; + end; + end; +end; + +procedure TAddTextureForm.cbWADListChange(Sender: TObject); +begin + if cbWADList.Text = _lc[I_WAD_SPECIAL_TEXS] then + begin + cbSectionsList.Clear(); + cbSectionsList.Items.Add('..'); + Exit; + end; + + Inherited; +end; + +procedure TAddTextureForm.cbSectionsListChange(Sender: TObject); +begin + if cbWADList.Text = _lc[I_WAD_SPECIAL_TEXS] then + begin + lbResourcesList.Clear(); + lbResourcesList.Items.Add(TEXTURE_NAME_WATER); + lbResourcesList.Items.Add(TEXTURE_NAME_ACID1); + lbResourcesList.Items.Add(TEXTURE_NAME_ACID2); + Exit; + end; + + Inherited; +end; + +procedure TAddTextureForm.bCloseClick(Sender: TObject); +begin + Close(); +end; + +procedure TAddTextureForm.bAddTextureClick(Sender: TObject); +var + i: Integer; + +begin + for i := 0 to lbResourcesList.Count-1 do + if lbResourcesList.Selected[i] then + begin + AddTexture(cbWADlist.Text, cbSectionsList.Text, + lbResourcesList.Items[i], False); + lbResourcesList.Selected[i] := False; + end; +end; + +procedure TAddTextureForm.bAddCloseClick(Sender: TObject); +begin + bAddTextureClick(bAddTexture); + Close(); +end; + +end. diff --git a/src/editor/f_choosetype.lfm b/src/editor/f_choosetype.lfm new file mode 100644 index 0000000..3be8cdf --- /dev/null +++ b/src/editor/f_choosetype.lfm @@ -0,0 +1,35 @@ +object ChooseTypeForm: TChooseTypeForm + Left = 414 + Top = 235 + BorderIcons = [biSystemMenu] + BorderStyle = bsToolWindow + Caption = 'Выбор типа' + ClientHeight = 220 + ClientWidth = 205 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + PixelsPerInch = 96 + object lbTypeSelect: TListBox + Left = 2 + Top = 2 + Width = 201 + Height = 183 + ItemHeight = 13 + TabOrder = 0 + end + object bOK: TButton + Left = 2 + Top = 192 + Width = 201 + Height = 25 + Caption = 'OK' + Default = True + ModalResult = 1 + TabOrder = 1 + end +end diff --git a/src/editor/f_choosetype.pas b/src/editor/f_choosetype.pas new file mode 100644 index 0000000..98e8cc7 --- /dev/null +++ b/src/editor/f_choosetype.pas @@ -0,0 +1,29 @@ +unit f_choosetype; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls; + +type + TChooseTypeForm = class (TForm) + lbTypeSelect: TListBox; + bOK: TButton; + + private + { Private declarations } + public + { Public declarations } + end; + +var + ChooseTypeForm: TChooseTypeForm; + +implementation + +{$R *.lfm} + +end. diff --git a/src/editor/f_keys.lfm b/src/editor/f_keys.lfm new file mode 100644 index 0000000..fe35970 --- /dev/null +++ b/src/editor/f_keys.lfm @@ -0,0 +1,67 @@ +object KeysForm: TKeysForm + Left = 392 + Top = 191 + BorderIcons = [biSystemMenu] + BorderStyle = bsToolWindow + Caption = 'Ключи' + ClientHeight = 114 + ClientWidth = 124 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + PixelsPerInch = 96 + object cbRedKey: TCheckBox + Left = 2 + Top = 0 + Width = 111 + Height = 17 + Caption = 'Красный ключ' + TabOrder = 0 + end + object cbGreenKey: TCheckBox + Left = 2 + Top = 16 + Width = 111 + Height = 17 + Caption = 'Зеленый ключ' + TabOrder = 1 + end + object cbBlueKey: TCheckBox + Left = 2 + Top = 32 + Width = 111 + Height = 17 + Caption = 'Синий ключ' + TabOrder = 2 + end + object bOK: TButton + Left = 2 + Top = 88 + Width = 121 + Height = 25 + Caption = 'OK' + Default = True + ModalResult = 1 + TabOrder = 3 + end + object cbRedTeam: TCheckBox + Left = 2 + Top = 48 + Width = 111 + Height = 17 + Caption = 'Красная команда' + TabOrder = 4 + end + object cbBlueTeam: TCheckBox + Left = 2 + Top = 64 + Width = 111 + Height = 17 + Caption = 'Синяя команда' + TabOrder = 5 + end +end diff --git a/src/editor/f_keys.pas b/src/editor/f_keys.pas new file mode 100644 index 0000000..dd71caa --- /dev/null +++ b/src/editor/f_keys.pas @@ -0,0 +1,33 @@ +unit f_keys; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls; + +type + TKeysForm = class (TForm) + cbRedKey: TCheckBox; + cbGreenKey: TCheckBox; + cbBlueKey: TCheckBox; + cbRedTeam: TCheckBox; + cbBlueTeam: TCheckBox; + bOK: TButton; + + private + { Private declarations } + public + { Public declarations } + end; + +var + KeysForm: TKeysForm; + +implementation + +{$R *.lfm} + +end. diff --git a/src/editor/f_main.lfm b/src/editor/f_main.lfm new file mode 100644 index 0000000..58c22a2 --- /dev/null +++ b/src/editor/f_main.lfm @@ -0,0 +1,3434 @@ +object MainForm: TMainForm + Left = 434 + Top = 255 + AutoScroll = False + Caption = '2' + ClientHeight = 554 + ClientWidth = 792 + Color = clBtnFace + Constraints.MinHeight = 480 + Constraints.MinWidth = 672 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + KeyPreview = True + Menu = MainMenu + Position = poDefault + OnActivate = FormActivate + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnDestroy = FormDestroy + OnKeyDown = FormKeyDown + OnKeyUp = FormKeyUp + OnResize = FormResize + PixelsPerInch = 96 + object Splitter1: TSplitter + Left = 640 + Top = 34 + Height = 387 + Align = alRight + Beveled = True + MinSize = 64 + OnCanResize = Splitter1CanResize + end + object Splitter2: TSplitter + Left = 0 + Top = 421 + Width = 792 + Height = 3 + Cursor = crVSplit + Align = alBottom + MinSize = 64 + OnCanResize = Splitter2CanResize + end + object PanelProps: TPanel + Left = 643 + Top = 34 + Width = 149 + Height = 387 + Align = alRight + BevelInner = bvRaised + BevelOuter = bvLowered + TabOrder = 0 + object vleObjectProperty: TValueListEditor + Left = 0 + Top = 0 + Width = 145 + Height = 353 + Align = alClient + Constraints.MinWidth = 145 + DefaultColWidth = 60 + DefaultRowHeight = 16 + DisplayOptions = [doColumnTitles, doAutoColResize] + DropDownRows = 11 + FixedCols = 1 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + ScrollBars = ssVertical + TabOrder = 0 + TitleCaptions.Strings = ( + 'Свойство' + 'Значение') + OnEditButtonClick = vleObjectPropertyEditButtonClick + OnEnter = vleObjectPropertyEnter + OnExit = vleObjectPropertyExit + OnGetPickList = vleObjectPropertyGetPickList + OnKeyDown = vleObjectPropertyKeyDown + ColWidths = ( + 70 + 71) + end + object PanelPropApply: TPanel + Left = 0 + Top = 353 + Width = 145 + Height = 30 + Align = alBottom + BevelOuter = bvNone + TabOrder = 1 + object bApplyProperty: TButton + Left = 6 + Top = 1 + Width = 129 + Height = 25 + Caption = 'Применить свойства' + TabOrder = 0 + OnClick = bApplyPropertyClick + end + end + end + object PanelMap: TPanel + Left = 0 + Top = 34 + Width = 640 + Height = 387 + Align = alClient + BevelOuter = bvNone + TabOrder = 1 + object RenderPanel: TPanel + Left = 0 + Top = 0 + Width = 626 + Height = 374 + Align = alClient + BevelInner = bvRaised + BevelOuter = bvLowered + TabOrder = 0 + OnMouseDown = RenderPanelMouseDown + OnMouseMove = RenderPanelMouseMove + OnMouseUp = RenderPanelMouseUp + OnResize = RenderPanelResize + object pLoadProgress: TPanel + Left = 142 + Top = 94 + Width = 185 + Height = 49 + TabOrder = 0 + Visible = False + object lLoad: TLabel + Left = 6 + Top = 30 + Width = 169 + Height = 13 + AutoSize = False + end + object pbLoad: TProgressBar + Left = 6 + Top = 6 + Width = 169 + Height = 16 + Step = 1 + TabOrder = 0 + end + end + end + object sbHorizontal: TScrollBar + Left = 0 + Top = 372 + Width = 640 + Height = 13 + Align = alBottom + LargeChange = 256 + Max = 0 + PageSize = 0 + SmallChange = 16 + TabOrder = 1 + TabStop = False + OnScroll = sbHorizontalScroll + end + object sbVertical: TScrollBar + Left = 624 + Top = 0 + Width = 14 + Height = 374 + Align = alRight + Kind = sbVertical + LargeChange = 256 + Max = 0 + PageSize = 0 + SmallChange = 16 + TabOrder = 2 + TabStop = False + OnScroll = sbVerticalScroll + end + end + object StatusBar: TStatusBar + Left = 0 + Top = 535 + Width = 792 + Height = 19 + AutoHint = True + Panels = < + item + Width = 600 + end + item + Width = 50 + end> + SizeGrip = False + SimplePanel = False + end + object PanelObjs: TPanel + Left = 0 + Top = 424 + Width = 792 + Height = 111 + Align = alBottom + BevelInner = bvRaised + BevelOuter = bvLowered + Constraints.MinHeight = 111 + TabOrder = 3 + object pcObjects: TPageControl + Left = 0 + Top = 0 + Width = 788 + Height = 107 + ActivePage = tsPanels + Align = alClient + Images = ImageList + TabOrder = 0 + object tsPanels: TTabSheet + Caption = 'Панели' + ImageIndex = 12 + object lbTextureList: TListBox + Left = 206 + Top = 0 + Width = 362 + Height = 78 + Hint = 'Список текстур' + Style = lbOwnerDrawFixed + Align = alClient + Constraints.MaxHeight = 600 + Constraints.MinHeight = 70 + ItemHeight = 13 + TabOrder = 0 + OnClick = lbTextureListClick + end + object PanelTextures: TPanel + Left = 568 + Top = 0 + Width = 212 + Height = 78 + Align = alRight + BevelOuter = bvNone + TabOrder = 1 + object LabelTxH: TLabel + Left = 33 + Top = 22 + Width = 91 + Height = 13 + Caption = 'Высота текстуры:' + end + object LabelTxW: TLabel + Left = 33 + Top = 0 + Width = 92 + Height = 13 + Caption = 'Ширина текстуры:' + end + object lTextureHeight: TLabel + Left = 139 + Top = 22 + Width = 33 + Height = 13 + AutoSize = False + end + object lTextureWidth: TLabel + Left = 139 + Top = 0 + Width = 33 + Height = 13 + AutoSize = False + end + object cbPreview: TCheckBox + Left = 35 + Top = 54 + Width = 169 + Height = 17 + Caption = 'Предварительный просмотр' + TabOrder = 0 + end + object bbAddTexture: TBitBtn + Left = 3 + Top = 0 + Width = 25 + Height = 25 + Hint = 'Добавить текстуру в список' + Caption = '+' + TabOrder = 1 + OnClick = bbAddTextureClick + end + object bbRemoveTexture: TBitBtn + Left = 3 + Top = 24 + Width = 25 + Height = 25 + Hint = 'Удалить текстуру из списка' + Caption = '-' + TabOrder = 2 + OnClick = bbRemoveTextureClick + end + object bClearTexture: TButton + Left = 3 + Top = 48 + Width = 25 + Height = 25 + Hint = 'Убрать выбор текстуры' + TabOrder = 3 + OnClick = bClearTextureClick + end + end + object PanelPanelType: TPanel + Left = 0 + Top = 0 + Width = 206 + Height = 78 + Align = alLeft + BevelOuter = bvNone + TabOrder = 2 + object lbPanelType: TListBox + Left = 0 + Top = 0 + Width = 201 + Height = 78 + Hint = 'Тип панели' + Align = alLeft + ItemHeight = 13 + Items.Strings = ( + 'Стена' + 'Фон' + 'Передний план' + 'Закрытая дверь' + 'Открытая дверь' + 'Ступень' + 'Вода' + 'Кислота 1' + 'Кислота 2' + 'Лифт вверх' + 'Лифт вниз' + 'Блокиратор монстров') + TabOrder = 0 + end + end + end + object tsItems: TTabSheet + Caption = 'Предметы' + ImageIndex = 4 + object lbItemList: TListBox + Left = 0 + Top = 0 + Width = 201 + Height = 78 + Hint = 'Список предметов' + Align = alLeft + ItemHeight = 13 + Items.Strings = ( + 'Аптечка' + 'Большая аптечка' + 'Черная аптечка' + 'Зеленая броня' + 'Синяя броня' + 'Шарик 100%' + 'Мегасфера' + 'Костюм' + 'Акваланг' + 'Неуязвимость' + 'Бензопила' + 'Ружье' + 'Двустволка' + 'Пулемет' + 'Ракетница' + 'Плазменная пушка' + 'BFG9000' + 'Суперпулемет' + 'Патроны' + 'Ящик патронов' + '4 гильзы' + '25 гильз' + '1 ракета' + '5 ракет' + 'Батарейка' + 'Батарея' + 'Рюкзак' + 'Красный ключ' + 'Зеленый ключ' + 'Синий ключ' + 'Бутылек здоровья' + 'Часть брони') + TabOrder = 0 + end + object cbOnlyDM: TCheckBox + Left = 208 + Top = 0 + Width = 97 + Height = 17 + Caption = 'Только в DM' + TabOrder = 1 + end + object cbFall: TCheckBox + Left = 208 + Top = 16 + Width = 97 + Height = 17 + Caption = 'Падает' + TabOrder = 2 + end + end + object tsMonsters: TTabSheet + Caption = 'Монстры' + ImageIndex = 15 + object lbMonsterList: TListBox + Left = 0 + Top = 0 + Width = 201 + Height = 78 + Hint = 'Список монстров' + Align = alLeft + ItemHeight = 13 + Items.Strings = ( + 'Демон' + 'Бес' + 'Зомби' + 'Сержант' + 'Кибердемон' + 'Пулемётчик' + 'Барон ада' + 'Рыцарь ада' + 'Какодемон' + 'Огненный череп' + 'Авиабаза' + 'Большой паук' + 'Арахнотрон' + 'Манкубус' + 'Скелет' + 'Колдун' + 'Рыба' + 'Бочка' + 'Робот' + 'Приколист') + TabOrder = 0 + end + object rbMonsterLeft: TRadioButton + Left = 208 + Top = 0 + Width = 113 + Height = 17 + Caption = 'Влево' + Checked = True + TabOrder = 1 + TabStop = True + end + object rbMonsterRight: TRadioButton + Left = 208 + Top = 16 + Width = 113 + Height = 17 + Caption = 'Вправо' + TabOrder = 2 + end + end + object tsAreas: TTabSheet + Caption = 'Области' + ImageIndex = 3 + object lbAreasList: TListBox + Left = 0 + Top = 0 + Width = 201 + Height = 78 + Hint = 'Список областей' + Align = alLeft + ItemHeight = 13 + Items.Strings = ( + '1ый игрок' + '2ой игрок' + 'Точка DM' + 'Красный флаг' + 'Синий флаг' + 'DOM флаг' + 'Красная команда' + 'Синяя команда') + TabOrder = 0 + end + object rbAreaLeft: TRadioButton + Left = 208 + Top = 0 + Width = 113 + Height = 17 + Caption = 'Влево' + Checked = True + TabOrder = 1 + TabStop = True + end + object rbAreaRight: TRadioButton + Left = 208 + Top = 16 + Width = 113 + Height = 17 + Caption = 'Вправо' + TabOrder = 2 + end + end + object tsTriggers: TTabSheet + Caption = 'Триггеры' + ImageIndex = 6 + object lbTriggersList: TListBox + Left = 0 + Top = 0 + Width = 201 + Height = 78 + Hint = 'Список триггеров' + Align = alLeft + ItemHeight = 13 + Items.Strings = ( + 'Выход' + 'Телепортация' + 'Открыть дверь' + 'Закрыть дверь' + 'Дверь' + 'Дверь (5 сек)' + 'Закрыть ловушку' + 'Ловушка' + 'Расширитель' + 'Секрет' + 'Лифт вверх' + 'Лифт вниз' + 'Лифт' + 'Смена текстуры' + 'Включатель' + 'Выключатель' + 'Переключатель' + 'Звук' + 'Создать монстра' + 'Создать предмет' + 'Музыка') + TabOrder = 0 + end + object clbActivationType: TCheckListBox + Left = 201 + Top = 0 + Width = 128 + Height = 78 + Hint = 'Тип активации триггера' + Align = alLeft + ItemHeight = 13 + Items.Strings = ( + 'Игрок близко' + 'Монстр близко' + 'Игрок нажал' + 'Монстр нажал' + 'Выстрел' + 'Монстров нет') + TabOrder = 1 + end + object clbKeys: TCheckListBox + Left = 329 + Top = 0 + Width = 128 + Height = 78 + Hint = 'Ключи для активации' + Align = alLeft + ItemHeight = 13 + Items.Strings = ( + 'Красный ключ' + 'Зеленый ключ' + 'Синий ключ' + 'Красная команда' + 'Синяя команда') + TabOrder = 2 + end + end + end + end + object MainToolBar: TToolBar + Left = 0 + Top = 0 + Width = 792 + Height = 34 + ButtonHeight = 31 + ButtonWidth = 31 + Caption = 'MainToolBar' + Flat = True + Images = ilToolbar + TabOrder = 4 + object tbNewMap: TToolButton + Left = 0 + Top = 0 + Hint = 'Очистить карту' + Caption = 'tbNewMap' + ImageIndex = 0 + OnClick = aNewMapExecute + end + object tbOpenMap: TToolButton + Left = 31 + Top = 0 + Hint = 'Открыть карту' + Caption = 'tbOpenMap' + ImageIndex = 1 + OnClick = aOpenMapExecute + end + object tbSaveMap: TToolButton + Left = 62 + Top = 0 + Hint = 'Сохранить карту' + Caption = 'tbSaveMap' + ImageIndex = 2 + OnClick = aSaveMapExecute + end + object tbOpenWadMap: TToolButton + Left = 93 + Top = 0 + Hint = 'Открыть другую карты из этого же WAD''а' + Caption = 'tbOpenWadMap' + ImageIndex = 8 + OnClick = miOpenWadMapClick + end + object tbLine1: TToolButton + Left = 124 + Top = 0 + Width = 8 + Caption = 'tbLine1' + ImageIndex = 3 + Style = tbsSeparator + end + object tbShowMap: TToolButton + Left = 132 + Top = 0 + Hint = 'Показать мини-карту' + Caption = 'tbShowMap' + ImageIndex = 3 + OnClick = miMiniMapClick + end + object tbLine2: TToolButton + Left = 163 + Top = 0 + Width = 8 + Caption = 'tbLine2' + ImageIndex = 6 + Style = tbsSeparator + end + object tbShow: TToolButton + Left = 171 + Top = 0 + Hint = 'Отрисовка панелей/объектов' + Caption = 'tbShow' + DropdownMenu = pmShow + ImageIndex = 4 + Style = tbsDropDown + OnClick = tbShowClick + end + object tbLine3: TToolButton + Left = 215 + Top = 0 + Width = 8 + Caption = 'tbLine3' + ImageIndex = 7 + Style = tbsSeparator + end + object tbGridOn: TToolButton + Left = 223 + Top = 0 + Hint = 'Включить/Отключить отображение сетки' + Caption = 'tbGridOn' + ImageIndex = 6 + OnClick = tbGridOnClick + end + object tbGrid: TToolButton + Left = 254 + Top = 0 + Hint = 'Изменить шаг сетки' + Caption = 'tbGrid' + ImageIndex = 5 + OnClick = miSwitchGridClick + end + object tbLine4: TToolButton + Left = 285 + Top = 0 + Width = 8 + Caption = 'tbLine4' + ImageIndex = 7 + Style = tbsSeparator + end + object tbTestMap: TToolButton + Left = 293 + Top = 0 + Hint = 'Тест карты в игре' + Caption = 'tbTestMap' + DropdownMenu = pmMapTest + ImageIndex = 7 + Style = tbsDropDown + OnClick = miTestMapClick + end + end + object OpenDialog: TOpenDialog + DefaultExt = 'wad' + Filter = + 'Карты Doom 2D: Forever (*.wad)|*.wad|Старые карты Doom 2D: Forev' + + 'er (*.ini)|*.ini|Все файлы (*.*)|*.*' + Options = [ofHideReadOnly, ofNoChangeDir, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofDontAddToRecent] + Left = 32 + Top = 64 + end + object ImageList: TImageList + Left = 32 + Top = 101 + Bitmap = { + 494C01011E002200040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000400000009000000001002000000000000090 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000002929290029292900292929002929 + 2900292929002929290029292900292929002929290029292900292929002929 + 2900292929002929290029292900292929002929290029292900212121001818 + 1800181818001818180018181800181818001818180018181800181818002929 + 2900292929002121210021212100212121000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000029292900FFFFFF00DEDEDE00C7C7 + C700FFFFFF00FFFFFF00A2A2A200FFFFFF00DEDEDE00DEDEDE00FFFFFF00A2A2 + A200A2A2A200BBBBBB00FFFFFF0029292900393939006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F5438006F54 + 38006F5438006F5438006F543800292929000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000029292900FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF0029292900424242006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F5438006F54 + 38006F5438006F5438006F543800292929000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000039393900FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00393939004A4A4A00372E2400372E2400372E + 2400372E2400372E2400372E2400372E2400372E2400372E2400372E2400372E + 24006F5438006F5438006F543800393939000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000039393900C2975C00C2975C00C297 + 5C00C2975C00C2975C00C2975C00C2975C00C2975C00C2975C00C2975C00C297 + 5C00C2975C00C2975C00C2975C00393939004A4A4A006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F543800372E + 24006F5438006F5438006F543800393939000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000039393900C2975C00CAA67600CAA6 + 7600C2975C00C2975C00D2B48E00D2B48E00C2975C00C2975C00D2B48E00D2B4 + 8E00C2975C00C2975C00C2975C0039393900525252006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F543800372E + 24006F5438006F5438006F543800393939000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000042424200C2975C00D2B48E00D2B4 + 8E00D2B48E00C2975C00E1CEB700DAC2A300E5D5C100E5D5C100DAC2A300E1CE + B700C2975C00C2975C00C2975C0042424200525252006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F543800372E + 24006F5438006F5438006F543800424242000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000042424200C2975C00D2B48E00D6BB + 9900E9DBCA00DEC8AE00E1CEB700C2975C00E1CEB700E1CEB700C2975C00E9DB + CA00E1CEB700E1CEB700C2975C00424242005A5A5A0071573C0071573C007157 + 3C0071573C0071573C0071573C0071573C0071573C0071573C0071573C00382F + 250071573C0071573C0071573C00424242000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000004A4A4A00C2975C00D2B48E00F4ED + E500C69E6A00DAC2A300E5D5C100C2975C00DEC8AE00E1CEB700C2975C00E1CE + B700C2975C00E5D5C100C2975C004A4A4A005A5A5A00745B4000745B4000745B + 4000745B4000745B4000745B4000745B4000745B4000745B4000745B40003930 + 2600745B4000745B4000745B40004A4A4A000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000004A4A4A00C2975C00CEAD8200D6BB + 9900C2975C00C2975C00E1CEB700C2975C00CEAD8200CEAD8200C2975C00E1CE + B700E1CEB700DAC2A300C2975C004A4A4A0063636300775F4400775F4400775F + 4400775F4400775F4400775F4400775F4400775F4400775F4400775F44003A32 + 2800775F4400775F4400775F44004A4A4A000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000052525200C2975C00C2975C00C297 + 5C00C2975C00C2975C00C2975C00C2975C00C2975C00C2975C00C2975C00C297 + 5C00C2975C00C2975C00C2975C00525252006B6B6B007A644A007A644A007A64 + 4A007A644A007A644A007A644A007A644A007A644A007A644A007A644A003B33 + 2A007A644A007A644A007A644A00525252000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000005A5A5A00C2975C00C2975C00C297 + 5C00C2975C00C2975C00C2975C00C2975C00C2975C00C2975C00C2975C00C297 + 5C00C2975C00C2975C00C2975C005A5A5A007B7B7B007E6950007E6950007E69 + 50007E6950007E6950007E6950007E6950007E6950007E6950007E6950003D35 + 2C007E6950007E6950007E6950005A5A5A000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000063636300FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00636363007B7B7B00826F5700826F5700826F + 5700826F5700826F5700826F5700826F5700826F5700826F5700826F57003E37 + 2F00826F5700826F5700826F5700636363000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000006B6B6B00FFFFFF00E9E9E900E9E9 + E900FFFFFF00FFFFFF00D3D3D300D3D3D300FFFFFF00FFFFFF00D3D3D300D3D3 + D300FFFFFF00FFFFFF00FFFFFF006B6B6B007B7B7B0086765E0086765E008676 + 5E0086765E0086765E0086765E0086765E0086765E0086765E0086765E00403A + 310086765E0086765E0086765E006B6B6B000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000073737300FFFFFF00D3D3D300D3D3 + D300D3D3D300FFFFFF00A2A2A200BBBBBB009494940094949400BBBBBB00A2A2 + A200FFFFFF00FFFFFF00FFFFFF0073737300848484008B7C65008B7C65008B7C + 65008B7C65008B7C65008B7C65008B7C65008B7C65008B7C65008B7C6500413C + 34008B7C65008B7C65008B7C6500737373000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C0084848400848484008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C0084848400848484000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000002929290029292900212121001818 + 1800181818001818180018181800181818001818180018181800181818002929 + 2900292929002121210021212100212121000000000000000000000000000000 + 000000000000000000003139AD0010219C0010219C0010219C0010219C001021 + 9C0010219C0010219C0010219C0010219C00000000006B6B6B00292929002121 + 2100181818001818180018181800181818001818180018181800181818001818 + 180018181800181818004A4A4A00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000003939390000006300000063000000 + 63000000630000006B0000006300000063000000630000006B00000063000000 + 0000000000000000000000000000292929000000000000000000000000000000 + 000000000000000000004A5AB5003139AD003139AD003139AD003139AD003139 + AD003139AD003139AD003139AD0010219C000000000042424200FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF0029292900000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000004242420000007300000073000000 + 7300000073000000730000007300000073000000730000007300000073000000 + 0000000000000000000000000000292929000000000000000000000000000000 + 000000000000000000004A5AB5003139AD003139AD003139AD003139AD003139 + AD003139AD003139AD003139AD0010219C000000000042424200FFFFFF00C8E0 + E000C8E0DF00C8E0E000C8E0E000C8E0DF00B5B5B500C8DFDF00C7DFDF00C8DF + E000C8E0DF00FFFFFF0031313100000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000004A4A4A0000008400000084000000 + 8400000084000000840000008400000084000000840000008400000084000000 + 0000000000000000840000008400393939000000000000000000000000004263 + 5A00294A4A00294A4A004A5AB5003139AD003139AD003139AD003139AD003139 + AD003139AD003139AD003139AD0010219C00000000004A4A4A00FFFFFF00CAE2 + E100CAE2E100CAE2E100CAE2E100B5B5B50072282800B5B5B500B5B5B500B5B5 + B500B5B5B500B5B5B50018181800B5B5B5000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000004A4A4A0000009400000094000000 + 9400000094000000940000009400000094000000940000009400000094000000 + 0000000000000000000000000000393939000000000000000000000000005A73 + 6B0042635A0042635A004A5AB5003139AD003139AD003139AD003139AD003139 + AD003139AD003139AD003139AD0010219C00000000004A4A4A00FFFFFF00CDE5 + E300CCE5E300CDE5E300B5B5B500812D2D00812D2D00812D2D00812D2D00812D + 2D00812D2D00812D2D00812D2D00812D2D004E63630042555500364545000000 + 0000000000004E636300425555003645450000000000000000004E6363004255 + 550036454500000000000000000000000000525252000000A5000000A5000000 + A50000009C0000009C0000009C000000A5000000A5000000A5000000A5000000 + 0000000000000000000000000000393939000000000000000000000000005A73 + 6B0042635A0042635A004A5AB5003139AD003139AD003139AD003139AD003139 + AD003139AD003139AD003139AD0010219C00000000004A4A4A00FFFFFF00D0E8 + E500D0E8E600CFE8E50092333300923333009233330092333300923333009233 + 33009233330092333300923333009233330000000000788C8C005A7373004254 + 54000000000000000000788C8C005A737300425454000000000000000000788C + 8C005A737300425454000000000000000000525252000000AD000000AD000000 + AD000000AD000000AD000000AD000000AD000000AD000000AD000000AD000808 + 0800000000000000AD000000AD004242420039524A0029423900294239005A73 + 6B0042635A0042635A004A5AB5003139AD003139AD003139AD003139AD003139 + AD003139AD003139AD003139AD0010219C00000000005A5A5A00FFFFFF00D3EB + E800D3EBE800A3393900A3393900A3393900A3393900A3393900A3393900A339 + 3900A3393900A3393900A3393900A33939000000000000000000788C8C005A73 + 7300425454000000000000000000788C8C005A73730042545400000000000000 + 0000788C8C005A73730042545400000000005A5A5A0008080800080808000808 + 0800080808000808080008080800080808000808080008080800080808000808 + 080000000000000000000000000042424200425A520039524A0039524A005A73 + 6B0042635A0042635A004A5AB5003139AD003139AD003139AD003139AD003139 + AD003139AD003139AD003139AD0010219C00000000005A5A5A00FFFFFF00D7EE + EA00D7EEEB00D6EEEB00B23E3E00B23E3E00B23E3E00B23E3E00B33F3F00B23E + 3E00B23E3E00B23E3E00B23E3E00B23E3E00000000000000000000000000788C + 8C005A737300425454000000000000000000788C8C005A737300425454000000 + 000000000000788C8C005A737300425454005A5A5A0000080800000808000008 + 0800000808000008080000080800000808000008080000080800000808000008 + 08000008080000080800000808004A4A4A00425A520039524A0039524A005A73 + 6B0042635A0042635A004A5AB5003139AD003139AD003139AD003139AD003139 + AD003139AD003139AD003139AD0010219C000000000063636300FFFFFF00DAF2 + ED00DAF2ED00DAF2ED00DAF2ED00BD424200BD424200BD424200BD424200BD42 + 4200BD424200BD424200BD424200BD4242000000000000000000000000004254 + 54005A737300788C8C000000000000000000425454005A737300788C8C000000 + 000000000000425454005A737300788C8C006363630008100800081008000810 + 0800081008000810080008100800081008000810080008100800081008000810 + 0800081008002929AD002929AD004A4A4A00425A520039524A0039524A005A73 + 6B0042635A0042635A004A5AB5004A5AB5004A5AB5004A5AB5004A5AB5004A5A + B5004A5AB5004A5AB5004A5AB5003139AD00000000006B6B6B00FFFFFF00DEF6 + F000DEF6F000DDF5F000DDF5EF00DDF5F000BD424200DDF5EF00DDF5F000DEF5 + F000C6DEDE00DEDEDE0052525200000000000000000000000000425454005A73 + 7300788C8C000000000000000000425454005A737300788C8C00000000000000 + 0000425454005A737300788C8C00000000006B6B6B003939AD003939AD003939 + AD003939AD003939AD003939AD003939AD003939AD0010181000101810001018 + 100010181000101810001018100052525200425A520039524A0039524A005A73 + 6B0042635A0042635A0042635A0042635A0042635A0042635A0042635A004263 + 5A00294A4A00000000000000000000000000000000006B6B6B00FFFFFF00E0F9 + F200E1F9F200E0F8F200E0F8F200E0F8F200E1F9F200F7F7F700D6D6D600C6C6 + C600B5B5B5009C9C9C00525252000000000000000000425454005A737300788C + 8C000000000000000000425454005A737300788C8C0000000000000000004254 + 54005A737300788C8C0000000000000000007B7B7B0018212100182121001821 + 2100182121001821210018212100182121004A4AAD0018212100182121001821 + 21001821210018212100182121005A5A5A00425A520039524A0039524A005A73 + 6B0042635A0042635A0042635A0042635A0042635A0042635A0042635A004263 + 5A00294A4A00000000000000000000000000000000006B6B6B00FFFFFF00E3FB + F400E3FBF400E3FBF300E3FBF400E3FCF400E3FBF400F7F7F700949494008C8C + 8C00737373005A5A5A005A5A5A0000000000687F7F00798D8D00879999000000 + 000000000000687F7F00798D8D00879999000000000000000000687F7F00798D + 8D00879999000000000000000000000000007B7B7B0021292900212929002129 + 2900212929002129290021292900212929002129290021292900212929002129 + 2900212929005252AD005252AD0063636300425A520039524A0039524A005A73 + 6B005A736B005A736B005A736B005A736B005A736B005A736B005A736B005A73 + 6B0042635A00000000000000000000000000000000006B6B6B00FFFFFF00E5FE + F600E5FDF600E5FDF600E5FEF600E6FEF600E5FDF600F7F7F700A5A5A500FFFF + FF00FFFFFF00FFFFFF005A5A5A00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000007B7B7B0029293100292931002929 + 3100292931002929310029293100292931002929310029293100292931002929 + 31002929310029293100292931006B6B6B00425A520039524A0039524A003952 + 4A0039524A0039524A0039524A0039524A0039524A0029423900000000000000 + 000000000000000000000000000000000000000000006B6B6B00FFFFFF00E7FF + F700E7FFF700E7FFF700E7FFF700E7FFF700E7FFF700F7F7F700B5B5B500FFFF + FF00D6F7EF00B5D6CE006B6B6B00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000084848400525A5A004A5A5200525A + 5A00525A5A00525A5A00525A5A00525A5A00525A5A00525A5A00525A5A00525A + 5A00525A5A004A5A52004A5A520073737300425A520039524A0039524A003952 + 4A0039524A0039524A0039524A0039524A0039524A0029423900000000000000 + 000000000000000000000000000000000000000000006B6B6B00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00CECECE00FFFF + FF00B5D6CE007373730000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000084848400848484008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C008484840084848400425A5200425A5200425A5200425A + 5200425A5200425A5200425A5200425A5200425A520039524A00000000000000 + 0000000000000000000000000000000000000000000073737300737373007373 + 7300737373007B7B7B007B7B7B007B7B7B008484840084848400848484008484 + 8400848484000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000002929290029292900212121001818 + 1800181818001818180018181800181818001818180018181800181818002929 + 2900292929002121210021212100212121000000000029292900212121001818 + 1800181818001818180018181800181818001818180018181800181818002929 + 2900292929002121210021212100000000000000000029292900212121001818 + 1800181818001818180018181800181818001818180018181800181818002929 + 2900292929002121210021212100000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000393939006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F5438006F54 + 38006F5438006F5438006F54380029292900393939007B9494007B9494006363 + 6300E7E7E700FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7E700D6D6D600E7E7 + E7005A5A5A007B9494007B94940029292900393939007B9494007B9494006363 + 6300E7E7E700FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7E700D6D6D600E7E7 + E7005A5A5A007B9494007B949400292929000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000424242006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F5438006F54 + 38006F5438006F5438006F54380029292900424242007B9494007B9494006B6B + 6B00FFFFFF00E7E7E700A5BDB500FFFFFF00FFFFFF00EFEFEF00E7E7E700E7E7 + E7006B6B6B007B9494007B94940029292900424242007B9494007B9494006B6B + 6B00FFFFFF00E7E7E700A5BDB500FFFFFF00FFFFFF00EFEFEF00E7E7E700E7E7 + E7006B6B6B007B9494007B949400292929000000000000000000000000000000 + 0000C6CED600ADB5B500ADB5B500ADB5B500ADB5B500C6CED600000000000000 + 0000000000000000000000000000000000004A4A4A006F5438006F5438006F54 + 3800393939006F5438006F5438006F543800393939006F5438006F5438006F54 + 3800393939006F5438006F543800393939004A4A4A0094ADA5008CA5A5007B7B + 7B00FFFFFF005A736B008CA5A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7 + E7006B6B6B00849C9C00849C9C00393939004A4A4A0094ADA5008CA5A5007B7B + 7B00FFFFFF005A736B008CA5A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7 + E7006B6B6B00849C9C00849C9C0039393900000000000000000000000000BDC6 + C600848C8C00424242003939390039393900394242007B848400BDC6CE00C6CE + D600000000000000000000000000000000004A4A4A006F5438006F543800FFFF + FF006F5438006F5438006F543800FFFFFF006F5438006F5438006F543800FFFF + FF006F5438006F5438006F543800393939004A4A4A0094ADA5008CA5A5007B7B + 7B00FFFFFF005A736B008CA5A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7 + E7006B6B6B00849C9C00849C9C00393939004A4A4A0094ADA5008CA5A5007B7B + 7B00FFFFFF005A736B008CA5A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7 + E7006B6B6B00849C9C00849C9C00393939000000000000000000C6CED6002929 + 2900636B6B009C9CA500ADB5B500ADB5B500BDC6C600737B7B0018181800848C + 8C00C6CED600000000000000000000000000525252006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F5438006F54 + 38006F5438006F5438006F54380039393900525252009CB5B5009CB5AD009C9C + 9C00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7 + E7007B7B7B00849C9C00849C9C0039393900525252009CB5B5009CB5AD009C9C + 9C00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7 + E7007B7B7B00849C9C00849C9C00393939000000000000000000C6CECE00ADB5 + BD00C6CED60039424200000000000000000018181800ADB5B500ADB5B5001010 + 10007B7B8400000000000000000000000000525252006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F5438006F54 + 38006F5438006F5438006F5438004242420052525200A5BDB500A5BDB500A5BD + B50094B5AD008CADA5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5 + A5008CA5A5008CA5A5008CA5A5004242420052525200A5BDB500A5BDB500A5BD + B50094B5AD008CADA5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5 + A5008CA5A5008CA5A5008CA5A5004242420000000000000000009CA5AD009CA5 + AD0021292900000000000000000000000000000000000000000094949C00848C + 8C00182121000000000000000000000000005A5A5A0071573C0071573C007157 + 3C003939390071573C0071573C0071573C003939390071573C0071573C007157 + 3C003939390071573C0071573C00424242005A5A5A00A5C6BD008CA59C008CA5 + A500849C9C007B948C00738C8400738C8400738C8400738C8C00738C8C00738C + 8C00738C8C006B8484008CADA500424242005A5A5A00A5C6BD008CA59C008CA5 + A500849C9C007B948C00738C8400738C8400738C8400738C8C00738C8C00738C + 8C00738C8C006B8484008CADA5004242420000000000000000005A5A6300848C + 8C000000000042424200C6CECE0000000000000000000000000084848C003139 + 390029313100B5BDBD0000000000000000005A5A5A00745B4000745B4000FFFF + FF00745B4000745B4000745B4000FFFFFF00745B4000745B4000745B4000FFFF + FF00745B4000745B4000745B40004A4A4A005A5A5A00ADC6BD0094ADA500E7E7 + E700F7F7F700F7F7F700EFEFEF00EFEFEF00EFEFEF00EFEFEF00F7F7F700EFEF + EF00DEDEDE0073948C0094ADAD004A4A4A005A5A5A00ADC6BD0094ADA500FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 + 00000000000073948C0094ADAD004A4A4A000000000000000000949C9C002121 + 2100000000000000000029292900080808000000000000000000393939002129 + 29007B8484008C8C8C00000000000000000063636300775F4400775F4400775F + 4400775F4400775F4400775F4400775F4400775F4400775F4400775F4400775F + 4400775F4400775F4400775F44004A4A4A0063636300ADC6C60094ADAD00FFFF + FF00FFFFFF00FFFFFF00FFFFFF006B6B6B006B6B6B00FFFFFF00FFFFFF00FFFF + FF00F7F7F7007B94940094ADAD004A4A4A0063636300ADC6C60094ADAD00FFFF + FF008C0000008C0000008C0000008C0000008C000000FFFFFF00000000000000 + 0000C6C6C6007B94940094ADAD004A4A4A0000000000000000004A5252008484 + 8C0073737B0042424A00101010001818180010101000525252005A6363008C8C + 940042424200949C9C0000000000000000006B6B6B007A644A007A644A007A64 + 4A007A644A007A644A007A644A007A644A007A644A007A644A007A644A007A64 + 4A007A644A007A644A007A644A00525252006B6B6B00ADCEC6009CB5AD00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00DEDEDE00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00F7F7F7007B9C94009CB5B500525252006B6B6B00ADCEC6009CB5AD00FFFF + FF00EF000000EF000000EF000000EF000000EF000000FFFFFF00000000000000 + 0000000000007B9C94009CB5B500525252000000000000000000949C9C004A4A + 4A00737B7B00737B7B00949C9C0094949C0094949C007B8484006B6B73005252 + 5200A5A5AD000000000000000000000000007B7B7B007E6950007E6950007E69 + 5000393939007E6950007E6950007E695000393939007E6950007E6950007E69 + 5000393939007E6950007E6950005A5A5A007B7B7B00CEE7DE00A5BDB500FFFF + FF00FFFFFF00FFFFFF00FFFFFF006B6B6B006B6B6B00DEDEDE00FFFFFF00FFFF + FF00FFFFFF008CA5A500ADC6C6005A5A5A007B7B7B00CEE7DE00A5BDB500FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FF000000FF000000FFFFFF00080808000808 + 0800C6C6C6008CA5A500ADC6C6005A5A5A000000000000000000C6CED600BDC6 + C60084848C00737B7B005252520052525200525252006B737300848C8C00BDBD + C600000000000000000000000000000000007B7B7B00826F5700826F5700FFFF + FF00826F5700826F5700826F5700FFFFFF00826F5700826F5700826F5700FFFF + FF00826F5700826F5700826F5700636363007B7B7B00D6EFE700A5BDB500FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00DEDEDE006B6B6B00FFFFFF00FFFF + FF00FFFFFF0094ADAD00ADC6C600636363007B7B7B00D6EFE700A5BDB5000818 + 1000081810000818100008181000081810000818100008181000081810000818 + 10000818100094ADAD00ADC6C600636363000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000007B7B7B0086765E0086765E008676 + 5E0086765E0086765E0086765E0086765E0086765E0086765E0086765E008676 + 5E0086765E0086765E0086765E006B6B6B007B7B7B00D6F7EF00A5BDB500FFFF + FF00FFFFFF00FFFFFF008C8C8C006B6B6B006B6B6B00DEDEDE00FFFFFF00FFFF + FF00FFFFFF0094ADA500ADCEC6006B6B6B007B7B7B00D6F7EF00A5BDB500FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0018211800182118001821 + 1800C6C6C60094ADA500ADCEC6006B6B6B000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000848484008B7C65008B7C65008B7C + 65008B7C65008B7C65008B7C65008B7C65008B7C65008B7C65008B7C65008B7C + 65008B7C65008B7C65008B7C65007373730084848400DEF7F700A5BDB500FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00F7F7F7009CB5AD00B5CECE007373730084848400DEF7F700A5BDB5002129 + 290021292900212929002129290021292900FFFFFF0021292900212929002129 + 2900212929009CB5AD00B5CECE00737373000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000084848400848484008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C00848484008484840000000000848484008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C00848484000000000000000000848484008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C0084848400000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000002929290029292900212121001818 + 1800181818001818180018181800181818001818180018181800181818002929 + 2900292929002121210021212100212121000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000ADADAD00BDBDBD00000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000393939006F5438006F5438006F54 + 38006F5438006F5438006F5438006F543800393939006F5438006F5438006F54 + 38006F5438006F5438003939390029292900316B630000423900004239000042 + 3900004239000042390000423900004239000042390000000000000000000000 + 000000000000B5B5B500CEC6CE00000000000000000000000000000000000000 + 000000000000000000000000000042635A0042635A0000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000010219C00000000000000000000000000000000000000 + 000000000000000000000000000000000000424242006F5438006F5438006F54 + 38006F5438006F5438006F543800FFFFFF006F5438006F5438006F5438006F54 + 38006F543800FFFFFF006F543800292929005A8C8400316B6300316B6300316B + 6300316B6300316B6300316B6300316B630000423900000000008C8C8C000000 + 0000C6C6C600D6D6D60000000000000000000000000000000000000000000000 + 00000000000000000000000000006B8484006B84840000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000010219C003139AD0010219C000000000000000000000000000000 + 0000000000000000000000000000000000004A4A4A006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F5438006F54 + 38006F5438006F5438006F543800393939005A8C8400316B6300316B6300316B + 6300316B6300316B6300316B6300316B630000423900000000009C9C9C008C8C + 8C00CECECE00DEDEDE0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000003139AD004A5AB5003139AD000000000000000000000000000000 + 0000000000000000000000000000000000004A4A4A006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F5438006F54 + 38006F5438006F5438006F543800393939005A8C8400316B6300427B73001052 + 4A0010524A0010524A0010524A0010524A0010524A0000000000C6C6C600D6D6 + D600E7E7E7008C8C8C0000000000000000000000000000000000000000000000 + 000000000000000000000000000042635A0042635A0000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000010219C003139AD00000000003139AD0010219C0000000000000000000000 + 000000000000000000000000000000000000525252006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F5438006F54 + 38006F5438006F5438006F543800393939005A8C8400316B63006BA59C00427B + 7300427B7300427B7300427B7300427B7300427B730000000000CECECE00DEDE + DE00EFEFEF00FFFFFF00FFFFFF00000000000000000000000000000000000000 + 00000000000000000000000000006B8484005A73730042635A00000000000000 + 0000000000000000000000000000000000000000000000000000000000001021 + 9C003139AD004A5AB500000000004A5AB5003139AD0000000000000000000000 + 000000000000000000000000000000000000525252006F5438006F5438006F54 + 38006F5438006F5438006F5438006F5438006F5438006F5438006F5438006F54 + 38006F5438006F5438006F543800424242005A8C8400316B63006BA59C00427B + 7300427B73005A8C8C00216B5A00216B5A00216B5A0000000000DEDEDE00EFEF + EF00F7F7F700FFFFFF0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000006B8484006B84840042635A000000 + 0000000000000000000000000000000000000000000000000000000000003139 + AD004A5AB5000000000000000000000000003139AD0010219C00000000000000 + 0000000000000000000000000000000000005A5A5A0071573C0071573C007157 + 3C0071573C0071573C0071573C0071573C003939390071573C0071573C007157 + 3C0071573C0071573C0039393900424242005A8C8400316B63006BA59C00427B + 7300427B73007BB5B5005A8C8C005A8C8C005A8C8C0000000000E7E7E700F7F7 + F700FFFFFF000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000005A7373004263 + 5A00000000000000000000000000000000000000000000000000000000004A5A + B500000000000000000000000000000000004A5AB5003139AD00000000000000 + 0000000000000000000000000000000000005A5A5A00745B4000745B4000745B + 4000745B4000745B4000745B4000FFFFFF00745B4000745B4000745B4000745B + 4000745B4000FFFFFF00745B40004A4A4A005A8C8400316B63006BA59C00427B + 7300427B73007BB5B5005A8C8C005A8C8C005A8C8C0000000000F7F7EF00FFFF + FF0000000000216B5A0000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000006B8484005A73 + 7300000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000003139AD0010219C001021 + 9C000000000000000000000000000000000063636300775F4400775F44003939 + 3900775F4400775F440039393900775F4400775F4400775F4400775F4400775F + 4400775F4400775F4400775F44004A4A4A005A8C84005A8C84006BA59C00427B + 7300427B73007BB5B5005A8C8C005A8C8C005A8C8C0000000000F7F7F7000000 + 00005A8C8C00216B5A0000000000000000000000000000000000000000000000 + 00000000000042635A0042635A00000000000000000042635A005A7373006B84 + 8400000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000004A5AB5003139AD003139 + AD0010219C0010219C0000000000000000006B6B6B007A644A00FFFFFF007A64 + 4A007A644A00FFFFFF007A644A007A644A007A644A007A644A007A644A007A64 + 4A007A644A007A644A007A644A005252520000000000000000006BA59C00427B + 7300427B73007BB5B5005A8C8C005A8C8C005A8C8C0000000000000000005A8C + 8C005A8C8C00216B5A0000000000000000000000000000000000000000000000 + 0000000000006B8484005A73730042635A0042635A005A7373006B8484000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000004A5AB5004A5A + B5003139AD003139AD0000000000000000007B7B7B007E6950007E6950007E69 + 50007E6950007E6950007E6950007E6950007E6950007E6950007E6950007E69 + 50007E6950007E6950007E6950005A5A5A0000000000000000006BA59C00427B + 7300427B73007BB5B5005A8C8C005A8C8C005A8C8C005A8C8C005A8C8C005A8C + 8C005A8C8C00216B5A0000000000000000000000000000000000000000000000 + 000000000000000000006B8484006B8484006B8484006B848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00004A5AB5004A5AB50000000000000000007B7B7B00826F5700826F57003939 + 3900826F5700826F570039393900826F5700826F5700826F5700826F5700826F + 5700826F5700826F5700826F57006363630000000000000000006BA59C006BA5 + 9C006BA59C007BB5B5005A8C8C005A8C8C005A8C8C005A8C8C005A8C8C005A8C + 8C005A8C8C00216B5A0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000007B7B7B0086765E00FFFFFF008676 + 5E0086765E00FFFFFF0086765E0086765E0086765E0086765E0086765E008676 + 5E0086765E0086765E0086765E006B6B6B000000000000000000000000000000 + 0000000000007BB5B5005A8C8C005A8C8C005A8C8C005A8C8C005A8C8C005A8C + 8C005A8C8C00216B5A0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000848484008B7C65008B7C65008B7C + 65008B7C65008B7C65008B7C65008B7C65008B7C65008B7C65008B7C65008B7C + 65008B7C65008B7C65008B7C6500737373000000000000000000000000000000 + 0000000000007BB5B5007BB5B5007BB5B5007BB5B5007BB5B5007BB5B5007BB5 + B5007BB5B5005A8C8C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000084848400848484008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C0084848400848484000000000000000000000000000000 + 00002131730010186B0010186B0010186B0010186B0010186B0010186B001018 + 6B0010186B0010186B0010186B0010186B000000000000000000000000000000 + 000000000000000000005A73730042635A0042635A0042635A0042635A004263 + 5A0042635A0042635A0042635A0042635A002929290029292900212121001818 + 1800181818001818180018181800181818001818180018181800181818002929 + 2900292929002121210021212100212121000000000000000000000000000000 + 0000000000000000000000005A0000005A000000420000004A00292994000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000394A7B00213173002131730021317300213173002131730010186B00394A + 7B0021317300213173002131730010186B000000000000000000000000000000 + 000000000000000000006B8484005A7373005A7373005A7373005A7373005A73 + 73005A7373005A7373005A73730042635A0039393900FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000 + 0000000000000000000000000000292929000000000000000000000000000000 + 0000000042002929940021218C00393939003939390029292900292929004A4A + B500000042000000000000000000000000000000000000000000000000000000 + 0000394A7B00213173002131730021317300213173002131730010186B00394A + 7B0021317300213173002131730010186B000000000000000000000000000000 + 000000000000000000006B8484005A7373005A7373005A7373005A7373005A73 + 73005A7373005A7373005A73730042635A0042424200FFFFFF008C0000008C00 + 00008C0000008C0000008C0000008C0000008C0000008C000000FFFFFF000000 + 0000000000000000000000000000292929000000000000000000000000000000 + 0000000042006B6B6B005A5ABD004A4AB5003939A5003939A5004A4AB5004242 + 4200000042000000000000000000000000000000000000000000000000000000 + 000021317300394A7B00394A7B00394A7B00394A7B00394A7B0010186B00394A + 7B00394A7B00394A7B00394A7B0010186B000000000000000000000000004263 + 5A00294A4A00294A4A006B8484005A7373005A7373005A7373005A7373005A73 + 73005A7373005A7373005A73730042635A004A4A4A00FFFFFF00BD000000BD00 + 0000BD000000BD000000BD000000BD000000BD000000BD000000FFFFFF000000 + 000000000000C6C6C600C6C6C600393939000000000000000000000000000000 + 0000000042009494EF000000420031319C001818840021218C0000005A008484 + DE00000042000000000000000000000000008C8C8C007B7B7B007B7B7B007B7B + 7B002131730010186B0010186B0010186B0010186B0010186B0010186B001018 + 6B0010186B0010186B0010186B0010186B000000000000000000000000005A73 + 6B0042635A0042635A006B8484005A7373005A7373005A7373005A7373005A73 + 73005A7373005A7373005A73730042635A004A4A4A00FFFFFF00D6000000D600 + 0000D6000000D6000000D6000000D6000000D6000000D6000000FFFFFF000000 + 0000000000000000000000000000393939000000000000000000000000000000 + 000031319C0029298C0031319C000000520000005200000042004242AD003131 + 9C0031319C00000000000000000000000000949494008C8C8C008C8C8C008C8C + 8C00394A7B002131730021317300213173002131730021317300213173002131 + 730021317300213173002131730010186B000000000000000000000000005A73 + 6B0042635A0042635A006B8484005A7373005A7373005A7373005A7373005A73 + 73005A7373005A7373005A73730042635A0052525200FFFFFF00EF000000EF00 + 0000EF000000EF000000EF000000EF000000EF000000EF000000FFFFFF000000 + 0000000000000000000000000000393939000000000000000000000000003131 + 9C00000042007B7BDE006363C60031319C005A5ABD0031319C006363C6007B7B + DE000000000031319C000000000000000000949494008C8C8C00949494004242 + 4200394A7B002131730021317300213173002131730021317300213173002131 + 730021317300213173002131730010186B003139AD0010219C0010219C005A73 + 6B0042635A0042635A006B8484005A7373005A7373005A7373005A7373005A73 + 73005A7373005A7373005A73730042635A0052525200FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FF000000FF000000FF000000FFFFFF000808 + 080008080800C6C6C600C6C6C600424242000000000010107300080863000808 + 6300000042006B6BCE004A4AB5009494EF007B7BDE009494EF004A4AB5006B6B + CE000000000000005A000000520000000000949494008C8C8C00D6D6D6009494 + 940021317300394A7B00394A7B00394A7B00394A7B00394A7B00394A7B00394A + 7B00394A7B00394A7B00394A7B0010186B004A5AB5003139AD003139AD005A73 + 6B0042635A0042635A006B8484005A7373005A7373005A7373005A7373005A73 + 73005A7373005A7373005A73730042635A005A5A5A0008080800080808000808 + 0800080808000808080008080800080808000808080008080800080808000808 + 0800080808000808080008080800424242000000000021218C006B6BCE007B7B + DE00101073005A5ABD0031319C006B6BCE005252BD006B6BCE0031319C002929 + 8C003939A5008C8CE7002929940000000000949494008C8C8C008C8C8C008C8C + 8C002131730010186B0010186B0010186B0010186B0010186B0010186B001018 + 6B0010186B0010186B0010186B0010186B004A5AB5003139AD003139AD005A73 + 6B0042635A0042635A006B8484005A7373005A7373005A7373005A7373005A73 + 73005A7373005A7373005A73730042635A005A5A5A0008080800080808000808 + 0800080808000808080008080800080808000808080008080800080808000808 + 08000808080008080800080808004A4A4A000000000031319C006B6BCE003131 + 9C0018187B0000005A0000005A0000005A0000004A0018187B0000005A000000 + 42006363C6006B6BCE007B7BDE0000000000949494008C8C8C008C8C8C008C8C + 8C00394A7B002131730021317300213173002131730010186B00394A7B002131 + 730021317300213173002131730010186B004A5AB5003139AD003139AD005A73 + 6B0042635A0042635A006B8484006B8484006B8484006B8484006B8484006B84 + 84006B8484006B8484006B8484005A7373006363630008181000081810000818 + 1000081810000818100008181000081810000818100008181000081810000818 + 100008181000C6C6C600C6C6C6004A4A4A00000000000000000031319C001818 + 7B003939A500A5A5F700A5A5F7008C8CE7003939A5008C8CE700A5A5F7008C8C + E70000005A0031319C000000000000000000949494008C8C8C008C8C8C008C8C + 8C00394A7B002131730021317300213173002131730010186B00394A7B002131 + 730021317300213173002131730010186B004A5AB5003139AD003139AD005A73 + 6B0042635A0042635A0042635A0042635A0042635A0042635A0042635A004263 + 5A00294A4A000000000000000000000000006B6B6B00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0018211800182118001821 + 180018211800182118001821180052525200000000002121210000005A001010 + 73008484DE007B7BDE006B6BCE008484DE006B6BCE008484DE007B7BDE008C8C + E7005252BD00212121002121210000000000949494008C8C8C008C8C8C008C8C + 8C00394A7B00394A7B00394A7B00394A7B00394A7B002131730021317300394A + 7B00394A7B00394A7B00394A7B00213173004A5AB5003139AD003139AD005A73 + 6B0042635A0042635A0042635A0042635A0042635A0042635A0042635A004263 + 5A00294A4A000000000000000000000000007B7B7B0021292900212929002129 + 290021292900212929002129290021292900FFFFFF0021292900212929002129 + 29002129290021292900212929005A5A5A00212121004A4A4A00212121001818 + 84006B6BCE005252BD007373D6005A5ABD004A4AB5005A5ABD006B6BCE007373 + D60018187B00212121004A4A4A0021212100949494008C8C8C00949494004242 + 42008C8C8C008C8C8C008C8C8C008C8C8C0094949400424242008C8C8C007B7B + 7B00000000000000000000000000000000004A5AB5003139AD003139AD005A73 + 6B005A736B005A736B005A736B005A736B005A736B005A736B005A736B005A73 + 6B0042635A000000000000000000000000007B7B7B0031393900313939003139 + 3900313939003139390031393900313939003139390031393900313939003139 + 390031393900C6C6C600C6C6C60063636300212121005A5A5A00212121005252 + BD006B6BCE0031319C006B6BCE008C8CE7008C8CE7008C8CE7006B6BCE006B6B + CE0000005200212121005A5A5A0021212100949494008C8C8C00D6D6D6009494 + 94008C8C8C008C8C8C008C8C8C008C8C8C00D6D6D600949494008C8C8C007B7B + 7B00000000000000000000000000000000004A5AB5003139AD003139AD003139 + AD003139AD003139AD003139AD003139AD003139AD0010219C00000000000000 + 0000000000000000000000000000000000007B7B7B0039424200394242003942 + 4200394242003942420039424200394242003942420039424200394242003942 + 42003942420039424200394242006B6B6B00212121006B6B6B005A5A5A008C8C + E7009494EF006B6BCE008C8CE700A5A5F700B5B5FF00A5A5F7008C8CE7008C8C + E70029298C005A5A5A006B6B6B0021212100949494008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C007B7B + 7B00000000000000000000000000000000004A5AB5003139AD003139AD003139 + AD003139AD003139AD003139AD003139AD003139AD0010219C00000000000000 + 00000000000000000000000000000000000084848400525A5A004A5A5200525A + 5A00525A5A00525A5A00525A5A00525A5A00525A5A00525A5A00525A5A00525A + 5A00525A5A004A5A52004A5A520073737300000000004A4A4A005A5ABD006B6B + CE006B6BCE005252BD006B6BCE008C8CE7008C8CE7008C8CE7006B6BCE003131 + 9C007B7BDE005A5ABD004A4A4A00000000009494940094949400949494009494 + 9400949494009494940094949400949494009494940094949400949494008C8C + 8C00000000000000000000000000000000004A5AB5004A5AB5004A5AB5004A5A + B5004A5AB5004A5AB5004A5AB5004A5AB5004A5AB5003139AD00000000000000 + 00000000000000000000000000000000000084848400848484008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C0084848400848484000000000000000000000000000000 + 0000000000000000000031319C005A5ABD005A5ABD0031319C00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000002929290029292900212121001818 + 1800181818001818180018181800181818001818180018181800292929002929 + 2900212121000000000000000000000000000000000000000000292929002929 + 2900292929002929290029292900292929002929290029292900292929002929 + 290021212100292929000000000000000000000000006B6B6B00292929002121 + 2100181818001818180018181800181818001818180018181800181818001818 + 1800181818004A4AFF004A4AFF00000000000000000000000000000000000000 + 000000000000000000006B6B6B00292929002121210018181800181818001818 + 18001818180018181800181818004A4A4A0039393900FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000 + 0000292929000000000000000000000000000000000000000000393939007B9C + 9C007B9C9C007B9C9C007B9C9C007B9C9C007B9C9C007B9C9C007B9C9C007B9C + 9C007B9C9C002929290000000000000000000000000042424200FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00B5B5 + B5004A4AFF004A4AFF0029292900000000000000000000000000000000000000 + 0000000000000000000042424200FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF002929290042424200FFFFFF008C000000FFDE + DE00FFDEDE00FFDEDE00FFDEDE00FFDEDE00FFDEDE00FFFFFF00DEDEDE000000 + 000029292900000000000000000000000000000000000000000042424200849C + 9C00849C9C00849C9C00849C9C00849C9C00849C9C00849C9C00849C9C00849C + 9C00849C9C002929290000000000000000000000000042424200FFFFFF00C6DE + DE00C6DEDE00B5B5B500C6DEDE00C6DEDE00C6DEDE00C6DEDE00B5B5B5004A4A + FF004A4AFF00FFFFFF0031313100000000006B6B6B0029292900212121001818 + 1800181818001818180042424200FFFFFF00E7C6C600E7C6C600E7C6C600E7C6 + C600E7C6C600E7C6C600FFFFFF00313131004A4A4A00FFFFFF00BD000000FFDE + DE004A63520042635A0042635A0042635A0042635A0042635A00DEDEDE000000 + 00003939390000000000000000000000000000000000000000004A4A4A008CA5 + A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5 + A5008CA5A500393939000000000000000000000000004A4A4A00FFFFFF00BDDE + D600BDDED6004A4AFF00B5B5B500B5B5B500BDDED600B5B5B5004A4AFF004A4A + FF00BDDED600FFFFFF00313131000000000042424200FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF004A4A4A00FFFFFF00EFCECE00EFCECE00EFCECE00EFCE + CE00EFCECE00EFCECE00FFFFFF00313131004A4A4A00FFFFFF00D6000000FFDE + DE006B8484005A7373005A7373005A73730042635A00FFFFFF00000000000000 + 00003939390000000000000000000000000000000000000000004A4A4A0094AD + AD0094ADAD0094ADAD0094ADAD0094ADAD0094ADAD0094ADAD0094ADAD0094AD + AD0094ADAD00393939000000000000000000000000004A4A4A00FFFFFF00CEE7 + E700CEE7E700CEE7E7004A4AFF004A4AFF00B5B5B5004A4AFF004A4AFF00CEE7 + E700CEE7E700FFFFFF00313131000000000042424200FFFFFF00C6DEDE00C6DE + DE00C6DEDE00C6DEDE005A5A5A00FFFFFF00F7D6DE00F7D6DE00F7D6DE00F7D6 + DE00F7D6DE00F7D6DE00FFFFFF004242420052525200FFFFFF00EF000000FFDE + DE006B8484005A7373005A73730042635A0042635A00FFFFFF00000000000000 + 0000393939000000000000000000000000000000000000000000525252009CB5 + B5009CB5B5009CB5B5009CB5B5009CB5B5009CB5B5009CB5B5009CB5B5009CB5 + B5009CB5B500393939000000000000000000000000004A4A4A00FFFFFF00CEE7 + E700CEE7E700CEE7E700CEE7E7004A4AFF004A4AFF004A4AFF00B5B5B500CEE7 + E700CEE7E700FFFFFF0039393900000000004A4A4A00FFFFFF00CEE7E700CEE7 + E700CEE7E700CEE7E7005A5A5A00FFFFFF00F7D6DE00F7D6DE00F7D6DE00F7D6 + DE00F7D6DE00F7D6DE00FFFFFF004242420052525200FFFFFF00FFFFFF00FFFF + FF006B8484005A7373006B8484005A73730042635A0042635A00DEDEDE000808 + 080042424200000000000000000000000000000000000000000052525200A5BD + BD00A5BDBD00A5BDBD00A5BDBD00A5BDBD00A5BDBD00A5BDBD007B9C9C006B84 + 8400A5BDBD00424242000000000000000000000000005A5A5A00FFFFFF00D6EF + E700D6EFE700D6EFE700B5B5B5004A4AFF004A4AFF004A4AFF004A4AFF00B5B5 + B500B5B5B500FFFFFF0042424200000000005A5A5A00FFFFFF00D6EFE700D6EF + E700D6EFE700D6EFE7006B6B6B00FFFFFF00FFDEDE00FFDEDE00FFDEDE00FFDE + DE00FFDEDE00E7C6C600DEDEDE00525252005A5A5A000808080008080800DEDE + DE006B8484006B8484006B8484006B8484005A73730042635A0042635A00EFEF + EF001818180018181800181818004A4A4A0000000000000000005A5A5A00ADC6 + C600ADC6C600ADC6C600ADC6C600ADC6C600ADC6C600ADC6C600DEF7F7007B9C + 9C00ADC6C600424242000000000000000000000000005A5A5A00FFFFFF00D6EF + E700D6EFE700D6EFE7004A4AFF004A4AFF004A4AFF00D6EFE7004A4AFF004A4A + FF004A4AFF00B5B5B50042424200000000005A5A5A00FFFFFF00D6EFE700D6EF + E700D6EFE700D6EFE7006B6B6B00FFFFFF00FFDEDE00FFDEDE00FFDEDE00F7F7 + F700D6D6D600B5B5B5009C9C9C00525252005A5A5A000808080021292900DEE7 + E7006B848400DEE7E700F7F7F7006B8484006B8484005A73730042635A004263 + 5A00FFFFFF00FFFFFF00FFFFFF002929290000000000000000005A5A5A00B5CE + CE00B5CECE00B5CECE00B5CECE00B5CECE00B5CECE00B5CECE00B5CECE00B5CE + CE00B5CECE004A4A4A0000000000000000000000000063636300FFFFFF00D6EF + EF00D6EFEF00B5B5B5004A4AFF004A4AFF00D6EFEF00D6EFEF00D6EFEF004A4A + FF004A4AFF004A4AFF004A4A4A00000000006B6B6B00FFFFFF00DEF7F700DEF7 + F700DEF7F700DEF7F7006B6B6B00FFFFFF00FFDEDE00FFDEDE00FFDEDE00F7F7 + F70094949400737373005A5A5A005A5A5A007B7B7B002129290021292900F7F7 + F700F7F7F700F7F7F70021292900F7F7F7006B8484006B8484005A7373004263 + 5A0042635A00FFFFFF00FFFFFF0031313100000000000000000063636300BDD6 + D600BDD6D600BDD6D600BDD6D600BDD6D600BDD6D600BDD6D600BDD6D600BDD6 + D600BDD6D6004A4A4A000000000000000000000000006B6B6B00FFFFFF00DEF7 + F700B5B5B5004A4AFF004A4AFF00DEF7F700DEF7F700DEF7F700DEF7F700CEEF + E7004A4AFF004A4AFF004A4AFF00000000006B6B6B00FFFFFF00DEF7F700DEF7 + F700DEF7F700F7F7F7006B6B6B00FFFFFF00FFE7EF00FFE7EF00FFE7EF00F7F7 + F700A5A5A500FFFFFF00FFFFFF005A5A5A005A5A5A0031393900313939003139 + 390031393900313939003139390031393900FFFFFF006B8484006B8484004263 + 5A00FFFFFF00FFFFFF00DEDEDE005252520000000000000000006B6B6B00C6DE + DE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DE + DE00C6DEDE00525252000000000000000000000000006B6B6B00FFFFFF00B5B5 + B5004A4AFF004A4AFF004A4AFF00DEF7F700DEF7F700F7F7F700D6D6D600C6C6 + C600B5B5B5004A4AFF004A4AFF004A4AFF006B6B6B00FFFFFF00DEF7F700DEF7 + F700DEF7F700F7F7F7006B6B6B00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00CECECE00DEB5BD0073737300000000007B7B7B0039424200394242003942 + 4200394242003942420039424200394242006B6B6B00FFFFFF006B848400FFFF + FF00FFFFFF00B5B5B5009C9C9C005252520000000000000000007B7B7B00CEE7 + E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7 + E700CEE7E7005A5A5A000000000000000000000000006B6B6B00FFFFFF004A4A + FF004A4AFF004A4AFF00DEF7F700DEF7F700DEF7F700F7F7F700949494008C8C + 8C00737373005A5A5A004A4AFF004A4AFF006B6B6B00FFFFFF00E7FFF700E7FF + F700E7FFF700F7F7F700737373007373730073737300737373007B7B7B008484 + 84008484840084848400000000000000000084848400525A5A004A5A5200525A + 5A00525A5A00525A5A00525A5A00525A5A006B6B6B00FFFFFF00FFFFFF00FFFF + FF0094949400737373005A5A5A005A5A5A0000000000000000007B7B7B00D6EF + EF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EF + EF00D6EFEF00636363000000000000000000000000006B6B6B00FFFFFF00E7FF + F7004A4AFF004A4AFF00E7FFF700E7FFF700E7FFF700F7F7F700A5A5A500FFFF + FF00FFFFFF00FFFFFF005A5A5A004A4AFF006B6B6B00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00CECECE00B5D6CE007373730000000000000000000000 + 00000000000000000000000000000000000084848400848484008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C006B6B6B00FFFFFF00FFE7EF00F7F7 + F700A5A5A500FFFFFF00FFFFFF005A5A5A0000000000000000007B7B7B00DEF7 + F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7 + F700DEF7F7006B6B6B000000000000000000000000006B6B6B00FFFFFF00E7FF + F700E7FFF700E7FFF700E7FFF700E7FFF700E7FFF700F7F7F700B5B5B500FFFF + FF00D6F7EF00B5D6CE006B6B6B00000000007373730073737300737373007373 + 73007B7B7B008484840084848400848484000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000006B6B6B00FFFFFF00FFFFFF00FFFF + FF00CECECE00DEB5BD007373730000000000000000000000000084848400DEF7 + F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7 + F700DEF7F700737373000000000000000000000000006B6B6B00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00CECECE00FFFF + FF00B5D6CE007373730000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000007373730073737300737373008484 + 84008484840084848400000000000000000000000000000000007B7B7B008484 + 8400848484008484840084848400848484008484840084848400848484008484 + 8400848484007373730000000000000000000000000073737300737373007373 + 7300737373007B7B7B007B7B7B007B7B7B008484840084848400848484008484 + 8400848484000000000000000000000000000000000000000000000000000000 + 0000000000004A3939004A3939004A3939004A3939004A3939004A3939000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000800 + 00003921210021000000520000006B0808006B0808005A000000290000002910 + 1000080000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000042424200393939003939 + 3900424242004242420042424200313131003939390042424200424242003939 + 3900393939002929290039393900000000000000000000000000000000002952 + 3900315A4A00295239000000000000000000000000002952390031634A00214A + 3100000000000000000000000000000000000000000000000000080000001000 + 00006B00000084000000AD000000EF101000EF181800BD0000008C0000007300 + 0000310000000800000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000007B7B7B00636363006363 + 63006B6B6B006B6B6B006B6B6B005A5A5A00636363006B6B6B007B7B7B006B6B + 6B005A5A5A005A5A5A0042424200000000000000000000000000315242005284 + 6B00528C6B005A8C73004A6B5A0000000000426B5A005A8473005A9473006394 + 7300214A31000000000000000000000000000000000008000000210000006300 + 0000CE000000AD0000006300000042000000420000005A0000009C000000BD00 + 0000940000002900000008000000000000000000000000000000294A4A00294A + 4A00294A4A00294A4A00294A4A00000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000848484006B6B6B006363 + 6300737373007373730073737300636363006B6B6B0073737300848484006B6B + 6B00636363006363630042424200000000000000000000000000294231004A7B + 63000000000000000000637B7300396352005A7B6B000000000000000000527B + 6300395A4200000000000000000000000000000000000000000000000000AD00 + 0000F7101000C61010005A000000080000000800000042000000B5000000F708 + 0800C60000006B000000421818000000000000000000000000006B8484004263 + 5A00294A4A00294A4A0000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000008C8C8C006B6B6B006B6B + 6B007B7B7B007B7B7B007B7B7B006B6B6B006B6B6B007B7B7B00848484007373 + 730063636300636363004A4A4A00000000000000000000000000000000004A6B + 5A00000000000000000000000000426B5A00000000000000000000000000527B + 6300000000000000000000000000000000004A31310029000000CE000000CE00 + 0000DE000000CE000000CE000000B5101000B5101000CE000000BD000000DE00 + 0000BD000000AD000000630000003108080000000000000000006B8484004263 + 5A0042635A00294A4A0000000000000000000000000000000000000000000000 + 000000000000294A4A0000000000000000000000000094949400737373007B7B + 7B008484840084848400848484006B6B6B007373730084848400949494007B7B + 7B00737373006B6B6B004A4A4A00000000000000000000000000000000004A6B + 5A005273630000000000315A4A004A7B6B00295A4A00000000004A7363004A6B + 5A00000000000000000000000000000000004A313100840000009C000000CE00 + 0000E7000000EF000000DE000000AD101000A5181800CE000000D6000000EF00 + 0000DE000000B5000000840000003108080000000000000000006B8484006B84 + 840042635A00294A4A00294A4A00000000000000000000000000000000000000 + 00000000000042635A00294A4A0000000000000000009C9C9C007B7B7B006363 + 6300424242006B6B6B008C8C8C00737373007B7B7B008C8C8C006B6B6B003939 + 39005A5A5A007373730052525200000000000000000000000000000000000000 + 00004A6B5A006B8C7B0052846B006B9C8C006B9C8C0052736300526B63000000 + 00000000000000000000000000000000000052313100940000009C000000E700 + 0000F7212100F7181800EF000000B50000009C080800E7000000F7101000F729 + 2900DE000000B5000000940000004210100000000000000000006B8484000000 + 00006B84840042635A00294A4A00294A4A000000000000000000000000000000 + 0000294A4A0042635A006B84840000000000000000009C9C9C007B7B7B008C8C + 8C00424242008C8C8C008C8C8C0073737300737373008C8C8C00949494003131 + 310073737300737373005A5A5A00000000000000000000000000000000000000 + 000000000000000000004A4A4A004A4A4A004A4A4A0000000000000000000000 + 0000000000000000000000000000000000004A3939009C000000A5000000BD00 + 0000A5000000CE101000E7000000E7080800E7101000C6000000DE080800C608 + 080094000000A50000009C000000421010000000000000000000000000000000 + 00000000000042635A0042635A00294A4A00294A4A00294A4A00294A4A00294A + 4A0042635A0042635A00000000000000000000000000A5A5A500848484004A6B + 630039393900636363004A4A4A003939390031313100424242005A5A5A002121 + 21004A6B63007B7B7B005A5A5A00000000000000000000000000000000000000 + 0000000000004A4A4A006B6B6B004A4A4A006B6B6B004A4A4A00000000000000 + 000000000000000000000000000000000000423131008400000084000000CE00 + 0000CE101000F7393900A5080800840000008C00000063000000D6424200F731 + 3100AD0000009400000073000000290808000000000000000000000000000000 + 0000000000006B84840042635A0042635A0042635A0042635A0042635A004263 + 5A0042635A006B8484000000000000000000000000009C9C9C007B7B7B006B6B + 6B00525252004A4A4A0063636300212121001010100063636300525252005252 + 52006B6B6B007373730052525200000000000000000000000000000000000000 + 0000000000006B6B6B00848484004A4A4A00848484006B6B6B00000000000000 + 0000000000000000000000000000000000004A3939001000000084000000A500 + 0000DE101000FF4A4A00C6181800CE000000DE000000940000008C000000C608 + 0800BD0000009400000042000000421010000000000000000000000000000000 + 000000000000000000006B84840042635A0042635A0042635A0042635A004263 + 5A006B8484000000000000000000000000000000000094949400737373006B6B + 6B008C8C8C008C8C8C008C8C8C00212121001010100084848400949494007B7B + 7B006B6B6B006B6B6B004A4A4A00000000000000000000000000000000000000 + 00004A4A4A006B6B6B00A5A5A50000000000A5A5A5006B6B6B004A4A4A000000 + 0000000000000000000000000000000000000000000000000000840000008400 + 0000FF4A4A00FF9C9C00FF525200FF4A4A00FF636300FF313100E7000000DE00 + 0000AD0000009400000000000000000000000000000000000000000000000000 + 00000000000000000000000000006B8484006B8484006B8484006B8484006B84 + 8400000000000000000000000000000000000000000094949400737373006B6B + 6B0084848400848484008484840029292900212121007B7B7B008C8C8C007B7B + 7B006B6B6B006B6B6B004A4A4A00000000000000000000000000000000000000 + 00006B6B6B0084848400A5A5A50000000000A5A5A500848484006B6B6B000000 + 0000000000000000000000000000000000000000000008000000080000001800 + 0000BD181800F74A4A00F7393900F7424200F7424200FF393900F7080800C600 + 0000520000002100000008000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000848484006B6B6B006B6B + 6B007B7B7B007B7B7B007B7B7B0042424200424242007B7B7B008C8C8C007373 + 7300636363006B6B6B004A4A4A00000000000000000000000000000000000000 + 000084848400A5A5A500000000000000000000000000A5A5A500848484000000 + 0000000000000000000000000000000000000000000000000000080000000800 + 000010000000520000009C0000009C0000009C0000009C000000730000004A00 + 0000180000000800000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000007B7B7B006B6B6B006363 + 6300737373007373730073737300636363006B6B6B0073737300848484006B6B + 6B00636363006363630042424200000000000000000000000000000000000000 + 000084848400A5A5A500000000000000000000000000A5A5A500848484000000 + 0000000000000000000000000000000000000000000000000000000000000800 + 0000211818000000000018000000180000002100000021000000100000002108 + 0800080000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000094949400848484007B7B + 7B009C9C9C009C9C9C009C9C9C007B7B7B008C8C8C009C9C9C00A5A5A5008C8C + 8C007B7B7B007B7B7B005A5A5A00000000000000000000000000000000000000 + 0000A5A5A500A5A5A500000000000000000000000000A5A5A500A5A5A5000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000004A3939004A3939004A3939004A3939004A3939004A3939000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000006B6B6B00292929002121 + 2100181818001818180018181800181818001818180018181800181818001818 + 180018181800181818004A4A4A0000000000000000004A4A52004A4A52004A4A + 52004A4A52004A4A52004A4A52004A4A52004A4A52004A4A52004A4A52004A4A + 52004A4A52007B94940000000000000000000000000029292900212121001818 + 1800181818001818180018181800181818001818180018181800181818002929 + 2900292929002121210021212100000000000000000031528400315284000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000042424200FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00292929000000000000000000393939007B8C8C00849C + 94007B9494007B9494007B9494007B9494007B9494007B9494007B9494007B94 + 94007B9494007B9494000000000000000000393939007B9494007B9494006363 + 6300E7E7E700FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7E700D6D6D600E7E7 + E7005A5A5A007B9494007B9494002929290000000000849CB500315284000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000042424200FFFFFF00C6DE + DE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DE + DE00C6DEDE00FFFFFF00313131000000000000000000393939007B94940094AD + AD0094ADA50094ADA50094ADA50094ADA50094ADA50094ADA50094ADAD0094B5 + AD0094B5B5007B9494000000000000000000424242007B9494007B9494006B6B + 6B00FFFFFF00E7E7E700A5BDB500FFFFFF00FFFFFF00EFEFEF00E7E7E700E7E7 + E7006B6B6B007B9494007B9494002929290000000000849CB500315284000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000004A4A4A00FFFFFF00BDDE + D600BDDED600BDDED600BDDED600BDDED600BDDED600BDDED600BDDED600BDDE + D600BDDED600FFFFFF00313131000000000000000000424242005A6363009CB5 + AD0094ADAD0094ADAD0094ADAD0094ADAD0094ADAD0094ADAD0094ADAD009CB5 + B5009CBDB500A5BDBD007B949400000000004A4A4A0094ADA5008CA5A5007B7B + 7B00FFFFFF005A736B008CA5A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7 + E7006B6B6B00849C9C00849C9C003939390000000000849CB500315284000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000004A4A4A00FFFFFF00CEE7 + E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7 + E700CEE7E700FFFFFF003131310000000000000000004A4A4A005A5A5A0094B5 + AD00A5BDB500A5BDB500A5BDB500A5BDB500A5BDB500A5BDB500A5BDB500A5BD + B500A5BDBD00ADCEC6007B949400000000004A4A4A0094ADA5008CA5A5007B7B + 7B00FFFFFF005A736B008CA5A500FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7 + E7006B6B6B00849C9C00849C9C003939390000000000849CB500315284000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000004A4A4A00FFFFFF00CEE7 + E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7 + E700CEE7E700FFFFFF00393939000000000000000000525252005A5A5A007B8C + 8C00ADC6C600A5BDBD00A5BDBD00A5BDBD00A5BDBD00A5BDBD00A5BDBD00A5BD + BD00ADC6C600BDD6CE007B94940000000000525252009CB5B5009CB5AD009C9C + 9C00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E7E7 + E7007B7B7B00849C9C00849C9C003939390000000000849CB500315284000000 + 0000000000000000000000000000000000000000520000005200000052000000 + 520000005200000052000000000000000000000000005A5A5A00FFFFFF00D6EF + E700D6EFE700D6EFE700D6EFE700D6EFE700D6EFE700D6EFE700D6EFE700D6EF + E700D6EFE700FFFFFF004242420000000000000000005A5A5A005A5A5A00737B + 7B00B5CEC600ADC6BD00ADC6BD00ADC6BD00ADC6C600ADC6BD00ADC6BD00B5CE + C600B5CECE00BDDED6007B9494000000000052525200A5BDB500A5BDB500A5BD + B50094B5AD008CADA5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5 + A5008CA5A5008CA5A5008CA5A5004242420000000000849CB500315284000000 + 52000000520000005200000052000000520008008C0008008C0008008C000800 + 8C0000005200000000000000000000000000000000005A5A5A00FFFFFF00D6EF + E700D6EFE700D6EFE700D6EFE700D6EFE700D6EFE700D6EFE700D6EFE700D6EF + E700D6EFE700FFFFFF00424242000000000000000000636363006B6B6B006363 + 6300A5B5B500BDD6D600BDD6D600B5D6CE00B5D6CE00B5CECE00B5CECE00B5CE + CE00B5D6CE00BDD6D600C6DEDE007B9494005A5A5A00A5C6BD008CA59C008CA5 + A500849C9C007B948C00738C8400738C8400738C8400738C8C00738C8C00738C + 8C00738C8C006B8484008CADA5004242420000000000849CB500315284000800 + 8C0008008C0008008C000800C6000800C60008008C000800A5000800A5000000 + 5200000000000000000000000000000000000000000063636300FFFFFF00D6EF + EF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EF + EF00D6EFEF00FFFFFF004A4A4A0000000000000000006B6B6B007B7373006B6B + 6B007B848400B5CECE00B5CECE00BDD6D600BDD6D600BDD6D600BDD6D600BDD6 + D600BDD6D600BDDED600CEE7DE007B9494005A5A5A00ADC6BD0094ADA500E7E7 + E700F7F7F700F7F7F700EFEFEF00EFEFEF00EFEFEF00EFEFEF00F7F7F700EFEF + EF00DEDEDE0073948C0094ADAD004A4A4A0000000000849CB500315284000800 + A5000800A5000800A50008008C000800C60008008C0008008C00000052000000 + 000000000000000000000000000000000000000000006B6B6B00FFFFFF00DEF7 + F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700CEEF + E700C6DEDE00DEDEDE0052525200000000000000000073737300847B7B007B7B + 7B006B6B6B007373730073737300737373006B736B00ADC6BD00CEE7E700C6DE + D600C6DED600C6DED600C6E7DE007B94940063636300ADC6C60094ADAD00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00F7F7F7007B94940094ADAD004A4A4A0000000000849CB500315284000800 + A5000800A50008008C000800C6000800C60008008C000800A500000052000000 + 000000000000000000000000000000000000000000006B6B6B00FFFFFF00DEF7 + F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700F7F7F700D6D6D600C6C6 + C600B5B5B5009C9C9C005252520000000000000000007B7B7B00848484008484 + 8400848484008484840084848400848484007B7B7B00848C8400D6EFE700DEF7 + F700DEF7F700DEF7F700E7F7F7007B9494006B6B6B00ADCEC6009CB5AD00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00F7F7F7007B9C94009CB5B5005252520000000000849CB500315284000800 + A5000800A5000800A50008008C000800C60008008C0008008C000800A5000000 + 520000000000000000000000000000000000000000006B6B6B00FFFFFF00DEF7 + F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700F7F7F700949494008C8C + 8C00737373005A5A5A005A5A5A000000000000000000848484008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008484840084848400848C + 8400848C8400848C840084848400000000007B7B7B00CEE7DE00A5BDB500FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF008CA5A500ADC6C6005A5A5A0000000000849CB500315284000800 + A5000800A50008008C000800C6000800C60008008C000800A5000800A5000800 + A50000005200000000000000000000000000000000006B6B6B00FFFFFF00E7FF + F700E7FFF700E7FFF700E7FFF700E7FFF700E7FFF700F7F7F700A5A5A500FFFF + FF00FFFFFF00FFFFFF005A5A5A0000000000000000008C8C8C00949494008C94 + 8C008C94940094949400949494008C8C8C007B7B7B007B7B7B00737373007373 + 7300737373007373730000000000000000007B7B7B00D6EFE700A5BDB500FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0094ADAD00ADC6C6006363630000000000849CB500315284000800 + A5000800A5000800A50008008C000800C6000000520000005200000052000000 + 520000005200000052000000000000000000000000006B6B6B00FFFFFF00E7FF + F700E7FFF700E7FFF700E7FFF700E7FFF700E7FFF700F7F7F700B5B5B500FFFF + FF00D6F7EF00B5D6CE006B6B6B000000000000000000949494009C9C9C009C9C + 9C009C9C9C009C9C9C009C9C9C00949494000000000000000000000000000000 + 0000000000000000000000000000000000007B7B7B00D6F7EF00A5BDB500FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0094ADA500ADCEC6006B6B6B0000000000849CB500315284000000 + 5200000052000000520000005200000052000000000000000000000000000000 + 000000000000000000000000000000000000000000006B6B6B00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00CECECE00FFFF + FF00B5D6CE0073737300000000000000000000000000000000008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C00000000000000000000000000000000000000 + 00000000000000000000000000000000000084848400DEF7F700A5BDB500FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00F7F7F7009CB5AD00B5CECE007373730000000000849CB500849CB5000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000073737300737373007373 + 7300737373007B7B7B007B7B7B007B7B7B008484840084848400848484008484 + 8400848484000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000848484008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C0084848400000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000424D3E000000000000003E000000 + 2800000040000000900000000100010000000000800400000000000000000000 + 000000000000000000000000FFFFFF0000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000FC008001FFFF0000FC008001FFFF + 0000FC008001FFFF0000E0008000FFFF0000E000800018C70000E00080008C63 + 000000008000C631000000008000E318000000008000E318000000008001C631 + 0000000780018C6300000007800118C7000000078001FFFF0000003F8001FFFF + 0000003F8003FFFF0000003F8007FFFF000080018001FFFF000000000000FFFF + 000000000000F03F000000000000E00F000000000000C007000000000000C007 + 000000000000C007000000000000C003000000000000C003000000000000C003 + 000000000000C007000000000000C00F000000000000FFFF000000000000FFFF + 000000000000FFFF000080018001FFFFFFF9FFFFFFFF0000FFF0FFFFFFFF0000 + 0010FE7FFDFF00000001FE7FF8FF00000001FFFFF8FF00000000FE7FF27F0000 + 0000FE3FE27F00000001FF1FE73F00000003FFCFEF3F00000003FFCFFF8F0000 + 0003F98FFF830000C003F81FFFC30000C003FC3FFFF30000C003FFFFFFFF0000 + F803FFFFFFFF0000F803FFFFFFFF0000F000FC000000FC1FF000FC000000F007 + F000FC000000F007F000E0000000F0070000E0000000F0070000E0000000E003 + 000000000000800100000000000080010000000000008001000000000000C003 + 00000007000080010000000700000000000F000700000000000F003F00000000 + 000F003F00008001000F003F0000FC3FFFFF0007C0038001FC000007C0038001 + FC000007C003800100000007C003800100000007C003800100000007C0038001 + 00000007C003800100000000C003800100000000C003800100000000C0038001 + 00000000C003800000010000C003800000030000C0038000007F0000C0038001 + 00FFFF01C0038003FFFFFF03C0038007F81FFFFFFFFFFFFFE007FFFF8001E38F + C003FFFF8001C1078001C1FF8001CC678001C3FF8001EEEF0000C3FB8001E44F + 0000C1F98001F01F0000D0F18001FC7F0000F8038001F83F0000F8038001F83F + 0000FC078001F11F8001FE0F8001F11F8001FFFF8001F39FC003FFFF8001F39F + E007FFFF8001F39FF81FFFFFFFFFFFFF8001800380019FFF8001800300009FFF + 8001800300009FFF8001800100009FFF8001800100009FFF8001800100009F03 + 8001800100008007800180000000800F800180000000801F800180000000801F + 800180000000800F80018001000080078001800300008003800180FF000080FF + 8003C1FF00009FFF8007FFFF8001FFFF00000000000000000000000000000000 + 000000000000} + end + object SaveDialog: TSaveDialog + DefaultExt = 'wad' + Filter = 'Карты Doom 2D: Forever (*.wad)|*.wad|Все файлы (*.*)|*.*' + Options = [ofHideReadOnly, ofNoChangeDir, ofPathMustExist, ofNoReadOnlyReturn, ofEnableSizing, ofDontAddToRecent] + Left = 64 + Top = 64 + end + object MainMenu: TMainMenu + Images = ImageList + Left = 96 + Top = 64 + object miMenuFile: TMenuItem + Caption = 'Файл' + object miNewMap: TMenuItem + Caption = 'Новая карта' + ImageIndex = 0 + ShortCut = 16462 + OnClick = aNewMapExecute + end + object miOpenMap: TMenuItem + Caption = 'Открыть карту' + ImageIndex = 1 + ShortCut = 16463 + OnClick = aOpenMapExecute + end + object miSaveMap: TMenuItem + Caption = 'Сохранить карту' + ImageIndex = 2 + ShortCut = 16467 + OnClick = aSaveMapExecute + end + object miSaveMapAs: TMenuItem + Caption = 'Сохранить карту как...' + ImageIndex = 21 + OnClick = aSaveMapAsExecute + end + object miOpenWadMap: TMenuItem + Caption = 'Выбрать карту' + ImageIndex = 28 + OnClick = miOpenWadMapClick + end + object miLine1: TMenuItem + Caption = '-' + end + object miSaveMiniMap: TMenuItem + Caption = 'Сохранить мини-карту' + ImageIndex = 22 + OnClick = miSaveMiniMapClick + end + object miDeleteMap: TMenuItem + Caption = 'Удалить карту из WAD...' + ImageIndex = 11 + OnClick = aDeleteMap + end + object miPackMap: TMenuItem + Caption = 'Упаковать карту' + ImageIndex = 26 + OnClick = miPackMapClick + end + object miLine2: TMenuItem + Caption = '-' + end + object miExit: TMenuItem + Caption = 'Выход' + ImageIndex = 10 + ShortCut = 121 + OnClick = aExitExecute + end + end + object miMenuEdit: TMenuItem + Caption = 'Правка' + object miUndo: TMenuItem + Caption = 'Отменить' + Enabled = False + ImageIndex = 5 + ShortCut = 16474 + OnClick = aUndoExecute + end + object miLine3: TMenuItem + Caption = '-' + end + object miCopy: TMenuItem + Caption = 'Копировать объект' + Enabled = False + ImageIndex = 8 + ShortCut = 16451 + OnClick = aCopyObjectExecute + end + object miCut: TMenuItem + Caption = 'Вырезать объект' + Enabled = False + ImageIndex = 7 + ShortCut = 16472 + OnClick = aCutObjectExecute + end + object miPaste: TMenuItem + Caption = 'Вставить объект' + ImageIndex = 9 + ShortCut = 16470 + OnClick = aPasteObjectExecute + end + object miLine4: TMenuItem + Caption = '-' + end + object miSelectAll: TMenuItem + Caption = 'Выделить все объекты' + ImageIndex = 24 + ShortCut = 16449 + OnClick = aSelectAllExecute + end + object miLine5: TMenuItem + Caption = '-' + end + object miToFore: TMenuItem + Caption = 'Передвинуть вперед' + Enabled = False + ImageIndex = 25 + ShortCut = 16605 + OnClick = aMoveToFore + end + object miToBack: TMenuItem + Caption = 'Передвинуть назад' + Enabled = False + ImageIndex = 13 + ShortCut = 16603 + OnClick = aMoveToBack + end + end + object miMenuTools: TMenuItem + Caption = 'Инструменты' + object miSnapToGrid: TMenuItem + Caption = 'Привязка к сетке' + ImageIndex = 20 + ShortCut = 16465 + OnClick = miSnapToGridClick + end + object miMiniMap: TMenuItem + Caption = 'Мини-карта' + ImageIndex = 14 + ShortCut = 16471 + OnClick = miMiniMapClick + end + object miSwitchGrid: TMenuItem + Caption = 'Переключить сетку' + ImageIndex = 19 + ShortCut = 16453 + OnClick = miSwitchGridClick + end + object miShowEdges: TMenuItem + Caption = 'Границы карты' + ImageIndex = 29 + OnClick = miShowEdgesClick + end + object miLayers: TMenuItem + Caption = 'Слои' + ImageIndex = 25 + object miLayer1: TMenuItem + Caption = 'Фон' + Checked = True + SubMenuImages = ImageList + OnClick = miLayer1Click + end + object miLayer2: TMenuItem + Caption = 'Стены' + Checked = True + OnClick = miLayer2Click + end + object miLayer3: TMenuItem + Caption = 'Передний план' + Checked = True + OnClick = miLayer3Click + end + object miLayer4: TMenuItem + Caption = 'Лестницы' + Checked = True + OnClick = miLayer4Click + end + object miLayer5: TMenuItem + Caption = 'Жидкости' + Checked = True + OnClick = miLayer5Click + end + object miLayer6: TMenuItem + Caption = 'Предметы' + Checked = True + OnClick = miLayer6Click + end + object miLayer7: TMenuItem + Caption = 'Монстры' + Checked = True + OnClick = miLayer7Click + end + object miLayer8: TMenuItem + Caption = 'Области' + Checked = True + OnClick = miLayer8Click + end + object miLayer9: TMenuItem + Caption = 'Триггеры' + Checked = True + OnClick = miLayer9Click + end + end + end + object miMenuService: TMenuItem + Caption = 'Сервис' + object miCheckMap: TMenuItem + Caption = 'Проверка карты' + ImageIndex = 17 + OnClick = aCheckMapExecute + end + object miOptimmization: TMenuItem + Caption = 'Оптимизация карты' + ImageIndex = 18 + OnClick = aOptimizeExecute + end + object miMapPreview: TMenuItem + Caption = 'Предварительный просмотр' + ImageIndex = 23 + ShortCut = 9 + OnClick = miMapPreviewClick + end + object miTestMap: TMenuItem + Caption = 'Тест карты в игре' + ImageIndex = 27 + OnClick = miTestMapClick + end + end + object miMenuSettings: TMenuItem + Caption = 'Настройка' + object miMapOptions: TMenuItem + Caption = 'Карта' + ImageIndex = 14 + ShortCut = 16461 + OnClick = aMapOptionsExecute + end + object miLine6: TMenuItem + Caption = '-' + end + object miOptions: TMenuItem + Caption = 'Редактор' + ImageIndex = 16 + OnClick = aEditorOptionsExecute + end + object miLine7: TMenuItem + Caption = '-' + end + object miMapTestSettings: TMenuItem + Caption = 'Параметры теста' + OnClick = miMapTestSettingsClick + end + end + object miMenuHelp: TMenuItem + Caption = 'Справка' + object miAbout: TMenuItem + Caption = 'О программе' + ImageIndex = 16 + OnClick = aAboutExecute + end + end + object miHidden1: TMenuItem + Caption = 'hidden' + Visible = False + object minexttab: TMenuItem + Caption = 'next tab' + ShortCut = 16393 + OnClick = minexttabClick + end + object selectall1: TMenuItem + Caption = 'select all' + ShortCut = 49217 + OnClick = selectall1Click + end + end + end + object pmShow: TPopupMenu + Images = ImageList + Left = 128 + Top = 64 + object miLayerP1: TMenuItem + Caption = 'Фон' + Checked = True + OnClick = miLayer1Click + end + object miLayerP2: TMenuItem + Caption = 'Стены' + Checked = True + OnClick = miLayer2Click + end + object miLayerP3: TMenuItem + Caption = 'Передний план' + Checked = True + OnClick = miLayer3Click + end + object miLayerP4: TMenuItem + Caption = 'Лестницы' + Checked = True + OnClick = miLayer4Click + end + object miLayerP5: TMenuItem + Caption = 'Жидкости' + Checked = True + OnClick = miLayer5Click + end + object miLayerP6: TMenuItem + Caption = 'Предметы' + Checked = True + OnClick = miLayer6Click + end + object miLayerP7: TMenuItem + Caption = 'Монстры' + Checked = True + OnClick = miLayer7Click + end + object miLayerP8: TMenuItem + Caption = 'Области' + Checked = True + OnClick = miLayer8Click + end + object miLayerP9: TMenuItem + Caption = 'Триггеры' + Checked = True + OnClick = miLayer9Click + end + end + object ilToolbar: TImageList + Height = 24 + Width = 24 + Left = 64 + Top = 101 + Bitmap = { + 494C010109000E00040018001800FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000600000006000000001002000000000000090 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000002A2A2A002A2A2A002A2A + 2A002A2A2A002A2A2A002A2A2A002A2A2A002A2A2A002A2A2A002A2A2A002A2A + 2A002A2A2A002A2A2A002A2A2A002A2A2A002A2A2A002A2A2A002A2A2A002A2A + 2A002A2A2A002A2A2A0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000003D3D3D0089898900D6D6 + D6006F6F6F006F6F6F00E5E5E50089898900B1B1B10032323200DEDEDE004646 + 46006F6F6F00B1B1B100C0C0C000C0C0C000E5E5E5006F6F6F00D6D6D6006F6F + 6F006F6F6F002A2A2A0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000004040400046464600E5E5 + E5006F6F6F0046464600E5E5E500D6D6D6009E9E9E006F6F6F00E5E5E5006F6F + 6F00E5E5E50058585800CDCDCD00B1B1B100E5E5E50058585800E5E5E500DEDE + DE00585858002C2C2C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000434343009E9E9E00E5E5 + E500DEDEDE000C0C0C00E5E5E500E5E5E50023232300B1B1B100E5E5E5004646 + 46006F6F6F0046464600E5E5E5005858580058585800B1B1B1009E9E9E006F6F + 6F006F6F6F003232320000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000048484800E5E5E500E5E5 + E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5 + E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5 + E500E5E5E5003333330000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000004C4C4C00E5E5E500E5E5 + E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5 + E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5E500E5E5 + E500E5E5E5003838380000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000004C4C4C00BC8B5100BC8B + 5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B + 5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B + 5100BC8B51003838380000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000052525200BC8B5100BC8B + 5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B + 5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B5100BC8B + 5100BC8B51003C3C3C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000055555500BC8B5100FBFA + F900C3996300EBE1D400BC8B5100EEE5DC00BC8B5100C3996300EEE5DC00EBE1 + D400BC8B5100BC8B5100BC8B5100F2EBE500EBE1D400DDC9B000E2D3BE00F5EF + EB00EBE1D4004040400000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000005B5B5B00D8C1A000EBE0 + D300E7DACB00EBE0D300BF915400EFE6DC00EBE1D400F5F0EB00D2B79000EFE6 + DC00D8C1A000BF915400D8C1A000DECAB100BF915400EBE0D300BF915400EEE5 + DC00D2B790004545450000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000005F5F5F00EEE7DD00BE92 + 5800EEE7DD00ECE2D500BE925800DECDB100D3B89200EEE7DD00BE925800EEE7 + DD00D8C3A500F2EDE600D8C3A500D8C3A500BE925800ECE2D500BE925800BE92 + 5800EEE7DD004848480000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000065656500EFE8DE00C297 + 5C00DAC7A800FAF8F500C2975C00C2975C00F3EEE700E9DECC00C2975C00EDE4 + D700C2975C00F3EEE700C7A56F00EDE4D700C7A56F00EFE8DE00CDAE8300C297 + 5C00EFE8DE004C4C4C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000068686800D2B79000C6A0 + 6900C6A06900E9E0D100C6A06900C6A06900E7DAC600D2B79000C6A06900E7DA + C600EEE5DA00DDC9B000C6A06900DDC9B000EEE5DA00CCAD7C00D2B79000EEE5 + DA00DDC9B0005252520000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000006C6C6C00C6A06900C6A0 + 6900C6A06900C6A06900C6A06900C6A06900C6A06900C6A06900C6A06900C6A0 + 6900C6A06900C6A06900C6A06900C6A06900C6A06900C6A06900C6A06900C6A0 + 6900C6A069005555550000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000071717100C6A06900C6A0 + 6900C6A06900C6A06900C6A06900C6A06900C6A06900C6A06900C6A06900C6A0 + 6900C6A06900C6A06900C6A06900C6A06900C6A06900C6A06900C6A06900C6A0 + 6900C6A069005858580000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000075757500F2F2F200F2F2 + F200F2F2F200F2F2F200F2F2F200F2F2F200F2F2F200F2F2F200F2F2F200F2F2 + F200F2F2F200F2F2F200F2F2F200F2F2F200F2F2F200F2F2F200F2F2F200F2F2 + F200F2F2F2005B5B5B0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000078787800F4F4F4008989 + 8900F4F4F400C8C8C800F4F4F400BCBCBC00F4F4F400F4F4F400BCBCBC00C8C8 + C800F4F4F400F4F4F400F4F4F400ADADAD00ADADAD00E4E4E400EAEAEA009D9D + 9D009D9D9D005E5E5E0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000007D7D7D00EAEAEA007373 + 7300C8C8C800ADADAD00F4F4F4009D9D9D00ADADAD0089898900D4D4D400ADAD + AD00F4F4F400F4F4F400E4E4E400C8C8C800F4F4F400ADADAD00F4F4F400DDDD + DD00DDDDDD006161610000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000007E7E7E009D9D9D00F0F0 + F0009D9D9D00ADADAD00F4F4F400C8C8C800EAEAEA009D9D9D00F4F4F4008989 + 8900ADADAD00ADADAD00DDDDDD00DDDDDD00F4F4F400ADADAD00F4F4F400DDDD + DD00DDDDDD006868680000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000828282009D9D9D00F4F4 + F400C8C8C80073737300F4F4F400F0F0F000ADADAD00ADADAD00F4F4F400ADAD + AD00F4F4F4009D9D9D00EAEAEA00C8C8C800F4F4F4009D9D9D00EAEAEA00BCBC + BC00DDDDDD007777770000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000008D9D9C008D9D9C008D9D + 9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D + 9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D + 9C008D9D9C008D9D9C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000005A73730042635A004263 + 5A0042635A0042635A0042635A0042635A0042635A0042635A0042635A004263 + 5A0042635A0042635A000000000000000000000000002C2C2C002C2C2C002222 + 22001F1F1F001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C + 1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C00292929002A2A2A002020 + 2000252525002C2C2C000000000000000000000000002C2C2C002C2C2C002222 + 22001F1F1F001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C + 1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C00292929002A2A2A002020 + 2000252525002C2C2C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A000000000000000000000000003D3D3D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D005649 + 3B0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0056493B002A2A2A000000000000000000000000003D3D3D0088735D008873 + 5D0056493B0088735D0088735D0088735D0056493B0088735D0088735D008873 + 5D0056493B0088735D0088735D0088735D0056493B0088735D0088735D008873 + 5D0056493B002A2A2A0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A000000000000000000000000004040400088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D00FFFFFF008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D00FFFF + FF0088735D002C2C2C000000000000000000000000004040400088735D00FFFF + FF0088735D0088735D0088735D00FFFFFF0088735D0088735D0088735D00FFFF + FF0088735D0088735D0088735D00FFFFFF0088735D0088735D0088735D00FFFF + FF0088735D002C2C2C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A000000000000000000000000004343430088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D00323232000000000000000000000000004343430088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D003232320000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000042635A00294A4A00294A4A00294A4A006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A000000000000000000000000004848480088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D00333333000000000000000000000000004848480088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D003333330000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000005A736B0042635A0042635A0042635A006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A000000000000000000000000004C4C4C0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D00383838000000000000000000000000004C4C4C0088735D008873 + 5D0056493B0088735D0088735D0088735D0056493B0088735D0088735D008873 + 5D0056493B0088735D0088735D0088735D0056493B0088735D0088735D008873 + 5D0056493B003838380000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000005A736B0042635A0042635A0042635A006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A000000000000000000000000004C4C4C0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D00383838000000000000000000000000004C4C4C0088735D00FFFF + FF0088735D0088735D0088735D00FFFFFF0088735D0088735D0088735D00FFFF + FF0088735D0088735D0088735D00FFFFFF0088735D0088735D0088735D00FFFF + FF0088735D003838380000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000005A736B0042635A0042635A0042635A006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A000000000000000000000000005252520088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D003C3C3C000000000000000000000000005252520088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D003C3C3C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000003139AD0010219C001021 + 9C0010219C005A736B0042635A0042635A0042635A006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A000000000000000000000000005555550088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D00404040000000000000000000000000005555550088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D0088735D0088735D0088735D0088735D0088735D0088735D008873 + 5D0088735D004040400000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD005A736B0042635A0042635A0042635A006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A000000000000000000000000005B5B5B008A765F008A76 + 5F008A765F008A765F008A765F008A765F008A765F008A765F008A765F008A76 + 5F008A765F008A765F008A765F008A765F008A765F008A765F008A765F008A76 + 5F008A765F00454545000000000000000000000000005B5B5B008A765F008A76 + 5F00574B3C008A765F008A765F008A765F00574B3C008A765F008A765F008A76 + 5F00574B3C008A765F008A765F008A765F00574B3C008A765F008A765F008A76 + 5F00574B3C004545450000000000000000000000000000000000000000000000 + 00005A73730042635A0042635A0000000000000000005A73730042635A004263 + 5A0000000000000000005A73730042635A0042635A0000000000000000000000 + 000000000000000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD005A736B0042635A0042635A0042635A006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A000000000000000000000000005F5F5F008B7862008B78 + 62008B7862008B7862008B7862008B7862008B7862008B7862008B786200584C + 3E008B7862008B7862008B7862008B7862008B7862008B7862008B7862008B78 + 6200584C3E00484848000000000000000000000000005F5F5F008B786200FFFF + FF008B7862008B7862008B786200FFFFFF008B7862008B7862008B786200FFFF + FF008B7862008B7862008B786200FFFFFF008B7862008B7862008B786200FFFF + FF008B7862004848480000000000000000000000000000000000000000000000 + 0000000000006B8484005A73730042635A0000000000000000006B8484005A73 + 730042635A0000000000000000006B8484005A73730042635A00000000000000 + 000000000000000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD005A736B0042635A0042635A0042635A006B8484005A7373005A73 + 73005A7373005A7373005A7373005A7373005A7373005A7373005A7373005A73 + 73005A73730042635A00000000000000000000000000656565008E7C66008E7C + 66008E7C66008E7C66008E7C66008E7C66008E7C66008E7C6600FFFFFF008E7C + 66008E7C66008E7C66008E7C66008E7C66008E7C66008E7C66008E7C6600FFFF + FF008E7C66004C4C4C00000000000000000000000000656565008E7C66008E7C + 66008E7C66008E7C66008E7C66008E7C66008E7C66008E7C66008E7C66008E7C + 66008E7C66008E7C66008E7C66008E7C66008E7C66008E7C66008E7C66008E7C + 66008E7C66004C4C4C0000000000000000000000000000000000000000000000 + 000000000000000000006B8484005A73730042635A0000000000000000006B84 + 84005A73730042635A0000000000000000006B8484005A73730042635A000000 + 000000000000000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD005A736B0042635A0042635A0042635A006B8484006B8484006B84 + 84006B8484006B8484006B8484006B8484006B8484006B8484006B8484006B84 + 84006B8484005A73730000000000000000000000000068686800917F6B00917F + 6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F + 6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F + 6B00917F6B005252520000000000000000000000000068686800917F6B00917F + 6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F + 6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F6B00917F + 6B00917F6B005252520000000000000000000000000000000000000000000000 + 00000000000000000000000000006B8484005A73730042635A00000000000000 + 00006B8484005A73730042635A0000000000000000006B8484005A7373004263 + 5A0000000000000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD005A736B0042635A0042635A0042635A0042635A0042635A004263 + 5A0042635A0042635A0042635A0042635A0042635A00294A4A00000000000000 + 000000000000000000000000000000000000000000006C6C6C0093846F009384 + 6F005D53460093846F0093846F0093846F005D53460093846F0093846F009384 + 6F0093846F0093846F0093846F0093846F0093846F0093846F0093846F009384 + 6F0093846F00555555000000000000000000000000006C6C6C0093846F009384 + 6F005D53460093846F0093846F0093846F005D53460093846F0093846F009384 + 6F005D53460093846F0093846F0093846F005D53460093846F0093846F009384 + 6F005D5346005555550000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000005A7373005A7373006B8484000000 + 0000000000005A7373005A7373006B84840000000000000000005A7373005A73 + 73006B848400000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD005A736B0042635A0042635A0042635A0042635A0042635A004263 + 5A0042635A0042635A0042635A0042635A0042635A00294A4A00000000000000 + 0000000000000000000000000000000000000000000071717100998C7900FFFF + FF00978875009788750097887500FFFFFF009788750097887500978875009788 + 7500978875009788750097887500978875009788750097887500978875009788 + 7500978875005858580000000000000000000000000071717100998C7900FFFF + FF00978875009788750097887500FFFFFF00978875009788750097887500FFFF + FF00978875009788750097887500FFFFFF00978875009788750097887500FFFF + FF00978875005858580000000000000000000000000000000000000000000000 + 000000000000000000000000000042635A005A7373006B848400000000000000 + 000042635A005A7373006B848400000000000000000042635A005A7373006B84 + 840000000000000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD005A736B0042635A0042635A0042635A0042635A0042635A004263 + 5A0042635A0042635A0042635A0042635A0042635A00294A4A00000000000000 + 00000000000000000000000000000000000000000000757575009A8D7A009A8D + 7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D + 7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D + 7A009A8D7A005B5B5B00000000000000000000000000757575009A8D7A009A8D + 7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D + 7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D7A009A8D + 7A009A8D7A005B5B5B0000000000000000000000000000000000000000000000 + 0000000000000000000042635A005A7373006B84840000000000000000004263 + 5A005A7373006B848400000000000000000042635A005A7373006B8484000000 + 000000000000000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD005A736B005A736B005A736B005A736B005A736B005A736B005A73 + 6B005A736B005A736B005A736B005A736B005A736B0042635A00000000000000 + 00000000000000000000000000000000000000000000787878009D9280009D92 + 80009D9280009D9280009D9280009D9280009D9280009D9280009D9280009D92 + 80009D9280009D9280009D9280009D9280009D9280009D9280009D9280009D92 + 80009D9280005E5E5E00000000000000000000000000787878009D9280009D92 + 80009D9280009D9280009D9280009D9280009D9280009D9280009D9280009D92 + 80009D9280009D9280009D9280009D9280009D9280009D9280009D9280009D92 + 80009D9280005E5E5E0000000000000000000000000000000000000000000000 + 00000000000042635A005A7373006B848400000000000000000042635A005A73 + 73006B848400000000000000000042635A005A7373006B848400000000000000 + 000000000000000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD003139AD003139AD003139AD003139AD003139AD003139AD003139 + AD003139AD0010219C0000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000007D7D7D00A1978500A197 + 8500665F5400A1978500A1978500A1978500665F5400A1978500A1978500A197 + 8500A1978500A1978500A1978500A1978500A1978500A1978500A1978500A197 + 8500A1978500616161000000000000000000000000007D7D7D00A1978500A197 + 8500665F5400A1978500A1978500A1978500665F5400A1978500A1978500A197 + 8500665F5400A1978500A1978500A1978500665F5400A1978500A1978500A197 + 8500665F54006161610000000000000000000000000000000000000000000000 + 00006B8484006B8484006B84840000000000000000006B8484006B8484006B84 + 840000000000000000006B8484006B8484006B84840000000000000000000000 + 000000000000000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD003139AD003139AD003139AD003139AD003139AD003139AD003139 + AD003139AD0010219C0000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000007E7E7E00A59C8C00FFFF + FF00A59C8C00A59C8C00A59C8C00FFFFFF00A59C8C00A59C8C00A59C8C00A59C + 8C00A59C8C00A59C8C00A59C8C00A59C8C00A59C8C00A59C8C00A59C8C00A59C + 8C00A59C8C00686868000000000000000000000000007E7E7E00A59C8C00FFFF + FF00A59C8C00A59C8C00A59C8C00FFFFFF00A59C8C00A59C8C00A59C8C00FFFF + FF00A59C8C00A59C8C00A59C8C00FFFFFF00A59C8C00A59C8C00A59C8C00FFFF + FF00A59C8C006868680000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000004A5AB5003139AD003139 + AD003139AD003139AD003139AD003139AD003139AD003139AD003139AD003139 + AD003139AD0010219C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000082828200A8A19100A8A1 + 9100A8A19100A8A19100A8A19100A8A19100A8A19100A8A19100A8A19100A8A1 + 9100A8A19100A8A19100A8A19100A8A19100A8A19100A8A19100A8A19100A8A1 + 9100A8A191007777770000000000000000000000000082828200A8A19100A8A1 + 9100A8A19100A8A19100A8A19100A8A19100A8A19100A8A19100A8A19100A8A1 + 9100A8A19100A8A19100A8A19100A8A19100A8A19100A8A19100A8A19100A8A1 + 9100A8A191007777770000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000004A5AB5004A5AB5004A5A + B5004A5AB5004A5AB5004A5AB5004A5AB5004A5AB5004A5AB5004A5AB5004A5A + B5004A5AB5003139AD0000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000008D9D9C008D9D9C008D9D + 9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D + 9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D + 9C008D9D9C008D9D9C000000000000000000000000008D9D9C008D9D9C008D9D + 9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D + 9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D9C008D9D + 9C008D9D9C008D9D9C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000006B6B + 6B00292929002121210018181800181818001818180018181800181818001818 + 1800181818001818180018181800181818001818180018181800181818004A4A + 4A0000000000000000000000000000000000000000000000000042424A004242 + 4A0042424A0042424A0042424A0042424A0042424A0042424A0042424A004242 + 4A0042424A0042424A0042424A0042424A0042424A0042424A0042424A000000 + 0000000000000000000000000000000000000000000000000000292929002121 + 2100181818001818180018181800181818001818180018181800181818001818 + 1800181818001818180018181800181818001818180029292900292929002121 + 2100212121000000000000000000000000000000000084848400848484008484 + 8400848484008484840084848400848484008484840084848400848484008484 + 8400848484008484840084848400848484008484840084848400848484008484 + 8400848484008484840000000000000000000000000000000000000000004242 + 4200FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF002929 + 29000000000000000000000000000000000000000000313131004A4A4A007B94 + 8C007B948C007B948C007B948C007B948C007B948C007B948C007B948C007B94 + 8C007B948C007B948C007B948C007B948C007B948C0094ADAD008CA5A5008CA5 + A5000000000000000000000000000000000000000000393939007B9494007B94 + 940063636300738C8C00E7E7E700FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00F7F7F700E7E7E700E7E7E700D6D6D6006B8C84005A5A5A007B94 + 94007B9494002929290000000000000000000000000084848400FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000 + 0000000000008484840000000000000000000000000000000000000000004242 + 4200FFFFFF00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DE + DE00C6DEDE00C6DEDE00C6DEDE00C6E7DE00C6DEDE00C6E7DE00FFFFFF003131 + 31000000000000000000000000000000000000000000313131004A4A4A008CA5 + A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5 + A5008CA5A5008CA5A50094ADAD008CA5A50094ADAD008CA5A5009CBDB5008CA5 + A5000000000000000000000000000000000000000000424242007B9494007B94 + 94006B6B6B008CA59C00FFFFFF00E7E7E7009CB5AD00A5BDB500FFFFFF00FFFF + FF00FFFFFF00FFFFFF00EFEFEF00EFEFEF00E7E7E70094ADA5006B6B6B007B94 + 94007B9494002929290000000000000000000000000084848400FFFFFF008C00 + 00008C0000008C0000008C0000008C0000008C0000008C0000008C0000008C00 + 00008C0000008C0000008C000000FFFFFF00000000000000000000000000C6C6 + C600C6C6C6008484840000000000000000000000000000000000000000004A4A + 4A00FFFFFF00BDDED600BDDED600BDDED600BDDED600BDDED600BDDED600BDDE + D600BDDED600BDDED600BDDED600BDDED600BDDED600CEE7E700FFFFFF003131 + 31000000000000000000000000000000000000000000313139004A4A4A007B94 + 8C0094ADA50094ADA50094ADA50094ADA50094ADA50094ADA50094ADA50094AD + A50094ADA50094ADA50094ADA5009CB5AD0094ADAD009CB5B5009CBDB5008CA5 + A5000000000000000000000000000000000000000000424242007B9C94007B9C + 94006B6B6B008CADA500FFFFFF006B847B00738C8C0094ADA500FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7F7F70094ADAD006B6B6B007B9C + 94007B9C94003131310000000000000000000000000084848400FFFFFF00A500 + 0000A5000000A5000000A5000000A5000000A5000000A5000000A5000000A500 + 0000A5000000A5000000A5000000FFFFFF000000000000000000000000000000 + 0000000000008484840000000000000000000000000000000000000000004A4A + 4A00FFFFFF00BDDED600BDDED600BDDED600BDDED600BDDED600BDDED600BDDE + D600BDDED600BDDED600BDDED600BDDED600BDDED600CEE7E700FFFFFF003131 + 3100000000000000000000000000000000000000000039393900525252004A4A + 520094ADAD0094ADAD0094ADAD0094ADAD0094ADAD0094ADAD0094ADAD0094AD + AD0094ADAD0094ADAD0094ADAD0094ADAD00A5BDB5009CB5B5009CB5B500A5C6 + BD008CA5A500000000000000000000000000000000004A4A4A00849C9C007B9C + 94007373730094ADAD00FFFFFF0052736B0073948C0094ADAD00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0094ADAD006B6B6B007B9C + 94007B9C94003131310000000000000000000000000084848400FFFFFF00BD00 + 0000BD000000BD000000BD000000BD000000BD000000BD000000BD000000BD00 + 0000BD000000BD000000BD000000FFFFFF000000000000000000000000000000 + 0000000000008484840000000000000000000000000000000000000000004A4A + 4A00FFFFFF00C6DED600C6DED600C6DED600C6DED600C6DED600C6DED600C6DE + D600C6DED600C6DED600C6DED600C6DED600C6DED600D6EFE700FFFFFF003939 + 3900000000000000000000000000000000000000000042424200525252005252 + 52009CB5AD009CB5AD009CB5AD009CB5AD009CB5AD009CB5AD009CB5AD009CB5 + AD009CB5AD009CB5AD009CB5AD00A5BDB5009CB5B500A5BDBD00ADCEC600ADC6 + C6008CA5A500000000000000000000000000000000004A4A4A0094ADA5008CA5 + A5007B7B7B009CB5B500FFFFFF005A736B006B8C84008CA5A500FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF009CB5B5006B6B6B00849C + 9C00849C9C003939390000000000000000000000000084848400FFFFFF00D600 + 0000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D600 + 0000D6000000D6000000D6000000FFFFFF00000000000000000000000000C6C6 + C600C6C6C6008484840000000000000000000000000000000000000000004A4A + 4A00FFFFFF00C6DED600C6DED600C6DED600C6DED600C6DED600C6DED600C6DE + D600C6DED600C6DED600C6DED600C6DED600C6DED600D6EFE700FFFFFF003939 + 39000000000000000000000000000000000000000000424242005A5A5A005252 + 52007B948C00A5BDB500A5BDB500A5BDB500A5BDB500A5BDB500A5BDB500A5BD + B500A5BDB500A5BDB500A5BDB500A5BDB500ADC6BD00A5BDBD00ADC6BD00ADCE + C6008CA5A500000000000000000000000000000000004A4A4A0094ADA5008CA5 + A5007B7B7B009CB5B500FFFFFF005A736B006B8C84008CA5A500FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF009CB5B5006B6B6B00849C + 9C00849C9C003939390000000000000000000000000084848400FFFFFF00EF00 + 0000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF00 + 0000EF000000EF000000EF000000FFFFFF000000000000000000000000000000 + 0000000000008484840000000000000000000000000000000000000000004A4A + 4A00FFFFFF00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DE + DE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00D6EFEF00FFFFFF003939 + 390000000000000000000000000000000000000000004A4A4A005A6363006363 + 63005A525A00A5BDBD00A5BDBD00A5BDBD00A5BDBD00A5BDBD00A5BDBD00A5BD + BD00A5BDBD00A5BDBD00A5BDBD00A5BDBD00A5BDBD00B5CEC600BDD6D600B5CE + CE008CA5A50000000000000000000000000000000000525252009CB5B5009CB5 + AD009C9C9C00B5CECE00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0094ADA5007B7B7B00849C + 9C00849C9C003939390000000000000000000000000084848400FFFFFF00FF00 + 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00 + 0000FF000000FF000000FF000000FFFFFF000000000000000000000000000000 + 0000000000008484840000000000000000000000000000000000000000005252 + 5200FFFFFF00C6E7DE00C6E7DE00C6E7DE00C6E7DE00C6E7DE00C6E7DE00C6E7 + DE00C6E7DE00C6E7DE00C6E7DE00C6E7DE00C6E7DE00D6F7EF00FFFFFF003939 + 3900000000000000000000000000000000000000000052525200636363006363 + 63005A5A5A00ADC6C600ADC6BD00ADC6BD00ADC6BD00ADC6BD00ADC6BD00ADC6 + C600ADC6BD00ADC6BD00ADC6BD00ADC6BD00B5CECE00ADC6C600B5D6CE00C6DE + DE00BDD6D6008CA5A50000000000000000000000000052525200A5BDB500A5BD + B500A5BDB5009CB5B50094B5AD008CADA5008CA5A5008CA5A5008CA5A5008CA5 + A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5A5008CA5 + A5008CA5A5004242420000000000000000000000000084848400FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF000000FF00 + 0000FF000000FF000000FF000000FFFFFF00000000000000000000000000C6C6 + C600C6C6C6008484840000000000000000000000000000000000000000005A5A + 5A00FFFFFF00CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7 + E700CEE7E700CEE7E700CEE7E700CEE7E700CEE7E700DEF7F700FFFFFF004242 + 42000000000000000000000000000000000000000000525252006B6B6B006B6B + 6B005A5A5A007B948C00B5CEC600B5CEC600B5CEC600B5CEC600B5CEC600B5CE + C600B5CEC600B5CEC600B5CEC600B5CEC600B5CEC600BDD6D600BDD6CE00BDD6 + D600C6DED6008CA5A5000000000000000000000000005A5A5A00A5C6BD008CA5 + 9C008CA5A5008CA5A500849C9C007B948C00738C8400738C8400738C8400738C + 8400738C8400738C8400738C8C00738C8C00738C8C00738C8C00738C8C006B84 + 84008CADA5004242420000000000000000000000000084848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000008484840000000000000000000000000000000000000000005A5A + 5A00FFFFFF00D6EFE700D6EFE700D6EFE700D6EFE700D6EFE700D6EFE700D6EF + E700D6EFE700D6EFE700D6EFE700D6EFE700D6EFE700DEF7F700FFFFFF004242 + 420000000000000000000000000000000000000000005A5A5A00737373007373 + 73007373730063636300B5CECE00B5CECE00B5CECE00B5CECE00B5CECE00B5CE + CE00B5CECE00B5CECE00B5CECE00B5CECE00B5CECE00B5CECE00B5CECE00BDD6 + D600C6DED6008CA5A5000000000000000000000000005A5A5A00ADC6BD0094AD + A500E7E7E700F7F7F700F7F7F700F7F7F700EFEFEF00EFEFEF00EFEFEF00EFEF + EF00EFEFEF00EFEFEF00EFEFEF00EFEFEF00F7F7F700EFEFEF00DEDEDE007394 + 8C0094ADAD004A4A4A0000000000000000000000000084848400080808000808 + 0800080808000808080008080800080808000808080008080800080808000808 + 0800080808000808080008080800080808000808080008080800080808000808 + 0800080808008484840000000000000000000000000000000000000000006363 + 6300FFFFFF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EF + EF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00D6EFEF00DEF7F700FFFFFF004A4A + 4A000000000000000000000000000000000000000000636363007B7373007373 + 730073737300636363007B948C00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DE + DE00BDD6D600BDD6D600BDD6D600BDD6D600BDD6D600BDD6D600BDD6D600CEE7 + DE00BDD6D6008CA5A50000000000000000000000000063636300ADC6C60094AD + AD00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7F7F7007B94 + 940094ADAD004A4A4A0000000000000000000000000084848400081010000810 + 1000081010000810100008101000081010000810100008101000081010000810 + 100008101000081010000810100008101000081010000810100008101000BDC6 + C600BDC6C6008484840000000000000000000000000000000000000000006363 + 6300FFFFFF00D6F7EF00D6F7EF00D6F7EF00D6F7EF00D6F7EF00D6F7EF00D6F7 + EF00D6F7EF00D6F7EF00D6F7EF00D6F7EF00D6F7EF00DEFFF700FFFFFF004A4A + 4A000000000000000000000000000000000000000000636363007B7B7B007B7B + 7B007B7B7B007373730063636300636363006363630063636300636363006363 + 63007B948C00C6DED600C6DED600C6DED600C6DED600C6DED600C6DED600C6DE + D600CEE7E700BDD6D6008CA5A50000000000000000006B6B6B00ADCEC6009CB5 + AD00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7F7F7007B9C + 94009CB5B5005252520000000000000000000000000084848400101810001018 + 1000101810001018100010181000101810001018100010181000101810001018 + 1000101810001018100010181000101810001018100010181000101810001018 + 1000101810008484840000000000000000000000000000000000000000006B6B + 6B00FFFFFF00DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7 + F700DEF7F700DEF7F700DEF7F700CEEFE700C6DEDE00C6DEDE00DEDEDE005252 + 520000000000000000000000000000000000000000006B6B6B00848484008484 + 8400848484008484840084848400848484008484840084848400848484008484 + 84006B6B6300C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DEDE00C6DE + DE00C6DEDE00D6EFE7008CA5A50000000000000000006B6B6B00B5CEC6009CB5 + B500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00849C + 94009CBDB5005252520000000000000000000000000084848400182118001821 + 1800182118001821180018211800182118001821180018211800182118001821 + 1800182118001821180018211800182118001821180018211800182118001821 + 1800182118008484840000000000000000000000000000000000000000006B6B + 6B00FFFFFF00DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7 + F700DEF7F700F7F7F700D6D6D600C6C6C600B5B5B500ADADAD009C9C9C005252 + 5200000000000000000000000000000000000000000073737300848484008484 + 8400848484008484840084848400848484008484840084848400848484008484 + 8400848484006B6B6300E7FFF700E7FFF700E7FFF700E7FFF700E7FFF700E7FF + F700F7FFFF00EFFFFF008CA5A500000000000000000073737300B5D6CE00A5BD + B500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00849C + 9C00A5BDB5005A5A5A00000000000000000000000000848C8400DEE7E700DEE7 + E700DEE7E700DEE7E700DEE7E700DEE7E700DEE7E700DEE7E700DEE7E700DEE7 + E70021292900212929002129290021292900212929002129290021292900B5BD + B500B5BDB500848C840000000000000000000000000000000000000000006B6B + 6B00FFFFFF00DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7F700DEF7 + F700DEF7F700F7F7F700949494008C8C8C0073737300737373005A5A5A005A5A + 5A000000000000000000000000000000000000000000737373008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C006B6B6B006B6B6B006B6B6B006B6B6B006B6B6B006B6B + 6B006B6B6B006B6B6B0000000000000000000000000073737300C6DED600A5BD + B500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00849C + 9C00A5C6BD005A5A5A00000000000000000000000000848C8C00293131002931 + 310029313100293131002931310029313100293131002931310029313100D6DE + DE00293131002931310029313100293131002931310029313100293131002931 + 310029313100848C8C0000000000000000000000000000000000000000006B6B + 6B00FFFFFF00E7FFF700E7FFF700E7FFF700E7FFF700E7FFF700E7FFF700E7FF + F700E7FFF700F7F7F700A5A5A500FFFFFF00FFFFFF00FFFFFF00FFFFFF005A5A + 5A0000000000000000000000000000000000000000007B7B7B00948C8C00948C + 94008C8C8C008C948C008C8C94008C948C008C9494007B7B7B007B7B7B007B7B + 7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B000000 + 000000000000000000000000000000000000000000007B7B7B00CEE7DE00A5BD + B500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008CA5 + A500ADC6C6005A5A5A00000000000000000000000000848C8C00313939003139 + 390031393900313939003139390031393900313939003139390031393900CED6 + D600313939003139390031393900313939003139390031393900313939003139 + 390031393900848C8C0000000000000000000000000000000000000000006B6B + 6B00FFFFFF00E7FFF700E7FFF700E7FFF700E7FFF700E7FFF700E7FFF700E7FF + F700E7FFF700F7F7F700B5B5B500FFFFFF00D6F7EF00D6F7EF00B5D6CE006B6B + 6B00000000000000000000000000000000000000000084848400949494009494 + 9400949494009494940094949400949494009494940084848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000007B7B7B00D6EFE700A5BD + B500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0094AD + AD00ADC6C600636363000000000000000000000000007B8C8C00394242003942 + 4200394242003942420039424200394242003942420039424200394242003942 + 420039424200394242003942420039424200394242003942420039424200A5AD + AD00A5ADAD007B8C8C0000000000000000000000000000000000000000006B6B + 6B00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00C6C6C600FFFFFF00D6F7EF00B5D6CE006B6B6B000000 + 00000000000000000000000000000000000000000000848484009C9C9C009C9C + 9C009C9C9C009C9C9C009C9C9C009C9C9C009C9C9C0084848400000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000007B7B7B00D6F7EF00A5BD + B500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0094AD + A500ADCEC6006B6B6B000000000000000000000000007B8C8C00424A4A00424A + 4A00424A4A00424A4A00424A4A00424A4A00424A4A00424A4A00424A4A00424A + 4A00424A4A00424A4A00424A4A00424A4A00424A4A00424A4A00424A4A00424A + 4A00424A4A007B8C8C0000000000000000000000000000000000000000006B6B + 6B00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00CECECE00FFFFFF00B5D6CE0073737300000000000000 + 0000000000000000000000000000000000000000000000000000848484008484 + 8400848484008484840084848400848484008484840000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000084848400DEF7F700A5BD + B500FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7F7F7009CB5 + AD00B5CECE00737373000000000000000000000000007B8C8C004A5A52004A5A + 52004A5A52004A5A52004A5A52004A5A52004A5A52004A5A52004A5A52004A5A + 52004A5A52004A5A52004A5A52004A5A52004A5A52004A5A52004A5A52004A5A + 52004A5A52007B8C8C0000000000000000000000000000000000000000007373 + 73007373730073737300737373007B7B7B007B7B7B0084848400848484008484 + 8400848484008484840084848400848484008484840000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000848484008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C8C008C8C + 8C0084848400000000000000000000000000000000007B8C8C007B8C8C007B8C + 8C007B8C8C007B8C8C007B8C8C007B8C8C007B8C8C007B8C8C007B8C8C007B8C + 8C007B8C8C007B8C8C007B8C8C007B8C8C007B8C8C007B8C8C007B8C8C007B8C + 8C007B8C8C007B8C8C0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000424D3E000000000000003E000000 + 2800000060000000600000000100010000000000800400000000000000000000 + 000000000000000000000000FFFFFF0000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000FFFFFF000000000000000000FFFFFF00 + 0000000000000000800003000000000000000000800003000000000000000000 + 8000030000000000000000008000030000000000000000008000030000000000 + 0000000080000300000000000000000080000300000000000000000080000300 + 0000000000000000800003000000000000000000800003000000000000000000 + 8000030000000000000000008000030000000000000000008000030000000000 + 0000000080000300000000000000000080000300000000000000000080000300 + 0000000000000000800003000000000000000000800003000000000000000000 + 8000030000000000000000008000030000000000000000008000030000000000 + 00000000FFFFFF000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFF8003800003800003FFFFFFFF8003800003800003FFFFFF + FF8003800003800003E610CFFF8003800003800003E67CCFF800038000038000 + 03E630CFF80003800003800003E673CFF80003800003800003C21087F8000380 + 0003800003FFFFFF800003800003800003FFFFFF800003800003800003F18C7F + 800003800003800003F8C63F800003800003800003FC631F8000038000038000 + 03FE318F80003F800003800003FF18C780003F800003800003FE318F80003F80 + 0003800003FC631F80003F800003800003F8C63F8003FF800003800003F18C7F + 8003FF800003800003FFFFFF8003FF800003800003FFFFFF8003FF8000038000 + 03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFE0000FC0001FC00007800003E0000F80000F800003800003 + E0000F80000F800003800003E0000F80000F800003800003E0000F8000078000 + 03800003E0000F800007800003800003E0000F800007800003800003E0000F80 + 0007800003800003E0000F800003800003800003E0000F800003800003800003 + E0000F800003800003800003E0000F800003800003800003E0000F8000018000 + 03800003E0000F800001800003800003E0000F800001800003800003E0000F80 + 0003800003800003E0000F80001F800003800003E0000F803FFF800003800003 + E0001F803FFF800003800003E0003FC07FFF800003800003E0007FFFFFFFC000 + 07800003FFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000 + 000000000000} + end + object pmMapTest: TPopupMenu + Left = 160 + Top = 64 + object miMapTestPMSet: TMenuItem + Caption = 'Параметры' + OnClick = miMapTestSettingsClick + end + end + object ColorDialog: TColorDialog + Left = 64 + Top = 146 + end +end diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas new file mode 100644 index 0000000..d319300 --- /dev/null +++ b/src/editor/f_main.pas @@ -0,0 +1,6348 @@ +unit f_main; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, SysUtils, Variants, Classes, Graphics, + Controls, Forms, Dialogs, ImgList, StdCtrls, Buttons, + ComCtrls, ValEdit, Types, ToolWin, Menus, ExtCtrls, + CheckLst, Grids; + +type + TMainForm = class(TForm) + // Главное меню: + MainMenu: TMainMenu; + // "Файл": + miMenuFile: TMenuItem; + miNewMap: TMenuItem; + miOpenMap: TMenuItem; + miSaveMap: TMenuItem; + miSaveMapAs: TMenuItem; + miOpenWadMap: TMenuItem; + miLine1: TMenuItem; + miSaveMiniMap: TMenuItem; + miDeleteMap: TMenuItem; + miPackMap: TMenuItem; + miLine2: TMenuItem; + miExit: TMenuItem; + // "Правка": + miMenuEdit: TMenuItem; + miUndo: TMenuItem; + miLine3: TMenuItem; + miCopy: TMenuItem; + miCut: TMenuItem; + miPaste: TMenuItem; + miLine4: TMenuItem; + miSelectAll: TMenuItem; + miLine5: TMenuItem; + miToFore: TMenuItem; + miToBack: TMenuItem; + // "Инструменты": + miMenuTools: TMenuItem; + miSnapToGrid: TMenuItem; + miMiniMap: TMenuItem; + miSwitchGrid: TMenuItem; + miShowEdges: TMenuItem; + miLayers: TMenuItem; + miLayer1: TMenuItem; + miLayer2: TMenuItem; + miLayer3: TMenuItem; + miLayer4: TMenuItem; + miLayer5: TMenuItem; + miLayer6: TMenuItem; + miLayer7: TMenuItem; + miLayer8: TMenuItem; + miLayer9: TMenuItem; + // "Сервис": + miMenuService: TMenuItem; + miCheckMap: TMenuItem; + miOptimmization: TMenuItem; + miMapPreview: TMenuItem; + miTestMap: TMenuItem; + // "Настройка": + miMenuSettings: TMenuItem; + miMapOptions: TMenuItem; + miLine6: TMenuItem; + miOptions: TMenuItem; + miLine7: TMenuItem; + miMapTestSettings: TMenuItem; + // "Справка": + miMenuHelp: TMenuItem; + miAbout: TMenuItem; + // Скрытый пункт меню для Ctrl+Tab: + miHidden1: TMenuItem; + minexttab: TMenuItem; + + // Панель инструментов: + MainToolBar: TToolBar; + tbNewMap: TToolButton; + tbOpenMap: TToolButton; + tbSaveMap: TToolButton; + tbOpenWadMap: TToolButton; + tbLine1: TToolButton; + tbShowMap: TToolButton; + tbLine2: TToolButton; + tbShow: TToolButton; + tbLine3: TToolButton; + tbGridOn: TToolButton; + tbGrid: TToolButton; + tbLine4: TToolButton; + tbTestMap: TToolButton; + // Всплывающее меню для кнопки слоев: + pmShow: TPopupMenu; + miLayerP1: TMenuItem; + miLayerP2: TMenuItem; + miLayerP3: TMenuItem; + miLayerP4: TMenuItem; + miLayerP5: TMenuItem; + miLayerP6: TMenuItem; + miLayerP7: TMenuItem; + miLayerP8: TMenuItem; + miLayerP9: TMenuItem; + // Всплывающее меню для кнопки теста карты: + pmMapTest: TPopupMenu; + miMapTestPMSet: TMenuItem; + + // Панель карты: + PanelMap: TPanel; + // Панель отображения карты: + RenderPanel: TPanel; + // Панель загрузки: + pLoadProgress: TPanel; + lLoad: TLabel; + pbLoad: TProgressBar; + // Полосы прокрутки: + sbHorizontal: TScrollBar; + sbVertical: TScrollBar; + + // Панель свойств: + PanelProps: TPanel; + // Панель применения свойств: + PanelPropApply: TPanel; + bApplyProperty: TButton; + // Редактор свойств объектов: + vleObjectProperty: TValueListEditor; + + // Панель объектов - вкладки: + PanelObjs: TPanel; + pcObjects: TPageControl; + // Вкладка "Панели": + tsPanels: TTabSheet; + lbTextureList: TListBox; + // Панель настройки текстур: + PanelTextures: TPanel; + LabelTxW: TLabel; + lTextureWidth: TLabel; + LabelTxH: TLabel; + lTextureHeight: TLabel; + cbPreview: TCheckBox; + bbAddTexture: TBitBtn; + bbRemoveTexture: TBitBtn; + bClearTexture: TButton; + // Панель типов панелей: + PanelPanelType: TPanel; + lbPanelType: TListBox; + // Вкладка "Предметы": + tsItems: TTabSheet; + lbItemList: TListBox; + cbOnlyDM: TCheckBox; + cbFall: TCheckBox; + // Вкладка "Монстры": + tsMonsters: TTabSheet; + lbMonsterList: TListBox; + rbMonsterLeft: TRadioButton; + rbMonsterRight: TRadioButton; + // Вкладка "Области": + tsAreas: TTabSheet; + lbAreasList: TListBox; + rbAreaLeft: TRadioButton; + rbAreaRight: TRadioButton; + // Вкладка "Триггеры": + tsTriggers: TTabSheet; + lbTriggersList: TListBox; + clbActivationType: TCheckListBox; + clbKeys: TCheckListBox; + + // Остальные панели + Splitter1: TSplitter; + Splitter2: TSplitter; + StatusBar: TStatusBar; + + // Специальные объекты: + ImageList: TImageList; + ilToolbar: TImageList; + OpenDialog: TOpenDialog; + SaveDialog: TSaveDialog; + selectall1: TMenuItem; + ColorDialog: TColorDialog; + + procedure aAboutExecute(Sender: TObject); + procedure aCheckMapExecute(Sender: TObject); + procedure aMoveToFore(Sender: TObject); + procedure aMoveToBack(Sender: TObject); + procedure aCopyObjectExecute(Sender: TObject); + procedure aCutObjectExecute(Sender: TObject); + procedure aEditorOptionsExecute(Sender: TObject); + procedure aExitExecute(Sender: TObject); + procedure aMapOptionsExecute(Sender: TObject); + procedure aNewMapExecute(Sender: TObject); + procedure aOpenMapExecute(Sender: TObject); + procedure aOptimizeExecute(Sender: TObject); + procedure aPasteObjectExecute(Sender: TObject); + procedure aSelectAllExecute(Sender: TObject); + procedure aSaveMapExecute(Sender: TObject); + procedure aSaveMapAsExecute(Sender: TObject); + procedure aUndoExecute(Sender: TObject); + procedure aDeleteMap(Sender: TObject); + procedure bApplyPropertyClick(Sender: TObject); + procedure bbAddTextureClick(Sender: TObject); + procedure bbRemoveTextureClick(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); + procedure FormResize(Sender: TObject); + procedure lbTextureListClick(Sender: TObject); + procedure RenderPanelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + procedure RenderPanelMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); + procedure RenderPanelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + procedure RenderPanelResize(Sender: TObject); + procedure vleObjectPropertyEditButtonClick(Sender: TObject); + procedure vleObjectPropertyGetPickList(Sender: TObject; const KeyName: String; Values: TStrings); + procedure vleObjectPropertyKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure tbGridOnClick(Sender: TObject); + procedure miMapPreviewClick(Sender: TObject); + procedure miLayer1Click(Sender: TObject); + procedure miLayer2Click(Sender: TObject); + procedure miLayer3Click(Sender: TObject); + procedure miLayer4Click(Sender: TObject); + procedure miLayer5Click(Sender: TObject); + procedure miLayer6Click(Sender: TObject); + procedure miLayer7Click(Sender: TObject); + procedure miLayer8Click(Sender: TObject); + procedure miLayer9Click(Sender: TObject); + procedure tbShowClick(Sender: TObject); + procedure miSnapToGridClick(Sender: TObject); + procedure miMiniMapClick(Sender: TObject); + procedure miSwitchGridClick(Sender: TObject); + procedure miShowEdgesClick(Sender: TObject); + procedure minexttabClick(Sender: TObject); + procedure miSaveMiniMapClick(Sender: TObject); + procedure bClearTextureClick(Sender: TObject); + procedure miPackMapClick(Sender: TObject); + procedure aRecentFileExecute(Sender: TObject); + procedure miMapTestSettingsClick(Sender: TObject); + procedure miTestMapClick(Sender: TObject); + procedure sbVerticalScroll(Sender: TObject; ScrollCode: TScrollCode; + var ScrollPos: Integer); + procedure sbHorizontalScroll(Sender: TObject; ScrollCode: TScrollCode; + var ScrollPos: Integer); + procedure miOpenWadMapClick(Sender: TObject); + procedure selectall1Click(Sender: TObject); + procedure Splitter1CanResize(Sender: TObject; var NewSize: Integer; + var Accept: Boolean); + procedure Splitter2CanResize(Sender: TObject; var NewSize: Integer; + var Accept: Boolean); + procedure vleObjectPropertyEnter(Sender: TObject); + procedure vleObjectPropertyExit(Sender: TObject); + procedure FormKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); + private + procedure Draw(); + procedure OnIdle(Sender: TObject; var Done: Boolean); + public + procedure RefreshRecentMenu(); + { procedure lbTextureListDrawItem(Control: TWinControl; Index: Integer; + Rect: TRect; State: TOwnerDrawState); } + end; + +const + LAYER_BACK = 0; + LAYER_WALLS = 1; + LAYER_FOREGROUND = 2; + LAYER_STEPS = 3; + LAYER_WATER = 4; + LAYER_ITEMS = 5; + LAYER_MONSTERS = 6; + LAYER_AREAS = 7; + LAYER_TRIGGERS = 8; + + TEST_MAP_NAME = '$$$_TEST_$$$'; + LANGUAGE_FILE_NAME = '_Editor.txt'; + +var + MainForm: TMainForm; + EditorDir: String; + OpenedMap: String; + OpenedWAD: String; + + DotColor: TColor; + DotEnable: Boolean; + DotStep: Byte; + DotStepOne, DotStepTwo: Byte; + DotSize: Byte; + DrawTexturePanel: Boolean; + DrawPanelSize: Boolean; + BackColor: TColor; + PreviewColor: TColor; + Scale: Byte; + RecentCount: Integer; + RecentFiles: TStringList; + slInvalidTextures: TStringList; + + TestGameMode: String; + TestLimTime: String; + TestLimScore: String; + TestOptionsTwoPlayers: Boolean; + TestOptionsTeamDamage: Boolean; + TestOptionsAllowExit: Boolean; + TestOptionsWeaponStay: Boolean; + TestOptionsMonstersDM: Boolean; + TestD2dExe: String; + TestMapOnce: Boolean; + + LayerEnabled: Array [LAYER_BACK..LAYER_TRIGGERS] of Boolean = + (True, True, True, True, True, True, True, True, True); + PreviewMode: Boolean = False; + gLanguage: String; + + FormCaption: String; + + +procedure OpenMap(FileName: String; mapN: String); +function AddTexture(aWAD, aSection, aTex: String; silent: Boolean): Boolean; +procedure RemoveSelectFromObjects(); +procedure ChangeShownProperty(Name: String; NewValue: String); + +implementation + +uses + f_options, e_graphics, e_log, dglOpenGL, Math, + f_mapoptions, g_basic, f_about, f_mapoptimization, + f_mapcheck, f_addresource_texture, g_textures, + f_activationtype, f_keys, MAPWRITER, MAPSTRUCT, + MAPREADER, f_selectmap, f_savemap, WADEDITOR, MAPDEF, + g_map, f_saveminimap, f_addresource, CONFIG, f_packmap, + f_addresource_sound, f_maptest, f_choosetype, + g_language, f_selectlang, ClipBrd, Windows; + +const + UNDO_DELETE_PANEL = 1; + UNDO_DELETE_ITEM = 2; + UNDO_DELETE_AREA = 3; + UNDO_DELETE_MONSTER = 4; + UNDO_DELETE_TRIGGER = 5; + UNDO_ADD_PANEL = 6; + UNDO_ADD_ITEM = 7; + UNDO_ADD_AREA = 8; + UNDO_ADD_MONSTER = 9; + UNDO_ADD_TRIGGER = 10; + UNDO_MOVE_PANEL = 11; + UNDO_MOVE_ITEM = 12; + UNDO_MOVE_AREA = 13; + UNDO_MOVE_MONSTER = 14; + UNDO_MOVE_TRIGGER = 15; + UNDO_RESIZE_PANEL = 16; + UNDO_RESIZE_TRIGGER = 17; + + MOUSEACTION_NONE = 0; + MOUSEACTION_DRAWPANEL = 1; + MOUSEACTION_DRAWTRIGGER = 2; + MOUSEACTION_MOVEOBJ = 3; + MOUSEACTION_RESIZE = 4; + MOUSEACTION_MOVEMAP = 5; + MOUSEACTION_DRAWPRESS = 6; + MOUSEACTION_NOACTION = 7; + + RESIZETYPE_NONE = 0; + RESIZETYPE_VERTICAL = 1; + RESIZETYPE_HORIZONTAL = 2; + + RESIZEDIR_NONE = 0; + RESIZEDIR_DOWN = 1; + RESIZEDIR_UP = 2; + RESIZEDIR_RIGHT = 3; + RESIZEDIR_LEFT = 4; + + SELECTFLAG_NONE = 0; + SELECTFLAG_TELEPORT = 1; + SELECTFLAG_DOOR = 2; + SELECTFLAG_TEXTURE = 3; + SELECTFLAG_LIFT = 4; + SELECTFLAG_MONSTER = 5; + SELECTFLAG_SPAWNPOINT = 6; + SELECTFLAG_SHOTPANEL = 7; + SELECTFLAG_SELECTED = 8; + + RECENT_FILES_MENU_START = 11; + + CLIPBOARD_SIG = 'DF:ED'; + +type + TUndoRec = record + UndoType: Byte; + case Byte of + UNDO_DELETE_PANEL: (Panel: ^TPanel); + UNDO_DELETE_ITEM: (Item: TItem); + UNDO_DELETE_AREA: (Area: TArea); + UNDO_DELETE_MONSTER: (Monster: TMonster); + UNDO_DELETE_TRIGGER: (Trigger: TTrigger); + UNDO_ADD_PANEL, + UNDO_ADD_ITEM, + UNDO_ADD_AREA, + UNDO_ADD_MONSTER, + UNDO_ADD_TRIGGER: (AddID: DWORD); + UNDO_MOVE_PANEL, + UNDO_MOVE_ITEM, + UNDO_MOVE_AREA, + UNDO_MOVE_MONSTER, + UNDO_MOVE_TRIGGER: (MoveID: DWORD; dX, dY: Integer); + UNDO_RESIZE_PANEL, + UNDO_RESIZE_TRIGGER: (ResizeID: DWORD; dW, dH: Integer); + end; + + TCopyRec = record + ObjectType: Byte; + ID: Cardinal; + case Byte of + OBJECT_PANEL: (Panel: ^TPanel); + OBJECT_ITEM: (Item: TItem); + OBJECT_AREA: (Area: TArea); + OBJECT_MONSTER: (Monster: TMonster); + OBJECT_TRIGGER: (Trigger: TTrigger); + end; + + TCopyRecArray = Array of TCopyRec; + +var + hDC: THandle; + hRC: THandle; + gEditorFont: DWORD; + ShowMap: Boolean = False; + DrawRect: PRect = nil; + SnapToGrid: Boolean = True; + + MousePos: Types.TPoint; + LastMovePoint: Types.TPoint; + MouseLDown: Boolean; + MouseRDown: Boolean; + MouseLDownPos: Types.TPoint; + MouseRDownPos: Types.TPoint; + + SelectFlag: Byte = SELECTFLAG_NONE; + MouseAction: Byte = MOUSEACTION_NONE; + ResizeType: Byte = RESIZETYPE_NONE; + ResizeDirection: Byte = RESIZEDIR_NONE; + + DrawPressRect: Boolean = False; + EditingProperties: Boolean = False; + + UndoBuffer: Array of Array of TUndoRec = nil; + + +{$R *.lfm} + +//---------------------------------------- +//Далее идут вспомогательные процедуры +//---------------------------------------- + +function NameToBool(Name: String): Boolean; +begin + if Name = BoolNames[True] then + Result := True + else + Result := False; +end; + +function NameToDir(Name: String): TDirection; +begin + if Name = DirNames[D_LEFT] then + Result := D_LEFT + else + Result := D_RIGHT; +end; + +function NameToDirAdv(Name: String): Byte; +begin + if Name = DirNamesAdv[1] then + Result := 1 + else + if Name = DirNamesAdv[2] then + Result := 2 + else + if Name = DirNamesAdv[3] then + Result := 3 + else + Result := 0; +end; + +function ActivateToStr(ActivateType: Byte): String; +begin + Result := ''; + + if ByteBool(ACTIVATE_PLAYERCOLLIDE and ActivateType) then + Result := Result + '+PC'; + if ByteBool(ACTIVATE_MONSTERCOLLIDE and ActivateType) then + Result := Result + '+MC'; + if ByteBool(ACTIVATE_PLAYERPRESS and ActivateType) then + Result := Result + '+PP'; + if ByteBool(ACTIVATE_MONSTERPRESS and ActivateType) then + Result := Result + '+MP'; + if ByteBool(ACTIVATE_SHOT and ActivateType) then + Result := Result + '+SH'; + if ByteBool(ACTIVATE_NOMONSTER and ActivateType) then + Result := Result + '+NM'; + + if (Result <> '') and (Result[1] = '+') then + Delete(Result, 1, 1); +end; + +function StrToActivate(Str: String): Byte; +begin + Result := 0; + + if Pos('PC', Str) > 0 then + Result := ACTIVATE_PLAYERCOLLIDE; + if Pos('MC', Str) > 0 then + Result := Result or ACTIVATE_MONSTERCOLLIDE; + if Pos('PP', Str) > 0 then + Result := Result or ACTIVATE_PLAYERPRESS; + if Pos('MP', Str) > 0 then + Result := Result or ACTIVATE_MONSTERPRESS; + if Pos('SH', Str) > 0 then + Result := Result or ACTIVATE_SHOT; + if Pos('NM', Str) > 0 then + Result := Result or ACTIVATE_NOMONSTER; +end; + +function KeyToStr(Key: Byte): String; +begin + Result := ''; + + if ByteBool(KEY_RED and Key) then + Result := Result + '+RK'; + if ByteBool(KEY_GREEN and Key) then + Result := Result + '+GK'; + if ByteBool(KEY_BLUE and Key) then + Result := Result + '+BK'; + if ByteBool(KEY_REDTEAM and Key) then + Result := Result + '+RT'; + if ByteBool(KEY_BLUETEAM and Key) then + Result := Result + '+BT'; + + if (Result <> '') and (Result[1] = '+') then + Delete(Result, 1, 1); +end; + +function StrToKey(Str: String): Byte; +begin + Result := 0; + + if Pos('RK', Str) > 0 then + Result := KEY_RED; + if Pos('GK', Str) > 0 then + Result := Result or KEY_GREEN; + if Pos('BK', Str) > 0 then + Result := Result or KEY_BLUE; + if Pos('RT', Str) > 0 then + Result := Result or KEY_REDTEAM; + if Pos('BT', Str) > 0 then + Result := Result or KEY_BLUETEAM; +end; + +function EffectToStr(Effect: Byte): String; +begin + if Effect in [EFFECT_TELEPORT..EFFECT_FIRE] then + Result := EffectNames[Effect] + else + Result := EffectNames[EFFECT_NONE]; +end; + +function StrToEffect(Str: String): Byte; +var + i: Integer; +begin + Result := EFFECT_NONE; + for i := EFFECT_TELEPORT to EFFECT_FIRE do + if EffectNames[i] = Str then + begin + Result := i; + Exit; + end; +end; + +function MonsterToStr(MonType: Byte): String; +begin + if MonType in [MONSTER_DEMON..MONSTER_MAN] then + Result := MonsterNames[MonType] + else + Result := MonsterNames[MONSTER_ZOMBY]; +end; + +function StrToMonster(Str: String): Byte; +var + i: Integer; +begin + Result := MONSTER_ZOMBY; + for i := MONSTER_DEMON to MONSTER_MAN do + if MonsterNames[i] = Str then + begin + Result := i; + Exit; + end; +end; + +function ItemToStr(ItemType: Byte): String; +begin + if ItemType in [ITEM_MEDKIT_SMALL..ITEM_MAX] then + Result := ItemNames[ItemType] + else + Result := ItemNames[ITEM_AMMO_BULLETS]; +end; + +function StrToItem(Str: String): Byte; +var + i: Integer; +begin + Result := ITEM_AMMO_BULLETS; + for i := ITEM_MEDKIT_SMALL to ITEM_MAX do + if ItemNames[i] = Str then + begin + Result := i; + Exit; + end; +end; + +function ShotToStr(ShotType: Byte): String; +begin + if ShotType in [TRIGGER_SHOT_PISTOL..TRIGGER_SHOT_MAX] then + Result := ShotNames[ShotType] + else + Result := ShotNames[TRIGGER_SHOT_PISTOL]; +end; + +function StrToShot(Str: String): Byte; +var + i: Integer; +begin + Result := TRIGGER_SHOT_PISTOL; + for i := TRIGGER_SHOT_PISTOL to TRIGGER_SHOT_MAX do + if ShotNames[i] = Str then + begin + Result := i; + Exit; + end; +end; + +function SelectedObjectCount(): Word; +var + a: Integer; +begin + Result := 0; + + if SelectedObjects = nil then + Exit; + + for a := 0 to High(SelectedObjects) do + if SelectedObjects[a].Live then + Result := Result + 1; +end; + +function GetFirstSelected(): Integer; +var + a: Integer; +begin + Result := -1; + + if SelectedObjects = nil then + Exit; + + for a := 0 to High(SelectedObjects) do + if SelectedObjects[a].Live then + begin + Result := a; + Exit; + end; +end; + +function Normalize16(x: Integer): Integer; +begin + Result := (x div 16) * 16; +end; + +procedure MoveMap(X, Y: Integer); +var + rx, ry, ScaleSz: Integer; +begin + with MainForm.RenderPanel do + begin + ScaleSz := 16 div Scale; + // Размер видимой части карты: + rx := min(Normalize16(Width), Normalize16(gMapInfo.Width)) div 2; + ry := min(Normalize16(Height), Normalize16(gMapInfo.Height)) div 2; + // Место клика на мини-карте: + MapOffset.X := X - (Width-max(gMapInfo.Width div ScaleSz, 1)-1); + MapOffset.Y := Y - 1; + // Это же место на "большой" карте: + MapOffset.X := MapOffset.X * ScaleSz; + MapOffset.Y := MapOffset.Y * ScaleSz; + // Левый верхний угол новой видимой части карты: + MapOffset.X := MapOffset.X - rx; + MapOffset.Y := MapOffset.Y - ry; + // Выход за границы: + if MapOffset.X < 0 then + MapOffset.X := 0; + if MapOffset.Y < 0 then + MapOffset.Y := 0; + if MapOffset.X > MainForm.sbHorizontal.Max then + MapOffset.X := MainForm.sbHorizontal.Max; + if MapOffset.Y > MainForm.sbVertical.Max then + MapOffset.Y := MainForm.sbVertical.Max; + // Кратно 16: + MapOffset.X := Normalize16(MapOffset.X); + MapOffset.Y := Normalize16(MapOffset.Y); + end; + + MainForm.sbHorizontal.Position := MapOffset.X; + MainForm.sbVertical.Position := MapOffset.Y; + + MapOffset.X := -MapOffset.X; + MapOffset.Y := -MapOffset.Y; + + MainForm.Resize(); +end; + +function IsTexturedPanel(PanelType: Word): Boolean; +begin + Result := WordBool(PanelType and (PANEL_WALL or PANEL_BACK or PANEL_FORE or + PANEL_STEP or PANEL_OPENDOOR or PANEL_CLOSEDOOR or + PANEL_WATER or PANEL_ACID1 or PANEL_ACID2)); +end; + +procedure FillProperty(); +var + _id: DWORD; + str: String; +begin + MainForm.vleObjectProperty.Strings.Clear(); + +// Отображаем свойства если выделен только один объект: + if SelectedObjectCount() <> 1 then + Exit; + + _id := GetFirstSelected(); + if not SelectedObjects[_id].Live then + Exit; + + with MainForm.vleObjectProperty do + with ItemProps[InsertRow(_lc[I_PROP_ID], IntToStr(SelectedObjects[_id].ID), True)] do + begin + EditStyle := esSimple; + ReadOnly := True; + end; + + case SelectedObjects[0].ObjectType of + OBJECT_PANEL: + begin + with MainForm.vleObjectProperty, + gPanels[SelectedObjects[_id].ID] do + begin + with ItemProps[InsertRow(_lc[I_PROP_X], IntToStr(X), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_Y], IntToStr(Y), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_WIDTH], IntToStr(Width), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_HEIGHT], IntToStr(Height), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_PANEL_TYPE], GetPanelName(PanelType), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + if IsTexturedPanel(PanelType) then + begin // Может быть текстура + with ItemProps[InsertRow(_lc[I_PROP_PANEL_TEX], TextureName, True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + if TextureName <> '' then + begin // Есть текстура + with ItemProps[InsertRow(_lc[I_PROP_PANEL_ALPHA], IntToStr(Alpha), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + + with ItemProps[InsertRow(_lc[I_PROP_PANEL_BLEND], BoolNames[Blending], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + end; + end; + end; + + OBJECT_ITEM: + begin + with MainForm.vleObjectProperty, + gItems[SelectedObjects[_id].ID] do + begin + with ItemProps[InsertRow(_lc[I_PROP_X], IntToStr(X), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_Y], IntToStr(Y), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_DM_ONLY], BoolNames[OnlyDM], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_ITEM_FALLS], BoolNames[Fall], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + end; + + OBJECT_MONSTER: + begin + with MainForm.vleObjectProperty, + gMonsters[SelectedObjects[_id].ID] do + begin + with ItemProps[InsertRow(_lc[I_PROP_X], IntToStr(X), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_Y], IntToStr(Y), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_DIRECTION], DirNames[Direction], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + end; + + OBJECT_AREA: + begin + with MainForm.vleObjectProperty, + gAreas[SelectedObjects[_id].ID] do + begin + with ItemProps[InsertRow(_lc[I_PROP_X], IntToStr(X), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_Y], IntToStr(Y), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_DIRECTION], DirNames[Direction], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + end; + + OBJECT_TRIGGER: + begin + with MainForm.vleObjectProperty, + gTriggers[SelectedObjects[_id].ID] do + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_TYPE], GetTriggerName(TriggerType), True)] do + begin + EditStyle := esSimple; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_X], IntToStr(X), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_Y], IntToStr(Y), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_WIDTH], IntToStr(Width), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_HEIGHT], IntToStr(Height), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_ENABLED], BoolNames[Enabled], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_TEXTURE_PANEL], IntToStr(TexturePanel), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_ACTIVATION], ActivateToStr(ActivateType), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_KEYS], KeyToStr(Key), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + case TriggerType of + TRIGGER_EXIT: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_NEXT_MAP], Data.MapName, True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + end; + + TRIGGER_TELEPORT: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_TELEPORT_TO], Format('(%d:%d)', [Data.TargetPoint.X, Data.TargetPoint.Y]), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_D2D], BoolNames[Data.d2d_teleport], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_TELEPORT_SILENT], BoolNames[Data.silent_teleport], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_TELEPORT_DIR], DirNamesAdv[Data.TlpDir], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, + TRIGGER_DOOR, TRIGGER_DOOR5: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_DOOR_PANEL], IntToStr(Data.PanelID), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SILENT], BoolNames[Data.NoSound], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_D2D], BoolNames[Data.d2d_doors], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_CLOSETRAP, TRIGGER_TRAP: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_TRAP_PANEL], IntToStr(Data.PanelID), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SILENT], BoolNames[Data.NoSound], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_D2D], BoolNames[Data.d2d_doors], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_PRESS, TRIGGER_ON, TRIGGER_OFF, + TRIGGER_ONOFF: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_EX_AREA], + Format('(%d:%d %d:%d)', [Data.tX, Data.tY, Data.tWidth, Data.tHeight]), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EX_DELAY], IntToStr(Data.Wait), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EX_COUNT], IntToStr(Data.Count), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EX_MONSTER], IntToStr(Data.MonsterID-1), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + if TriggerType = TRIGGER_PRESS then + with ItemProps[InsertRow(_lc[I_PROP_TR_EX_RANDOM], BoolNames[Data.ExtRandom], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_SECRET: + ; + + TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, TRIGGER_LIFT: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_LIFT_PANEL], IntToStr(Data.PanelID), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SILENT], BoolNames[Data.NoSound], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_D2D], BoolNames[Data.d2d_doors], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_TEXTURE: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_TEXTURE_ONCE], BoolNames[Data.ActivateOnce], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_TEXTURE_ANIM_ONCE], BoolNames[Data.AnimOnce], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_SOUND: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_SOUND_NAME], Data.SoundName, True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SOUND_VOLUME], IntToStr(Data.Volume), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SOUND_PAN], IntToStr(Data.Pan), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SOUND_COUNT], IntToStr(Data.PlayCount), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SOUND_LOCAL], BoolNames[Data.Local], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SOUND_SWITCH], BoolNames[Data.SoundSwitch], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_SPAWNMONSTER: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_MONSTER_TYPE], MonsterToStr(Data.MonType), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SPAWN_TO], + Format('(%d:%d)', [Data.MonPos.X, Data.MonPos.Y]), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_DIRECTION], DirNames[TDirection(Data.MonDir)], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_HEALTH], IntToStr(Data.MonHealth), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_MONSTER_ACTIVE], BoolNames[Data.MonActive], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_COUNT], IntToStr(Data.MonCount), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_FX_TYPE], EffectToStr(Data.MonEffect), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SPAWN_MAX], IntToStr(Data.MonMax), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SPAWN_DELAY], IntToStr(Data.MonDelay), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + case Data.MonBehav of + 1: str := _lc[I_PROP_TR_MONSTER_BEHAVIOUR_1]; + 2: str := _lc[I_PROP_TR_MONSTER_BEHAVIOUR_2]; + 3: str := _lc[I_PROP_TR_MONSTER_BEHAVIOUR_3]; + 4: str := _lc[I_PROP_TR_MONSTER_BEHAVIOUR_4]; + 5: str := _lc[I_PROP_TR_MONSTER_BEHAVIOUR_5]; + else str := _lc[I_PROP_TR_MONSTER_BEHAVIOUR_0]; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_MONSTER_BEHAVIOUR], str, True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_SPAWNITEM: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_ITEM_TYPE], ItemToStr(Data.ItemType), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SPAWN_TO], + Format('(%d:%d)', [Data.ItemPos.X, Data.ItemPos.Y]), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_DM_ONLY], BoolNames[Data.ItemOnlyDM], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_ITEM_FALLS], BoolNames[Data.ItemFalls], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_COUNT], IntToStr(Data.ItemCount), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_FX_TYPE], EffectToStr(Data.ItemEffect), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SPAWN_MAX], IntToStr(Data.ItemMax), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SPAWN_DELAY], IntToStr(Data.ItemDelay), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + end; + + TRIGGER_MUSIC: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_MUSIC_NAME], Data.MusicName, True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + if Data.MusicAction = 1 then + str := _lc[I_PROP_TR_MUSIC_ON] + else + str := _lc[I_PROP_TR_MUSIC_OFF]; + + with ItemProps[InsertRow(_lc[I_PROP_TR_MUSIC_ACT], str, True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_PUSH: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_PUSH_ANGLE], IntToStr(Data.PushAngle), True)] do + begin + EditStyle := esSimple; + MaxLength := 4; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_PUSH_FORCE], IntToStr(Data.PushForce), True)] do + begin + EditStyle := esSimple; + MaxLength := 4; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_PUSH_RESET], BoolNames[Data.ResetVel], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_SCORE: + begin + case Data.ScoreAction of + 1: str := _lc[I_PROP_TR_SCORE_ACT_1]; + 2: str := _lc[I_PROP_TR_SCORE_ACT_2]; + 3: str := _lc[I_PROP_TR_SCORE_ACT_3]; + else str := _lc[I_PROP_TR_SCORE_ACT_0]; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_SCORE_ACT], str, True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_COUNT], IntToStr(Data.ScoreCount), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + case Data.ScoreTeam of + 1: str := _lc[I_PROP_TR_SCORE_TEAM_1]; + 2: str := _lc[I_PROP_TR_SCORE_TEAM_2]; + 3: str := _lc[I_PROP_TR_SCORE_TEAM_3]; + else str := _lc[I_PROP_TR_SCORE_TEAM_0]; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_SCORE_TEAM], str, True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_SCORE_CON], BoolNames[Data.ScoreCon], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_SCORE_MSG], BoolNames[Data.ScoreMsg], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_MESSAGE: + begin + case Data.MessageKind of + 1: str := _lc[I_PROP_TR_MESSAGE_KIND_1]; + else str := _lc[I_PROP_TR_MESSAGE_KIND_0]; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_MESSAGE_KIND], str, True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + case Data.MessageSendTo of + 1: str := _lc[I_PROP_TR_MESSAGE_TO_1]; + 2: str := _lc[I_PROP_TR_MESSAGE_TO_2]; + 3: str := _lc[I_PROP_TR_MESSAGE_TO_3]; + 4: str := _lc[I_PROP_TR_MESSAGE_TO_4]; + 5: str := _lc[I_PROP_TR_MESSAGE_TO_5]; + else str := _lc[I_PROP_TR_MESSAGE_TO_0]; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_MESSAGE_TO], str, True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_MESSAGE_TEXT], Data.MessageText, True)] do + begin + EditStyle := esSimple; + MaxLength := 100; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_MESSAGE_TIME], IntToStr(Data.MessageTime), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + end; + + TRIGGER_DAMAGE: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_DAMAGE_VALUE], IntToStr(Data.DamageValue), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_INTERVAL], IntToStr(Data.DamageInterval), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + end; + + TRIGGER_HEALTH: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_HEALTH], IntToStr(Data.HealValue), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_INTERVAL], IntToStr(Data.HealInterval), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_HEALTH_MAX], BoolNames[Data.HealMax], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_SILENT], BoolNames[Data.HealSilent], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + end; + + TRIGGER_SHOT: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_TYPE], ShotToStr(Data.ShotType), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_SOUND], BoolNames[Data.ShotSound], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_PANEL], IntToStr(Data.ShotPanelID), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + case Data.ShotTarget of + 1: str := _lc[I_PROP_TR_SHOT_TO_1]; + 2: str := _lc[I_PROP_TR_SHOT_TO_2]; + 3: str := _lc[I_PROP_TR_SHOT_TO_3]; + 4: str := _lc[I_PROP_TR_SHOT_TO_4]; + 5: str := _lc[I_PROP_TR_SHOT_TO_5]; + 6: str := _lc[I_PROP_TR_SHOT_TO_6]; + else str := _lc[I_PROP_TR_SHOT_TO_0]; + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_TO], str, True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_SIGHT], IntToStr(Data.ShotIntSight), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_ALLMAP], BoolNames[Data.ShotAllMap], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SPAWN_TO], + Format('(%d:%d)', [Data.ShotPos.X, Data.ShotPos.Y]), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_ANGLE], IntToStr(Data.ShotAngle), True)] do + begin + EditStyle := esSimple; + MaxLength := 4; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EX_DELAY], IntToStr(Data.ShotWait), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_ACC], IntToStr(Data.ShotAccuracy), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_AMMO], IntToStr(Data.ShotAmmo), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_SHOT_RELOAD], IntToStr(Data.ShotIntReload), True)] do + begin + EditStyle := esSimple; + MaxLength := 4; + end; + end; + + TRIGGER_EFFECT: + begin + with ItemProps[InsertRow(_lc[I_PROP_TR_COUNT], IntToStr(Data.FXCount), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + + if Data.FXType = 0 then + str := _lc[I_PROP_TR_EFFECT_PARTICLE] + else + str := _lc[I_PROP_TR_EFFECT_ANIMATION]; + with ItemProps[InsertRow(_lc[I_PROP_TR_EFFECT_TYPE], str, True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + str := ''; + if Data.FXType = 0 then + case Data.FXSubType of + TRIGGER_EFFECT_SLIQUID: + str := _lc[I_PROP_TR_EFFECT_SLIQUID]; + TRIGGER_EFFECT_LLIQUID: + str := _lc[I_PROP_TR_EFFECT_LLIQUID]; + TRIGGER_EFFECT_DLIQUID: + str := _lc[I_PROP_TR_EFFECT_DLIQUID]; + TRIGGER_EFFECT_BLOOD: + str := _lc[I_PROP_TR_EFFECT_BLOOD]; + TRIGGER_EFFECT_SPARK: + str := _lc[I_PROP_TR_EFFECT_SPARK]; + TRIGGER_EFFECT_BUBBLE: + str := _lc[I_PROP_TR_EFFECT_BUBBLE]; + end; + if Data.FXType = 1 then + begin + if (Data.FXSubType = 0) or (Data.FXSubType > EFFECT_FIRE) then + Data.FXSubType := EFFECT_TELEPORT; + str := EffectToStr(Data.FXSubType); + end; + with ItemProps[InsertRow(_lc[I_PROP_TR_EFFECT_SUBTYPE], str, True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EFFECT_COLOR], IntToStr(Data.FXColorR or (Data.FXColorG shl 8) or (Data.FXColorB shl 16)), True)] do + begin + EditStyle := esEllipsis; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EFFECT_CENTER], BoolNames[Data.FXPos = 0], True)] do + begin + EditStyle := esPickList; + ReadOnly := True; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EX_DELAY], IntToStr(Data.FXWait), True)] do + begin + EditStyle := esSimple; + MaxLength := 5; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EFFECT_VELX], IntToStr(Data.FXVelX), True)] do + begin + EditStyle := esSimple; + MaxLength := 4; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EFFECT_VELY], IntToStr(Data.FXVelY), True)] do + begin + EditStyle := esSimple; + MaxLength := 4; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EFFECT_SPL], IntToStr(Data.FXSpreadL), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EFFECT_SPR], IntToStr(Data.FXSpreadR), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EFFECT_SPU], IntToStr(Data.FXSpreadU), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + + with ItemProps[InsertRow(_lc[I_PROP_TR_EFFECT_SPD], IntToStr(Data.FXSpreadD), True)] do + begin + EditStyle := esSimple; + MaxLength := 3; + end; + end; + end; //case TriggerType + end; + end; // OBJECT_TRIGGER: + end; +end; + +procedure ChangeShownProperty(Name: String; NewValue: String); +var + row: Integer; +begin + if SelectedObjectCount() <> 1 then + Exit; + if not SelectedObjects[GetFirstSelected()].Live then + Exit; + +// Есть ли такой ключ: + if MainForm.vleObjectProperty.FindRow(Name, row) then + begin + MainForm.vleObjectProperty.Values[Name] := NewValue; + end; +end; + +procedure SelectObject(fObjectType: Byte; fID: DWORD; Multi: Boolean); +var + a: Integer; + b: Boolean; +begin + if Multi then + begin + b := False; + + // Уже выделен - убираем: + if SelectedObjects <> nil then + for a := 0 to High(SelectedObjects) do + with SelectedObjects[a] do + if Live and (ID = fID) and + (ObjectType = fObjectType) then + begin + Live := False; + b := True; + end; + + if b then + Exit; + + SetLength(SelectedObjects, Length(SelectedObjects)+1); + + with SelectedObjects[High(SelectedObjects)] do + begin + ObjectType := fObjectType; + ID := fID; + Live := True; + end; + end + else // not Multi + begin + SetLength(SelectedObjects, 1); + + with SelectedObjects[0] do + begin + ObjectType := fObjectType; + ID := fID; + Live := True; + end; + end; + + MainForm.miCopy.Enabled := True; + MainForm.miCut.Enabled := True; + + if fObjectType = OBJECT_PANEL then + begin + MainForm.miToFore.Enabled := True; + MainForm.miToBack.Enabled := True; + end; +end; + +procedure RemoveSelectFromObjects(); +begin + SelectedObjects := nil; + DrawPressRect := False; + MouseLDown := False; + MouseRDown := False; + MouseAction := MOUSEACTION_NONE; + SelectFlag := SELECTFLAG_NONE; + ResizeType := RESIZETYPE_NONE; + ResizeDirection := RESIZEDIR_NONE; + + MainForm.vleObjectProperty.Strings.Clear(); + + MainForm.miCopy.Enabled := False; + MainForm.miCut.Enabled := False; + MainForm.miToFore.Enabled := False; + MainForm.miToBack.Enabled := False; +end; + +procedure DeleteSelectedObjects(); +var + i, a, ii: Integer; + b: Boolean; +begin + if SelectedObjects = nil then + Exit; + + b := False; + i := 0; + + for a := 0 to High(SelectedObjects) do + with SelectedObjects[a] do + if Live then + begin + if not b then + begin + SetLength(UndoBuffer, Length(UndoBuffer)+1); + i := High(UndoBuffer); + b := True; + end; + + SetLength(UndoBuffer[i], Length(UndoBuffer[i])+1); + ii := High(UndoBuffer[i]); + + case ObjectType of + OBJECT_PANEL: + begin + UndoBuffer[i, ii].UndoType := UNDO_DELETE_PANEL; + New(UndoBuffer[i, ii].Panel); + UndoBuffer[i, ii].Panel^ := gPanels[ID]; + end; + OBJECT_ITEM: + begin + UndoBuffer[i, ii].UndoType := UNDO_DELETE_ITEM; + UndoBuffer[i, ii].Item := gItems[ID]; + end; + OBJECT_AREA: + begin + UndoBuffer[i, ii].UndoType := UNDO_DELETE_AREA; + UndoBuffer[i, ii].Area := gAreas[ID]; + end; + OBJECT_TRIGGER: + begin + UndoBuffer[i, ii].UndoType := UNDO_DELETE_TRIGGER; + UndoBuffer[i, ii].Trigger := gTriggers[ID]; + end; + end; + + RemoveObject(ID, ObjectType); + end; + + RemoveSelectFromObjects(); + + MainForm.miUndo.Enabled := UndoBuffer <> nil; +end; + +procedure Undo_Add(ObjectType: Byte; ID: DWORD; Group: Boolean = False); +var + i, ii: Integer; +begin + if (not Group) or (Length(UndoBuffer) = 0) then + SetLength(UndoBuffer, Length(UndoBuffer)+1); + SetLength(UndoBuffer[High(UndoBuffer)], Length(UndoBuffer[High(UndoBuffer)])+1); + i := High(UndoBuffer); + ii := High(UndoBuffer[i]); + + case ObjectType of + OBJECT_PANEL: + UndoBuffer[i, ii].UndoType := UNDO_ADD_PANEL; + OBJECT_ITEM: + UndoBuffer[i, ii].UndoType := UNDO_ADD_ITEM; + OBJECT_MONSTER: + UndoBuffer[i, ii].UndoType := UNDO_ADD_MONSTER; + OBJECT_AREA: + UndoBuffer[i, ii].UndoType := UNDO_ADD_AREA; + OBJECT_TRIGGER: + UndoBuffer[i, ii].UndoType := UNDO_ADD_TRIGGER; + end; + + UndoBuffer[i, ii].AddID := ID; + + MainForm.miUndo.Enabled := UndoBuffer <> nil; +end; + +procedure FullClear(); +begin + RemoveSelectFromObjects(); + ClearMap(); + UndoBuffer := nil; + slInvalidTextures.Clear(); + MapCheckForm.lbErrorList.Clear(); + MapCheckForm.mErrorDescription.Clear(); + + MainForm.miUndo.Enabled := False; + MainForm.sbHorizontal.Position := 0; + MainForm.sbVertical.Position := 0; + MainForm.FormResize(nil); + MainForm.Caption := FormCaption; + OpenedMap := ''; + OpenedWAD := ''; +end; + +procedure ErrorMessageBox(str: String); +begin + MessageBox(0, PChar(str), PChar(_lc[I_MSG_ERROR]), + MB_ICONINFORMATION or MB_OK or MB_DEFBUTTON1); +end; + +function CheckProperty(): Boolean; +var + _id: Integer; +begin + Result := False; + + _id := GetFirstSelected(); + + if SelectedObjects[_id].ObjectType = OBJECT_PANEL then + with gPanels[SelectedObjects[_id].ID] do + begin + if TextureWidth <> 0 then + if StrToIntDef(MainForm.vleObjectProperty.Values[_lc[I_PROP_WIDTH]], 1) mod TextureWidth <> 0 then + begin + ErrorMessageBox(Format(_lc[I_MSG_WRONG_TEXWIDTH], + [TextureWidth])); + Exit; + end; + + if TextureHeight <> 0 then + if StrToIntDef(Trim(MainForm.vleObjectProperty.Values[_lc[I_PROP_HEIGHT]]), 1) mod TextureHeight <> 0 then + begin + ErrorMessageBox(Format(_lc[I_MSG_WRONG_TEXHEIGHT], + [TextureHeight])); + Exit; + end; + + if IsTexturedPanel(PanelType) and (TextureName <> '') then + if not (StrToIntDef(MainForm.vleObjectProperty.Values[_lc[I_PROP_PANEL_ALPHA]], -1) in [0..255]) then + begin + ErrorMessageBox(_lc[I_MSG_WRONG_ALPHA]); + Exit; + end; + end; + + if SelectedObjects[_id].ObjectType in [OBJECT_PANEL, OBJECT_TRIGGER] then + if (StrToIntDef(MainForm.vleObjectProperty.Values[_lc[I_PROP_WIDTH]], 0) <= 0) or + (StrToIntDef(MainForm.vleObjectProperty.Values[_lc[I_PROP_HEIGHT]], 0) <= 0) then + begin + ErrorMessageBox(_lc[I_MSG_WRONG_SIZE]); + Exit; + end; + + if (Trim(MainForm.vleObjectProperty.Values[_lc[I_PROP_X]]) = '') or + (Trim(MainForm.vleObjectProperty.Values[_lc[I_PROP_Y]]) = '') then + begin + ErrorMessageBox(_lc[I_MSG_WRONG_XY]); + Exit; + end; + + Result := True; +end; + +procedure SelectTexture(ID: Integer); +begin + MainForm.lbTextureList.ItemIndex := ID; + MainForm.lbTextureListClick(nil); +end; + +function AddTexture(aWAD, aSection, aTex: String; silent: Boolean): Boolean; +var + a: Integer; + ok: Boolean; + FileName: String; + ResourceName: String; + FullResourceName: String; + SectionName: String; + Data: Pointer; + Width, Height: Word; + fn: String; +begin + if aSection = '..' then + SectionName := '' + else + SectionName := aSection; + + if aWAD = _lc[I_WAD_SPECIAL_MAP] then + begin // Файл карты + g_ProcessResourceStr(OpenedMap, @fn, nil, nil); + //FileName := EditorDir+'maps\'+ExtractFileName(fn); + FileName := fn; + ResourceName := ':'+SectionName+'\'+aTex; + end + else + if aWAD = _lc[I_WAD_SPECIAL_TEXS] then + begin // Спец. текстуры + FileName := ''; + ResourceName := aTex; + end + else + begin // Внешний WAD + FileName := EditorDir+'wads\'+aWAD; + ResourceName := aWAD+':'+SectionName+'\'+aTex; + end; + + ok := True; + +// Есть ли уже такая текстура: + for a := 0 to MainForm.lbTextureList.Items.Count-1 do + if ResourceName = MainForm.lbTextureList.Items[a] then + begin + if not silent then + ErrorMessageBox(Format(_lc[I_MSG_TEXTURE_ALREADY], + [ResourceName])); + ok := False; + end; + +// Название ресурса <= 64 символов: + if Length(ResourceName) > 64 then + begin + if not silent then + ErrorMessageBox(Format(_lc[I_MSG_RES_NAME_64], + [ResourceName])); + ok := False; + end; + + if ok then + begin + a := -1; + if aWAD = _lc[I_WAD_SPECIAL_TEXS] then + begin + a := MainForm.lbTextureList.Items.Add(ResourceName); + if not silent then + SelectTexture(a); + Result := True; + Exit; + end; + + FullResourceName := FileName+':'+SectionName+'\'+aTex; + + if IsAnim(FullResourceName) then + begin // Аним. текстура + GetFrame(FullResourceName, Data, Width, Height); + + if g_CreateTextureMemorySize(Data, ResourceName, 0, 0, Width, Height, 1) then + a := MainForm.lbTextureList.Items.Add(ResourceName); + end + else // Обычная текстура + begin + if g_CreateTextureWAD(ResourceName, FullResourceName) then + a := MainForm.lbTextureList.Items.Add(ResourceName); + end; + if (a > -1) and (not silent) then + SelectTexture(a); + end; + + Result := ok; +end; + +procedure UpdateCaption(sMap, sFile, sRes: String); +begin + with MainForm do + if (sFile = '') and (sRes = '') and (sMap = '') then + Caption := FormCaption + else + if sMap = '' then + Caption := Format('%s - %s:%s', [FormCaption, sFile, sRes]) + else + if (sFile <> '') and (sRes <> '') then + Caption := Format('%s - %s (%s:%s)', [FormCaption, sMap, sFile, sRes]) + else + Caption := Format('%s - %s', [FormCaption, sMap]); +end; + +procedure OpenMap(FileName: String; mapN: String); +var + MapName: String; + idx: Integer; +begin + SelectMapForm.GetMaps(FileName); + + if (FileName = OpenedWAD) and + (OpenedMap <> '') then + begin + MapName := OpenedMap; + while (Pos(':\', MapName) > 0) do + Delete(MapName, 1, Pos(':\', MapName) + 1); + + idx := SelectMapForm.lbMapList.Items.IndexOf(MapName); + SelectMapForm.lbMapList.ItemIndex := idx; + end + else + if SelectMapForm.lbMapList.Count > 0 then + SelectMapForm.lbMapList.ItemIndex := 0 + else + SelectMapForm.lbMapList.ItemIndex := -1; + + if mapN = '' then + idx := -1 + else + idx := SelectMapForm.lbMapList.Items.IndexOf(mapN); + + if idx < 0 then + begin + if (SelectMapForm.ShowModal() = mrOK) and + (SelectMapForm.lbMapList.ItemIndex <> -1) then + idx := SelectMapForm.lbMapList.ItemIndex + else + Exit; + end; + + MapName := SelectMapForm.lbMapList.Items[idx]; + + with MainForm do + begin + FullClear(); + + pLoadProgress.Left := (RenderPanel.Width div 2)-(pLoadProgress.Width div 2); + pLoadProgress.Top := (RenderPanel.Height div 2)-(pLoadProgress.Height div 2); + pLoadProgress.Show(); + + OpenedMap := FileName+':\'+MapName; + OpenedWAD := FileName; + + idx := RecentFiles.IndexOf(OpenedMap); + // Такая карта уже недавно открывалась: + if idx >= 0 then + RecentFiles.Delete(idx); + RecentFiles.Insert(0, OpenedMap); + RefreshRecentMenu(); + + LoadMap(OpenedMap); + + pLoadProgress.Hide(); + FormResize(nil); + + lbTextureList.Sorted := True; + lbTextureList.Sorted := False; + + UpdateCaption(gMapInfo.Name, ExtractFileName(FileName), MapName); + end; +end; + +procedure MoveSelectedObjects(Wall, alt: Boolean; dx, dy: Integer); +var + okX, okY: Boolean; + a: Integer; +begin + if SelectedObjects = nil then + Exit; + + okX := True; + okY := True; + + if Wall then + for a := 0 to High(SelectedObjects) do + if SelectedObjects[a].Live then + begin + if ObjectCollideLevel(SelectedObjects[a].ID, SelectedObjects[a].ObjectType, dx, 0) then + okX := False; + + if ObjectCollideLevel(SelectedObjects[a].ID, SelectedObjects[a].ObjectType, 0, dy) then + okY := False; + + if (not okX) or (not okY) then + Break; + end; + + if okX or okY then + begin + for a := 0 to High(SelectedObjects) do + if SelectedObjects[a].Live then + begin + if okX then + MoveObject(SelectedObjects[a].ObjectType, SelectedObjects[a].ID, dx, 0); + + if okY then + MoveObject(SelectedObjects[a].ObjectType, SelectedObjects[a].ID, 0, dy); + + if alt and (SelectedObjects[a].ObjectType = OBJECT_TRIGGER) then + begin + if gTriggers[SelectedObjects[a].ID].TriggerType in [TRIGGER_PRESS, + TRIGGER_ON, TRIGGER_OFF, TRIGGER_ONOFF] then + begin // Двигаем зону Расширителя + if okX then + gTriggers[SelectedObjects[a].ID].Data.tX := gTriggers[SelectedObjects[a].ID].Data.tX+dx; + if okY then + gTriggers[SelectedObjects[a].ID].Data.tY := gTriggers[SelectedObjects[a].ID].Data.tY+dy; + end; + + if gTriggers[SelectedObjects[a].ID].TriggerType in [TRIGGER_TELEPORT] then + begin // Двигаем точку назначения Телепорта + if okX then + gTriggers[SelectedObjects[a].ID].Data.TargetPoint.X := gTriggers[SelectedObjects[a].ID].Data.TargetPoint.X+dx; + if okY then + gTriggers[SelectedObjects[a].ID].Data.TargetPoint.Y := gTriggers[SelectedObjects[a].ID].Data.TargetPoint.Y+dy; + end; + + if gTriggers[SelectedObjects[a].ID].TriggerType in [TRIGGER_SPAWNMONSTER] then + begin // Двигаем точку создания монстра + if okX then + gTriggers[SelectedObjects[a].ID].Data.MonPos.X := gTriggers[SelectedObjects[a].ID].Data.MonPos.X+dx; + if okY then + gTriggers[SelectedObjects[a].ID].Data.MonPos.Y := gTriggers[SelectedObjects[a].ID].Data.MonPos.Y+dy; + end; + + if gTriggers[SelectedObjects[a].ID].TriggerType in [TRIGGER_SPAWNITEM] then + begin // Двигаем точку создания предмета + if okX then + gTriggers[SelectedObjects[a].ID].Data.ItemPos.X := gTriggers[SelectedObjects[a].ID].Data.ItemPos.X+dx; + if okY then + gTriggers[SelectedObjects[a].ID].Data.ItemPos.Y := gTriggers[SelectedObjects[a].ID].Data.ItemPos.Y+dy; + end; + + if gTriggers[SelectedObjects[a].ID].TriggerType in [TRIGGER_SHOT] then + begin // Двигаем точку создания выстрела + if okX then + gTriggers[SelectedObjects[a].ID].Data.ShotPos.X := gTriggers[SelectedObjects[a].ID].Data.ShotPos.X+dx; + if okY then + gTriggers[SelectedObjects[a].ID].Data.ShotPos.Y := gTriggers[SelectedObjects[a].ID].Data.ShotPos.Y+dy; + end; + end; + end; + + LastMovePoint := MousePos; + end; +end; + +procedure ShowLayer(Layer: Byte; show: Boolean); +begin + LayerEnabled[Layer] := show; + + case Layer of + LAYER_BACK: + begin + MainForm.miLayer1.Checked := show; + MainForm.miLayerP1.Checked := show; + end; + LAYER_WALLS: + begin + MainForm.miLayer2.Checked := show; + MainForm.miLayerP2.Checked := show; + end; + LAYER_FOREGROUND: + begin + MainForm.miLayer3.Checked := show; + MainForm.miLayerP3.Checked := show; + end; + LAYER_STEPS: + begin + MainForm.miLayer4.Checked := show; + MainForm.miLayerP4.Checked := show; + end; + LAYER_WATER: + begin + MainForm.miLayer5.Checked := show; + MainForm.miLayerP5.Checked := show; + end; + LAYER_ITEMS: + begin + MainForm.miLayer6.Checked := show; + MainForm.miLayerP6.Checked := show; + end; + LAYER_MONSTERS: + begin + MainForm.miLayer7.Checked := show; + MainForm.miLayerP7.Checked := show; + end; + LAYER_AREAS: + begin + MainForm.miLayer8.Checked := show; + MainForm.miLayerP8.Checked := show; + end; + LAYER_TRIGGERS: + begin + MainForm.miLayer9.Checked := show; + MainForm.miLayerP9.Checked := show; + end; + end; + + RemoveSelectFromObjects(); +end; + +procedure SwitchLayer(Layer: Byte); +begin + ShowLayer(Layer, not LayerEnabled[Layer]); +end; + +procedure SwitchMap(); +begin + ShowMap := not ShowMap; + MainForm.tbShowMap.Down := ShowMap; +end; + +procedure ShowEdges(); +begin + if drEdge[3] < 255 then + drEdge[3] := 255 + else + drEdge[3] := gAlphaEdge; +end; + +function SelectedTexture(): String; +begin + if MainForm.lbTextureList.ItemIndex <> -1 then + Result := MainForm.lbTextureList.Items[MainForm.lbTextureList.ItemIndex] + else + Result := ''; +end; + +function IsSpecialTextureSel(): Boolean; +begin + Result := (MainForm.lbTextureList.ItemIndex <> -1) and + IsSpecialTexture(MainForm.lbTextureList.Items[MainForm.lbTextureList.ItemIndex]); +end; + +function CopyBufferToString(var CopyBuf: TCopyRecArray): String; +var + i, j: Integer; + Res: String; + + procedure AddInt(x: Integer); + begin + Res := Res + IntToStr(x) + ' '; + end; + +begin + Result := ''; + + if Length(CopyBuf) = 0 then + Exit; + + Res := CLIPBOARD_SIG + ' '; + + for i := 0 to High(CopyBuf) do + begin + if (CopyBuf[i].ObjectType = OBJECT_PANEL) and + (CopyBuf[i].Panel = nil) then + Continue; + + // Тип объекта: + AddInt(CopyBuf[i].ObjectType); + Res := Res + '; '; + + // Свойства объекта: + case CopyBuf[i].ObjectType of + OBJECT_PANEL: + with CopyBuf[i].Panel^ do + begin + AddInt(PanelType); + AddInt(X); + AddInt(Y); + AddInt(Width); + AddInt(Height); + Res := Res + '"' + TextureName + '" '; + AddInt(Alpha); + AddInt(IfThen(Blending, 1, 0)); + end; + + OBJECT_ITEM: + with CopyBuf[i].Item do + begin + AddInt(ItemType); + AddInt(X); + AddInt(Y); + AddInt(IfThen(OnlyDM, 1, 0)); + AddInt(IfThen(Fall, 1, 0)); + end; + + OBJECT_MONSTER: + with CopyBuf[i].Monster do + begin + AddInt(MonsterType); + AddInt(X); + AddInt(Y); + AddInt(IfThen(Direction = D_LEFT, 1, 0)); + end; + + OBJECT_AREA: + with CopyBuf[i].Area do + begin + AddInt(AreaType); + AddInt(X); + AddInt(Y); + AddInt(IfThen(Direction = D_LEFT, 1, 0)); + end; + + OBJECT_TRIGGER: + with CopyBuf[i].Trigger do + begin + AddInt(TriggerType); + AddInt(X); + AddInt(Y); + AddInt(Width); + AddInt(Height); + AddInt(ActivateType); + AddInt(Key); + AddInt(IfThen(Enabled, 1, 0)); + AddInt(TexturePanel); + + for j := 0 to 127 do + AddInt(Data.Default[j]); + end; + end; + end; + + Result := Res; +end; + +procedure StringToCopyBuffer(Str: String; var CopyBuf: TCopyRecArray); +var + i, j, t: Integer; + + function GetNext(): String; + var + p: Integer; + + begin + if Str[1] = '"' then + begin + Delete(Str, 1, 1); + p := Pos('"', Str); + + if p = 0 then + begin + Result := Str; + Str := ''; + end + else + begin + Result := Copy(Str, 1, p-1); + Delete(Str, 1, p); + Str := Trim(Str); + end; + end + else + begin + p := Pos(' ', Str); + + if p = 0 then + begin + Result := Str; + Str := ''; + end + else + begin + Result := Copy(Str, 1, p-1); + Delete(Str, 1, p); + Str := Trim(Str); + end; + end; + end; + +begin + Str := Trim(Str); + + if GetNext() <> CLIPBOARD_SIG then + Exit; + + while Str <> '' do + begin + // Тип объекта: + t := StrToIntDef(GetNext(), 0); + + if (t < OBJECT_PANEL) or (t > OBJECT_TRIGGER) or + (GetNext() <> ';') then + begin // Что-то не то => пропускаем: + t := Pos(';', Str); + Delete(Str, 1, t); + Str := Trim(Str); + + Continue; + end; + + i := Length(CopyBuf); + SetLength(CopyBuf, i + 1); + + CopyBuf[i].ObjectType := t; + CopyBuf[i].Panel := nil; + + // Свойства объекта: + case t of + OBJECT_PANEL: + begin + New(CopyBuf[i].Panel); + + with CopyBuf[i].Panel^ do + begin + PanelType := StrToIntDef(GetNext(), PANEL_WALL); + X := StrToIntDef(GetNext(), 0); + Y := StrToIntDef(GetNext(), 0); + Width := StrToIntDef(GetNext(), 16); + Height := StrToIntDef(GetNext(), 16); + TextureName := GetNext(); + Alpha := StrToIntDef(GetNext(), 0); + Blending := (GetNext() = '1'); + end; + end; + + OBJECT_ITEM: + with CopyBuf[i].Item do + begin + ItemType := StrToIntDef(GetNext(), ITEM_MEDKIT_SMALL); + X := StrToIntDef(GetNext(), 0); + Y := StrToIntDef(GetNext(), 0); + OnlyDM := (GetNext() = '1'); + Fall := (GetNext() = '1'); + end; + + OBJECT_MONSTER: + with CopyBuf[i].Monster do + begin + MonsterType := StrToIntDef(GetNext(), MONSTER_DEMON); + X := StrToIntDef(GetNext(), 0); + Y := StrToIntDef(GetNext(), 0); + + if GetNext() = '1' then + Direction := D_LEFT + else + Direction := D_RIGHT; + end; + + OBJECT_AREA: + with CopyBuf[i].Area do + begin + AreaType := StrToIntDef(GetNext(), AREA_PLAYERPOINT1); + X := StrToIntDef(GetNext(), 0); + Y := StrToIntDef(GetNext(), 0); + if GetNext() = '1' then + Direction := D_LEFT + else + Direction := D_RIGHT; + end; + + OBJECT_TRIGGER: + with CopyBuf[i].Trigger do + begin + TriggerType := StrToIntDef(GetNext(), TRIGGER_EXIT); + X := StrToIntDef(GetNext(), 0); + Y := StrToIntDef(GetNext(), 0); + Width := StrToIntDef(GetNext(), 16); + Height := StrToIntDef(GetNext(), 16); + ActivateType := StrToIntDef(GetNext(), 0); + Key := StrToIntDef(GetNext(), 0); + Enabled := (GetNext() = '1'); + TexturePanel := StrToIntDef(GetNext(), 0); + + for j := 0 to 127 do + Data.Default[j] := StrToIntDef(GetNext(), 0); + end; + end; + end; +end; + +//---------------------------------------- +//Закончились вспомогательные процедуры +//---------------------------------------- + +procedure TMainForm.RefreshRecentMenu(); +var + i: Integer; + MI: TMenuItem; +begin +// Лишние запомненные карты: + while RecentFiles.Count > RecentCount do + RecentFiles.Delete(RecentFiles.Count-1); + +// Лишние строки меню: + while MainMenu.Items[0].Count > RECENT_FILES_MENU_START do + MainMenu.Items[0].Delete(MainMenu.Items[0].Count-1); + +// Отделение списка карт от строки "Выход": + if RecentFiles.Count > 0 then + begin + MI := TMenuItem.Create(MainMenu.Items[0]); + MI.Caption := '-'; + MainMenu.Items[0].Add(MI); + end; + +// Добавление в меню списка запомненных карт: + for i := 0 to RecentFiles.Count-1 do + begin + MI := TMenuItem.Create(MainMenu.Items[0]); + MI.Caption := IntToStr(i+1) + ' ' + RecentFiles[i]; + MI.OnClick := aRecentFileExecute; + MainMenu.Items[0].Add(MI); + end; +end; + +procedure TMainForm.aRecentFileExecute(Sender: TObject); +var + n, pw: Integer; + s, fn: String; +begin + s := LowerCase((Sender as TMenuItem).Caption); + Delete(s, Pos('&', s), 1); + s := Trim(Copy(s, 1, 2)); + n := StrToIntDef(s, 0) - 1; + + if (n < 0) or (n >= RecentFiles.Count) then + Exit; + + s := RecentFiles[n]; + pw := Pos('.wad:\', LowerCase(s)); + + if pw > 0 then + begin // Map name included + fn := Copy(s, 1, pw + 3); + Delete(s, 1, pw + 5); + if (FileExists(fn)) then + OpenMap(fn, s); + end + else // Only wad name + if (FileExists(s)) then + OpenMap(s, ''); +end; + +procedure TMainForm.aEditorOptionsExecute(Sender: TObject); +begin + OptionsForm.ShowModal(); +end; + +procedure TMainForm.FormCreate(Sender: TObject); +var + PixelFormat: GLuint; + pfd: TPIXELFORMATDESCRIPTOR; + config: TConfig; + i: Integer; + s: String; +begin + Randomize(); + + EditorDir := ExtractFilePath(Application.ExeName); + + e_InitLog(EditorDir+'Editor.log', WM_NEWFILE); + + e_WriteLog('Init OpenGL', MSG_NOTIFY); + + InitOpenGL(); + hDC := GetDC(RenderPanel.Handle); + + FillChar(pfd, SizeOf(pfd), 0); + with pfd do + begin + nSize := SizeOf(pfd); + nVersion := 1; + dwFlags := PFD_DRAW_TO_WINDOW or PFD_SUPPORT_OPENGL or PFD_DOUBLEBUFFER; + dwLayerMask := PFD_MAIN_PLANE; + iPixelType := PFD_TYPE_RGBA; + cColorBits := 24; + cDepthBits := 32; + iLayerType := PFD_MAIN_PLANE; + end; + PixelFormat := ChoosePixelFormat (hDC, @pfd); + SetPixelFormat(hDC, PixelFormat, @pfd); + + hRC := wglCreateContext(hDC); + ActivateRenderingContext(hDC, hRC); + + e_InitGL(False); + + gEditorFont := e_SimpleFontCreate('Arial Cyr', 12, FW_BOLD, hDC); + + slInvalidTextures := TStringList.Create; + + e_WriteLog('Loading data', MSG_NOTIFY); + LoadData(); + + ShowLayer(LAYER_BACK, True); + ShowLayer(LAYER_WALLS, True); + ShowLayer(LAYER_FOREGROUND, True); + ShowLayer(LAYER_STEPS, True); + ShowLayer(LAYER_WATER, True); + ShowLayer(LAYER_ITEMS, True); + ShowLayer(LAYER_MONSTERS, True); + ShowLayer(LAYER_AREAS, True); + ShowLayer(LAYER_TRIGGERS, True); + + ClearMap(); + + FormCaption := MainForm.Caption; + OpenedMap := ''; + OpenedWAD := ''; + + config := TConfig.CreateFile(EditorDir+'\Editor.cfg'); + + if config.ReadBool('Editor', 'Maximize', False) then + WindowState := wsMaximized; + ShowMap := config.ReadBool('Editor', 'Minimap', False); + PanelProps.Width := config.ReadInt('Editor', 'PanelProps', PanelProps.ClientWidth); + Splitter1.Left := PanelProps.Left; + PanelObjs.Height := config.ReadInt('Editor', 'PanelObjs', PanelObjs.ClientHeight); + Splitter2.Top := PanelObjs.Top; + StatusBar.Top := PanelObjs.BoundsRect.Bottom; + DotEnable := config.ReadBool('Editor', 'DotEnable', True); + DotColor := config.ReadInt('Editor', 'DotColor', $FFFFFF); + DotStepOne := config.ReadInt('Editor', 'DotStepOne', 16); + DotStepTwo := config.ReadInt('Editor', 'DotStepTwo', 8); + DotStep := config.ReadInt('Editor', 'DotStep', DotStepOne); + DrawTexturePanel := config.ReadBool('Editor', 'DrawTexturePanel', True); + DrawPanelSize := config.ReadBool('Editor', 'DrawPanelSize', True); + BackColor := config.ReadInt('Editor', 'BackColor', $7F6040); + PreviewColor := config.ReadInt('Editor', 'PreviewColor', $00FF00); + gColorEdge := config.ReadInt('Editor', 'EdgeColor', COLOR_EDGE); + gAlphaEdge := config.ReadInt('Editor', 'EdgeAlpha', ALPHA_EDGE); + if gAlphaEdge = 255 then + gAlphaEdge := ALPHA_EDGE; + drEdge[0] := GetRValue(gColorEdge); + drEdge[1] := GetGValue(gColorEdge); + drEdge[2] := GetBValue(gColorEdge); + if not config.ReadBool('Editor', 'EdgeShow', True) then + drEdge[3] := 255 + else + drEdge[3] := gAlphaEdge; + gAlphaTriggerLine := config.ReadInt('Editor', 'LineAlpha', ALPHA_LINE); + if gAlphaTriggerLine = 255 then + gAlphaTriggerLine := ALPHA_LINE; + gAlphaTriggerArea := config.ReadInt('Editor', 'TriggerAlpha', ALPHA_AREA); + if gAlphaTriggerArea = 255 then + gAlphaTriggerArea := ALPHA_AREA; + if config.ReadInt('Editor', 'Scale', 0) = 1 then + Scale := 2 + else + Scale := 1; + if config.ReadInt('Editor', 'DotSize', 0) = 1 then + DotSize := 2 + else + DotSize := 1; + OpenDialog.InitialDir := config.ReadStr('Editor', 'LastOpenDir', EditorDir); + SaveDialog.InitialDir := config.ReadStr('Editor', 'LastSaveDir', EditorDir); + + s := config.ReadStr('Editor', 'Language', ''); + gLanguage := s; + + RecentCount := config.ReadInt('Editor', 'RecentCount', 5); + if RecentCount > 10 then + RecentCount := 10; + if RecentCount < 2 then + RecentCount := 2; + + RecentFiles := TStringList.Create(); + for i := 0 to RecentCount-1 do + begin + s := config.ReadStr('RecentFiles', IntToStr(i+1), ''); + if s <> '' then + RecentFiles.Add(s); + end; + RefreshRecentMenu(); + + config.Free(); + + tbShowMap.Down := ShowMap; + tbGridOn.Down := DotEnable; + pcObjects.ActivePageIndex := 0; + Application.Title := _lc[I_EDITOR_TITLE]; + + Application.OnIdle := OnIdle; +end; + +procedure TMainForm.Draw(); +var + ps: TPaintStruct; + x, y: Integer; + a, b: Integer; + ID: DWORD; + Width, Height: Word; + Rect: TRectWH; + ObjCount: Word; + aX, aY, aX2, aY2, XX, ScaleSz: Integer; +begin + BeginPaint(Handle, ps); + e_BeginRender(); + + e_Clear(GL_COLOR_BUFFER_BIT, + GetRValue(BackColor)/255, + GetGValue(BackColor)/255, + GetBValue(BackColor)/255); + + DrawMap(); + + ObjCount := SelectedObjectCount(); + +// Обводим выделенные объекты красной рамкой: + if ObjCount > 0 then + begin + for a := 0 to High(SelectedObjects) do + if SelectedObjects[a].Live then + begin + Rect := ObjectGetRect(SelectedObjects[a].ObjectType, SelectedObjects[a].ID); + + with Rect do + begin + e_DrawQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 255, 0, 0); + + // Рисуем точки изменения размеров: + if (ObjCount = 1) and + (SelectedObjects[GetFirstSelected].ObjectType in [OBJECT_PANEL, OBJECT_TRIGGER]) then + begin + e_DrawPoint(5, X+MapOffset.X, Y+MapOffset.Y+(Height div 2), 255, 255, 255); + e_DrawPoint(5, X+MapOffset.X+Width-1, Y+MapOffset.Y+(Height div 2), 255, 255, 255); + e_DrawPoint(5, X+MapOffset.X+(Width div 2), Y+MapOffset.Y, 255, 255, 255); + e_DrawPoint(5, X+MapOffset.X+(Width div 2), Y+MapOffset.Y+Height-1, 255, 255, 255); + + e_DrawPoint(3, X+MapOffset.X, Y+MapOffset.Y+(Height div 2), 255, 0, 0); + e_DrawPoint(3, X+MapOffset.X+Width-1, Y+MapOffset.Y+(Height div 2), 255, 0, 0); + e_DrawPoint(3, X+MapOffset.X+(Width div 2), Y+MapOffset.Y, 255, 0, 0); + e_DrawPoint(3, X+MapOffset.X+(Width div 2), Y+MapOffset.Y+Height-1, 255, 0, 0); + end; + end; + end; + end; + +// Рисуем сетку: + if DotEnable and (not PreviewMode) then + begin + if DotSize = 2 then + a := -1 + else + a := 0; + + for x := 0 to (RenderPanel.Width div DotStep) do + for y := 0 to (RenderPanel.Height div DotStep) do + e_DrawPoint(DotSize, x*DotStep + a, y*DotStep + a, + GetRValue(DotColor), + GetGValue(DotColor), + GetBValue(DotColor)); + end; + +// Превью текстуры: + if (lbTextureList.ItemIndex <> -1) and (cbPreview.Checked) and + (not IsSpecialTextureSel()) and (not PreviewMode) then + begin + if not g_GetTexture(SelectedTexture(), ID) then + g_GetTexture('NOTEXTURE', ID); + g_GetTextureSizeByID(ID, Width, Height); + e_DrawFillQuad(RenderPanel.Width-Width-2, RenderPanel.Height-Height-2, + RenderPanel.Width-1, RenderPanel.Height-1, + GetRValue(PreviewColor), GetGValue(PreviewColor), GetBValue(PreviewColor), 0); + e_Draw(ID, RenderPanel.Width-Width-1, RenderPanel.Height-Height-1, 0, True, False); + end; + +// Подсказка при выборе точки Телепорта: + if SelectFlag = SELECTFLAG_TELEPORT then + begin + with gTriggers[SelectedObjects[GetFirstSelected()].ID] do + if Data.d2d_teleport then + e_DrawLine(2, MousePos.X-16, MousePos.Y-1, + MousePos.X+16, MousePos.Y-1, + 0, 0, 255) + else + e_DrawQuad(MousePos.X, MousePos.Y, MousePos.X+AreaSize[AREA_DMPOINT].Width-1, + MousePos.Y+AreaSize[AREA_DMPOINT].Height-1, 255, 255, 255); + + e_DrawFillQuad(MousePos.X, MousePos.Y, MousePos.X+180, MousePos.Y+18, 192, 192, 192, 127); + e_DrawQuad(MousePos.X, MousePos.Y, MousePos.X+180, MousePos.Y+18, 255, 255, 255); + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+14, PChar(_lc[I_HINT_TELEPORT]), gEditorFont, 0, 0, 0); + end; + +// Подсказка при выборе точки появления: + if SelectFlag = SELECTFLAG_SPAWNPOINT then + begin + e_DrawLine(2, MousePos.X-16, MousePos.Y-1, + MousePos.X+16, MousePos.Y-1, + 0, 0, 255); + e_DrawFillQuad(MousePos.X, MousePos.Y, MousePos.X+180, MousePos.Y+18, 192, 192, 192, 127); + e_DrawQuad(MousePos.X, MousePos.Y, MousePos.X+180, MousePos.Y+18, 255, 255, 255); + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+14, PChar(_lc[I_HINT_SPAWN]), gEditorFont, 0, 0, 0); + end; + +// Подсказка при выборе панели двери: + if SelectFlag = SELECTFLAG_DOOR then + begin + e_DrawFillQuad(MousePos.X, MousePos.Y, MousePos.X+180, MousePos.Y+18, 192, 192, 192, 127); + e_DrawQuad(MousePos.X, MousePos.Y, MousePos.X+180, MousePos.Y+18, 255, 255, 255); + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+14, PChar(_lc[I_HINT_PANEL_DOOR]), gEditorFont, 0, 0, 0); + end; + +// Подсказка при выборе панели с текстурой: + if SelectFlag = SELECTFLAG_TEXTURE then + begin + e_DrawFillQuad(MousePos.X, MousePos.Y, MousePos.X+196, MousePos.Y+18, 192, 192, 192, 127); + e_DrawQuad(MousePos.X, MousePos.Y, MousePos.X+196, MousePos.Y+18, 255, 255, 255); + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+14, PChar(_lc[I_HINT_PANEL_TEXTURE]), gEditorFont, 0, 0, 0); + end; + +// Подсказка при выборе панели индикации выстрела: + if SelectFlag = SELECTFLAG_SHOTPANEL then + begin + e_DrawFillQuad(MousePos.X, MousePos.Y, MousePos.X+316, MousePos.Y+18, 192, 192, 192, 127); + e_DrawQuad(MousePos.X, MousePos.Y, MousePos.X+316, MousePos.Y+18, 255, 255, 255); + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+14, PChar(_lc[I_HINT_PANEL_SHOT]), gEditorFont, 0, 0, 0); + end; + +// Подсказка при выборе панели лифта: + if SelectFlag = SELECTFLAG_LIFT then + begin + e_DrawFillQuad(MousePos.X, MousePos.Y, MousePos.X+180, MousePos.Y+18, 192, 192, 192, 127); + e_DrawQuad(MousePos.X, MousePos.Y, MousePos.X+180, MousePos.Y+18, 255, 255, 255); + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+14, PChar(_lc[I_HINT_PANEL_LIFT]), gEditorFont, 0, 0, 0); + end; + +// Подсказка при выборе монстра: + if SelectFlag = SELECTFLAG_MONSTER then + begin + e_DrawFillQuad(MousePos.X, MousePos.Y, MousePos.X+120, MousePos.Y+18, 192, 192, 192, 127); + e_DrawQuad(MousePos.X, MousePos.Y, MousePos.X+120, MousePos.Y+18, 255, 255, 255); + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+14, PChar(_lc[I_HINT_MONSTER]), gEditorFont, 0, 0, 0); + end; + +// Подсказка при выборе области воздействия: + if DrawPressRect then + begin + e_DrawFillQuad(MousePos.X, MousePos.Y, MousePos.X+204, MousePos.Y+18, 192, 192, 192, 127); + e_DrawQuad(MousePos.X, MousePos.Y, MousePos.X+204, MousePos.Y+18, 255, 255, 255); + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+14, PChar(_lc[I_HINT_EXT_AREA]), gEditorFont, 0, 0, 0); + end; + +// Рисуем текстуры, если чертим панель: + if (MouseAction = MOUSEACTION_DRAWPANEL) and (DrawTexturePanel) and + (lbTextureList.ItemIndex <> -1) and (DrawRect <> nil) and + (lbPanelType.ItemIndex in [0..8]) and not IsSpecialTextureSel() then + begin + if not g_GetTexture(SelectedTexture(), ID) then + g_GetTexture('NOTEXTURE', ID); + g_GetTextureSizeByID(ID, Width, Height); + with DrawRect^ do + e_DrawFill(ID, Min(Left, Right), Min(Top, Bottom), Abs(Right-Left) div Width, + Abs(Bottom-Top) div Height, 0, True, False); + end; + +// Прямоугольник выделения: + if DrawRect <> nil then + with DrawRect^ do + e_DrawQuad(Left, Top, Right-1, Bottom-1, 255, 255, 255); + +// Чертим мышью панель/триггер или меняем мышью их размер: + if (MouseAction in [MOUSEACTION_DRAWPANEL, MOUSEACTION_DRAWTRIGGER, MOUSEACTION_RESIZE]) and + (DrawPanelSize) then + begin + e_DrawFillQuad(MousePos.X, MousePos.Y, MousePos.X+88, MousePos.Y+33, 192, 192, 192, 127); + e_DrawQuad(MousePos.X, MousePos.Y, MousePos.X+88, MousePos.Y+33, 255, 255, 255); + + if MouseAction in [MOUSEACTION_DRAWPANEL, MOUSEACTION_DRAWTRIGGER] then + begin // Чертим новый + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+14, PChar(Format(_lc[I_HINT_WIDTH], + [Abs(MousePos.X-MouseLDownPos.X)])), gEditorFont, 0, 0, 0); + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+28, PChar(Format(_lc[I_HINT_HEIGHT], + [Abs(MousePos.Y-MouseLDownPos.Y)])), gEditorFont, 0, 0, 0); + end + else // Растягиваем существующий + if SelectedObjects[GetFirstSelected].ObjectType in [OBJECT_PANEL, OBJECT_TRIGGER] then + begin + if SelectedObjects[GetFirstSelected].ObjectType = OBJECT_PANEL then + begin + Width := gPanels[SelectedObjects[GetFirstSelected].ID].Width; + Height := gPanels[SelectedObjects[GetFirstSelected].ID].Height; + end + else + begin + Width := gTriggers[SelectedObjects[GetFirstSelected].ID].Width; + Height := gTriggers[SelectedObjects[GetFirstSelected].ID].Height; + end; + + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+14, PChar(Format(_lc[I_HINT_WIDTH], [Width])), + gEditorFont, 0, 0, 0); + e_SimpleFontPrint(MousePos.X+8, MousePos.Y+28, PChar(Format(_lc[I_HINT_HEIGHT], [Height])), + gEditorFont, 0, 0, 0); + end; + end; + +// Ближайшая к курсору мыши точка на сетке: + e_DrawPoint(3, MousePos.X, MousePos.Y, 0, 0, 255); + +// Мини-карта: + if ShowMap then + begin + // Сколько пикселов карты в 1 пикселе мини-карты: + ScaleSz := 16 div Scale; + // Размеры мини-карты: + aX := max(gMapInfo.Width div ScaleSz, 1); + aY := max(gMapInfo.Height div ScaleSz, 1); + // X-координата на RenderPanel нулевой x-координаты карты: + XX := RenderPanel.Width - aX - 1; + // Рамка карты: + e_DrawFillQuad(XX-1, 0, RenderPanel.Width-1, aY+1, 0, 0, 0, 0); + e_DrawQuad(XX-1, 0, RenderPanel.Width-1, aY+1, 197, 197, 197); + + if gPanels <> nil then + begin + // Рисуем панели: + for a := 0 to High(gPanels) do + with gPanels[a] do + if PanelType <> 0 then + begin + // Левый верхний угол: + aX := XX + (X div ScaleSz); + aY := 1 + (Y div ScaleSz); + // Размеры: + aX2 := max(Width div ScaleSz, 1); + aY2 := max(Height div ScaleSz, 1); + // Правый нижний угол: + aX2 := aX + aX2 - 1; + aY2 := aY + aY2 - 1; + + case PanelType of + PANEL_WALL: e_DrawFillQuad(aX, aY, aX2, aY2, 208, 208, 208, 0); + PANEL_WATER: e_DrawFillQuad(aX, aY, aX2, aY2, 0, 0, 192, 0); + PANEL_ACID1: e_DrawFillQuad(aX, aY, aX2, aY2, 0, 176, 0, 0); + PANEL_ACID2: e_DrawFillQuad(aX, aY, aX2, aY2, 176, 0, 0, 0); + PANEL_STEP: e_DrawFillQuad(aX, aY, aX2, aY2, 128, 128, 128, 0); + PANEL_LIFTUP: e_DrawFillQuad(aX, aY, aX2, aY2, 116, 72, 36, 0); + PANEL_LIFTDOWN: e_DrawFillQuad(aX, aY, aX2, aY2, 116, 124, 96, 0); + PANEL_LIFTLEFT: e_DrawFillQuad(aX, aY, aX2, aY2, 200, 80, 4, 0); + PANEL_LIFTRIGHT: e_DrawFillQuad(aX, aY, aX2, aY2, 252, 140, 56, 0); + PANEL_OPENDOOR: e_DrawFillQuad(aX, aY, aX2, aY2, 100, 220, 92, 0); + PANEL_CLOSEDOOR: e_DrawFillQuad(aX, aY, aX2, aY2, 212, 184, 64, 0); + PANEL_BLOCKMON: e_DrawFillQuad(aX, aY, aX2, aY2, 192, 0, 192, 0); + end; + end; + + // Рисуем красным выделенные панели: + if SelectedObjects <> nil then + for b := 0 to High(SelectedObjects) do + with SelectedObjects[b] do + if Live and (ObjectType = OBJECT_PANEL) then + with gPanels[SelectedObjects[b].ID] do + if PanelType and not(PANEL_BACK or PANEL_FORE) <> 0 then + begin + // Левый верхний угол: + aX := XX + (X div ScaleSz); + aY := 1 + (Y div ScaleSz); + // Размеры: + aX2 := max(Width div ScaleSz, 1); + aY2 := max(Height div ScaleSz, 1); + // Правый нижний угол: + aX2 := aX + aX2 - 1; + aY2 := aY + aY2 - 1; + + e_DrawFillQuad(aX, aY, aX2, aY2, 255, 0, 0, 0) + end; + end; + + if (gMapInfo.Width > RenderPanel.Width) or + (gMapInfo.Height > RenderPanel.Height) then + begin + // Окно, показывающее текущее положение экрана на карте: + // Размеры окна: + x := max(min(RenderPanel.Width, gMapInfo.Width) div ScaleSz, 1); + y := max(min(RenderPanel.Height, gMapInfo.Height) div ScaleSz, 1); + // Левый верхний угол: + aX := XX + ((-MapOffset.X) div ScaleSz); + aY := 1 + ((-MapOffset.Y) div ScaleSz); + // Правый нижний угол: + aX2 := aX + x - 1; + aY2 := aY + y - 1; + + e_DrawFillQuad(aX, aY, aX2, aY2, 127, 192, 127, 127, B_BLEND); + e_DrawQuad(aX, aY, aX2, aY2, 255, 0, 0); + end; + end; // Мини-карта + + e_EndRender(); + SwapBuffers(hDC); + EndPaint(Handle, ps); +end; + +procedure TMainForm.FormResize(Sender: TObject); +begin + e_SetViewPort(0, 0, RenderPanel.Width, RenderPanel.Height); + + if gMapInfo.Width >= RenderPanel.Width then + sbHorizontal.Max := Normalize16(gMapInfo.Width-RenderPanel.Width+16) + else + sbHorizontal.Max := 0; + + if gMapInfo.Height >= RenderPanel.Height then + sbVertical.Max := Normalize16(gMapInfo.Height-RenderPanel.Height+16) + else + sbVertical.Max := 0; + + MapOffset.X := -Normalize16(sbHorizontal.Position); + MapOffset.Y := -Normalize16(sbVertical.Position); +end; + +procedure SelectNextObject(X, Y: Integer; ObjectType: Byte; ID: DWORD); +var + j, j_max: Integer; + res: Boolean; +begin + j_max := 0; // shut up compiler + case ObjectType of + OBJECT_PANEL: + begin + res := (gPanels <> nil) and + PanelInShownLayer(gPanels[ID].PanelType) and + g_CollidePoint(X, Y, gPanels[ID].X, gPanels[ID].Y, + gPanels[ID].Width, + gPanels[ID].Height); + j_max := Length(gPanels) - 1; + end; + + OBJECT_ITEM: + begin + res := (gItems <> nil) and + LayerEnabled[LAYER_ITEMS] and + g_CollidePoint(X, Y, gItems[ID].X, gItems[ID].Y, + ItemSize[gItems[ID].ItemType][0], + ItemSize[gItems[ID].ItemType][1]); + j_max := Length(gItems) - 1; + end; + + OBJECT_MONSTER: + begin + res := (gMonsters <> nil) and + LayerEnabled[LAYER_MONSTERS] and + g_CollidePoint(X, Y, gMonsters[ID].X, gMonsters[ID].Y, + MonsterSize[gMonsters[ID].MonsterType].Width, + MonsterSize[gMonsters[ID].MonsterType].Height); + j_max := Length(gMonsters) - 1; + end; + + OBJECT_AREA: + begin + res := (gAreas <> nil) and + LayerEnabled[LAYER_AREAS] and + g_CollidePoint(X, Y, gAreas[ID].X, gAreas[ID].Y, + AreaSize[gAreas[ID].AreaType].Width, + AreaSize[gAreas[ID].AreaType].Height); + j_max := Length(gAreas) - 1; + end; + + OBJECT_TRIGGER: + begin + res := (gTriggers <> nil) and + LayerEnabled[LAYER_TRIGGERS] and + g_CollidePoint(X, Y, gTriggers[ID].X, gTriggers[ID].Y, + gTriggers[ID].Width, + gTriggers[ID].Height); + j_max := Length(gTriggers) - 1; + end; + + else + res := False; + end; + + if not res then + Exit; + +// Перебор ID: от ID-1 до 0; потом от High до ID+1: + j := ID; + + while True do + begin + Dec(j); + + if j < 0 then + j := j_max; + if j = Integer(ID) then + Break; + + case ObjectType of + OBJECT_PANEL: + res := PanelInShownLayer(gPanels[j].PanelType) and + g_CollidePoint(X, Y, gPanels[j].X, gPanels[j].Y, + gPanels[j].Width, + gPanels[j].Height); + OBJECT_ITEM: + res := (gItems[j].ItemType <> ITEM_NONE) and + g_CollidePoint(X, Y, gItems[j].X, gItems[j].Y, + ItemSize[gItems[j].ItemType][0], + ItemSize[gItems[j].ItemType][1]); + OBJECT_MONSTER: + res := (gMonsters[j].MonsterType <> MONSTER_NONE) and + g_CollidePoint(X, Y, gMonsters[j].X, gMonsters[j].Y, + MonsterSize[gMonsters[j].MonsterType].Width, + MonsterSize[gMonsters[j].MonsterType].Height); + OBJECT_AREA: + res := (gAreas[j].AreaType <> AREA_NONE) and + g_CollidePoint(X, Y, gAreas[j].X, gAreas[j].Y, + AreaSize[gAreas[j].AreaType].Width, + AreaSize[gAreas[j].AreaType].Height); + OBJECT_TRIGGER: + res := (gTriggers[j].TriggerType <> TRIGGER_NONE) and + g_CollidePoint(X, Y, gTriggers[j].X, gTriggers[j].Y, + gTriggers[j].Width, + gTriggers[j].Height); + else + res := False; + end; + + if res then + begin + SetLength(SelectedObjects, 1); + + SelectedObjects[0].ObjectType := ObjectType; + SelectedObjects[0].ID := j; + SelectedObjects[0].Live := True; + + FillProperty(); + Break; + end; + end; +end; + +procedure TMainForm.RenderPanelMouseDown(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var + i: Integer; + Rect: TRectWH; + c1, c2, c3, c4: Boolean; + item: TItem; + area: TArea; + monster: TMonster; + IDArray: DWArray; +begin + MainForm.ActiveControl := RenderPanel; + RenderPanel.SetFocus(); + + RenderPanelMouseMove(RenderPanel, Shift, X, Y); + + if Button = mbLeft then // Left Mouse Button + begin + // Двигаем карту с помощью мыши и мини-карты: + if ShowMap and + g_CollidePoint(X, Y, + RenderPanel.Width-max(gMapInfo.Width div (16 div Scale), 1)-1, + 1, + max(gMapInfo.Width div (16 div Scale), 1), + max(gMapInfo.Height div (16 div Scale), 1) ) then + begin + MoveMap(X, Y); + MouseAction := MOUSEACTION_MOVEMAP; + end + else // Ставим предмет/монстра/область: + if (pcObjects.ActivePageIndex in [1, 2, 3]) and + (not (ssShift in Shift)) then + begin + case pcObjects.ActivePageIndex of + 1: + if lbItemList.ItemIndex = -1 then + ErrorMessageBox(_lc[I_MSG_CHOOSE_ITEM]) + else + begin + item.ItemType := lbItemList.ItemIndex + ITEM_MEDKIT_SMALL; + if item.ItemType >= ITEM_WEAPON_KASTET then + item.ItemType := item.ItemType + 2; + item.X := MousePos.X-MapOffset.X; + item.Y := MousePos.Y-MapOffset.Y; + + if not (ssCtrl in Shift) then + begin + item.X := item.X - (ItemSize[item.ItemType][0] div 2); + item.Y := item.Y - ItemSize[item.ItemType][1]; + end; + + item.OnlyDM := cbOnlyDM.Checked; + item.Fall := cbFall.Checked; + Undo_Add(OBJECT_ITEM, AddItem(item)); + end; + 2: + if lbMonsterList.ItemIndex = -1 then + ErrorMessageBox(_lc[I_MSG_CHOOSE_MONSTER]) + else + begin + monster.MonsterType := lbMonsterList.ItemIndex + MONSTER_DEMON; + monster.X := MousePos.X-MapOffset.X; + monster.Y := MousePos.Y-MapOffset.Y; + + if not (ssCtrl in Shift) then + begin + monster.X := monster.X - (MonsterSize[monster.MonsterType].Width div 2); + monster.Y := monster.Y - MonsterSize[monster.MonsterType].Height; + end; + + if rbMonsterLeft.Checked then + monster.Direction := D_LEFT + else + monster.Direction := D_RIGHT; + Undo_Add(OBJECT_MONSTER, AddMonster(monster)); + end; + 3: + if lbAreasList.ItemIndex = -1 then + ErrorMessageBox(_lc[I_MSG_CHOOSE_AREA]) + else + if (lbAreasList.ItemIndex + 1) <> AREA_DOMFLAG then + begin + area.AreaType := lbAreasList.ItemIndex + AREA_PLAYERPOINT1; + area.X := MousePos.X-MapOffset.X; + area.Y := MousePos.Y-MapOffset.Y; + + if not (ssCtrl in Shift) then + begin + area.X := area.X - (AreaSize[area.AreaType].Width div 2); + area.Y := area.Y - AreaSize[area.AreaType].Height; + end; + + if rbAreaLeft.Checked then + area.Direction := D_LEFT + else + area.Direction := D_RIGHT; + Undo_Add(OBJECT_AREA, AddArea(area)); + end; + end; + end + else + begin + i := GetFirstSelected(); + + // Выбираем объект под текущим: + if (SelectedObjects <> nil) and + (ssShift in Shift) and (i >= 0) and + (SelectedObjects[i].Live) then + begin + if SelectedObjectCount() = 1 then + SelectNextObject(X-MapOffset.X, Y-MapOffset.Y, + SelectedObjects[i].ObjectType, + SelectedObjects[i].ID); + end + else + begin + // Рисуем область триггера "Расширитель": + if DrawPressRect and (i >= 0) and + (SelectedObjects[i].ObjectType = OBJECT_TRIGGER) and + (gTriggers[SelectedObjects[i].ID].TriggerType in + [TRIGGER_PRESS, TRIGGER_ON, TRIGGER_OFF, TRIGGER_ONOFF]) then + MouseAction := MOUSEACTION_DRAWPRESS + else // Рисуем панель: + if pcObjects.ActivePageIndex = 0 then + begin + if (lbPanelType.ItemIndex >= 0) then + MouseAction := MOUSEACTION_DRAWPANEL + end + else // Рисуем триггер: + if (lbTriggersList.ItemIndex >= 0) then + begin + MouseAction := MOUSEACTION_DRAWTRIGGER; + end; + end; + end; + end; // if Button = mbLeft + + if Button = mbRight then // Right Mouse Button + begin + // Клик по мини-карте: + if ShowMap and + g_CollidePoint(X, Y, + RenderPanel.Width-max(gMapInfo.Width div (16 div Scale), 1)-1, + 1, + max(gMapInfo.Width div (16 div Scale), 1), + max(gMapInfo.Height div (16 div Scale), 1) ) then + begin + MouseAction := MOUSEACTION_NOACTION; + end + else // Нужно что-то выбрать мышью: + if SelectFlag <> SELECTFLAG_NONE then + begin + case SelectFlag of + SELECTFLAG_TELEPORT: + // Точку назначения телепортации: + with gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].Data.TargetPoint do + begin + X := MousePos.X-MapOffset.X; + Y := MousePos.Y-MapOffset.Y; + end; + + SELECTFLAG_SPAWNPOINT: + // Точку создания монстра: + with gTriggers[SelectedObjects[GetFirstSelected()].ID] do + if TriggerType = TRIGGER_SPAWNMONSTER then + begin + Data.MonPos.X := MousePos.X-MapOffset.X; + Data.MonPos.Y := MousePos.Y-MapOffset.Y; + end + else if TriggerType = TRIGGER_SPAWNITEM then + begin // Точка создания предмета: + Data.ItemPos.X := MousePos.X-MapOffset.X; + Data.ItemPos.Y := MousePos.Y-MapOffset.Y; + end + else if TriggerType = TRIGGER_SHOT then + begin // Точка создания выстрела: + Data.ShotPos.X := MousePos.X-MapOffset.X; + Data.ShotPos.Y := MousePos.Y-MapOffset.Y; + end; + + SELECTFLAG_DOOR: + // Дверь: + begin + IDArray := ObjectInRect(X-MapOffset.X, + Y-MapOffset.Y, + 2, 2, OBJECT_PANEL, True); + if IDArray <> nil then + begin + for i := 0 to High(IDArray) do + if (gPanels[IDArray[i]].PanelType = PANEL_OPENDOOR) or + (gPanels[IDArray[i]].PanelType = PANEL_CLOSEDOOR) then + begin + gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].Data.PanelID := IDArray[i]; + Break; + end; + end + else + gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].Data.PanelID := -1; + end; + + SELECTFLAG_TEXTURE: + // Панель с текстурой: + begin + IDArray := ObjectInRect(X-MapOffset.X, + Y-MapOffset.Y, + 2, 2, OBJECT_PANEL, True); + if IDArray <> nil then + begin + for i := 0 to High(IDArray) do + if ((gPanels[IDArray[i]].PanelType in + [PANEL_WALL, PANEL_BACK, PANEL_FORE, + PANEL_WATER, PANEL_ACID1, PANEL_ACID2, + PANEL_STEP]) or + (gPanels[IDArray[i]].PanelType = PANEL_OPENDOOR) or + (gPanels[IDArray[i]].PanelType = PANEL_CLOSEDOOR)) and + (gPanels[IDArray[i]].TextureName <> '') then + begin + gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].TexturePanel := IDArray[i]; + Break; + end; + end + else + gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].TexturePanel := -1; + end; + + SELECTFLAG_LIFT: + // Лифт: + begin + IDArray := ObjectInRect(X-MapOffset.X, + Y-MapOffset.Y, + 2, 2, OBJECT_PANEL, True); + if IDArray <> nil then + begin + for i := 0 to High(IDArray) do + if (gPanels[IDArray[i]].PanelType = PANEL_LIFTUP) or + (gPanels[IDArray[i]].PanelType = PANEL_LIFTDOWN) or + (gPanels[IDArray[i]].PanelType = PANEL_LIFTLEFT) or + (gPanels[IDArray[i]].PanelType = PANEL_LIFTRIGHT) then + begin + gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].Data.PanelID := IDArray[i]; + Break; + end; + end + else + gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].Data.PanelID := -1; + end; + + SELECTFLAG_MONSTER: + // Монстра: + begin + IDArray := ObjectInRect(X-MapOffset.X, + Y-MapOffset.Y, + 2, 2, OBJECT_MONSTER, False); + if IDArray <> nil then + gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].Data.MonsterID := IDArray[0]+1 + else + gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].Data.MonsterID := 0; + end; + + SELECTFLAG_SHOTPANEL: + // Панель индикации выстрела: + begin + if gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].TriggerType = TRIGGER_SHOT then + begin + IDArray := ObjectInRect(X-MapOffset.X, + Y-MapOffset.Y, + 2, 2, OBJECT_PANEL, True); + if IDArray <> nil then + begin + for i := 0 to High(IDArray) do + if ((gPanels[IDArray[i]].PanelType in + [PANEL_WALL, PANEL_BACK, PANEL_FORE, + PANEL_WATER, PANEL_ACID1, PANEL_ACID2, + PANEL_STEP]) or + (gPanels[IDArray[i]].PanelType = PANEL_OPENDOOR) or + (gPanels[IDArray[i]].PanelType = PANEL_CLOSEDOOR)) and + (gPanels[IDArray[i]].TextureName <> '') then + begin + gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].Data.ShotPanelID := IDArray[i]; + Break; + end; + end + else + gTriggers[SelectedObjects[ + GetFirstSelected() ].ID].Data.ShotPanelID := -1; + end; + end; + end; + + SelectFlag := SELECTFLAG_SELECTED; + end + else // if SelectFlag <> SELECTFLAG_NONE... + begin + // Что уже выбрано и не нажат Ctrl: + if (SelectedObjects <> nil) and + (not (ssCtrl in Shift)) then + for i := 0 to High(SelectedObjects) do + with SelectedObjects[i] do + if Live then + begin + if (ObjectType in [OBJECT_PANEL, OBJECT_TRIGGER]) and + (SelectedObjectCount() = 1) then + begin + Rect := ObjectGetRect(ObjectType, ID); + + c1 := g_Collide(X-MapOffset.X-1, Y-MapOffset.Y-1, 2, 2, + Rect.X-2, Rect.Y+(Rect.Height div 2)-2, 4, 4); + c2 := g_Collide(X-MapOffset.X-1, Y-MapOffset.Y-1, 2, 2, + Rect.X+Rect.Width-3, Rect.Y+(Rect.Height div 2)-2, 4, 4); + c3 := g_Collide(X-MapOffset.X-1, Y-MapOffset.Y-1, 2, 2, + Rect.X+(Rect.Width div 2)-2, Rect.Y-2, 4, 4); + c4 := g_Collide(X-MapOffset.X-1, Y-MapOffset.Y-1, 2, 2, + Rect.X+(Rect.Width div 2)-2, Rect.Y+Rect.Height-3, 4, 4); + + // Меняем размер панели или триггера: + if c1 or c2 or c3 or c4 then + begin + MouseAction := MOUSEACTION_RESIZE; + LastMovePoint := MousePos; + + if c1 or c2 then + begin // Шире/уже + ResizeType := RESIZETYPE_HORIZONTAL; + if c1 then + ResizeDirection := RESIZEDIR_LEFT + else + ResizeDirection := RESIZEDIR_RIGHT; + RenderPanel.Cursor := crSizeWE; + end + else + begin // Выше/ниже + ResizeType := RESIZETYPE_VERTICAL; + if c3 then + ResizeDirection := RESIZEDIR_UP + else + ResizeDirection := RESIZEDIR_DOWN; + RenderPanel.Cursor := crSizeNS; + end; + + Break; + end; + end; + + // Перемещаем панель или триггер: + if ObjectCollide(ObjectType, ID, + X-MapOffset.X-1, + Y-MapOffset.Y-1, 2, 2) then + begin + MouseAction := MOUSEACTION_MOVEOBJ; + LastMovePoint := MousePos; + + Break; + end; + end; + end; + end; // if Button = mbRight + + MouseRDown := Button = mbRight; + if MouseRDown then + MouseRDownPos := MousePos; + + MouseLDown := Button = mbLeft; + if MouseLDown then + MouseLDownPos := MousePos; +end; + +procedure TMainForm.RenderPanelMouseUp(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var + panel: TPanel; + trigger: TTrigger; + i: Integer; + IDArray: DWArray; + rRect: TRectWH; + rSelectRect: Boolean; +begin + if Button = mbLeft then + MouseLDown := False; + if Button = mbRight then + MouseRDown := False; + + DrawRect := nil; + ResizeType := RESIZETYPE_NONE; + + if Button = mbLeft then // Left Mouse Button + begin + if MouseAction <> MOUSEACTION_NONE then + begin // Было действие мышью + // Мышь сдвинулась во время удержания клавиши: + if (MousePos.X <> MouseLDownPos.X) and + (MousePos.Y <> MouseLDownPos.Y) then + case MouseAction of + // Рисовали панель: + MOUSEACTION_DRAWPANEL: + begin + // Фон или передний план без текстуры - ошибка: + if (lbPanelType.ItemIndex in [1, 2]) and + (lbTextureList.ItemIndex = -1) then + ErrorMessageBox(_lc[I_MSG_CHOOSE_TEXTURE]) + else // Назначаем параметры панели: + begin + case lbPanelType.ItemIndex of + 0: Panel.PanelType := PANEL_WALL; + 1: Panel.PanelType := PANEL_BACK; + 2: Panel.PanelType := PANEL_FORE; + 3: Panel.PanelType := PANEL_OPENDOOR; + 4: Panel.PanelType := PANEL_CLOSEDOOR; + 5: Panel.PanelType := PANEL_STEP; + 6: Panel.PanelType := PANEL_WATER; + 7: Panel.PanelType := PANEL_ACID1; + 8: Panel.PanelType := PANEL_ACID2; + 9: Panel.PanelType := PANEL_LIFTUP; + 10: Panel.PanelType := PANEL_LIFTDOWN; + 11: Panel.PanelType := PANEL_LIFTLEFT; + 12: Panel.PanelType := PANEL_LIFTRIGHT; + 13: Panel.PanelType := PANEL_BLOCKMON; + end; + + Panel.X := Min(MousePos.X-MapOffset.X, MouseLDownPos.X-MapOffset.X); + Panel.Y := Min(MousePos.Y-MapOffset.Y, MouseLDownPos.Y-MapOffset.Y); + Panel.Width := Abs(MousePos.X-MouseLDownPos.X); + Panel.Height := Abs(MousePos.Y-MouseLDownPos.Y); + + // Лифты, блокМон или отсутствие текстуры - пустая текстура: + if (lbPanelType.ItemIndex in [9, 10, 11, 12, 13]) or + (lbTextureList.ItemIndex = -1) then + begin + Panel.TextureHeight := 1; + Panel.TextureWidth := 1; + Panel.TextureName := ''; + Panel.TextureID := TEXTURE_SPECIAL_NONE; + end + else // Есть текстура: + begin + Panel.TextureName := SelectedTexture(); + + // Обычная текстура: + if not IsSpecialTextureSel() then + begin + g_GetTextureSizeByName(Panel.TextureName, + Panel.TextureWidth, Panel.TextureHeight); + g_GetTexture(Panel.TextureName, Panel.TextureID); + end + else // Спец.текстура: + begin + Panel.TextureHeight := 1; + Panel.TextureWidth := 1; + Panel.TextureID := SpecialTextureID(SelectedTexture()); + end; + end; + + Panel.Alpha := 0; + Panel.Blending := False; + + Undo_Add(OBJECT_PANEL, AddPanel(Panel)); + end; + end; + + // Рисовали триггер: + MOUSEACTION_DRAWTRIGGER: + begin + trigger.X := Min(MousePos.X-MapOffset.X, MouseLDownPos.X-MapOffset.X); + trigger.Y := Min(MousePos.Y-MapOffset.Y, MouseLDownPos.Y-MapOffset.Y); + trigger.Width := Abs(MousePos.X-MouseLDownPos.X); + trigger.Height := Abs(MousePos.Y-MouseLDownPos.Y); + + trigger.Enabled := True; + trigger.TriggerType := lbTriggersList.ItemIndex+1; + trigger.TexturePanel := -1; + + // Типы активации: + trigger.ActivateType := 0; + + if clbActivationType.Checked[0] then + trigger.ActivateType := Trigger.ActivateType or ACTIVATE_PLAYERCOLLIDE; + if clbActivationType.Checked[1] then + trigger.ActivateType := Trigger.ActivateType or ACTIVATE_MONSTERCOLLIDE; + if clbActivationType.Checked[2] then + trigger.ActivateType := Trigger.ActivateType or ACTIVATE_PLAYERPRESS; + if clbActivationType.Checked[3] then + trigger.ActivateType := Trigger.ActivateType or ACTIVATE_MONSTERPRESS; + if clbActivationType.Checked[4] then + trigger.ActivateType := Trigger.ActivateType or ACTIVATE_SHOT; + if clbActivationType.Checked[5] then + trigger.ActivateType := Trigger.ActivateType or ACTIVATE_NOMONSTER; + + // Необходимые для активации ключи: + trigger.Key := 0; + + if clbKeys.Checked[0] then + trigger.Key := Trigger.Key or KEY_RED; + if clbKeys.Checked[1] then + trigger.Key := Trigger.Key or KEY_GREEN; + if clbKeys.Checked[2] then + trigger.Key := Trigger.Key or KEY_BLUE; + if clbKeys.Checked[3] then + trigger.Key := Trigger.Key or KEY_REDTEAM; + if clbKeys.Checked[4] then + trigger.Key := Trigger.Key or KEY_BLUETEAM; + + // Параметры триггера: + ZeroMemory(@trigger.Data.Default[0], 128); + + case trigger.TriggerType of + // Переключаемая панель: + TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, TRIGGER_DOOR, + TRIGGER_DOOR5, TRIGGER_CLOSETRAP, TRIGGER_TRAP, + TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, TRIGGER_LIFT: + begin + Trigger.Data.PanelID := -1; + end; + + // Телепортация: + TRIGGER_TELEPORT: + begin + trigger.Data.TargetPoint.X := trigger.X-64; + trigger.Data.TargetPoint.Y := trigger.Y-64; + trigger.Data.d2d_teleport := True; + trigger.Data.TlpDir := 0; + end; + + // Изменение других триггеров: + TRIGGER_PRESS, TRIGGER_ON, TRIGGER_OFF, + TRIGGER_ONOFF: + begin + trigger.Data.Count := 1; + end; + + // Звук: + TRIGGER_SOUND: + begin + trigger.Data.Volume := 255; + trigger.Data.Pan := 127; + trigger.Data.PlayCount := 1; + trigger.Data.Local := True; + trigger.Data.SoundSwitch := False; + end; + + // Музыка: + TRIGGER_MUSIC: + begin + trigger.Data.MusicAction := 1; + end; + + // Создание монстра: + TRIGGER_SPAWNMONSTER: + begin + trigger.Data.MonType := MONSTER_ZOMBY; + trigger.Data.MonPos.X := trigger.X-64; + trigger.Data.MonPos.Y := trigger.Y-64; + trigger.Data.MonHealth := 0; + trigger.Data.MonActive := False; + trigger.Data.MonCount := 1; + end; + + // Создание предмета: + TRIGGER_SPAWNITEM: + begin + trigger.Data.ItemType := ITEM_AMMO_BULLETS; + trigger.Data.ItemPos.X := trigger.X-64; + trigger.Data.ItemPos.Y := trigger.Y-64; + trigger.Data.ItemOnlyDM := False; + trigger.Data.ItemFalls := False; + trigger.Data.ItemCount := 1; + trigger.Data.ItemMax := 0; + trigger.Data.ItemDelay := 0; + end; + + // Ускорение: + TRIGGER_PUSH: + begin + trigger.Data.PushAngle := 90; + trigger.Data.PushForce := 10; + trigger.Data.ResetVel := True; + end; + + TRIGGER_SCORE: + begin + trigger.Data.ScoreCount := 1; + trigger.Data.ScoreCon := True; + trigger.Data.ScoreMsg := True; + end; + + TRIGGER_MESSAGE: + begin + trigger.Data.MessageKind := 0; + trigger.Data.MessageSendTo := 0; + trigger.Data.MessageText := ''; + trigger.Data.MessageTime := 144; + end; + + TRIGGER_DAMAGE: + begin + trigger.Data.DamageValue := 5; + trigger.Data.DamageInterval := 12; + end; + + TRIGGER_HEALTH: + begin + trigger.Data.HealValue := 5; + trigger.Data.HealInterval := 36; + end; + + TRIGGER_SHOT: + begin + trigger.Data.ShotType := TRIGGER_SHOT_BULLET; + trigger.Data.ShotSound := True; + trigger.Data.ShotPanelID := -1; + trigger.Data.ShotTarget := 0; + trigger.Data.ShotIntSight := 0; + trigger.Data.ShotAllMap := False; + trigger.Data.ShotPos.X := trigger.X-64; + trigger.Data.ShotPos.Y := trigger.Y-64; + trigger.Data.ShotAngle := 0; + trigger.Data.ShotWait := 18; + trigger.Data.ShotAccuracy := 0; + trigger.Data.ShotAmmo := 0; + trigger.Data.ShotIntReload := 0; + end; + + TRIGGER_EFFECT: + begin + trigger.Data.FXCount := 1; + trigger.Data.FXType := TRIGGER_EFFECT_PARTICLE; + trigger.Data.FXSubType := TRIGGER_EFFECT_SLIQUID; + trigger.Data.FXColorR := 0; + trigger.Data.FXColorG := 0; + trigger.Data.FXColorB := 255; + trigger.Data.FXPos := TRIGGER_EFFECT_POS_CENTER; + trigger.Data.FXWait := 1; + trigger.Data.FXVelX := 0; + trigger.Data.FXVelY := -20; + trigger.Data.FXSpreadL := 5; + trigger.Data.FXSpreadR := 5; + trigger.Data.FXSpreadU := 4; + trigger.Data.FXSpreadD := 0; + end; + end; + + Undo_Add(OBJECT_TRIGGER, AddTrigger(trigger)); + end; + + // Рисовали область триггера "Расширитель": + MOUSEACTION_DRAWPRESS: + with gTriggers[SelectedObjects[GetFirstSelected].ID] do + begin + Data.tX := Min(MousePos.X-MapOffset.X, MouseLDownPos.X-MapOffset.X); + Data.tY := Min(MousePos.Y-MapOffset.Y, MouseLDownPos.Y-MapOffset.Y); + Data.tWidth := Abs(MousePos.X-MouseLDownPos.X); + Data.tHeight := Abs(MousePos.Y-MouseLDownPos.Y); + + DrawPressRect := False; + end; + end; + + MouseAction := MOUSEACTION_NONE; + end; + end // if Button = mbLeft... + else // Right Mouse Button: + begin + if MouseAction = MOUSEACTION_NOACTION then + begin + MouseAction := MOUSEACTION_NONE; + Exit; + end; + + // Объект передвинут или изменен в размере: + if MouseAction in [MOUSEACTION_MOVEOBJ, MOUSEACTION_RESIZE] then + begin + MouseAction := MOUSEACTION_NONE; + FillProperty(); + Exit; + end; + + // Еще не все выбрали: + if SelectFlag <> SELECTFLAG_NONE then + begin + if SelectFlag = SELECTFLAG_SELECTED then + SelectFlag := SELECTFLAG_NONE; + FillProperty(); + Exit; + end; + + // Мышь сдвинулась во время удержания клавиши: + if (MousePos.X <> MouseRDownPos.X) and + (MousePos.Y <> MouseRDownPos.Y) then + begin + rSelectRect := True; + + rRect.X := Min(MousePos.X, MouseRDownPos.X)-MapOffset.X; + rRect.Y := Min(MousePos.Y, MouseRDownPos.Y)-MapOffset.Y; + rRect.Width := Abs(MousePos.X-MouseRDownPos.X); + rRect.Height := Abs(MousePos.Y-MouseRDownPos.Y); + end + else // Мышь не сдвинулась - нет прямоугольника: + begin + rSelectRect := False; + + rRect.X := X-MapOffset.X-1; + rRect.Y := Y-MapOffset.Y-1; + rRect.Width := 2; + rRect.Height := 2; + end; + + // Если зажат Ctrl - выделять еще, иначе только один выделенный объект: + if not (ssCtrl in Shift) then + RemoveSelectFromObjects(); + + // Выделяем всё в выбранном прямоугольнике: + IDArray := ObjectInRect(rRect.X, rRect.Y, + rRect.Width, rRect.Height, + pcObjects.ActivePageIndex+1, rSelectRect); + + if IDArray <> nil then + for i := 0 to High(IDArray) do + SelectObject(pcObjects.ActivePageIndex+1, IDArray[i], + (ssCtrl in Shift) or rSelectRect); + + FillProperty(); + end; +end; + +procedure TMainForm.RenderPanelMouseMove(Sender: TObject; + Shift: TShiftState; X, Y: Integer); +var + sX, sY: Integer; + dWidth, dHeight: Integer; + _id: Integer; +begin + _id := GetFirstSelected(); + +// Рисуем панель с текстурой, сетка - размеры текстуры: + if (MouseAction = MOUSEACTION_DRAWPANEL) and + (lbPanelType.ItemIndex in [0..8]) and + (lbTextureList.ItemIndex <> -1) and + (not IsSpecialTextureSel()) then + begin + sX := StrToIntDef(lTextureWidth.Caption, DotStep); + sY := StrToIntDef(lTextureHeight.Caption, DotStep); + end + else + // Меняем размер панели с текстурой, сетка - размеры текстуры: + if (MouseAction = MOUSEACTION_RESIZE) and + ( (SelectedObjects[_id].ObjectType = OBJECT_PANEL) and + IsTexturedPanel(gPanels[SelectedObjects[_id].ID].PanelType) and + (gPanels[SelectedObjects[_id].ID].TextureName <> '') and + (not IsSpecialTexture(gPanels[SelectedObjects[_id].ID].TextureName)) ) then + begin + sX := gPanels[SelectedObjects[_id].ID].TextureWidth; + sY := gPanels[SelectedObjects[_id].ID].TextureHeight; + end + else + // Выравнивание по сетке: + if SnapToGrid then + begin + sX := DotStep; + sY := DotStep; + end + else // Нет выравнивания по сетке: + begin + sX := 1; + sY := 1; + end; + +// Новая позиция мыши: + if MouseLDown then + begin // Зажата левая кнопка мыши + MousePos.X := (Round((X-MouseLDownPos.X)/sX)*sX)+MouseLDownPos.X; + MousePos.Y := (Round((Y-MouseLDownPos.Y)/sY)*sY)+MouseLDownPos.Y; + end + else + if MouseRDown then + begin // Зажата правая кнопка мыши + MousePos.X := (Round((X-MouseRDownPos.X)/sX)*sX)+MouseRDownPos.X; + MousePos.Y := (Round((Y-MouseRDownPos.Y)/sY)*sY)+MouseRDownPos.Y; + end + else + begin // Кнопки мыши не зажаты + MousePos.X := (Round(X/sX)*sX); + MousePos.Y := (Round(Y/sY)*sY); + end; + +// Изменение размера закончилось - ставим обычный курсор: + if ResizeType = RESIZETYPE_NONE then + RenderPanel.Cursor := crDefault; + +// Зажата только правая кнопка мыши: + if (not MouseLDown) and (MouseRDown) then + begin + // Рисуем прямоугольник выделения: + if MouseAction = MOUSEACTION_NONE then + begin + if DrawRect = nil then + New(DrawRect); + DrawRect.TopLeft := MouseRDownPos; + DrawRect.BottomRight := MousePos; + end + else + // Двигаем выделенные объекты: + if MouseAction = MOUSEACTION_MOVEOBJ then + begin + MoveSelectedObjects(ssShift in Shift, ssCtrl in Shift, + MousePos.X-LastMovePoint.X, + MousePos.Y-LastMovePoint.Y); + end + else + // Меняем размер выделенного объекта: + if MouseAction = MOUSEACTION_RESIZE then + begin + if (SelectedObjectCount = 1) and + (SelectedObjects[GetFirstSelected].Live) then + begin + dWidth := MousePos.X-LastMovePoint.X; + dHeight := MousePos.Y-LastMovePoint.Y; + + case ResizeType of + RESIZETYPE_VERTICAL: dWidth := 0; + RESIZETYPE_HORIZONTAL: dHeight := 0; + end; + + case ResizeDirection of + RESIZEDIR_UP: dHeight := -dHeight; + RESIZEDIR_LEFT: dWidth := -dWidth; + end; + + ResizeObject(SelectedObjects[GetFirstSelected].ObjectType, + SelectedObjects[GetFirstSelected].ID, + dWidth, dHeight, ResizeDirection); + + LastMovePoint := MousePos; + end; + end; + end; + +// Зажата только левая кнопка мыши: + if (not MouseRDown) and (MouseLDown) then + begin + // Рисуем прямоугольник планирования панели: + if MouseAction in [MOUSEACTION_DRAWPANEL, + MOUSEACTION_DRAWTRIGGER, + MOUSEACTION_DRAWPRESS] then + begin + if DrawRect = nil then + New(DrawRect); + DrawRect.TopLeft := MouseLDownPos; + DrawRect.BottomRight := MousePos; + end + else // Двигаем карту: + if MouseAction = MOUSEACTION_MOVEMAP then + begin + MoveMap(X, Y); + end; + end; + +// Клавиши мыши не зажаты: + if (not MouseRDown) and (not MouseLDown) then + DrawRect := nil; + +// Строка состояния - координаты мыши: + StatusBar.Panels[1].Text := Format('(%d:%d)', + [MousePos.X-MapOffset.X, MousePos.Y-MapOffset.Y]); +end; + +procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); +begin + CanClose := MessageBox(0, PChar(_lc[I_MSG_EXIT_PROMT]), + PChar(_lc[I_MSG_EXIT]), + MB_ICONQUESTION or MB_YESNO or + MB_TASKMODAL or MB_DEFBUTTON1) = idYes; +end; + +procedure TMainForm.aExitExecute(Sender: TObject); +begin + Close(); +end; + +procedure TMainForm.FormDestroy(Sender: TObject); +var + config: TConfig; + i: Integer; +begin + config := TConfig.CreateFile(EditorDir+'\Editor.cfg'); + + config.WriteBool('Editor', 'Maximize', WindowState = wsMaximized); + config.WriteBool('Editor', 'Minimap', ShowMap); + config.WriteInt('Editor', 'PanelProps', PanelProps.ClientWidth); + config.WriteInt('Editor', 'PanelObjs', PanelObjs.ClientHeight); + config.WriteBool('Editor', 'DotEnable', DotEnable); + config.WriteInt('Editor', 'DotStep', DotStep); + config.WriteStr('Editor', 'LastOpenDir', OpenDialog.InitialDir); + config.WriteStr('Editor', 'LastSaveDir', SaveDialog.InitialDir); + config.WriteBool('Editor', 'EdgeShow', drEdge[3] < 255); + config.WriteInt('Editor', 'EdgeColor', gColorEdge); + config.WriteInt('Editor', 'EdgeAlpha', gAlphaEdge); + config.WriteInt('Editor', 'LineAlpha', gAlphaTriggerLine); + config.WriteInt('Editor', 'TriggerAlpha', gAlphaTriggerArea); + + for i := 0 to RecentCount-1 do + if i < RecentFiles.Count then + config.WriteStr('RecentFiles', IntToStr(i+1), RecentFiles[i]) + else + config.WriteStr('RecentFiles', IntToStr(i+1), ''); + RecentFiles.Free(); + + config.SaveFile(EditorDir+'\Editor.cfg'); + config.Free(); + + slInvalidTextures.Free; + + wglDeleteContext(hRC); +end; + +procedure TMainForm.RenderPanelResize(Sender: TObject); +begin + if MainForm.Visible then + MainForm.Resize(); +end; + +procedure TMainForm.aMapOptionsExecute(Sender: TObject); +var + ResName: String; +begin + MapOptionsForm.ShowModal(); + + ResName := OpenedMap; + while (Pos(':\', ResName) > 0) do + Delete(ResName, 1, Pos(':\', ResName) + 1); + + UpdateCaption(gMapInfo.Name, ExtractFileName(OpenedWAD), ResName); +end; + +procedure TMainForm.aAboutExecute(Sender: TObject); +begin + AboutForm.ShowModal(); +end; + +procedure TMainForm.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +var + dx, dy, i: Integer; + FileName: String; +begin + if (not EditingProperties) then + begin + if Key = Ord('1') then + SwitchLayer(LAYER_BACK); + if Key = Ord('2') then + SwitchLayer(LAYER_WALLS); + if Key = Ord('3') then + SwitchLayer(LAYER_FOREGROUND); + if Key = Ord('4') then + SwitchLayer(LAYER_STEPS); + if Key = Ord('5') then + SwitchLayer(LAYER_WATER); + if Key = Ord('6') then + SwitchLayer(LAYER_ITEMS); + if Key = Ord('7') then + SwitchLayer(LAYER_MONSTERS); + if Key = Ord('8') then + SwitchLayer(LAYER_AREAS); + if Key = Ord('9') then + SwitchLayer(LAYER_TRIGGERS); + if Key = Ord('0') then + tbShowClick(tbShow); + + if Key = Ord('V') then + begin // Поворот монстров и областей: + if (SelectedObjects <> nil) then + begin + for i := 0 to High(SelectedObjects) do + if (SelectedObjects[i].Live) then + begin + if (SelectedObjects[i].ObjectType = OBJECT_MONSTER) then + begin + g_ChangeDir(gMonsters[SelectedObjects[i].ID].Direction); + end + else + if (SelectedObjects[i].ObjectType = OBJECT_AREA) then + begin + g_ChangeDir(gAreas[SelectedObjects[i].ID].Direction); + end; + end; + end + else + begin + if pcObjects.ActivePage = tsMonsters then + begin + if rbMonsterLeft.Checked then + rbMonsterRight.Checked := True + else + rbMonsterLeft.Checked := True; + end; + if pcObjects.ActivePage = tsAreas then + begin + if rbAreaLeft.Checked then + rbAreaRight.Checked := True + else + rbAreaLeft.Checked := True; + end; + end; + end; + + if not (ssCtrl in Shift) then + begin + // Вертикальный скролл карты: + with sbVertical do + begin + if Key = Ord('W') then + begin + Position := IfThen(Position > DotStep, Position-DotStep, 0); + MapOffset.Y := -Round(Position/16) * 16; + end; + + if Key = Ord('S') then + begin + Position := IfThen(Position+DotStep < Max, Position+DotStep, Max); + MapOffset.Y := -Round(Position/16) * 16; + end; + end; + + // Горизонтальный скролл карты: + with sbHorizontal do + begin + if Key = Ord('A') then + begin + Position := IfThen(Position > DotStep, Position-DotStep, 0); + MapOffset.X := -Round(Position/16) * 16; + end; + + if Key = Ord('D') then + begin + Position := IfThen(Position+DotStep < Max, Position+DotStep, Max); + MapOffset.X := -Round(Position/16) * 16; + end; + end; + end; + end; + +// Удалить выделенные объекты: + if (Key = VK_DELETE) and (SelectedObjects <> nil) and + RenderPanel.Focused() then + DeleteSelectedObjects(); + +// Снять выделение: + if (Key = VK_ESCAPE) and (SelectedObjects <> nil) then + RemoveSelectFromObjects(); + +// Передвинуть объекты: + if MainForm.ActiveControl = RenderPanel then + begin + dx := 0; + dy := 0; + + if Key = VK_NUMPAD4 then + dx := IfThen(ssAlt in Shift, -1, -DotStep); + if Key = VK_NUMPAD6 then + dx := IfThen(ssAlt in Shift, 1, DotStep); + if Key = VK_NUMPAD8 then + dy := IfThen(ssAlt in Shift, -1, -DotStep); + if Key = VK_NUMPAD5 then + dy := IfThen(ssAlt in Shift, 1, DotStep); + + if (dx <> 0) or (dy <> 0) then + begin + MoveSelectedObjects(ssShift in Shift, ssCtrl in Shift, dx, dy); + Key := 0; + end; + end; + + if ssCtrl in Shift then + begin + // Выбор панели с текстурой для триггера + if Key = Ord('T') then + begin + DrawPressRect := False; + if SelectFlag = SELECTFLAG_TEXTURE then + begin + SelectFlag := SELECTFLAG_NONE; + Exit; + end; + vleObjectProperty.FindRow(_lc[I_PROP_TR_TEXTURE_PANEL], i); + if i > 0 then + SelectFlag := SELECTFLAG_TEXTURE; + end; + + if Key = Ord('D') then + begin + SelectFlag := SELECTFLAG_NONE; + if DrawPressRect then + begin + DrawPressRect := False; + Exit; + end; + + // Выбор области воздействия, в зависимости от типа триггера + vleObjectProperty.FindRow(_lc[I_PROP_TR_EX_AREA], i); + if i > 0 then + begin + DrawPressRect := True; + Exit; + end; + vleObjectProperty.FindRow(_lc[I_PROP_TR_DOOR_PANEL], i); + if i <= 0 then + vleObjectProperty.FindRow(_lc[I_PROP_TR_TRAP_PANEL], i); + if i > 0 then + begin + SelectFlag := SELECTFLAG_DOOR; + Exit; + end; + vleObjectProperty.FindRow(_lc[I_PROP_TR_LIFT_PANEL], i); + if i > 0 then + begin + SelectFlag := SELECTFLAG_LIFT; + Exit; + end; + vleObjectProperty.FindRow(_lc[I_PROP_TR_TELEPORT_TO], i); + if i > 0 then + begin + SelectFlag := SELECTFLAG_TELEPORT; + Exit; + end; + vleObjectProperty.FindRow(_lc[I_PROP_TR_SPAWN_TO], i); + if i > 0 then + begin + SelectFlag := SELECTFLAG_SPAWNPOINT; + Exit; + end; + + // Выбор основного параметра, в зависимости от типа триггера + vleObjectProperty.FindRow(_lc[I_PROP_TR_NEXT_MAP], i); + if i > 0 then + begin + g_ProcessResourceStr(OpenedMap, @FileName, nil, nil); + SelectMapForm.GetMaps(FileName); + + if SelectMapForm.ShowModal() = mrOK then + begin + vleObjectProperty.Cells[1, i] := SelectMapForm.lbMapList.Items[SelectMapForm.lbMapList.ItemIndex]; + bApplyProperty.Click(); + end; + Exit; + end; + vleObjectProperty.FindRow(_lc[I_PROP_TR_SOUND_NAME], i); + if i <= 0 then + vleObjectProperty.FindRow(_lc[I_PROP_TR_MUSIC_NAME], i); + if i > 0 then + begin + AddSoundForm.OKFunction := nil; + AddSoundForm.lbResourcesList.MultiSelect := False; + AddSoundForm.SetResource := vleObjectProperty.Cells[1, i]; + + if (AddSoundForm.ShowModal() = mrOk) then + begin + vleObjectProperty.Cells[1, i] := AddSoundForm.ResourceName; + bApplyProperty.Click(); + end; + Exit; + end; + vleObjectProperty.FindRow(_lc[I_PROP_TR_PUSH_ANGLE], i); + if i <= 0 then + vleObjectProperty.FindRow(_lc[I_PROP_TR_MESSAGE_TEXT], i); + if i > 0 then + begin + vleObjectProperty.Row := i; + vleObjectProperty.SetFocus(); + Exit; + end; + end; + end; +end; + +procedure TMainForm.aOptimizeExecute(Sender: TObject); +begin + RemoveSelectFromObjects(); + MapOptimizationForm.ShowModal(); +end; + +procedure TMainForm.aCheckMapExecute(Sender: TObject); +begin + MapCheckForm.ShowModal(); +end; + +procedure TMainForm.bbAddTextureClick(Sender: TObject); +begin + AddTextureForm.lbResourcesList.MultiSelect := True; + AddTextureForm.ShowModal(); +end; + +procedure TMainForm.lbTextureListClick(Sender: TObject); +var + TextureID: DWORD; + TextureWidth, TextureHeight: Word; +begin + if (lbTextureList.ItemIndex <> -1) and + (not IsSpecialTextureSel()) then + begin + if g_GetTexture(SelectedTexture(), TextureID) then + begin + g_GetTextureSizeByID(TextureID, TextureWidth, TextureHeight); + + lTextureWidth.Caption := IntToStr(TextureWidth); + lTextureHeight.Caption := IntToStr(TextureHeight); + end else + begin + lTextureWidth.Caption := _lc[I_NOT_ACCESSIBLE]; + lTextureHeight.Caption := _lc[I_NOT_ACCESSIBLE]; + end; + end + else + begin + lTextureWidth.Caption := ''; + lTextureHeight.Caption := ''; + end; +end; + +procedure TMainForm.vleObjectPropertyGetPickList(Sender: TObject; + const KeyName: String; Values: TStrings); +begin + if vleObjectProperty.ItemProps[KeyName].EditStyle = esPickList then + begin + if KeyName = _lc[I_PROP_DIRECTION] then + begin + Values.Add(DirNames[D_LEFT]); + Values.Add(DirNames[D_RIGHT]); + end + else if KeyName = _lc[I_PROP_TR_TELEPORT_DIR] then + begin + Values.Add(DirNamesAdv[0]); + Values.Add(DirNamesAdv[1]); + Values.Add(DirNamesAdv[2]); + Values.Add(DirNamesAdv[3]); + end + else if KeyName = _lc[I_PROP_TR_MUSIC_ACT] then + begin + Values.Add(_lc[I_PROP_TR_MUSIC_ON]); + Values.Add(_lc[I_PROP_TR_MUSIC_OFF]); + end + else if KeyName = _lc[I_PROP_TR_MONSTER_BEHAVIOUR] then + begin + Values.Add(_lc[I_PROP_TR_MONSTER_BEHAVIOUR_0]); + Values.Add(_lc[I_PROP_TR_MONSTER_BEHAVIOUR_1]); + Values.Add(_lc[I_PROP_TR_MONSTER_BEHAVIOUR_2]); + Values.Add(_lc[I_PROP_TR_MONSTER_BEHAVIOUR_3]); + Values.Add(_lc[I_PROP_TR_MONSTER_BEHAVIOUR_4]); + Values.Add(_lc[I_PROP_TR_MONSTER_BEHAVIOUR_5]); + end + else if KeyName = _lc[I_PROP_TR_SCORE_ACT] then + begin + Values.Add(_lc[I_PROP_TR_SCORE_ACT_0]); + Values.Add(_lc[I_PROP_TR_SCORE_ACT_1]); + Values.Add(_lc[I_PROP_TR_SCORE_ACT_2]); + Values.Add(_lc[I_PROP_TR_SCORE_ACT_3]); + end + else if KeyName = _lc[I_PROP_TR_SCORE_TEAM] then + begin + Values.Add(_lc[I_PROP_TR_SCORE_TEAM_0]); + Values.Add(_lc[I_PROP_TR_SCORE_TEAM_1]); + Values.Add(_lc[I_PROP_TR_SCORE_TEAM_2]); + Values.Add(_lc[I_PROP_TR_SCORE_TEAM_3]); + end + else if KeyName = _lc[I_PROP_TR_MESSAGE_KIND] then + begin + Values.Add(_lc[I_PROP_TR_MESSAGE_KIND_0]); + Values.Add(_lc[I_PROP_TR_MESSAGE_KIND_1]); + end + else if KeyName = _lc[I_PROP_TR_MESSAGE_TO] then + begin + Values.Add(_lc[I_PROP_TR_MESSAGE_TO_0]); + Values.Add(_lc[I_PROP_TR_MESSAGE_TO_1]); + Values.Add(_lc[I_PROP_TR_MESSAGE_TO_2]); + Values.Add(_lc[I_PROP_TR_MESSAGE_TO_3]); + Values.Add(_lc[I_PROP_TR_MESSAGE_TO_4]); + Values.Add(_lc[I_PROP_TR_MESSAGE_TO_5]); + end + else if KeyName = _lc[I_PROP_TR_SHOT_TO] then + begin + Values.Add(_lc[I_PROP_TR_SHOT_TO_0]); + Values.Add(_lc[I_PROP_TR_SHOT_TO_1]); + Values.Add(_lc[I_PROP_TR_SHOT_TO_2]); + Values.Add(_lc[I_PROP_TR_SHOT_TO_3]); + Values.Add(_lc[I_PROP_TR_SHOT_TO_4]); + Values.Add(_lc[I_PROP_TR_SHOT_TO_5]); + Values.Add(_lc[I_PROP_TR_SHOT_TO_6]); + end + else if (KeyName = _lc[I_PROP_PANEL_BLEND]) or + (KeyName = _lc[I_PROP_DM_ONLY]) or + (KeyName = _lc[I_PROP_ITEM_FALLS]) or + (KeyName = _lc[I_PROP_TR_ENABLED]) or + (KeyName = _lc[I_PROP_TR_D2D]) or + (KeyName = _lc[I_PROP_TR_SILENT]) or + (KeyName = _lc[I_PROP_TR_TELEPORT_SILENT]) or + (KeyName = _lc[I_PROP_TR_EX_RANDOM]) or + (KeyName = _lc[I_PROP_TR_TEXTURE_ONCE]) or + (KeyName = _lc[I_PROP_TR_TEXTURE_ANIM_ONCE]) or + (KeyName = _lc[I_PROP_TR_SOUND_LOCAL]) or + (KeyName = _lc[I_PROP_TR_SOUND_SWITCH]) or + (KeyName = _lc[I_PROP_TR_MONSTER_ACTIVE]) or + (KeyName = _lc[I_PROP_TR_PUSH_RESET]) or + (KeyName = _lc[I_PROP_TR_SCORE_CON]) or + (KeyName = _lc[I_PROP_TR_SCORE_MSG]) or + (KeyName = _lc[I_PROP_TR_HEALTH_MAX]) or + (KeyName = _lc[I_PROP_TR_SHOT_ALLMAP]) or + (KeyName = _lc[I_PROP_TR_SHOT_SOUND]) or + (KeyName = _lc[I_PROP_TR_EFFECT_CENTER]) then + begin + Values.Add(BoolNames[True]); + Values.Add(BoolNames[False]); + end; + end; +end; + +procedure TMainForm.bApplyPropertyClick(Sender: TObject); +var + _id, a, r, c: Integer; + s: String; + res: Boolean; + NoTextureID: DWORD; + NW, NH: Word; +begin + if SelectedObjectCount() <> 1 then + Exit; + if not SelectedObjects[GetFirstSelected()].Live then + Exit; + + try + if not CheckProperty() then + Exit; + except + Exit; + end; + + _id := GetFirstSelected(); + + r := vleObjectProperty.Row; + c := vleObjectProperty.Col; + + case SelectedObjects[_id].ObjectType of + OBJECT_PANEL: + begin + with gPanels[SelectedObjects[_id].ID] do + begin + X := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_X]])); + Y := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_Y]])); + Width := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_WIDTH]])); + Height := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_HEIGHT]])); + + PanelType := GetPanelType(vleObjectProperty.Values[_lc[I_PROP_PANEL_TYPE]]); + + // Сброс ссылки на триггеры смены текстуры: + if not WordBool(PanelType and (PANEL_WALL or PANEL_FORE or PANEL_BACK)) then + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + begin + if (gTriggers[a].TriggerType <> 0) and + (gTriggers[a].TexturePanel = Integer(SelectedObjects[_id].ID)) then + gTriggers[a].TexturePanel := -1; + if (gTriggers[a].TriggerType = TRIGGER_SHOT) and + (gTriggers[a].Data.ShotPanelID = Integer(SelectedObjects[_id].ID)) then + gTriggers[a].Data.ShotPanelID := -1; + end; + + // Сброс ссылки на триггеры лифта: + if not WordBool(PanelType and (PANEL_LIFTUP or PANEL_LIFTDOWN or PANEL_LIFTLEFT or PANEL_LIFTRIGHT)) then + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + if (gTriggers[a].TriggerType in [TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, TRIGGER_LIFT]) and + (gTriggers[a].Data.PanelID = Integer(SelectedObjects[_id].ID)) then + gTriggers[a].Data.PanelID := -1; + + // Сброс ссылки на триггеры двери: + if not WordBool(PanelType and (PANEL_OPENDOOR or PANEL_CLOSEDOOR)) then + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + if (gTriggers[a].TriggerType in [TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, TRIGGER_DOOR, + TRIGGER_DOOR5, TRIGGER_CLOSETRAP, TRIGGER_TRAP]) and + (gTriggers[a].Data.PanelID = Integer(SelectedObjects[_id].ID)) then + gTriggers[a].Data.PanelID := -1; + + if IsTexturedPanel(PanelType) then + begin // Может быть текстура + if TextureName <> '' then + begin // Была текстура + Alpha := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_PANEL_ALPHA]])); + Blending := NameToBool(vleObjectProperty.Values[_lc[I_PROP_PANEL_BLEND]]); + end + else // Не было + begin + Alpha := 0; + Blending := False; + end; + + // Новая текстура: + TextureName := vleObjectProperty.Values[_lc[I_PROP_PANEL_TEX]]; + + if TextureName <> '' then + begin // Есть текстура + // Обычная текстура: + if not IsSpecialTexture(TextureName) then + begin + g_GetTextureSizeByName(TextureName, + TextureWidth, TextureHeight); + + // Проверка кратности размеров панели: + res := True; + if TextureWidth <> 0 then + if gPanels[SelectedObjects[_id].ID].Width mod TextureWidth <> 0 then + begin + ErrorMessageBox(Format(_lc[I_MSG_WRONG_TEXWIDTH], + [TextureWidth])); + Res := False; + end; + if Res and (TextureHeight <> 0) then + if gPanels[SelectedObjects[_id].ID].Height mod TextureHeight <> 0 then + begin + ErrorMessageBox(Format(_lc[I_MSG_WRONG_TEXHEIGHT], + [TextureHeight])); + Res := False; + end; + + if Res then + begin + if not g_GetTexture(TextureName, TextureID) then + // Не удалось загрузить текстуру, рисуем NOTEXTURE + if g_GetTexture('NOTEXTURE', NoTextureID) then + begin + TextureID := TEXTURE_SPECIAL_NOTEXTURE; + g_GetTextureSizeByID(NoTextureID, NW, NH); + TextureWidth := NW; + TextureHeight := NH; + end else + begin + TextureID := TEXTURE_SPECIAL_NONE; + TextureWidth := 1; + TextureHeight := 1; + end; + end + else + begin + TextureName := ''; + TextureWidth := 1; + TextureHeight := 1; + TextureID := TEXTURE_SPECIAL_NONE; + end; + end + else // Спец.текстура + begin + TextureHeight := 1; + TextureWidth := 1; + TextureID := SpecialTextureID(TextureName); + end; + end + else // Нет текстуры + begin + TextureWidth := 1; + TextureHeight := 1; + TextureID := TEXTURE_SPECIAL_NONE; + end; + end + else // Не может быть текстуры + begin + Alpha := 0; + Blending := False; + TextureName := ''; + TextureWidth := 1; + TextureHeight := 1; + TextureID := TEXTURE_SPECIAL_NONE; + end; + end; + end; + + OBJECT_ITEM: + begin + with gItems[SelectedObjects[_id].ID] do + begin + X := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_X]])); + Y := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_Y]])); + OnlyDM := NameToBool(vleObjectProperty.Values[_lc[I_PROP_DM_ONLY]]); + Fall := NameToBool(vleObjectProperty.Values[_lc[I_PROP_ITEM_FALLS]]); + end; + end; + + OBJECT_MONSTER: + begin + with gMonsters[SelectedObjects[_id].ID] do + begin + X := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_X]])); + Y := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_Y]])); + Direction := NameToDir(vleObjectProperty.Values[_lc[I_PROP_DIRECTION]]); + end; + end; + + OBJECT_AREA: + begin + with gAreas[SelectedObjects[_id].ID] do + begin + X := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_X]])); + Y := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_Y]])); + Direction := NameToDir(vleObjectProperty.Values[_lc[I_PROP_DIRECTION]]); + end; + end; + + OBJECT_TRIGGER: + begin + with gTriggers[SelectedObjects[_id].ID] do + begin + X := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_X]])); + Y := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_Y]])); + Width := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_WIDTH]])); + Height := StrToInt(Trim(vleObjectProperty.Values[_lc[I_PROP_HEIGHT]])); + Enabled := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_ENABLED]]); + ActivateType := StrToActivate(vleObjectProperty.Values[_lc[I_PROP_TR_ACTIVATION]]); + Key := StrToKey(vleObjectProperty.Values[_lc[I_PROP_TR_KEYS]]); + + case TriggerType of + TRIGGER_EXIT: + begin + s := vleObjectProperty.Values[_lc[I_PROP_TR_NEXT_MAP]]; + ZeroMemory(@Data.MapName[0], 16); + if s <> '' then + CopyMemory(@Data.MapName[0], @s[1], Min(Length(s), 16)); + end; + + TRIGGER_TEXTURE: + begin + Data.ActivateOnce := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_TEXTURE_ONCE]]); + Data.AnimOnce := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_TEXTURE_ANIM_ONCE]]); + end; + + TRIGGER_PRESS, TRIGGER_ON, TRIGGER_OFF, TRIGGER_ONOFF: + begin + Data.Wait := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EX_DELAY]], 0), 65535); + Data.Count := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EX_COUNT]], 0), 65535); + if Data.Count < 1 then + Data.Count := 1; + if TriggerType = TRIGGER_PRESS then + Data.ExtRandom := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_EX_RANDOM]]); + end; + + TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, TRIGGER_DOOR, TRIGGER_DOOR5, + TRIGGER_CLOSETRAP, TRIGGER_TRAP, TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, + TRIGGER_LIFT: + begin + Data.NoSound := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_SILENT]]); + Data.d2d_doors := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_D2D]]); + end; + + TRIGGER_TELEPORT: + begin + Data.d2d_teleport := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_D2D]]); + Data.silent_teleport := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_TELEPORT_SILENT]]); + Data.TlpDir := NameToDirAdv(vleObjectProperty.Values[_lc[I_PROP_TR_TELEPORT_DIR]]); + end; + + TRIGGER_SOUND: + begin + s := vleObjectProperty.Values[_lc[I_PROP_TR_SOUND_NAME]]; + ZeroMemory(@Data.SoundName[0], 64); + if s <> '' then + CopyMemory(@Data.SoundName[0], @s[1], Min(Length(s), 64)); + + Data.Volume := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SOUND_VOLUME]], 0), 255); + Data.Pan := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SOUND_PAN]], 0), 255); + Data.PlayCount := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SOUND_COUNT]], 0), 255); + Data.Local := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_SOUND_LOCAL]]); + Data.SoundSwitch := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_SOUND_SWITCH]]); + end; + + TRIGGER_SPAWNMONSTER: + begin + Data.MonType := StrToMonster(vleObjectProperty.Values[_lc[I_PROP_TR_MONSTER_TYPE]]); + Data.MonDir := Byte(NameToDir(vleObjectProperty.Values[_lc[I_PROP_DIRECTION]])); + Data.MonHealth := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_HEALTH]], 0), 1000000); + if Data.MonHealth < 0 then + Data.MonHealth := 0; + Data.MonActive := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_MONSTER_ACTIVE]]); + Data.MonCount := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_COUNT]], 0), 64); + if Data.MonCount < 1 then + Data.MonCount := 1; + Data.MonEffect := StrToEffect(vleObjectProperty.Values[_lc[I_PROP_TR_FX_TYPE]]); + Data.MonMax := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SPAWN_MAX]], 0), 65535); + Data.MonDelay := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SPAWN_DELAY]], 0), 65535); + Data.MonBehav := 0; + if vleObjectProperty.Values[_lc[I_PROP_TR_MONSTER_BEHAVIOUR]] = _lc[I_PROP_TR_MONSTER_BEHAVIOUR_1] then + Data.MonBehav := 1; + if vleObjectProperty.Values[_lc[I_PROP_TR_MONSTER_BEHAVIOUR]] = _lc[I_PROP_TR_MONSTER_BEHAVIOUR_2] then + Data.MonBehav := 2; + if vleObjectProperty.Values[_lc[I_PROP_TR_MONSTER_BEHAVIOUR]] = _lc[I_PROP_TR_MONSTER_BEHAVIOUR_3] then + Data.MonBehav := 3; + if vleObjectProperty.Values[_lc[I_PROP_TR_MONSTER_BEHAVIOUR]] = _lc[I_PROP_TR_MONSTER_BEHAVIOUR_4] then + Data.MonBehav := 4; + if vleObjectProperty.Values[_lc[I_PROP_TR_MONSTER_BEHAVIOUR]] = _lc[I_PROP_TR_MONSTER_BEHAVIOUR_5] then + Data.MonBehav := 5; + end; + + TRIGGER_SPAWNITEM: + begin + Data.ItemType := StrToItem(vleObjectProperty.Values[_lc[I_PROP_TR_ITEM_TYPE]]); + Data.ItemOnlyDM := NameToBool(vleObjectProperty.Values[_lc[I_PROP_DM_ONLY]]); + Data.ItemFalls := NameToBool(vleObjectProperty.Values[_lc[I_PROP_ITEM_FALLS]]); + Data.ItemCount := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_COUNT]], 0), 64); + if Data.ItemCount < 1 then + Data.ItemCount := 1; + Data.ItemEffect := StrToEffect(vleObjectProperty.Values[_lc[I_PROP_TR_FX_TYPE]]); + Data.ItemMax := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SPAWN_MAX]], 0), 65535); + Data.ItemDelay := Min(StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SPAWN_DELAY]], 0), 65535); + end; + + TRIGGER_MUSIC: + begin + s := vleObjectProperty.Values[_lc[I_PROP_TR_MUSIC_NAME]]; + ZeroMemory(@Data.MusicName[0], 64); + if s <> '' then + CopyMemory(@Data.MusicName[0], @s[1], Min(Length(s), 64)); + + if vleObjectProperty.Values[_lc[I_PROP_TR_MUSIC_ACT]] = _lc[I_PROP_TR_MUSIC_ON] then + Data.MusicAction := 1 + else + Data.MusicAction := 2; + end; + + TRIGGER_PUSH: + begin + Data.PushAngle := Min( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_PUSH_ANGLE]], 0), 360); + Data.PushForce := Min( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_PUSH_FORCE]], 0), 255); + Data.ResetVel := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_PUSH_RESET]]); + end; + + TRIGGER_SCORE: + begin + Data.ScoreAction := 0; + if vleObjectProperty.Values[_lc[I_PROP_TR_SCORE_ACT]] = _lc[I_PROP_TR_SCORE_ACT_1] then + Data.ScoreAction := 1 + else if vleObjectProperty.Values[_lc[I_PROP_TR_SCORE_ACT]] = _lc[I_PROP_TR_SCORE_ACT_2] then + Data.ScoreAction := 2 + else if vleObjectProperty.Values[_lc[I_PROP_TR_SCORE_ACT]] = _lc[I_PROP_TR_SCORE_ACT_3] then + Data.ScoreAction := 3; + Data.ScoreCount := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_COUNT]], 0), 0), 255); + Data.ScoreTeam := 0; + if vleObjectProperty.Values[_lc[I_PROP_TR_SCORE_TEAM]] = _lc[I_PROP_TR_SCORE_TEAM_1] then + Data.ScoreTeam := 1 + else if vleObjectProperty.Values[_lc[I_PROP_TR_SCORE_TEAM]] = _lc[I_PROP_TR_SCORE_TEAM_2] then + Data.ScoreTeam := 2 + else if vleObjectProperty.Values[_lc[I_PROP_TR_SCORE_TEAM]] = _lc[I_PROP_TR_SCORE_TEAM_3] then + Data.ScoreTeam := 3; + Data.ScoreCon := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_SCORE_CON]]); + Data.ScoreMsg := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_SCORE_MSG]]); + end; + + TRIGGER_MESSAGE: + begin + Data.MessageKind := 0; + if vleObjectProperty.Values[_lc[I_PROP_TR_MESSAGE_KIND]] = _lc[I_PROP_TR_MESSAGE_KIND_1] then + Data.MessageKind := 1; + + Data.MessageSendTo := 0; + if vleObjectProperty.Values[_lc[I_PROP_TR_MESSAGE_TO]] = _lc[I_PROP_TR_MESSAGE_TO_1] then + Data.MessageSendTo := 1 + else if vleObjectProperty.Values[_lc[I_PROP_TR_MESSAGE_TO]] = _lc[I_PROP_TR_MESSAGE_TO_2] then + Data.MessageSendTo := 2 + else if vleObjectProperty.Values[_lc[I_PROP_TR_MESSAGE_TO]] = _lc[I_PROP_TR_MESSAGE_TO_3] then + Data.MessageSendTo := 3 + else if vleObjectProperty.Values[_lc[I_PROP_TR_MESSAGE_TO]] = _lc[I_PROP_TR_MESSAGE_TO_4] then + Data.MessageSendTo := 4 + else if vleObjectProperty.Values[_lc[I_PROP_TR_MESSAGE_TO]] = _lc[I_PROP_TR_MESSAGE_TO_5] then + Data.MessageSendTo := 5; + + s := vleObjectProperty.Values[_lc[I_PROP_TR_MESSAGE_TEXT]]; + ZeroMemory(@Data.MessageText[0], 100); + if s <> '' then + CopyMemory(@Data.MessageText[0], @s[1], Min(Length(s), 100)); + + Data.MessageTime := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_MESSAGE_TIME]], 0), 0), 65535); + end; + + TRIGGER_DAMAGE: + begin + Data.DamageValue := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_DAMAGE_VALUE]], 0), 0), 65535); + Data.DamageInterval := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_INTERVAL]], 0), 0), 65535); + end; + + TRIGGER_HEALTH: + begin + Data.HealValue := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_HEALTH]], 0), 0), 65535); + Data.HealInterval := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_INTERVAL]], 0), 0), 65535); + Data.HealMax := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_HEALTH_MAX]]); + Data.HealSilent := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_SILENT]]); + end; + + TRIGGER_SHOT: + begin + Data.ShotType := StrToShot(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_TYPE]]); + Data.ShotSound := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_SOUND]]); + Data.ShotTarget := 0; + if vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_TO]] = _lc[I_PROP_TR_SHOT_TO_1] then + Data.ShotTarget := 1 + else if vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_TO]] = _lc[I_PROP_TR_SHOT_TO_2] then + Data.ShotTarget := 2 + else if vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_TO]] = _lc[I_PROP_TR_SHOT_TO_3] then + Data.ShotTarget := 3 + else if vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_TO]] = _lc[I_PROP_TR_SHOT_TO_4] then + Data.ShotTarget := 4 + else if vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_TO]] = _lc[I_PROP_TR_SHOT_TO_5] then + Data.ShotTarget := 5 + else if vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_TO]] = _lc[I_PROP_TR_SHOT_TO_6] then + Data.ShotTarget := 6; + Data.ShotIntSight := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_SIGHT]], 0), 0), 65535); + Data.ShotAllMap := NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_ALLMAP]]); + Data.ShotAngle := Min( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_ANGLE]], 0), 360); + Data.ShotWait := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EX_DELAY]], 0), 0), 65535); + Data.ShotAccuracy := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_ACC]], 0), 0), 65535); + Data.ShotAmmo := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_AMMO]], 0), 0), 65535); + Data.ShotIntReload := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_SHOT_RELOAD]], 0), 0), 65535); + end; + + TRIGGER_EFFECT: + begin + Data.FXCount := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_COUNT]], 0), 0), 255); + if vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_TYPE]] = _lc[I_PROP_TR_EFFECT_PARTICLE] then + begin + Data.FXType := TRIGGER_EFFECT_PARTICLE; + Data.FXSubType := TRIGGER_EFFECT_SLIQUID; + if vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SUBTYPE]] = _lc[I_PROP_TR_EFFECT_SLIQUID] then + Data.FXSubType := TRIGGER_EFFECT_SLIQUID + else if vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SUBTYPE]] = _lc[I_PROP_TR_EFFECT_LLIQUID] then + Data.FXSubType := TRIGGER_EFFECT_LLIQUID + else if vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SUBTYPE]] = _lc[I_PROP_TR_EFFECT_DLIQUID] then + Data.FXSubType := TRIGGER_EFFECT_DLIQUID + else if vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SUBTYPE]] = _lc[I_PROP_TR_EFFECT_BLOOD] then + Data.FXSubType := TRIGGER_EFFECT_BLOOD + else if vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SUBTYPE]] = _lc[I_PROP_TR_EFFECT_SPARK] then + Data.FXSubType := TRIGGER_EFFECT_SPARK + else if vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SUBTYPE]] = _lc[I_PROP_TR_EFFECT_BUBBLE] then + Data.FXSubType := TRIGGER_EFFECT_BUBBLE; + end else + begin + Data.FXType := TRIGGER_EFFECT_ANIMATION; + Data.FXSubType := StrToEffect(vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SUBTYPE]]); + end; + a := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_COLOR]], 0), 0), $FFFFFF); + Data.FXColorR := a and $FF; + Data.FXColorG := (a shr 8) and $FF; + Data.FXColorB := (a shr 16) and $FF; + if NameToBool(vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_CENTER]]) then + Data.FXPos := 0 + else + Data.FXPos := 1; + Data.FXWait := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EX_DELAY]], 0), 0), 65535); + Data.FXVelX := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_VELX]], 0), -128), 127); + Data.FXVelY := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_VELY]], 0), -128), 127); + Data.FXSpreadL := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SPL]], 0), 0), 255); + Data.FXSpreadR := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SPR]], 0), 0), 255); + Data.FXSpreadU := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SPU]], 0), 0), 255); + Data.FXSpreadD := Min(Max( + StrToIntDef(vleObjectProperty.Values[_lc[I_PROP_TR_EFFECT_SPD]], 0), 0), 255); + end; + end; + end; + end; + end; + + FillProperty(); + + vleObjectProperty.Row := r; + vleObjectProperty.Col := c; +end; + +procedure TMainForm.bbRemoveTextureClick(Sender: TObject); +var + a, i: Integer; +begin + i := lbTextureList.ItemIndex; + if i = -1 then + Exit; + + if MessageBox(0, PChar(Format(_lc[I_MSG_DEL_TEXTURE_PROMT], + [SelectedTexture()])), + PChar(_lc[I_MSG_DEL_TEXTURE]), + MB_ICONQUESTION or MB_YESNO or + MB_TASKMODAL or MB_DEFBUTTON1) <> idYes then + Exit; + + if gPanels <> nil then + for a := 0 to High(gPanels) do + if (gPanels[a].PanelType <> 0) and + (gPanels[a].TextureName = SelectedTexture()) then + begin + ErrorMessageBox(_lc[I_MSG_DEL_TEXTURE_CANT]); + Exit; + end; + + g_DeleteTexture(SelectedTexture()); + i := slInvalidTextures.IndexOf(lbTextureList.Items[i]); + if i > -1 then + slInvalidTextures.Delete(i); + if lbTextureList.ItemIndex > -1 then + lbTextureList.Items.Delete(lbTextureList.ItemIndex) +end; + +procedure TMainForm.aNewMapExecute(Sender: TObject); +begin + if (MessageBox(0, PChar(_lc[I_MSG_CLEAR_MAP_PROMT]), + PChar(_lc[I_MSG_CLEAR_MAP]), + MB_ICONQUESTION or MB_YESNO or + MB_TASKMODAL or MB_DEFBUTTON1) = mrYes) then + FullClear(); +end; + +procedure TMainForm.aUndoExecute(Sender: TObject); +var + a: Integer; +begin + if UndoBuffer = nil then + Exit; + if UndoBuffer[High(UndoBuffer)] = nil then + Exit; + + for a := 0 to High(UndoBuffer[High(UndoBuffer)]) do + with UndoBuffer[High(UndoBuffer)][a] do + begin + case UndoType of + UNDO_DELETE_PANEL: + begin + AddPanel(Panel^); + Panel := nil; + end; + UNDO_DELETE_ITEM: AddItem(Item); + UNDO_DELETE_AREA: AddArea(Area); + UNDO_DELETE_MONSTER: AddMonster(Monster); + UNDO_DELETE_TRIGGER: AddTrigger(Trigger); + UNDO_ADD_PANEL: RemoveObject(AddID, OBJECT_PANEL); + UNDO_ADD_ITEM: RemoveObject(AddID, OBJECT_ITEM); + UNDO_ADD_AREA: RemoveObject(AddID, OBJECT_AREA); + UNDO_ADD_MONSTER: RemoveObject(AddID, OBJECT_MONSTER); + UNDO_ADD_TRIGGER: RemoveObject(AddID, OBJECT_TRIGGER); + end; + end; + + SetLength(UndoBuffer, Length(UndoBuffer)-1); + + RemoveSelectFromObjects(); + + miUndo.Enabled := UndoBuffer <> nil; +end; + + +procedure TMainForm.aCopyObjectExecute(Sender: TObject); +var + a, b: Integer; + CopyBuffer: TCopyRecArray; + str: String; + ok: Boolean; + + function CB_Compare(I1, I2: TCopyRec): Integer; + begin + Result := Integer(I1.ObjectType) - Integer(I2.ObjectType); + + if Result = 0 then // Одного типа + Result := Integer(I1.ID) - Integer(I2.ID); + end; + + procedure QuickSortCopyBuffer(L, R: Integer); + var + I, J: Integer; + P, T: TCopyRec; + begin + repeat + I := L; + J := R; + P := CopyBuffer[(L + R) shr 1]; + + repeat + while CB_Compare(CopyBuffer[I], P) < 0 do + Inc(I); + while CB_Compare(CopyBuffer[J], P) > 0 do + Dec(J); + + if I <= J then + begin + T := CopyBuffer[I]; + CopyBuffer[I] := CopyBuffer[J]; + CopyBuffer[J] := T; + Inc(I); + Dec(J); + end; + until I > J; + + if L < J then + QuickSortCopyBuffer(L, J); + + L := I; + until I >= R; + end; + +begin + if SelectedObjects = nil then + Exit; + + b := -1; + CopyBuffer := nil; + +// Копируем объекты: + for a := 0 to High(SelectedObjects) do + if SelectedObjects[a].Live then + with SelectedObjects[a] do + begin + SetLength(CopyBuffer, Length(CopyBuffer)+1); + b := High(CopyBuffer); + CopyBuffer[b].ID := ID; + CopyBuffer[b].Panel := nil; + + case ObjectType of + OBJECT_PANEL: + begin + CopyBuffer[b].ObjectType := OBJECT_PANEL; + New(CopyBuffer[b].Panel); + CopyBuffer[b].Panel^ := gPanels[ID]; + end; + + OBJECT_ITEM: + begin + CopyBuffer[b].ObjectType := OBJECT_ITEM; + CopyBuffer[b].Item := gItems[ID]; + end; + + OBJECT_MONSTER: + begin + CopyBuffer[b].ObjectType := OBJECT_MONSTER; + CopyBuffer[b].Monster := gMonsters[ID]; + end; + + OBJECT_AREA: + begin + CopyBuffer[b].ObjectType := OBJECT_AREA; + CopyBuffer[b].Area := gAreas[ID]; + end; + + OBJECT_TRIGGER: + begin + CopyBuffer[b].ObjectType := OBJECT_TRIGGER; + CopyBuffer[b].Trigger := gTriggers[ID]; + end; + end; + end; + +// Сортировка по ID: + if CopyBuffer <> nil then + begin + QuickSortCopyBuffer(0, b); + end; + +// Пестановка ссылок триггеров: + for a := 0 to Length(CopyBuffer)-1 do + if CopyBuffer[a].ObjectType = OBJECT_TRIGGER then + begin + case CopyBuffer[a].Trigger.TriggerType of + TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, TRIGGER_DOOR, + TRIGGER_DOOR5, TRIGGER_CLOSETRAP, TRIGGER_TRAP, + TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, TRIGGER_LIFT: + if CopyBuffer[a].Trigger.Data.PanelID <> -1 then + begin + ok := False; + + for b := 0 to Length(CopyBuffer)-1 do + if (CopyBuffer[b].ObjectType = OBJECT_PANEL) and + (Integer(CopyBuffer[b].ID) = CopyBuffer[a].Trigger.Data.PanelID) then + begin + CopyBuffer[a].Trigger.Data.PanelID := b; + ok := True; + Break; + end; + + // Этих панелей нет среди копируемых: + if not ok then + CopyBuffer[a].Trigger.Data.PanelID := -1; + end; + + TRIGGER_PRESS, TRIGGER_ON, + TRIGGER_OFF, TRIGGER_ONOFF: + if CopyBuffer[a].Trigger.Data.MonsterID <> 0 then + begin + ok := False; + + for b := 0 to Length(CopyBuffer)-1 do + if (CopyBuffer[b].ObjectType = OBJECT_MONSTER) and + (Integer(CopyBuffer[b].ID) = CopyBuffer[a].Trigger.Data.MonsterID-1) then + begin + CopyBuffer[a].Trigger.Data.MonsterID := b+1; + ok := True; + Break; + end; + + // Этих монстров нет среди копируемых: + if not ok then + CopyBuffer[a].Trigger.Data.MonsterID := 0; + end; + + TRIGGER_SHOT: + if CopyBuffer[a].Trigger.Data.ShotPanelID <> -1 then + begin + ok := False; + + for b := 0 to Length(CopyBuffer)-1 do + if (CopyBuffer[b].ObjectType = OBJECT_PANEL) and + (Integer(CopyBuffer[b].ID) = CopyBuffer[a].Trigger.Data.ShotPanelID) then + begin + CopyBuffer[a].Trigger.Data.ShotPanelID := b; + ok := True; + Break; + end; + + // Этих панелей нет среди копируемых: + if not ok then + CopyBuffer[a].Trigger.Data.ShotPanelID := -1; + end; + end; + + if CopyBuffer[a].Trigger.TexturePanel <> -1 then + begin + ok := False; + + for b := 0 to Length(CopyBuffer)-1 do + if (CopyBuffer[b].ObjectType = OBJECT_PANEL) and + (Integer(CopyBuffer[b].ID) = CopyBuffer[a].Trigger.TexturePanel) then + begin + CopyBuffer[a].Trigger.TexturePanel := b; + ok := True; + Break; + end; + + // Этих панелей нет среди копируемых: + if not ok then + CopyBuffer[a].Trigger.TexturePanel := -1; + end; + end; + +// В буфер обмена: + str := CopyBufferToString(CopyBuffer); + ClipBoard.AsText := str; + + for a := 0 to Length(CopyBuffer)-1 do + if (CopyBuffer[a].ObjectType = OBJECT_PANEL) and + (CopyBuffer[a].Panel <> nil) then + Dispose(CopyBuffer[a].Panel); + + CopyBuffer := nil; +end; + +procedure TMainForm.aPasteObjectExecute(Sender: TObject); +var + a, h: Integer; + CopyBuffer: TCopyRecArray; + res: Boolean; + swad, ssec, sres: String; +begin + CopyBuffer := nil; + + StringToCopyBuffer(ClipBoard.AsText, CopyBuffer); + + if CopyBuffer = nil then + Exit; + + RemoveSelectFromObjects(); + + h := High(CopyBuffer); + for a := 0 to h do + with CopyBuffer[a] do + begin + case ObjectType of + OBJECT_PANEL: + if Panel <> nil then + begin + Panel^.X := Panel^.X + 16; + Panel^.Y := Panel^.Y + 16; + + Panel^.TextureID := TEXTURE_SPECIAL_NONE; + Panel^.TextureWidth := 1; + Panel^.TextureHeight := 1; + + if (Panel^.PanelType = PANEL_LIFTUP) or + (Panel^.PanelType = PANEL_LIFTDOWN) or + (Panel^.PanelType = PANEL_LIFTLEFT) or + (Panel^.PanelType = PANEL_LIFTRIGHT) or + (Panel^.PanelType = PANEL_BLOCKMON) or + (Panel^.TextureName = '') then + begin // Нет или не может быть текстуры: + end + else // Есть текстура: + begin + // Обычная текстура: + if not IsSpecialTexture(Panel^.TextureName) then + begin + res := g_GetTexture(Panel^.TextureName, Panel^.TextureID); + + if not res then + begin + g_ProcessResourceStr(Panel^.TextureName, swad, ssec, sres); + AddTexture(swad, ssec, sres, True); + res := g_GetTexture(Panel^.TextureName, Panel^.TextureID); + end; + + if res then + g_GetTextureSizeByName(Panel^.TextureName, + Panel^.TextureWidth, Panel^.TextureHeight) + else + Panel^.TextureName := ''; + end + else // Спец.текстура: + begin + Panel^.TextureID := SpecialTextureID(Panel^.TextureName); + with MainForm.lbTextureList.Items do + if IndexOf(Panel^.TextureName) = -1 then + Add(Panel^.TextureName); + end; + end; + + ID := AddPanel(Panel^); + Dispose(Panel); + Undo_Add(OBJECT_PANEL, ID, a > 0); + SelectObject(OBJECT_PANEL, ID, True); + end; + + OBJECT_ITEM: + begin + Item.X := Item.X + 16; + Item.Y := Item.Y + 16; + + ID := AddItem(Item); + Undo_Add(OBJECT_ITEM, ID, a > 0); + SelectObject(OBJECT_ITEM, ID, True); + end; + + OBJECT_MONSTER: + begin + Monster.X := Monster.X + 16; + Monster.Y := Monster.Y + 16; + + ID := AddMonster(Monster); + Undo_Add(OBJECT_MONSTER, ID, a > 0); + SelectObject(OBJECT_MONSTER, ID, True); + end; + + OBJECT_AREA: + begin + Area.X := Area.X + 16; + Area.Y := Area.Y + 16; + + ID := AddArea(Area); + Undo_Add(OBJECT_AREA, ID, a > 0); + SelectObject(OBJECT_AREA, ID, True); + end; + + OBJECT_TRIGGER: + begin + Trigger.X := Trigger.X + 16; + Trigger.Y := Trigger.Y + 16; + + ID := AddTrigger(Trigger); + Undo_Add(OBJECT_TRIGGER, ID, a > 0); + SelectObject(OBJECT_TRIGGER, ID, True); + end; + end; + end; + +// Переставляем ссылки триггеров: + for a := 0 to High(CopyBuffer) do + if CopyBuffer[a].ObjectType = OBJECT_TRIGGER then + begin + case CopyBuffer[a].Trigger.TriggerType of + TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, TRIGGER_DOOR, + TRIGGER_DOOR5, TRIGGER_CLOSETRAP, TRIGGER_TRAP, + TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, TRIGGER_LIFT: + if CopyBuffer[a].Trigger.Data.PanelID <> -1 then + gTriggers[CopyBuffer[a].ID].Data.PanelID := + CopyBuffer[CopyBuffer[a].Trigger.Data.PanelID].ID; + + TRIGGER_PRESS, TRIGGER_ON, + TRIGGER_OFF, TRIGGER_ONOFF: + if CopyBuffer[a].Trigger.Data.MonsterID <> 0 then + gTriggers[CopyBuffer[a].ID].Data.MonsterID := + CopyBuffer[CopyBuffer[a].Trigger.Data.MonsterID-1].ID+1; + + TRIGGER_SHOT: + if CopyBuffer[a].Trigger.Data.ShotPanelID <> -1 then + gTriggers[CopyBuffer[a].ID].Data.ShotPanelID := + CopyBuffer[CopyBuffer[a].Trigger.Data.ShotPanelID].ID; + end; + + if CopyBuffer[a].Trigger.TexturePanel <> -1 then + gTriggers[CopyBuffer[a].ID].TexturePanel := + CopyBuffer[CopyBuffer[a].Trigger.TexturePanel].ID; + end; + + CopyBuffer := nil; + + if h = 0 then + FillProperty(); +end; + +procedure TMainForm.aCutObjectExecute(Sender: TObject); +begin + miCopy.Click(); + DeleteSelectedObjects(); +end; + +procedure TMainForm.vleObjectPropertyEditButtonClick(Sender: TObject); +var + Key, FileName: String; + b: Byte; +begin + Key := vleObjectProperty.Keys[vleObjectProperty.Row]; + + if Key = _lc[I_PROP_PANEL_TYPE] then + begin + with ChooseTypeForm, vleObjectProperty do + begin // Выбор типа панели: + Caption := _lc[I_PROP_PANEL_TYPE]; + lbTypeSelect.Items.Clear(); + + for b := 0 to High(PANELNAMES) do + begin + lbTypeSelect.Items.Add(PANELNAMES[b]); + if Values[Key] = PANELNAMES[b] then + lbTypeSelect.ItemIndex := b; + end; + + if ShowModal() = mrOK then + begin + b := lbTypeSelect.ItemIndex; + Values[Key] := PANELNAMES[b]; + bApplyProperty.Click(); + end; + end + end + else if Key = _lc[I_PROP_TR_TELEPORT_TO] then + SelectFlag := SELECTFLAG_TELEPORT + else if Key = _lc[I_PROP_TR_SPAWN_TO] then + SelectFlag := SELECTFLAG_SPAWNPOINT + else if (Key = _lc[I_PROP_TR_DOOR_PANEL]) or + (Key = _lc[I_PROP_TR_TRAP_PANEL]) then + SelectFlag := SELECTFLAG_DOOR + else if Key = _lc[I_PROP_TR_TEXTURE_PANEL] then + begin + DrawPressRect := False; + SelectFlag := SELECTFLAG_TEXTURE; + end + else if Key = _lc[I_PROP_TR_SHOT_PANEL] then + SelectFlag := SELECTFLAG_SHOTPANEL + else if Key = _lc[I_PROP_TR_LIFT_PANEL] then + SelectFlag := SELECTFLAG_LIFT + else if key = _lc[I_PROP_TR_EX_MONSTER] then + SelectFlag := SELECTFLAG_MONSTER + else if Key = _lc[I_PROP_TR_EX_AREA] then + begin + SelectFlag := SELECTFLAG_NONE; + DrawPressRect := True; + end + else if Key = _lc[I_PROP_TR_NEXT_MAP] then + begin // Выбор следующей карты: + g_ProcessResourceStr(OpenedMap, @FileName, nil, nil); + SelectMapForm.GetMaps(FileName); + + if SelectMapForm.ShowModal() = mrOK then + begin + vleObjectProperty.Values[Key] := SelectMapForm.lbMapList.Items[SelectMapForm.lbMapList.ItemIndex]; + bApplyProperty.Click(); + end; + end + else if (Key = _lc[I_PROP_TR_SOUND_NAME]) or + (Key = _lc[I_PROP_TR_MUSIC_NAME]) then + begin // Выбор файла звука/музыки: + AddSoundForm.OKFunction := nil; + AddSoundForm.lbResourcesList.MultiSelect := False; + AddSoundForm.SetResource := vleObjectProperty.Values[Key]; + + if (AddSoundForm.ShowModal() = mrOk) then + begin + vleObjectProperty.Values[Key] := AddSoundForm.ResourceName; + bApplyProperty.Click(); + end; + end + else if Key = _lc[I_PROP_TR_ACTIVATION] then + with ActivationTypeForm, vleObjectProperty do + begin // Выбор типов активации: + cbPlayerCollide.Checked := Pos('PC', Values[Key]) > 0; + cbMonsterCollide.Checked := Pos('MC', Values[Key]) > 0; + cbPlayerPress.Checked := Pos('PP', Values[Key]) > 0; + cbMonsterPress.Checked := Pos('MP', Values[Key]) > 0; + cbShot.Checked := Pos('SH', Values[Key]) > 0; + cbNoMonster.Checked := Pos('NM', Values[Key]) > 0; + + if ShowModal() = mrOK then + begin + b := 0; + if cbPlayerCollide.Checked then + b := ACTIVATE_PLAYERCOLLIDE; + if cbMonsterCollide.Checked then + b := b or ACTIVATE_MONSTERCOLLIDE; + if cbPlayerPress.Checked then + b := b or ACTIVATE_PLAYERPRESS; + if cbMonsterPress.Checked then + b := b or ACTIVATE_MONSTERPRESS; + if cbShot.Checked then + b := b or ACTIVATE_SHOT; + if cbNoMonster.Checked then + b := b or ACTIVATE_NOMONSTER; + + Values[Key] := ActivateToStr(b); + bApplyProperty.Click(); + end; + end + else if Key = _lc[I_PROP_TR_KEYS] then + with KeysForm, vleObjectProperty do + begin // Выбор необходимых ключей: + cbRedKey.Checked := Pos('RK', Values[Key]) > 0; + cbGreenKey.Checked := Pos('GK', Values[Key]) > 0; + cbBlueKey.Checked := Pos('BK', Values[Key]) > 0; + cbRedTeam.Checked := Pos('RT', Values[Key]) > 0; + cbBlueTeam.Checked := Pos('BT', Values[Key]) > 0; + + if ShowModal() = mrOK then + begin + b := 0; + if cbRedKey.Checked then + b := KEY_RED; + if cbGreenKey.Checked then + b := b or KEY_GREEN; + if cbBlueKey.Checked then + b := b or KEY_BLUE; + if cbRedTeam.Checked then + b := b or KEY_REDTEAM; + if cbBlueTeam.Checked then + b := b or KEY_BLUETEAM; + + Values[Key] := KeyToStr(b); + bApplyProperty.Click(); + end; + end + else if Key = _lc[I_PROP_TR_FX_TYPE] then + with ChooseTypeForm, vleObjectProperty do + begin // Выбор типа эффекта: + Caption := _lc[I_CAP_FX_TYPE]; + lbTypeSelect.Items.Clear(); + + for b := EFFECT_NONE to EFFECT_FIRE do + lbTypeSelect.Items.Add(EffectToStr(b)); + + lbTypeSelect.ItemIndex := StrToEffect(Values[Key]); + + if ShowModal() = mrOK then + begin + b := lbTypeSelect.ItemIndex; + Values[Key] := EffectToStr(b); + bApplyProperty.Click(); + end; + end + else if Key = _lc[I_PROP_TR_MONSTER_TYPE] then + with ChooseTypeForm, vleObjectProperty do + begin // Выбор типа монстра: + Caption := _lc[I_CAP_MONSTER_TYPE]; + lbTypeSelect.Items.Clear(); + + for b := MONSTER_DEMON to MONSTER_MAN do + lbTypeSelect.Items.Add(MonsterToStr(b)); + + lbTypeSelect.ItemIndex := StrToMonster(Values[Key]) - MONSTER_DEMON; + + if ShowModal() = mrOK then + begin + b := lbTypeSelect.ItemIndex + MONSTER_DEMON; + Values[Key] := MonsterToStr(b); + bApplyProperty.Click(); + end; + end + else if Key = _lc[I_PROP_TR_ITEM_TYPE] then + with ChooseTypeForm, vleObjectProperty do + begin // Выбор типа предмета: + Caption := _lc[I_CAP_ITEM_TYPE]; + lbTypeSelect.Items.Clear(); + + for b := ITEM_MEDKIT_SMALL to ITEM_KEY_BLUE do + lbTypeSelect.Items.Add(ItemToStr(b)); + lbTypeSelect.Items.Add(ItemToStr(ITEM_BOTTLE)); + lbTypeSelect.Items.Add(ItemToStr(ITEM_HELMET)); + lbTypeSelect.Items.Add(ItemToStr(ITEM_JETPACK)); + lbTypeSelect.Items.Add(ItemToStr(ITEM_INVIS)); + + b := StrToItem(Values[Key]); + if b >= ITEM_BOTTLE then + b := b - 2; + lbTypeSelect.ItemIndex := b - ITEM_MEDKIT_SMALL; + + if ShowModal() = mrOK then + begin + b := lbTypeSelect.ItemIndex + ITEM_MEDKIT_SMALL; + if b >= ITEM_WEAPON_KASTET then + b := b + 2; + Values[Key] := ItemToStr(b); + bApplyProperty.Click(); + end; + end + else if Key = _lc[I_PROP_TR_SHOT_TYPE] then + with ChooseTypeForm, vleObjectProperty do + begin // Выбор типа предмета: + Caption := _lc[I_PROP_TR_SHOT_TYPE]; + lbTypeSelect.Items.Clear(); + + for b := TRIGGER_SHOT_PISTOL to TRIGGER_SHOT_MAX do + lbTypeSelect.Items.Add(ShotToStr(b)); + + lbTypeSelect.ItemIndex := StrToShot(Values[Key]); + + if ShowModal() = mrOK then + begin + b := lbTypeSelect.ItemIndex; + Values[Key] := ShotToStr(b); + bApplyProperty.Click(); + end; + end + else if Key = _lc[I_PROP_TR_EFFECT_TYPE] then + with ChooseTypeForm, vleObjectProperty do + begin // Выбор типа эффекта: + Caption := _lc[I_CAP_FX_TYPE]; + lbTypeSelect.Items.Clear(); + + lbTypeSelect.Items.Add(_lc[I_PROP_TR_EFFECT_PARTICLE]); + lbTypeSelect.Items.Add(_lc[I_PROP_TR_EFFECT_ANIMATION]); + if Values[Key] = _lc[I_PROP_TR_EFFECT_ANIMATION] then + lbTypeSelect.ItemIndex := 1 + else + lbTypeSelect.ItemIndex := 0; + + if ShowModal() = mrOK then + begin + b := lbTypeSelect.ItemIndex; + if b = 0 then + Values[Key] := _lc[I_PROP_TR_EFFECT_PARTICLE] + else + Values[Key] := _lc[I_PROP_TR_EFFECT_ANIMATION]; + bApplyProperty.Click(); + end; + end + else if Key = _lc[I_PROP_TR_EFFECT_SUBTYPE] then + with ChooseTypeForm, vleObjectProperty do + begin // Выбор подтипа эффекта: + Caption := _lc[I_CAP_FX_TYPE]; + lbTypeSelect.Items.Clear(); + + if Values[_lc[I_PROP_TR_EFFECT_TYPE]] = _lc[I_PROP_TR_EFFECT_ANIMATION] then + begin + for b := EFFECT_TELEPORT to EFFECT_FIRE do + lbTypeSelect.Items.Add(EffectToStr(b)); + + lbTypeSelect.ItemIndex := StrToEffect(Values[Key]) - 1; + end else + begin + lbTypeSelect.Items.Add(_lc[I_PROP_TR_EFFECT_SLIQUID]); + lbTypeSelect.Items.Add(_lc[I_PROP_TR_EFFECT_LLIQUID]); + lbTypeSelect.Items.Add(_lc[I_PROP_TR_EFFECT_DLIQUID]); + lbTypeSelect.Items.Add(_lc[I_PROP_TR_EFFECT_BLOOD]); + lbTypeSelect.Items.Add(_lc[I_PROP_TR_EFFECT_SPARK]); + lbTypeSelect.Items.Add(_lc[I_PROP_TR_EFFECT_BUBBLE]); + lbTypeSelect.ItemIndex := TRIGGER_EFFECT_SLIQUID; + if Values[Key] = _lc[I_PROP_TR_EFFECT_LLIQUID] then + lbTypeSelect.ItemIndex := TRIGGER_EFFECT_LLIQUID; + if Values[Key] = _lc[I_PROP_TR_EFFECT_DLIQUID] then + lbTypeSelect.ItemIndex := TRIGGER_EFFECT_DLIQUID; + if Values[Key] = _lc[I_PROP_TR_EFFECT_BLOOD] then + lbTypeSelect.ItemIndex := TRIGGER_EFFECT_BLOOD; + if Values[Key] = _lc[I_PROP_TR_EFFECT_SPARK] then + lbTypeSelect.ItemIndex := TRIGGER_EFFECT_SPARK; + if Values[Key] = _lc[I_PROP_TR_EFFECT_BUBBLE] then + lbTypeSelect.ItemIndex := TRIGGER_EFFECT_BUBBLE; + end; + + if ShowModal() = mrOK then + begin + b := lbTypeSelect.ItemIndex; + + if Values[_lc[I_PROP_TR_EFFECT_TYPE]] = _lc[I_PROP_TR_EFFECT_ANIMATION] then + Values[Key] := EffectToStr(b + 1) + else begin + Values[Key] := _lc[I_PROP_TR_EFFECT_SLIQUID]; + if b = TRIGGER_EFFECT_LLIQUID then + Values[Key] := _lc[I_PROP_TR_EFFECT_LLIQUID]; + if b = TRIGGER_EFFECT_DLIQUID then + Values[Key] := _lc[I_PROP_TR_EFFECT_DLIQUID]; + if b = TRIGGER_EFFECT_BLOOD then + Values[Key] := _lc[I_PROP_TR_EFFECT_BLOOD]; + if b = TRIGGER_EFFECT_SPARK then + Values[Key] := _lc[I_PROP_TR_EFFECT_SPARK]; + if b = TRIGGER_EFFECT_BUBBLE then + Values[Key] := _lc[I_PROP_TR_EFFECT_BUBBLE]; + end; + + bApplyProperty.Click(); + end; + end + else if Key = _lc[I_PROP_TR_EFFECT_COLOR] then + with vleObjectProperty do + begin // Выбор цвета эффекта: + ColorDialog.Color := StrToIntDef(Values[Key], 0); + if ColorDialog.Execute then + begin + Values[Key] := IntToStr(ColorDialog.Color); + bApplyProperty.Click(); + end; + end + else if Key = _lc[I_PROP_PANEL_TEX] then + begin // Смена текстуры: + vleObjectProperty.Values[Key] := SelectedTexture(); + bApplyProperty.Click(); + end; +end; + +procedure TMainForm.aSaveMapExecute(Sender: TObject); +var + FileName, Section, Res: String; +begin + if OpenedMap = '' then + begin + aSaveMapAsExecute(nil); + Exit; + end; + + g_ProcessResourceStr(OpenedMap, FileName, Section, Res); + + SaveMap(FileName+':\'+Res); +end; + +procedure TMainForm.aOpenMapExecute(Sender: TObject); +begin + OpenDialog.Filter := _lc[I_FILE_FILTER_ALL]; + + if OpenDialog.Execute() then + begin + if (Pos('.ini', LowerCase(ExtractFileName(OpenDialog.FileName))) > 0) then + begin // INI карты: + FullClear(); + + pLoadProgress.Left := (RenderPanel.Width div 2)-(pLoadProgress.Width div 2); + pLoadProgress.Top := (RenderPanel.Height div 2)-(pLoadProgress.Height div 2); + pLoadProgress.Show(); + + OpenedMap := ''; + OpenedWAD := ''; + + LoadMapOld(OpenDialog.FileName); + + MainForm.Caption := Format('%s - %s', [FormCaption, ExtractFileName(OpenDialog.FileName)]); + + pLoadProgress.Hide(); + MainForm.FormResize(Self); + end + else // Карты из WAD: + begin + OpenMap(OpenDialog.FileName, ''); + end; + + OpenDialog.InitialDir := ExtractFileDir(OpenDialog.FileName); + end; +end; + +procedure TMainForm.FormActivate(Sender: TObject); +var + lang: Integer; + config: TConfig; +begin + MainForm.ActiveControl := RenderPanel; + +// Язык: + if gLanguage = '' then + begin + lang := SelectLanguageForm.ShowModal(); + case lang of + 1: gLanguage := LANGUAGE_ENGLISH; + else gLanguage := LANGUAGE_RUSSIAN; + end; + + config := TConfig.CreateFile(EditorDir+'\Editor.cfg'); + config.WriteStr('Editor', 'Language', gLanguage); + config.SaveFile(EditorDir+'\Editor.cfg'); + config.Free(); + end; + + //e_WriteLog('Read language file', MSG_NOTIFY); + //g_Language_Load(EditorDir+'\data\'+gLanguage+LANGUAGE_FILE_NAME); + g_Language_Set(gLanguage); +end; + +procedure TMainForm.aDeleteMap(Sender: TObject); +var + WAD: TWADEditor_1; + MapList: SArray; + MapName: Char16; + a: Integer; + str: String; +begin + OpenDialog.Filter := _lc[I_FILE_FILTER_WAD]; + + if not OpenDialog.Execute() then + Exit; + + WAD := TWADEditor_1.Create(); + + if not WAD.ReadFile(OpenDialog.FileName) then + begin + WAD.Free(); + Exit; + end; + + WAD.CreateImage(); + + MapList := WAD.GetResourcesList(''); + + SelectMapForm.lbMapList.Items.Clear(); + + if MapList <> nil then + for a := 0 to High(MapList) do + SelectMapForm.lbMapList.Items.Add(MapList[a]); + + if (SelectMapForm.ShowModal() = mrOK) then + begin + str := SelectMapForm.lbMapList.Items[SelectMapForm.lbMapList.ItemIndex]; + MapName := ''; + CopyMemory(@MapName[0], @str[1], Min(16, Length(str))); + + if MessageBox(0, PChar(Format(_lc[I_MSG_DELETE_MAP_PROMT], + [MapName, OpenDialog.FileName])), + PChar(_lc[I_MSG_DELETE_MAP]), + MB_ICONQUESTION or MB_YESNO or + MB_TASKMODAL or MB_DEFBUTTON2) <> mrYes then + Exit; + + WAD.RemoveResource('', MapName); + + MessageBox(0, PChar(Format(_lc[I_MSG_MAP_DELETED_PROMT], + [MapName])), + PChar(_lc[I_MSG_MAP_DELETED]), + MB_ICONINFORMATION or MB_OK or + MB_TASKMODAL or MB_DEFBUTTON1); + + WAD.SaveTo(OpenDialog.FileName); + + // Удалили текущую карту - сохранять по старому ее нельзя: + if OpenedMap = (OpenDialog.FileName+':\'+MapName) then + begin + OpenedMap := ''; + OpenedWAD := ''; + MainForm.Caption := FormCaption; + end; + end; + + WAD.Free(); +end; + +procedure TMainForm.vleObjectPropertyKeyDown(Sender: TObject; + var Key: Word; Shift: TShiftState); +begin + if Key = VK_RETURN then + bApplyProperty.Click(); +end; + +procedure MovePanel(var ID: DWORD; MoveType: Byte); +var + _id, a: Integer; + tmp: TPanel; +begin + if (ID = 0) and (MoveType = 0) then + Exit; + if (ID = DWORD(High(gPanels))) and (MoveType <> 0) then + Exit; + if (ID > DWORD(High(gPanels))) then + Exit; + + _id := Integer(ID); + + if MoveType = 0 then // to Back + begin + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + with gTriggers[a] do + begin + if TriggerType = TRIGGER_NONE then + Continue; + + if TexturePanel = _id then + TexturePanel := 0 + else + if (TexturePanel >= 0) and (TexturePanel < _id) then + Inc(TexturePanel); + + case TriggerType of + TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, TRIGGER_DOOR, + TRIGGER_DOOR5, TRIGGER_CLOSETRAP, TRIGGER_TRAP, + TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, TRIGGER_LIFT: + if Data.PanelID = _id then + Data.PanelID := 0 + else + if (Data.PanelID >= 0) and (Data.PanelID < _id) then + Inc(Data.PanelID); + + TRIGGER_SHOT: + if Data.ShotPanelID = _id then + Data.ShotPanelID := 0 + else + if (Data.ShotPanelID >= 0) and (Data.ShotPanelID < _id) then + Inc(Data.ShotPanelID); + end; + end; + + tmp := gPanels[_id]; + + for a := _id downto 1 do + gPanels[a] := gPanels[a-1]; + + gPanels[0] := tmp; + + ID := 0; + end + else // to Front + begin + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + with gTriggers[a] do + begin + if TriggerType = TRIGGER_NONE then + Continue; + + if TexturePanel = _id then + TexturePanel := High(gPanels) + else + if TexturePanel > _id then + Dec(TexturePanel); + + case TriggerType of + TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, TRIGGER_DOOR, + TRIGGER_DOOR5, TRIGGER_CLOSETRAP, TRIGGER_TRAP, + TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, TRIGGER_LIFT: + if Data.PanelID = _id then + Data.PanelID := High(gPanels) + else + if Data.PanelID > _id then + Dec(Data.PanelID); + + TRIGGER_SHOT: + if Data.ShotPanelID = _id then + Data.ShotPanelID := High(gPanels) + else + if Data.ShotPanelID > _id then + Dec(Data.ShotPanelID); + end; + end; + + tmp := gPanels[_id]; + + for a := _id to High(gPanels)-1 do + gPanels[a] := gPanels[a+1]; + + gPanels[High(gPanels)] := tmp; + + ID := High(gPanels); + end; +end; + +procedure TMainForm.aMoveToBack(Sender: TObject); +var + a: Integer; +begin + if SelectedObjects = nil then + Exit; + + for a := 0 to High(SelectedObjects) do + with SelectedObjects[a] do + if Live and (ObjectType = OBJECT_PANEL) then + begin + SelectedObjects[0] := SelectedObjects[a]; + SetLength(SelectedObjects, 1); + MovePanel(ID, 0); + FillProperty(); + Break; + end; +end; + +procedure TMainForm.aMoveToFore(Sender: TObject); +var + a: Integer; +begin + if SelectedObjects = nil then + Exit; + + for a := 0 to High(SelectedObjects) do + with SelectedObjects[a] do + if Live and (ObjectType = OBJECT_PANEL) then + begin + SelectedObjects[0] := SelectedObjects[a]; + SetLength(SelectedObjects, 1); + MovePanel(ID, 1); + FillProperty(); + Break; + end; +end; + +procedure TMainForm.aSaveMapAsExecute(Sender: TObject); +var + idx: Integer; +begin + SaveDialog.Filter := _lc[I_FILE_FILTER_WAD]; + + if not SaveDialog.Execute() then + Exit; + + SaveMapForm.GetMaps(SaveDialog.FileName, True); + + if SaveMapForm.ShowModal() <> mrOK then + Exit; + + SaveDialog.InitialDir := ExtractFileDir(SaveDialog.FileName); + OpenedMap := SaveDialog.FileName+':\'+SaveMapForm.eMapName.Text; + OpenedWAD := SaveDialog.FileName; + + idx := RecentFiles.IndexOf(OpenedMap); +// Такая карта уже недавно открывалась: + if idx >= 0 then + RecentFiles.Delete(idx); + RecentFiles.Insert(0, OpenedMap); + RefreshRecentMenu; + + SaveMap(OpenedMap); + + gMapInfo.FileName := SaveDialog.FileName; + gMapInfo.MapName := SaveMapForm.eMapName.Text; + UpdateCaption(gMapInfo.Name, ExtractFileName(gMapInfo.FileName), gMapInfo.MapName); +end; + +procedure TMainForm.aSelectAllExecute(Sender: TObject); +var + a: Integer; +begin + RemoveSelectFromObjects(); + + case pcObjects.ActivePageIndex+1 of + OBJECT_PANEL: + if gPanels <> nil then + for a := 0 to High(gPanels) do + if gPanels[a].PanelType <> PANEL_NONE then + SelectObject(OBJECT_PANEL, a, True); + OBJECT_ITEM: + if gItems <> nil then + for a := 0 to High(gItems) do + if gItems[a].ItemType <> ITEM_NONE then + SelectObject(OBJECT_ITEM, a, True); + OBJECT_MONSTER: + if gMonsters <> nil then + for a := 0 to High(gMonsters) do + if gMonsters[a].MonsterType <> MONSTER_NONE then + SelectObject(OBJECT_MONSTER, a, True); + OBJECT_AREA: + if gAreas <> nil then + for a := 0 to High(gAreas) do + if gAreas[a].AreaType <> AREA_NONE then + SelectObject(OBJECT_AREA, a, True); + OBJECT_TRIGGER: + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + if gTriggers[a].TriggerType <> TRIGGER_NONE then + SelectObject(OBJECT_TRIGGER, a, True); + end; +end; + +procedure TMainForm.tbGridOnClick(Sender: TObject); +begin + DotEnable := not DotEnable; + (Sender as TToolButton).Down := DotEnable; +end; + +procedure TMainForm.OnIdle(Sender: TObject; var Done: Boolean); +begin + Draw(); +end; + +procedure TMainForm.miMapPreviewClick(Sender: TObject); +begin + if not PreviewMode then + begin + Splitter2.Visible := False; + Splitter1.Visible := False; + StatusBar.Visible := False; + PanelObjs.Visible := False; + PanelProps.Visible := False; + MainToolBar.Visible := False; + sbHorizontal.Visible := False; + sbVertical.Visible := False; + end + else + begin + StatusBar.Visible := True; + PanelObjs.Visible := True; + PanelProps.Visible := True; + Splitter2.Visible := True; + Splitter1.Visible := True; + MainToolBar.Visible := True; + sbHorizontal.Visible := True; + sbVertical.Visible := True; + end; + + PreviewMode := not PreviewMode; + (Sender as TMenuItem).Checked := PreviewMode; +end; + +procedure TMainForm.miLayer1Click(Sender: TObject); +begin + SwitchLayer(LAYER_BACK); +end; + +procedure TMainForm.miLayer2Click(Sender: TObject); +begin + SwitchLayer(LAYER_WALLS); +end; + +procedure TMainForm.miLayer3Click(Sender: TObject); +begin + SwitchLayer(LAYER_FOREGROUND); +end; + +procedure TMainForm.miLayer4Click(Sender: TObject); +begin + SwitchLayer(LAYER_STEPS); +end; + +procedure TMainForm.miLayer5Click(Sender: TObject); +begin + SwitchLayer(LAYER_WATER); +end; + +procedure TMainForm.miLayer6Click(Sender: TObject); +begin + SwitchLayer(LAYER_ITEMS); +end; + +procedure TMainForm.miLayer7Click(Sender: TObject); +begin + SwitchLayer(LAYER_MONSTERS); +end; + +procedure TMainForm.miLayer8Click(Sender: TObject); +begin + SwitchLayer(LAYER_AREAS); +end; + +procedure TMainForm.miLayer9Click(Sender: TObject); +begin + SwitchLayer(LAYER_TRIGGERS); +end; + +procedure TMainForm.tbShowClick(Sender: TObject); +var + a: Integer; + b: Boolean; +begin + b := True; + for a := 0 to High(LayerEnabled) do + b := b and LayerEnabled[a]; + + b := not b; + + ShowLayer(LAYER_BACK, b); + ShowLayer(LAYER_WALLS, b); + ShowLayer(LAYER_FOREGROUND, b); + ShowLayer(LAYER_STEPS, b); + ShowLayer(LAYER_WATER, b); + ShowLayer(LAYER_ITEMS, b); + ShowLayer(LAYER_MONSTERS, b); + ShowLayer(LAYER_AREAS, b); + ShowLayer(LAYER_TRIGGERS, b); +end; + +procedure TMainForm.miMiniMapClick(Sender: TObject); +begin + SwitchMap(); +end; + +procedure TMainForm.miSwitchGridClick(Sender: TObject); +begin + if DotStep = DotStepOne then + DotStep := DotStepTwo + else + DotStep := DotStepOne; + + MousePos.X := (MousePos.X div DotStep) * DotStep; + MousePos.Y := (MousePos.Y div DotStep) * DotStep; +end; + +procedure TMainForm.miShowEdgesClick(Sender: TObject); +begin + ShowEdges(); +end; + +procedure TMainForm.miSnapToGridClick(Sender: TObject); +begin + SnapToGrid := not SnapToGrid; + + MousePos.X := (MousePos.X div DotStep) * DotStep; + MousePos.Y := (MousePos.Y div DotStep) * DotStep; + + miSnapToGrid.Checked := SnapToGrid; +end; + +procedure TMainForm.minexttabClick(Sender: TObject); +begin + if pcObjects.ActivePageIndex < pcObjects.PageCount-1 then + pcObjects.ActivePageIndex := pcObjects.ActivePageIndex+1 + else + pcObjects.ActivePageIndex := 0; +end; + +procedure TMainForm.miSaveMiniMapClick(Sender: TObject); +begin + SaveMiniMapForm.ShowModal(); +end; + +procedure TMainForm.bClearTextureClick(Sender: TObject); +begin + lbTextureList.ItemIndex := -1; + lTextureWidth.Caption := ''; + lTextureHeight.Caption := ''; +end; + +procedure TMainForm.miPackMapClick(Sender: TObject); +begin + PackMapForm.ShowModal(); +end; + +procedure TMainForm.miMapTestSettingsClick(Sender: TObject); +begin + MapTestForm.ShowModal(); +end; + +procedure TMainForm.miTestMapClick(Sender: TObject); +var + cmd, mapWAD, mapToRun: String; + opt: LongWord; + time: Integer; + lpMsgBuf: PChar; +begin + // Сохраняем временную карту: + time := 0; + repeat + mapWAD := ExtractFilePath(TestD2dExe) + Format('maps\temp%.4d.wad', [time]); + Inc(time); + until not FileExists(mapWAD); + mapToRun := mapWAD + ':\' + TEST_MAP_NAME; + SaveMap(mapToRun); + + mapToRun := ExtractRelativePath(ExtractFilePath(TestD2dExe) + 'maps\', mapToRun); + +// Опции игры: + opt := 32 + 64; + if TestOptionsTwoPlayers then + opt := opt + 1; + if TestOptionsTeamDamage then + opt := opt + 2; + if TestOptionsAllowExit then + opt := opt + 4; + if TestOptionsWeaponStay then + opt := opt + 8; + if TestOptionsMonstersDM then + opt := opt + 16; + +// Составляем командную строку: + cmd := ' -map "' + mapToRun + '"'; + cmd := cmd + ' -gm ' + TestGameMode; + cmd := cmd + ' -limt ' + TestLimTime; + cmd := cmd + ' -lims ' + TestLimScore; + cmd := cmd + ' -opt ' + IntToStr(opt); + + if TestMapOnce then + cmd := cmd + ' --close'; + + cmd := cmd + ' --debug'; + cmd := cmd + ' --tempdelete'; + +// Запускаем: + Application.Minimize(); + if ExecuteProcess(TestD2dExe, cmd) < 0 then + begin + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER or FORMAT_MESSAGE_FROM_SYSTEM, + nil, GetLastError(), LANG_SYSTEM_DEFAULT, + @lpMsgBuf, 0, nil); + MessageBox(0, lpMsgBuf, + PChar(_lc[I_MSG_EXEC_ERROR]), + MB_OK or MB_ICONERROR); + end; + + SysUtils.DeleteFile(mapWAD); + Application.Restore(); +end; + +procedure TMainForm.sbVerticalScroll(Sender: TObject; + ScrollCode: TScrollCode; var ScrollPos: Integer); +begin + MapOffset.Y := -Normalize16(sbVertical.Position); +end; + +procedure TMainForm.sbHorizontalScroll(Sender: TObject; + ScrollCode: TScrollCode; var ScrollPos: Integer); +begin + MapOffset.X := -Normalize16(sbHorizontal.Position); +end; + +procedure TMainForm.miOpenWadMapClick(Sender: TObject); +begin + if OpenedWAD <> '' then + begin + OpenMap(OpenedWAD, ''); + end; +end; + +procedure TMainForm.selectall1Click(Sender: TObject); +var + a: Integer; +begin + RemoveSelectFromObjects(); + + if gPanels <> nil then + for a := 0 to High(gPanels) do + if gPanels[a].PanelType <> PANEL_NONE then + SelectObject(OBJECT_PANEL, a, True); + + if gItems <> nil then + for a := 0 to High(gItems) do + if gItems[a].ItemType <> ITEM_NONE then + SelectObject(OBJECT_ITEM, a, True); + + if gMonsters <> nil then + for a := 0 to High(gMonsters) do + if gMonsters[a].MonsterType <> MONSTER_NONE then + SelectObject(OBJECT_MONSTER, a, True); + + if gAreas <> nil then + for a := 0 to High(gAreas) do + if gAreas[a].AreaType <> AREA_NONE then + SelectObject(OBJECT_AREA, a, True); + + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + if gTriggers[a].TriggerType <> TRIGGER_NONE then + SelectObject(OBJECT_TRIGGER, a, True); +end; + +procedure TMainForm.Splitter1CanResize(Sender: TObject; + var NewSize: Integer; var Accept: Boolean); +begin + Accept := (NewSize > 140); +end; + +procedure TMainForm.Splitter2CanResize(Sender: TObject; + var NewSize: Integer; var Accept: Boolean); +begin + Accept := (NewSize > 110); +end; + +procedure TMainForm.vleObjectPropertyEnter(Sender: TObject); +begin + EditingProperties := True; +end; + +procedure TMainForm.vleObjectPropertyExit(Sender: TObject); +begin + EditingProperties := False; +end; + +procedure TMainForm.FormKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin +// Объекты передвигались: + if MainForm.ActiveControl = RenderPanel then + begin + if (Key = VK_NUMPAD4) or + (Key = VK_NUMPAD6) or + (Key = VK_NUMPAD8) or + (Key = VK_NUMPAD5) or + (Key = Ord('V')) then + FillProperty(); + end; +end; + +{ +procedure TMainForm.lbTextureListDrawItem(Control: TWinControl; Index: Integer; + Rect: TRect; State: LCLType.TOwnerDrawState); +begin + with Control as TListBox do + begin + if LCLType.odSelected in State then + begin + Canvas.Brush.Color := clHighlight; + Canvas.Font.Color := clHighlightText; + end else + if (Items <> nil) and (Index >= 0) then + if slInvalidTextures.IndexOf(Items[Index]) > -1 then + begin + Canvas.Brush.Color := clRed; + Canvas.Font.Color := clWhite; + end; + Canvas.FillRect(Rect); + Canvas.TextRect(Rect, Rect.Left, Rect.Top, Items[Index]); + end; +end; +} +end. diff --git a/src/editor/f_mapcheck.lfm b/src/editor/f_mapcheck.lfm new file mode 100644 index 0000000..d7a10fe --- /dev/null +++ b/src/editor/f_mapcheck.lfm @@ -0,0 +1,70 @@ +object MapCheckForm: TMapCheckForm + Left = 238 + Top = 224 + Width = 525 + Height = 199 + BorderIcons = [biSystemMenu] + BorderStyle = bsSizeToolWin + Caption = 'Проверка карты' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poScreenCenter + PixelsPerInch = 96 + object PanelResults: TPanel + Left = 0 + Top = 85 + Width = 509 + Height = 76 + Align = alBottom + BevelOuter = bvNone + TabOrder = 0 + object bClose: TButton + Left = 439 + Top = 48 + Width = 75 + Height = 25 + Anchors = [akRight, akBottom] + Cancel = True + Caption = 'Закрыть' + TabOrder = 1 + OnClick = bCloseClick + end + object bCheckMap: TButton + Left = 327 + Top = 48 + Width = 105 + Height = 25 + Anchors = [akRight, akBottom] + Caption = 'Проверить заново' + Default = True + TabOrder = 0 + OnClick = bCheckMapClick + end + object mErrorDescription: TMemo + Left = 0 + Top = 0 + Width = 509 + Height = 41 + Align = alTop + Color = clBtnFace + ReadOnly = True + TabOrder = 2 + WantReturns = False + end + end + object lbErrorList: TListBox + Left = 0 + Top = 0 + Width = 509 + Height = 85 + Align = alClient + ItemHeight = 13 + TabOrder = 1 + OnClick = lbErrorListClick + end +end diff --git a/src/editor/f_mapcheck.pas b/src/editor/f_mapcheck.pas new file mode 100644 index 0000000..0bd323d --- /dev/null +++ b/src/editor/f_mapcheck.pas @@ -0,0 +1,160 @@ +unit f_mapcheck; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, g_basic; + +type + TMapCheckForm = class (TForm) + PanelResults: TPanel; + lbErrorList: TListBox; + mErrorDescription: TMemo; + bCheckMap: TButton; + bClose: TButton; + + procedure bCloseClick(Sender: TObject); + procedure bCheckMapClick(Sender: TObject); + procedure lbErrorListClick(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + MapCheckForm: TMapCheckForm; + ErrorsNum: Array of Byte; + +implementation + +uses + f_main, g_map, MAPDEF, g_language; + +{$R *.lfm} + +procedure TMapCheckForm.bCloseClick(Sender: TObject); +begin + Close(); +end; + +procedure TMapCheckForm.bCheckMapClick(Sender: TObject); +var + a: Integer; + b, bb, bbb: Integer; + c: Boolean; + +begin + lbErrorList.Clear(); + mErrorDescription.Clear(); + ErrorsNum := nil; + +// Проверяем пересечение точек появления с картой: + if gAreas <> nil then + for a := 0 to High(gAreas) do + begin + if gAreas[a].AreaType in [AREA_PLAYERPOINT1, AREA_PLAYERPOINT2, + AREA_DMPOINT, AREA_REDTEAMPOINT, + AREA_BLUETEAMPOINT] then + with gAreas[a] do + begin + c := False; + if gPanels <> nil then + for b := 0 to High(gPanels) do + if gPanels[b].PanelType = PANEL_CLOSEDOOR then + if ObjectCollide(OBJECT_AREA, a, + gPanels[b].X, gPanels[b].Y, + gPanels[b].Width, gPanels[b].Height) then + begin + c := True; + Break; + end; + + if c or ObjectCollideLevel(a, OBJECT_AREA, 0, 0) then + begin + lbErrorList.Items.Add(Format(_lc[I_TEST_AREA_WALL_STR], [a, X, Y])); + SetLength(ErrorsNum, Length(ErrorsNum)+1); + ErrorsNum[High(ErrorsNum)] := 1; + end; + end; + end; + +// Проверяем пересечение монстров с картой: + if gMonsters <> nil then + for a := 0 to High(gMonsters) do + if gMonsters[a].MonsterType <> MONSTER_NONE then + begin + with gMonsters[a] do + begin + c := False; + if gPanels <> nil then + for b := 0 to High(gPanels) do + if gPanels[b].PanelType = PANEL_CLOSEDOOR then + if ObjectCollide(OBJECT_MONSTER, a, + gPanels[b].X, gPanels[b].Y, + gPanels[b].Width, gPanels[b].Height) then + begin + c := True; + Break; + end; + + if c or ObjectCollideLevel(a, OBJECT_MONSTER, 0, 0) then + begin + lbErrorList.Items.Add(Format(_lc[I_TEST_MONSTER_WALL_STR], [a, X, Y])); + SetLength(ErrorsNum, Length(ErrorsNum)+1); + ErrorsNum[High(ErrorsNum)] := 5; + end; + end; + end; + + b := 0; + bb := 0; + bbb := 0; + + if gAreas <> nil then + for a := 0 to High(gAreas) do + case gAreas[a].AreaType of + AREA_PLAYERPOINT1: Inc(b); + AREA_PLAYERPOINT2: Inc(bb); + AREA_DMPOINT, AREA_REDTEAMPOINT, + AREA_BLUETEAMPOINT: Inc(bbb); + end; + + if b > 1 then + begin + lbErrorList.Items.Add(_lc[I_TEST_SPAWNS_1]); + SetLength(ErrorsNum, Length(ErrorsNum)+1); + ErrorsNum[High(ErrorsNum)] := 2; + end; + + if bb > 1 then + begin + lbErrorList.Items.Add(_lc[I_TEST_SPAWNS_2]); + SetLength(ErrorsNum, Length(ErrorsNum)+1); + ErrorsNum[High(ErrorsNum)] := 3; + end; + + if bbb = 0 then + begin + lbErrorList.Items.Add(_lc[I_TEST_NO_DM]); + SetLength(ErrorsNum, Length(ErrorsNum)+1); + ErrorsNum[High(ErrorsNum)] := 4; + end; +end; + +procedure TMapCheckForm.lbErrorListClick(Sender: TObject); +begin + if lbErrorList.ItemIndex <> -1 then + case ErrorsNum[lbErrorList.ItemIndex] of + 1: mErrorDescription.Text := _lc[I_TEST_AREA_WALL]; + 2, 3: mErrorDescription.Text := _lc[I_TEST_SPAWNS]; + 4: mErrorDescription.Text := _lc[I_TEST_NO_DM_EX]; + 5: mErrorDescription.Text := _lc[I_TEST_MONSTER_WALL]; + end; +end; + +end. diff --git a/src/editor/f_mapoptimization.lfm b/src/editor/f_mapoptimization.lfm new file mode 100644 index 0000000..9a9ed0c --- /dev/null +++ b/src/editor/f_mapoptimization.lfm @@ -0,0 +1,174 @@ +object MapOptimizationForm: TMapOptimizationForm + Left = 268 + Top = 189 + BorderIcons = [biSystemMenu] + BorderStyle = bsToolWindow + Caption = 'Оптимизация карты' + ClientHeight = 275 + ClientWidth = 433 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + FormStyle = fsStayOnTop + Position = poScreenCenter + OnActivate = FormActivate + PixelsPerInch = 96 + object GroupBoxOpt: TGroupBox + Left = 0 + Top = 0 + Width = 257 + Height = 193 + Caption = 'Оптимизация' + TabOrder = 0 + object Bevel1: TBevel + Left = 6 + Top = 66 + Width = 241 + Height = 105 + end + object lOptimizationDescription: TLabel + Left = 10 + Top = 70 + Width = 232 + Height = 93 + AutoSize = False + WordWrap = True + end + object rbTexturesOptimization: TRadioButton + Left = 6 + Top = 10 + Width = 137 + Height = 17 + Caption = 'Оптимизация текстур' + TabOrder = 0 + OnClick = rbTexturesOptimizationClick + end + object rbPanelsOptimization: TRadioButton + Left = 6 + Top = 34 + Width = 137 + Height = 17 + Caption = 'Оптимизация панелей' + TabOrder = 1 + OnClick = rbPanelsOptimizationClick + end + end + object pcOptimizationOptions: TPageControl + Left = 264 + Top = 3 + Width = 169 + Height = 190 + ActivePage = tsTextureOptimization + TabOrder = 1 + object tsTextureOptimization: TTabSheet + TabVisible = False + object bBeginTextureOptimization: TButton + Left = 8 + Top = 8 + Width = 145 + Height = 25 + Caption = 'Начать' + TabOrder = 0 + OnClick = bBeginTextureOptimizationClick + end + end + object tsPanelOptimization: TTabSheet + ImageIndex = 1 + TabVisible = False + object cbOptimizeWalls: TCheckBox + Left = 8 + Top = 0 + Width = 97 + Height = 17 + Caption = 'Стены' + TabOrder = 0 + end + object bBeginPanelsOptimization: TButton + Left = 8 + Top = 152 + Width = 145 + Height = 25 + Caption = 'Начать' + TabOrder = 1 + OnClick = bBeginPanelsOptimizationClick + end + object cbOptimizeForeGround: TCheckBox + Left = 8 + Top = 16 + Width = 97 + Height = 17 + Caption = 'Передний план' + TabOrder = 2 + end + object cbOptimizeBackGround: TCheckBox + Left = 8 + Top = 32 + Width = 97 + Height = 17 + Caption = 'Задний план' + TabOrder = 3 + end + object cbOptimizeSteps: TCheckBox + Left = 8 + Top = 48 + Width = 97 + Height = 17 + Caption = 'Ступени' + TabOrder = 4 + end + object cbOptimizeWater: TCheckBox + Left = 8 + Top = 64 + Width = 97 + Height = 17 + Caption = 'Вода' + TabOrder = 5 + end + object cbOptimizeAcid1: TCheckBox + Left = 8 + Top = 80 + Width = 97 + Height = 17 + Caption = 'Кислота 1' + TabOrder = 6 + end + object cbOptimizeAcid2: TCheckBox + Left = 8 + Top = 96 + Width = 97 + Height = 17 + Caption = 'Кислота 2' + TabOrder = 7 + end + object cbOptimizeLift: TCheckBox + Left = 8 + Top = 112 + Width = 97 + Height = 17 + Caption = 'Лифты' + TabOrder = 8 + end + object cbOptimizeBlockMon: TCheckBox + Left = 8 + Top = 128 + Width = 145 + Height = 17 + Caption = 'Блокиратор монстров' + TabOrder = 9 + end + end + end + object mOptimizationResult: TMemo + Left = 0 + Top = 200 + Width = 433 + Height = 73 + ReadOnly = True + ScrollBars = ssVertical + TabOrder = 2 + WantReturns = False + end +end diff --git a/src/editor/f_mapoptimization.pas b/src/editor/f_mapoptimization.pas new file mode 100644 index 0000000..56eb889 --- /dev/null +++ b/src/editor/f_mapoptimization.pas @@ -0,0 +1,348 @@ +unit f_mapoptimization; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls, + ComCtrls, ExtCtrls; + +type + TMapOptimizationForm = class (TForm) + // Выбор оптимизации: + GroupBoxOpt: TGroupBox; + Bevel1: TBevel; + lOptimizationDescription: TLabel; + rbTexturesOptimization: TRadioButton; + rbPanelsOptimization: TRadioButton; + // Результаты: + mOptimizationResult: TMemo; + // Настройки: + pcOptimizationOptions: TPageControl; + // Оптимизация текстур: + tsTextureOptimization: TTabSheet; + bBeginTextureOptimization: TButton; + // Оптимизация панелей: + tsPanelOptimization: TTabSheet; + cbOptimizeWalls: TCheckBox; + cbOptimizeForeGround: TCheckBox; + cbOptimizeBackGround: TCheckBox; + cbOptimizeSteps: TCheckBox; + cbOptimizeWater: TCheckBox; + cbOptimizeAcid1: TCheckBox; + cbOptimizeAcid2: TCheckBox; + cbOptimizeLift: TCheckBox; + cbOptimizeBlockMon: TCheckBox; + bBeginPanelsOptimization: TButton; + + procedure FormActivate(Sender: TObject); + procedure rbTexturesOptimizationClick(Sender: TObject); + procedure rbPanelsOptimizationClick(Sender: TObject); + procedure bBeginTextureOptimizationClick(Sender: TObject); + procedure bBeginPanelsOptimizationClick(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + MapOptimizationForm: TMapOptimizationForm; + +implementation + +uses + f_main, g_map, g_textures, MAPDEF, g_language; + +{$R *.lfm} + +procedure TMapOptimizationForm.FormActivate(Sender: TObject); +begin + rbTexturesOptimization.Checked := True; + mOptimizationResult.Clear(); +end; + +procedure TMapOptimizationForm.rbTexturesOptimizationClick(Sender: TObject); +begin + pcOptimizationOptions.ActivePage := tsTextureOptimization; + lOptimizationDescription.Caption := _lc[I_CTRL_OPT_DESC_TEXTURE]; +end; + +procedure TMapOptimizationForm.rbPanelsOptimizationClick(Sender: TObject); +begin + pcOptimizationOptions.ActivePage := tsPanelOptimization; + lOptimizationDescription.Caption := _lc[I_CTRL_OPT_DESC_PANEL]; +end; + +procedure TMapOptimizationForm.bBeginTextureOptimizationClick( + Sender: TObject); +var + i: Integer; + a: Integer; + ok: Boolean; + b: Boolean; + c: Integer; + +begin + mOptimizationResult.Clear(); + b := False; + + if MainForm.lbTextureList.Count = 0 then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_NO_TEXTURES]); + Exit; + end; + + c := MainForm.lbTextureList.Count; + a := 0; + + while a <= MainForm.lbTextureList.Count-1 do + begin + ok := True; + + for i := 0 to High(gPanels) do + if (gPanels[i].PanelType <> 0) and + (gPanels[i].TextureName = MainForm.lbTextureList.Items[a]) then + begin + ok := False; + Break; + end; + + // Нашли неиспользуемую текстуру: + if ok then + begin + g_DeleteTexture(MainForm.lbTextureList.Items[a]); + if not b then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_DELETED_TEXTURES]); + b := True; + end; + mOptimizationResult.Lines.Add(' '+MainForm.lbTextureList.Items[a]); + g_DeleteTexture(MainForm.lbTextureList.Items[a]); + MainForm.lbTextureList.Items.Delete(a); + end + else + a := a + 1; + end; + + with mOptimizationResult.Lines do + begin + Add(#13#10+_lc[I_OPT_TOTAL_TEXTURES]+' '+#9+IntToStr(c)); + Add(_lc[I_OPT_TEX_DELETED]+#9+IntToStr(c-MainForm.lbTextureList.Count)); + end; +end; + +procedure TMapOptimizationForm.bBeginPanelsOptimizationClick( + Sender: TObject); + + function OptimizePanels(PanelsType: Word): Integer; + var + a, c: Boolean; + i, n, b: Integer; + list: Array of DWORD; + + begin + Result := 0; + + // Составляем список переключаемых лифтов: + list := nil; + if WordBool(PanelsType and (PANEL_LIFTUP or PANEL_LIFTDOWN or PANEL_LIFTLEFT or PANEL_LIFTRIGHT)) then + begin + SetLength(list, 32); + n := 0; + + if gTriggers <> nil then + for i := 0 to High(gTriggers) do + if (gTriggers[i].Data.PanelID <> -1) and + ((gTriggers[i].TriggerType = TRIGGER_LIFT) or + (gTriggers[i].TriggerType = TRIGGER_LIFTUP) or + (gTriggers[i].TriggerType = TRIGGER_LIFTDOWN)) then + begin + if n > High(list) then + SetLength(list, Length(list)+32); + list[n] := gTriggers[i].Data.PanelID; + n := n + 1; + end; + + SetLength(list, n); + end; + + // Оптимизация: + a := True; + while a do + begin + a := False; + + for i := 0 to High(gPanels) do + if gPanels[i].PanelType <> PANEL_NONE then + begin + c := False; + if list <> nil then + for b := 0 to High(list) do + if list[b] = DWORD(i) then + begin + c := True; + Break; + end; + + // Это переключаемый лифт: + if c then + Continue; + + for n := 0 to High(gPanels) do + if gPanels[i].PanelType <> PANEL_NONE then + begin + c := False; + if list <> nil then + for b := 0 to High(list) do + if list[b] = DWORD(n) then + begin + c := True; + Break; + end; + + // Это тоже переключаемый лифт: + if c then + Continue; + + // Если можно - объединяем панели: + if (gPanels[i].PanelType <> 0) and + (gPanels[n].PanelType <> 0) then + begin + if (i <> n) and + (gPanels[i].Width <> 0) and + (gPanels[n].Width <> 0) and + (gPanels[n].TextureID = gPanels[i].TextureID) and + (gPanels[n].PanelType = gPanels[i].PanelType) and + (gPanels[n].PanelType = PanelsType) and + (gPanels[n].Alpha = gPanels[i].Alpha) and + (gPanels[n].Blending = gPanels[i].Blending) and + (gPanels[n].TextureName = gPanels[i].TextureName) then + begin + // Рядом по-горизонтали: + if (gPanels[n].X = gPanels[i].X + gPanels[i].Width) and + (gPanels[n].Y = gPanels[i].Y) and + (gPanels[n].Height = gPanels[i].Height) then + begin + gPanels[i].Width := gPanels[i].Width+gPanels[n].Width; + RemoveObject(n, OBJECT_PANEL); + a := True; + Inc(Result); + Continue; + end; + + // Рядом по-вертикали: + if (gPanels[n].Y = gPanels[i].Y + gPanels[i].Height) and + (gPanels[n].X = gPanels[i].X) and + (gPanels[n].Width = gPanels[i].Width) then + begin + gPanels[i].Height := gPanels[i].Height+gPanels[n].Height; + RemoveObject(n, OBJECT_PANEL); + a := True; + Inc(Result); + Continue; + end; + end; + end; + end; + end; + end; + end; + +var + count: Integer; + panelcount1, panelcount2: Integer; + a: Integer; + +begin + mOptimizationResult.Clear(); + + if gPanels = nil then + Exit; + + panelcount1 := 0; + for a := 0 to High(gPanels) do + if gPanels[a].PanelType <> 0 then + panelcount1 := panelcount1 + 1; + + if panelcount1 = 0 then + Exit; + + if cbOptimizeWalls.Checked then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_WALLS]); + count := OptimizePanels(PANEL_WALL); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_OPT]+' '+IntToStr(count)+#13#10); + end; + + if cbOptimizeForeGround.Checked then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_FORES]); + count := OptimizePanels(PANEL_FORE); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_OPT]+' '+IntToStr(count)+#13#10); + end; + + if cbOptimizeBackGround.Checked then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_BACKS]); + count := OptimizePanels(PANEL_BACK); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_OPT]+' '+IntToStr(count)+#13#10); + end; + + if cbOptimizeSteps.Checked then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_STAIRS]); + count := OptimizePanels(PANEL_STEP); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_OPT]+' '+IntToStr(count)+#13#10); + end; + + if cbOptimizeWater.Checked then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_WATER]); + count := OptimizePanels(PANEL_WATER); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_OPT]+' '+IntToStr(count)+#13#10); + end; + + if cbOptimizeAcid1.Checked then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_ACID1]); + count := OptimizePanels(PANEL_ACID1); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_OPT]+' '+IntToStr(count)+#13#10); + end; + + if cbOptimizeAcid2.Checked then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_ACID2]); + count := OptimizePanels(PANEL_ACID2); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_OPT]+' '+IntToStr(count)+#13#10); + end; + + if cbOptimizeLift.Checked then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_LIFTS]); + count := OptimizePanels(PANEL_LIFTUP)+OptimizePanels(PANEL_LIFTDOWN)+OptimizePanels(PANEL_LIFTLEFT)+OptimizePanels(PANEL_LIFTRIGHT); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_OPT]+' '+IntToStr(count)+#13#10); + end; + + if cbOptimizeBlockMon.Checked then + begin + mOptimizationResult.Lines.Add(_lc[I_OPT_BLOCKMON]); + count := OptimizePanels(PANEL_BLOCKMON); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_OPT]+' '+IntToStr(count)+#13#10); + end; + + panelcount2 := 0; + for a := 0 to High(gPanels) do + if gPanels[a].PanelType <> 0 then + panelcount2 := panelcount2 + 1; + + mOptimizationResult.Lines.Add('-----------------------'); + mOptimizationResult.Lines.Add(_lc[I_OPT_TOTAL_PANELS]+' '+IntToStr(panelcount1)); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_AFTER]+' '+IntToStr(panelcount2)); + mOptimizationResult.Lines.Add(_lc[I_OPT_PANELS_OPT]+' '+IntToStr(panelcount1-panelcount2)); +end; + +end. diff --git a/src/editor/f_mapoptions.lfm b/src/editor/f_mapoptions.lfm new file mode 100644 index 0000000..418547a --- /dev/null +++ b/src/editor/f_mapoptions.lfm @@ -0,0 +1,664 @@ +object MapOptionsForm: TMapOptionsForm + Left = 594 + Top = 204 + BorderIcons = [biSystemMenu] + BorderStyle = bsSingle + Caption = 'Параметры карты' + ClientHeight = 350 + ClientWidth = 340 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + ShowHint = True + OnActivate = FormActivate + PixelsPerInch = 96 + object LabelDesc: TLabel + Left = 3 + Top = 43 + Width = 87 + Height = 13 + Caption = 'Описание карты:' + end + object lCharCountName: TLabel + Left = 131 + Top = 3 + Width = 41 + Height = 13 + Alignment = taRightJustify + AutoSize = False + Caption = '00\32' + end + object lCharCountDescription: TLabel + Left = 131 + Top = 43 + Width = 41 + Height = 13 + Alignment = taRightJustify + AutoSize = False + Caption = '000\256' + end + object LabelName: TLabel + Left = 3 + Top = 3 + Width = 87 + Height = 13 + Caption = 'Название карты:' + end + object LabelBack: TLabel + Left = 3 + Top = 131 + Width = 26 + Height = 13 + Caption = 'Фон:' + end + object LabelMusic: TLabel + Left = 3 + Top = 171 + Width = 43 + Height = 13 + Caption = 'Музыка:' + end + object LabelAuthor: TLabel + Left = 3 + Top = 83 + Width = 33 + Height = 13 + Caption = 'Автор:' + end + object lCharCountAuthor: TLabel + Left = 131 + Top = 83 + Width = 41 + Height = 13 + Alignment = taRightJustify + AutoSize = False + Caption = '00\32' + end + object GBStats: TGroupBox + Left = 179 + Top = 3 + Width = 158 + Height = 118 + Caption = 'Статистика:' + TabOrder = 3 + object lPanelCount: TLabel + Left = 80 + Top = 18 + Width = 64 + Height = 13 + AutoSize = False + end + object lTextureCount: TLabel + Left = 80 + Top = 2 + Width = 64 + Height = 13 + AutoSize = False + end + object lItemCount: TLabel + Left = 80 + Top = 34 + Width = 64 + Height = 13 + AutoSize = False + end + object LabelPanels: TLabel + Left = 6 + Top = 18 + Width = 47 + Height = 13 + Caption = 'Панелей:' + end + object LabelTexs: TLabel + Left = 6 + Top = 2 + Width = 44 + Height = 13 + Caption = 'Текстур:' + end + object LabelItems: TLabel + Left = 6 + Top = 34 + Width = 60 + Height = 13 + Caption = 'Предметов:' + end + object LabelMonsters: TLabel + Left = 6 + Top = 50 + Width = 53 + Height = 13 + Caption = 'Монстров:' + end + object lMonsterCount: TLabel + Left = 80 + Top = 50 + Width = 64 + Height = 13 + AutoSize = False + end + object LabelAreas: TLabel + Left = 6 + Top = 66 + Width = 52 + Height = 13 + Caption = 'Областей:' + end + object lAreaCount: TLabel + Left = 80 + Top = 66 + Width = 64 + Height = 13 + AutoSize = False + end + object LabelTriggers: TLabel + Left = 6 + Top = 82 + Width = 56 + Height = 13 + Caption = 'Триггеров:' + end + object lTriggerCount: TLabel + Left = 80 + Top = 82 + Width = 64 + Height = 13 + AutoSize = False + end + end + object bOK: TButton + Left = 163 + Top = 323 + Width = 75 + Height = 25 + Caption = 'ОК' + Default = True + TabOrder = 11 + OnClick = bOKClick + end + object bCancel: TButton + Left = 251 + Top = 323 + Width = 75 + Height = 25 + Cancel = True + Caption = 'Отмена' + TabOrder = 12 + OnClick = bCancelClick + end + object GBSizes: TGroupBox + Left = 3 + Top = 216 + Width = 334 + Height = 105 + Caption = 'Размеры:' + TabOrder = 10 + object LabelWidth: TLabel + Left = 14 + Top = 10 + Width = 42 + Height = 13 + AutoSize = False + Caption = 'Ширина:' + end + object LabelHeight: TLabel + Left = 14 + Top = 36 + Width = 41 + Height = 13 + AutoSize = False + Caption = 'Высота:' + end + object LabelCurSize: TLabel + Left = 14 + Top = 66 + Width = 48 + Height = 13 + AutoSize = False + Caption = 'Текущий:' + end + object lCurrentMapSizes: TLabel + Left = 67 + Top = 66 + Width = 68 + Height = 13 + AutoSize = False + end + object sbMoveCenter: TSpeedButton + Left = 262 + Top = 26 + Width = 25 + Height = 25 + GroupIndex = 1 + Down = True + end + object sbMoveUpLeft: TSpeedButton + Left = 238 + Top = 2 + Width = 25 + Height = 25 + GroupIndex = 1 + Glyph.Data = { + 36030000424D3603000000000000360000002800000010000000100000000100 + 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FF42635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF42635A4A6863FF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF4968614B6964536E6CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C5A7373536E6CFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF536E6C5A7373536E6CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C5A7373536E6CFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF536E6C5A73734B696442635A42635A42635A42635A42635A4A6863FF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C5A73735A73735A73735A + 7373617A7A617A7A647D7DFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF647D7D6A83836A83836A83836A8383698282698282FF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + end + object sbMoveUp: TSpeedButton + Left = 262 + Top = 2 + Width = 25 + Height = 25 + GroupIndex = 1 + Glyph.Data = { + 36030000424D3603000000000000360000002800000010000000100000000100 + 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF42635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF4263 + 5AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF4A686342635AFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FF42635A4A6863FF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF536E6C4B696442635AFF00FFFF00FFFF00FFFF00FF42635A4B6964536E + 6CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF5B7474617A7A4B696442635AFF + 00FFFF00FF42635A4B6964617A7A5B7474FF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FF647D7D617A7A4B69644C69644C69644B6964617A7A647D7DFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF647D7D617A7A5A + 73735A7373617A7A647D7DFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FF647D7D678080678080647D7DFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6A + 83836A8383FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + end + object sbMoveUpRight: TSpeedButton + Left = 286 + Top = 2 + Width = 25 + Height = 25 + GroupIndex = 1 + Glyph.Data = { + 36030000424D3603000000000000360000002800000010000000100000000100 + 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF42635AFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FF4A686342635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C4B69644968 + 61FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FF536E6C5A7373536E6CFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C5A7373536E + 6CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FF536E6C5A7373536E6CFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FF4A686342635A42635A42635A42635A42635A4B69645A7373536E + 6CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF647D7D617A7A5A + 73735A73735A73735A73735A7373536E6CFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FF6982826A83836A83836A83836A83836A8383647D + 7DFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + end + object sbMoveRight: TSpeedButton + Left = 286 + Top = 26 + Width = 25 + Height = 25 + GroupIndex = 1 + Glyph.Data = { + 36030000424D3603000000000000360000002800000010000000100000000100 + 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF4A686342635A42635A42 + 635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FF647D7D617A7A4B696442635AFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF647D7D61 + 7A7A4B696442635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FF647D7D617A7A4B696442635AFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FF5972725A73734B696442635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF5972725A737356706F647D7DFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF42 + 635A4B6964617A7A647D7DFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FF42635A4B6964617A7A647D7DFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF42635A4B696461 + 7A7A647D7DFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FF5F7878667F7F6A8383698282FF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + end + object sbMoveLeft: TSpeedButton + Left = 238 + Top = 26 + Width = 25 + Height = 25 + GroupIndex = 1 + Glyph.Data = { + 36030000424D3603000000000000360000002800000010000000100000000100 + 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FF42635A42635A42635A4A6863FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FF42635A4B6964617A7A647D7DFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF42635A4B + 6964617A7A647D7DFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FF42635A4B6964617A7A647D7DFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF42635A4B69645A737359 + 7272FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FF647D7D56706F5A7373597272FF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF647D7D617A7A4B + 696442635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FF647D7D617A7A4B696442635AFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF64 + 7D7D617A7A4B696442635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF6982826A8383667F7F5F7878FF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + end + object sbMoveDownLeft: TSpeedButton + Left = 238 + Top = 50 + Width = 25 + Height = 25 + GroupIndex = 1 + Glyph.Data = { + 36030000424D3603000000000000360000002800000010000000100000000100 + 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF42635A42635A42635A42635A42 + 635A42635A42635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF536E6C5A73735A73735A73735A73735A73734B696442635AFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C5A7373536E6C667F7F6A + 83836A83836A8383667F7F5F7878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF536E6C5A7373536E6CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C5A7373536E6CFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF536E6C5A7373536E6CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF5B7474617A7A536E6CFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FF647D7D5F7878FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF667F7FFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + end + object sbMoveDown: TSpeedButton + Left = 262 + Top = 50 + Width = 25 + Height = 25 + GroupIndex = 1 + Glyph.Data = { + 36030000424D3603000000000000360000002800000010000000100000000100 + 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FF42635A42635AFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF42635A4B + 69644B696442635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FF42635A4B69645A73735A73734B696442635AFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF42635A4B6964617A7A62 + 7B7B627B7B617A7A4B696442635AFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF4968614B6964617A7A647D7DFF00FFFF00FF647D7D617A7A4B69644968 + 61FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C617A7A647D7DFF00FFFF + 00FFFF00FFFF00FF647D7D617A7A536E6CFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FF5F7878647D7DFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF647D7D5F78 + 78FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF667F7FFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FF667F7FFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + end + object sbMoveDownRight: TSpeedButton + Left = 286 + Top = 50 + Width = 25 + Height = 25 + GroupIndex = 1 + Glyph.Data = { + 36030000424D3603000000000000360000002800000010000000100000000100 + 18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF42635A42 + 635A42635A42635A42635A42635A42635AFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FF42635A4B69645A73735A73735A73735A73735A7373536E + 6CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF5F7878667F7F6A83836A + 83836A8383667F7F536E6C5A7373536E6CFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C5A7373536E + 6CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FF536E6C5A7373536E6CFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C5A7373536E + 6CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FF536E6C617A7A5B7474FF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF536E6C647D7DFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FF667F7FFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + end + object LabelMapMove: TLabel + Left = 142 + Top = 4 + Width = 85 + Height = 39 + Alignment = taRightJustify + AutoSize = False + BiDiMode = bdLeftToRight + Caption = 'Направление смещения объектов карты:' + ParentBiDiMode = False + WordWrap = True + end + object eMapWidth: TEdit + Left = 66 + Top = 7 + Width = 45 + Height = 21 + MaxLength = 5 + TabOrder = 0 + Text = '0' + OnKeyPress = eMapSizeKeyPress + end + object UpDown1: TUpDown + Left = 111 + Top = 7 + Width = 17 + Height = 21 + Associate = eMapWidth + Max = 16384 + Increment = 16 + TabOrder = 1 + Thousands = False + end + object eMapHeight: TEdit + Left = 66 + Top = 33 + Width = 45 + Height = 21 + MaxLength = 5 + TabOrder = 2 + Text = '0' + OnKeyPress = eMapSizeKeyPress + end + object UpDown2: TUpDown + Left = 111 + Top = 33 + Width = 17 + Height = 21 + Associate = eMapHeight + Max = 16384 + Increment = 16 + TabOrder = 3 + Thousands = False + end + object cbSnapping: TCheckBox + Left = 158 + Top = 50 + Width = 73 + Height = 33 + Alignment = taLeftJustify + Caption = 'Сохранять привязку' + Checked = True + State = cbChecked + TabOrder = 4 + end + end + object eMapDescription: TEdit + Left = 3 + Top = 59 + Width = 174 + Height = 21 + MaxLength = 256 + TabOrder = 1 + OnChange = eMapDescriptionChange + end + object eMapName: TEdit + Left = 3 + Top = 19 + Width = 174 + Height = 21 + MaxLength = 32 + TabOrder = 0 + OnChange = eMapNameChange + end + object eBack: TEdit + Left = 3 + Top = 147 + Width = 278 + Height = 21 + TabStop = False + Color = clBtnFace + ReadOnly = True + TabOrder = 4 + OnChange = eMapDescriptionChange + end + object eMusic: TEdit + Left = 3 + Top = 187 + Width = 278 + Height = 21 + TabStop = False + Color = clBtnFace + ReadOnly = True + TabOrder = 7 + OnChange = eMapDescriptionChange + end + object bSelectBack: TButton + Left = 311 + Top = 146 + Width = 23 + Height = 23 + Hint = 'Выбрать фон' + Caption = '...' + TabOrder = 5 + OnClick = bSelectBackClick + end + object bSelectMusic: TButton + Left = 311 + Top = 186 + Width = 23 + Height = 23 + Hint = 'Выбрать музыку' + Caption = '...' + TabOrder = 8 + OnClick = bSelectMusicClick + end + object eAuthor: TEdit + Left = 3 + Top = 99 + Width = 174 + Height = 21 + MaxLength = 32 + TabOrder = 2 + OnChange = eAuthorChange + end + object bRemoveBack: TButton + Left = 285 + Top = 146 + Width = 23 + Height = 23 + Hint = 'Убрать фон' + TabOrder = 6 + OnClick = bRemoveBackClick + end + object bRemoveMusic: TButton + Left = 285 + Top = 186 + Width = 23 + Height = 23 + Hint = 'Убрать музыку' + TabOrder = 9 + OnClick = bRemoveMusicClick + end +end diff --git a/src/editor/f_mapoptions.pas b/src/editor/f_mapoptions.pas new file mode 100644 index 0000000..a194fa9 --- /dev/null +++ b/src/editor/f_mapoptions.pas @@ -0,0 +1,298 @@ +unit f_mapoptions; + +{$MODE Delphi} + +interface + +uses + SysUtils, Classes, Forms, Dialogs, + Controls, StdCtrls, ComCtrls, Buttons, + f_main; + +type + TMapOptionsForm = class (TForm) + // Имя карты: + LabelName: TLabel; + lCharCountName: TLabel; + eMapName: TEdit; + // Описание карты: + LabelDesc: TLabel; + lCharCountDescription: TLabel; + eMapDescription: TEdit; + // Автор карты: + LabelAuthor: TLabel; + lCharCountAuthor: TLabel; + eAuthor: TEdit; + // Фон: + LabelBack: TLabel; + eBack: TEdit; + bRemoveBack: TButton; + bSelectBack: TButton; + // Музыка: + LabelMusic: TLabel; + eMusic: TEdit; + bRemoveMusic: TButton; + bSelectMusic: TButton; + + // Статистика: + GBStats: TGroupBox; + LabelTexs: TLabel; + lTextureCount: TLabel; + LabelPanels: TLabel; + lPanelCount: TLabel; + LabelItems: TLabel; + lItemCount: TLabel; + LabelMonsters: TLabel; + lMonsterCount: TLabel; + LabelAreas: TLabel; + lAreaCount: TLabel; + LabelTriggers: TLabel; + lTriggerCount: TLabel; + + // Размеры: + GBSizes: TGroupBox; + eMapWidth: TEdit; + UpDown1: TUpDown; + eMapHeight: TEdit; + UpDown2: TUpDown; + LabelWidth: TLabel; + LabelHeight: TLabel; + LabelCurSize: TLabel; + lCurrentMapSizes: TLabel; + + // Навигатор направления смещения + sbMoveCenter: TSpeedButton; + sbMoveLeft: TSpeedButton; + sbMoveRight: TSpeedButton; + sbMoveUp: TSpeedButton; + sbMoveUpLeft: TSpeedButton; + sbMoveUpRight: TSpeedButton; + sbMoveDown: TSpeedButton; + sbMoveDownLeft: TSpeedButton; + sbMoveDownRight: TSpeedButton; + LabelMapMove: TLabel; + cbSnapping: TCheckBox; + + // Кнопки: + bOK: TButton; + bCancel: TButton; + + procedure FormActivate(Sender: TObject); + procedure bCancelClick(Sender: TObject); + procedure bOKClick(Sender: TObject); + + procedure eMapNameChange(Sender: TObject); + procedure eMapDescriptionChange(Sender: TObject); + procedure eAuthorChange(Sender: TObject); + + procedure bSelectBackClick(Sender: TObject); + procedure bSelectMusicClick(Sender: TObject); + procedure bRemoveBackClick(Sender: TObject); + procedure bRemoveMusicClick(Sender: TObject); + procedure eMapSizeKeyPress(Sender: TObject; var Key: Char); + + private + function CalcOffsetX(WidthDiff: Integer): Integer; + function CalcOffsetY(HeightDiff: Integer): Integer; + + public + { Public declarations } + end; + +var + MapOptionsForm: TMapOptionsForm; + +implementation + +uses + g_map, f_addresource_sky, f_addresource_sound; + +{$R *.lfm} + +// Callbacks to receive results from resource choosing dialogs +function SetSky: Boolean; +begin + MapOptionsForm.eBack.Text := AddSkyForm.ResourceName; + Result := True; +end; + +function SetMusic: Boolean; +begin + MapOptionsForm.eMusic.Text := AddSoundForm.ResourceName; + Result := True; +end; + +// Form processing +procedure TMapOptionsForm.FormActivate(Sender: TObject); +var + a, b: Integer; +begin + // General map options + eMapName.Text := gMapInfo.Name; + eMapDescription.Text := gMapInfo.Description; + eAuthor.Text := gMapInfo.Author; + + eBack.Text := gMapInfo.SkyName; + eMusic.Text := gMapInfo.MusicName; + + eMapWidth.Text := IntToStr(gMapInfo.Width); + eMapHeight.Text := IntToStr(gMapInfo.Height); + lCurrentMapSizes.Caption := eMapWidth.Text + 'x' + eMapHeight.Text; + + sbMoveCenter.Down := True; + + // Map statistics + lTextureCount.Caption := IntToStr(MainForm.lbTextureList.Count); + + b := 0; // Panels + if gPanels <> nil then + for a := 0 to High(gPanels) do + if gPanels[a].PanelType <> 0 then b := b+1; + lPanelCount.Caption := IntToStr(b); + + b := 0; // Items + if gItems <> nil then + for a := 0 to High(gItems) do + if gItems[a].ItemType <> 0 then b := b+1; + lItemCount.Caption := IntToStr(b); + + b := 0; // Areas + if gAreas <> nil then + for a := 0 to High(gAreas) do + if gAreas[a].AreaType <> 0 then b := b+1; + lAreaCount.Caption := IntToStr(b); + + b := 0; // Monsters + if gMonsters <> nil then + for a := 0 to High(gMonsters) do + if gMonsters[a].MonsterType <> 0 then b := b+1; + lMonsterCount.Caption := IntToStr(b); + + b := 0; // Triggers + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + if gTriggers[a].TriggerType <> 0 then + b := b + 1; + lTriggerCount.Caption := IntToStr(b); + +end; + +procedure TMapOptionsForm.bCancelClick(Sender: TObject); +begin + Close(); +end; + +procedure TMapOptionsForm.bOKClick(Sender: TObject); +var + newWidth, newHeight: Integer; +begin + newWidth := StrToInt(eMapWidth.Text); + newHeight := StrToInt(eMapHeight.Text); + + with gMapInfo do + begin + Name := eMapName.Text; + Description := eMapDescription.Text; + Author := eAuthor.Text; + SkyName := eBack.Text; + MusicName := eMusic.Text; + + if Width > newWidth then + MapOffset.X := 0; + if Height > newHeight then + MapOffset.Y := 0; + + ShiftMapObjects( CalcOffsetX(newWidth - Width), + CalcOffsetY(newHeight - Height) ); + + Width := newWidth; + Height := newHeight; + end; + + LoadSky(gMapInfo.SkyName); + + MainForm.FormResize(Self); + Close(); +end; + +// Counters of chars in edit fields +procedure TMapOptionsForm.eMapNameChange(Sender: TObject); +begin + lCharCountName.Caption := Format('%.2d\32', [Length(eMapName.Text)]); +end; + +procedure TMapOptionsForm.eMapDescriptionChange(Sender: TObject); +begin + lCharCountDescription.Caption := Format('%.3d\256', [Length(eMapDescription.Text)]); +end; + +procedure TMapOptionsForm.eAuthorChange(Sender: TObject); +begin + lCharCountAuthor.Caption := Format('%.2d\32', [Length(eAuthor.Text)]); +end; + +// Buttons processing +procedure TMapOptionsForm.bSelectBackClick(Sender: TObject); +begin + AddSkyForm.OKFunction := SetSky; + AddSkyForm.lbResourcesList.MultiSelect := False; + AddSkyForm.SetResource := eBack.Text; + AddSkyForm.ShowModal(); +end; + +procedure TMapOptionsForm.bSelectMusicClick(Sender: TObject); +begin + AddSoundForm.OKFunction := SetMusic; + AddSoundForm.lbResourcesList.MultiSelect := False; + AddSoundForm.SetResource := eMusic.Text; + AddSoundForm.ShowModal(); +end; + +procedure TMapOptionsForm.bRemoveBackClick(Sender: TObject); +begin + eBack.Clear(); +end; + +procedure TMapOptionsForm.bRemoveMusicClick(Sender: TObject); +begin + eMusic.Clear(); +end; + +// Map width/height edit fields input processor: only digits are allowed +procedure TMapOptionsForm.eMapSizeKeyPress( Sender: TObject; + var Key: Char ); +begin + if not ( Key in ['0'..'9', #8, #127] ) then // #8 - bs, #127 - del + Key := #0; +end; + +// Offsets calculating for shifting map objects +function TMapOptionsForm.CalcOffsetX(WidthDiff: Integer): Integer; +begin + Result := 0; + if (sbMoveCenter.Down or + sbMoveUp.Down or + sbMoveDown.Down) then Result := WidthDiff div 2 + else + if (sbMoveRight.Down or + sbMoveUpRight.Down or + sbMoveDownRight.Down) then Result := WidthDiff; + + if cbSnapping.Checked then Result := Trunc(Result / DotStep) * DotStep; +end; + +function TMapOptionsForm.CalcOffsetY(HeightDiff: Integer): Integer; +begin + Result := 0; + if (sbMoveCenter.Down or + sbMoveLeft.Down or + sbMoveRight.Down) then Result := HeightDiff div 2 + else + if (sbMoveDown.Down or + sbMoveDownLeft.Down or + sbMoveDownRight.Down) then Result := HeightDiff; + + if cbSnapping.Checked then Result := Trunc(Result / DotStep) * DotStep; +end; + +end. diff --git a/src/editor/f_maptest.lfm b/src/editor/f_maptest.lfm new file mode 100644 index 0000000..1efbe52 --- /dev/null +++ b/src/editor/f_maptest.lfm @@ -0,0 +1,223 @@ +object MapTestForm: TMapTestForm + Left = 291 + Top = 194 + BorderIcons = [biSystemMenu] + BorderStyle = bsSingle + Caption = 'Настройки теста карты в D2D:F' + ClientHeight = 270 + ClientWidth = 367 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + OnActivate = FormActivate + OnCreate = FormCreate + PixelsPerInch = 96 + object bOK: TButton + Left = 192 + Top = 240 + Width = 75 + Height = 25 + Caption = 'OK' + Default = True + TabOrder = 0 + OnClick = bOKClick + end + object bCancel: TButton + Left = 286 + Top = 240 + Width = 75 + Height = 25 + Cancel = True + Caption = 'Отмена' + TabOrder = 1 + OnClick = bCancelClick + end + object GroupBox1: TGroupBox + Left = 8 + Top = 0 + Width = 353 + Height = 233 + TabOrder = 2 + object LabelTime: TLabel + Left = 14 + Top = 98 + Width = 83 + Height = 13 + Caption = 'Лимит времени:' + end + object LabelSecs: TLabel + Left = 174 + Top = 98 + Width = 35 + Height = 13 + Caption = 'секунд' + end + object LabelScore: TLabel + Left = 14 + Top = 122 + Width = 68 + Height = 13 + Caption = 'Лимит очков:' + end + object LabelPath: TLabel + Left = 14 + Top = 170 + Width = 107 + Height = 13 + Caption = 'Путь к Doom2DF.exe:' + end + object rbDM: TRadioButton + Left = 14 + Top = 2 + Width = 113 + Height = 17 + Caption = 'Deathmatch' + Checked = True + TabOrder = 0 + TabStop = True + end + object rbTDM: TRadioButton + Left = 14 + Top = 18 + Width = 113 + Height = 17 + Caption = 'Team Deathmatch' + TabOrder = 1 + end + object rbCTF: TRadioButton + Left = 14 + Top = 34 + Width = 113 + Height = 17 + Caption = 'Capture the Flag' + TabOrder = 2 + end + object rbCOOP: TRadioButton + Left = 14 + Top = 50 + Width = 113 + Height = 17 + Caption = 'Cooperative' + TabOrder = 3 + end + object cbTwoPlayers: TCheckBox + Left = 174 + Top = 2 + Width = 169 + Height = 17 + Caption = 'Два игрока' + TabOrder = 4 + end + object cbTeamDamage: TCheckBox + Left = 174 + Top = 18 + Width = 169 + Height = 17 + Caption = 'Урон своей команде' + TabOrder = 5 + end + object cbAllowExit: TCheckBox + Left = 174 + Top = 34 + Width = 169 + Height = 17 + Caption = 'Выход из уровня' + Checked = True + State = cbChecked + TabOrder = 6 + end + object cbWeaponStay: TCheckBox + Left = 174 + Top = 50 + Width = 169 + Height = 17 + Caption = 'Оружие остается' + TabOrder = 7 + end + object cbMonstersDM: TCheckBox + Left = 174 + Top = 66 + Width = 169 + Height = 17 + Caption = 'Монстры в DM' + TabOrder = 8 + end + object edTime: TEdit + Left = 102 + Top = 98 + Width = 49 + Height = 21 + TabOrder = 9 + Text = '0' + end + object edScore: TEdit + Left = 102 + Top = 122 + Width = 49 + Height = 21 + TabOrder = 10 + Text = '0' + end + object UpDown2: TUpDown + Left = 151 + Top = 122 + Width = 12 + Height = 21 + Associate = edScore + Max = 1000 + TabOrder = 11 + end + object UpDown1: TUpDown + Left = 151 + Top = 98 + Width = 12 + Height = 21 + Associate = edTime + Max = 28800 + TabOrder = 12 + end + object edD2dexe: TEdit + Left = 14 + Top = 186 + Width = 297 + Height = 21 + TabOrder = 13 + Text = 'Doom2DF.exe' + end + object bChooseD2d: TButton + Left = 318 + Top = 186 + Width = 25 + Height = 20 + Caption = '...' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 14 + OnClick = bChooseD2dClick + end + object cbMapOnce: TCheckBox + Left = 14 + Top = 146 + Width = 225 + Height = 17 + Caption = 'Закрыть игру после выхода из карты' + TabOrder = 15 + end + end + object FindD2dDialog: TOpenDialog + DefaultExt = 'Doom2DF.exe' + Filter = 'Doom2DF.exe|Doom2DF.exe' + Options = [ofHideReadOnly, ofNoChangeDir, ofEnableSizing] + Title = 'Выберите файл игры Doom 2D:Forever' + Left = 320 + Top = 144 + end +end diff --git a/src/editor/f_maptest.pas b/src/editor/f_maptest.pas new file mode 100644 index 0000000..4276659 --- /dev/null +++ b/src/editor/f_maptest.pas @@ -0,0 +1,182 @@ +unit f_maptest; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, + ComCtrls; + +type + TMapTestForm = class (TForm) + bOK: TButton; + bCancel: TButton; + GroupBox1: TGroupBox; + // Режим игры: + rbDM: TRadioButton; + rbTDM: TRadioButton; + rbCTF: TRadioButton; + rbCOOP: TRadioButton; + // Опции: + cbTwoPlayers: TCheckBox; + cbTeamDamage: TCheckBox; + cbAllowExit: TCheckBox; + cbWeaponStay: TCheckBox; + cbMonstersDM: TCheckBox; + cbMapOnce: TCheckBox; + // Лимит времени: + LabelTime: TLabel; + edTime: TEdit; + UpDown2: TUpDown; + LabelSecs: TLabel; + // Лимит очков: + LabelScore: TLabel; + edScore: TEdit; + UpDown1: TUpDown; + // Путь: + LabelPath: TLabel; + edD2dexe: TEdit; + bChooseD2d: TButton; + FindD2dDialog: TOpenDialog; + + procedure bOKClick(Sender: TObject); + procedure bCancelClick(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure bChooseD2dClick(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + MapTestForm: TMapTestForm; + +implementation + +uses + f_main, CONFIG; + +{$R *.lfm} + +procedure TMapTestForm.bOKClick(Sender: TObject); +var + config: TConfig; + s: String; + n: Integer; + +begin + config := TConfig.CreateFile(EditorDir+'\Editor.cfg'); + + if rbTDM.Checked then + s := 'TDM' + else + if rbCTF.Checked then + s := 'CTF' + else + if rbCOOP.Checked then + s := 'COOP' + else + s := 'DM'; + config.WriteStr('TestRun', 'GameMode', s); + TestGameMode := s; + + s := edTime.Text; + if (not TryStrToInt(s, n)) then + s := '0'; + config.WriteStr('TestRun', 'LimTime', s); + TestLimTime := s; + + s := edScore.Text; + if (not TryStrToInt(s, n)) then + s := '0'; + config.WriteStr('TestRun', 'LimScore', s); + TestLimScore := s; + + config.WriteBool('TestRun', 'TwoPlayers', cbTwoPlayers.Checked); + TestOptionsTwoPlayers := cbTwoPlayers.Checked; + config.WriteBool('TestRun', 'TeamDamage', cbTeamDamage.Checked); + TestOptionsTeamDamage := cbTeamDamage.Checked; + config.WriteBool('TestRun', 'AllowExit', cbAllowExit.Checked); + TestOptionsAllowExit := cbAllowExit.Checked; + config.WriteBool('TestRun', 'WeaponStay', cbWeaponStay.Checked); + TestOptionsWeaponStay := cbWeaponStay.Checked; + config.WriteBool('TestRun', 'MonstersDM', cbMonstersDM.Checked); + TestOptionsMonstersDM := cbMonstersDM.Checked; + + config.WriteBool('TestRun', 'MapOnce', cbMapOnce.Checked); + TestMapOnce := cbMapOnce.Checked; + + config.WriteStr('TestRun', 'Exe', edD2dExe.Text); + TestD2dExe := edD2dExe.Text; + + config.SaveFile(EditorDir+'\Editor.cfg'); + config.Free(); + Close(); +end; + +procedure TMapTestForm.bCancelClick(Sender: TObject); +begin + Close(); +end; + +procedure TMapTestForm.FormActivate(Sender: TObject); +begin + if TestGameMode = 'TDM' then + rbTDM.Checked := True + else + if TestGameMode = 'CTF' then + rbCTF.Checked := True + else + if TestGameMode = 'COOP' then + rbCOOP.Checked := True + else + rbDM.Checked := True; + + edTime.Text := TestLimTime; + edScore.Text := TestLimScore; + cbTwoPlayers.Checked := TestOptionsTwoPlayers; + cbTeamDamage.Checked := TestOptionsTeamDamage; + cbAllowExit.Checked := TestOptionsAllowExit; + cbWeaponStay.Checked := TestOptionsWeaponStay; + cbMonstersDM.Checked := TestOptionsMonstersDM; + cbMapOnce.Checked := TestMapOnce; + edD2dExe.Text := TestD2dExe; +end; + +procedure TMapTestForm.FormCreate(Sender: TObject); +var + config: TConfig; + +begin + config := TConfig.CreateFile(EditorDir+'\Editor.cfg'); + + TestGameMode := config.ReadStr('TestRun', 'GameMode', 'DM'); + TestLimTime := config.ReadStr('TestRun', 'LimTime', '0'); + TestLimScore := config.ReadStr('TestRun', 'LimScore', '0'); + TestOptionsTwoPlayers := config.ReadBool('TestRun', 'TwoPlayers', False); + TestOptionsTeamDamage := config.ReadBool('TestRun', 'TeamDamage', False); + TestOptionsAllowExit := config.ReadBool('TestRun', 'AllowExit', True); + TestOptionsWeaponStay := config.ReadBool('TestRun', 'WeaponStay', False); + TestOptionsMonstersDM := config.ReadBool('TestRun', 'MonstersDM', False); + TestMapOnce := config.ReadBool('TestRun', 'MapOnce', False); + TestD2dExe := config.ReadStr('TestRun', 'Exe', EditorDir+'Doom2DF.exe'); + + config.Free(); + + FindD2dDialog.InitialDir := TestD2dExe; +end; + +procedure TMapTestForm.bChooseD2dClick(Sender: TObject); +begin + if FindD2dDialog.Execute then + begin + edD2dExe.Text := FindD2dDialog.FileName; + end; +end; + +end. diff --git a/src/editor/f_options.lfm b/src/editor/f_options.lfm new file mode 100644 index 0000000..37d9ec1 --- /dev/null +++ b/src/editor/f_options.lfm @@ -0,0 +1,280 @@ +object OptionsForm: TOptionsForm + Left = 202 + Top = 174 + BorderIcons = [biSystemMenu] + BorderStyle = bsSingle + Caption = 'Настройки редактора' + ClientHeight = 262 + ClientWidth = 415 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + OnActivate = FormActivate + PixelsPerInch = 96 + object GroupBox1: TGroupBox + Left = 8 + Top = 0 + Width = 401 + Height = 225 + TabOrder = 0 + object sDotColor: TShape + Left = 318 + Top = 2 + Width = 57 + Height = 25 + end + object LabelGrid: TLabel + Left = 6 + Top = 74 + Width = 61 + Height = 13 + Caption = 'Шаги сетки:' + end + object LabelGridCol: TLabel + Left = 190 + Top = 2 + Width = 60 + Height = 13 + Caption = 'Цвет сетки:' + end + object LabelBack: TLabel + Left = 190 + Top = 43 + Width = 57 + Height = 13 + Caption = 'Цвет фона:' + end + object sBackColor: TShape + Left = 318 + Top = 43 + Width = 57 + Height = 25 + Brush.Color = clBlack + end + object LabelPreview: TLabel + Left = 190 + Top = 73 + Width = 84 + Height = 39 + Caption = 'Цвет фона поля предпросмотра текстуры:' + WordWrap = True + end + object sPreviewColor: TShape + Left = 318 + Top = 83 + Width = 57 + Height = 25 + Brush.Color = clBlack + end + object LabelMinimap: TLabel + Left = 190 + Top = 131 + Width = 112 + Height = 13 + Caption = 'Масштаб мини-карты:' + end + object LabelRecent: TLabel + Left = 190 + Top = 162 + Width = 121 + Height = 26 + Caption = 'Запоминать последних открытых карт:' + WordWrap = True + end + object LabelLanguage: TLabel + Left = 6 + Top = 162 + Width = 31 + Height = 13 + Caption = 'Язык:' + end + object LabelGridSize: TLabel + Left = 6 + Top = 122 + Width = 73 + Height = 26 + Caption = 'Размер точек сетки:' + WordWrap = True + end + object cbShowDots: TCheckBox + Left = 6 + Top = 2 + Width = 121 + Height = 17 + Caption = 'Показывать сетку' + TabOrder = 0 + end + object UpDown1: TUpDown + Left = 143 + Top = 74 + Width = 12 + Height = 21 + Associate = eDotStepOne + Min = 2 + Max = 255 + Position = 16 + TabOrder = 6 + end + object eDotStepOne: TEdit + Left = 86 + Top = 74 + Width = 57 + Height = 21 + TabOrder = 1 + Text = '16' + end + object bGrid: TButton + Left = 376 + Top = 2 + Width = 11 + Height = 25 + Caption = '..' + TabOrder = 2 + OnClick = bGridClick + end + object bBack: TButton + Left = 376 + Top = 43 + Width = 11 + Height = 25 + Caption = '..' + TabOrder = 3 + OnClick = bBackClick + end + object bPreview: TButton + Left = 376 + Top = 83 + Width = 11 + Height = 25 + Caption = '..' + TabOrder = 4 + OnClick = bPreviewClick + end + object cbScale: TComboBox + Left = 318 + Top = 131 + Width = 70 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + ItemIndex = 0 + TabOrder = 5 + Text = '1x' + Items.Strings = ( + '1x' + '2x') + end + object cbShowTexture: TCheckBox + Left = 6 + Top = 18 + Width = 169 + Height = 17 + Caption = 'Показывать текстуру панели' + TabOrder = 7 + end + object cbShowSize: TCheckBox + Left = 6 + Top = 34 + Width = 169 + Height = 17 + Caption = 'Показывать размеры панели' + TabOrder = 8 + end + object eRecent: TEdit + Left = 318 + Top = 166 + Width = 57 + Height = 21 + TabOrder = 9 + Text = '5' + end + object UpDown3: TUpDown + Left = 375 + Top = 166 + Width = 12 + Height = 21 + Associate = eRecent + Min = 2 + Max = 10 + Position = 5 + TabOrder = 10 + end + object eDotStepTwo: TEdit + Left = 86 + Top = 98 + Width = 57 + Height = 21 + TabOrder = 11 + Text = '8' + end + object UpDown2: TUpDown + Left = 143 + Top = 98 + Width = 12 + Height = 21 + Associate = eDotStepTwo + Min = 2 + Max = 255 + Position = 8 + TabOrder = 12 + end + object rbRussian: TRadioButton + Left = 86 + Top = 162 + Width = 81 + Height = 17 + Caption = 'Русский' + Checked = True + TabOrder = 13 + TabStop = True + end + object rbEnglish: TRadioButton + Left = 86 + Top = 186 + Width = 81 + Height = 17 + Caption = 'English' + TabOrder = 14 + end + object cbDotSize: TComboBox + Left = 86 + Top = 126 + Width = 73 + Height = 21 + ItemHeight = 13 + TabOrder = 15 + Text = '1' + Items.Strings = ( + '1' + '2') + end + end + object bOK: TButton + Left = 240 + Top = 232 + Width = 75 + Height = 25 + Caption = 'ОК' + Default = True + TabOrder = 1 + OnClick = bOKClick + end + object bCancel: TButton + Left = 336 + Top = 232 + Width = 75 + Height = 25 + Cancel = True + Caption = 'Отмена' + TabOrder = 2 + OnClick = bCancelClick + end + object ColorDialog: TColorDialog + Left = 200 + Top = 232 + end +end diff --git a/src/editor/f_options.pas b/src/editor/f_options.pas new file mode 100644 index 0000000..0b2e703 --- /dev/null +++ b/src/editor/f_options.pas @@ -0,0 +1,242 @@ +unit f_options; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls, + ExtCtrls, ComCtrls, Registry; + +type + TOptionsForm = class (TForm) + bOK: TButton; + bCancel: TButton; + ColorDialog: TColorDialog; + GroupBox1: TGroupBox; + // Общие настройки: + cbShowDots: TCheckBox; + cbShowTexture: TCheckBox; + cbShowSize: TCheckBox; + // Шаги сетки: + LabelGrid: TLabel; + eDotStepOne: TEdit; + UpDown1: TUpDown; + eDotStepTwo: TEdit; + UpDown2: TUpDown; + // Цвет сетки: + LabelGridCol: TLabel; + sDotColor: TShape; + bGrid: TButton; + // Цвет фона: + LabelBack: TLabel; + sBackColor: TShape; + bBack: TButton; + // Цвет превью: + LabelPreview: TLabel; + sPreviewColor: TShape; + bPreview: TButton; + // Масштаб миникарты: + LabelMinimap: TLabel; + cbScale: TComboBox; + // Количество недавно открытых: + LabelRecent: TLabel; + eRecent: TEdit; + UpDown3: TUpDown; + LabelLanguage: TLabel; + rbRussian: TRadioButton; + rbEnglish: TRadioButton; + LabelGridSize: TLabel; + cbDotSize: TComboBox; + + procedure bGridClick(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure bOKClick(Sender: TObject); + procedure bCancelClick(Sender: TObject); + procedure bBackClick(Sender: TObject); + procedure bPreviewClick(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + OptionsForm: TOptionsForm; + +procedure RegisterFileType(ext: String; FileName: String); + +implementation + +uses + f_main, StdConvs, CONFIG, g_language; + +{$R *.lfm} + +procedure RegisterFileType(ext: String; FileName: String); +var + reg: TRegistry; + +begin + reg := TRegistry.Create(); + + with reg do + begin + RootKey := HKEY_CLASSES_ROOT; + OpenKey('.'+ext,True); + WriteString('',ext+'file'); + CloseKey(); + CreateKey(ext+'file'); + OpenKey(ext+'file\DefaultIcon',True); + WriteString('',FileName+',0'); + CloseKey(); + OpenKey(ext+'file\shell\open\command',True); + WriteString('',FileName+' "%1"'); + CloseKey(); + Free(); + end; +end; + +procedure TOptionsForm.bGridClick(Sender: TObject); +begin + if ColorDialog.Execute then + sDotColor.Brush.Color := ColorDialog.Color; +end; + +procedure TOptionsForm.FormActivate(Sender: TObject); +begin + sDotColor.Brush.Color := DotColor; + cbShowDots.Checked := DotEnable; + cbShowTexture.Checked := DrawTexturePanel; + cbShowSize.Checked := DrawPanelSize; + eDotStepOne.Text := IntToStr(DotStepOne); + eDotStepTwo.Text := IntToStr(DotStepTwo); + sBackColor.Brush.Color := BackColor; + sPreviewColor.Brush.Color := PreviewColor; + if Scale = 2 then + cbScale.ItemIndex := 1 + else + cbScale.ItemIndex := 0; + if DotSize = 2 then + cbDotSize.ItemIndex := 1 + else + cbDotSize.ItemIndex := 0; + eRecent.Text := IntToStr(RecentCount); + +// Язык: + if gLanguage = LANGUAGE_RUSSIAN then + begin + rbRussian.Checked := True; + rbEnglish.Checked := False; + end + else + begin + rbRussian.Checked := False; + rbEnglish.Checked := True; + end; +end; + +procedure TOptionsForm.bOKClick(Sender: TObject); +var + config: TConfig; + re: Integer; + d1: Boolean; + str: String; + +begin + re := StrToIntDef(eRecent.Text, 5); + if re < 2 then + re := 2; + if re > 10 then + re := 10; + + if rbRussian.Checked then + str := LANGUAGE_RUSSIAN + else + str := LANGUAGE_ENGLISH; + +// Нужно сменить язык: + if gLanguage <> str then + begin + gLanguage := str; + //e_WriteLog('Read language file', MSG_NOTIFY); + //g_Language_Load(EditorDir+'\data\'+gLanguage+LANGUAGE_FILE_NAME); + g_Language_Set(gLanguage); + end; + + DotColor := sDotColor.Brush.Color; + DotEnable := cbShowDots.Checked; + + if DotStep = DotStepOne then + d1 := True + else + d1 := False; + DotStepOne := StrToIntDef(eDotStepOne.Text, 16); + DotStepTwo := StrToIntDef(eDotStepTwo.Text, 8); + if d1 then + DotStep := DotStepOne + else + DotStep := DotStepTwo; + + DrawTexturePanel := cbShowTexture.Checked; + DrawPanelSize := cbShowSize.Checked; + BackColor := sBackColor.Brush.Color; + PreviewColor := sPreviewColor.Brush.Color; + + if cbScale.ItemIndex = 1 then + Scale := 2 + else + Scale := 1; + + if cbDotSize.ItemIndex = 1 then + DotSize := 2 + else + DotSize := 1; + + config := TConfig.CreateFile(EditorDir+'\Editor.cfg'); + + config.WriteInt('Editor', 'DotColor', DotColor); + config.WriteBool('Editor', 'DotEnable', DotEnable); + config.WriteInt('Editor', 'DotStepOne', DotStepOne); + config.WriteInt('Editor', 'DotStepTwo', DotStepTwo); + config.WriteInt('Editor', 'DotStep', DotStep); + config.WriteInt('Editor', 'DotSize', cbDotSize.ItemIndex); + config.WriteBool('Editor', 'DrawTexturePanel', DrawTexturePanel); + config.WriteBool('Editor', 'DrawPanelSize', DrawPanelSize); + config.WriteInt('Editor', 'BackColor', BackColor); + config.WriteInt('Editor', 'PreviewColor', PreviewColor); + config.WriteInt('Editor', 'Scale', cbScale.ItemIndex); + config.WriteInt('Editor', 'RecentCount', re); + config.WriteStr('Editor', 'Language', gLanguage); + + if RecentCount <> re then + begin + RecentCount := re; + MainForm.RefreshRecentMenu(); + end; + + config.SaveFile(EditorDir+'\Editor.cfg'); + config.Free(); + Close(); +end; + +procedure TOptionsForm.bCancelClick(Sender: TObject); +begin + Close(); +end; + +procedure TOptionsForm.bBackClick(Sender: TObject); +begin + if ColorDialog.Execute then + sBackColor.Brush.Color := ColorDialog.Color; +end; + +procedure TOptionsForm.bPreviewClick(Sender: TObject); +begin + if ColorDialog.Execute then + sPreviewColor.Brush.Color := ColorDialog.Color; +end; + +end. diff --git a/src/editor/f_packmap.lfm b/src/editor/f_packmap.lfm new file mode 100644 index 0000000..31d3b46 --- /dev/null +++ b/src/editor/f_packmap.lfm @@ -0,0 +1,179 @@ +object PackMapForm: TPackMapForm + Left = 312 + Top = 231 + BorderIcons = [biSystemMenu] + BorderStyle = bsSingle + Caption = 'Упаковать карту' + ClientHeight = 229 + ClientWidth = 360 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + OnCreate = FormCreate + PixelsPerInch = 96 + object Panel1: TPanel + Left = 4 + Top = 4 + Width = 353 + Height = 189 + BevelInner = bvRaised + BevelOuter = bvLowered + TabOrder = 0 + object LabelSaveTo: TLabel + Left = 6 + Top = 6 + Width = 65 + Height = 13 + Caption = 'Сохранить в:' + end + object LabelMapName: TLabel + Left = 214 + Top = 6 + Width = 109 + Height = 13 + Caption = 'Имя ресурса (карты):' + end + object LabelTextures: TLabel + Left = 94 + Top = 62 + Width = 103 + Height = 13 + Caption = 'Секция для текстур:' + end + object LabelSky: TLabel + Left = 94 + Top = 86 + Width = 88 + Height = 13 + Caption = 'Секция для неба:' + end + object LabelMusic: TLabel + Left = 94 + Top = 110 + Width = 103 + Height = 13 + Caption = 'Секция для музыки:' + end + object eWAD: TEdit + Left = 6 + Top = 22 + Width = 169 + Height = 21 + TabOrder = 0 + end + object bSelectWAD: TButton + Left = 176 + Top = 20 + Width = 23 + Height = 23 + Hint = 'Выбрать фон' + Caption = '..' + TabOrder = 1 + OnClick = bSelectWADClick + end + object eResource: TEdit + Left = 214 + Top = 22 + Width = 129 + Height = 21 + CharCase = ecUpperCase + MaxLength = 16 + TabOrder = 2 + end + object eTSection: TEdit + Left = 214 + Top = 62 + Width = 129 + Height = 21 + CharCase = ecUpperCase + MaxLength = 16 + TabOrder = 4 + end + object eSSection: TEdit + Left = 214 + Top = 86 + Width = 129 + Height = 21 + CharCase = ecUpperCase + MaxLength = 16 + TabOrder = 6 + end + object eMSection: TEdit + Left = 214 + Top = 110 + Width = 129 + Height = 21 + CharCase = ecUpperCase + MaxLength = 16 + TabOrder = 8 + end + object cbTextrures: TCheckBox + Left = 6 + Top = 62 + Width = 89 + Height = 17 + Caption = 'Текстуры' + Checked = True + State = cbChecked + TabOrder = 3 + end + object cbSky: TCheckBox + Left = 6 + Top = 86 + Width = 89 + Height = 17 + Caption = 'Небо' + Checked = True + State = cbChecked + TabOrder = 5 + end + object cbMusic: TCheckBox + Left = 6 + Top = 110 + Width = 89 + Height = 17 + Caption = 'Музыку' + Checked = True + State = cbChecked + TabOrder = 7 + end + object cbAdd: TCheckBox + Left = 6 + Top = 142 + Width = 193 + Height = 17 + Caption = 'Не перезаписывать WAD' + TabOrder = 9 + end + object cbNonStandart: TCheckBox + Left = 6 + Top = 158 + Width = 209 + Height = 17 + Hint = 'Не сохранять ресурсы из стандартных WAD''ов - Standart.wad и пр.' + Caption = 'Только нестандартные ресурсы' + TabOrder = 10 + end + end + object bPack: TButton + Left = 282 + Top = 200 + Width = 75 + Height = 25 + Caption = 'Упаковать' + Default = True + TabOrder = 1 + OnClick = bPackClick + end + object SaveDialog: TSaveDialog + DefaultExt = 'wad' + Filter = 'Карты Doom2D: Forever (*.wad)|*.wad|All files (*.*)|*.*' + Options = [ofHideReadOnly, ofPathMustExist, ofEnableSizing, ofDontAddToRecent] + Left = 8 + Top = 200 + end +end diff --git a/src/editor/f_packmap.pas b/src/editor/f_packmap.pas new file mode 100644 index 0000000..f094d3e --- /dev/null +++ b/src/editor/f_packmap.pas @@ -0,0 +1,360 @@ +unit f_packmap; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; + +type + TPackMapForm = class (TForm) + bPack: TButton; + SaveDialog: TSaveDialog; + Panel1: TPanel; + // Сохранить в: + LabelSaveTo: TLabel; + eWAD: TEdit; + bSelectWAD: TButton; + // Имя карты: + LabelMapName: TLabel; + eResource: TEdit; + // Текстуры: + cbTextrures: TCheckBox; + LabelTextures: TLabel; + eTSection: TEdit; + // Небо: + cbSky: TCheckBox; + LabelSky: TLabel; + eSSection: TEdit; + // Музыка: + cbMusic: TCheckBox; + LabelMusic: TLabel; + eMSection: TEdit; + // Дополнительно: + cbAdd: TCheckBox; + cbNonStandart: TCheckBox; + + procedure bSelectWADClick(Sender: TObject); + procedure bPackClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + PackMapForm: TPackMapForm; + +implementation + +uses + BinEditor, WADEDITOR, g_map, MAPREADER, MAPWRITER, MAPSTRUCT, + f_main, math, g_language; + +{$R *.lfm} + +const + STANDART_WAD = 'standart.wad'; + SHRSHADE_WAD = 'shrshade.wad'; + + +procedure TPackMapForm.bSelectWADClick(Sender: TObject); +begin + SaveDialog.Filter := _lc[I_FILE_FILTER_WAD]; + + if SaveDialog.Execute() then + eWAD.Text := SaveDialog.FileName; +end; + +function ProcessResource(wad_to: TWADEditor_1; + section_to, filename, section, resource: String): Boolean; +var + wad2: TWADEditor_1; + data: Pointer; + reslen: Integer; + //s: string; + +begin + Result := False; + + if filename = '' then + g_ProcessResourceStr(OpenedMap, @filename, nil, nil) + else + filename := EditorDir+'wads\'+filename; + +// Читаем ресурс из WAD-файла карты или какого-то другого: + wad2 := TWADEditor_1.Create(); + + if not wad2.ReadFile(filename) then + begin + MessageBox(0, PChar(Format(_lc[I_MSG_WAD_ERROR], + [ExtractFileName(filename)])), + PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR); + wad2.Free(); + Exit; + end; + + if not wad2.GetResource(section, resource, data, reslen) then + begin + MessageBox(0, PChar(Format(_lc[I_MSG_RES_ERROR], + [filename, section, resource])), + PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR); + wad2.Free(); + Exit; + end; + + wad2.Free(); + + {if wad_to.HaveResource(section_to, resource) then + begin + for a := 2 to 256 do + begin + s := IntToStr(a); + if not wad_to.HaveResource(section_to, resource+s) then Break; + end; + resource := resource+s; + end;} + +// Если такого ресурса нет в WAD-файле-назначении, то копируем: + if not wad_to.HaveResource(section_to, resource) then + begin + if not wad_to.HaveSection(section_to) then + wad_to.AddSection(section_to); + wad_to.AddResource(data, reslen, resource, section_to); + end; + + FreeMem(data); + + Result := True; +end; + +procedure TPackMapForm.bPackClick(Sender: TObject); +var + WAD: TWADEditor_1; + mr: TMapReader_1; + mw: TMapWriter_1; + data: Pointer; + len: LongWord; + textures: TTexturesRec1Array; + header: TMapHeaderRec_1; + a: Integer; + res, tsection, ssection, msection, filename, section, resource: String; + +begin + if eWAD.Text = '' then + Exit; + if eResource.Text = '' then + Exit; + + tsection := eTSection.Text; + ssection := eSSection.Text; + msection := eMSection.Text; + +// Сохраняем карту в память: + data := SaveMap(''); + if data = nil then + Exit; + + WAD := TWADEditor_1.Create(); + +// Не перезаписывать WAD, а дополнить: + if cbAdd.Checked then + if WAD.ReadFile(eWAD.Text) then + WAD.CreateImage(); + +// Читаем карту из памяти: + mr := TMapReader_1.Create(); + mr.LoadMap(data); + FreeMem(data); + +// Получаем текстуры: + textures := mr.GetTextures(); + +// Нужно копировать текстуры: + if cbTextrures.Checked and (textures <> nil) then + for a := 0 to High(textures) do + begin + res := textures[a].Resource; + if IsSpecialTexture(res) then + Continue; + + g_ProcessResourceStr(res, @filename, @section, @resource); + + // Не записывать стандартные текстуры: + if (not cbNonStandart.Checked) or + ( (AnsiLowerCase(filename) <> STANDART_WAD) and + (AnsiLowerCase(filename) <> SHRSHADE_WAD) ) then + begin + // Копируем ресурс текстуры: + if not ProcessResource(WAD, tsection, filename, section, resource) then + begin + mr.Free(); + WAD.Free(); + Exit; + end; + + // Переименовываем ресурс текстуры: + res := Format(':%s\%s', [tsection, resource]); + ZeroMemory(@textures[a].Resource[0], 64); + CopyMemory(@textures[a].Resource[0], @res[1], Min(Length(res), 64)); + end; + end; + +// Получаем заголовок карты: + header := mr.GetMapHeader(); + +// Нужно копировать небо: + if cbSky.Checked then + begin + res := header.SkyName; + g_ProcessResourceStr(res, @filename, @section, @resource); + + // Не записывать стандартное небо: + if (not cbNonStandart.Checked) or + ( (AnsiLowerCase(filename) <> STANDART_WAD) and + (AnsiLowerCase(filename) <> SHRSHADE_WAD) ) then + begin + // Копируем ресурс неба: + if not ProcessResource(WAD, ssection, filename, section, resource) then + begin + mr.Free(); + WAD.Free(); + Exit; + end; + + // Переименовываем ресурс неба: + res := Format(':%s\%s', [ssection, resource]); + ZeroMemory(@header.SkyName[0], 64); + CopyMemory(@header.SkyName[0], @res[1], Min(Length(res), 64)); + end; + end; + +// Нужно копировать музыку: + if cbMusic.Checked then + begin + res := header.MusicName; + g_ProcessResourceStr(res, @filename, @section, @resource); + + // Не записывать стандартную музыку: + if (not cbNonStandart.Checked) or + ( (AnsiLowerCase(filename) <> STANDART_WAD) and + (AnsiLowerCase(filename) <> SHRSHADE_WAD) ) then + begin + // Копируем ресурс музыки: + if not ProcessResource(WAD, msection, filename, section, resource) then + begin + mr.Free(); + WAD.Free(); + Exit; + end; + + // Переименовываем ресурс музыки: + res := Format(':%s\%s', [msection, resource]); + ZeroMemory(@header.MusicName[0], 64); + CopyMemory(@header.MusicName[0], @res[1], Min(Length(res), 64)); + end; + end; + + { +// Нужно копировать дополнительные текстуры: + if cbTextrures.Checked and (textures <> nil) and + (gPanels <> nil) and (gTriggers <> nil) then + begin + for a := 0 to High(gPanels) do + begin + ok := False; + + // Ссылаются ли на эту панель триггеры: + for b := 0 to High(gTriggers) do + if ( (gTriggers[b].TriggerType in [TRIGGER_OPENDOOR, + TRIGGER_CLOSEDOOR, TRIGGER_DOOR, TRIGGER_DOOR5, + TRIGGER_CLOSETRAP, TRIGGER_TRAP, TRIGGER_LIFTUP, + TRIGGER_LIFTDOWN, TRIGGER_LIFT]) and + (gTriggers[b].Data.PanelID = a) ) or + (gTriggers[b].TexturePanel = a) then + begin + ok := True; + Break; + end; + + // Есть триггеры на эту панель: + if ok and (gPanels[a].TextureName <> '') and + (not IsSpecialTexture(gPanels[a].TextureName) and + g_Texture_NumNameFindStart(gPanels[a].TextureName) then + begin + while True do + begin + r := g_Texture_NumNameFindNext(res); + case r of + NNF_NAME_FOUND: ; + NNF_NAME_EQUALS: Continue; + else Break; + end; + + if res = '' then + Break; + + g_ProcessResourceStr(res, @filename, @section, @resource); + + // Не записывать стандартные дополнительные текстуры: + if (not cbNonStandart.Checked) or + ( (AnsiLowerCase(filename) <> STANDART_WAD) and + (AnsiLowerCase(filename) <> SHRSHADE_WAD) ) then + begin + // Копируем ресурс дополнительной текстуры: + if ProcessResource(WAD, tsection, filename, section, resource) then + begin + + Нужно проверять есть такая текстура textures и есть ли она вообще? + // Переименовываем ресурс текстуры: + res := Format(':%s\%s', [tsection, resource]); + ZeroMemory(@textures[a].Resource[0], 64); + CopyMemory(@textures[a].Resource[0], @res[1], Min(Length(res), 64)); + + + + end; + end; + end; // while True + end; + end; + end; + } + +// Записываем изменения карты: + mw := TMapWriter_1.Create(); + + mw.AddHeader(header); + mw.AddTextures(textures); + mw.AddPanels(mr.GetPanels()); + mw.AddItems(mr.GetItems()); + mw.AddAreas(mr.GetAreas()); + mw.AddMonsters(mr.GetMonsters()); + mw.AddTriggers(mr.GetTriggers()); + +// Сохраняем карту из памяти под новым именем в WAD-файл: + len := mw.SaveMap(data); + WAD.AddResource(data, len, eResource.Text, ''); + WAD.SaveTo(eWAD.Text); + + mw.Free(); + mr.Free(); + WAD.Free(); + + MessageDlg(Format(_lc[I_MSG_PACKED], + [eResource.Text, ExtractFileName(eWAD.Text)]), + mtInformation, [mbOK], 0); + + Close(); +end; + +procedure TPackMapForm.FormCreate(Sender: TObject); +begin + SaveDialog.InitialDir := EditorDir; +end; + +end. diff --git a/src/editor/f_savemap.lfm b/src/editor/f_savemap.lfm new file mode 100644 index 0000000..e9a8dbe --- /dev/null +++ b/src/editor/f_savemap.lfm @@ -0,0 +1,77 @@ +object SaveMapForm: TSaveMapForm + Left = 368 + Top = 298 + BorderIcons = [] + BorderStyle = bsSingle + Caption = 'Сохранить карту' + ClientHeight = 239 + ClientWidth = 152 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + OnActivate = FormActivate + PixelsPerInch = 96 + object lbMapList: TListBox + Left = 0 + Top = 25 + Width = 152 + Height = 186 + Align = alClient + ItemHeight = 13 + Sorted = True + TabOrder = 0 + OnClick = lbMapListClick + end + object Panel2: TPanel + Left = 0 + Top = 0 + Width = 152 + Height = 25 + Align = alTop + BevelOuter = bvNone + TabOrder = 1 + object eMapName: TEdit + Left = 0 + Top = 0 + Width = 153 + Height = 21 + CharCase = ecUpperCase + MaxLength = 16 + TabOrder = 0 + OnChange = eMapNameChange + end + end + object Panel1: TPanel + Left = 0 + Top = 211 + Width = 152 + Height = 28 + Align = alBottom + BevelOuter = bvNone + TabOrder = 2 + object bOK: TButton + Left = 0 + Top = 0 + Width = 72 + Height = 25 + Caption = 'OK' + Default = True + TabOrder = 0 + OnClick = bOKClick + end + object bCancel: TButton + Left = 77 + Top = 0 + Width = 72 + Height = 25 + Cancel = True + Caption = 'Отмена' + ModalResult = 2 + TabOrder = 1 + end + end +end diff --git a/src/editor/f_savemap.pas b/src/editor/f_savemap.pas new file mode 100644 index 0000000..fde781f --- /dev/null +++ b/src/editor/f_savemap.pas @@ -0,0 +1,151 @@ +unit f_savemap; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; + +type + TSaveMapForm = class (TForm) + lbMapList: TListBox; + Panel1: TPanel; + bOK: TButton; + bCancel: TButton; + Panel2: TPanel; + eMapName: TEdit; + + procedure GetMaps(FileName: String; placeName: Boolean); + procedure FormActivate(Sender: TObject); + procedure eMapNameChange(Sender: TObject); + procedure lbMapListClick(Sender: TObject); + procedure bOKClick(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + SaveMapForm: TSaveMapForm; + +implementation + +uses + BinEditor, MAPREADER, WADEDITOR, WADSTRUCT, MAPSTRUCT, g_language; + +{$R *.lfm} + +procedure TSaveMapForm.FormActivate(Sender: TObject); +begin + bOK.Enabled := (eMapName.Text <> ''); + eMapName.SetFocus(); +end; + +procedure TSaveMapForm.eMapNameChange(Sender: TObject); +begin + if eMapName.Text <> '' then + bOK.Enabled := True + else + bOK.Enabled := False; +end; + +procedure TSaveMapForm.lbMapListClick(Sender: TObject); +begin + if lbMapList.ItemIndex > -1 then + eMapName.Text := lbMapList.Items[lbMapList.ItemIndex]; +end; + +procedure TSaveMapForm.bOKClick(Sender: TObject); +var + a: Integer; + ok: Boolean; + +begin + ok := True; + for a := 0 to lbMapList.Count-1 do + if eMapName.Text = lbMapList.Items[a] then + begin + ok := MessageBox(0, PChar(Format(_lc[I_MSG_MAP_EXISTS], + [eMapName.Text])), + PChar(_lc[I_MSG_SAVE_MAP]), + MB_ICONQUESTION or MB_YESNO or MB_DEFBUTTON1) = mrYes; + if not ok then + Exit; + Break; + end; + + if ok then + SaveMapForm.ModalResult := mrOk + else + SaveMapForm.ModalResult := mrCancel; +end; + +procedure TSaveMapForm.GetMaps(FileName: String; placeName: Boolean); +var + WAD: TWADEditor_1; + a, max_num, j: Integer; + ResList: SArray; + Data: Pointer; + Len: Integer; + Sign: Array [0..2] of Char; + nm: String; + +begin + lbMapList.Items.Clear(); + max_num := 1; + + WAD := TWADEditor_1.Create(); + WAD.ReadFile(FileName); + ResList := WAD.GetResourcesList(''); + + if ResList <> nil then + for a := 0 to High(ResList) do + begin + if not WAD.GetResource('', ResList[a], Data, Len) then + Continue; + + CopyMemory(@Sign[0], Data, 3); + FreeMem(Data); + + if Sign = MAP_SIGNATURE then + begin + nm := ResList[a]; + lbMapList.Items.Add(nm); + + if placeName then + begin + nm := UpperCase(nm); + if (nm[1] = 'M') and + (nm[2] = 'A') and + (nm[3] = 'P') then + begin + nm := Trim(Copy(nm, 4, Length(nm)-3)); + j := StrToIntDef(nm, 0); + if j >= max_num then + max_num := j + 1; + end; + end; + end; + + Sign := ''; + end; + + WAD.Free(); + + if placeName then + begin + nm := IntToStr(max_num); + if Length(nm) < 2 then + nm := '0' + nm; + nm := 'MAP' + nm; + eMapName.Text := nm; + end + else + eMapName.Text := ''; +end; + +end. diff --git a/src/editor/f_saveminimap.lfm b/src/editor/f_saveminimap.lfm new file mode 100644 index 0000000..f540395 --- /dev/null +++ b/src/editor/f_saveminimap.lfm @@ -0,0 +1,84 @@ +object SaveMiniMapForm: TSaveMiniMapForm + Left = 362 + Top = 299 + Width = 431 + Height = 225 + Caption = 'Сохранить мини-карту' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + OnActivate = FormActivate + PixelsPerInch = 96 + object pbMiniMap: TPaintBox + Left = 185 + Top = 0 + Width = 230 + Height = 187 + Align = alClient + OnPaint = pbMiniMapPaint + end + object Panel1: TPanel + Left = 0 + Top = 0 + Width = 185 + Height = 187 + Align = alLeft + BevelOuter = bvNone + TabOrder = 0 + object LabelScale: TLabel + Left = 4 + Top = 10 + Width = 49 + Height = 13 + Caption = 'Масштаб:' + end + object bSave: TButton + Left = 2 + Top = 128 + Width = 173 + Height = 25 + Anchors = [akLeft, akBottom] + Caption = 'Сохранить' + Default = True + TabOrder = 1 + OnClick = bSaveClick + end + object cbScale: TComboBox + Left = 98 + Top = 6 + Width = 73 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + ItemIndex = 0 + TabOrder = 0 + Text = '1/16' + OnChange = cbScaleChange + Items.Strings = ( + '1/16' + '1/8') + end + object bClose: TButton + Left = 2 + Top = 158 + Width = 173 + Height = 25 + Anchors = [akLeft, akBottom] + Cancel = True + Caption = 'Закрыть' + TabOrder = 2 + OnClick = bCloseClick + end + end + object SaveDialog: TSaveDialog + DefaultExt = '.bmp' + Filter = 'BMP files (*.bmp)|*.bmp|All files (*.*)|*.*' + Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofEnableSizing] + Left = 8 + Top = 48 + end +end diff --git a/src/editor/f_saveminimap.pas b/src/editor/f_saveminimap.pas new file mode 100644 index 0000000..a314ac7 --- /dev/null +++ b/src/editor/f_saveminimap.pas @@ -0,0 +1,164 @@ +unit f_saveminimap; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; + +type + TSaveMiniMapForm = class(TForm) + SaveDialog: TSaveDialog; + pbMiniMap: TPaintBox; + Panel1: TPanel; + LabelScale: TLabel; + cbScale: TComboBox; + bSave: TButton; + bClose: TButton; + + procedure bCloseClick(Sender: TObject); + procedure cbScaleChange(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure pbMiniMapPaint(Sender: TObject); + procedure bSaveClick(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + SaveMiniMapForm: TSaveMiniMapForm; + +implementation + +uses + e_graphics, g_map, MAPDEF, Math, f_main; + +{$R *.lfm} + +procedure DrawMiniMap(canv: TCanvas); +var + a, w, h, Scale, aX, aY, aX2, aY2: Integer; + c: TRGB; + +begin + if SaveMiniMapForm.cbScale.ItemIndex = 0 then + Scale := 1 + else + Scale := 2; + + w := (gMapInfo.Width div (16 div Scale))+4; + h := (gMapInfo.Height div (16 div Scale))+4; + + canv.Brush.Color := $00000000; + canv.FillRect(canv.ClipRect); + + canv.Pen.Color := $00FFFFFF; + canv.Rectangle(0, 0, w, h); + + if gPanels = nil then + Exit; + + for a := 0 to High(gPanels) do + with gPanels[a] do + if PanelType <> 0 then + begin + aX := 2+(X div (16 div Scale)); + aY := 2+(Y div (16 div Scale)); + + if Width div (16 div Scale) = 0 then + aX2 := aX+1 + else + aX2 := aX+Width div (16 div Scale); + + if Height div (16 div Scale) = 0 then + aY2 := aY+1 + else + aY2 := aY+Height div (16 div Scale); + + case PanelType of + PANEL_WALL: c := _RGB(208, 208, 208); + PANEL_CLOSEDOOR: c := _RGB(255, 255, 0); + PANEL_WATER: c := _RGB(0, 0, 252); + PANEL_ACID1: c := _RGB(200, 80, 4); + PANEL_ACID2: c := _RGB(252, 140, 56); + PANEL_STEP: c := _RGB(128, 128, 128); + else Continue; + end; + + canv.Brush.Color := c.R+c.G*256+c.B*256*256; + canv.FillRect(Rect(aX, aY, aX2, aY2)); + end; +end; + +procedure TSaveMiniMapForm.bCloseClick(Sender: TObject); +begin + Close(); +end; + +procedure TSaveMiniMapForm.cbScaleChange(Sender: TObject); +begin + DrawMiniMap(pbMiniMap.Canvas) +end; + +procedure TSaveMiniMapForm.FormActivate(Sender: TObject); +begin + DrawMiniMap(pbMiniMap.Canvas); +end; + +procedure TSaveMiniMapForm.pbMiniMapPaint(Sender: TObject); +begin + DrawMiniMap(pbMiniMap.Canvas); +end; + +procedure TSaveMiniMapForm.bSaveClick(Sender: TObject); +var + bmp: TBitmap; + Scale, w, h: Integer; + +begin + SaveDialog.FileName := ChangeFileExt(ExtractFileName(gMapInfo.FileName), '') + + '_' + LowerCase(gMapInfo.MapName); + + // Filter out special characters + SaveDialog.FileName := StringReplace(SaveDialog.FileName, '/', '', [rfReplaceAll]); + SaveDialog.FileName := StringReplace(SaveDialog.FileName, '\', '', [rfReplaceAll]); + SaveDialog.FileName := StringReplace(SaveDialog.FileName, ':', '', [rfReplaceAll]); + SaveDialog.FileName := StringReplace(SaveDialog.FileName, '*', '', [rfReplaceAll]); + SaveDialog.FileName := StringReplace(SaveDialog.FileName, '?', '', [rfReplaceAll]); + SaveDialog.FileName := StringReplace(SaveDialog.FileName, '"', '', [rfReplaceAll]); + SaveDialog.FileName := StringReplace(SaveDialog.FileName, '<', '', [rfReplaceAll]); + SaveDialog.FileName := StringReplace(SaveDialog.FileName, '>', '', [rfReplaceAll]); + SaveDialog.FileName := StringReplace(SaveDialog.FileName, '|', '', [rfReplaceAll]); + + if SaveDialog.FileName = '_' then + SaveDialog.FileName := ''; + + if SaveDialog.Execute() then + begin + bmp := TBitmap.Create(); + + if SaveMiniMapForm.cbScale.ItemIndex = 0 then + Scale := 1 + else + Scale := 2; + + w := (gMapInfo.Width div (16 div Scale))+4; + h := (gMapInfo.Height div (16 div Scale))+4; + + bmp.Width := w; + bmp.Height := h; + + DrawMiniMap(bmp.Canvas); + + bmp.SaveToFile(SaveDialog.FileName); + + bmp.Free(); + end; +end; + +end. diff --git a/src/editor/f_selectlang.lfm b/src/editor/f_selectlang.lfm new file mode 100644 index 0000000..9a81140 --- /dev/null +++ b/src/editor/f_selectlang.lfm @@ -0,0 +1,42 @@ +object SelectLanguageForm: TSelectLanguageForm + Left = 365 + Top = 244 + BorderIcons = [] + BorderStyle = bsSingle + Caption = 'Language / Язык' + ClientHeight = 63 + ClientWidth = 193 + Color = clBtnFace + DefaultMonitor = dmMainForm + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poMainFormCenter + OnActivate = FormActivate + PixelsPerInch = 96 + object Label1: TLabel + Left = 8 + Top = 8 + Width = 174 + Height = 13 + Caption = 'Select Language / Выберите язык:' + end + object Button1: TButton + Left = 8 + Top = 32 + Width = 75 + Height = 25 + Caption = 'English' + TabOrder = 1 + end + object Button2: TButton + Left = 112 + Top = 32 + Width = 75 + Height = 25 + Caption = 'Русский' + TabOrder = 0 + end +end diff --git a/src/editor/f_selectlang.pas b/src/editor/f_selectlang.pas new file mode 100644 index 0000000..eac54da --- /dev/null +++ b/src/editor/f_selectlang.pas @@ -0,0 +1,37 @@ +unit f_selectlang; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls; + +type + TSelectLanguageForm = class(TForm) + Button1: TButton; + Button2: TButton; + Label1: TLabel; + procedure FormActivate(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + SelectLanguageForm: TSelectLanguageForm; + +implementation + +{$R *.lfm} + +procedure TSelectLanguageForm.FormActivate(Sender: TObject); +begin + Button1.ModalResult := 1; + Button2.ModalResult := 2; +end; + +end. diff --git a/src/editor/f_selectmap.lfm b/src/editor/f_selectmap.lfm new file mode 100644 index 0000000..ab02653 --- /dev/null +++ b/src/editor/f_selectmap.lfm @@ -0,0 +1,58 @@ +object SelectMapForm: TSelectMapForm + Left = 488 + Top = 205 + Width = 169 + Height = 266 + BorderIcons = [] + Caption = 'Выберите карту' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Position = poScreenCenter + OnActivate = FormActivate + PixelsPerInch = 96 + object lbMapList: TListBox + Left = 0 + Top = 0 + Width = 153 + Height = 200 + Align = alClient + ItemHeight = 13 + Sorted = True + TabOrder = 0 + OnClick = lbMapListClick + end + object Panel1: TPanel + Left = 0 + Top = 200 + Width = 153 + Height = 28 + Align = alBottom + BevelOuter = bvNone + TabOrder = 1 + object bOK: TButton + Left = 0 + Top = 0 + Width = 72 + Height = 25 + Caption = 'OK' + Default = True + ModalResult = 1 + TabOrder = 0 + end + object bCancel: TButton + Left = 77 + Top = 0 + Width = 72 + Height = 25 + Cancel = True + Caption = 'Отмена' + ModalResult = 2 + TabOrder = 1 + OnClick = bCancelClick + end + end +end diff --git a/src/editor/f_selectmap.pas b/src/editor/f_selectmap.pas new file mode 100644 index 0000000..afa6a3e --- /dev/null +++ b/src/editor/f_selectmap.pas @@ -0,0 +1,94 @@ +unit f_selectmap; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, SysUtils, Variants, Classes, Graphics, + Controls, Forms, Dialogs, StdCtrls, ExtCtrls; + +type + TSelectMapForm = class (TForm) + lbMapList: TListBox; + Panel1: TPanel; + bOK: TButton; + bCancel: TButton; + + procedure GetMaps(FileName: String); + procedure FormActivate(Sender: TObject); + procedure lbMapListClick(Sender: TObject); + procedure bCancelClick(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + SelectMapForm: TSelectMapForm; + +implementation + +uses + BinEditor, MAPREADER, WADEDITOR, WADSTRUCT, MAPSTRUCT; + +{$R *.lfm} + +procedure TSelectMapForm.FormActivate(Sender: TObject); +begin + bOK.Enabled := (lbMapList.ItemIndex <> -1); + lbMapList.SetFocus(); +end; + +procedure TSelectMapForm.lbMapListClick(Sender: TObject); +begin + if lbMapList.ItemIndex <> -1 then + bOK.Enabled := True; +end; + +procedure TSelectMapForm.bCancelClick(Sender: TObject); +begin + Close(); +end; + +procedure TSelectMapForm.GetMaps(FileName: String); +var + WAD: TWADEditor_1; + a: Integer; + ResList: SArray; + Data: Pointer; + Len: Integer; + Sign: Array [0..2] of Char; + +begin + lbMapList.Items.Clear(); + + WAD := TWADEditor_1.Create(); + if not WAD.ReadFile(FileName) then + begin + WAD.Free(); + Exit; + end; + + ResList := WAD.GetResourcesList(''); + + if ResList <> nil then + for a := 0 to High(ResList) do + begin + if not WAD.GetResource('', ResList[a], Data, Len) then + Continue; + + CopyMemory(@Sign[0], Data, 3); + FreeMem(Data); + + if Sign = MAP_SIGNATURE then + lbMapList.Items.Add(ResList[a]); + Sign := ''; + end; + + WAD.Free(); +end; + +end. diff --git a/src/editor/g_basic.pas b/src/editor/g_basic.pas new file mode 100644 index 0000000..1433fec --- /dev/null +++ b/src/editor/g_basic.pas @@ -0,0 +1,306 @@ +unit g_basic; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages; + +Type + String16 = String[16]; + Char16 = packed array[0..15] of Char; + Char32 = packed array[0..31] of Char; + Char64 = packed array[0..63] of Char; + Char256 = packed array[0..255] of Char; + ArrayStr16 = Array of String16; + SArray = Array of String; + DWArray = Array of DWORD; + + TDirection = (D_LEFT, D_RIGHT); + +function g_Collide(X1, Y1: Integer; Width1, Height1: Word; + X2, Y2: Integer; Width2, Height2: Word): Boolean; +function g_CollidePoint(X, Y, X2, Y2: Integer; Width, Height: Word): Boolean; +function g_CollideLevel(X, Y: Integer; Width, Height: Word): Boolean; +function g_CollideLevel2(X, Y: Integer; Width, Height: Word; _ID: DWORD; var PanelID: DWORD): Boolean; +function g_PatchLength(X1, Y1, X2, Y2: Integer): Word; +procedure IncMax(var A: Integer; B, Max: Integer); overload; +procedure IncMax(var A: Single; B, Max: Single); overload; +procedure IncMax(var A: Integer; Max: Integer); overload; +procedure IncMax(var A: Single; Max: Single); overload; +procedure IncMax(var A: Word; B, Max: Word); overload; +procedure IncMax(var A: Word; Max: Word); overload; +procedure IncMax(var A: SmallInt; B, Max: SmallInt); overload; +procedure IncMax(var A: SmallInt; Max: SmallInt); overload; +procedure DecMin(var A: Integer; B, Min: Integer); overload; +procedure DecMin(var A: Single; B, Min: Single); overload; +procedure DecMin(var A: Integer; Min: Integer); overload; +procedure DecMin(var A: Single; Min: Single); overload; +procedure DecMin(var A: Word; B, Min: Word); overload; +procedure DecMin(var A: Word; Min: Word); overload; +procedure DecMin(var A: Byte; B, Min: Byte); overload; +procedure DecMin(var A: Byte; Min: Byte); overload; +function Sign(A: Integer): ShortInt; overload; +function Sign(A: Single): ShortInt; overload; +function PointToRect(X, Y: Integer; X1, Y1, Width, Height: Integer): Integer; +procedure g_ChangeDir(var dir: TDirection); +function g_GetFileTime(fileName: String): Integer; +function g_SetFileTime(fileName: String; time: Integer): Boolean; + +implementation + +uses + Math, g_map, MAPDEF, SysUtils; + +procedure g_ChangeDir(var dir: TDirection); +begin + if dir = D_LEFT then + dir := D_RIGHT + else + dir := D_LEFT; +end; + +function g_GetFileTime(fileName: String): Integer; +var + F: File; + +begin + if not FileExists(fileName) then + begin + Result := -1; + Exit; + end; + + AssignFile(F, fileName); + Reset(F); + Result := FileGetDate(TFileRec(F).Handle); + CloseFile(F); +end; + +function g_SetFileTime(fileName: String; time: Integer): Boolean; +var + F: File; + +begin + if (not FileExists(fileName)) or (time < 0) then + begin + Result := False; + Exit; + end; + + AssignFile(F, fileName); + Reset(F); + Result := (FileSetDate(TFileRec(F).Handle, time) = 0); + CloseFile(F); +end; + +function g_PatchLength(X1, Y1, X2, Y2: Integer): Word; +begin + Result := Trunc(Hypot(Abs(X2-X1), Abs(Y2-Y1))); +end; + +function g_CollideLevel(X, Y: Integer; Width, Height: Word): Boolean; +var + a: Integer; + +begin + Result := False; + + if gPanels = nil then Exit; + + for a := 0 to High(gPanels) do + if gPanels[a].PanelType = PANEL_WALL then + if not (((Y + Height <= gPanels[a].Y) or + (Y >= gPanels[a].Y + gPanels[a].Height)) or + ((X + Width <= gPanels[a].X) or + (X >= gPanels[a].X + gPanels[a].Width))) then + begin + Result := True; + Exit; + end; +end; + +{function g_CollideLevel2(X, Y, X2, Y2: Integer): Boolean; +var + a: Integer; +begin + Result := False; + + if gWalls = nil then Exit; + + for a := 0 to High(gWalls) do + if not (((Y2 <= gWalls[a].Y) or + (Y >= gWalls[a].Y + gWalls[a].Height)) or + ((X2 <= gWalls[a].X) or + (X >= gWalls[a].X + gWalls[a].Width))) then + begin + Result := True; + Exit; + end; +end;} + +function g_CollideLevel2(X, Y: Integer; Width, Height: Word; _ID: DWORD; var PanelID: DWORD): Boolean; +var + a: DWORD; +begin + Result := False; + + if gPanels = nil then Exit; + + for a := 0 to High(gPanels) do + if (gPanels[a].PanelType = PANEL_WALL) and (_ID <> a) then + if not (((Y + Height <= gPanels[a].Y) or + (Y >= gPanels[a].Y + gPanels[a].Height)) or + ((X + Width <= gPanels[a].X) or + (X >= gPanels[a].X + gPanels[a].Width))) then + begin + Result := True; + PanelID := a; + Exit; + end; +end; + +function g_Collide(X1, Y1: Integer; Width1, Height1: Word; + X2, Y2: Integer; Width2, Height2: Word): Boolean; +begin + Result := not (((Y1 + Height1 <= Y2) or + (Y1 >= Y2 + Height2)) or + ((X1 + Width1 <= X2) or + (X1 >= X2 + Width2))); +end; + +function g_CollidePoint(X, Y, X2, Y2: Integer; Width, Height: Word): Boolean; +begin + {X := X-X2; + Y := Y-Y2; + Result := (x >= 0) and (x <= Width) and + (y >= 0) and (y <= Height);} + Result := (X >= X2) and (X <= (X2+Width)) and + (Y >= Y2) and (Y <= (Y2+Height)); +end; + +procedure IncMax(var A: Integer; B, Max: Integer); +begin + if A+B > Max then A := Max else A := A+B; +end; + +procedure IncMax(var A: Single; B, Max: Single); +begin + if A+B > Max then A := Max else A := A+B; +end; + +procedure DecMin(var A: Integer; B, Min: Integer); +begin + if A-B < Min then A := Min else A := A-B; +end; + +procedure DecMin(var A: Word; B, Min: Word); +begin + if A-B < Min then A := Min else A := A-B; +end; + +procedure DecMin(var A: Single; B, Min: Single); +begin + if A-B < Min then A := Min else A := A-B; +end; + +procedure IncMax(var A: Integer; Max: Integer); +begin + if A+1 > Max then A := Max else A := A+1; +end; + +procedure IncMax(var A: Single; Max: Single); +begin + if A+1 > Max then A := Max else A := A+1; +end; + +procedure IncMax(var A: Word; B, Max: Word); +begin + if A+B > Max then A := Max else A := A+B; +end; + +procedure IncMax(var A: Word; Max: Word); +begin + if A+1 > Max then A := Max else A := A+1; +end; + +procedure IncMax(var A: SmallInt; B, Max: SmallInt); +begin + if A+B > Max then A := Max else A := A+B; +end; + +procedure IncMax(var A: SmallInt; Max: SmallInt); +begin + if A+1 > Max then A := Max else A := A+1; +end; + +procedure DecMin(var A: Integer; Min: Integer); +begin + if A-1 < Min then A := Min else A := A-1; +end; + +procedure DecMin(var A: Single; Min: Single); +begin + if A-1 < Min then A := Min else A := A-1; +end; + +procedure DecMin(var A: Word; Min: Word); +begin + if A-1 < Min then A := Min else A := A-1; +end; + +procedure DecMin(var A: Byte; B, Min: Byte); +begin + if A-B < Min then A := Min else A := A-B; +end; + +procedure DecMin(var A: Byte; Min: Byte); overload; +begin + if A-1 < Min then A := Min else A := A-1; +end; + +function Sign(A: Integer): ShortInt; +begin + if A < 0 then Result := -1 + else if A > 0 then Result := 1 + else Result := 0; +end; + +function Sign(A: Single): ShortInt; +const + Eps = 1.0E-5; +begin + if Abs(A) < Eps then Result := 0 + else if A < 0 then Result := -1 + else Result := 1; +end; + +function PointToRect(X, Y: Integer; X1, Y1, Width, Height: Integer): Integer; +begin + X := X-X1; + Y := Y-Y1; + + if X < 0 then + begin + if Y < 0 then Result := Round(Sqrt(Sqr(X)+Sqr(Y))) + else if Y > Height then Result := Round(Sqrt(Sqr(X)+Sqr(Y-Height))) + else Result := -X; + end + else + if X > Width then + begin + X := X-width; + if y < 0 then Result := Round(Sqrt(Sqr(X)+Sqr(Y))) + else if Y > Height then Result := Round(Sqrt(Sqr(X)+Sqr(Y-Height))) + else Result := X; + end + else + begin + if Y < 0 then Result := -Y + else if Y > Height then Result := Y-Height + else Result:=0; + end; +end; + +end. diff --git a/src/editor/g_language.pas b/src/editor/g_language.pas new file mode 100644 index 0000000..2a99675 --- /dev/null +++ b/src/editor/g_language.pas @@ -0,0 +1,2466 @@ +Unit g_language; + +{$MODE Delphi} + +Interface + +Uses + g_Basic, MAPDEF; + +Type + TStrings_Locale = ( + I_NOT_ACCESSIBLE, + + I_ARRAY_BOOL_FALSE, + I_ARRAY_BOOL_TRUE, + + I_ARRAY_DIR_LEFT, + I_ARRAY_DIR_RIGHT, + I_ARRAY_DIR_SAME, + I_ARRAY_DIR_REVERSED, + + I_ARRAY_DIRBTN_LEFT, + I_ARRAY_DIRBTN_RIGHT, + I_ARRAY_DIRBTN_UP, + I_ARRAY_DIRBTN_DOWN, + + I_ARRAY_PANEL_WALL, + I_ARRAY_PANEL_BACK, + I_ARRAY_PANEL_FRONT, + I_ARRAY_PANEL_DOOR_OPEN, + I_ARRAY_PANEL_DOOR_CLOSE, + I_ARRAY_PANEL_STAIR, + I_ARRAY_PANEL_WATER, + I_ARRAY_PANEL_ACID_1, + I_ARRAY_PANEL_ACID_2, + I_ARRAY_PANEL_LIFT_UP, + I_ARRAY_PANEL_LIFT_DOWN, + I_ARRAY_PANEL_LIFT_LEFT, + I_ARRAY_PANEL_LIFT_RIGHT, + I_ARRAY_PANEL_BLOCKMON, + + I_ARRAY_FX_NONE, + I_ARRAY_FX_TELEPORT, + I_ARRAY_FX_RESPAWN, + I_ARRAY_FX_FIRE, + + I_ARRAY_ITEM_MEDKIT, + I_ARRAY_ITEM_LARGE_MEDKIT, + I_ARRAY_ITEM_BLACK_MEDKIT, + I_ARRAY_ITEM_GREEN_ARMOR, + I_ARRAY_ITEM_BLUE_ARMOR, + I_ARRAY_ITEM_BLUE_SPHERE, + I_ARRAY_ITEM_MEGASPHERE, + I_ARRAY_ITEM_HAZ_SUIT, + I_ARRAY_ITEM_OXYGEN, + I_ARRAY_ITEM_INVULNERABILITY, + I_ARRAY_ITEM_CHAINSAW, + I_ARRAY_ITEM_SHOTGUN, + I_ARRAY_ITEM_DB_SHOTGUN, + I_ARRAY_ITEM_CHAINGUN, + I_ARRAY_ITEM_ROCKET_LAUNCHER, + I_ARRAY_ITEM_PLASMA_RIFLE, + I_ARRAY_ITEM_BFG, + I_ARRAY_ITEM_SUPER_MINIGUN, + I_ARRAY_ITEM_CLIP, + I_ARRAY_ITEM_AMMO_BOX, + I_ARRAY_ITEM_4_SHELLS, + I_ARRAY_ITEM_25_SHELLS, + I_ARRAY_ITEM_1_ROCKET, + I_ARRAY_ITEM_ROCKET_BOX, + I_ARRAY_ITEM_CELL, + I_ARRAY_ITEM_LARGE_CELL, + I_ARRAY_ITEM_BACKPACK, + I_ARRAY_ITEM_KEY_RED, + I_ARRAY_ITEM_KEY_GREEN, + I_ARRAY_ITEM_KEY_BLUE, + I_ARRAY_ITEM_BOTTLE, + I_ARRAY_ITEM_HELMET, + I_ARRAY_ITEM_JETPACK, + I_ARRAY_ITEM_INVIS, + + I_ARRAY_SHOT_PISTOL, + I_ARRAY_SHOT_BULLET, + I_ARRAY_SHOT_SHOTGUN, + I_ARRAY_SHOT_SSG, + I_ARRAY_SHOT_IMP, + I_ARRAY_SHOT_PLASMA, + I_ARRAY_SHOT_SPIDER, + I_ARRAY_SHOT_CACO, + I_ARRAY_SHOT_BARON, + I_ARRAY_SHOT_MANCUB, + I_ARRAY_SHOT_REV, + I_ARRAY_SHOT_ROCKET, + I_ARRAY_SHOT_BFG, + I_ARRAY_SHOT_EXPL, + I_ARRAY_SHOT_BFGEXPL, + + I_ARRAY_MON_DEMON, + I_ARRAY_MON_IMP, + I_ARRAY_MON_ZOMBIE, + I_ARRAY_MON_SERGEANT, + I_ARRAY_MON_CYBER, + I_ARRAY_MON_CGUN, + I_ARRAY_MON_HELL_BARON, + I_ARRAY_MON_HELL_KNIGHT, + I_ARRAY_MON_CACODEMON, + I_ARRAY_MON_LOST_SOUL, + I_ARRAY_MON_PAIN_ELEMENTAL, + I_ARRAY_MON_MASTERMIND, + I_ARRAY_MON_ARACHNATRON, + I_ARRAY_MON_MANCUBUS, + I_ARRAY_MON_REVENANT, + I_ARRAY_MON_ARCHVILE, + I_ARRAY_MON_FISH, + I_ARRAY_MON_BARREL, + I_ARRAY_MON_ROBOT, + I_ARRAY_MON_PRIKOLIST, + + I_ARRAY_AREA_PLAYER_ONE, + I_ARRAY_AREA_PLAYER_TWO, + I_ARRAY_AREA_DM, + I_ARRAY_AREA_FLAG_RED, + I_ARRAY_AREA_FLAG_BLUE, + I_ARRAY_AREA_FLAG_DOM, + I_ARRAY_AREA_TEAM_RED, + I_ARRAY_AREA_TEAM_BLUE, + + I_ARRAY_TR_EXIT, + I_ARRAY_TR_TELEPORT, + I_ARRAY_TR_DOOR_OPEN, + I_ARRAY_TR_DOOR_CLOSE, + I_ARRAY_TR_DOOR_SWITCH, + I_ARRAY_TR_DOOR_5_SEC, + I_ARRAY_TR_TRAP_CLOSE, + I_ARRAY_TR_TRAP, + I_ARRAY_TR_EXTEND, + I_ARRAY_TR_SECRET, + I_ARRAY_TR_LIFT_UP, + I_ARRAY_TR_LIFT_DOWN, + I_ARRAY_TR_LIFT_SWITCH, + I_ARRAY_TR_TEXTURE, + I_ARRAY_TR_ON, + I_ARRAY_TR_OFF, + I_ARRAY_TR_SWITCH, + I_ARRAY_TR_SOUND, + I_ARRAY_TR_SPAWN_MONSTER, + I_ARRAY_TR_SPAWN_ITEM, + I_ARRAY_TR_MUSIC, + I_ARRAY_TR_PUSH, + I_ARRAY_TR_SCORE, + I_ARRAY_TR_MESSAGE, + I_ARRAY_TR_DAMAGE, + I_ARRAY_TR_HEALTH, + I_ARRAY_TR_SHOT, + I_ARRAY_TR_EFFECT, + + I_PROP_ID, + I_PROP_X, + I_PROP_Y, + I_PROP_WIDTH, + I_PROP_HEIGHT, + I_PROP_PANEL_TYPE, + I_PROP_PANEL_TEX, + I_PROP_PANEL_ALPHA, + I_PROP_PANEL_BLEND, + I_PROP_DM_ONLY, + I_PROP_ITEM_FALLS, + I_PROP_DIRECTION, + + I_PROP_TR_TYPE, + I_PROP_TR_ENABLED, + I_PROP_TR_TEXTURE_PANEL, + I_PROP_TR_ACTIVATION, + I_PROP_TR_KEYS, + I_PROP_TR_D2D, + I_PROP_TR_SILENT, + I_PROP_TR_COUNT, + I_PROP_TR_INTERVAL, + I_PROP_TR_HEALTH, + I_PROP_TR_NEXT_MAP, + I_PROP_TR_TELEPORT_TO, + I_PROP_TR_TELEPORT_SILENT, + I_PROP_TR_TELEPORT_DIR, + I_PROP_TR_DOOR_PANEL, + I_PROP_TR_TRAP_PANEL, + I_PROP_TR_EX_AREA, + I_PROP_TR_EX_DELAY, + I_PROP_TR_EX_COUNT, + I_PROP_TR_EX_MONSTER, + I_PROP_TR_EX_RANDOM, + I_PROP_TR_LIFT_PANEL, + I_PROP_TR_TEXTURE_ONCE, + I_PROP_TR_TEXTURE_ANIM_ONCE, + I_PROP_TR_SOUND_NAME, + I_PROP_TR_SOUND_VOLUME, + I_PROP_TR_SOUND_PAN, + I_PROP_TR_SOUND_COUNT, + I_PROP_TR_SOUND_LOCAL, + I_PROP_TR_SOUND_SWITCH, + I_PROP_TR_FX_TYPE, + I_PROP_TR_SPAWN_TO, + I_PROP_TR_SPAWN_MAX, + I_PROP_TR_SPAWN_DELAY, + I_PROP_TR_MONSTER_TYPE, + I_PROP_TR_MONSTER_ACTIVE, + I_PROP_TR_MONSTER_BEHAVIOUR, + I_PROP_TR_MONSTER_BEHAVIOUR_0, + I_PROP_TR_MONSTER_BEHAVIOUR_1, + I_PROP_TR_MONSTER_BEHAVIOUR_2, + I_PROP_TR_MONSTER_BEHAVIOUR_3, + I_PROP_TR_MONSTER_BEHAVIOUR_4, + I_PROP_TR_MONSTER_BEHAVIOUR_5, + I_PROP_TR_ITEM_TYPE, + I_PROP_TR_MUSIC_NAME, + I_PROP_TR_MUSIC_ACT, + I_PROP_TR_MUSIC_ON, + I_PROP_TR_MUSIC_OFF, + I_PROP_TR_PUSH_ANGLE, + I_PROP_TR_PUSH_FORCE, + I_PROP_TR_PUSH_RESET, + I_PROP_TR_SCORE_ACT, + I_PROP_TR_SCORE_ACT_0, + I_PROP_TR_SCORE_ACT_1, + I_PROP_TR_SCORE_ACT_2, + I_PROP_TR_SCORE_ACT_3, + I_PROP_TR_SCORE_TEAM, + I_PROP_TR_SCORE_TEAM_0, + I_PROP_TR_SCORE_TEAM_1, + I_PROP_TR_SCORE_TEAM_2, + I_PROP_TR_SCORE_TEAM_3, + I_PROP_TR_SCORE_CON, + I_PROP_TR_SCORE_MSG, + I_PROP_TR_DAMAGE_VALUE, + I_PROP_TR_HEALTH_MAX, + I_PROP_TR_SHOT_TYPE, + I_PROP_TR_SHOT_SOUND, + I_PROP_TR_SHOT_ANGLE, + I_PROP_TR_SHOT_ACC, + I_PROP_TR_SHOT_TO, + I_PROP_TR_SHOT_TO_0, + I_PROP_TR_SHOT_TO_1, + I_PROP_TR_SHOT_TO_2, + I_PROP_TR_SHOT_TO_3, + I_PROP_TR_SHOT_TO_4, + I_PROP_TR_SHOT_TO_5, + I_PROP_TR_SHOT_TO_6, + I_PROP_TR_SHOT_ALLMAP, + I_PROP_TR_SHOT_AMMO, + I_PROP_TR_SHOT_RELOAD, + I_PROP_TR_SHOT_SIGHT, + I_PROP_TR_SHOT_PANEL, + I_PROP_TR_MESSAGE_KIND, + I_PROP_TR_MESSAGE_KIND_0, + I_PROP_TR_MESSAGE_KIND_1, + I_PROP_TR_MESSAGE_TO, + I_PROP_TR_MESSAGE_TO_0, + I_PROP_TR_MESSAGE_TO_1, + I_PROP_TR_MESSAGE_TO_2, + I_PROP_TR_MESSAGE_TO_3, + I_PROP_TR_MESSAGE_TO_4, + I_PROP_TR_MESSAGE_TO_5, + I_PROP_TR_MESSAGE_TEXT, + I_PROP_TR_MESSAGE_TIME, + I_PROP_TR_EFFECT_TYPE, + I_PROP_TR_EFFECT_SUBTYPE, + I_PROP_TR_EFFECT_COLOR, + I_PROP_TR_EFFECT_CENTER, + I_PROP_TR_EFFECT_VELX, + I_PROP_TR_EFFECT_VELY, + I_PROP_TR_EFFECT_SPL, + I_PROP_TR_EFFECT_SPR, + I_PROP_TR_EFFECT_SPU, + I_PROP_TR_EFFECT_SPD, + I_PROP_TR_EFFECT_PARTICLE, + I_PROP_TR_EFFECT_ANIMATION, + I_PROP_TR_EFFECT_SLIQUID, + I_PROP_TR_EFFECT_LLIQUID, + I_PROP_TR_EFFECT_DLIQUID, + I_PROP_TR_EFFECT_BLOOD, + I_PROP_TR_EFFECT_SPARK, + I_PROP_TR_EFFECT_BUBBLE, + + I_MSG_ERROR, + I_MSG_WRONG_TEXWIDTH, + I_MSG_WRONG_TEXHEIGHT, + I_MSG_WRONG_ALPHA, + I_MSG_WRONG_SIZE, + I_MSG_WRONG_XY, + I_MSG_TEXTURE_ALREADY, + I_MSG_RES_NAME_64, + I_MSG_CHOOSE_ITEM, + I_MSG_CHOOSE_MONSTER, + I_MSG_CHOOSE_AREA, + I_MSG_CHOOSE_TEXTURE, + I_MSG_CHOOSE_RES, + I_MSG_EXIT, + I_MSG_EXIT_PROMT, + I_MSG_DEL_TEXTURE, + I_MSG_DEL_TEXTURE_PROMT, + I_MSG_DEL_TEXTURE_CANT, + I_MSG_CLEAR_MAP, + I_MSG_CLEAR_MAP_PROMT, + I_MSG_DELETE_MAP, + I_MSG_DELETE_MAP_PROMT, + I_MSG_MAP_DELETED, + I_MSG_MAP_DELETED_PROMT, + I_MSG_EXEC_ERROR, + I_MSG_SOUND_ERROR, + I_MSG_WAD_ERROR, + I_MSG_RES_ERROR, + I_MSG_PACKED, + I_MSG_MAP_EXISTS, + I_MSG_SAVE_MAP, + + I_HINT_TELEPORT, + I_HINT_SPAWN, + I_HINT_PANEL_DOOR, + I_HINT_PANEL_TEXTURE, + I_HINT_PANEL_SHOT, + I_HINT_PANEL_LIFT, + I_HINT_MONSTER, + I_HINT_EXT_AREA, + I_HINT_WIDTH, + I_HINT_HEIGHT, + + I_MENU_FILE, + I_MENU_FILE_NEW, + I_MENU_FILE_OPEN, + I_MENU_FILE_SAVE, + I_MENU_FILE_SAVE_AS, + I_MENU_FILE_OPEN_WAD, + I_MENU_FILE_SAVE_MINI, + I_MENU_FILE_DELETE, + I_MENU_FILE_PACK_MAP, + I_MENU_FILE_EXIT, + + I_MENU_EDIT, + I_MENU_EDIT_UNDO, + I_MENU_EDIT_COPY, + I_MENU_EDIT_CUT, + I_MENU_EDIT_PASTE, + I_MENU_EDIT_SELECT_ALL, + I_MENU_EDIT_TO_FORE, + I_MENU_EDIT_TO_BACK, + + I_MENU_TOOLS, + I_MENU_TOOLS_SNAP_GRID, + I_MENU_TOOLS_MINIMAP, + I_MENU_TOOLS_STEP_GRID, + I_MENU_TOOLS_SHOW_EDGES, + I_MENU_TOOLS_LAYERS, + + I_MENU_SERV, + I_MENU_SERV_TEST, + I_MENU_SERV_OPT, + I_MENU_SERV_PREVIEW, + I_MENU_SERV_LAUNCH, + + I_MENU_SETS, + I_MENU_SETS_MAP, + I_MENU_SETS_EDITOR, + I_MENU_SETS_LAUNCH, + + I_MENU_HELP, + I_MENU_HELP_ABOUT, + + I_MENU_LAYER_BACK, + I_MENU_LAYER_WALL, + I_MENU_LAYER_FORE, + I_MENU_LAYER_STAIR, + I_MENU_LAYER_WATER, + I_MENU_LAYER_ITEM, + I_MENU_LAYER_MONSTER, + I_MENU_LAYER_AREA, + I_MENU_LAYER_TRIGGER, + + I_MENU_TB_NEW, + I_MENU_TB_OPEN, + I_MENU_TB_SAVE, + I_MENU_TB_OPEN_WAD, + I_MENU_TB_MINIMAP, + I_MENU_TB_LAYERS, + I_MENU_TB_GRID, + I_MENU_TB_GRID_STEP, + I_MENU_TB_LAUNCH, + + I_MENU_LAUNCH_SETS, + + I_CAP_FX_TYPE, + I_CAP_MONSTER_TYPE, + I_CAP_ITEM_TYPE, + I_CAP_ABOUT, + I_CAP_ACT, + I_CAP_ADD_SKY, + I_CAP_ADD_SOUND, + I_CAP_ADD_TEXTURE, + I_CAP_KEYS, + I_CAP_TEST, + I_CAP_OPT, + I_CAP_SETS, + I_CAP_LAUNCH, + I_CAP_ES, + I_CAP_PACK, + I_CAP_SAVE, + I_CAP_MINI, + I_CAP_SELECT, + + I_CTRL_PROP_KEY, + I_CTRL_PROP_VALUE, + I_CTRL_PANELS, + I_CTRL_ITEMS, + I_CTRL_MONSTERS, + I_CTRL_AREAS, + I_CTRL_TRIGGERS, + + I_CTRL_LIST_TEXTURE, + I_CTRL_LIST_ITEM, + I_CTRL_LIST_MONSTER, + I_CTRL_LIST_AREA, + I_CTRL_LIST_TRIGGER, + I_CTRL_LIST_ACTIVE, + I_CTRL_LIST_KEYS, + + I_CTRL_PREVIEW, + I_CTRL_ITEM_DM, + I_CTRL_ITEM_FALLS, + I_CTRL_LEFT, + I_CTRL_RIGHT, + + I_CTRL_ACT_PLAYER_CLOSE, + I_CTRL_ACT_MONSTER_CLOSE, + I_CTRL_ACT_PLAYER_PRESS, + I_CTRL_ACT_MONSTER_PRESS, + I_CTRL_ACT_SHOT, + I_CTRL_ACT_NO_MONSTER, + + I_CTRL_KEYS_RED, + I_CTRL_KEYS_GREEN, + I_CTRL_KEYS_BLUE, + I_CTRL_KEYS_TEAM_RED, + I_CTRL_KEYS_TEAM_BLUE, + + I_CTRL_OPT_GB, + I_CTRL_OPT_TEXTURE, + I_CTRL_OPT_PANEL, + I_CTRL_OPT_WALL, + I_CTRL_OPT_FORE, + I_CTRL_OPT_BACK, + I_CTRL_OPT_STAIR, + I_CTRL_OPT_WATER, + I_CTRL_OPT_ACID1, + I_CTRL_OPT_ACID2, + I_CTRL_OPT_LIFT, + I_CTRL_OPT_BLOCKMON, + I_CTRL_OPT_DESC_TEXTURE, + I_CTRL_OPT_DESC_PANEL, + + I_CTRL_SETS_STATS, + I_CTRL_SETS_SIZES, + + I_CTRL_LAUNCH_DM, + I_CTRL_LAUNCH_TDM, + I_CTRL_LAUNCH_CTF, + I_CTRL_LAUNCH_COOP, + I_CTRL_LAUNCH_2P, + I_CTRL_LAUNCH_FF, + I_CTRL_LAUNCH_EXIT, + I_CTRL_LAUNCH_WEAPONS, + I_CTRL_LAUNCH_MONSTERS, + I_CTRL_LAUNCH_CLOSE, + I_CTRL_LAUNCH_OPEN, + + I_CTRL_ES_GRID, + I_CTRL_ES_TEXTURE, + I_CTRL_ES_PANEL_SIZE, + + I_CTRL_PACK_TEXTURES, + I_CTRL_PACK_SKY, + I_CTRL_PACK_MUSIC, + I_CTRL_PACK_ADD, + I_CTRL_PACK_NON_STD, + + I_LAB_TEX_WIDTH, + I_LAB_TEX_HEIGHT, + + I_LAB_SPECTRUM, + + I_LAB_ABOUT_VER, + I_LAB_ABOUT_AUTHOR, + I_LAB_ABOUT_AUTHOR_2, + I_LAB_ABOUT_MAIL, + I_LAB_ABOUT_MAIL_2, + I_LAB_ABOUT_SITE, + I_LAB_ABOUT_HTTP, + + I_LAB_ADD_WADS, + I_LAB_ADD_SECTIONS, + + I_LAB_SETS_NAME, + I_LAB_SETS_DESC, + I_LAB_SETS_AUTHOR, + I_LAB_SETS_BACK, + I_LAB_SETS_MUSIC, + I_LAB_SETS_TEXTURES, + I_LAB_SETS_PANELS, + I_LAB_SETS_ITEMS, + I_LAB_SETS_MONSTERS, + I_LAB_SETS_AREAS, + I_LAB_SETS_TRIGGERS, + I_LAB_SETS_SIZES, + I_LAB_SETS_WIDTH, + I_LAB_SETS_HEIGHT, + I_LAB_SETS_MAPMOVE, + I_LAB_SETS_SNAPPING, + + I_LAB_LAUNCH_TIME, + I_LAB_LAUNCH_SECS, + I_LAB_LAUNCH_SCORE, + I_LAB_LAUNCH_PATH, + + I_LAB_ES_GRID, + I_LAB_ES_GRID_COLOR, + I_LAB_ES_BACK, + I_LAB_ES_PREVIEW, + I_LAB_ES_MINIMAP, + I_LAB_ES_RECENT, + I_LAB_ES_LANGUAGE, + + I_LAB_PACK_SAVE_TO, + I_LAB_PACK_MAP_NAME, + I_LAB_PACK_TEXTURES, + I_LAB_PACK_SKY, + I_LAB_PACK_MUSIC, + + I_LAB_MINI_SCALE, + + I_BTN_APPLY_PROPS, + I_BTN_OK, + I_BTN_CANCEL, + I_BTN_ADD, + I_BTN_CLOSE, + I_BTN_ADD_CLOSE, + I_BTN_TEST_AGAIN, + I_BTN_START, + I_BTN_PACK, + I_BTN_SAVE, + I_BTN_NO_SOUND, + I_BTN_TEXTURE_ADD, + I_BTN_TEXTURE_DELETE, + I_BTN_TEXTURE_EMPTY, + + I_LOAD_WAD, + I_LOAD_MAP, + I_LOAD_TEXTURES, + I_LOAD_PANELS, + I_LOAD_ITEMS, + I_LOAD_MONSTERS, + I_LOAD_AREAS, + I_LOAD_TRIGGERS, + + I_TEST_AREA_WALL, + I_TEST_AREA_WALL_STR, + I_TEST_SPAWNS_1, + I_TEST_SPAWNS_2, + I_TEST_SPAWNS, + I_TEST_NO_DM, + I_TEST_NO_DM_EX, + I_TEST_MONSTER_WALL, + I_TEST_MONSTER_WALL_STR, + + I_OPT_NO_TEXTURES, + I_OPT_DELETED_TEXTURES, + I_OPT_TOTAL_TEXTURES, + I_OPT_TEX_DELETED, + I_OPT_PANELS_OPT, + I_OPT_WALLS, + I_OPT_FORES, + I_OPT_BACKS, + I_OPT_STAIRS, + I_OPT_WATER, + I_OPT_ACID1, + I_OPT_ACID2, + I_OPT_LIFTS, + I_OPT_BLOCKMON, + I_OPT_TOTAL_PANELS, + I_OPT_PANELS_AFTER, + + I_WAD_SPECIAL_MAP, + I_WAD_SPECIAL_TEXS, + + I_FILE_FILTER_ALL, + I_FILE_FILTER_WAD, + + I_EDITOR_TITLE, + + I_LAST ); + +Const + LANGUAGE_RUSSIAN = 'Russian'; + LANGUAGE_ENGLISH = 'English'; + LANGUAGE_RUSSIAN_N = 3; + LANGUAGE_ENGLISH_N = 2; + +Var + _lc: Array [TStrings_Locale] of String; + + BoolNames: Array [False..True] of String; + DirNames: Array [D_LEFT..D_RIGHT] of String; + DirNamesAdv: Array [0..3] of String; + DirButtonNames: Array [1..4] of String; + PANELNAMES: Array[0..13] of String; + EffectNames: Array [EFFECT_NONE..EFFECT_FIRE] of String; + ItemNames: Array [ITEM_MEDKIT_SMALL..ITEM_MAX] of String; + ShotNames: Array [TRIGGER_SHOT_PISTOL..TRIGGER_SHOT_MAX] of String; + MonsterNames: Array [MONSTER_DEMON..MONSTER_MAN] of String; + AreaNames: Array [AREA_PLAYERPOINT1..AREA_BLUETEAMPOINT] of String; + TriggerNames: Array [TRIGGER_EXIT..TRIGGER_MAX] of String; + + +procedure g_Language_Load(fileName: String); +procedure g_Language_Set(lang: String); +procedure g_Language_Dump(fileName: String); + +Implementation + +Uses + SysUtils, e_log, f_main, f_about, f_activationtype, + f_addresource_sky, f_addresource_sound, + f_addresource_texture, f_choosetype, f_keys, f_mapcheck, + f_mapoptions, f_maptest, f_mapoptimization, f_options, + f_packmap, f_savemap, f_saveminimap, f_selectmap, Forms; + +Const + g_lang_default: Array [TStrings_Locale] of Array [1..3] of String = ( + ('NOT ACCESSIBLE', 'N/A', + 'Н/Д'), + + ('ARRAY BOOL FALSE', 'No', + 'Нет'), + ('ARRAY BOOL TRUE', 'Yes', + 'Да'), + + ('ARRAY DIR LEFT', 'Left', + 'Влево'), + ('ARRAY DIR RIGHT', 'Right', + 'Вправо'), + ('ARRAY DIR SAME', 'Don''t change', + 'Не менять'), + ('ARRAY DIR REVERSED', 'Reversed', + 'Обратное'), + + ('ARRAY DIRBTN LEFT', 'Left', + 'Влево'), + ('ARRAY DIRBTN RIGHT', 'Right', + 'Вправо'), + ('ARRAY DIRBTN UP', 'Up', + 'Вверх'), + ('ARRAY DIRBTN DOWN', 'Down', + 'Вниз'), + + ('ARRAY PANEL WALL', 'Wall', + 'Стена'), + ('ARRAY PANEL BACK', 'Background', + 'Фон'), + ('ARRAY PANEL FRONT', 'Foreground', + 'Передний план'), + ('ARRAY PANEL DOOR OPEN', 'Open Door', + 'Открытая дверь'), + ('ARRAY PANEL DOOR CLOSE', 'Closed Door', + 'Закрытая дверь'), + ('ARRAY PANEL STAIR', 'Step', + 'Ступень'), + ('ARRAY PANEL WATER', 'Water', + 'Вода'), + ('ARRAY PANEL ACID 1', 'Acid 1', + 'Кислота 1'), + ('ARRAY PANEL ACID 2', 'Acid 2', + 'Кислота 2'), + ('ARRAY PANEL LIFT UP', 'Stream Up', + 'Лифт вверх'), + ('ARRAY PANEL LIFT DOWN', 'Stream Down', + 'Лифт вниз'), + ('ARRAY PANEL LIFT LEFT', 'Stream Left', + 'Поток влево'), + ('ARRAY PANEL LIFT RIGHT', 'Stream Right', + 'Поток вправо'), + ('ARRAY PANEL BLOCKMON', 'Monster Boundary', + 'Блокиратор монстров'), + + ('ARRAY FX NONE', 'None', + 'Нет'), + ('ARRAY FX TELEPORT', 'Teleport', + 'Телепортация'), + ('ARRAY FX RESPAWN', 'Respawn', + 'Респаун'), + ('ARRAY FX FIRE', 'Arch-Vile Fire', + 'Огонь колдуна'), + + ('ARRAY ITEM MEDKIT', 'Stimpack', + 'Аптечка'), + ('ARRAY ITEM LARGE MEDKIT', 'Medikit', + 'Большая аптечка'), + ('ARRAY ITEM BLACK MEDKIT', 'Berserk Pack', + 'Черная аптечка'), + ('ARRAY ITEM GREEN ARMOR', 'Green Armor', + 'Зелёная броня'), + ('ARRAY ITEM BLUE ARMOR', 'Blue Armor', + 'Синяя броня'), + ('ARRAY ITEM BLUE SPHERE', 'Soulsphere', + 'Шарик 100%'), + ('ARRAY ITEM MEGASPHERE', 'Megasphere', + 'Мегасфера'), + ('ARRAY ITEM HAZ SUIT', 'Envirosuit', + 'Защитный костюм'), + ('ARRAY ITEM OXYGEN', 'Scuba', + 'Акваланг'), + ('ARRAY ITEM INVULNERABILITY', 'Invulnerability', + 'Неуязвимость'), + ('ARRAY ITEM CHAINSAW', 'Chainsaw', + 'Бензопила'), + ('ARRAY ITEM SHOTGUN', 'Shotgun', + 'Ружьё'), + ('ARRAY ITEM DB SHOTGUN', 'Super Shotgun', + 'Двустволка'), + ('ARRAY ITEM CHAINGUN', 'Chaingun', + 'Пулемёт'), + ('ARRAY ITEM ROCKET LAUNCHER', 'Rocket Launcher', + 'Ракетница'), + ('ARRAY ITEM PLASMA RIFLE', 'Plasma Rifle', + 'Плазмаган'), + ('ARRAY ITEM BFG', 'BFG9000', + 'BFG9000'), + ('ARRAY ITEM SUPER MINIGUN', 'Super Chaingun', + 'Суперпулемёт'), + ('ARRAY ITEM CLIP', 'Clip', + 'Патроны'), + ('ARRAY ITEM AMMO BOX', 'Box of Bullets', + 'Ящик патронов'), + ('ARRAY ITEM 4 SHELLS', '4 Shells', + '4 гильзы'), + ('ARRAY ITEM 25 SHELLS', 'Box of Shells', + '25 гильз'), + ('ARRAY ITEM 1 ROCKET', 'Rocket', + '1 ракета'), + ('ARRAY ITEM ROCKET BOX', 'Box of Rockets', + '5 ракет'), + ('ARRAY ITEM CELL', 'Energy Cell', + 'Батарейка'), + ('ARRAY ITEM LARGE CELL', 'Energy Cell Pack', + 'Батарея'), + ('ARRAY ITEM BACKPACK', 'Backpack', + 'Рюкзак'), + ('ARRAY ITEM KEY RED', 'Red Key', + 'Красный ключ'), + ('ARRAY ITEM KEY GREEN', 'Green Key', + 'Зеленый ключ'), + ('ARRAY ITEM KEY BLUE', 'Blue Key', + 'Синий ключ'), + ('ARRAY ITEM BOTTLE', 'Health Globe', + 'Живая вода'), + ('ARRAY ITEM HELMET', 'Armor Shard', + 'Бронешлем'), + ('ARRAY ITEM JETPACK', 'Jetpack', + 'Реактивный ранец'), + ('ARRAY ITEM INVIS', 'Invisibility', + 'Невидимость'), + + ('ARRAY SHOT PISTOL', 'Pistol shot', + 'Выстрел пистолета'), + ('ARRAY SHOT BULLET', 'Chaingun shot', + 'Выстрел пулемета'), + ('ARRAY SHOT SHOTGUN', 'Shotgun shot', + 'Выстрел ружья'), + ('ARRAY SHOT SSG', 'Super Shotgun shot', + 'Выстрел двустволки'), + ('ARRAY SHOT IMP', 'Imp fireball', + 'Шар беса'), + ('ARRAY SHOT PLASMA', 'Blue plasma', + 'Синяя плазма'), + ('ARRAY SHOT SPIDER', 'Arachnotron plasma', + 'Плазма арахнотрона'), + ('ARRAY SHOT CACO', 'Cacodemon fireball', + 'Шар какодемона'), + ('ARRAY SHOT BARON', 'Hell Baron projectile', + 'Выстрел барона ада'), + ('ARRAY SHOT MANCUB', 'Mancubus gunshot', + 'Снаряд манкубуса'), + ('ARRAY SHOT REV', 'Revenant projectile', + 'Снаряд скелета'), + ('ARRAY SHOT ROCKET', 'Rocket', + 'Ракета'), + ('ARRAY SHOT BFG', 'BFG ball', + 'Шар BFG'), + ('ARRAY SHOT EXPL', 'Explosion', + 'Взрыв'), + ('ARRAY SHOT BFGEXPL', 'BFG explosion', + 'Взрыв BFG'), + + ('ARRAY MON DEMON', 'Pinky', + 'Демон'), + ('ARRAY MON IMP', 'Imp', + 'Бес'), + ('ARRAY MON ZOMBIE', 'Zombie', + 'Зомби'), + ('ARRAY MON SERGEANT', 'Sergeant', + 'Сержант'), + ('ARRAY MON CYBER', 'Cyberdemon', + 'Кибердемон'), + ('ARRAY MON CGUN', 'Commando', + 'Пулемётчик'), + ('ARRAY MON HELL BARON', 'Hell Baron', + 'Барон ада'), + ('ARRAY MON HELL KNIGHT', 'Hell Knight', + 'Рыцарь ада'), + ('ARRAY MON CACODEMON', 'Cacodemon', + 'Какодемон'), + ('ARRAY MON LOST SOUL', 'Lost Soul', + 'Огненный череп'), + ('ARRAY MON PAIN ELEMENTAL', 'Pain Elemental', + 'Авиабаза'), + ('ARRAY MON MASTERMIND', 'Spider Mastermind', + 'Большой паук'), + ('ARRAY MON ARACHNATRON', 'Arachnotron', + 'Арахнотрон'), + ('ARRAY MON MANCUBUS', 'Mancubus', + 'Манкубус'), + ('ARRAY MON REVENANT', 'Revenant', + 'Скелет'), + ('ARRAY MON ARCHVILE', 'Arch-Vile', + 'Колдун'), + ('ARRAY MON FISH', 'Piranha', + 'Рыба'), + ('ARRAY MON BARREL', 'Barrel', + 'Бочка'), + ('ARRAY MON ROBOT', 'Robot', + 'Робот'), + ('ARRAY MON PRIKOLIST', 'Prikolist', + 'Приколист'), + + ('ARRAY AREA PLAYER ONE', 'Player 1', + 'Первый игрок'), + ('ARRAY AREA PLAYER TWO', 'Player 2', + 'Второй игрок'), + ('ARRAY AREA DM', 'DM Spawn Point', + 'Точка DM'), + ('ARRAY AREA FLAG RED', 'Red Flag', + 'Красный флаг'), + ('ARRAY AREA FLAG BLUE', 'Blue Flag', + 'Синий флаг'), + ('ARRAY AREA FLAG DOM', 'Domination Flag', + 'DOM флаг'), + ('ARRAY AREA TEAM RED', 'Red Team', + 'Красная команда'), + ('ARRAY AREA TEAM BLUE', 'Blue Team', + 'Синяя команда'), + + ('ARRAY TR EXIT', 'Exit', + 'Выход'), + ('ARRAY TR TELEPORT', 'Teleport', + 'Телепортация'), + ('ARRAY TR DOOR OPEN', 'Open Door', + 'Открыть дверь'), + ('ARRAY TR DOOR CLOSE', 'Close Door', + 'Закрыть дверь'), + ('ARRAY TR DOOR SWITCH', 'Door', + 'Дверь'), + ('ARRAY TR DOOR 5 SEC', 'Door (5 sec)', + 'Дверь (5 секунд)'), + ('ARRAY TR TRAP CLOSE', 'Close Trap', + 'Закрыть ловушку'), + ('ARRAY TR TRAP', 'Trap', + 'Ловушка'), + ('ARRAY TR EXTEND', 'Extender', + 'Расширитель'), + ('ARRAY TR SECRET', 'Secret', + 'Секрет'), + ('ARRAY TR LIFT UP', 'Turn stream up/left', + 'Лифт вверх/поток влево'), + ('ARRAY TR LIFT DOWN', 'Turn stream down/right', + 'Лифт вниз/поток вправо'), + ('ARRAY TR LIFT SWITCH', 'Revert stream', + 'Лифт'), + ('ARRAY TR TEXTURE', 'Change Texture', + 'Смена текстуры'), + ('ARRAY TR ON', 'Enable Trigger', + 'Включить триггер'), + ('ARRAY TR OFF', 'Disable Trigger', + 'Выключить триггер'), + ('ARRAY TR SWITCH', 'Trigger Toggle', + 'Переключить триггер'), + ('ARRAY TR SOUND', 'Play Sound', + 'Звук'), + ('ARRAY TR SPAWN MONSTER', 'Spawn Monster', + 'Создать монстра'), + ('ARRAY TR SPAWN ITEM', 'Spawn Item', + 'Создать предмет'), + ('ARRAY TR MUSIC', 'Play Music', + 'Музыка'), + ('ARRAY TR PUSH', 'Push', + 'Ускорение'), + ('ARRAY TR SCORE', 'Team Score', + 'Начисление очков'), + ('ARRAY TR MESSAGE', 'Message', + 'Сообщение'), + ('ARRAY TR DAMAGE', 'Damage', + 'Урон'), + ('ARRAY TR HEALTH', 'Healer', + 'Оздоровитель'), + ('ARRAY TR SHOT', 'Turret', + 'Турель'), + ('ARRAY TR EFFECT', 'Effect', + 'Эффект'), + + ('PROP ID', 'ID', + 'ID'), + ('PROP X', 'X', + 'X'), + ('PROP Y', 'Y', + 'Y'), + ('PROP WIDTH', 'Width', + 'Ширина'), + ('PROP HEIGHT', 'Height', + 'Высота'), + ('PROP PANEL TYPE', 'Panel Type', + 'Тип панели'), + ('PROP PANEL TEX', 'Texture', + 'Текстура'), + ('PROP PANEL ALPHA', 'Transparency', + 'Прозрачность'), + ('PROP PANEL BLEND', 'Blending', + 'Смешивание'), + ('PROP DM ONLY', 'DM Only', + 'Только в DM'), + ('PROP ITEM FALLS', 'Falls', + 'Падает'), + ('PROP DIRECTION', 'Direction', + 'Направление'), + + ('PROP TR TYPE', 'Trigger Type', + 'Тип триггера'), + ('PROP TR ENABLED', 'Enabled', + 'Включен'), + ('PROP TR TEXTURE PANEL', 'Textured Panel', + 'Панель с текстурой'), + ('PROP TR ACTIVATION', 'Activation Type', + 'Тип активации'), + ('PROP TR KEYS', 'Keys', + 'Ключи'), + ('PROP TR D2D', 'D2D-like', + 'Как в D2D'), + ('PROP TR SILENT', 'Silent', + 'Без звука'), + ('PROP TR COUNT', 'Count', + 'Количество'), + ('PROP TR INTERVAL', 'Interval (in ticks)', + 'Интервал (в тиках)'), + ('PROP TR HEALTH', 'Health', + 'Здоровье'), + ('PROP TR NEXT MAP', 'Next Map', + 'След. карта'), + ('PROP TR TELEPORT TO', 'Teleport to', + 'Точка телепорта'), + ('PROP TR TELEPORT SILENT', 'Silent', + 'Тихий телепорт'), + ('PROP TR TELEPORT DIR', 'New Direction', + 'Направление после'), + ('PROP TR DOOR PANEL', 'Door Panel', + 'Панель двери'), + ('PROP TR TRAP PANEL', 'Trap Panel', + 'Панель ловушки'), + ('PROP TR EX AREA', 'Action Area', + 'Область воздействия'), + ('PROP TR EX DELAY', 'Delay', + 'Задержка'), + ('PROP TR EX COUNT', 'Count', + 'Счётчик'), + ('PROP TR EX MONSTER', 'Monster ID', + 'ID монстра'), + ('PROP TR EX RANDOM', 'Random', + 'Случайный'), + ('PROP TR LIFT PANEL', 'Stream Panel', + 'Панель лифта'), + ('PROP TR TEXTURE ONCE', 'Once', + 'Один раз'), + ('PROP TR TEXTURE ANIM ONCE', 'Animate Once', + 'Аним. один раз'), + ('PROP TR SOUND NAME', 'Sound (snd)', + 'Звук (snd)'), + ('PROP TR SOUND VOLUME', 'Volume', + 'Громкость'), + ('PROP TR SOUND PAN', 'Pan', + 'Стерео'), + ('PROP TR SOUND COUNT', 'Loops', + 'Играть раз'), + ('PROP TR SOUND LOCAL', 'Local', + 'Локальный'), + ('PROP TR SOUND SWITCH', 'Switch', + 'Переключение'), + ('PROP TR FX TYPE', 'Effect', + 'Эффект'), + ('PROP TR SPAWN TO', 'Spawn at', + 'Точка появления'), + ('PROP TR SPAWN MAX', 'Maximum', + 'Максимум'), + ('PROP TR SPAWN DELAY', 'Autospawn (in ticks)', + 'Автоспаун (в тиках)'), + ('PROP TR MONSTER TYPE', 'Monster', + 'Тип монстра'), + ('PROP TR MONSTER ACTIVE', 'Active', + 'Активен'), + ('PROP TR MONSTER BEHAVIOUR', 'Behaviour', + 'Поведение'), + ('PROP TR MONSTER BEHAVIOUR 0', 'Normal', + 'Обычное'), + ('PROP TR MONSTER BEHAVIOUR 1', 'Killer', + 'Убийца'), + ('PROP TR MONSTER BEHAVIOUR 2', 'Maniac', + 'Маньяк'), + ('PROP TR MONSTER BEHAVIOUR 3', 'Insane', + 'Поехавший'), + ('PROP TR MONSTER BEHAVIOUR 4', 'Cannibal', + 'Каннибал'), + ('PROP TR MONSTER BEHAVIOUR 5', 'Good', + 'Добрый'), + ('PROP TR ITEM TYPE', 'Item', + 'Тип предмета'), + ('PROP TR MUSIC NAME', 'Music', + 'Музыка'), + ('PROP TR MUSIC ACT', 'Action (m)', + 'Действие (m)'), + ('PROP TR MUSIC ON', 'Play', + 'Включить'), + ('PROP TR MUSIC OFF', 'Pause', + 'Выключить'), + ('PROP TR PUSH ANGLE', 'Angle', + 'Угол'), + ('PROP TR PUSH FORCE', 'Force', + 'Сила'), + ('PROP TR PUSH RESET', 'Reset velocity', + 'Сбрасывать скорость'), + ('PROP TR SCORE ACT', 'Action (s)', + 'Действие (s)'), + ('PROP TR SCORE ACT 0', 'Add points', + 'Прибавить очки'), + ('PROP TR SCORE ACT 1', 'Subtract points', + 'Отнять очки'), + ('PROP TR SCORE ACT 2', 'Team Wins', + 'Выигрыш'), + ('PROP TR SCORE ACT 3', 'Team Loses', + 'Проигрыш'), + ('PROP TR SCORE TEAM', 'Team', + 'Команда'), + ('PROP TR SCORE TEAM 0', 'My', + 'Своя'), + ('PROP TR SCORE TEAM 1', 'Enemy', + 'Соперника'), + ('PROP TR SCORE TEAM 2', 'Red', + 'Красная'), + ('PROP TR SCORE TEAM 3', 'Blue', + 'Синяя'), + ('PROP TR SCORE CON', 'Console message', + 'Сообщение в консоль'), + ('PROP TR SCORE MSG', 'Game message', + 'Сообщение в игру'), + ('PROP TR DAMAGE VALUE', 'Damage', + 'Ущерб'), + ('PROP TR HEALTH MAX', 'To maximum', + 'До максимума'), + ('PROP TR SHOT TYPE', 'Projectile', + 'Снаряд'), + ('PROP TR SHOT SOUND', 'Shot sound', + 'Звук выстрела'), + ('PROP TR SHOT ANGLE', 'Angle', + 'Угол'), + ('PROP TR SHOT ACC', 'Spread', + 'Разброс'), + ('PROP TR SHOT TO', 'Auto targeting', + 'Автонаведение'), + ('PROP TR SHOT TO 0', 'None', + 'Нет'), + ('PROP TR SHOT TO 1', 'Monsters', + 'Монстры'), + ('PROP TR SHOT TO 2', 'Players', + 'Игроки'), + ('PROP TR SHOT TO 3', 'Red team', + 'Красная команда'), + ('PROP TR SHOT TO 4', 'Blue team', + 'Синяя команда'), + ('PROP TR SHOT TO 5', 'Monsters, players', + 'Монстры, игроки'), + ('PROP TR SHOT TO 6', 'Players, monsters', + 'Игроки, монстры'), + ('PROP TR SHOT ALLMAP', 'On entire map', + 'По всей карте'), + ('PROP TR SHOT AMMO', 'Ammo limit', + 'Кол-во патронов'), + ('PROP TR SHOT RELOAD', 'Reload interval (in ticks)', + 'Перезарядка (в тиках)'), + ('PROP TR SHOT SIGHT', 'Sight interval (in ticks)', + 'Реакция (в тиках)'), + ('PROP TR SHOT PANEL', 'Indicator panel', + 'Панель индикации'), + ('PROP TR MESSAGE KIND', 'Message kind', + 'Тип сообщения'), + ('PROP TR MESSAGE KIND 0', 'Console message', + 'Текст в консоли'), + ('PROP TR MESSAGE KIND 1', 'Event message', + 'Крупный текст по центру'), + ('PROP TR MESSAGE TO', 'Send to', + 'Получатель'), + ('PROP TR MESSAGE TO 0', 'Me', + 'Я'), + ('PROP TR MESSAGE TO 1', 'My team', + 'Моя команда'), + ('PROP TR MESSAGE TO 2', 'Enemy team', + 'Вражеская команда'), + ('PROP TR MESSAGE TO 3', 'Red team', + 'Красная команда'), + ('PROP TR MESSAGE TO 4', 'Blue team', + 'Синяя команда'), + ('PROP TR MESSAGE TO 5', 'Everyone', + 'Все игроки'), + ('PROP TR MESSAGE TEXT', 'Message text', + 'Текст сообщения'), + ('PROP TR MESSAGE TIME', 'Time (in ticks)', + 'Время показа (в тиках)'), + ('PROP TR EFFECT TYPE', 'Effect type', + 'Тип эффекта'), + ('PROP TR EFFECT SUBTYPE', 'Effect subtype', + 'Подтип эффекта'), + ('PROP TR EFFECT COLOR', 'Effect color', + 'Цвет эффекта'), + ('PROP TR EFFECT CENTER', 'Trigger center', + 'По центру'), + ('PROP TR EFFECT VELX', 'Horizontal speed', + 'Скорость по горизонтали'), + ('PROP TR EFFECT VELY', 'Vertical speed', + 'Скорость по вертикали'), + ('PROP TR EFFECT SPL', 'Speed variance left', + 'Отклонение влево'), + ('PROP TR EFFECT SPR', 'Speed variance right', + 'Отклонение вправо'), + ('PROP TR EFFECT SPU', 'Speed variance up', + 'Отклонение вверх'), + ('PROP TR EFFECT SPD', 'Speed variance down', + 'Отклонение вниз'), + ('PROP TR EFFECT PARTICLE', 'Particle generator', + 'Генератор частиц'), + ('PROP TR EFFECT ANIMATION', 'Animation', + 'Анимация'), + ('PROP TR EFFECT SLIQUID', 'Water splash', + 'Брызги воды'), + ('PROP TR EFFECT LLIQUID', 'Light colored splash', + 'Цветные брызги (светлее)'), + ('PROP TR EFFECT DLIQUID', 'Dark colored splash', + 'Цветные брызги (темнее)'), + ('PROP TR EFFECT BLOOD', 'Blood', + 'Кровь'), + ('PROP TR EFFECT SPARK', 'Sparks', + 'Искры'), + ('PROP TR EFFECT BUBBLE', 'Bubbles', + 'Пузырьки'), + + ('MSG ERROR', 'Error', + 'Ошибка'), + ('MSG WRONG TEXWIDTH', 'Panel Width must be a multiple of Texture Width (%d)', + 'Ширина панели должна быть кратна ширине текстуры (%d)'), + ('MSG WRONG TEXHEIGHT', 'Panel Height must be a multiple of Texture Height (%d)', + 'Высота панели должна быть кратна высоте текстуры (%d)'), + ('MSG WRONG ALPHA', 'Transparency must be in [0..255] interval', + 'Прозрачность должна быть в интервале [0..255]'), + ('MSG WRONG SIZE', 'Width and Height must be greater than 0', + 'Ширина и высота должны быть больше 0'), + ('MSG WRONG XY', 'X or Y coordinate hasn''t been set', + 'Не задана X или Y координата'), + ('MSG TEXTURE ALREADY', 'Texture "%s" already exists', + 'Текстура "%s" уже добавлена'), + ('MSG RES NAME 64', 'Resource "%s" name must not be longer than 64 chars', + 'Имя ресурса "%s" должно быть не длиннее 64 символов'), + ('MSG CHOOSE ITEM', 'Select Item', + 'Выберите предмет'), + ('MSG CHOOSE MONSTER', 'Select Monster', + 'Выберите монстра'), + ('MSG CHOOSE AREA', 'Select Area', + 'Выберите область'), + ('MSG CHOOSE TEXTURE', 'Select Texture', + 'Выберите текстуру'), + ('MSG CHOOSE RES', 'Resource hasn''t been selected', + 'Не выбран ресурс'), + ('MSG EXIT', 'Exit', + 'Выход'), + ('MSG EXIT PROMT', 'Leaving so soon?', + 'Уже уходите?'), + ('MSG DEL TEXTURE', 'Delete the texture', + 'Удалить текстуру'), + ('MSG DEL TEXTURE PROMT', 'Delete the texture "%s" ?', + 'Удалить текстуру "%s" ?'), + ('MSG DEL TEXTURE CANT', 'Can''t delete texture in use. Replace it on all panels with this texture.', + 'Нельзя удалить используемую текстуру. Замените её на каждой панели с ней.'), + ('MSG CLEAR MAP', 'New map', + 'Новая карта'), + ('MSG CLEAR MAP PROMT', 'Clear the entire map?', + 'Очистить всю карту?'), + ('MSG DELETE MAP', 'Delete the map', + 'Удалить карту'), + ('MSG DELETE MAP PROMT', 'Delete the map "%s" from "%s" ?', + 'Удалить карту "%s" из "%s" ?'), + ('MSG MAP DELETED', 'Map is deleted', + 'Карта удалена'), + ('MSG MAP DELETED PROMT', 'Map "%s" is deleted', + 'Карта "%s" удалена'), + ('MSG EXEC ERROR', 'Game execution error', + 'Ошибка запуска игры'), + ('MSG SOUND ERROR', 'Can''t play sound', + 'Не удалось проиграть звук'), + ('MSG WAD ERROR', 'Can''t open WAD: %s', + 'Ошибка при открытии WAD: %s'), + ('MSG RES ERROR', 'Can''t read resource: %s:%s\%s', + 'Ошибка при чтении ресурса: %s:%s\%s'), + ('MSG PACKED', 'Map "%s" with resources saved to "%s"', + 'Карта "%s" вместе с ресурсами сохранена в "%s"'), + ('MSG MAP EXISTS', 'Map "%s" already exists. Overwrite?', + 'Карта "%s" уже существует. Заменить?'), + ('MSG SAVE MAP', 'Save the map', + 'Сохранить карту'), + + ('HINT TELEPORT', 'Choose destination of Teleport', + 'Выберите точку телепорта'), + ('HINT SPAWN', 'Choose Spawn point', + 'Выберите точку появления'), + ('HINT PANEL DOOR', 'Choose Door', + 'Выберите панель двери'), + ('HINT PANEL TEXTURE', 'Choose textured Panel', + 'Выберите панель с текстурой'), + ('HINT PANEL SHOT', 'Choose textured shot indicator Panel', + 'Выберите панель индикации выстрела с текстурой'), + ('HINT PANEL LIFT', 'Choose Stream Panel', + 'Выберите панель лифта'), + ('HINT MONSTER', 'Choose Monster', + 'Выберите монстра'), + ('HINT EXT AREA', 'Specify action Area', + 'Укажите область воздействия'), + ('HINT WIDTH', 'Width: %d', + 'Ширина: %d'), + ('HINT HEIGHT', 'Height: %d', + 'Высота: %d'), + + ('MENU FILE', 'File', + 'Файл'), + ('MENU FILE NEW', 'New Map', + 'Новая карта'), + ('MENU FILE OPEN', 'Open Map', + 'Открыть карту'), + ('MENU FILE SAVE', 'Save Map', + 'Сохранить карту'), + ('MENU FILE SAVE AS', 'Save Map As...', + 'Сохранить карту как...'), + ('MENU FILE OPEN WAD', 'Select Map', + 'Выбрать карту'), + ('MENU FILE SAVE MINI', 'Save Mini-map', + 'Сохранить мини-карту'), + ('MENU FILE DELETE', 'Delete Map from WAD...', + 'Удалить карту из WAD...'), + ('MENU FILE PACK MAP', 'Pack Map', + 'Упаковать карту'), + ('MENU FILE EXIT', 'Exit', + 'Выход'), + + ('MENU EDIT', 'Edit', + 'Правка'), + ('MENU EDIT UNDO', 'Undo', + 'Отменить'), + ('MENU EDIT COPY', 'Copy', + 'Копировать'), + ('MENU EDIT CUT', 'Cut', + 'Вырезать'), + ('MENU EDIT PASTE', 'Paste', + 'Вставить'), + ('MENU EDIT SELECT ALL', 'Select All', + 'Выделить всё'), + ('MENU EDIT TO FORE', 'Bring to Front', + 'Передвинуть вперед'), + ('MENU EDIT TO BACK', 'Send to Back', + 'Передвинуть назад'), + + ('MENU TOOLS', 'Tools', + 'Инструменты'), + ('MENU TOOLS SNAP GRID', 'Snap to Grid', + 'Привязка к сетке'), + ('MENU TOOLS MINIMAP', 'Show Mini-map', + 'Мини-карта'), + ('MENU TOOLS STEP GRID', 'Switch Grid step', + 'Сменить шаг сетки'), + ('MENU TOOLS SHOW EDGES', 'Switch Map edges', + 'Границы карты'), + ('MENU TOOLS LAYERS', 'Layers', + 'Слои'), + + ('MENU SERV', 'Service', + 'Сервис'), + ('MENU SERV TEST', 'Check the Map', + 'Проверка карты'), + ('MENU SERV OPT', 'Optimize the Map', + 'Оптимизация карты'), + ('MENU SERV PREVIEW', 'Map Preview', + 'Предварительный просмотр'), + ('MENU SERV LAUNCH', 'In-game test', + 'Тест карты в игре'), + + ('MENU SETS', 'Settings', + 'Настройка'), + ('MENU SETS MAP', 'Map parameters', + 'Параметры карты'), + ('MENU SETS EDITOR', 'Editor settings', + 'Настройки редактора'), + ('MENU SETS LAUNCH', 'In-game test settings', + 'Настройки теста в игре'), + + ('MENU HELP', 'Help', + 'Справка'), + ('MENU HELP ABOUT', 'About', + 'О программе'), + + ('MENU LAYER BACK', '1. Background', + '1. Фон'), + ('MENU LAYER WALL', '2. Walls', + '2. Стены'), + ('MENU LAYER FORE', '3. Foreground', + '3. Передний план'), + ('MENU LAYER STAIR', '4. Steps', + '4. Ступени'), + ('MENU LAYER WATER', '5. Liquids', + '5. Жидкости'), + ('MENU LAYER ITEM', '6. Items', + '6. Предметы'), + ('MENU LAYER MONSTER', '7. Monsters', + '7. Монстры'), + ('MENU LAYER AREA', '8. Areas', + '8. Области'), + ('MENU LAYER TRIGGER', '9. Triggers', + '9. Триггеры'), + + ('MENU TB NEW', 'New Map', + 'Новая карта'), + ('MENU TB OPEN', 'Open Map', + 'Открыть карту'), + ('MENU TB SAVE', 'Save Map', + 'Сохранить карту'), + ('MENU TB OPEN WAD', 'Open another Map from same WAD', + 'Открыть другую карту из этого же WAD''а'), + ('MENU TB MINIMAP', 'Show Mini-map', + 'Показать мини-карту'), + ('MENU TB LAYERS', 'Show/Hide Objects', + 'Отрисовка панелей/объектов'), + ('MENU TB GRID', 'Grid On/Off', + 'Включить/Отключить отображение сетки'), + ('MENU TB GRID STEP', 'Switch Grid step', + 'Изменить шаг сетки'), + ('MENU TB LAUNCH', 'In-game test', + 'Тест карты в игре'), + + ('MENU LAUNCH SETS', 'Settings...', + 'Параметры...'), + + ('CAP FX TYPE', 'Select Effect type', + 'Выберите тип эффекта'), + ('CAP MONSTER TYPE', 'Select Monster type', + 'Выберите тип монстра'), + ('CAP ITEM TYPE', 'Select Item type', + 'Выберите тип предмета'), + ('CAP ABOUT', 'About Map Editor', + 'О программе'), + ('CAP ACT', 'Activation type', + 'Тип активации'), + ('CAP ADD SKY', 'Select Sky Texture', + 'Выберите текстуру неба'), + ('CAP ADD SOUND', 'Select Sound/Music', + 'Выберите звук/музыку'), + ('CAP ADD TEXTURE', 'Select Texture', + 'Выберите текстуру'), + ('CAP KEYS', 'Keys', + 'Ключи'), + ('CAP TEST', 'Map Checking', + 'Проверка карты'), + ('CAP OPT', 'Map Optimization', + 'Оптимизация карты'), + ('CAP SETS', 'Map Parameters', + 'Параметры карты'), + ('CAP LAUNCH', 'In-game test Settings', + 'Настройки теста в игре'), + ('CAP ES', 'Editor Settings', + 'Настройки редактора'), + ('CAP PACK', 'Pack Map', + 'Упаковать карту'), + ('CAP SAVE', 'Save Map', + 'Сохранить карту'), + ('CAP MINI', 'Save Mini-map', + 'Сохранить мини-карту'), + ('CAP SELECT', 'Select Map', + 'Выберите карту'), + + ('CTRL PROP KEY', 'Property', + 'Свойство'), + ('CTRL PROP VALUE', 'Value', + 'Значение'), + + ('CTRL PANELS', 'Panels', + 'Панели'), + ('CTRL ITEMS', 'Items', + 'Предметы'), + ('CTRL MONSTERS', 'Monsters', + 'Монстры'), + ('CTRL AREAS', 'Areas', + 'Области'), + ('CTRL TRIGGERS', 'Triggers', + 'Триггеры'), + + ('CTRL LIST TEXTURE', 'Texture List', + 'Список текстур'), + ('CTRL LIST ITEM', 'Item List', + 'Список предметов'), + ('CTRL LIST MONSTER', 'Monster List', + 'Список монстров'), + ('CTRL LIST AREA', 'Area List', + 'Список областей'), + ('CTRL LIST TRIGGER', 'Trigger List', + 'Список триггеров'), + ('CTRL LIST ACTIVE', 'Activation Type', + 'Тип активации триггера'), + ('CTRL LIST KEYS', 'Keys Needed', + 'Ключи для активации'), + + ('CTRL PREVIEW', 'Texture Preview', + 'Предварительный просмотр'), + ('CTRL ITEM DM', 'DM Only', + 'Только в DM'), + ('CTRL ITEM FALLS', 'Falls', + 'Падает'), + ('CTRL LEFT', 'Left', + 'Влево'), + ('CTRL RIGHT', 'Right', + 'Вправо'), + + ('CTRL ACT PLAYER CLOSE', 'Player Collides', + 'Игрок близко'), + ('CTRL ACT MONSTER CLOSE', 'Monster Collides', + 'Монстр близко'), + ('CTRL ACT PLAYER PRESS', 'Player Pressed', + 'Игрок нажал'), + ('CTRL ACT MONSTER PRESS', 'Monster Pressed', + 'Монстр нажал'), + ('CTRL ACT SHOT', 'Shot', + 'Выстрел'), + ('CTRL ACT NO MONSTER', 'No Monsters', + 'Монстров нет'), + + ('CTRL KEYS RED', 'Red Key', + 'Красный ключ'), + ('CTRL KEYS GREEN', 'Green Key', + 'Зеленый ключ'), + ('CTRL KEYS BLUE', 'Blue Key', + 'Синий ключ'), + ('CTRL KEYS TEAM RED', 'Red Team', + 'Красная команда'), + ('CTRL KEYS TEAM BLUE', 'Blue Team', + 'Синяя команда'), + + ('CTRL OPT GB', 'Optimization', + 'Оптимизация'), + ('CTRL OPT TEXTURE', 'Texture Optimization', + 'Оптимизация текстур'), + ('CTRL OPT PANEL', 'Panel Optimization', + 'Оптимизация панелей'), + ('CTRL OPT WALL', 'Walls', + 'Стены'), + ('CTRL OPT FORE', 'Foreground', + 'Передний план'), + ('CTRL OPT BACK', 'Background', + 'Фон'), + ('CTRL OPT STAIR', 'Steps', + 'Ступени'), + ('CTRL OPT WATER', 'Water', + 'Вода'), + ('CTRL OPT ACID1', 'Acid 1', + 'Кислота 1'), + ('CTRL OPT ACID2', 'Acid 2', + 'Кислота 2'), + ('CTRL OPT LIFT', 'Streams', + 'Лифты'), + ('CTRL OPT BLOCKMON', 'Monster Boundary', + 'Блокиратор монстров'), + ('CTRL OPT DESC TEXTURE', 'Deletes unused textures from texture list.', + 'Удаляет неиспользуемые текстуры из списка.'), + ('CTRL OPT DESC PANEL', 'Merges nearby panels of same type. Increases game performance.', + 'Объединяет одинаковые панели, расположенные вплотную друг к другу, увеличивая тем самым производительность игры.'), + ('CTRL SETS STATS', 'Statistics:', + 'Статистика:'), + ('CTRL SETS SIZES', 'Map Size:', + 'Размеры:'), + + ('CTRL LAUNCH DM', 'Deathmatch', + 'Deathmatch'), + ('CTRL LAUNCH TDM', 'Team Deathmatch', + 'Team Deathmatch'), + ('CTRL LAUNCH CTF', 'Capture the Flag', + 'Capture the Flag'), + ('CTRL LAUNCH COOP', 'Cooperative', + 'Cooperative'), + ('CTRL LAUNCH 2P', 'Two Players', + 'Два игрока'), + ('CTRL LAUNCH FF', 'Friendly Fire', + 'Урон своих'), + ('CTRL LAUNCH EXIT', 'Enable Exit', + 'Включить выход'), + ('CTRL LAUNCH WEAPONS', 'Weapons Stay', + 'Оружие остаётся'), + ('CTRL LAUNCH MONSTERS', 'Enable Monsters', + 'Монстры в DM'), + ('CTRL LAUNCH CLOSE', 'Close the game after exiting the map', + 'Закрыть игру после выхода из карты'), + ('CTRL LAUNCH OPEN', 'Select Doom 2D: Forever .exe', + 'Выберите файл игры Doom 2D: Forever'), + + ('CTRL ES GRID', 'Show Grid', + 'Показывать сетку'), + ('CTRL ES TEXTURE', 'Show Panel Texture', + 'Показывать текстуру панели'), + ('CTRL ES PANEL SIZE', 'Show Panel Size', + 'Показывать размеры панели '), + + ('CTRL PACK TEXTURES', 'Textures', + 'Текстуры'), + ('CTRL PACK SKY', 'Sky', + 'Небо'), + ('CTRL PACK MUSIC', 'Music', + 'Музыку'), + ('CTRL PACK ADD', 'Don''t overwrite WAD', + 'Не перезаписывать WAD'), + ('CTRL PACK NON STD', 'Non-standard Resources only', + 'Только нестандартные ресурсы'), + + ('LAB TEX WIDTH', 'Texture Width:', + 'Ширина текстуры:'), + ('LAB TEX HEIGHT', 'Texture Height:', + 'Высота текстуры:'), + + ('LAB SPECTRUM', 'Show the Spectrum', + 'Показать спектр'), + + ('LAB ABOUT VER', 'Version 2.1.5', + 'Версия 2.1.5'), + ('LAB ABOUT AUTHOR', 'Author: rs.falcon', + 'Автор: rs.falcon'), + ('LAB ABOUT AUTHOR 2', 'Additions: Pss', + 'Дорабатывал: Pss'), + ('LAB ABOUT MAIL', 'rmw.falcon@mail.ru', + 'rmw.falcon@mail.ru'), + ('LAB ABOUT MAIL 2', 'pssxx@mail.ru', + 'pssxx@mail.ru'), + ('LAB ABOUT SITE', 'Doom 2D: Forever Web-site', + 'Сайт Doom 2D: Forever'), + ('LAB ABOUT HTTP', 'www.doom2d.org', + 'www.doom2d.org'), + + ('LAB ADD WADS', 'WAD Files:', + 'Список WAD-файлов:'), + ('LAB ADD SECTIONS', 'WAD Sections:', + 'Список секций WAD-файла:'), + + ('LAB SETS NAME', 'Map Name:', + 'Название карты:'), + ('LAB SETS DESC', 'Map Description', + 'Описание карты:'), + ('LAB SETS AUTHOR', 'Author:', + 'Автор:'), + ('LAB SETS BACK', 'Background/Sky:', + 'Фон/Небо:'), + ('LAB SETS MUSIC', 'Music:', + 'Музыка:'), + ('LAB SETS TEXTURES', 'Textures:', + 'Текстур:'), + ('LAB SETS PANELS', 'Panels:', + 'Панелей:'), + ('LAB SETS ITEMS', 'Items:', + 'Предметов:'), + ('LAB SETS MONSTERS', 'Monsters:', + 'Монстров:'), + ('LAB SETS AREAS', 'Areas:', + 'Областей:'), + ('LAB SETS TRIGGERS', 'Triggers:', + 'Триггеров:'), + ('LAB SETS SIZES', 'Current:', + 'Текущий:'), + ('LAB SETS WIDTH', 'Width:', + 'Ширина:'), + ('LAB SETS HEIGHT', 'Height:', + 'Высота:'), + ('LAB SETS MAPMOVE', 'Direction of shifting map objects:', + 'Направление смещения объектов карты:'), + ('LAB SETS SNAPPING', 'Preserve snapping', + 'Сохранять привязку'), + + ('LAB LAUNCH TIME', 'Time Limit:', + 'Лимит времени:'), + ('LAB LAUNCH SECS', 'seconds', + 'секунд'), + ('LAB LAUNCH SCORE', 'Score Limit:', + 'Лимит очков:'), + ('LAB LAUNCH PATH', 'Path to Doom2DF.exe:', + 'Путь к Doom2DF.exe:'), + + ('LAB ES GRID', 'Grid Step:', + 'Шаг сетки:'), + ('LAB ES GRID COLOR', 'Grid Color:', + 'Цвет сетки:'), + ('LAB ES BACK', 'Background Color:', + 'Цвет фона:'), + ('LAB ES PREVIEW', 'Texture Preview Background Color:', + 'Цвет фона поля предпросмотра текстуры:'), + ('LAB ES MINIMAP', 'Mini-map Scale:', + 'Масштаб мини-карты:'), + ('LAB ES RECENT', 'Recent Maps List Contains:', + 'Запоминать последних открытых карт:'), + ('LAB ES LANGUAGE', 'Language:', + 'Язык:'), + + ('LAB PACK SAVE TO', 'Save to:', + 'Сохранить в:'), + ('LAB PACK MAP NAME', 'Map Resource Name:', + 'Название ресурса карты:'), + ('LAB PACK TEXTURES', 'Texture Section:', + 'Секция для текстур:'), + ('LAB PACK SKY', 'Sky Section:', + 'Секция для неба:'), + ('LAB PACK MUSIC', 'Music Section:', + 'Секция для музыки:'), + + ('LAB MINI SCALE', 'Scale:', + 'Масштаб:'), + + ('BTN APPLY PROPS', 'Apply Properties', + 'Применить свойства'), + ('BTN OK', 'OK', + 'OK'), + ('BTN CANCEL', 'Cancel', + 'Отмена'), + ('BTN ADD', 'Add', + 'Добавить'), + ('BTN CLOSE', 'Close', + 'Закрыть'), + ('BTN ADD CLOSE', 'Add and Close', + 'Добавить и закрыть'), + ('BTN TEST AGAIN', 'Check', + 'Проверить'), + ('BTN START', 'Run', + 'Начать'), + ('BTN PACK', 'Pack', + 'Упаковать'), + ('BTN SAVE', 'Save', + 'Сохранить'), + ('BTN NO SOUND', 'No sound', + 'Нет звука'), + ('BTN TEXTURE ADD', 'Add texture to the list', + 'Добавить текстуру в список'), + ('BTN TEXTURE DELETE', 'Delete texture from the list', + 'Удалить текстуру из списка'), + ('BTN TEXTURE EMPTY', 'Deselect texture', + 'Снять выбор с текстуры'), + + ('LOAD WAD', 'Reading WAD', + 'Чтение WAD'), + ('LOAD MAP', 'Loading Map', + 'Чтение карты'), + ('LOAD TEXTURES', 'Reading Textures', + 'Чтение текстур'), + ('LOAD PANELS', 'Reading Panels', + 'Чтение панелей'), + ('LOAD ITEMS', 'Reading Items', + 'Чтение предметов'), + ('LOAD MONSTERS', 'Reading Monsters', + 'Чтение монстров'), + ('LOAD AREAS', 'Reading Areas', + 'Чтение областей'), + ('LOAD TRIGGERS', 'Reading Triggers', + 'Чтение триггеров'), + + ('TEST AREA WALL', 'Player collides with the wall and will be stuck.', + 'Если в этой области появится игрок, то он застрянет в стене и не сможет двигаться.'), + ('TEST AREA WALL STR', 'Area #%d collides with Map (%d:%d)', + 'Область #%d пересекается с картой (%d:%d)'), + ('TEST SPAWNS 1', 'There are several spawn points for First Player on the map', + 'Несколько точек появления первого игрока'), + ('TEST SPAWNS 2', 'There are several spawn points for Second Player on the map', + 'Несколько точек появления второго игрока'), + ('TEST SPAWNS', 'There are several spawn points on the map. Random one will be used.', + 'Несколько точек появления игрока, будет использована случайная.'), + ('TEST NO DM', 'There are no DM spawn points on the map', + 'На карте нет точек DM'), + ('TEST NO DM EX', 'There are no DM spawn points on the map. Only "Single Player" mode available.', + 'На карте нет точек DM, поиграть получится только в режиме "Single Player".'), + ('TEST MONSTER WALL', 'Monster collides with the wall and will be stuck.', + 'Монстр пересекается с картой. Он застрянет в стене и не сможет двигаться'), + ('TEST MONSTER WALL STR', 'Monster #%d collides with a map (%d:%d)', + 'Монстр #%d пересекается с картой (%d:%d)'), + + ('OPT NO TEXTURES', 'Texture list is empty', + 'Список текстур пуст'), + ('OPT DELETED TEXTURES', 'Deleted Textures:', + 'Удалённые текстуры:'), + ('OPT TOTAL TEXTURES', 'Textures Total:', + 'Всего текстур:'), + ('OPT TEX DELETED', 'Textures Deleted:', + 'Удалено текстур:'), + ('OPT PANELS OPT', 'Panels Optimized:', + 'Оптимизировано панелей:'), + ('OPT WALLS', 'Walls Optimization...', + 'Оптимизация стен...'), + ('OPT FORES', 'Foreground Optimization...', + 'Оптимизация переднего плана...'), + ('OPT BACKS', 'Background Optimization...', + 'Оптимизация фона...'), + ('OPT STAIRS', 'Steps Optimization...', + 'Оптимизация ступеней...'), + ('OPT WATER', 'Water Optimization...', + 'Оптимизация воды...'), + ('OPT ACID1', 'Acid 1 Optimization...', + 'Оптимизация кислоты 1...'), + ('OPT ACID2', 'Acid 2 Optimization...', + 'Оптимизация кислоты 2...'), + ('OPT LIFTS', 'Streams Optimization...', + 'Оптимизация лифтов...'), + ('OPT BLOCKMON', 'Monster Boundaries Optimization...', + 'Оптимизация блокираторов монстров....'), + ('OPT TOTAL PANELS', 'Panels Total:', + 'Всего панелей:'), + ('OPT PANELS AFTER', 'Panels after Optimization:', + 'Панелей после оптимизации:'), + + ('WAD SPECIAL MAP', '<MAP WAD-FILE>', + '<WAD-ФАЙЛ КАРТЫ>'), + ('WAD SPECIAL TEXS', '<EXTRA TEXTURES>', + '<СПЕЦТЕКСТУРЫ>'), + + ('FILE FILTER ALL', 'Doom 2D: Forever Maps (*.wad)|*.wad|Old Doom 2D: Forever 0.30 Maps (*.ini)|*.ini|All Files (*.*)|*.*', + 'Карты Doom 2D: Forever (*.wad)|*.wad|Старые карты Doom 2D: Forever 0.30 (*.ini)|*.ini|Все файлы (*.*)|*.*'), + ('FILE FILTER WAD', 'Doom 2D: Forever Maps (*.wad)|*.wad|All Files (*.*)|*.*', + 'Карты Doom 2D: Forever (*.wad)|*.wad|Все файлы (*.*)|*.*'), + + ('EDITOR TITLE', 'Doom 2D: Forever Map Editor', + 'Редактор карт Doom 2D: Forever'), + + + ('', '', '') ); + + +procedure SetupArrays(); +var + i: Integer; + +begin +// Да/Нет: + BoolNames[False] := _lc[I_ARRAY_BOOL_FALSE]; + BoolNames[True] := _lc[I_ARRAY_BOOL_TRUE]; + +// Направления: + DirNames[D_LEFT] := _lc[I_ARRAY_DIR_LEFT]; + DirNames[D_RIGHT] := _lc[I_ARRAY_DIR_RIGHT]; + +// Смены направления: + DirNamesAdv[0] := _lc[I_ARRAY_DIR_SAME]; + DirNamesAdv[1] := _lc[I_ARRAY_DIR_LEFT]; + DirNamesAdv[2] := _lc[I_ARRAY_DIR_RIGHT]; + DirNamesAdv[3] := _lc[I_ARRAY_DIR_REVERSED]; + +// Направление (на кнопках): + DirButtonNames[1] := _lc[I_ARRAY_DIRBTN_LEFT]; + DirButtonNames[2] := _lc[I_ARRAY_DIRBTN_RIGHT]; + DirButtonNames[3] := _lc[I_ARRAY_DIRBTN_UP]; + DirButtonNames[4] := _lc[I_ARRAY_DIRBTN_DOWN]; + +// Названия панелей: + PANELNAMES[0] := _lc[I_ARRAY_PANEL_WALL]; + PANELNAMES[1] := _lc[I_ARRAY_PANEL_BACK]; + PANELNAMES[2] := _lc[I_ARRAY_PANEL_FRONT]; + PANELNAMES[3] := _lc[I_ARRAY_PANEL_DOOR_OPEN]; + PANELNAMES[4] := _lc[I_ARRAY_PANEL_DOOR_CLOSE]; + PANELNAMES[5] := _lc[I_ARRAY_PANEL_STAIR]; + PANELNAMES[6] := _lc[I_ARRAY_PANEL_WATER]; + PANELNAMES[7] := _lc[I_ARRAY_PANEL_ACID_1]; + PANELNAMES[8] := _lc[I_ARRAY_PANEL_ACID_2]; + PANELNAMES[9] := _lc[I_ARRAY_PANEL_LIFT_UP]; + PANELNAMES[10] := _lc[I_ARRAY_PANEL_LIFT_DOWN]; + PANELNAMES[11] := _lc[I_ARRAY_PANEL_LIFT_LEFT]; + PANELNAMES[12] := _lc[I_ARRAY_PANEL_LIFT_RIGHT]; + PANELNAMES[13] := _lc[I_ARRAY_PANEL_BLOCKMON]; + +// Названия эффектов: + EffectNames[EFFECT_NONE] := _lc[I_ARRAY_FX_NONE]; + EffectNames[EFFECT_TELEPORT] := _lc[I_ARRAY_FX_TELEPORT]; + EffectNames[EFFECT_RESPAWN] := _lc[I_ARRAY_FX_RESPAWN]; + EffectNames[EFFECT_FIRE] := _lc[I_ARRAY_FX_FIRE]; + +// Названия предметов: + ItemNames[ITEM_MEDKIT_SMALL] := _lc[I_ARRAY_ITEM_MEDKIT]; + ItemNames[ITEM_MEDKIT_LARGE] := _lc[I_ARRAY_ITEM_LARGE_MEDKIT]; + ItemNames[ITEM_MEDKIT_BLACK] := _lc[I_ARRAY_ITEM_BLACK_MEDKIT]; + ItemNames[ITEM_ARMOR_GREEN] := _lc[I_ARRAY_ITEM_GREEN_ARMOR]; + ItemNames[ITEM_ARMOR_BLUE] := _lc[I_ARRAY_ITEM_BLUE_ARMOR]; + ItemNames[ITEM_SPHERE_BLUE] := _lc[I_ARRAY_ITEM_BLUE_SPHERE]; + ItemNames[ITEM_SPHERE_WHITE] := _lc[I_ARRAY_ITEM_MEGASPHERE]; + ItemNames[ITEM_SUIT] := _lc[I_ARRAY_ITEM_HAZ_SUIT]; + ItemNames[ITEM_OXYGEN] := _lc[I_ARRAY_ITEM_OXYGEN]; + ItemNames[ITEM_INVUL] := _lc[I_ARRAY_ITEM_INVULNERABILITY]; + ItemNames[ITEM_WEAPON_SAW] := _lc[I_ARRAY_ITEM_CHAINSAW]; + ItemNames[ITEM_WEAPON_SHOTGUN1] := _lc[I_ARRAY_ITEM_SHOTGUN]; + ItemNames[ITEM_WEAPON_SHOTGUN2] := _lc[I_ARRAY_ITEM_DB_SHOTGUN]; + ItemNames[ITEM_WEAPON_CHAINGUN] := _lc[I_ARRAY_ITEM_CHAINGUN]; + ItemNames[ITEM_WEAPON_ROCKETLAUNCHER] := _lc[I_ARRAY_ITEM_ROCKET_LAUNCHER]; + ItemNames[ITEM_WEAPON_PLASMA] := _lc[I_ARRAY_ITEM_PLASMA_RIFLE]; + ItemNames[ITEM_WEAPON_BFG] := _lc[I_ARRAY_ITEM_BFG]; + ItemNames[ITEM_WEAPON_SUPERPULEMET] := _lc[I_ARRAY_ITEM_SUPER_MINIGUN]; + ItemNames[ITEM_AMMO_BULLETS] := _lc[I_ARRAY_ITEM_CLIP]; + ItemNames[ITEM_AMMO_BULLETS_BOX] := _lc[I_ARRAY_ITEM_AMMO_BOX]; + ItemNames[ITEM_AMMO_SHELLS] := _lc[I_ARRAY_ITEM_4_SHELLS]; + ItemNames[ITEM_AMMO_SHELLS_BOX] := _lc[I_ARRAY_ITEM_25_SHELLS]; + ItemNames[ITEM_AMMO_ROCKET] := _lc[I_ARRAY_ITEM_1_ROCKET]; + ItemNames[ITEM_AMMO_ROCKET_BOX] := _lc[I_ARRAY_ITEM_ROCKET_BOX]; + ItemNames[ITEM_AMMO_CELL] := _lc[I_ARRAY_ITEM_CELL]; + ItemNames[ITEM_AMMO_CELL_BIG] := _lc[I_ARRAY_ITEM_LARGE_CELL]; + ItemNames[ITEM_AMMO_BACKPACK] := _lc[I_ARRAY_ITEM_BACKPACK]; + ItemNames[ITEM_KEY_RED] := _lc[I_ARRAY_ITEM_KEY_RED]; + ItemNames[ITEM_KEY_GREEN] := _lc[I_ARRAY_ITEM_KEY_GREEN]; + ItemNames[ITEM_KEY_BLUE] := _lc[I_ARRAY_ITEM_KEY_BLUE]; + ItemNames[ITEM_WEAPON_KASTET] := '?'; + ItemNames[ITEM_WEAPON_PISTOL] := '??'; + ItemNames[ITEM_BOTTLE] := _lc[I_ARRAY_ITEM_BOTTLE]; + ItemNames[ITEM_HELMET] := _lc[I_ARRAY_ITEM_HELMET]; + ItemNames[ITEM_JETPACK] := _lc[I_ARRAY_ITEM_JETPACK]; + ItemNames[ITEM_INVIS] := _lc[I_ARRAY_ITEM_INVIS]; + +// Названия снарядов: + ShotNames[TRIGGER_SHOT_PISTOL] := _lc[I_ARRAY_SHOT_PISTOL]; + ShotNames[TRIGGER_SHOT_BULLET] := _lc[I_ARRAY_SHOT_BULLET]; + ShotNames[TRIGGER_SHOT_SHOTGUN] := _lc[I_ARRAY_SHOT_SHOTGUN]; + ShotNames[TRIGGER_SHOT_SSG] := _lc[I_ARRAY_SHOT_SSG]; + ShotNames[TRIGGER_SHOT_IMP] := _lc[I_ARRAY_SHOT_IMP]; + ShotNames[TRIGGER_SHOT_PLASMA] := _lc[I_ARRAY_SHOT_PLASMA]; + ShotNames[TRIGGER_SHOT_SPIDER] := _lc[I_ARRAY_SHOT_SPIDER]; + ShotNames[TRIGGER_SHOT_CACO] := _lc[I_ARRAY_SHOT_CACO]; + ShotNames[TRIGGER_SHOT_BARON] := _lc[I_ARRAY_SHOT_BARON]; + ShotNames[TRIGGER_SHOT_MANCUB] := _lc[I_ARRAY_SHOT_MANCUB]; + ShotNames[TRIGGER_SHOT_REV] := _lc[I_ARRAY_SHOT_REV]; + ShotNames[TRIGGER_SHOT_ROCKET] := _lc[I_ARRAY_SHOT_ROCKET]; + ShotNames[TRIGGER_SHOT_BFG] := _lc[I_ARRAY_SHOT_BFG]; + ShotNames[TRIGGER_SHOT_EXPL] := _lc[I_ARRAY_SHOT_EXPL]; + ShotNames[TRIGGER_SHOT_BFGEXPL] := _lc[I_ARRAY_SHOT_BFGEXPL]; + +// Названия монстров: + MonsterNames[MONSTER_DEMON] := _lc[I_ARRAY_MON_DEMON]; + MonsterNames[MONSTER_IMP] := _lc[I_ARRAY_MON_IMP]; + MonsterNames[MONSTER_ZOMBY] := _lc[I_ARRAY_MON_ZOMBIE]; + MonsterNames[MONSTER_SERG] := _lc[I_ARRAY_MON_SERGEANT]; + MonsterNames[MONSTER_CYBER] := _lc[I_ARRAY_MON_CYBER]; + MonsterNames[MONSTER_CGUN] := _lc[I_ARRAY_MON_CGUN]; + MonsterNames[MONSTER_BARON] := _lc[I_ARRAY_MON_HELL_BARON]; + MonsterNames[MONSTER_KNIGHT] := _lc[I_ARRAY_MON_HELL_KNIGHT]; + MonsterNames[MONSTER_CACO] := _lc[I_ARRAY_MON_CACODEMON]; + MonsterNames[MONSTER_SOUL] := _lc[I_ARRAY_MON_LOST_SOUL]; + MonsterNames[MONSTER_PAIN] := _lc[I_ARRAY_MON_PAIN_ELEMENTAL]; + MonsterNames[MONSTER_SPIDER] := _lc[I_ARRAY_MON_MASTERMIND]; + MonsterNames[MONSTER_BSP] := _lc[I_ARRAY_MON_ARACHNATRON]; + MonsterNames[MONSTER_MANCUB] := _lc[I_ARRAY_MON_MANCUBUS]; + MonsterNames[MONSTER_SKEL] := _lc[I_ARRAY_MON_REVENANT]; + MonsterNames[MONSTER_VILE] := _lc[I_ARRAY_MON_ARCHVILE]; + MonsterNames[MONSTER_FISH] := _lc[I_ARRAY_MON_FISH]; + MonsterNames[MONSTER_BARREL] := _lc[I_ARRAY_MON_BARREL]; + MonsterNames[MONSTER_ROBO] := _lc[I_ARRAY_MON_ROBOT]; + MonsterNames[MONSTER_MAN] := _lc[I_ARRAY_MON_PRIKOLIST]; + +// Названия областей: + AreaNames[AREA_PLAYERPOINT1] := _lc[I_ARRAY_AREA_PLAYER_ONE]; + AreaNames[AREA_PLAYERPOINT2] := _lc[I_ARRAY_AREA_PLAYER_TWO]; + AreaNames[AREA_DMPOINT] := _lc[I_ARRAY_AREA_DM]; + AreaNames[AREA_REDFLAG] := _lc[I_ARRAY_AREA_FLAG_RED]; + AreaNames[AREA_BLUEFLAG] := _lc[I_ARRAY_AREA_FLAG_BLUE]; + AreaNames[AREA_DOMFLAG] := _lc[I_ARRAY_AREA_FLAG_DOM]; + AreaNames[AREA_REDTEAMPOINT] := _lc[I_ARRAY_AREA_TEAM_RED]; + AreaNames[AREA_BLUETEAMPOINT] := _lc[I_ARRAY_AREA_TEAM_BLUE]; + +// Названия триггеров: + TriggerNames[TRIGGER_EXIT] := _lc[I_ARRAY_TR_EXIT]; + TriggerNames[TRIGGER_TELEPORT] := _lc[I_ARRAY_TR_TELEPORT]; + TriggerNames[TRIGGER_OPENDOOR] := _lc[I_ARRAY_TR_DOOR_OPEN]; + TriggerNames[TRIGGER_CLOSEDOOR] := _lc[I_ARRAY_TR_DOOR_CLOSE]; + TriggerNames[TRIGGER_DOOR] := _lc[I_ARRAY_TR_DOOR_SWITCH]; + TriggerNames[TRIGGER_DOOR5] := _lc[I_ARRAY_TR_DOOR_5_SEC]; + TriggerNames[TRIGGER_CLOSETRAP] := _lc[I_ARRAY_TR_TRAP_CLOSE]; + TriggerNames[TRIGGER_TRAP] := _lc[I_ARRAY_TR_TRAP]; + TriggerNames[TRIGGER_PRESS] := _lc[I_ARRAY_TR_EXTEND]; + TriggerNames[TRIGGER_SECRET] := _lc[I_ARRAY_TR_SECRET]; + TriggerNames[TRIGGER_LIFTUP] := _lc[I_ARRAY_TR_LIFT_UP]; + TriggerNames[TRIGGER_LIFTDOWN] := _lc[I_ARRAY_TR_LIFT_DOWN]; + TriggerNames[TRIGGER_LIFT] := _lc[I_ARRAY_TR_LIFT_SWITCH]; + TriggerNames[TRIGGER_TEXTURE] := _lc[I_ARRAY_TR_TEXTURE]; + TriggerNames[TRIGGER_ON] := _lc[I_ARRAY_TR_ON]; + TriggerNames[TRIGGER_OFF] := _lc[I_ARRAY_TR_OFF]; + TriggerNames[TRIGGER_ONOFF] := _lc[I_ARRAY_TR_SWITCH]; + TriggerNames[TRIGGER_SOUND] := _lc[I_ARRAY_TR_SOUND]; + TriggerNames[TRIGGER_SPAWNMONSTER] := _lc[I_ARRAY_TR_SPAWN_MONSTER]; + TriggerNames[TRIGGER_SPAWNITEM] := _lc[I_ARRAY_TR_SPAWN_ITEM]; + TriggerNames[TRIGGER_MUSIC] := _lc[I_ARRAY_TR_MUSIC]; + TriggerNames[TRIGGER_PUSH] := _lc[I_ARRAY_TR_PUSH]; + TriggerNames[TRIGGER_SCORE] := _lc[I_ARRAY_TR_SCORE]; + TriggerNames[TRIGGER_MESSAGE] := _lc[I_ARRAY_TR_MESSAGE]; + TriggerNames[TRIGGER_DAMAGE] := _lc[I_ARRAY_TR_DAMAGE]; + TriggerNames[TRIGGER_HEALTH] := _lc[I_ARRAY_TR_HEALTH]; + TriggerNames[TRIGGER_SHOT] := _lc[I_ARRAY_TR_SHOT]; + TriggerNames[TRIGGER_EFFECT] := _lc[I_ARRAY_TR_EFFECT]; + +// Установка значений в панели выбора объектов: + with MainForm do + begin + lbPanelType.Items.Clear(); + for i := 0 to High(PANELNAMES) do + lbPanelType.Items.Add(PANELNAMES[i]); + lbPanelType.ItemIndex := 0; + + lbItemList.Clear(); + for i := ITEM_MEDKIT_SMALL to ITEM_KEY_BLUE do + lbItemList.Items.Add(ItemNames[i]); + lbItemList.Items.Add(ItemNames[ITEM_BOTTLE]); + lbItemList.Items.Add(ItemNames[ITEM_HELMET]); + lbItemList.Items.Add(ItemNames[ITEM_JETPACK]); + lbItemList.Items.Add(ItemNames[ITEM_INVIS]); + + lbMonsterList.Clear(); + for i := MONSTER_DEMON to MONSTER_MAN do + lbMonsterList.Items.Add(MonsterNames[i]); + + lbAreasList.Clear(); + for i := AREA_PLAYERPOINT1 to AREA_BLUETEAMPOINT do + lbAreasList.Items.Add(AreaNames[i]); + + lbTriggersList.Clear(); + for i := Low(TriggerNames) to High(TriggerNames) do + lbTriggersList.Items.Add(TriggerNames[i]); + + clbActivationType.Clear(); + clbActivationType.Items.Add(_lc[I_CTRL_ACT_PLAYER_CLOSE]); + clbActivationType.Items.Add(_lc[I_CTRL_ACT_MONSTER_CLOSE]); + clbActivationType.Items.Add(_lc[I_CTRL_ACT_PLAYER_PRESS]); + clbActivationType.Items.Add(_lc[I_CTRL_ACT_MONSTER_PRESS]); + clbActivationType.Items.Add(_lc[I_CTRL_ACT_SHOT]); + clbActivationType.Items.Add(_lc[I_CTRL_ACT_NO_MONSTER]); + + clbKeys.Clear(); + clbKeys.Items.Add(_lc[I_CTRL_KEYS_RED]); + clbKeys.Items.Add(_lc[I_CTRL_KEYS_GREEN]); + clbKeys.Items.Add(_lc[I_CTRL_KEYS_BLUE]); + clbKeys.Items.Add(_lc[I_CTRL_KEYS_TEAM_RED]); + clbKeys.Items.Add(_lc[I_CTRL_KEYS_TEAM_BLUE]); + end; +end; + +procedure SetupCaptions(); +var + i: Integer; + +begin +// Главная форма: + with MainForm do + begin + // Заголовок: + FormCaption := _lc[I_EDITOR_TITLE]; + i := Pos('-', Caption); + if i > 0 then + begin + Caption := FormCaption + ' ' + Copy(Caption, i, Length(Caption)-i+1); + end + else + Caption := FormCaption; + // Главное меню: + // "Файл": + miMenuFile.Caption := _lc[I_MENU_FILE]; + miNewMap.Caption := _lc[I_MENU_FILE_NEW]; + miOpenMap.Caption := _lc[I_MENU_FILE_OPEN]; + miSaveMap.Caption := _lc[I_MENU_FILE_SAVE]; + miSaveMapAs.Caption := _lc[I_MENU_FILE_SAVE_AS]; + miOpenWadMap.Caption := _lc[I_MENU_FILE_OPEN_WAD]; + miSaveMiniMap.Caption := _lc[I_MENU_FILE_SAVE_MINI]; + miDeleteMap.Caption := _lc[I_MENU_FILE_DELETE]; + miPackMap.Caption := _lc[I_MENU_FILE_PACK_MAP]; + miExit.Caption := _lc[I_MENU_FILE_EXIT]; + // "Правка": + miMenuEdit.Caption := _lc[I_MENU_EDIT]; + miUndo.Caption := _lc[I_MENU_EDIT_UNDO]; + miCopy.Caption := _lc[I_MENU_EDIT_COPY]; + miCut.Caption := _lc[I_MENU_EDIT_CUT]; + miPaste.Caption := _lc[I_MENU_EDIT_PASTE]; + miSelectAll.Caption := _lc[I_MENU_EDIT_SELECT_ALL]; + miToFore.Caption := _lc[I_MENU_EDIT_TO_FORE]; + miToBack.Caption := _lc[I_MENU_EDIT_TO_BACK]; + // "Инструменты": + miMenuTools.Caption := _lc[I_MENU_TOOLS]; + miSnapToGrid.Caption := _lc[I_MENU_TOOLS_SNAP_GRID]; + miMiniMap.Caption := _lc[I_MENU_TOOLS_MINIMAP]; + miSwitchGrid.Caption := _lc[I_MENU_TOOLS_STEP_GRID]; + miShowEdges.Caption := _lc[I_MENU_TOOLS_SHOW_EDGES]; + miLayers.Caption := _lc[I_MENU_TOOLS_LAYERS]; + miLayer1.Caption := _lc[I_MENU_LAYER_BACK]; + miLayer2.Caption := _lc[I_MENU_LAYER_WALL]; + miLayer3.Caption := _lc[I_MENU_LAYER_FORE]; + miLayer4.Caption := _lc[I_MENU_LAYER_STAIR]; + miLayer5.Caption := _lc[I_MENU_LAYER_WATER]; + miLayer6.Caption := _lc[I_MENU_LAYER_ITEM]; + miLayer7.Caption := _lc[I_MENU_LAYER_MONSTER]; + miLayer8.Caption := _lc[I_MENU_LAYER_AREA]; + miLayer9.Caption := _lc[I_MENU_LAYER_TRIGGER]; + // "Сервис": + miMenuService.Caption := _lc[I_MENU_SERV]; + miCheckMap.Caption := _lc[I_MENU_SERV_TEST]; + miOptimmization.Caption := _lc[I_MENU_SERV_OPT]; + miMapPreview.Caption := _lc[I_MENU_SERV_PREVIEW]; + miTestMap.Caption := _lc[I_MENU_SERV_LAUNCH]; + // "Настройка": + miMenuSettings.Caption := _lc[I_MENU_SETS]; + miMapOptions.Caption := _lc[I_MENU_SETS_MAP]; + miOptions.Caption := _lc[I_MENU_SETS_EDITOR]; + miMapTestSettings.Caption := _lc[I_MENU_SETS_LAUNCH]; + // "Справка": + miMenuHelp.Caption := _lc[I_MENU_HELP]; + miAbout.Caption := _lc[I_MENU_HELP_ABOUT]; + + // Панель инструментов: + tbNewMap.Hint := _lc[I_MENU_TB_NEW]; + tbOpenMap.Hint := _lc[I_MENU_TB_OPEN]; + tbSaveMap.Hint := _lc[I_MENU_TB_SAVE]; + tbOpenWadMap.Hint := _lc[I_MENU_TB_OPEN_WAD]; + tbShowMap.Hint := _lc[I_MENU_TB_MINIMAP]; + tbShow.Hint := _lc[I_MENU_TB_LAYERS]; + tbGridOn.Hint := _lc[I_MENU_TB_GRID]; + tbGrid.Hint := _lc[I_MENU_TB_GRID_STEP]; + tbTestMap.Hint := _lc[I_MENU_TB_LAUNCH]; + // Всплывающее меню для кнопки слоев: + miLayerP1.Caption := _lc[I_MENU_LAYER_BACK]; + miLayerP2.Caption := _lc[I_MENU_LAYER_WALL]; + miLayerP3.Caption := _lc[I_MENU_LAYER_FORE]; + miLayerP4.Caption := _lc[I_MENU_LAYER_STAIR]; + miLayerP5.Caption := _lc[I_MENU_LAYER_WATER]; + miLayerP6.Caption := _lc[I_MENU_LAYER_ITEM]; + miLayerP7.Caption := _lc[I_MENU_LAYER_MONSTER]; + miLayerP8.Caption := _lc[I_MENU_LAYER_AREA]; + miLayerP9.Caption := _lc[I_MENU_LAYER_TRIGGER]; + // Всплывающее меню для кнопки теста карты: + miMapTestPMSet.Caption := _lc[I_MENU_LAUNCH_SETS]; + + // Кнопка применения свойств: + bApplyProperty.Caption := _lc[I_BTN_APPLY_PROPS]; + // Редактор свойств объектов: + vleObjectProperty.TitleCaptions[0] := _lc[I_CTRL_PROP_KEY]; + vleObjectProperty.TitleCaptions[1] := _lc[I_CTRL_PROP_VALUE]; + + // Вкладка "Панели": + tsPanels.Caption := _lc[I_CTRL_PANELS]; + lbPanelType.Hint := _lc[I_PROP_PANEL_TYPE]; + lbTextureList.Hint := _lc[I_CTRL_LIST_TEXTURE]; + // Панель настройки текстур: + LabelTxW.Caption := _lc[I_LAB_TEX_WIDTH]; + LabelTxH.Caption := _lc[I_LAB_TEX_HEIGHT]; + cbPreview.Caption := _lc[I_CTRL_PREVIEW]; + bbAddTexture.Hint := _lc[I_BTN_TEXTURE_ADD]; + bbRemoveTexture.Hint := _lc[I_BTN_TEXTURE_DELETE]; + bClearTexture.Hint := _lc[I_BTN_TEXTURE_EMPTY]; + + // Вкладка "Предметы": + tsItems.Caption := _lc[I_CTRL_ITEMS]; + lbItemList.Hint := _lc[I_CTRL_LIST_ITEM]; + cbOnlyDM.Caption := _lc[I_CTRL_ITEM_DM]; + cbFall.Caption := _lc[I_CTRL_ITEM_FALLS]; + + // Вкладка "Монстры": + tsMonsters.Caption := _lc[I_CTRL_MONSTERS]; + lbMonsterList.Hint := _lc[I_CTRL_LIST_MONSTER]; + rbMonsterLeft.Caption := _lc[I_CTRL_LEFT]; + rbMonsterRight.Caption := _lc[I_CTRL_RIGHT]; + + // Вкладка "Области": + tsAreas.Caption := _lc[I_CTRL_AREAS]; + lbAreasList.Hint := _lc[I_CTRL_LIST_AREA]; + rbAreaLeft.Caption := _lc[I_CTRL_LEFT]; + rbAreaRight.Caption := _lc[I_CTRL_RIGHT]; + + // Вкладка "Триггеры": + tsTriggers.Caption := _lc[I_CTRL_TRIGGERS]; + lbTriggersList.Hint := _lc[I_CTRL_LIST_TRIGGER]; + clbActivationType.Hint := _lc[I_CTRL_LIST_ACTIVE]; + clbKeys.Hint := _lc[I_CTRL_LIST_KEYS]; + end; + +// Форма "О программе": + with AboutForm do + begin + Caption := _lc[I_CAP_ABOUT]; + LabelTitle.Caption := _lc[I_EDITOR_TITLE]; + LabelVer.Caption := _lc[I_LAB_ABOUT_VER]; + LabelAuthor.Caption := _lc[I_LAB_ABOUT_AUTHOR]; + LabelAuthor2.Caption := _lc[I_LAB_ABOUT_AUTHOR_2]; + LabelMail.Caption := _lc[I_LAB_ABOUT_MAIL]; + LabelMail2.Caption := _lc[I_LAB_ABOUT_MAIL_2]; + LabelSite.Caption := _lc[I_LAB_ABOUT_SITE]; + LabelHttp.Caption := _lc[I_LAB_ABOUT_HTTP]; + end; + +// Форма "Тип активации": + with ActivationTypeForm do + begin + Caption := _lc[I_CAP_ACT]; + cbPlayerCollide.Caption := _lc[I_CTRL_ACT_PLAYER_CLOSE]; + cbMonsterCollide.Caption := _lc[I_CTRL_ACT_MONSTER_CLOSE]; + cbPlayerPress.Caption := _lc[I_CTRL_ACT_PLAYER_PRESS]; + cbMonsterPress.Caption := _lc[I_CTRL_ACT_MONSTER_PRESS]; + cbShot.Caption := _lc[I_CTRL_ACT_SHOT]; + cbNoMonster.Caption := _lc[I_CTRL_ACT_NO_MONSTER]; + bOK.Caption := _lc[I_BTN_OK]; + end; + +// Форма "Выбор текстуры для неба": + with AddSkyForm do + begin + Caption := _lc[I_CAP_ADD_SKY]; + LabelWADs.Caption := _lc[I_LAB_ADD_WADS]; + LabelSections.Caption := _lc[I_LAB_ADD_SECTIONS]; + bOK.Caption := _lc[I_BTN_OK]; + bCancel.Caption := _lc[I_BTN_CANCEL]; + end; + +// Форма "Выбор звука или музыки": + with AddSoundForm do + begin + Caption := _lc[I_CAP_ADD_SOUND]; + LabelWADs.Caption := _lc[I_LAB_ADD_WADS]; + LabelSections.Caption := _lc[I_LAB_ADD_SECTIONS]; + bOK.Caption := _lc[I_BTN_OK]; + bCancel.Caption := _lc[I_BTN_CANCEL]; + bEmpty.Caption := _lc[I_BTN_NO_SOUND]; + end; + +// Форма "Выбор текстуры": + with AddTextureForm do + begin + Caption := _lc[I_CAP_ADD_TEXTURE]; + LabelWADs.Caption := _lc[I_LAB_ADD_WADS]; + LabelSections.Caption := _lc[I_LAB_ADD_SECTIONS]; + bAddTexture.Caption := _lc[I_BTN_ADD]; + bClose.Caption := _lc[I_BTN_CLOSE]; + bAddClose.Caption := _lc[I_BTN_ADD_CLOSE]; + end; + +// Форма "Выбор типа монстра" / "Выбор типа предмета": + ChooseTypeForm.bOK.Caption := _lc[I_BTN_OK]; + +// Форма "Ключи": + with KeysForm do + begin + Caption := _lc[I_CAP_KEYS]; + cbRedKey.Caption := _lc[I_CTRL_KEYS_RED]; + cbGreenKey.Caption := _lc[I_CTRL_KEYS_GREEN]; + cbBlueKey.Caption := _lc[I_CTRL_KEYS_BLUE]; + cbRedTeam.Caption := _lc[I_CTRL_KEYS_TEAM_RED]; + cbBlueTeam.Caption := _lc[I_CTRL_KEYS_TEAM_BLUE]; + bOK.Caption := _lc[I_BTN_OK]; + end; + +// Форма "Проверка карты": + with MapCheckForm do + begin + Caption := _lc[I_CAP_TEST]; + bCheckMap.Caption := _lc[I_BTN_TEST_AGAIN]; + bClose.Caption := _lc[I_BTN_CLOSE]; + end; + +// Форма "Оптимизация карты": + with MapOptimizationForm do + begin + Caption := _lc[I_CAP_OPT]; + // Выбор оптимизации: + GroupBoxOpt.Caption := _lc[I_CTRL_OPT_GB]; + rbTexturesOptimization.Caption := _lc[I_CTRL_OPT_TEXTURE]; + rbPanelsOptimization.Caption := _lc[I_CTRL_OPT_PANEL]; + // Оптимизация текстур: + bBeginTextureOptimization.Caption := _lc[I_BTN_START]; + // Оптимизация панелей: + cbOptimizeWalls.Caption := _lc[I_CTRL_OPT_WALL]; + cbOptimizeForeGround.Caption := _lc[I_CTRL_OPT_FORE]; + cbOptimizeBackGround.Caption := _lc[I_CTRL_OPT_BACK]; + cbOptimizeSteps.Caption := _lc[I_CTRL_OPT_STAIR]; + cbOptimizeWater.Caption := _lc[I_CTRL_OPT_WATER]; + cbOptimizeAcid1.Caption := _lc[I_CTRL_OPT_ACID1]; + cbOptimizeAcid2.Caption := _lc[I_CTRL_OPT_ACID2]; + cbOptimizeLift.Caption := _lc[I_CTRL_OPT_LIFT]; + cbOptimizeBlockMon.Caption := _lc[I_CTRL_OPT_BLOCKMON]; + bBeginPanelsOptimization.Caption := _lc[I_BTN_START]; + end; + +// Форма "Параметры карты": + with MapOptionsForm do + begin + Caption := _lc[I_CAP_SETS]; + // Основные параметры: + LabelName.Caption := _lc[I_LAB_SETS_NAME]; + LabelDesc.Caption := _lc[I_LAB_SETS_DESC]; + LabelAuthor.Caption := _lc[I_LAB_SETS_AUTHOR]; + LabelBack.Caption := _lc[I_LAB_SETS_BACK]; + LabelMusic.Caption := _lc[I_LAB_SETS_MUSIC]; + // Статистика: + GBStats.Caption := _lc[I_CTRL_SETS_STATS]; + LabelTexs.Caption := _lc[I_LAB_SETS_TEXTURES]; + LabelPanels.Caption := _lc[I_LAB_SETS_PANELS]; + LabelItems.Caption := _lc[I_LAB_SETS_ITEMS]; + LabelMonsters.Caption := _lc[I_LAB_SETS_MONSTERS]; + LabelAreas.Caption := _lc[I_LAB_SETS_AREAS]; + LabelTriggers.Caption := _lc[I_LAB_SETS_TRIGGERS]; + // Размеры: + GBSizes.Caption := _lc[I_CTRL_SETS_SIZES]; + LabelWidth.Caption := _lc[I_LAB_SETS_WIDTH]; + LabelHeight.Caption := _lc[I_LAB_SETS_HEIGHT]; + LabelCurSize.Caption := _lc[I_LAB_SETS_SIZES]; + LabelMapMove.Caption := _lc[I_LAB_SETS_MAPMOVE]; + cbSnapping.Caption := _lc[I_LAB_SETS_SNAPPING]; + // Кнопки: + bOK.Caption := _lc[I_BTN_OK]; + bCancel.Caption := _lc[I_BTN_CANCEL]; + end; + +// Форма "Настройки теста карты": + with MapTestForm do + begin + Caption := _lc[I_CAP_LAUNCH]; + bOK.Caption := _lc[I_BTN_OK]; + bCancel.Caption := _lc[I_BTN_CANCEL]; + // Режим игры: + rbDM.Caption := _lc[I_CTRL_LAUNCH_DM]; + rbTDM.Caption := _lc[I_CTRL_LAUNCH_TDM]; + rbCTF.Caption := _lc[I_CTRL_LAUNCH_CTF]; + rbCOOP.Caption := _lc[I_CTRL_LAUNCH_COOP]; + // Опции: + cbTwoPlayers.Caption := _lc[I_CTRL_LAUNCH_2P]; + cbTeamDamage.Caption := _lc[I_CTRL_LAUNCH_FF]; + cbAllowExit.Caption := _lc[I_CTRL_LAUNCH_EXIT]; + cbWeaponStay.Caption := _lc[I_CTRL_LAUNCH_WEAPONS]; + cbMonstersDM.Caption := _lc[I_CTRL_LAUNCH_MONSTERS]; + cbMapOnce.Caption := _lc[I_CTRL_LAUNCH_CLOSE]; + LabelTime.Caption := _lc[I_LAB_LAUNCH_TIME]; + LabelSecs.Caption := _lc[I_LAB_LAUNCH_SECS]; + LabelScore.Caption := _lc[I_LAB_LAUNCH_SCORE]; + // Путь: + LabelPath.Caption := _lc[I_LAB_LAUNCH_PATH]; + FindD2dDialog.Title := _lc[I_CTRL_LAUNCH_OPEN]; + end; + +// Форма "Настройки редактора": + with OptionsForm do + begin + Caption := _lc[I_CAP_ES]; + bOK.Caption := _lc[I_BTN_OK]; + bCancel.Caption := _lc[I_BTN_CANCEL]; + // Настройки: + cbShowDots.Caption := _lc[I_CTRL_ES_GRID]; + cbShowTexture.Caption := _lc[I_CTRL_ES_TEXTURE]; + cbShowSize.Caption := _lc[I_CTRL_ES_PANEL_SIZE]; + LabelGrid.Caption := _lc[I_LAB_ES_GRID]; + LabelGridCol.Caption := _lc[I_LAB_ES_GRID_COLOR]; + LabelBack.Caption := _lc[I_LAB_ES_BACK]; + LabelPreview.Caption := _lc[I_LAB_ES_PREVIEW]; + LabelMinimap.Caption := _lc[I_LAB_ES_MINIMAP]; + LabelRecent.Caption := _lc[I_LAB_ES_RECENT]; + LabelLanguage.Caption := _lc[I_LAB_ES_LANGUAGE]; + end; + +// Форма "Упаковать карту": + with PackMapForm do + begin + Caption := _lc[I_CAP_PACK]; + bPack.Caption := _lc[I_BTN_PACK]; + LabelSaveTo.Caption := _lc[I_LAB_PACK_SAVE_TO]; + LabelMapName.Caption := _lc[I_LAB_PACK_MAP_NAME]; + // Что упаковывать: + cbTextrures.Caption := _lc[I_CTRL_PACK_TEXTURES]; + LabelTextures.Caption := _lc[I_LAB_PACK_TEXTURES]; + cbSky.Caption := _lc[I_CTRL_PACK_SKY]; + LabelSky.Caption := _lc[I_LAB_PACK_SKY]; + cbMusic.Caption := _lc[I_CTRL_PACK_MUSIC]; + LabelMusic.Caption := _lc[I_LAB_PACK_MUSIC]; + cbAdd.Caption := _lc[I_CTRL_PACK_ADD]; + cbNonStandart.Caption := _lc[I_CTRL_PACK_NON_STD]; + end; + +// Форма "Сохранить карту": + with SaveMapForm do + begin + Caption := _lc[I_CAP_SAVE]; + bOK.Caption := _lc[I_BTN_OK]; + bCancel.Caption := _lc[I_BTN_CANCEL]; + end; + +// Форма "Сохранить мини-карту": + with SaveMiniMapForm do + begin + Caption := _lc[I_CAP_MINI]; + LabelScale.Caption := _lc[I_LAB_MINI_SCALE]; + bSave.Caption := _lc[I_BTN_SAVE]; + bClose.Caption := _lc[I_BTN_CLOSE]; + end; + +// Форма "Выбор карты": + with SelectMapForm do + begin + Caption := _lc[I_CAP_SELECT]; + bOK.Caption := _lc[I_BTN_OK]; + bCancel.Caption := _lc[I_BTN_CANCEL]; + end; + +// Заголовок приложения: + Application.Title := _lc[I_EDITOR_TITLE]; +end; + +procedure g_Language_Load(fileName: String); +var + F: TextFile; + key, value: String; + i: TStrings_Locale; + k: Integer; + ok: Boolean; + +begin +// Значения по-умолчанию: + for i := Low(TStrings_Locale) to High(TStrings_Locale) do + _lc[i] := g_lang_default[i][LANGUAGE_ENGLISH_N]; + + if FileExists(fileName) then + begin + AssignFile(F, fileName); + ReSet(F); + k := 0; + + // Читаем файл: + while not EoF(F) do + begin + // Читаем строку: + ReadLn(F, key); + key := Trim(key); + + // Строка - ключ перевода: + if (key <> '') and + (key[1] = '[') and + (Pos(']', key) > 2) then + begin + key := UpperCase(Copy(key, 2, Pos(']', key)-2)); + + // Пропускаем пустые строки до строки - перевода: + value := ''; + while (not EoF(F)) and (value = '') do + begin + ReadLn(F, value); + value := Trim(value); + end; + + // Есть строка - перевод: + if value <> '' then + begin + // Ищем индекс ключа перевода: + ok := False; + i := TStrings_Locale(k); + + // От текущего к первому: + while i > Low(TStrings_Locale) do + begin + if g_lang_default[i][1] = key then + begin + _lc[i] := value; + ok := True; + Break; + end; + + Dec(i); + end; + + // Первый: + if not ok then + begin + i := Low(TStrings_Locale); + + if (g_lang_default[i][1] = key) then + begin + _lc[i] := value; + ok := True; + end; + end; + + // От следующего за текущим до последнего: + if not ok then + begin + i := TStrings_Locale(k); + + while i < High(TStrings_Locale) do + begin + Inc(i); + + if g_lang_default[i][1] = key then + begin + _lc[i] := value; + Break; + end; + end; + end; + end; + + Inc(k); + end; + end; + + CloseFile(F); + end + else + e_WriteLog('Language file "'+fileName+'" not found!', MSG_WARNING); + + SetupArrays(); + SetupCaptions(); + RemoveSelectFromObjects(); +end; + +procedure g_Language_Set(lang: String); +var + i: TStrings_Locale; + n: Byte; + +begin + if lang = LANGUAGE_ENGLISH then + n := LANGUAGE_ENGLISH_N + else + n := LANGUAGE_RUSSIAN_N; + + for i := Low(TStrings_Locale) to High(TStrings_Locale) do + _lc[i] := g_lang_default[i][n]; + + SetupArrays(); + SetupCaptions(); + RemoveSelectFromObjects(); +end; + +procedure g_Language_Dump(fileName: String); +var + F: TextFile; + i: TStrings_Locale; + +begin + AssignFile(F, fileName); + ReWrite(F); + + for i := Low(TStrings_Locale) to High(TStrings_Locale) do + WriteLn(F, _lc[i]); + + CloseFile(F); +end; + +End. \ No newline at end of file diff --git a/src/editor/g_map.pas b/src/editor/g_map.pas new file mode 100644 index 0000000..d61a0e2 --- /dev/null +++ b/src/editor/g_map.pas @@ -0,0 +1,2872 @@ +Unit g_map; + +{$MODE Delphi} + +Interface + +Uses + LCLIntf, LCLType, LMessages, g_basic, e_graphics, MAPREADER, MAPSTRUCT, + MAPWRITER, e_log, MAPDEF; + +Type + TMapObject = record + ObjectType: Byte; + ID: DWORD; + Live: Boolean; + end; + + TPanel = record + TextureID: DWORD; + TextureWidth, + TextureHeight: Word; + X, Y: Integer; + Width, Height: Word; + PanelType: Word; + Alpha: Byte; + Blending: Boolean; + TextureName: String; + end; + + TItem = record + X, Y: Integer; + ItemType: Byte; + OnlyDM: Boolean; + Fall: Boolean; + end; + + TArea = record + X, Y: Integer; + AreaType: Byte; + Direction: TDirection; + end; + + TMonster = record + X, Y: Integer; + MonsterType: Byte; + Direction: TDirection; + end; + + TTrigger = record + X, Y: Integer; + Width, Height: Word; + Enabled: Boolean; + TexturePanel: Integer; + TriggerType: Byte; + ActivateType: Byte; + Key: Byte; + Data: TTriggerData; + end; + + TMapInfo = record + FileName: String; + MapName: String; + Name: String; + Description: String; + Author: String; + MusicName: String; + SkyName: String; + Height: Word; + Width: Word; + end; + + TMonsterSizeDelta = record + X, Y: Integer; + Width: Word; + end; + +const + OBJECT_PANEL = 1; + OBJECT_ITEM = 2; + OBJECT_MONSTER = 3; + OBJECT_AREA = 4; + OBJECT_TRIGGER = 5; + + COLOR_EDGE: Integer = $000000; + ALPHA_EDGE: Byte = 96; + ALPHA_LINE: Byte = 208; + ALPHA_AREA: Byte = 96; + + TEXTURE_NAME_WATER = '_water_0'; + TEXTURE_NAME_ACID1 = '_water_1'; + TEXTURE_NAME_ACID2 = '_water_2'; + TEXTURE_SPECIAL_NONE = DWORD(-1); + TEXTURE_SPECIAL_WATER = DWORD(-2); + TEXTURE_SPECIAL_ACID1 = DWORD(-3); + TEXTURE_SPECIAL_ACID2 = DWORD(-4); + TEXTURE_SPECIAL_NOTEXTURE = DWORD(-8); + + ItemSize: Array [ITEM_MEDKIT_SMALL..ITEM_MAX] of Array [0..1] of Byte = + (((14), (15)), // MEDKIT_SMALL + ((28), (19)), // MEDKIT_LARGE + ((28), (19)), // MEDKIT_BLACK + ((31), (16)), // ARMOR_GREEN + ((31), (16)), // ARMOR_BLUE + ((25), (25)), // SPHERE_BLUE + ((25), (25)), // SPHERE_WHITE + ((24), (47)), // SUIT + ((14), (27)), // OXYGEN + ((25), (25)), // INVUL + ((62), (24)), // WEAPON_SAW + ((63), (12)), // WEAPON_SHOTGUN1 + ((54), (13)), // WEAPON_SHOTGUN2 + ((54), (16)), // WEAPON_CHAINGUN + ((62), (16)), // WEAPON_ROCKETLAUNCHER + ((54), (16)), // WEAPON_PLASMA + ((61), (36)), // WEAPON_BFG + ((54), (16)), // WEAPON_SUPERPULEMET + (( 9), (11)), // AMMO_BULLETS + ((28), (16)), // AMMO_BULLETS_BOX + ((15), ( 7)), // AMMO_SHELLS + ((32), (12)), // AMMO_SHELLS_BOX + ((12), (27)), // AMMO_ROCKET + ((54), (21)), // AMMO_ROCKET_BOX + ((15), (12)), // AMMO_CELL + ((32), (21)), // AMMO_CELL_BIG + ((22), (29)), // AMMO_BACKPACK + ((16), (16)), // KEY_RED + ((16), (16)), // KEY_GREEN + ((16), (16)), // KEY_BLUE + (( 1), ( 1)), // WEAPON_KASTET + ((43), (16)), // WEAPON_PISTOL + ((14), (18)), // BOTTLE + ((16), (15)), // HELMET + ((32), (24)), // JETPACK + ((25), (25))); // INVIS + + AreaSize: Array [AREA_PLAYERPOINT1..AREA_BLUETEAMPOINT] of TRectWH = + ((X:15; Y:12; Width:34; Height:52), // PLAYERPOINT1 + (X:15; Y:12; Width:34; Height:52), // PLAYERPOINT2 + (X:15; Y:12; Width:34; Height:52), // DMPOINT + (X:15; Y:11; Width:34; Height:52), // REDFLAG + (X:15; Y:11; Width:34; Height:52), // BLUEFLAG + (X:15; Y:11; Width:34; Height:52), // DOMFLAG + (X:15; Y:12; Width:34; Height:52), // REDTEAMPOINT + (X:15; Y:12; Width:34; Height:52)); // BLUETEAMPOINT + + MonsterSize: Array [MONSTER_DEMON..MONSTER_MAN] of TRectWH = + ((X: 7; Y: 8; Width: 50; Height: 52), // DEMON + (X: 15; Y: 10; Width: 34; Height: 50), // IMP + (X: 15; Y: 8; Width: 34; Height: 52), // ZOMBY + (X: 15; Y: 8; Width: 34; Height: 52), // SERG + (X: 24; Y: 9; Width: 80; Height: 110), // CYBER + (X: 15; Y: 4; Width: 34; Height: 56), // CGUN + (X: 39; Y: 32; Width: 50; Height: 64), // BARON + (X: 39; Y: 32; Width: 50; Height: 64), // KNIGHT + (X: 34; Y: 36; Width: 60; Height: 56), // CACO + (X: 16; Y: 14; Width: 32; Height: 36), // SOUL + (X: 34; Y: 36; Width: 60; Height: 56), // PAIN + (X: 23; Y: 14; Width: 210; Height: 100), // SPIDER + (X: 14; Y: 17; Width: 100; Height: 42), // BSP + (X: 28; Y: 34; Width: 72; Height: 60), // MANCUB + (X: 30; Y: 28; Width: 68; Height: 72), // SKEL + (X: 30; Y: 28; Width: 68; Height: 72), // VILE + (X: 6; Y: 11; Width: 20; Height: 10), // FISH + (X: 20; Y: 13; Width: 24; Height: 36), // BARREL + (X: 30; Y: 26; Width: 68; Height: 76), // ROBO + (X: 15; Y: 6; Width: 34; Height: 52)); // MAN + + MonsterSizeDelta: Array [MONSTER_DEMON..MONSTER_MAN] of TMonsterSizeDelta = + ((X: 1; Y: 4; Width: 64), // DEMON + (X: 8; Y: -4; Width: 64), // IMP + (X: 1; Y: -4; Width: 64), // ZOMBY + (X: 0; Y: -4; Width: 64), // SERG + (X: 2; Y: -6; Width: 128), // CYBER + (X: -1; Y: -2; Width: 64), // CGUN + (X: 4; Y: 0; Width: 128), // BARON + (X: 4; Y: 0; Width: 128), // KNIGHT + (X: 0; Y: -4; Width: 128), // CACO + (X: 1; Y: -10; Width: 64), // SOUL + (X: -1; Y: -3; Width: 128), // PAIN + (X: -4; Y: -4; Width: 256), // SPIDER + (X: 0; Y: -1; Width: 128), // BSP + (X: -2; Y: -7; Width: 128), // MANCUB + (X: -1; Y: 4; Width: 128), // SKEL + (X: 5; Y: -21; Width: 128), // VILE + (X: -1; Y: 0; Width: 32), // FISH + (X: 0; Y: -15; Width: 64), // BARREL + (X: -2; Y: -26; Width: 128), // ROBO + (X: 0; Y: -6; Width: 64)); // MAN + +var + gColorEdge: Integer; + gAlphaEdge: Byte; + gAlphaTriggerLine: Byte; + gAlphaTriggerArea: Byte; + drEdge: Array[0..3] of Byte; + gPanels: Array of TPanel; + gItems: Array of TItem; + gAreas: Array of TArea; + gMonsters: Array of TMonster; + gTriggers: Array of TTrigger; + gMapInfo: TMapInfo; + MapOffset: TPoint = (X: 0; Y: 0); + SelectedObjects: Array of TMapObject = nil; + +procedure LoadSky(Res: String); + +function AddItem(Item: TItem): DWORD; +function AddPanel(Panel: TPanel): DWORD; +function AddArea(Area: TArea): DWORD; +function AddMonster(Monster: TMonster): DWORD; +function AddTrigger(Trigger: TTrigger): DWORD; + +procedure RemoveObject(ID: DWORD; ObjectType: Byte); +function PanelInShownLayer(PanelType: Word): Boolean; +function ObjectInRect(fX, fY: Integer; fWidth, fHeight: Word; ObjectType: Byte; All: Boolean): DWArray; +function ObjectCollideLevel(fID: DWORD; ObjectType: Byte; dX, dY: Integer): Boolean; +function ObjectCollide(ObjectType: Byte; ID: DWORD; fX, fY: Integer; fWidth, fHeight: Word): Boolean; +function ObjectGetRect(ObjectType: Byte; ID: DWORD): TRectWH; +procedure MoveObject(ObjectType: Byte; ID: DWORD; dX, dY: Integer); +procedure ResizeObject(ObjectType: Byte; ID: DWORD; dWidth, dHeight: Integer; ResizeDir: Byte); +function ObjectSelected(ObjectType: Byte; ID: DWORD): Boolean; + +function GetPanelName(PanelType: Word): String; +function GetPanelType(PanelName: String): Word; +function GetTriggerName(TriggerType: Byte): String; +function GetTriggerType(TriggerName: String): Byte; + +function IsSpecialTexture(TextureName: String): Boolean; +function SpecialTextureID(TextureName: String): DWORD; + +procedure ClearMap(); +function SaveMap(Res: String): Pointer; +function LoadMap(Res: String): Boolean; +function LoadMapOld(_FileName: String): Boolean; +procedure DrawMap(); +procedure LoadData(); +procedure FreeData(); + +procedure ShiftMapObjects(dx, dy: Integer); + +Implementation + +Uses + BinEditor, g_textures, Dialogs, SysUtils, CONFIG, f_main, + Forms, Math, f_addresource_texture, WADEDITOR, + Masks, g_Language; + +const + OLD_ITEM_MEDKIT_SMALL = 1; + OLD_ITEM_MEDKIT_LARGE = 2; + OLD_ITEM_ARMOR_GREEN = 3; + OLD_ITEM_ARMOR_BLUE = 4; + OLD_ITEM_SPHERE_BLUE = 5; + OLD_ITEM_SPHERE_WHITE = 6; + OLD_ITEM_WEAPON_SAW = 7; + OLD_ITEM_WEAPON_SHOTGUN1 = 8; + OLD_ITEM_WEAPON_SHOTGUN2 = 9; + OLD_ITEM_WEAPON_CHAINGUN = 10; + OLD_ITEM_WEAPON_ROCKETLAUNCHER = 11; + OLD_ITEM_WEAPON_PLASMA = 12; + OLD_ITEM_WEAPON_BFG = 13; + OLD_ITEM_WEAPON_SUPERPULEMET = 14; + OLD_ITEM_AMMO_BULLETS = 15; + OLD_ITEM_AMMO_BULLETS_BOX = 16; + OLD_ITEM_AMMO_SHELLS = 17; + OLD_ITEM_AMMO_SHELLS_BOX = 18; + OLD_ITEM_AMMO_ROCKET = 19; + OLD_ITEM_AMMO_ROCKET_BOX = 20; + OLD_ITEM_AMMO_CELL = 21; + OLD_ITEM_AMMO_CELL_BIG = 22; + OLD_ITEM_AMMO_BACKPACK = 23; + OLD_ITEM_KEY_RED = 24; + OLD_ITEM_KEY_GREEN = 25; + OLD_ITEM_KEY_BLUE = 26; + OLD_ITEM_SUIT = 27; + OLD_ITEM_OXYGEN = 28; + OLD_ITEM_MEDKIT_BLACK = 29; + OLD_ITEM_INVUL = 30; + + ITEMSCONVERT: Array [OLD_ITEM_MEDKIT_SMALL..OLD_ITEM_INVUL] of Integer = + ((ITEM_MEDKIT_SMALL), + (ITEM_MEDKIT_LARGE), + (ITEM_ARMOR_GREEN), + (ITEM_ARMOR_BLUE), + (ITEM_SPHERE_BLUE), + (ITEM_SPHERE_WHITE), + (ITEM_WEAPON_SAW), + (ITEM_WEAPON_SHOTGUN1), + (ITEM_WEAPON_SHOTGUN2), + (ITEM_WEAPON_CHAINGUN), + (ITEM_WEAPON_ROCKETLAUNCHER), + (ITEM_WEAPON_PLASMA), + (ITEM_WEAPON_BFG), + (ITEM_WEAPON_SUPERPULEMET), + (ITEM_AMMO_BULLETS), + (ITEM_AMMO_BULLETS_BOX), + (ITEM_AMMO_SHELLS), + (ITEM_AMMO_SHELLS_BOX), + (ITEM_AMMO_ROCKET), + (ITEM_AMMO_ROCKET_BOX), + (ITEM_AMMO_CELL), + (ITEM_AMMO_CELL_BIG), + (ITEM_AMMO_BACKPACK), + (ITEM_KEY_RED), + (ITEM_KEY_GREEN), + (ITEM_KEY_BLUE), + (ITEM_SUIT), + (ITEM_OXYGEN), + (ITEM_MEDKIT_BLACK), + (ITEM_INVUL)); + + OldItemSize: Array [ITEM_MEDKIT_SMALL..ITEM_KEY_BLUE] of Array [0..1] of Byte = + (((14), (15)), // MEDKIT_SMALL + ((28), (19)), // MEDKIT_LARGE + ((28), (19)), // MEDKIT_BLACK - not in map generator + ((30), (16)), // ARMOR_GREEN + ((30), (16)), // ARMOR_BLUE + ((24), (24)), // SPHERE_BLUE + ((24), (24)), // SPHERE_WHITE + ((24), (46)), // SUIT + ((14), (27)), // OXYGEN + ((25), (25)), // INVUL - not in map generator + ((61), (23)), // WEAPON_SAW + ((62), (10)), // WEAPON_SHOTGUN1 + ((52), (12)), // WEAPON_SHOTGUN2 + ((53), (15)), // WEAPON_CHAINGUN + ((61), (15)), // WEAPON_ROCKETLAUNCHER + ((53), (14)), // WEAPON_PLASMA + ((61), (34)), // WEAPON_BFG + ((53), (16)), // WEAPON_SUPERPULEMET + (( 9), (10)), // AMMO_BULLETS + ((28), (16)), // AMMO_BULLETS_BOX + ((15), ( 7)), // AMMO_SHELLS + ((32), (12)), // AMMO_SHELLS_BOX + ((12), (26)), // AMMO_ROCKET + ((54), (21)), // AMMO_ROCKET_BOX + ((15), (12)), // AMMO_CELL + ((32), (21)), // AMMO_CELL_BIG + ((22), (29)), // AMMO_BACKPACK + ((16), (16)), // KEY_RED + ((16), (16)), // KEY_GREEN + ((16), (16))); // KEY_BLUE + + OldAreaSize: Array [0..1] of Byte = ((34), (56)); + + SKY_TEXTURE = 'SKY'; + +procedure LoadSky(Res: String); +var + fn: String; + +begin + g_DeleteTexture(SKY_TEXTURE); + + if Res = '' then + Exit; + + g_ProcessResourceStr(Res, @fn, nil, nil); + + if fn = '' then + begin + g_ProcessResourceStr(OpenedMap, @fn, nil, nil); + fn := fn + Res; + end + else + fn := EditorDir + 'wads\' + Res; + + g_CreateTextureWAD(SKY_TEXTURE, fn); +end; + +function AddItem(Item: TItem): DWORD; +var + a: Integer; + ok: Boolean; + +begin + ok := False; + a := 0; + + if gItems <> nil then + for a := 0 to High(gItems) do + if gItems[a].ItemType = ITEM_NONE then + begin + ok := True; + Break; + end; + + if not ok then + begin + a := Length(gItems); + SetLength(gItems, a + 128); + end; + + gItems[a] := Item; + + Result := a; +end; + +function AddPanel(Panel: TPanel): DWORD; +var + a, b: Integer; + ok: Boolean; + +begin + ok := False; + a := 0; + b := -1; + + if gPanels <> nil then + for a := High(gPanels) downto 0 do + if gPanels[a].PanelType = PANEL_NONE then + b := a + else + Break; + + if b <> -1 then + begin + a := b; + ok := True; + end; + + if not ok then + begin + a := Length(gPanels); + SetLength(gPanels, a + 512); + end; + + gPanels[a] := Panel; + + Result := a; +end; + +function AddArea(Area: TArea): DWORD; +var + a: Integer; + ok: Boolean; + +begin + ok := False; + a := 0; + + if gAreas <> nil then + for a := 0 to High(gAreas) do + if gAreas[a].AreaType = AREA_NONE then + begin + ok := True; + Break; + end; + + if not ok then + begin + a := Length(gAreas); + SetLength(gAreas, a + 64); + end; + + gAreas[a] := Area; + + Result := a; +end; + +function AddMonster(Monster: TMonster): DWORD; +var + a: Integer; + ok: Boolean; + +begin + ok := False; + a := 0; + + if gMonsters <> nil then + for a := 0 to High(gMonsters) do + if gMonsters[a].MonsterType = MONSTER_NONE then + begin + ok := True; + Break; + end; + + if not ok then + begin + a := Length(gMonsters); + SetLength(gMonsters, a + 128); + end; + + gMonsters[a] := Monster; + + Result := a; +end; + +function AddTrigger(Trigger: TTrigger): DWORD; +var + a: Integer; + ok: Boolean; + +begin + ok := False; + a := 0; + + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + if gTriggers[a].TriggerType = TRIGGER_NONE then + begin + ok := True; + Break; + end; + + if not ok then + begin + a := Length(gTriggers); + SetLength(gTriggers, a + 64); + end; + + gTriggers[a] := Trigger; + + Result := a; +end; + +procedure RemoveObject(ID: DWORD; ObjectType: Byte); +var + a: Integer; + +begin + case ObjectType of + OBJECT_PANEL: + begin + // Убираем ссылки триггеров на эту панель: + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + if gTriggers[a].TriggerType <> 0 then + begin + if gTriggers[a].TexturePanel = Integer(ID) then + gTriggers[a].TexturePanel := -1; + + if gTriggers[a].TriggerType in [ + TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, + TRIGGER_DOOR, TRIGGER_DOOR5, TRIGGER_CLOSETRAP, + TRIGGER_TRAP, TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, + TRIGGER_LIFT] then + if gTriggers[a].Data.PanelID = Integer(ID) then + gTriggers[a].Data.PanelID := -1; + + if (gTriggers[a].TriggerType = TRIGGER_SHOT) and + (gTriggers[a].Data.ShotPanelID = Integer(ID)) then + gTriggers[a].Data.ShotPanelID := -1; + end; + + gPanels[ID].PanelType := 0; + end; + + OBJECT_ITEM: + gItems[ID].ItemType := 0; + + OBJECT_MONSTER: + begin + // Убираем ссылки триггеров на этого монстра: + if gTriggers <> nil then + for a := 0 to High(gTriggers) do + if gTriggers[a].TriggerType <> 0 then + begin + if gTriggers[a].TriggerType in [TRIGGER_PRESS, + TRIGGER_ON, TRIGGER_OFF, TRIGGER_ONOFF] then + if (gTriggers[a].Data.MonsterID-1 = Integer(ID)) then + gTriggers[a].Data.MonsterID := 0; + end; + + gMonsters[ID].MonsterType := 0; + end; + + OBJECT_AREA: + gAreas[ID].AreaType := 0; + + OBJECT_TRIGGER: + gTriggers[ID].TriggerType := 0; + end; +end; + +function PanelInShownLayer(PanelType: Word): Boolean; +begin + case PanelType of + PANEL_WALL: + Result := LayerEnabled[LAYER_WALLS]; + + PANEL_BACK: + Result := LayerEnabled[LAYER_BACK]; + + PANEL_FORE: + Result := LayerEnabled[LAYER_FOREGROUND]; + + PANEL_STEP: + Result := LayerEnabled[LAYER_STEPS]; + + PANEL_WATER, PANEL_ACID1, PANEL_ACID2, + PANEL_LIFTUP, PANEL_LIFTDOWN, PANEL_LIFTLEFT, PANEL_LIFTRIGHT, + PANEL_OPENDOOR, PANEL_CLOSEDOOR, + PANEL_BLOCKMON: + Result := LayerEnabled[LAYER_WATER]; + + else + Result := False; + end; +end; + +function ObjectInRect(fX, fY: Integer; fWidth, fHeight: Word; ObjectType: Byte; All: Boolean): DWArray; +var + a: Integer; + +begin + Result := nil; + + case ObjectType of + OBJECT_PANEL: + if gPanels <> nil then + for a := High(gPanels) downto 0 do + with gPanels[a] do + begin + if not PanelInShownLayer(gPanels[a].PanelType) then + Continue; + + if g_Collide(X, Y, Width, Height, + fX, fY, fWidth, fHeight) then + begin + SetLength(Result, Length(Result)+1); + Result[High(Result)] := a; + + if not All then + Break; + end; + end; + + OBJECT_ITEM: + if LayerEnabled[LAYER_ITEMS] and (gItems <> nil) then + for a := High(gItems) downto 0 do + with gItems[a] do + if (ItemType <> ITEM_NONE) and + g_Collide(X, Y, ItemSize[ItemType][0], ItemSize[ItemType][1], + fX, fY, fWidth, fHeight) then + begin + SetLength(Result, Length(Result)+1); + Result[High(Result)] := a; + + if not All then + Break; + end; + + OBJECT_MONSTER: + if LayerEnabled[LAYER_MONSTERS] and (gMonsters <> nil) then + for a := High(gMonsters) downto 0 do + if gMonsters[a].MonsterType <> MONSTER_NONE then + with MonsterSize[gMonsters[a].MonsterType] do + if (gMonsters[a].MonsterType <> 0) and + g_Collide(gMonsters[a].X, gMonsters[a].Y, Width, Height, + fX, fY, fWidth, fHeight) then + begin + SetLength(Result, Length(Result)+1); + Result[High(Result)] := a; + + if not All then + Break; + end; + + OBJECT_AREA: + if LayerEnabled[LAYER_AREAS] and (gAreas <> nil) then + for a := High(gAreas) downto 0 do + if gAreas[a].AreaType <> AREA_NONE then + with AreaSize[gAreas[a].AreaType] do + if (gAreas[a].AreaType <> 0) and + g_Collide(gAreas[a].X, gAreas[a].Y, Width, Height, + fX, fY, fWidth, fHeight) then + begin + SetLength(Result, Length(Result)+1); + Result[High(Result)] := a; + + if not All then + Break; + end; + + OBJECT_TRIGGER: + if LayerEnabled[LAYER_TRIGGERS] and (gTriggers <> nil) then + for a := High(gTriggers) downto 0 do + if gTriggers[a].TriggerType <> TRIGGER_NONE then + with gTriggers[a] do + begin + if (TriggerType <> 0) and + g_Collide(X, Y, Width, Height, + fX, fY, fWidth, fHeight) then + begin + SetLength(Result, Length(Result)+1); + Result[High(Result)] := a; + + if not All then + Break; + end; + end; + end; +end; + +function ObjectCollideLevel(fID: DWORD; ObjectType: Byte; dX, dY: Integer): Boolean; +var + PanelID: DWORD; + +begin + Result := False; + + case ObjectType of + OBJECT_PANEL: + with gPanels[fID] do + Result := (PanelID <> fID) and + g_CollideLevel2(X+dX, Y+dY, + Width, Height, + fID, PanelID); + + OBJECT_ITEM: + with gItems[fID] do + Result := g_CollideLevel(X+dX, Y+dY, + ItemSize[ItemType][0], ItemSize[ItemType][1]); + + OBJECT_MONSTER: + with MonsterSize[gMonsters[fID].MonsterType] do + Result := g_CollideLevel(gMonsters[fID].X+dX, gMonsters[fID].Y+dY, + Width, Height); + + OBJECT_AREA: + with AreaSize[gAreas[fID].AreaType] do + Result := g_CollideLevel(gAreas[fID].X+dX, gAreas[fID].Y+dY, + Width, Height); + + OBJECT_TRIGGER: + with gTriggers[fID] do + Result := g_CollideLevel(X+dX, Y+dY, + Width, Height); + end; +end; + +function ObjectCollide(ObjectType: Byte; ID: DWORD; fX, fY: Integer; fWidth, fHeight: Word): Boolean; +begin + Result := False; + + case ObjectType of + OBJECT_PANEL: + with gPanels[ID] do + Result := g_Collide(X, Y, Width, Height, + fX, fY, fWidth, fHeight); + + OBJECT_ITEM: + with gItems[ID] do + Result := g_Collide(X, Y, ItemSize[ItemType][0], ItemSize[ItemType][1], + fX, fY, fWidth, fHeight); + + OBJECT_MONSTER: + with MonsterSize[gMonsters[ID].MonsterType] do + Result := g_Collide(gMonsters[ID].X, gMonsters[ID].Y, Width, Height, + fX, fY, fWidth, fHeight); + + OBJECT_AREA: + with AreaSize[gAreas[ID].AreaType] do + Result := g_Collide(gAreas[ID].X, gAreas[ID].Y, Width, Height, + fX, fY, fWidth, fHeight); + + OBJECT_TRIGGER: + with gTriggers[ID] do + Result := g_Collide(X, Y, Width, Height, + fX, fY, fWidth, fHeight); + end; +end; + +function ObjectGetRect(ObjectType: Byte; ID: DWORD): TRectWH; +begin + case ObjectType of + OBJECT_PANEL: + with gPanels[ID] do + begin + Result.X := X; + Result.Y := Y; + Result.Width := Width; + Result.Height := Height; + end; + + OBJECT_ITEM: + with gItems[ID] do + begin + Result.X := X; + Result.Y := Y; + Result.Width := ItemSize[ItemType][0]; + Result.Height := ItemSize[ItemType][1]; + end; + + OBJECT_MONSTER: + with MonsterSize[gMonsters[ID].MonsterType] do + begin + Result.X := gMonsters[ID].X; + Result.Y := gMonsters[ID].Y; + Result.Width := Width; + Result.Height := Height; + end; + + OBJECT_AREA: + with AreaSize[gAreas[ID].AreaType] do + begin + Result.X := gAreas[ID].X; + Result.Y := gAreas[ID].Y; + Result.Width := Width; + Result.Height := Height; + end; + + OBJECT_TRIGGER: + with gTriggers[ID] do + begin + Result.X := X; + Result.Y := Y; + Result.Width := Width; + Result.Height := Height; + end; + + else + begin + Result.X := 0; + Result.Y := 0; + Result.Width := 0; + Result.Height := 0; + end; + end; +end; + +procedure MoveObject(ObjectType: Byte; ID: DWORD; dX, dY: Integer); +begin + case ObjectType of + OBJECT_PANEL: + with gPanels[ID] do + begin + X := X + dX; + Y := Y + dY; + end; + + OBJECT_ITEM: + with gItems[ID] do + begin + X := X + dX; + Y := Y + dY; + end; + + OBJECT_MONSTER: + with gMonsters[ID] do + begin + X := X + dX; + Y := Y + dY; + end; + + OBJECT_AREA: + with gAreas[ID] do + begin + X := X + dX; + Y := Y + dY; + end; + + OBJECT_TRIGGER: + with gTriggers[ID] do + begin + X := X + dX; + Y := Y + dY; + end; + end; +end; + +procedure ResizeObject(ObjectType: Byte; ID: DWORD; dWidth, dHeight: Integer; ResizeDir: Byte); +begin + case ObjectType of + OBJECT_PANEL: + with gPanels[ID] do + begin + if Width >= -dWidth then + Width := Width+dWidth + else + begin + Width := 0; + Exit; + end; + + if Height >= -dHeight then + Height := Height+dHeight + else + begin + Height := 0; + Exit; + end; + + case ResizeDir of + 2: Y := Y - dHeight; + 4: X := X - dWidth; + end; + end; + + OBJECT_ITEM, OBJECT_MONSTER, OBJECT_AREA: + Exit; + + OBJECT_TRIGGER: + with gTriggers[ID] do + begin + if Width >= -dWidth then + Width := Width+dWidth + else + begin + Width := 0; + Exit; + end; + + if Height >= -dHeight then + Height := Height+dHeight + else + begin + Height := 0; + Exit; + end; + + case ResizeDir of + 2: Y := Y - dHeight; + 4: X := X - dWidth; + end; + end; + end; +end; + +function ObjectSelected(ObjectType: Byte; ID: DWORD): Boolean; +var + a: Integer; + +begin + Result := False; + + if SelectedObjects <> nil then + for a := 0 to High(SelectedObjects) do + if SelectedObjects[a].Live and + (SelectedObjects[a].ObjectType = ObjectType) and + (SelectedObjects[a].ID = ID) then + begin + Result := True; + Break; + end; +end; + +function GetPanelName(PanelType: Word): String; +begin + Result := ''; + + case PanelType of + PANEL_WALL: Result := PANELNAMES[0]; + PANEL_BACK: Result := PANELNAMES[1]; + PANEL_FORE: Result := PANELNAMES[2]; + PANEL_OPENDOOR: Result := PANELNAMES[3]; + PANEL_CLOSEDOOR: Result := PANELNAMES[4]; + PANEL_STEP: Result := PANELNAMES[5]; + PANEL_WATER: Result := PANELNAMES[6]; + PANEL_ACID1: Result := PANELNAMES[7]; + PANEL_ACID2: Result := PANELNAMES[8]; + PANEL_LIFTUP: Result := PANELNAMES[9]; + PANEL_LIFTDOWN: Result := PANELNAMES[10]; + PANEL_LIFTLEFT: Result := PANELNAMES[11]; + PANEL_LIFTRIGHT: Result := PANELNAMES[12]; + PANEL_BLOCKMON: Result := PANELNAMES[13]; + else Assert(False); + end; +end; + +function GetPanelType(PanelName: String): Word; +begin + Result := 0; + + if PanelName = PANELNAMES[0] then + Result := PANEL_WALL + else if PanelName = PANELNAMES[1] then + Result := PANEL_BACK + else if PanelName = PANELNAMES[2] then + Result := PANEL_FORE + else if PanelName = PANELNAMES[3] then + Result := PANEL_OPENDOOR + else if PanelName = PANELNAMES[4] then + Result := PANEL_CLOSEDOOR + else if PanelName = PANELNAMES[5] then + Result := PANEL_STEP + else if PanelName = PANELNAMES[6] then + Result := PANEL_WATER + else if PanelName = PANELNAMES[7] then + Result := PANEL_ACID1 + else if PanelName = PANELNAMES[8] then + Result := PANEL_ACID2 + else if PanelName = PANELNAMES[9] then + Result := PANEL_LIFTUP + else if PanelName = PANELNAMES[10] then + Result := PANEL_LIFTDOWN + else if PanelName = PANELNAMES[11] then + Result := PANEL_LIFTLEFT + else if PanelName = PANELNAMES[12] then + Result := PANEL_LIFTRIGHT + else if PanelName = PANELNAMES[13] then + Result := PANEL_BLOCKMON; + + Assert(Result <> 0); +end; + +function GetTriggerName(TriggerType: Byte): String; +begin + if TriggerType in [TRIGGER_EXIT..TRIGGER_MAX] then + Result := TriggerNames[TriggerType] + else + Assert(False); +end; + +function GetTriggerType(TriggerName: String): Byte; +var + i: Integer; + +begin + Result := TRIGGER_NONE; + for i := TRIGGER_EXIT to TRIGGER_MAX do + if TriggerNames[i] = TriggerName then + begin + Result := i; + Exit; + end; + + Assert(False); +end; + +function IsSpecialTexture(TextureName: string): Boolean; +begin + Result := (TextureName = TEXTURE_NAME_WATER) or + (TextureName = TEXTURE_NAME_ACID1) or + (TextureName = TEXTURE_NAME_ACID2); +end; + +function SpecialTextureID(TextureName: string): DWORD; +begin + Assert(IsSpecialTexture(TextureName)); + + Result := 0; + + if TextureName = TEXTURE_NAME_WATER then + Result := TEXTURE_SPECIAL_WATER + else + if TextureName = TEXTURE_NAME_ACID1 then + Result := TEXTURE_SPECIAL_ACID1 + else + if TextureName = TEXTURE_NAME_ACID2 then + Result := TEXTURE_SPECIAL_ACID2; +end; + +function SaveMap(Res: String): Pointer; +var + WAD: TWADEditor_1; + MapWriter: TMapWriter_1; + textures: TTexturesRec1Array; + panels: TPanelsRec1Array; + items: TItemsRec1Array; + areas: TAreasRec1Array; + monsters: TMonsterRec1Array; + triggers: TTriggersRec1Array; + header: TMapHeaderRec_1; + a, b, c: Integer; + s: String; + PanelTable: Array of Array [0..1] of Word; + MonsterTable: Array of Array [0..1] of Word; + Data: Pointer; + FileName, SectionName, ResName: String; + Len: LongWord; + +begin + WAD := nil; + +// Открываем WAD, если надо: + if Res <> '' then + begin + WAD := TWADEditor_1.Create(); + g_ProcessResourceStr(Res, FileName, SectionName, ResName); + if not WAD.ReadFile(FileName) then + WAD.FreeWAD(); + + WAD.CreateImage(); + end; + + MapWriter := TMapWriter_1.Create(); + +// Сохраняем заголовок: + with header do + begin + ZeroMemory(@header, SizeOf(TMapHeaderRec_1)); + + if gMapInfo.Name <> '' then + CopyMemory(@MapName[0], @gMapInfo.Name[1], Min(32, Length(gMapInfo.Name))); + + if gMapInfo.Description <> '' then + CopyMemory(@MapDescription[0], @gMapInfo.Description[1], Min(256, Length(gMapInfo.Description))); + + if gMapInfo.Author <> '' then + CopyMemory(@MapAuthor[0], @gMapInfo.Author[1], Min(32, Length(gMapInfo.Author))); + + if gMapInfo.MusicName <> '' then + CopyMemory(@MusicName[0], @gMapInfo.MusicName[1], Min(64, Length(gMapInfo.MusicName))); + + if gMapInfo.SkyName <> '' then + CopyMemory(@SkyName[0], @gMapInfo.SkyName[1], Min(64, Length(gMapInfo.SkyName))); + + Width := gMapInfo.Width; + Height := gMapInfo.Height; + end; + + MapWriter.AddHeader(header); + +// Сохраняем названия текстур: + if MainForm.lbTextureList.Items.Count > 0 then + begin + for a := 0 to MainForm.lbTextureList.Items.Count-1 do + begin + SetLength(textures, Length(textures)+1); + s := MainForm.lbTextureList.Items[a]; + CopyMemory(@textures[High(textures)].Resource[0], @s[1], Min(64, Length(s))); + if g_GetTextureFlagByName(s) = 1 then + textures[High(textures)].Anim := 1 + else + textures[High(textures)].Anim := 0; + end; + + MapWriter.AddTextures(textures); + end; + +// Сохраняем панели: + if gPanels <> nil then + begin + c := 0; + + for a := 0 to High(gPanels) do + if gPanels[a].PanelType <> 0 then + begin + SetLength(PanelTable, Length(PanelTable)+1); + PanelTable[High(PanelTable)][0] := a; + PanelTable[High(PanelTable)][1] := c; + c := c + 1; + + SetLength(panels, Length(panels)+1); + + with panels[High(panels)] do + begin + X := gPanels[a].X; + Y := gPanels[a].Y; + Width := gPanels[a].Width; + Height := gPanels[a].Height; + PanelType := gPanels[a].PanelType; + Alpha := gPanels[a].Alpha; + + TextureNum := 0; + Flags := 0; + + if WordBool(gPanels[a].PanelType and + (PANEL_WATER or PANEL_ACID1 or PANEL_ACID2)) then + Flags := PANEL_FLAG_WATERTEXTURES; + + // Может быть текстура: + if not WordBool(gPanels[a].PanelType and + (PANEL_LIFTUP or PANEL_LIFTDOWN or PANEL_LIFTLEFT or PANEL_LIFTRIGHT or PANEL_BLOCKMON)) then + begin + if gPanels[a].Blending then + Flags := Flags or PANEL_FLAG_BLENDING; + if gPanels[a].TextureID = TEXTURE_SPECIAL_NONE then + Flags := Flags or PANEL_FLAG_HIDE; + + // Номер текстуры в списке текстур: + if gPanels[a].TextureID <> TEXTURE_SPECIAL_NONE then + for b := 0 to High(textures) do + if gPanels[a].TextureName = textures[b].Resource then + begin + TextureNum := b; + Break; + end; + end; + end; + end; + + MapWriter.AddPanels(panels); + end; + +// Сохраняем предметы: + if gItems <> nil then + begin + for a := 0 to High(gItems) do + if gItems[a].ItemType <> 0 then + begin + SetLength(items, Length(items)+1); + + with items[High(items)] do + begin + X := gItems[a].X; + Y := gItems[a].Y; + ItemType := gItems[a].ItemType; + if gItems[a].OnlyDM then + Options := Options or ITEM_OPTION_ONLYDM; + if gItems[a].Fall then + Options := Options or ITEM_OPTION_FALL; + end; + end; + + MapWriter.AddItems(items); + end; + +// Сохраняем монстров: + if gMonsters <> nil then + begin + c := 0; + + for a := 0 to High(gMonsters) do + if gMonsters[a].MonsterType <> 0 then + begin + SetLength(MonsterTable, Length(MonsterTable)+1); + MonsterTable[High(MonsterTable)][0] := a; + MonsterTable[High(MonsterTable)][1] := c; + c := c + 1; + + SetLength(monsters, Length(monsters)+1); + + with monsters[High(monsters)] do + begin + X := gMonsters[a].X; + Y := gMonsters[a].Y; + MonsterType := gMonsters[a].MonsterType; + Direction := Ord(gMonsters[a].Direction); + end; + end; + + MapWriter.AddMonsters(monsters); + end; + +// Сохраняем области: + if gAreas <> nil then + begin + for a := 0 to High(gAreas) do + if gAreas[a].AreaType <> 0 then + begin + SetLength(areas, Length(areas)+1); + + with areas[High(areas)] do + begin + X := gAreas[a].X; + Y := gAreas[a].Y; + AreaType := gAreas[a].AreaType; + Direction := Ord(gAreas[a].Direction); + end; + end; + + MapWriter.AddAreas(areas); + end; + +// Сохраняем триггеры: + if gTriggers <> nil then + begin + for a := 0 to High(gTriggers) do + if gTriggers[a].TriggerType <> 0 then + begin + SetLength(triggers, Length(triggers)+1); + + with triggers[High(triggers)] do + begin + X := gTriggers[a].X; + Y := gTriggers[a].Y; + Width := gTriggers[a].Width; + Height := gTriggers[a].Height; + Enabled := Byte(gTriggers[a].Enabled); + TexturePanel := -1; + TriggerType := gTriggers[a].TriggerType; + ActivateType := gTriggers[a].ActivateType; + Keys := gTriggers[a].Key; + DATA := gTriggers[a].Data.Default; + + if PanelTable <> nil then + begin + // Ищем номер панели, которой этот триггер меняет текстуру: + if gTriggers[a].TexturePanel <> -1 then + begin + for c := 0 to High(PanelTable) do + if PanelTable[c][0] = gTriggers[a].TexturePanel then + TexturePanel := PanelTable[c][1]; + end; + + // Ищем номер панели, которую меняет этот триггер: + if gTriggers[a].TriggerType in [ + TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, TRIGGER_DOOR, + TRIGGER_DOOR5, TRIGGER_CLOSETRAP, TRIGGER_TRAP, + TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, TRIGGER_LIFT] then + if TTriggerData(DATA).PanelID <> -1 then + for c := 0 to High(PanelTable) do + if PanelTable[c][0] = TTriggerData(DATA).PanelID then + begin + TTriggerData(DATA).PanelID := PanelTable[c][1]; + Break; + end; + + // Ищем номер панели индикации, которой этот триггер меняет текстуру: + if (gTriggers[a].TriggerType = TRIGGER_SHOT) and + (TTriggerData(DATA).ShotPanelID <> -1) then + begin + for c := 0 to High(PanelTable) do + if PanelTable[c][0] = TTriggerData(DATA).ShotPanelID then + TTriggerData(DATA).ShotPanelID := PanelTable[c][1]; + end; + end; + + if MonsterTable <> nil then + begin + // Ищем номер монстра - условие активации триггера: + if gTriggers[a].TriggerType in [ + TRIGGER_PRESS, TRIGGER_ON, + TRIGGER_OFF, TRIGGER_ONOFF] then + if TTriggerData(DATA).MonsterID <> 0 then + for c := 0 to High(MonsterTable) do + if MonsterTable[c][0] = TTriggerData(DATA).MonsterID-1 then + begin + TTriggerData(DATA).MonsterID := MonsterTable[c][1]+1; + Break; + end; + end; + end; + end; + + MapWriter.AddTriggers(triggers); + end; + +// Сохраняем карту в память: + Len := MapWriter.SaveMap(Data); + + MapWriter.Free(); + +// Записываем в WAD, если надо: + if Res <> '' then + begin + WAD.RemoveResource('', ResName); + WAD.AddResource(Data, Len, ResName, ''); + WAD.SaveTo(FileName); + + FreeMem(Data); + WAD.Free(); + + Result := nil; + end + else + Result := Data; +end; + +procedure AddTexture(res: String; Error: Boolean); +var + a: Integer; +begin + with MainForm.lbTextureList do + begin + for a := 0 to Count-1 do + if Items[a] = res then + Exit; + + if Error and (slInvalidTextures.IndexOf(res) = -1) then + slInvalidTextures.Add(res); + Items.Add(res); + end; +end; + +function LoadMap(Res: String): Boolean; +var + WAD: TWADEditor_1; + MapReader: TMapReader_1; + Header: TMapHeaderRec_1; + textures: TTexturesRec1Array; + panels: TPanelsRec1Array; + items: TItemsRec1Array; + monsters: TMonsterRec1Array; + areas: TAreasRec1Array; + triggers: TTriggersRec1Array; + panel: TPanel; + item: TItem; + monster: TMonster; + area: TArea; + trigger: TTrigger; + a: Integer; + Data: Pointer; + Width, Height, m: Word; + FileName, SectionName, ResName, _fn: String; + TextureRes: String; + pData: Pointer; + Len: Integer; + Error: Boolean; + NoTextureID: DWORD; + NW, NH: Word; +begin + Result := False; + + MainForm.pbLoad.Position := 0; + MainForm.lLoad.Caption := _lc[I_LOAD_WAD]; + Application.ProcessMessages(); + +// Открываем WAD: + WAD := TWADEditor_1.Create(); + g_ProcessResourceStr(Res, FileName, SectionName, ResName); + + if not WAD.ReadFile(FileName) then + begin + WAD.Free(); + Exit; + end; + +// Читаем ресурс карты: + if not WAD.GetResource('', ResName, pData, Len) then + begin + WAD.Free(); + Exit; + end; + + WAD.Free(); + + MapReader := TMapReader_1.Create(); + + MainForm.lLoad.Caption := _lc[I_LOAD_MAP]; + Application.ProcessMessages(); + + MapReader.LoadMap(pData); + +// Загружаем текстуры: + textures := MapReader.GetTextures(); + + if textures <> nil then + begin + MainForm.pbLoad.Position := 0; + MainForm.pbLoad.Max := Length(textures); + MainForm.lLoad.Caption := _lc[I_LOAD_TEXTURES]; + + for a := 0 to High(textures) do + begin + MainForm.pbLoad.StepIt(); + Application.ProcessMessages(); + + if IsSpecialTexture(textures[a].Resource) then + begin + AddTexture(textures[a].Resource, False); + Continue; + end; + + g_ProcessResourceStr(textures[a].Resource, @_fn, nil, nil); + + if _fn = '' then + TextureRes := FileName + textures[a].Resource + else + TextureRes := EditorDir+'wads\'+textures[a].Resource; + + Error := False; + + if not ByteBool(textures[a].Anim) then + begin // Обычная текстура + if not g_CreateTextureWAD(textures[a].Resource, TextureRes) then + begin + e_WriteLog(Format('g_CreateTextureWAD() error, res=%s', + [textures[a].Resource]), MSG_WARNING); + Error := True; + end; + + AddTexture(textures[a].Resource, Error); + end + else // Anim + begin // Анимированная текстура + if not GetFrame(TextureRes, Data, Width, Height) then + begin // Кадры + e_WriteLog(Format('GetFrame() error, res=%s', + [textures[a].Resource]), MSG_WARNING); + Error := True; + end; + + if not g_CreateTextureMemorySize(Data, textures[a].Resource, 0, 0, Width, Height, 1) then + begin // Сама текстура + e_WriteLog(Format('g_CreateTextureMemorySize() error, res=%s', + [textures[a].Resource]), MSG_WARNING); + Error := True; + end; + + AddTexture(textures[a].Resource, Error); + end; + end; + end; + +// Загружаем панели: + panels := MapReader.GetPanels(); + + if panels <> nil then + begin + MainForm.pbLoad.Position := 0; + MainForm.pbLoad.Max := Length(panels); + MainForm.lLoad.Caption := _lc[I_LOAD_PANELS]; + + for a := 0 to High(panels) do + begin + MainForm.pbLoad.StepIt(); + Application.ProcessMessages(); + + panel.X := panels[a].X; + panel.Y := panels[a].Y; + panel.Height := panels[a].Height; + panel.Width := panels[a].Width; + panel.PanelType := panels[a].PanelType; + panel.Alpha := panels[a].Alpha; + + panel.Blending := ByteBool(panels[a].Flags and PANEL_FLAG_BLENDING); + + panel.TextureWidth := 0; + panel.TextureHeight := 0; + panel.TextureName := ''; + panel.TextureID := TEXTURE_SPECIAL_NONE; + + m := PANEL_WALL or PANEL_BACK or PANEL_FORE or PANEL_STEP or + PANEL_OPENDOOR or PANEL_CLOSEDOOR; + + if ByteBool(panels[a].Flags and PANEL_FLAG_WATERTEXTURES) then + m := m or PANEL_WATER or PANEL_ACID1 or PANEL_ACID2; + + // Если панель видима: + if WordBool(panel.PanelType and m) and + (not (ByteBool(panels[a].Flags and PANEL_FLAG_HIDE))) then + begin + if not IsSpecialTexture(textures[panels[a].TextureNum].Resource) then + begin // Текстура + if g_GetTexture(textures[panels[a].TextureNum].Resource, panel.TextureID) then + g_GetTextureSizeByID(panel.TextureID, panel.TextureWidth, panel.TextureHeight) + else begin + panel.TextureWidth := 1; + panel.TextureHeight := 1; + if g_GetTexture('NOTEXTURE', NoTextureID) then + begin + panel.TextureID := TEXTURE_SPECIAL_NOTEXTURE; + g_GetTextureSizeByID(NoTextureID, NW, NH); + panel.TextureWidth := NW; + panel.TextureHeight := NH; + end; + end; + end + else // Спец. текстура + panel.TextureID := SpecialTextureID(textures[panels[a].TextureNum].Resource); + + panel.TextureName := textures[panels[a].TextureNum].Resource; + end; + + // Жидкость без текстуры: + if WordBool(panel.PanelType and (PANEL_WATER or PANEL_ACID1 or PANEL_ACID2)) and + (not ByteBool(panels[a].Flags and PANEL_FLAG_WATERTEXTURES)) then + begin + case panel.PanelType of + PANEL_WATER: panel.TextureName := TEXTURE_NAME_WATER; + PANEL_ACID1: panel.TextureName := TEXTURE_NAME_ACID1; + PANEL_ACID2: panel.TextureName := TEXTURE_NAME_ACID2; + end; + + panel.TextureID := SpecialTextureID(panel.TextureName); + AddTexture(panel.TextureName, False); + end; + + AddPanel(panel); + end; + end; + +// Загружаем предметы: + items := MapReader.GetItems(); + + if items <> nil then + begin + MainForm.pbLoad.Position := 0; + MainForm.pbLoad.Max := Length(items); + MainForm.lLoad.Caption := _lc[I_LOAD_ITEMS]; + + for a := 0 to High(items) do + begin + MainForm.pbLoad.StepIt(); + Application.ProcessMessages(); + + item.X := items[a].X; + item.Y := items[a].Y; + item.ItemType := items[a].ItemType; + item.OnlyDM := ByteBool(items[a].Options and ITEM_OPTION_ONLYDM); + item.Fall := ByteBool(items[a].Options and ITEM_OPTION_FALL); + + AddItem(item); + end; + end; + +// Загружаем монстров: + monsters := MapReader.GetMonsters(); + + if monsters <> nil then + begin + MainForm.pbLoad.Position := 0; + MainForm.pbLoad.Max := Length(monsters); + MainForm.lLoad.Caption := _lc[I_LOAD_MONSTERS]; + + for a := 0 to High(monsters) do + begin + MainForm.pbLoad.StepIt(); + Application.ProcessMessages(); + + monster.X := monsters[a].X; + monster.Y := monsters[a].Y; + monster.MonsterType := monsters[a].MonsterType; + monster.Direction := TDirection(monsters[a].Direction); + + AddMonster(monster); + end; + end; + +// Загружаем области: + areas := MapReader.GetAreas(); + + if areas <> nil then + begin + MainForm.pbLoad.Position := 0; + MainForm.pbLoad.Max := Length(areas); + MainForm.lLoad.Caption := _lc[I_LOAD_AREAS]; + + for a := 0 to High(areas) do + begin + MainForm.pbLoad.StepIt(); + Application.ProcessMessages(); + + area.X := areas[a].X; + area.Y := areas[a].Y; + area.AreaType := areas[a].AreaType; + area.Direction := TDirection(areas[a].Direction); + + AddArea(area); + end; + end; + +// Загружаем триггеры: + triggers := MapReader.GetTriggers(); + + if triggers <> nil then + begin + MainForm.pbLoad.Position := 0; + MainForm.pbLoad.Max := Length(triggers); + MainForm.lLoad.Caption := _lc[I_LOAD_TRIGGERS]; + + for a := 0 to High(triggers) do + begin + MainForm.pbLoad.StepIt(); + Application.ProcessMessages(); + + trigger.X := triggers[a].X; + trigger.Y := triggers[a].Y; + trigger.Width := triggers[a].Width; + trigger.Height := triggers[a].Height; + + trigger.Enabled := ByteBool(triggers[a].Enabled); + trigger.TexturePanel := triggers[a].TexturePanel; + trigger.TriggerType := triggers[a].TriggerType; + trigger.ActivateType := triggers[a].ActivateType; + trigger.Key := triggers[a].Keys; + trigger.Data.Default := triggers[a].DATA; + + AddTrigger(trigger); + end; + end; + +// Загружаем заголовок карты: + Header := MapReader.GetMapHeader(); + + gMapInfo.FileName := FileName; + + with gMapInfo do + begin + MapName := ResName; + Name := Header.MapName; + Description := Header.MapDescription; + Author := Header.MapAuthor; + MusicName := Header.MusicName; + SkyName := Header.SkyName; + Height := Header.Height; + Width := Header.Width; + end; + + LoadSky(gMapInfo.SkyName); + + textures := nil; + panels := nil; + items := nil; + areas := nil; + triggers := nil; + + MapReader.Free(); + FreeMem(pData); + + Result := True; +end; + +function LoadMapOld(_FileName: String): Boolean; +const + TexturePrefix = 'Standart.wad:STDTEXTURES\'; + DefaultMusRes = 'Standart.wad:STDMUS\MUS1'; + DefaultSkyRes = 'Standart.wad:STDSKY\SKY0'; + +var + map: TConfig; + i, a: Integer; + s, section: String; + panel: TPanel; + item: TItem; + area: TArea; + +begin + Result := False; + + if not FileExists(_FileName) then + Exit; + +// Открытие карты: + MainForm.pbLoad.Position := 0; + MainForm.lLoad.Caption := _lc[I_LOAD_MAP];; + Application.ProcessMessages(); + + map := TConfig.CreateFile(_FileName); + +// Чтение текстур: + i := map.ReadInt('MapOptions', 'TextureCount', 0); + + MainForm.pbLoad.Max := i; + MainForm.pbLoad.Position := 0; + MainForm.lLoad.Caption := _lc[I_LOAD_TEXTURES]; + + for a := 1 to i do + begin + MainForm.pbLoad.StepIt(); + Application.ProcessMessages(); + + s := TexturePrefix + UpperCase(map.ReadStr('Textures', 'TextureName'+IntToStr(a), '')); + if s = TexturePrefix then + Continue; + + // Нет такой текстуры - ищем в WAD карты: + if not g_CreateTextureWAD(s, EditorDir+'\wads\'+s) then + begin + s := ExtractFileName(_FileName); + Delete(s, Length(s)-3, 4); + s := UpperCase(s) + '.WAD:TEXTURES\'+ UpperCase(map.ReadStr('Textures', 'TextureName'+IntToStr(a), '')); + + if not g_CreateTextureWAD(s, EditorDir+'\wads\'+s) then + Continue; + end; + + MainForm.lbTextureList.Items.Add(s); + end; + +// Чтение панелей: + i := map.ReadInt('MapOptions', 'PanelCount', 0); + + MainForm.pbLoad.Max := i; + MainForm.pbLoad.Position := 0; + MainForm.lLoad.Caption := _lc[I_LOAD_PANELS]; + + for a := 1 to i do + begin + MainForm.pbLoad.StepIt(); + Application.ProcessMessages(); + + section := 'Panel' + IntToStr(a); + if not map.SectionExists(section) then + Continue; + + panel.X := map.ReadInt(section, 'X1', 0); + panel.Y := map.ReadInt(section, 'Y1', 0); + panel.Height := map.ReadInt(section, 'Height', 16); + panel.Width := map.ReadInt(section, 'Width', 16); + + case map.ReadInt(section, 'PanelType', 0) of + 0: panel.PanelType := PANEL_WALL; + 1: panel.PanelType := PANEL_BACK; + 2: panel.PanelType := PANEL_FORE; + 3: panel.PanelType := PANEL_STEP; + 4: panel.PanelType := PANEL_WATER; + 5: panel.PanelType := PANEL_ACID1; + 6: panel.PanelType := PANEL_ACID2; + end; + + panel.Alpha := map.ReadInt(section, 'Alpha', 0); + + // Текстура панели: + if panel.PanelType in [PANEL_WALL, PANEL_BACK, PANEL_FORE, PANEL_STEP] then + begin + s := TexturePrefix + UpperCase(map.ReadStr(section, 'TextureName', '')); + + if g_GetTexture(s, panel.TextureID) then + begin + g_GetTextureSizeByID(panel.TextureID, panel.TextureWidth, panel.TextureHeight); + panel.TextureName := s; + end + else // Нет такой текстуры - ищем в WAD карты: + begin + s := ExtractFileName(_FileName); + Delete(s, Length(s)-3, 4); + s := UpperCase(s) + '.WAD:TEXTURES\' + UpperCase(map.ReadStr(section, 'TextureName', '')); + + if g_GetTexture(s, panel.TextureID) then + begin + g_GetTextureSizeByID(panel.TextureID, panel.TextureWidth, panel.TextureHeight); + panel.TextureName := s; + end + else + Continue; + end; + end + else if panel.PanelType in [PANEL_WATER, PANEL_ACID1, PANEL_ACID2] then + begin + case panel.PanelType of + PANEL_WATER: + begin + s := TEXTURE_NAME_WATER; + panel.TextureID := TEXTURE_SPECIAL_WATER; + end; + PANEL_ACID1: + begin + s := TEXTURE_NAME_ACID2; + panel.TextureID := TEXTURE_SPECIAL_ACID2; + end; + PANEL_ACID2: + begin + s := TEXTURE_NAME_ACID1; + panel.TextureID := TEXTURE_SPECIAL_ACID1; + end; + end; + + with MainForm.lbTextureList.Items do + if IndexOf(s) = -1 then + Add(s); + panel.TextureName := s; + panel.TextureWidth := 1; + panel.TextureHeight := 1; + end; + + AddPanel(panel); + end; + +// Чтение предметов: + i := map.ReadInt('MapOptions', 'ItemCount', 0); + + MainForm.pbLoad.Max := i; + MainForm.pbLoad.Position := 0; + MainForm.lLoad.Caption := _lc[I_LOAD_ITEMS]; + + for a := 1 to i do + begin + MainForm.pbLoad.StepIt(); + Application.ProcessMessages(); + + section := 'Item' + IntToStr(a); + if not map.SectionExists(section) then + Continue; + + item.X := map.ReadInt(section, 'X', 0); + item.Y := map.ReadInt(section, 'Y', 0); + item.ItemType := ITEMSCONVERT[map.ReadInt(section, 'Type', 0)]; + item.OnlyDM := False; + item.Fall := item.ItemType in [ITEM_KEY_RED, ITEM_KEY_GREEN, ITEM_KEY_BLUE]; + + // Размер предметов теперь другой: + item.X := item.X + OldItemSize[item.ItemType][0] - ItemSize[item.ItemType][0]; + item.Y := item.Y + OldItemSize[item.ItemType][1] - ItemSize[item.ItemType][1]; + + AddItem(item); + end; + +// Чтение областей: + i := map.ReadInt('MapOptions', 'AreaCount', 0); + + MainForm.pbLoad.Max := i; + MainForm.pbLoad.Position := 0; + MainForm.lLoad.Caption := _lc[I_LOAD_AREAS]; + + for a := 1 to i do + begin + MainForm.pbLoad.StepIt(); + Application.ProcessMessages(); + + section := 'Area' + IntToStr(a); + if not map.SectionExists(section) then + Continue; + + area.X := map.ReadInt(section, 'X', 0); + area.Y := map.ReadInt(section, 'Y', 0); + area.AreaType := map.ReadInt(section, 'Type', 0); + area.Direction := D_RIGHT; + + // Размер областей теперь другой: + area.X := area.X + OldAreaSize[0] - AreaSize[area.AreaType].Width; + area.Y := area.Y + OldAreaSize[1] - AreaSize[area.AreaType].Height; + + AddArea(area); + end; + +// Чтение параметров карты: + with gMapInfo do + begin + Name := map.ReadStr('MapOptions', 'MapName', ''); + Description := map.ReadStr('MapOptions', 'MapDescription', ''); + Author := ''; + MusicName := DefaultMusRes; + SkyName := DefaultSkyRes; + FileName := _FileName; + Height := map.ReadInt('MapOptions', 'Height', 1600); + Width := map.ReadInt('MapOptions', 'Width', 1600); + + if Length(Name) > 32 then + SetLength(Name, 32); + if Length(Description) > 256 then + SetLength(Description, 256); + end; + + map.Free(); + + Result := True; +end; + +procedure ClearMap(); +var + a: Integer; + +begin + if gPanels <> nil then + for a := 0 to High(gPanels) do + if gPanels[a].TextureName <> '' then + g_DeleteTexture(gPanels[a].TextureName); + + SetLength(gPanels, 0); + gPanels := nil; + SetLength(gItems, 0); + gItems := nil; + SetLength(gAreas, 0); + gAreas := nil; + SetLength(gMonsters, 0); + gMonsters := nil; + SetLength(gTriggers, 0); + gTriggers := nil; + + with gMapInfo do + begin + Name := ''; + Description := ''; + Author := ''; + MusicName := ''; + SkyName := ''; + FileName := ''; + Height := 1600; + Width := 1600; + end; + + with MainForm.lbTextureList do + begin + if Items.Count > 0 then + for a := Items.Count-1 downto 0 do + if not IsSpecialTexture(Items[a]) then + g_DeleteTexture(Items[a]); + + Clear(); + end; + + MapOffset.X := 0; + MapOffset.Y := 0; +end; + +procedure DrawPanels(fPanelType: Word); + + procedure DrawTexture(a: Integer); + var + NoTextureID: DWORD; + NW, NH: Word; + begin + with gPanels[a] do + begin + case TextureID of + TEXTURE_SPECIAL_NONE: + if not PreviewMode then + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 64, 64, 64, 127); + + TEXTURE_SPECIAL_NOTEXTURE: + if g_GetTexture('NOTEXTURE', NoTextureID) then + begin + g_GetTextureSizeByID(NoTextureID, NW, NH); + e_DrawFill(NoTextureID, X+MapOffset.X, Y+MapOffset.Y, + Width div NW, Height div NH, 0, False, False); + end; + + TEXTURE_SPECIAL_WATER: + if PreviewMode then + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 0, 0, 255, 0, B_FILTER) + else + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 0, 0, 255, 127); + + TEXTURE_SPECIAL_ACID1: + if PreviewMode then + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 0, 127, 0, 0, B_FILTER) + else + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 0, 255, 0, 127); + + TEXTURE_SPECIAL_ACID2: + if PreviewMode then + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 127, 0, 0, 0, B_FILTER) + else + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 255, 0, 0, 127); + + else + e_DrawFill(TextureID, X+MapOffset.X, Y+MapOffset.Y, + Width div TextureWidth, Height div TextureHeight, + Alpha, True, Blending); + end; + end; + end; + +var + a: Integer; +begin + if gPanels <> nil then + for a := 0 to High(gPanels) do + if (gPanels[a].PanelType <> 0) and + WordBool(gPanels[a].PanelType and fPanelType) then + with gPanels[a] do + begin + if (TextureID < TEXTURE_SPECIAL_NOTEXTURE) and (TextureWidth = 0) and (TextureWidth = 0) then + TextureID := TEXTURE_SPECIAL_NOTEXTURE; + case PanelType of + PANEL_WALL, PANEL_BACK, PANEL_FORE, + PANEL_STEP, PANEL_OPENDOOR, PANEL_CLOSEDOOR, + PANEL_WATER, PANEL_ACID1, PANEL_ACID2: + DrawTexture(a); + + PANEL_LIFTUP: + if not PreviewMode then + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 128, 64, 0, 0); + PANEL_LIFTDOWN: + if not PreviewMode then + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 90, 154, 138, 0); + PANEL_LIFTLEFT: + if not PreviewMode then + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 200, 80, 4, 0); + PANEL_LIFTRIGHT: + if not PreviewMode then + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 252, 140, 56, 0); + PANEL_BLOCKMON: + if not PreviewMode then + e_DrawFillQuad(X+MapOffset.X, Y+MapOffset.Y, + X+MapOffset.X+Width-1, Y+MapOffset.Y+Height-1, + 192, 0, 192, 0); + end; + end; +end; + +procedure DrawMap(); +var + a, w, h: Integer; + ID: DWORD; + xx, yy, dx, dy: Integer; + ww, hh: Word; + sel: Boolean; + r: TRectWH; + +begin +// В режиме Превью рисуем небо: + if PreviewMode then + begin + w := Max(MainForm.RenderPanel.Width, MainForm.RenderPanel.Height); + if MainForm.RenderPanel.Height > MainForm.RenderPanel.Width*3/4 then + w := Round(w*4/3); + h := Round(w*3/4); + + if g_GetTexture(SKY_TEXTURE, ID) then + e_DrawSize(ID, 0, 0, 0, False, False, w, h) + else + e_DrawFillQuad(0, 0, w-1, h-1, 0, 0, 0, 0, B_NONE); + end; + +// Рисуем панели (если Превью или если включен слой): + if LayerEnabled[LAYER_BACK] or PreviewMode then + DrawPanels(PANEL_BACK); + if PreviewMode then + DrawPanels(PANEL_LIFTUP or PANEL_LIFTDOWN or PANEL_LIFTLEFT or PANEL_LIFTRIGHT) + else + if LayerEnabled[LAYER_WATER] then + DrawPanels(PANEL_LIFTUP or PANEL_LIFTDOWN or PANEL_LIFTLEFT or PANEL_LIFTRIGHT or + PANEL_OPENDOOR or PANEL_CLOSEDOOR or PANEL_BLOCKMON); + if LayerEnabled[LAYER_WALLS] or PreviewMode then + DrawPanels(PANEL_WALL); + if LayerEnabled[LAYER_STEPS] or PreviewMode then + DrawPanels(PANEL_STEP); + +// Рисуем предметы: + if (LayerEnabled[LAYER_ITEMS] or PreviewMode) and + (gItems <> nil) then + for a := 0 to High(gItems) do + if gItems[a].ItemType <> ITEM_NONE then + with gItems[a] do + begin + ID := DWORD(-1); + + case ItemType of + 0: Continue; + ITEM_MEDKIT_SMALL: g_GetTexture('ITEM_MEDKIT_SMALL', ID); + ITEM_MEDKIT_LARGE: g_GetTexture('ITEM_MEDKIT_LARGE', ID); + ITEM_MEDKIT_BLACK: g_GetTexture('ITEM_MEDKIT_BLACK', ID); + ITEM_ARMOR_GREEN: g_GetTexture('ITEM_ARMORGREEN', ID); + ITEM_ARMOR_BLUE: g_GetTexture('ITEM_ARMORBLUE', ID); + ITEM_SPHERE_BLUE: g_GetTexture('ITEM_BLUESPHERE', ID); + ITEM_SPHERE_WHITE: g_GetTexture('ITEM_WHITESPHERE', ID); + ITEM_SUIT: g_GetTexture('ITEM_SUIT', ID); + ITEM_OXYGEN: g_GetTexture('ITEM_OXYGEN', ID); + ITEM_INVUL: g_GetTexture('ITEM_INVUL', ID); + ITEM_WEAPON_SAW: g_GetTexture('ITEM_WEAPON_SAW', ID); + ITEM_WEAPON_SHOTGUN1: g_GetTexture('ITEM_WEAPON_SHOTGUN1', ID); + ITEM_WEAPON_SHOTGUN2: g_GetTexture('ITEM_WEAPON_SHOTGUN2', ID); + ITEM_WEAPON_CHAINGUN: g_GetTexture('ITEM_WEAPON_CHAINGUN', ID); + ITEM_WEAPON_ROCKETLAUNCHER: g_GetTexture('ITEM_WEAPON_ROCKETLAUNCHER', ID); + ITEM_WEAPON_PLASMA: g_GetTexture('ITEM_WEAPON_PLASMA', ID); + ITEM_WEAPON_BFG: g_GetTexture('ITEM_WEAPON_BFG', ID); + ITEM_WEAPON_SUPERPULEMET: g_GetTexture('ITEM_WEAPON_SUPERPULEMET', ID); + ITEM_AMMO_BULLETS: g_GetTexture('ITEM_AMMO_BULLETS', ID); + ITEM_AMMO_BULLETS_BOX: g_GetTexture('ITEM_AMMO_BULLETS_BOX', ID); + ITEM_AMMO_SHELLS: g_GetTexture('ITEM_AMMO_SHELLS', ID); + ITEM_AMMO_SHELLS_BOX: g_GetTexture('ITEM_AMMO_SHELLS_BOX', ID); + ITEM_AMMO_ROCKET: g_GetTexture('ITEM_AMMO_ROCKET', ID); + ITEM_AMMO_ROCKET_BOX: g_GetTexture('ITEM_AMMO_ROCKET_BOX', ID); + ITEM_AMMO_CELL: g_GetTexture('ITEM_AMMO_CELL', ID); + ITEM_AMMO_CELL_BIG: g_GetTexture('ITEM_AMMO_CELL_BIG', ID); + ITEM_AMMO_BACKPACK: g_GetTexture('ITEM_AMMO_BACKPACK', ID); + ITEM_KEY_RED: g_GetTexture('ITEM_KEY_RED', ID); + ITEM_KEY_GREEN: g_GetTexture('ITEM_KEY_GREEN', ID); + ITEM_KEY_BLUE: g_GetTexture('ITEM_KEY_BLUE', ID); + ITEM_BOTTLE: g_GetTexture('ITEM_BOTTLE', ID); + ITEM_HELMET: g_GetTexture('ITEM_HELMET', ID); + ITEM_JETPACK: g_GetTexture('ITEM_JETPACK', ID); + ITEM_INVIS: g_GetTexture('ITEM_INVIS', ID); + end; + + if ID <> DWORD(-1) then + e_Draw(ID, MapOffset.X+X, MapOffset.Y+Y, 0, True, False); + end; + +// Рисуем монстров: + if (LayerEnabled[LAYER_MONSTERS] or PreviewMode) and + (gMonsters <> nil) then + for a := 0 to High(gMonsters) do + if gMonsters[a].MonsterType <> MONSTER_NONE then + with MonsterSize[gMonsters[a].MonsterType] do + begin + ID := DWORD(-1); + + case gMonsters[a].MonsterType of + 0: Continue; + MONSTER_DEMON: g_GetTexture('MONSTER_DEMON', ID); + MONSTER_IMP: g_GetTexture('MONSTER_IMP', ID); + MONSTER_ZOMBY: g_GetTexture('MONSTER_ZOMBY', ID); + MONSTER_SERG: g_GetTexture('MONSTER_SERG', ID); + MONSTER_CYBER: g_GetTexture('MONSTER_CYBER', ID); + MONSTER_CGUN: g_GetTexture('MONSTER_CGUN', ID); + MONSTER_BARON: g_GetTexture('MONSTER_BARON', ID); + MONSTER_KNIGHT: g_GetTexture('MONSTER_KNIGHT', ID); + MONSTER_CACO: g_GetTexture('MONSTER_CACO', ID); + MONSTER_SOUL: g_GetTexture('MONSTER_SOUL', ID); + MONSTER_PAIN: g_GetTexture('MONSTER_PAIN', ID); + MONSTER_SPIDER: g_GetTexture('MONSTER_SPIDER', ID); + MONSTER_BSP: g_GetTexture('MONSTER_BSP', ID); + MONSTER_MANCUB: g_GetTexture('MONSTER_MANCUB', ID); + MONSTER_SKEL: g_GetTexture('MONSTER_SKEL', ID); + MONSTER_VILE: g_GetTexture('MONSTER_VILE', ID); + MONSTER_FISH: g_GetTexture('MONSTER_FISH', ID); + MONSTER_BARREL: g_GetTexture('MONSTER_BARREL', ID); + MONSTER_ROBO: g_GetTexture('MONSTER_ROBO', ID); + MONSTER_MAN: g_GetTexture('MONSTER_MAN', ID); + end; + + if ID <> DWORD(-1) then + if gMonsters[a].Direction = D_LEFT then + begin + // Расстояние от края текстуры до края визуального положения объекта на текстуре: + xx := (X - MonsterSizeDelta[gMonsters[a].MonsterType].X) + Width; + // Расстояние от края хит бокса до края визуального положения объекта на текстуре: + xx := MonsterSizeDelta[gMonsters[a].MonsterType].Width - xx - X; + // Т.к. двигать текстуру нужно будет в противоположном направлении: + xx := (gMonsters[a].X - X) - xx; + + yy := (gMonsters[a].Y - Y) + + MonsterSizeDelta[gMonsters[a].MonsterType].Y; + + e_Draw(ID, MapOffset.X + xx, MapOffset.Y + yy, + 0, True, False, M_HORIZONTAL); + end + else + begin + // Левый верхний угол текстуры + смещение анимации: + xx := (gMonsters[a].X - X) + + MonsterSizeDelta[gMonsters[a].MonsterType].X; + yy := (gMonsters[a].Y - Y) + + MonsterSizeDelta[gMonsters[a].MonsterType].Y; + + e_Draw(ID, MapOffset.X + xx, MapOffset.Y + yy, + 0, True, False); + end; + + // Рамка: + if not PreviewMode then + begin + e_DrawQuad(MapOffset.X+gMonsters[a].X, MapOffset.Y+gMonsters[a].Y, + MapOffset.X+gMonsters[a].X+Width-1, MapOffset.Y+gMonsters[a].Y+Height-1, + 255, 255, 255); + end; + end; + +// Рисуем закрытые двери после монстров: + if PreviewMode then + DrawPanels(PANEL_CLOSEDOOR); + +// Рисуем области: + if (LayerEnabled[LAYER_AREAS] or PreviewMode) and + (gAreas <> nil) then + for a := 0 to High(gAreas) do + if gAreas[a].AreaType <> AREA_NONE then + with AreaSize[gAreas[a].AreaType] do + begin + ID := DWORD(-1); + + case gAreas[a].AreaType of + AREA_PLAYERPOINT1: g_GetTexture('AREA_PLAYERPOINT1', ID); + AREA_PLAYERPOINT2: g_GetTexture('AREA_PLAYERPOINT2', ID); + AREA_DMPOINT: g_GetTexture('AREA_DMPOINT', ID); + AREA_REDFLAG: g_GetTexture('AREA_REDFLAG', ID); + AREA_BLUEFLAG: g_GetTexture('AREA_BLUEFLAG', ID); + AREA_DOMFLAG: g_GetTexture('AREA_DOMFLAG', ID); + AREA_REDTEAMPOINT: g_GetTexture('AREA_REDPOINT', ID); + AREA_BLUETEAMPOINT: g_GetTexture('AREA_BLUEPOINT', ID); + end; + + if (not PreviewMode) or + (gAreas[a].AreaType = AREA_REDFLAG) or + (gAreas[a].AreaType = AREA_BLUEFLAG) or + (gAreas[a].AreaType = AREA_DOMFLAG) then + if ID <> DWORD(-1) then + if gAreas[a].Direction = D_LEFT then + e_Draw(ID, MapOffset.X+gAreas[a].X-X, MapOffset.Y+gAreas[a].Y-Y, + 0, True, False, M_HORIZONTAL) + else + e_Draw(ID, MapOffset.X+gAreas[a].X-X, MapOffset.Y+gAreas[a].Y-Y, + 0, True, False); + + // Рамка: + if not PreviewMode then + begin + e_DrawQuad(MapOffset.X+gAreas[a].X, MapOffset.Y+gAreas[a].Y, + MapOffset.X+gAreas[a].X+Width-1, MapOffset.Y+gAreas[a].Y+Height-1, + 255, 255, 255); + + e_DrawPoint(2, MapOffset.X+gAreas[a].X, MapOffset.Y+gAreas[a].Y, 255, 0, 0); + end; + end; + +// Рисуем жидкости и передний план после областей: + if LayerEnabled[LAYER_WATER] or PreviewMode then + DrawPanels(PANEL_WATER or PANEL_ACID1 or PANEL_ACID2); + if LayerEnabled[LAYER_FOREGROUND] or PreviewMode then + DrawPanels(PANEL_FORE); + +// Рисуем триггеры: + if LayerEnabled[LAYER_TRIGGERS] and + (not PreviewMode) and (gTriggers <> nil) then + for a := 0 to High(gTriggers) do + with gTriggers[a] do + if TriggerType <> TRIGGER_NONE then + begin + // Если выбран - рисуем красным, иначе - белым: + sel := ObjectSelected(OBJECT_TRIGGER, a); + + e_DrawFillQuad(MapOffset.X+X, MapOffset.Y+Y, + MapOffset.X+X+Width-1, MapOffset.Y+Y+Height-1, + 0, 0, 0, 150); + + if TexturePanel <> -1 then + begin + with gPanels[TexturePanel] do + begin + xx := X; + yy := Y; + ww := Width; + hh := Height; + end; + + e_DrawQuad(MapOffset.X+xx, MapOffset.Y+yy, + MapOffset.X+xx+ww-1, MapOffset.Y+yy+hh-1, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerArea)); + e_DrawLine(1, MapOffset.X+X+(Width div 2), MapOffset.Y+Y+(Height div 2), + MapOffset.X+xx, MapOffset.Y+yy, + 0, 255, 0, IfThen(sel, 0, gAlphaTriggerArea)); + end; + + case TriggerType of + TRIGGER_EXIT: ; + + TRIGGER_TELEPORT: + begin + // Точка назначения Телепорта: + if Data.d2d_teleport then + e_DrawLine(2, MapOffset.X+Data.TargetPoint.X-16, + MapOffset.Y+Data.TargetPoint.Y-1, + MapOffset.X+Data.TargetPoint.X+16, MapOffset.Y+Data.TargetPoint.Y-1, + 0, 0, 255, IfThen(sel, 0, gAlphaTriggerArea)) + else + e_DrawQuad(MapOffset.X+Data.TargetPoint.X, + MapOffset.Y+Data.TargetPoint.Y, + MapOffset.X+Data.TargetPoint.X+AreaSize[AREA_DMPOINT].Width-1, + MapOffset.Y+Data.TargetPoint.Y+AreaSize[AREA_DMPOINT].Height-1, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerArea)); + e_DrawPoint(2, MapOffset.X+Data.TargetPoint.X, + MapOffset.Y+Data.TargetPoint.Y, + 255, 0, 0); + // Линия к точке назначения Телепорта: + e_DrawLine(1, MapOffset.X+X+(Width div 2), + MapOffset.Y+Y+(Height div 2), + MapOffset.X+Data.TargetPoint.X, + MapOffset.Y+Data.TargetPoint.Y, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerLine)); + end; + + TRIGGER_OPENDOOR, TRIGGER_CLOSEDOOR, + TRIGGER_DOOR, TRIGGER_DOOR5, TRIGGER_CLOSETRAP, + TRIGGER_TRAP, TRIGGER_LIFTUP, TRIGGER_LIFTDOWN, + TRIGGER_LIFT: + if Data.PanelID <> -1 then + begin + // Дверь/Ловушка/Лифт: + e_DrawQuad(MapOffset.X+gPanels[Data.PanelID].X, + MapOffset.Y+gPanels[Data.PanelID].Y, + MapOffset.X+gPanels[Data.PanelID].X+gPanels[Data.PanelID].Width-1, + MapOffset.Y+gPanels[Data.PanelID].Y+gPanels[Data.PanelID].Height-1, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerArea)); + e_DrawPoint(2, MapOffset.X+gPanels[Data.PanelID].X, + MapOffset.Y+gPanels[Data.PanelID].Y, + 255, 0, 0); + // Линия к Двери/Ловушке/Лифту: + e_DrawLine(1, MapOffset.X+X+(Width div 2), + MapOffset.Y+Y+(Height div 2), + MapOffset.X+gPanels[Data.PanelID].X, + MapOffset.Y+gPanels[Data.PanelID].Y, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerLine)); + end; + + TRIGGER_PRESS, TRIGGER_ON, + TRIGGER_OFF, TRIGGER_ONOFF: + begin + if (Data.tWidth > 0) and + (Data.tHeight > 0) then + begin + // Область Расширителя: + e_DrawQuad(MapOffset.X+Data.tX, + MapOffset.Y+Data.tY, + MapOffset.X+Data.tX+Data.tWidth-1, + MapOffset.Y+Data.tY+Data.tHeight-1, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerArea)); + e_DrawPoint(2, MapOffset.X+Data.tX, + MapOffset.Y+Data.tY, + 255, 0, 0); + // Линия к области Расширителя: + e_DrawLine(1, MapOffset.X+X+(Width div 2), + MapOffset.Y+Y+(Height div 2), + MapOffset.X+Data.tX, + MapOffset.Y+Data.tY, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerLine)); + end; + + if Data.MonsterID <> 0 then + if (gMonsters <> nil) and + (gMonsters[Data.MonsterID-1].MonsterType <> MONSTER_NONE) then + begin + // Рамка вокруг Монстра - условия активации: + r := ObjectGetRect(OBJECT_MONSTER, Data.MonsterID-1); + e_DrawQuad(MapOffset.X+r.X, + MapOffset.Y+r.Y, + MapOffset.X+r.X+r.Width-1, + MapOffset.Y+r.Y+r.Height-1, + 0, 255, 0, IfThen(sel, 0, gAlphaTriggerArea)); + // Линия к Монстру - условию активации: + e_DrawLine(1, MapOffset.X+X+(Width div 2), + MapOffset.Y+Y+(Height div 2), + MapOffset.X+r.X, + MapOffset.Y+r.Y, + 0, 255, 0, IfThen(sel, 0, gAlphaTriggerArea)); + + end; + end; + + TRIGGER_SECRET: ; + + TRIGGER_SPAWNMONSTER, TRIGGER_SPAWNITEM: + begin + if TriggerType = TRIGGER_SPAWNMONSTER then + begin + xx := Data.MonPos.X; + yy := Data.MonPos.Y; + end + else + begin + xx := Data.ItemPos.X; + yy := Data.ItemPos.Y; + end; + // Точка появления Монстра/Предмета: + e_DrawLine(2, MapOffset.X+xx-16, + MapOffset.Y+yy-1, + MapOffset.X+xx+16, + MapOffset.Y+yy-1, + 0, 0, 255, IfThen(sel, 0, gAlphaTriggerArea)); + e_DrawPoint(2, MapOffset.X+xx, + MapOffset.Y+yy, + 255, 0, 0); + // Линия к точке появления Монстра/Предмета: + e_DrawLine(1, MapOffset.X+X+(Width div 2), + MapOffset.Y+Y+(Height div 2), + MapOffset.X+xx, + MapOffset.Y+yy, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerLine)); + // Предпросмотр создаваемого объекта: + if sel then + begin + // Монстр: + if TriggerType = TRIGGER_SPAWNMONSTER then + begin + if Data.MonType <> MONSTER_NONE then + with MonsterSize[Data.MonType] do + begin + ID := DWORD(-1); + case Data.MonType of + MONSTER_DEMON: g_GetTexture('MONSTER_DEMON', ID); + MONSTER_IMP: g_GetTexture('MONSTER_IMP', ID); + MONSTER_ZOMBY: g_GetTexture('MONSTER_ZOMBY', ID); + MONSTER_SERG: g_GetTexture('MONSTER_SERG', ID); + MONSTER_CYBER: g_GetTexture('MONSTER_CYBER', ID); + MONSTER_CGUN: g_GetTexture('MONSTER_CGUN', ID); + MONSTER_BARON: g_GetTexture('MONSTER_BARON', ID); + MONSTER_KNIGHT: g_GetTexture('MONSTER_KNIGHT', ID); + MONSTER_CACO: g_GetTexture('MONSTER_CACO', ID); + MONSTER_SOUL: g_GetTexture('MONSTER_SOUL', ID); + MONSTER_PAIN: g_GetTexture('MONSTER_PAIN', ID); + MONSTER_SPIDER: g_GetTexture('MONSTER_SPIDER', ID); + MONSTER_BSP: g_GetTexture('MONSTER_BSP', ID); + MONSTER_MANCUB: g_GetTexture('MONSTER_MANCUB', ID); + MONSTER_SKEL: g_GetTexture('MONSTER_SKEL', ID); + MONSTER_VILE: g_GetTexture('MONSTER_VILE', ID); + MONSTER_FISH: g_GetTexture('MONSTER_FISH', ID); + MONSTER_BARREL: g_GetTexture('MONSTER_BARREL', ID); + MONSTER_ROBO: g_GetTexture('MONSTER_ROBO', ID); + MONSTER_MAN: g_GetTexture('MONSTER_MAN', ID); + end; + if ID <> DWORD(-1) then + begin + if Data.MonDir = Byte(D_LEFT) then + begin + xx := X - MonsterSizeDelta[Data.MonType].X + Width; + xx := MonsterSizeDelta[Data.MonType].Width - xx - X; + xx := Data.TargetPoint.X - X - xx - (Width div 2); + + yy := Data.TargetPoint.Y - Y + + MonsterSizeDelta[Data.MonType].Y-Height; + + e_Draw(ID, MapOffset.X + xx, MapOffset.Y + yy, + 128, True, False, M_HORIZONTAL); + end + else + begin + xx := Data.TargetPoint.X - X + + MonsterSizeDelta[Data.MonType].X-(Width div 2); + yy := Data.TargetPoint.Y - Y + + MonsterSizeDelta[Data.MonType].Y-Height; + + e_Draw(ID, MapOffset.X + xx, MapOffset.Y + yy, + 128, True, False); + end; + // Рамка: + e_DrawQuad(MapOffset.X+Data.TargetPoint.X-(Width div 2), MapOffset.Y+Data.TargetPoint.Y-Height, + MapOffset.X+Data.TargetPoint.X+(Width div 2)-1, MapOffset.Y+Data.TargetPoint.Y-1, + 255, 255, 0, 128); + end; + end; + end + else + // Предмет: + begin + if Data.ItemType <> ITEM_NONE then + begin + ID := DWORD(-1); + case Data.ItemType of + ITEM_MEDKIT_SMALL: g_GetTexture('ITEM_MEDKIT_SMALL', ID); + ITEM_MEDKIT_LARGE: g_GetTexture('ITEM_MEDKIT_LARGE', ID); + ITEM_MEDKIT_BLACK: g_GetTexture('ITEM_MEDKIT_BLACK', ID); + ITEM_ARMOR_GREEN: g_GetTexture('ITEM_ARMORGREEN', ID); + ITEM_ARMOR_BLUE: g_GetTexture('ITEM_ARMORBLUE', ID); + ITEM_SPHERE_BLUE: g_GetTexture('ITEM_BLUESPHERE', ID); + ITEM_SPHERE_WHITE: g_GetTexture('ITEM_WHITESPHERE', ID); + ITEM_SUIT: g_GetTexture('ITEM_SUIT', ID); + ITEM_OXYGEN: g_GetTexture('ITEM_OXYGEN', ID); + ITEM_INVUL: g_GetTexture('ITEM_INVUL', ID); + ITEM_WEAPON_SAW: g_GetTexture('ITEM_WEAPON_SAW', ID); + ITEM_WEAPON_SHOTGUN1: g_GetTexture('ITEM_WEAPON_SHOTGUN1', ID); + ITEM_WEAPON_SHOTGUN2: g_GetTexture('ITEM_WEAPON_SHOTGUN2', ID); + ITEM_WEAPON_CHAINGUN: g_GetTexture('ITEM_WEAPON_CHAINGUN', ID); + ITEM_WEAPON_ROCKETLAUNCHER: g_GetTexture('ITEM_WEAPON_ROCKETLAUNCHER', ID); + ITEM_WEAPON_PLASMA: g_GetTexture('ITEM_WEAPON_PLASMA', ID); + ITEM_WEAPON_BFG: g_GetTexture('ITEM_WEAPON_BFG', ID); + ITEM_WEAPON_SUPERPULEMET: g_GetTexture('ITEM_WEAPON_SUPERPULEMET', ID); + ITEM_AMMO_BULLETS: g_GetTexture('ITEM_AMMO_BULLETS', ID); + ITEM_AMMO_BULLETS_BOX: g_GetTexture('ITEM_AMMO_BULLETS_BOX', ID); + ITEM_AMMO_SHELLS: g_GetTexture('ITEM_AMMO_SHELLS', ID); + ITEM_AMMO_SHELLS_BOX: g_GetTexture('ITEM_AMMO_SHELLS_BOX', ID); + ITEM_AMMO_ROCKET: g_GetTexture('ITEM_AMMO_ROCKET', ID); + ITEM_AMMO_ROCKET_BOX: g_GetTexture('ITEM_AMMO_ROCKET_BOX', ID); + ITEM_AMMO_CELL: g_GetTexture('ITEM_AMMO_CELL', ID); + ITEM_AMMO_CELL_BIG: g_GetTexture('ITEM_AMMO_CELL_BIG', ID); + ITEM_AMMO_BACKPACK: g_GetTexture('ITEM_AMMO_BACKPACK', ID); + ITEM_KEY_RED: g_GetTexture('ITEM_KEY_RED', ID); + ITEM_KEY_GREEN: g_GetTexture('ITEM_KEY_GREEN', ID); + ITEM_KEY_BLUE: g_GetTexture('ITEM_KEY_BLUE', ID); + ITEM_BOTTLE: g_GetTexture('ITEM_BOTTLE', ID); + ITEM_HELMET: g_GetTexture('ITEM_HELMET', ID); + ITEM_JETPACK: g_GetTexture('ITEM_JETPACK', ID); + ITEM_INVIS: g_GetTexture('ITEM_INVIS', ID); + end; + if ID <> DWORD(-1) then + e_Draw(ID, MapOffset.X+Data.ItemPos.X-(ItemSize[Data.ItemType][0] div 2), + MapOffset.Y+Data.ItemPos.Y-ItemSize[Data.ItemType][1], + 128, True, False); + // Рамка: + e_DrawQuad(MapOffset.X+Data.ItemPos.X-(ItemSize[Data.ItemType][0] div 2), MapOffset.Y+Data.ItemPos.Y-ItemSize[Data.ItemType][1], + MapOffset.X+Data.ItemPos.X+(ItemSize[Data.ItemType][0] div 2)-1, MapOffset.Y+Data.ItemPos.Y-1, + 255, 255, 0, 128); + end; + end; + end; + end; + + TRIGGER_PUSH: + begin + // Линия направления и силы ускорения: + xx := Round(Cos(-DegToRad(Data.PushAngle)) * Data.PushForce) + X+(Width div 2); + yy := Round(Sin(-DegToRad(Data.PushAngle)) * Data.PushForce) + Y+(Height div 2); + e_DrawLine(1, MapOffset.X+X+(Width div 2), + MapOffset.Y+Y+(Height div 2), + MapOffset.X+xx, + MapOffset.Y+yy, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerLine)); + end; + + TRIGGER_SHOT: + begin; + xx := Data.ShotPos.X; + yy := Data.ShotPos.Y; + // Точка появления снаряда: + e_DrawPoint(2, MapOffset.X+xx, + MapOffset.Y+yy, + 255, 0, 0); + // Линия к точке появления снаряда: + e_DrawLine(1, MapOffset.X+X+(Width div 2), + MapOffset.Y+Y+(Height div 2), + MapOffset.X+xx, + MapOffset.Y+yy, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerLine)); + // Линия направления выстрела: + dx := Round(Cos(-DegToRad(Data.ShotAngle)) * 24); + dy := Round(Sin(-DegToRad(Data.ShotAngle)) * 24); + e_DrawLine(1, MapOffset.X+xx, + MapOffset.Y+yy, + MapOffset.X+xx+dx, + MapOffset.Y+yy+dy, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerLine)); + + if (Data.ShotPanelID <> -1) and + (Data.ShotPanelID <= High(gPanels)) then + begin + // Линия к панели индикации выстрела + with gPanels[Data.ShotPanelID] do + begin + xx := X; + yy := Y; + ww := Width; + hh := Height; + end; + + e_DrawQuad(MapOffset.X+xx, MapOffset.Y+yy, + MapOffset.X+xx+ww-1, MapOffset.Y+yy+hh-1, + 255, 255, 255, IfThen(sel, 0, gAlphaTriggerArea)); + e_DrawLine(1, MapOffset.X+X+(Width div 2), MapOffset.Y+Y+(Height div 2), + MapOffset.X+xx, MapOffset.Y+yy, + 255, 255, 0, IfThen(sel, 0, gAlphaTriggerArea)); + end; + end; + end; + end; + +// Границы карты: + if not PreviewMode then + begin + e_DrawFillQuad(-32+MapOffset.X, + -32+MapOffset.Y, + gMapInfo.Width+31+MapOffset.X, + -1+MapOffset.Y, + drEdge[0], drEdge[1], drEdge[2], drEdge[3], B_NONE); // Top + e_DrawFillQuad(-32+MapOffset.X, + gMapInfo.Height+MapOffset.Y, + gMapInfo.Width+31+MapOffset.X, + gMapInfo.Height+31+MapOffset.Y, + drEdge[0], drEdge[1], drEdge[2], drEdge[3], B_NONE); // Bottom + e_DrawFillQuad(-32+MapOffset.X, + MapOffset.Y, + -1+MapOffset.X, + gMapInfo.Height+MapOffset.Y-1, + drEdge[0], drEdge[1], drEdge[2], drEdge[3], B_NONE); // Left + e_DrawFillQuad(gMapInfo.Width+MapOffset.X, + MapOffset.Y, + gMapInfo.Width+31+MapOffset.X, + gMapInfo.Height+MapOffset.Y-1, + drEdge[0], drEdge[1], drEdge[2], drEdge[3], B_NONE); // Right + end; +end; + +procedure ShiftMapObjects(dx, dy: Integer); +var + i: Integer; +begin + if gPanels <> nil then + for i := 0 to High(gPanels) do + if gPanels[i].PanelType <> 0 then + begin + Inc(gPanels[i].X, dx); + Inc(gPanels[i].Y, dy); + end; + + if gItems <> nil then + for i := 0 to High(gItems) do + if gItems[i].ItemType <> 0 then + begin + Inc(gItems[i].X, dx); + Inc(gItems[i].Y, dy); + end; + + if gAreas <> nil then + for i := 0 to High(gAreas) do + if gAreas[i].AreaType <> 0 then + begin + Inc(gAreas[i].X, dx); + Inc(gAreas[i].Y, dy); + end; + + if gMonsters <> nil then + for i := 0 to High(gMonsters) do + if gMonsters[i].MonsterType <> 0 then + begin + Inc(gMonsters[i].X, dx); + Inc(gMonsters[i].Y, dy); + end; + + if gTriggers <> nil then + for i := 0 to High(gTriggers) do + if gTriggers[i].TriggerType <> 0 then + begin + Inc(gTriggers[i].X, dx); + Inc(gTriggers[i].Y, dy); + + case gTriggers[i].TriggerType of + TRIGGER_TELEPORT: + begin + Inc(gTriggers[i].Data.TargetPoint.X, dx); + Inc(gTriggers[i].Data.TargetPoint.Y, dy); + end; + + TRIGGER_PRESS, TRIGGER_ON, + TRIGGER_OFF, TRIGGER_ONOFF: + begin + Inc(gTriggers[i].Data.tX, dx); + Inc(gTriggers[i].Data.tY, dy); + end; + + TRIGGER_SPAWNMONSTER: + begin + Inc(gTriggers[i].Data.MonPos.X, dx); + Inc(gTriggers[i].Data.MonPos.Y, dy); + end; + + TRIGGER_SPAWNITEM: + begin + Inc(gTriggers[i].Data.ItemPos.X, dx); + Inc(gTriggers[i].Data.ItemPos.Y, dy); + end; + + TRIGGER_SHOT: + begin + Inc(gTriggers[i].Data.ShotPos.X, dx); + Inc(gTriggers[i].Data.ShotPos.Y, dy); + end; + end; + end; +end; + +procedure LoadData(); +begin + g_CreateTextureWAD('NOTEXTURE', EditorDir+'\data\Game.wad:TEXTURES\NOTEXTURE'); + + g_CreateTextureWADSize('AREA_REDFLAG', EditorDir+'\data\Game.wad:TEXTURES\FLAGRED', 0, 0, 64, 64); + g_CreateTextureWADSize('AREA_BLUEFLAG', EditorDir+'\data\Game.wad:TEXTURES\FLAGBLUE', 0, 0, 64, 64); + g_CreateTextureWADSize('AREA_DOMFLAG', EditorDir+'\data\Game.wad:TEXTURES\FLAGDOM', 0, 0, 64, 64); + + g_CreateTextureWADSize('MONSTER_DEMON', EditorDir+'\data\Game.wad:MTEXTURES\DEMON_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_IMP', EditorDir+'\data\Game.wad:MTEXTURES\IMP_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_ZOMBY', EditorDir+'\data\Game.wad:MTEXTURES\ZOMBY_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_SERG', EditorDir+'\data\Game.wad:MTEXTURES\SERG_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_CYBER', EditorDir+'\data\Game.wad:MTEXTURES\CYBER_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_CGUN', EditorDir+'\data\Game.wad:MTEXTURES\CGUN_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_BARON', EditorDir+'\data\Game.wad:MTEXTURES\BARON_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_KNIGHT', EditorDir+'\data\Game.wad:MTEXTURES\KNIGHT_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_CACO', EditorDir+'\data\Game.wad:MTEXTURES\CACO_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_SOUL', EditorDir+'\data\Game.wad:MTEXTURES\SOUL_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_PAIN', EditorDir+'\data\Game.wad:MTEXTURES\PAIN_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_SPIDER', EditorDir+'\data\Game.wad:MTEXTURES\SPIDER_SLEEP', 0, 0, 256, 128); + g_CreateTextureWADSize('MONSTER_BSP', EditorDir+'\data\Game.wad:MTEXTURES\BSP_SLEEP', 0, 0, 128, 64); + g_CreateTextureWADSize('MONSTER_MANCUB', EditorDir+'\data\Game.wad:MTEXTURES\MANCUB_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_SKEL', EditorDir+'\data\Game.wad:MTEXTURES\SKEL_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_VILE', EditorDir+'\data\Game.wad:MTEXTURES\VILE_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_FISH', EditorDir+'\data\Game.wad:MTEXTURES\FISH_SLEEP', 0, 0, 32, 32); + g_CreateTextureWADSize('MONSTER_BARREL', EditorDir+'\data\Game.wad:MTEXTURES\BARREL_SLEEP', 0, 0, 64, 64); + g_CreateTextureWADSize('MONSTER_ROBO', EditorDir+'\data\Game.wad:MTEXTURES\ROBO_SLEEP', 0, 0, 128, 128); + g_CreateTextureWADSize('MONSTER_MAN', EditorDir+'\data\Game.wad:MTEXTURES\MAN_SLEEP', 0, 0, 64, 64); + + g_CreateTextureWADSize('ITEM_BLUESPHERE', EditorDir+'\data\Game.wad:TEXTURES\SBLUE', 0, 0, 32, 32); + g_CreateTextureWADSize('ITEM_WHITESPHERE', EditorDir+'\data\Game.wad:TEXTURES\SWHITE', 0, 0, 32, 32); + g_CreateTextureWADSize('ITEM_ARMORGREEN', EditorDir+'\data\Game.wad:TEXTURES\ARMORGREEN', 0, 0, 32, 16); + g_CreateTextureWADSize('ITEM_ARMORBLUE', EditorDir+'\data\Game.wad:TEXTURES\ARMORBLUE', 0, 0, 32, 16); + g_CreateTextureWADSize('ITEM_INVUL', EditorDir+'\data\Game.wad:TEXTURES\INVUL', 0, 0, 32, 32); + g_CreateTextureWADSize('ITEM_BOTTLE', EditorDir+'\data\Game.wad:TEXTURES\BOTTLE', 0, 0, 16, 32); + g_CreateTextureWADSize('ITEM_HELMET', EditorDir+'\data\Game.wad:TEXTURES\HELMET', 0, 0, 16, 16); + g_CreateTextureWADSize('ITEM_INVIS', EditorDir+'\data\Game.wad:TEXTURES\INVIS', 0, 0, 32, 32); + + g_CreateTextureWAD('ITEM_MEDKIT_SMALL', EditorDir+'\data\Game.wad:TEXTURES\MED1'); + g_CreateTextureWAD('ITEM_MEDKIT_LARGE', EditorDir+'\data\Game.wad:TEXTURES\MED2'); + g_CreateTextureWAD('ITEM_WEAPON_SAW', EditorDir+'\data\Game.wad:TEXTURES\SAW'); + g_CreateTextureWAD('ITEM_WEAPON_PISTOL', EditorDir+'\data\Game.wad:TEXTURES\PISTOL'); + g_CreateTextureWAD('ITEM_WEAPON_KASTET', EditorDir+'\data\Game.wad:TEXTURES\KASTET'); + g_CreateTextureWAD('ITEM_WEAPON_SHOTGUN1', EditorDir+'\data\Game.wad:TEXTURES\SHOTGUN1'); + g_CreateTextureWAD('ITEM_WEAPON_SHOTGUN2', EditorDir+'\data\Game.wad:TEXTURES\SHOTGUN2'); + g_CreateTextureWAD('ITEM_WEAPON_CHAINGUN', EditorDir+'\data\Game.wad:TEXTURES\MGUN'); + g_CreateTextureWAD('ITEM_WEAPON_ROCKETLAUNCHER', EditorDir+'\data\Game.wad:TEXTURES\RLAUNCHER'); + g_CreateTextureWAD('ITEM_WEAPON_PLASMA', EditorDir+'\data\Game.wad:TEXTURES\PGUN'); + g_CreateTextureWAD('ITEM_WEAPON_BFG', EditorDir+'\data\Game.wad:TEXTURES\BFG'); + g_CreateTextureWAD('ITEM_WEAPON_SUPERPULEMET', EditorDir+'\data\Game.wad:TEXTURES\SPULEMET'); + g_CreateTextureWAD('ITEM_AMMO_BULLETS', EditorDir+'\data\Game.wad:TEXTURES\CLIP'); + g_CreateTextureWAD('ITEM_AMMO_BULLETS_BOX', EditorDir+'\data\Game.wad:TEXTURES\AMMO'); + g_CreateTextureWAD('ITEM_AMMO_SHELLS', EditorDir+'\data\Game.wad:TEXTURES\SHELL1'); + g_CreateTextureWAD('ITEM_AMMO_SHELLS_BOX', EditorDir+'\data\Game.wad:TEXTURES\SHELL2'); + g_CreateTextureWAD('ITEM_AMMO_ROCKET', EditorDir+'\data\Game.wad:TEXTURES\ROCKET'); + g_CreateTextureWAD('ITEM_AMMO_ROCKET_BOX', EditorDir+'\data\Game.wad:TEXTURES\ROCKETS'); + g_CreateTextureWAD('ITEM_AMMO_CELL', EditorDir+'\data\Game.wad:TEXTURES\CELL'); + g_CreateTextureWAD('ITEM_AMMO_CELL_BIG', EditorDir+'\data\Game.wad:TEXTURES\CELL2'); + g_CreateTextureWAD('ITEM_AMMO_BACKPACK', EditorDir+'\data\Game.wad:TEXTURES\BPACK'); + g_CreateTextureWAD('ITEM_KEY_RED', EditorDir+'\data\Game.wad:TEXTURES\KEYR'); + g_CreateTextureWAD('ITEM_KEY_GREEN', EditorDir+'\data\Game.wad:TEXTURES\KEYG'); + g_CreateTextureWAD('ITEM_KEY_BLUE', EditorDir+'\data\Game.wad:TEXTURES\KEYB'); + g_CreateTextureWAD('ITEM_OXYGEN', EditorDir+'\data\Game.wad:TEXTURES\OXYGEN'); + g_CreateTextureWAD('ITEM_SUIT', EditorDir+'\data\Game.wad:TEXTURES\SUIT'); + g_CreateTextureWAD('ITEM_MEDKIT_BLACK', EditorDir+'\data\Game.wad:TEXTURES\BMED'); + g_CreateTextureWAD('ITEM_JETPACK', EditorDir+'\data\Game.wad:TEXTURES\JETPACK'); + + g_CreateTextureWAD('AREA_PLAYERPOINT1', EditorDir+'\data\Editor.wad:TEXTURES\P1POINT'); + g_CreateTextureWAD('AREA_PLAYERPOINT2', EditorDir+'\data\Editor.wad:TEXTURES\P2POINT'); + g_CreateTextureWAD('AREA_DMPOINT', EditorDir+'\data\Editor.wad:TEXTURES\DMPOINT'); + g_CreateTextureWAD('AREA_REDPOINT', EditorDir+'\data\Editor.wad:TEXTURES\REDPOINT'); + g_CreateTextureWAD('AREA_BLUEPOINT', EditorDir+'\data\Editor.wad:TEXTURES\BLUEPOINT'); +end; + +procedure FreeData(); +begin + g_DeleteTexture('NOTEXTURE'); + + g_DeleteTexture('ITEM_BLUESPHERE'); + g_DeleteTexture('ITEM_WHITESPHERE'); + g_DeleteTexture('ITEM_ARMORGREEN'); + g_DeleteTexture('ITEM_ARMORBLUE'); + g_DeleteTexture('ITEM_INVUL'); + g_DeleteTexture('ITEM_BOTTLE'); + g_DeleteTexture('ITEM_HELMET'); + g_DeleteTexture('AREA_REDFLAG'); + g_DeleteTexture('AREA_BLUEFLAG'); + g_DeleteTexture('AREA_DOMFLAG'); + + g_DeleteTexture('MONSTER_DEMON'); + g_DeleteTexture('MONSTER_IMP'); + g_DeleteTexture('MONSTER_ZOMBY'); + g_DeleteTexture('MONSTER_SERG'); + g_DeleteTexture('MONSTER_CGUN'); + g_DeleteTexture('MONSTER_BARREL'); + g_DeleteTexture('MONSTER_MAN'); + + g_DeleteTexture('MONSTER_DEMON'); + g_DeleteTexture('MONSTER_IMP'); + g_DeleteTexture('MONSTER_ZOMBY'); + g_DeleteTexture('MONSTER_SERG'); + g_DeleteTexture('MONSTER_CYBER'); + g_DeleteTexture('MONSTER_CGUN'); + g_DeleteTexture('MONSTER_BARON'); + g_DeleteTexture('MONSTER_KNIGHT'); + g_DeleteTexture('MONSTER_CACO'); + g_DeleteTexture('MONSTER_SOUL'); + g_DeleteTexture('MONSTER_PAIN'); + g_DeleteTexture('MONSTER_SPIDER'); + g_DeleteTexture('MONSTER_BSP'); + g_DeleteTexture('MONSTER_MANCUB'); + g_DeleteTexture('MONSTER_SKEL'); + g_DeleteTexture('MONSTER_VILE'); + g_DeleteTexture('MONSTER_FISH'); + g_DeleteTexture('MONSTER_BARREL'); + g_DeleteTexture('MONSTER_ROBO'); + g_DeleteTexture('MONSTER_MAN'); + + g_DeleteTexture('ITEM_MEDKIT_SMALL'); + g_DeleteTexture('ITEM_MEDKIT_LARGE'); + g_DeleteTexture('ITEM_WEAPON_SAW'); + g_DeleteTexture('ITEM_WEAPON_PISTOL'); + g_DeleteTexture('ITEM_WEAPON_KASTET'); + g_DeleteTexture('ITEM_WEAPON_SHOTGUN1'); + g_DeleteTexture('ITEM_WEAPON_SHOTGUN2'); + g_DeleteTexture('ITEM_WEAPON_CHAINGUN'); + g_DeleteTexture('ITEM_WEAPON_ROCKETLAUNCHER'); + g_DeleteTexture('ITEM_WEAPON_PLASMA'); + g_DeleteTexture('ITEM_WEAPON_BFG'); + g_DeleteTexture('ITEM_WEAPON_SUPERPULEMET'); + g_DeleteTexture('ITEM_AMMO_BULLETS'); + g_DeleteTexture('ITEM_AMMO_BULLETS_BOX'); + g_DeleteTexture('ITEM_AMMO_SHELLS'); + g_DeleteTexture('ITEM_AMMO_SHELLS_BOX'); + g_DeleteTexture('ITEM_AMMO_ROCKET'); + g_DeleteTexture('ITEM_AMMO_ROCKET_BOX'); + g_DeleteTexture('ITEM_AMMO_CELL'); + g_DeleteTexture('ITEM_AMMO_CELL_BIG'); + g_DeleteTexture('ITEM_AMMO_BACKPACK'); + g_DeleteTexture('ITEM_KEY_RED'); + g_DeleteTexture('ITEM_KEY_GREEN'); + g_DeleteTexture('ITEM_KEY_BLUE'); + g_DeleteTexture('ITEM_OXYGEN'); + g_DeleteTexture('ITEM_SUIT'); + g_DeleteTexture('ITEM_MEDKIT_BLACK'); + g_DeleteTexture('ITEM_JETPACK'); + g_DeleteTexture('ITEM_INVIS'); + + g_DeleteTexture('AREA_PLAYERPOINT1'); + g_DeleteTexture('AREA_PLAYERPOINT2'); + g_DeleteTexture('AREA_DMPOINT'); + g_DeleteTexture('AREA_REDPOINT'); + g_DeleteTexture('AREA_BLUEPOINT'); +end; + +end. diff --git a/src/editor/g_textures.pas b/src/editor/g_textures.pas new file mode 100644 index 0000000..5cad990 --- /dev/null +++ b/src/editor/g_textures.pas @@ -0,0 +1,311 @@ +unit g_textures; + +{$MODE Delphi} + +interface + +uses LCLIntf, LCLType, LMessages, e_graphics; + +function g_SimpleCreateTextureWAD(var ID: DWORD; Resource: string): Boolean; +function g_SimpleCreateTextureWADSize(var ID: DWORD; Resource: string; + X, Y, Width, Height: Word): Boolean; + +function g_CreateTextureWAD(TextureName: ShortString; Resource: string; flag: Byte = 0): Boolean; +function g_CreateTextureWADSize(TextureName: ShortString; Resource: string; + X, Y, Width, Height: Word; flag: Byte = 0): Boolean; +function g_CreateTextureMemorySize(pData: Pointer; Name: ShortString; X, Y, + Width, Height: Word; flag: Byte = 0): Boolean; + +function g_GetTexture(TextureName: ShortString; var ID: DWORD): Boolean; +function g_GetTextureFlagByName(TextureName: ShortString): Byte; +function g_GetTextureFlagByID(ID: DWORD): Byte; +procedure g_GetTextureSizeByName(TextureName: ShortString; var Width, Height: Word); +procedure g_GetTextureSizeByID(ID: DWORD; var Width, Height: Word); + +procedure g_DeleteTexture(TextureName: ShortString); +procedure g_DeleteAllTextures(); + +implementation + +uses + e_log, WADEDITOR, g_basic, SysUtils; + +type + _TTexture = record + Name: ShortString; + ID: DWORD; + Width, Height: Word; + flag: Byte; + end; + +var + TexturesArray: array of _TTexture = nil; + +function FindTexture: DWORD; +var + i: integer; +begin + if TexturesArray <> nil then + for i := 0 to High(TexturesArray) do + if TexturesArray[i].Name = '' then + begin + Result := i; + Exit; + end; + + if TexturesArray = nil then + begin + SetLength(TexturesArray, 8); + Result := 0; + end + else + begin + Result := High(TexturesArray) + 1; + SetLength(TexturesArray, Length(TexturesArray) + 8); + end; +end; + +function g_SimpleCreateTextureWAD(var ID: DWORD; Resource: string): Boolean; +var + WAD: TWADEditor_1; + FileName, + SectionName, + ResourceName: string; + TextureData: Pointer; + ResourceLength: Integer; +begin + Result := False; + g_ProcessResourceStr(Resource, FileName, SectionName, ResourceName); + + WAD := TWADEditor_1.Create; + WAD.ReadFile(FileName); + + if WAD.GetResource(SectionName, ResourceName, TextureData, ResourceLength) then + begin + if e_CreateTextureMem(TextureData, ID) then Result := True; + FreeMem(TextureData); + end + else + begin + e_WriteLog(Format('Error loading texture %s', [Resource]), MSG_WARNING); + e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING); + end; + WAD.Destroy; +end; + +function g_CreateTextureMemorySize(pData: Pointer; Name: ShortString; X, Y, + Width, Height: Word; flag: Byte = 0): Boolean; +var + find_id: DWORD; +begin + Result := False; + if pData = nil then + Exit; + + find_id := FindTexture; + + if not e_CreateTextureMemEx(pData, TexturesArray[find_id].ID, X, Y, Width, Height) then + begin + FreeMem(pData); + Exit; + end; + + TexturesArray[find_id].Width := Width; + TexturesArray[find_id].Height := Height; + TexturesArray[find_id].Name := Name; + TexturesArray[find_id].flag := flag; + + FreeMem(pData); + + Result := True; +end; + +function g_CreateTextureWAD(TextureName: ShortString; Resource: string; flag: Byte = 0): Boolean; +var + WAD: TWADEditor_1; + FileName, + SectionName, + ResourceName: string; + TextureData: Pointer; + find_id: DWORD; + ResourceLength: Integer; +begin + g_ProcessResourceStr(Resource, FileName, SectionName, ResourceName); + + find_id := FindTexture; + + WAD := TWADEditor_1.Create; + WAD.ReadFile(FileName); + + if WAD.GetResource(SectionName, ResourceName, TextureData, ResourceLength) then + begin + Result := e_CreateTextureMem(TextureData, TexturesArray[find_id].ID); + FreeMem(TextureData); + if Result then + begin + e_GetTextureSize(TexturesArray[find_id].ID, @TexturesArray[find_id].Width, + @TexturesArray[find_id].Height); + TexturesArray[find_id].Name := TextureName; + TexturesArray[find_id].flag := flag; + end; + end + else + begin + e_WriteLog(Format('Error loading texture %s', [Resource]), MSG_WARNING); + e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING); + Result := False; + end; + WAD.Destroy; +end; + +function g_SimpleCreateTextureWADSize(var ID: DWORD; Resource: string; + X, Y, Width, Height: Word): Boolean; +var + WAD: TWADEditor_1; + FileName, + SectionName, + ResourceName: String; + TextureData: Pointer; + ResourceLength: Integer; +begin + Result := False; + g_ProcessResourceStr(Resource, FileName, SectionName, ResourceName); + + WAD := TWADEditor_1.Create; + WAD.ReadFile(FileName); + + if WAD.GetResource(SectionName, ResourceName, TextureData, ResourceLength) then + begin + if e_CreateTextureMemEx(TextureData, ID, X, Y, Width, Height) then Result := True; + FreeMem(TextureData); + end + else + begin + e_WriteLog(Format('Error loading texture %s', [Resource]), MSG_WARNING); + e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING); + end; + WAD.Destroy; +end; + +function g_CreateTextureWADSize(TextureName: ShortString; Resource: string; + X, Y, Width, Height: Word; flag: Byte = 0): Boolean; +var + WAD: TWADEditor_1; + FileName, + SectionName, + ResourceName: String; + TextureData: Pointer; + find_id: DWORD; + ResourceLength: Integer; +begin + g_ProcessResourceStr(Resource, FileName, SectionName, ResourceName); + + find_id := FindTexture; + + WAD := TWADEditor_1.Create; + WAD.ReadFile(FileName); + + if WAD.GetResource(SectionName, ResourceName, TextureData, ResourceLength) then + begin + Result := e_CreateTextureMemEx(TextureData, TexturesArray[find_id].ID, X, Y, Width, Height); + FreeMem(TextureData); + if Result then + begin + TexturesArray[find_id].Width := Width; + TexturesArray[find_id].Height := Height; + TexturesArray[find_id].Name := TextureName; + TexturesArray[find_id].flag := flag; + end; + end + else + begin + e_WriteLog(Format('Error loading texture %s', [Resource]), MSG_WARNING); + e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING); + Result := False; + end; + WAD.Destroy; +end; + +function g_GetTexture(TextureName: ShortString; var ID: DWORD): Boolean; +var + a: DWORD; +begin + Result := False; + + if TexturesArray = nil then Exit; + + if TextureName = '' then Exit; + + for a := 0 to High(TexturesArray) do + if TexturesArray[a].Name = TextureName then + begin + ID := TexturesArray[a].ID; + Result := True; + Break; + end; +end; + +function g_GetTextureFlagByName(TextureName: ShortString): Byte; +var + ID: DWORD; +begin + Result := 0; + + if not g_GetTexture(TextureName, ID) then Exit; + + Result := TexturesArray[ID].flag; +end; + +function g_GetTextureFlagByID(ID: DWORD): Byte; +begin + Result := TexturesArray[ID].flag; +end; + +procedure g_GetTextureSizeByName(TextureName: ShortString; var Width, Height: Word); +var + ID: DWORD; +begin + Width := 0; + Height := 0; + + if not g_GetTexture(TextureName, ID) then Exit; + + e_GetTextureSize(ID, @Width, @Height); +end; + +procedure g_GetTextureSizeByID(ID: DWORD; var Width, Height: Word); +begin + e_GetTextureSize(ID, @Width, @Height); +end; + +procedure g_DeleteTexture(TextureName: ShortString); +var + a: DWORD; +begin + if TexturesArray = nil then Exit; + + for a := 0 to High(TexturesArray) do + if TexturesArray[a].Name = TextureName then + begin + e_DeleteTexture(TexturesArray[a].ID); + TexturesArray[a].Name := ''; + TexturesArray[a].ID := 0; + TexturesArray[a].Width := 0; + TexturesArray[a].Height := 0; + end; +end; + +procedure g_DeleteAllTextures; +var + a: DWORD; +begin + if TexturesArray = nil then Exit; + + for a := 0 to High(TexturesArray) do + if TexturesArray[a].Name <> '' then + e_DeleteTexture(TexturesArray[a].ID); + + TexturesArray := nil; +end; + +end. diff --git a/src/editor/img/1_new.BMP b/src/editor/img/1_new.BMP new file mode 100644 index 0000000000000000000000000000000000000000..d056051c08db7a869e0fddd418d5d4b8965d0442 GIT binary patch literal 1782 zcmd6nu}cC`9LKMvzo9K~3ULsG5FC^fM9^>$L_r)}M05(F!9ki`U7egA1gR}9E^0B( zILWds3lfx!i>r$Z!oGKB67ud{Q9)n6_c-3~$LIat@5ddxp)51H*0HYPS(!ac`WwS= zv$&o#Tc*tPe>#`T+3j|l&9?eAMIsU6MSMQr^gD7m97K-a?+51Ksz>qR;1W@+$aFfL zL{2amM0D@0W9ioL7MU)W>rXl1a2TiTUvw?q9uJY}cDsr7{1!)>qg9`c5r~r!GCdv- zv7Tr&is;cz-_objJu<ysFOd_E#}UOWEZuvOkjb(vk&{ZL5Je9y-G7mh83+W3oOC*k zXy;*UX``M{C`9CBG8u4icewjFq4-*TR#nyP`^sjs;NUEZh0z^G#`n)5Z7!sL4!(B^ zN0KB_6giG-Hk<W&y;`ltVlfH_JtSI|<w~VeE|)iTC6mcSB0=E{UKOGhMXA+lD0nVy zzUKELLa+%n8Vx{<{_ma~Yke^1U=Ry>`w-9b1_zLQK2L;T)9CZO?1dM=1VO;&PP<ho X6wDyl-}<Ctu~;gVwoOEV{5<pyl05LE literal 0 HcmV?d00001 diff --git a/src/editor/img/2_open.BMP b/src/editor/img/2_open.BMP new file mode 100644 index 0000000000000000000000000000000000000000..54ba6f29d4c3017518e7161fcea7827bf2926d59 GIT binary patch literal 1782 zcmdT@(Q8ss9JZJKhW>;er9lgPGHA;#GADF5P|RlR7T%X0TA>w$ppcZdNC#`>B5%{x zRp(4yZr<G`^R|phxv*m3OF=#DVL?x~-@WH{I$T5St-kY}kMI2aosV<Q#pBlR2MsEY zf*yu>NSg;#XD|rb?`o4KvO)d_IXrywZ`pkdqtR%wSgub;`s6)6ed}=osEZmHIC6@j zpnf|!kBHik;>z8{g$VZuh0K-m-8qAU$E;Q>9A-Mj-C0N?1%n9{#F-o)<I}Ut*@xvq zcaF(q8nxL*Mr^TXsW_hoVuL&^Q3W(nF3c5j4~qFG!m2LHY&O$0ZMWNJmomLMzf!!P z&vMllyi`lq1YOS1&<TgbL7%4KYKhWvZ>GdGZfzwcRx?sfmqSt18MlJ*v2kv-Ofp$1 zkxS&WQmy>1xwKW+<=E|`lguO#PW5y{SQM)yb(Q>9J+rw{+<v|Osa@G=l2Kzc&3e78 zmvy;ZaJ8IN17_<lu|XbJDy?Rz*#H&VEi%XHbYA?0vu=0s%`4334G9QKtf&GCIpW9n zWR7QI;>u+W=R6)b(&p|5l9jjH-IO}J5Jl!N409E5O%aGwp9(#grjWeeZi($3tYCnR z&mA&~W!W1&ap62e9*^|RuV3(y;B7*|P$(1(24QMc*NTTa5TZIi_I2Eo<!`c#b1qFy z-3*7r%IpR8o5E++6aVXdK7TY4iNXLVqS|QG=ZEnd$SVqUzYlN62HqwfLx{)FP*+gL ZJ^h$KATaYMK)s*sWDjiV2HEi6`JbrgF)9E6 literal 0 HcmV?d00001 diff --git a/src/editor/img/3_save.BMP b/src/editor/img/3_save.BMP new file mode 100644 index 0000000000000000000000000000000000000000..7f39880d7f8ecadcbcad0a5f6a92db1537bd533e GIT binary patch literal 1782 zcmd6m-)oXl7{~3VzoCmj5riCGDTEgak_cYdjbJE(;)QIIXjY;aI%Z1SY&M5ure#~L zO|&e_GAhEwqF)qslUNrCq8E`Qnv$s47hgG83sKlbhv$8Hc;EAU&N<KbdyXA%9;Efh zQM`}fIW%|<^fMYQJNVz9G<fxBz5g&c91fGoq|@n##~5rjdunQm!C<ghtl_f=g+fPg z88JOQZN20xm&?6BN4wpw)oS>Tk;~=G3tp8<MU?<ZP$H4&+-d+}Fc{{qN5Lo*3ZZ++ z^~VnhuhnY(=#NsV6i95(%*;?FI0)g0#bQ?|h%lK<{@5mJ4d-XEvE}#{;UM|dAJuAg z<yH(UQYBn2mvE#~sryQ3_VTLLYF)jPK*@<yMq6MB^M^T9-syBO$7nQSK7z;N5spkI z!_teJ>kfw_oW6_ssxxLZ!FO|GF9%;R$80uxqG1G|&);{BTrS5FXlytfPQQQi&pnWj z&<>k-I-TBY5rjY>Ap21$6dO-62ncjFbAK&$8{Nh+#|danIBK<eEBh3Rqamn8&+RLI zi|@i;ar)vs;;es>N=|y`u$)99Asnq%8+-l?t|%6Z&1SRFXux%pTlT)8d!<sz=kt`H z(3)`cdVS)>PB0mVK}a7)C!oR4FaWeB9GEltY8QQmH%6C}zt}T;2z8(l;lNa>w=W|P zQr&Ks%p9Fy=W~&@=%X|=A{>jwlKJ=!dX26f{)_7dIZ&chDhUVIVdqP3A`V;x^FU>2 zO*nSD{dMu{L>zQrY5PWeH>=TT2nXi;@U1)%2WN!7P+6zb5su5{`c(ZsDF=Ro%Fvo{ l+-~>hpH*<i*S%h^!zZ|mHk*xbka#>E-{b=u7>4Xi{u`QD;!Xen literal 0 HcmV?d00001 diff --git a/src/editor/img/4_map.BMP b/src/editor/img/4_map.BMP new file mode 100644 index 0000000000000000000000000000000000000000..9a76ed99905348659f1f1e6373807fa52bbbd311 GIT binary patch literal 1782 zcmZ?r{l>-s24+A~1BfM{m=VlkU^oDk2P=XS{~7)dHq=5HfO`jM%zvT*a+m<wAic1V zftb_Jz(5cIZG)S03=A;MS-`+R5FwibF%Z+7oeT^F5i#amWndtPkj=s6uXhX#1QD`1 zxcmhSLBa?roN<~1v<wrV8IEKQ7Js$2u&}a{hgw<@>8H81m4l0mJOtDWPlwHIt$cz4 zq@ukC4ge8QFWj7__BIg-aq<vQFOoU!QVR0qp{DkBxH*j-?YAC1#Df$yH89b}9ovBj zs25>QXNRVdAue?3_AOjeK=H=T4!AiDU7d#3R=CiqE0=Le0mXrO;pWtLcUihRlZqCv sUkgM)y$Ex9yBz&}$wT$M2y^QCx;-Pq$U{KAaQD>q_fUf1=1_$J0GDvak^lez literal 0 HcmV?d00001 diff --git a/src/editor/img/5_layers.BMP b/src/editor/img/5_layers.BMP new file mode 100644 index 0000000000000000000000000000000000000000..1fa877fc221db80be842ec2dde1e0f654aa606b9 GIT binary patch literal 1782 zcmZ?r{l>-s24+A~1BfM{m=VlkU^oDk2P=XS{~7)d6%<`w?3^4=5E1lFetR>}DEtU$ z%aAa~Jvm<A-y4D`@mF+lKF}x#8tUd4*{>8)oC86W_{%qXGtejq8X@KYqaHs3<{Egu zz!g65goMTbrc$_GWX2#j2N?DE5zw2+-hs1`{RK}*XbfN~g{#NK7=-2korE6&y@|^^ H)D;H+ahhl* literal 0 HcmV?d00001 diff --git a/src/editor/img/6_step.BMP b/src/editor/img/6_step.BMP new file mode 100644 index 0000000000000000000000000000000000000000..4c72a9990269b245f1edc00d329bb5f7adbf42c6 GIT binary patch literal 1782 zcmZ?r{l>-s24+A~1BfM{m=VlkU^oDk2P=XS{~7)dHlzavN=i!d^71l708LFzEiEkt z1qD@ARiIY5cWiBKJBnj*p)gNtJW@ad;pR9vIN(zG|NnpdQpoOcc6P?4n4q|kkrCWI z9v&V9)#FlNY-|iS$H&J9mokFl78Vv%Hzz14h@ic=6xi6<z}*uX8j4F9L2+PQ!_A3~ zj_xXpCl9&0y28zgkB{%JNWz68eC+T@0pl8OPHJjuUricT1Wbom#esqlDPUZ~&B@5f zm{^}p9s<S@+?<@8oXIWuKolG724SGF;ewb9U>w2CDJ(3U*;5I0=k$(J2tsDV1+g+B zA|l}Cl$Msx>a8LV0pl8OPDMq<+(`}Op}4p>xH+}8wF{@W0#RCg2!w&gh6`dc5)%{Q y=G4{IEuGT?3=<#;LC9>lAXWx2uHoi1H8rhRIFUS5US1A2r+4lgN)X%}sxSb4wSvI_ literal 0 HcmV?d00001 diff --git a/src/editor/img/7_dots.BMP b/src/editor/img/7_dots.BMP new file mode 100644 index 0000000000000000000000000000000000000000..a6dc6f0fad5ba93e05ed3dc4c7b4f87be7190170 GIT binary patch literal 1784 zcmZ?r{lUfn24+A~1BfM{m=VlkU^oPn7vhFsutFg5pW**tLporfq@*M-FE2v`(A3n_ z($Z2;P*7D>1!{$R$JW-iqc|3b!aS`Z4C2{91L5X4I5+?`{{R0UZV2&gWcN5bJHt&N zm0@IL1b2^zhX<+J;p&Zzjp63_`1nA?$p{|{3kx)Jhz}Epr4aSV<^%-=!QDwJ!^Xx2 z?w-)lP*SzS)dS-iZccP`bXQqC5QTf&Kp4ccU0q$_=ETRxcUL3<{R<=^h<G+IuHojS zrl$7Qq>+b!aSb;oBO_yCeKvUr7)Nk(a&mGex8ws+Y_J=IK|C86M{sir3kzrVR06|f zdPgY)5zmf@h=7|@T3R}*w~9OjjBB_#6%`e8CpD0V;^N}q=G4~KE}Y&9L}~FM5C-w= z#Kc6nIdye)OXu_e!vsh|5b<naT*J+2YHC`sa3XoAyu2K4PVd|~lpwe{RADeM004zY Blf?i4 literal 0 HcmV?d00001 diff --git a/src/editor/img/8_16.bmp b/src/editor/img/8_16.bmp new file mode 100644 index 0000000000000000000000000000000000000000..f71e87c8c865b1ae4f81910c6ff408b173ddf98c GIT binary patch literal 824 zcmb7=K?{OF5QVLdU80j$Z}kU4p+iU~AqWWsgF0A;@E~CnWONAWQvcaL+=yi?vEl7w z=Iz^YMt5d+j50>>fYW=QmSL89oBMuOol<~?WmuMF{)mqO58*gYvaqYD>L|Q*UAJm3 zib9A=!S8vVxT-1n#J_&u_iGx8EBgQCXW1|e_rbUdS_u(F`47v90Dt4F!m?2moz_#p zbCIZ0XZ&#-pEn*2VLef$V3y6Y?7Evb1k2*TB>`X_k*HE<hR1(Du9yeb6IBXk_&m=a Rmu*9&X^NkCHVEZ3j2D52Ao>6R literal 0 HcmV?d00001 diff --git a/src/editor/img/8_test.bmp b/src/editor/img/8_test.bmp new file mode 100644 index 0000000000000000000000000000000000000000..de79b1c1b041c1094879704dde04cdbec26b50dc GIT binary patch literal 1784 zcmZ?r{lUfn24+A~1BfM{m=VlkU^oPn7vhFsutFg5pW*)~A|?bN0R~YC3p@~wCW6ex zYAmKXaAn9+WSE2I7`U-O2ByhyS!5|>Hdb9|3eXIJ%R(4%F5D=f2r?VOg&Q(x8BxW> zPRUU~1aTpLE`DERx3oaCLzLm?4n?DYz5^nlzu;kohl|UDz@SFfg`Ye44FQG*1VNmN PpNq>oqvBXYfPn!3MW5Xc literal 0 HcmV?d00001 diff --git a/src/editor/img/8_test_en.bmp b/src/editor/img/8_test_en.bmp new file mode 100644 index 0000000000000000000000000000000000000000..510ae5ca9be8b4e422498a8fad7c70b0f2de0af0 GIT binary patch literal 1784 zcmZ?r{lUfn24+A~1BfM{m=VlkU^oPn7vhFsutFg5pW*)~A|?bN0R~YC3p@}F6hY&{ zMX(wRQH*R3nlge4F!jP6fGkC}IdJzNn}BRGTmhT`cL0z96eNiYH)PN<qKb>1lB0kK z;zImf{JzL;X@O{mD8tVkiber_2Sh-B!NUp<7ncWtL5-{nKX>pO0t^iZf;bgF7ngTN K#j%C}0|Nj!h}9MV literal 0 HcmV?d00001 diff --git a/src/editor/img/9_SelectMap.bmp b/src/editor/img/9_SelectMap.bmp new file mode 100644 index 0000000000000000000000000000000000000000..5b6da9f9ee3b1279cbba70fdf03c1d79c940c891 GIT binary patch literal 1782 zcmd6nL1>a;9LDX^Nji7;65&Z9JZvx$#e*G^27;kT2nNCs5j~^_J4pn!O9V}J8SJvi zQypZj7Ms;Plx9QnV-3IAw5iyPT8H}W`^U@9-#YZ?{T`nG^ZuXbd-X*xU-^F4V$>z@ z0?+xs&l!VRENkq)Iwy}Y2>ky4>f-52eW2;->0+_iY&PeN(siA-TrN8t4o%a%UN183 zno;c1s$q_xa%N^`7?uGcjFn0y=0ya9!C<XcBTYESD-i8=yUKC9-MD1SYPCWro6ROJ zIgjLHq|oIpyofWa9G}l8UK8kaI#rI}?>CVk7MII)GN*Fqs=0MCClCmj3&AxtHKooo zJ3EW=>*(kD!yEn24fsI+1kyr8p=FKxI&J&)lim92WY~vu*D5Cz3T?kw?C;dOt+(Lw z``3nh$M(sn|NiMcIJ=0T_NEMx8D7Dz$Kz2skw|3FZLiJ;!LPd?AX=?le>Shg?e(Sc z!5+wBS7v0MyH+`|SZw%3d->pcYjgSN#{|OqHt6naTabg!M`<^g=HMX1wa2#+A>6gf ziO1udaAWZ%Yk%jRkZx;3M94sI@tvT9@U4|wY>CJnshmV2Azl;69jTmTGHD_~Ec{GV zPCA_)n=S5I<z%zj!^1=VE5K^C3RWr=P>3kft{Bznbb7tsf>GgcSmoq$IrLO2g@r*Z zj6g_kG#a8HVwX%&+D1jAQI(U==P`~(Be7#)Ufu{N4I?E+6gVg?cdc>?g#rm;=Ts0f g4eRl|xELT=&Lf=9PE;n7Q8{-P9-U^XoPR?808}0OnE(I) literal 0 HcmV?d00001 diff --git a/src/editor/img/Arrow-B.bmp b/src/editor/img/Arrow-B.bmp new file mode 100644 index 0000000000000000000000000000000000000000..cdb46cafbd279cceeb5cbaa8bb464da151842b0d GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7@;XZSz-kW+FL5E1Dwpi1w|6d)o- z3q)~LaWN1P)B;hQSXGr&T@6G)1|BV*8HqqypqiB0T8PVm42Tw>6sBK-^Ky_CBWnRl jVXBX>sDPV{EDIC_N+F9t*lG3kn1TeQaA_H|;tUJ`4w&Em literal 0 HcmV?d00001 diff --git a/src/editor/img/Arrow-BL.bmp b/src/editor/img/Arrow-BL.bmp new file mode 100644 index 0000000000000000000000000000000000000000..14e4103ae45f26884c6f0c37dd5d98b2a0a15cc0 GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7@;XZSxjkyCOMCc@*?;Jlou;$mdv zotXkO0hbntdLWrrU!T?73_(D4d_@ITEpYW%WibV5tv<S>B(bUrXbYy*xI|KFYjODw Pmlj}v;F201;tUJ`jn&~G literal 0 HcmV?d00001 diff --git a/src/editor/img/Arrow-BR.bmp b/src/editor/img/Arrow-BR.bmp new file mode 100644 index 0000000000000000000000000000000000000000..eea7e6b0d83e59833c33b062d13e19fcf5f176fd GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7@;XZSzJkyCOMCc@=rpi1w|l&Ioj zWE7m2gH?TeMMYYDeO7Zb1OeGVl|YTS)MFYl2-PQ6RYjMSU^*462+;j0wY6BKunGc$ M2&?$e6=Yxl0LgIR{r~^~ literal 0 HcmV?d00001 diff --git a/src/editor/img/Arrow-L.bmp b/src/editor/img/Arrow-L.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d38158bf54d187f54c7ad0dbbf127769236e1200 GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7@;XZSxPkW+FL1bJm76Lc_8rFUjZ zVpUa2ZS8<7jw&vWEGi=C44?v_Yr_iiiB}KN0`w-(vp_EsV+Gx`WHvQrH8-c#*T+{> M5b3Z1QO3Xk04WvV0ssI2 literal 0 HcmV?d00001 diff --git a/src/editor/img/Arrow-R.bmp b/src/editor/img/Arrow-R.bmp new file mode 100644 index 0000000000000000000000000000000000000000..7ed8946e13aeb76ff55838c06212849a7eff97ad GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7@;XZSy8kyl2tQ*smp5$VX3+S<gb zD(}n`psqosC9<d}s<@bVhe6bb732ebM9?EZ&jL*bdVF9N$5&LO)z@b=H)l3A5p?q) IQNX|e04guw0ssI2 literal 0 HcmV?d00001 diff --git a/src/editor/img/Arrow-T.bmp b/src/editor/img/Arrow-T.bmp new file mode 100644 index 0000000000000000000000000000000000000000..1f2a5b4c7da7fe38ae6c23d1726bbb4b3173b4cf GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7@;XZSxnkW+FLE{|Z9^2$iYDh?C` zN?{rmoR{OBnS!PT$OQ@lr7+b;my{${RUvDEC<Y1wr7+b4MN(>OAzFMgQ-BDl7sv$) oVpR+gglLH>E(Rikis4$)8ybKJzsbm!W;Hhh5wggzVKXoQ00c+iBme*a literal 0 HcmV?d00001 diff --git a/src/editor/img/Arrow-TL.bmp b/src/editor/img/Arrow-TL.bmp new file mode 100644 index 0000000000000000000000000000000000000000..536c901da8cf47d11b7293a22a656083d0dd6cff GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7@;XZSyykW+FL@!kO{_R2^mQoUzJ zqIYIWa9$3P>VYbwii-!EdY~78zD7p4LIC1^pcf!0v8oD)Qfg~)c^@d1)!Yn6nN3YV MgiG<@5ocfk0HuTA_y7O^ literal 0 HcmV?d00001 diff --git a/src/editor/img/Arrow-TR.bmp b/src/editor/img/Arrow-TR.bmp new file mode 100644 index 0000000000000000000000000000000000000000..292d30f0dea08825e3c4fb891833242ccefe110a GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7@;XZSyikyCOMNxt*SNG3^3a9)mg zW{PJ<B9XQL)khT<1IYnV5Ahw)gKz|NJbw42)Yc|eRRPr?BmC~qY--ACZbn8xLx}V* J{gp8=008pN;N}1T literal 0 HcmV?d00001 diff --git a/src/editor/img/Thumbs.db b/src/editor/img/Thumbs.db new file mode 100644 index 0000000000000000000000000000000000000000..e6bfb48a73cc2a7f137d80cd20902a853c69aba7 GIT binary patch literal 56320 zcmeIb2|QKn_xOLz6%~buQb?whnM{?;A@kf|OfrjPs+3ZO9HESvBa$)`smQDlnKNge zLI}V06!&(!b-#V?_w(=nxu36nUhngqvxl?xv(K~Ee%9J+Kl@cR*}KTptsR(eCQ%F? zW^rjPhVZNTIPe+qc_PJNaNz@5zPPls^kpUn10PqXf6x(FfPGyDe;x&Z4-f$8KP3Xz z0BZqafE*wJ)&m=WjQ}(O3>mNq*bGnt+W}@^3qS=>16u(afEL&W&;d-q4qzuh4=@0X zz%F1nzyYuTLI5kk2CxHrfV}`Oun*t_xBzZ|2jBxl0e(OL5CrxE!hixG0*C<;zyaVO za0n0w4g->aJRk)~12TXtAO{=)6ajVMBybc^0+az2Kow8}G=O7(CZGjq13G{%pa&cW zOn?)BK7jPc07^r^2rvdt0cgG{l&1kR;LP&8e`oVj##qA34*m-Xj0Kc77)Oxu^Ajbs zn3es(`yV#DnO*8_?Ee}Et@rfdmzBBTpX7rh!Ug}95!9R${?(IkR0IG)m@5cJh5z$E z`TZYf1uKNwENW9|Kfb@#pXVx~#tzepd?VNoLyQ5)=7v2mfPLbJ&-^e~5Tv7)_WcRu z<Dj;QbmeE|BYipjjeJ3nWDGC9&+@rJrZGr1{(N)<KDUe?%g2F5=;wY`J|nDax-1`U ziwmIt1kFOn@>~5!_JJ7qk^ZB0iu51Z2xLc)9r!E#M>YceUps)E06o9}px@aAC9)03 z1|U0vY{0krk8A_70pHVqWEarye5?P+jvyO=^dH#=G2j4j5I6*g1BU?#0NH>Q{YSs` zwf-a9fb0me13%J#WFL?XK>Cli|5pEzZ8#2`08Rq>fB|3#7y(HCk$pfm0O>#ajTQYj zhwm1EC13?u12%vyU<aH9>;VVh9Dua>Jm3VN-*JJ`6>tMC08{`Tz>ofXm~a(tC`ml+ zy|?ss=^chtR#HY1gM)+fW!X|Q9434`JbXNSB7A(JwL}C&Yl+vwM7)6nO&iEQ7bMHY zmoMMGqaVS+CnO|ULqbVHLP@@1!v=Enwt@W1W@JD0BTq48Yhd50@NnocxMVnZWH?JN zP@BRbfW7@~hv7Re9zFpf(VDgEh+&0vQqWdBJY0M{0s?%fFpdi>$KaC@Y}(0rkZ`lo zNg{e{a;}Shk!u(Zr4~{szaC@c*0;H|b{*vwD(bDfn07O>u=4Qo@e2s<7e6c^DJ3l< ztD>r=uA!-=ZD43*Y;wx<w5{D)dxvw5=iM(~@wj@;^E%f5RzP6T?K{Cy(J`@c@%IuE zA3aV>&&bTm&UyCyMN#p~lG3u8+PXLO4R0HpIy$?$dwToc_YaIuOn#V}p7}UChw6oc z!TVCJ-)i<vy~v<mxcKOQLG{AHbwCv-!zb9uNx12t646QP&GcLs*N`9bi%czC%fPKX zMxk%>dL1PrPsgrtRJG4F`?-o;`dc;otzy5|s|iDbhXa2e9vLX(hmDPsh1<7{Uq9`g z(sU!@afl@wM}KC;q=Vai!z%l|ZB?AbT(*Nb4bLpE2J79)*{?h-L*J&>XG2<&*mwFd z=QGOPm{1ZQvx)*^r|QQqljmvZ>U5Vd<Gdq%>V!{PW~kM}xuTS@vN}vP&10g~*R0hH zyc45Y7-OT9P4`fi3ejzKK3tQgM|TX{e&9~;BRj1F=VGoEYd+-cRFgcBYeU7c?@;%n zbc(mGual|Ay;A}s57s2VeP`e=Qc_JfvUp2lC{IjV?V(*CUk_8T`9PCbEQQ0Hdod5D z>~nL)>^rVcrd*8Q?_DM@BPgPCG&GVXKUtDRZ(!KIIhWIw@{?q(E1lb^2l3{PR+$Ax zoD1G3_2V`Q*^dj?zayM%u&7zWoXsSdbvRG-iAV9u66XE3WViPFdl!#HU7t)1W%DRf zJ8Rrm$?s6s8B{8eIg{adu5IIU{eiNy9wk}JJNL4f<GVu{hX)#aA~p+~nRYF>il{$p z>uqaeqcZ1fT@xsIt|wgm#7^wl#tb`55Q!$ADrPNnRDJ}WyT=A>G;!9mX`9DEc`ad0 zG8V0A&7-2398bmZBzagex`-RgsuY72EJj$_9EG&@>}gP0YW!j-{)P7y`=h*Uf6ka= zX}dNsQLNgZRr~W@!}|Y?{js<c-S0r@SGv!Dfg~b?w)b9v$6k(6lC5XtIqm5MUTyJv zNK8tGWBlyWOU%u?{!f`6d=kjG@#1`NW2<3fvnS&%-100obJdnCw(M)W@i!$trJWF| zmZ(h=+t9*We}^c5d*`8I8QNjSO+>e=FUVf9_IhU$>%#ugee;!MQLSvVUFCdz_}OV` zI%(SJ0f9HfhnFz*!p4+&Eha3-lzsO|4jkk#d!Sj`v`4$F{!z}`*~KMH;daK_9ZvV3 z@J+CtD?TQb8K5L-J;}{_vD)?}k4BcW_BeIsSZ;Gnu2IfeUkmQ+^N;*55gnOQ`Pg}V zLFK9~>)SbwSk-{o@-5^ITrzx34m!EVI2z=&bdEQjGvG<Nee|pub6iZv7V@qNtb9gT z{X}|aP0s1k`vnAJQrDy|ZyGkr4AgqSWYSK<(Y}}Q?(;`C%k(B+y2jw>o%nd~Lf?=B zUFh*odgK~m8t!B1Ouem#yIX>lz5OkwHQep>IGQJgbMnY8C-C#LCX{CL#1ik`?Zj4V zQ8uTS+4`8RD4%Bub2)C!PH#p}dUh?wwWT{wB&fS$*g5?MeGgq{8+=Gbbs~Y4XSAGV zkWG-EsoBPqu`Q$7Fi3pZW+*=#_j<JKr_|iMq@LYOAXQ0z&^*wS<LZx0(~A93TDCvg zYvL%AyooDU?a!+H`GxjphVD|qdS`~tWL&mn<)YmYWy%$Lh3rOmWM(zp*6nzyz(pui z9lL~i=JnBK33K4y5@xi!;FF%??x&+v)lsKp)+Z?`G8A!B1X{0AyQHPnl6xsqO^02E z3QvTs;moJwUF#1~WT(A0@4Yyy;j_r3;_mKo^k6qx;Q-sK7Y3|OT28eed+HU3xtog( z*qlt~CqMQ~$9}4=7_)35D$L(DX6><u^0j$mh2V2ev3(&9ZF?HZkH-lNoJxxD4QI|B zCm3=wzi1xs(X%IfmmBwbTHEY$^P{dG`~5~GT+^TN8mX+`&D3)mD^r?L)8qaqzic?y z!7_W^7hf&x2xDloznY=Hzm2JlioM2@fM)xV<^ij=b>o!<9!xrV%4HLsMR)Tv1Co!> zWV8}uikSjARK<iYc|Z4ljz2Huv4k;gU;pvAgu8TR%~?<93kU3dN^OWK-*Yr?vz~h` zAvor<)yDP-7@x4vGudHHV0`i$%xAA0BYLJ95)z<_jM5c<|0e<cnMN)g%_EH+t~}$H z!};FC<;lqmM`LFnEMc7W=RKINanL)8x>T&CdP`0h8j7nV;liO4SX<toV>eRkA7W#g zn-=|ALi@Ge#^f@aU@i0Avi|-z{6lO_%kRX}J&H;`_27r*=QsZ=X4(E6XLjEq$-*T0 ztL)E8{KF6;FGdi1For0a0Yo1RpfrT&g8|GF`0S;Azf*_eA1I!IVg}$|E`5KkKhEWY zuX)S$U6IcT@^~N`V+_)`APRyaFoMg`AOraHqY2613JXzu;%DWfnBF*YdSP0TZwR&L z`y6#a(H~;~9TBt-g7D7uW##X@Bl+kYf(!htd@Wda-#7I~N1Yq?ffuBr`lBO{jtD>O zhXB0)XhQNCU?GZ&{;YfyPh5%rtoq-p{x|sF-6_M)`n7~LJWjbG^nOEuG?W2ULo}&7 zyxmXE;7!u*+cCkZCAy<7Pp(6U&8*d?uF)k?CfbMX#!2$4rJ9WqhJGm}&Qoe96tr|n z`6kPqWj<QHRKKBCFisc{7Z+_#@q$!0d0wt3&RmYa@yv+6UQKg(nqzFn1x=F9yx!-9 zIX;g&LllWkw_XYB4$9=4zS$~iB2C?AB(b~7gXN7<yO}>mP@VZfuAGbRM8&hT*!|W? z9gZ>zwW=+f9jrsrwDtVY?>36gyzgDXDw)<G98|E&!X!TLL;44izUTYv+IBq5%JHL( z+IF$NQJwT@<je4^g%PU7LCY4Q8T+Wb@^|);=8oGsQ`6^9ND3@rWac%3^0&M7l@HDP zrZnYMwaHV=5v?gxelAm*Ep}?kJkvtj)Zx`a^TmO(xJ?T3rSn>BrP)F@Dm5c>r>k|x zUtY@N9N#L!+BvV8Q#*2ooxs0ndwAx$7rKg8w9*ZHeSTKtDM5vY#7WOpk10O$CHyG# zqUrdxf)4upti{SFnRyd#kNkwI>D7XamoORmmGkx^P0hAp@l?AgKA7P!zr^yMz9;lR zZ7Athid~9K?&%rx**j|Q*eSHKv(@rK{L>=MG94^ihiu)}3-3%g$MmeTY;HJKMl+{q zeVs?MHK%v+>vsqHI;dRYtE+>q<wbN6kgFLr+U+B?>(A!tscIQ&ZBm+NWv##7@6@g` z^e8kgTuZ(triZyq!MrkVq)xxa+KVEYpk^ljNx_#M^-BM_aoL`>TQg)ghU)D5Rp+l& z`?YGnz<zc11}m}Ab0sDw^c)-@N)?emY#b2AFB^hWj>#%1#EbIj-u~p??OZvwGdua1 zNvz$yqwg|KiyTNU>AEICH&Q#Yvxhu10DnUA{F{c9YtK4$WBRBioyWaeu%>ds>z}FT zZOhe4Vfc{O&i~?FDhH=?UItcK@kza}T}4)pmWB<jm)|TcU7eDKCEv@fiLA_fKCwop zid-0Q<k1+Nr8HfL7H{G;m6#WtzSTulrhHvTBKuUP)R3@Ph@0ujg=qC##~+8+f3--0 z#X##;v<cBGzd5h1xzi<GY7*)@l{7Mq@Ulz$>t0Jx$4Q8DK2A7S>XPG}8X8!}bt{^w zGl%11h}9w;*KhL!lA>8;xh&YC-iupX_YLDn7gh^=U`Q2BQ<6Aq<ftc{6A~|9T2xw@ zod!Dps7FaXO+&72Zh8p1u#QIjvi`TCSp+lrLV8bgnhF%JtG@&m;aK~h+~^hkr&{jM zh@Le!TD!B$ZB_qQ{pVlkKR1p|B?nZ7`QC}2?bYB6RHKPKadb`eb{%6~{)$H1pc^yJ z*pi6GE0Xh?cm_Agq>1u35K83}x)4}p@JHmR;{|ZsoxyWp5WRdc;_iq0SC0xA`0z;A z@T{G%DBo7$z^8d{r|jJ|_acvOBBnI>5YQ*;=v3Y5a@<WNew%O7eR-D3U4o3+v1TkH zlyNE786Wvnsy9*jwH=5_WELp2SVK*FufN&H<9ctp_rX{>O}={zlh`E;UvGuU>4=aM zs!cCW;%(})B_+o#Q0VaFKcr#4I6j*4_Nwhn6>jqWEJ4A{-NS|{Ox?q!igLNRrz_5# zr3v9Z<sCY4vU{grWFbK*zJ;ISq5T(5zX%?>yu(*MS9x<Elbn6a{Oul9>0ENA!b??h zgyv646P46NsUw-11LXB)uB1225@=j_c-FYLM}5LVq2@};Zs;~V;rLMJ(K#VElP2*v zoYF@Ft7V9#&pl$Kq(=JKf}}$02I;}06!zF6a*cuuPsIs{*6`IjSC&<_#?o-8QJ6{C zJsC}y))G~eV~ctJ+UAzgZob~yAa11_GR6DU)3zYv@+b50oBz8Kf9s1@GHd@BNw;c0 zR_(`smi?$7N*dZd&oRs+(<f^ns!5l3^6|{R#i8DVc|G|ClST6nTrJoRZ?p<D)K=ub zW6drUEx^@r(~;D5czkc=ByDNM&BZ?7aC1S%prPaMRb+Z)UoG|&)Vn1vVWct_n)MIn z_KJzMU!7r~6MNl|fDDYon;BQPhMqUxFYDFfZuMeAvAQ*nWEHFDK8>D>9vU}2DziTL zaII`f%{>|!HT8)up)CPbdYOG@#eB?+sk-@zn%Zxr%^UF)*<CH%?CoFBlzE*wrXmz0 zRHYWV&}6`_(f?^L(|g(Bf;N$<dD0QrnWtytHHdcebuT0ZK)@`UrQgAY_q^ksjPuw= zDr}d0PK062o$V}l^~Sk9RDB&Q&K$6*YA!zFmNQFpzG+Z~uJO|_{m_s>?@(}~EnVrg z&T_uz6ZwYb1GaP{lFzfE5}mmZ$!D?#=Z+GarA(|#!8tKdSy`40l46OEDU7t|p4XdU zEw!47D^-7{$><?v%IHYXOj?xAaQKieY4^yPfRhjL^)9DMP>l9`Tyx@X2Vs-toop=# zyiKdBB~#Sq$2S_zim*TMkCrG?x)s_SqM%zTxo0<3q4q1iy-ovee>ObJ0hN{h%f@B@ z<<of%(gVlnL;eZ&hZIBlzs`SHiGQKYE2Ga*ual5h!wWGdeTae?!RIe=!R5pCrvl<n zpW{v__JpQCt?->0&M<HHH}N-Kh<c$+uYK??2=4}fKEU(&9c9IQe?svuBp2lY{;YgY zSohqY;&1yvx)Icy7hZz!i4XSVB)rfb{dN2g<tQQ9X!`zM{&8*ye0BRqKIdndDDUkg z$onFh>vQ~%7vh3{9sgVpzlU<OepY@mtjo15{~~<81h@m2fh&Lqa22=)pq!!WP~HH% z0B^tt@C9xHegGEm2W|lYKp+qV+y?Fd!2tT5P$<KIa3BJ>3q%4@Kr|2o!~$_ZJa7+4 z01|=wKoWp{=K+){z(XJvcmzBK(tvaz1IPrjfNUTK$OZC%Cjk150w|vXg}^i5Iq(7~ z0*Zl`KnYL^lmX=c+O87HDxey81-u4ofLfpqcmvb}4ZvHV5kT8DL)ikf0&PG$@DAtz zI)N^r8|VSh`h8Ho2l{~lU=SDrhJg`a6c_`>0kr-klpla8U>cYKJ_57A954@j0u}(Y z{^y2@199us{HOnf{HN06q%!u;>WiYVz0!X4-kbV+O^*$pk|3VX$U0ZDj@%{eME6L} zPP2XIE=`{^4&2LGLq5sKh9z^rCwXDW8f14sfv{JtN)xYdI_E)%wXn6K6G2W%*;bk3 zJqKPAgzj+Udtg&Y){Yrg7a%08ODjENa#QbVzOIwsTE>z_wKW&TG4DA2XReU5@>dq< z^QV-P=a?_J>1|}4D9~HNqzoqf@a*|}{@@9GXjm{YhpT4nKi$djPdI<B<`1sqMgHUS z2fJ&_moR}|8n3z-#`|_SU2w53lIv#PC1YO3^&C&&rCJ|}h=LT=8H3<5{}=n^!=CHN zpS8$jj`gx+^*Fl4(fE+V$)lEn81q@rrVZM{8ZpF1x$|cW8Uv;s+s>cJ=bt?}nXVve z9?j@`+v}v+jPUa<*Syv5mA9%tsoO)n*PE#}i1kVjTRe09wDt9bE&Ju>EIEri8MG2N z%}`|fPuqJ1jc@W-&`rJ4!&Dc$wXKX(jebB`+akoO%z?p9tb**VPgiCwet_h9n`eu? zazakGk97)<dI(b7;R}mrUVB0{EJ@SEy0E+R`kXL<tba_Hj_uH}g|C7UO)+<Rb{A!5 z>{-e;zH#M=bqNytGi;l5Gv0sbRkGkrD7Q4FDpT?riE2u{nsiQVUPmdrPIw{WRBcS{ z^iWmnkWNKaN2m$SKJEsqMD;eJ+_W3=r$$LzO<nb$4HG}&v5_PTcpb~3X~3$kDnUp8 zf}Dh0i9O#dwxT|{HMi8PB5`-LdRiAX+nJhFuCn*C3KpW14(76QYRq+tGHkrcWZ3ki z&LnfwaJt2+dfxRqmF?3@7>4d<?{Hc2`9`5k6Ok?31P3L^HO%*0$0cvuY@xT%Us|Q8 zGs?nm9x#-Y<a;Q9szx_eUA|2I^uhr4EYnnOy^ViH*|ZF!-|q&A3TzG@V6tp~PGo7- zlW<L@uiBs0_`xrXAN(8bk3M9-y%d+ms@&6AbAyy|{*ZG;mVRR6v*EUwD^>g~4ETFo z`)=zG7T;Gj8euy&K<O1!d@I<-`lxf&fU>ux300z>ZA?MjWA?M>)K7aoDKcW47m_rS ziDe4SR;A;45X;;!t#m1YS^-;c*X*H^O%u6z!sms<w*1?SiTlg~x6E*9HMcyQA?tJI zEJ-R&8x}kuhZ{4j|6Ist<8E?|*Y8+W!x#seBTUTf&f7A#afT&VQ)N=H-OEUF5!F+V zm1TMJIJ~AOQ!1Y8hPAhXj+1n;vX=>%Cod6$!X->olXq2Q-_X2d7*j;1vHhrio3R5) zmq6pi@Z2kgdd@<5S+(p#%AX{x^{IE}NcV1vdU*6uMA`|;b!Ck$7pWLcNsr00o;IpG z&DTSd?W|pTY*;Z`-TAebzq)D68?VG3f%D1Pk|PeiGjS=7EbU-}1d3(u3uMJpCfNm> zTwTIEPWKj9pLAF#D4FH!GQnOEomLobtd@AGaQ?LfMY}?%>3ylg%|UMGZEXGP=gZ`q zjhxun7;0lBd4ky0{B8WT3(m)c$vm-`3XK_l^aLxzh@uKB_Gjy|{W)}=A<fLpzh>3` ztlFPnXn*DePG@orXejHRb~3m=GCyPK`pQ2;Ch9sK)mhFMW9FDP+@Q_Obc|=VI+@+% z5Aim)-V~M?d?WQ%?;(sW`$?<hHG-Z8v0Mk&=s1K9>`(Ei9J#-~>-MOQa_&W+V)N@c z?mYf1I3B%Mt}_=OxO70$@IX2L^*kmm5^MNbqO<#kCop6-Z#Pt2!5(idV%W&45?Yd& zJ}8bK<KLiXUu*bb;!X3Dyw_dTRGm#TcJ}RhO%2r&t_>3=@%`s(UUtgUH`PpQ)erPq z(=VhcL<--yqeLy-Aas*a&^#7L$&+}K=7Y_J`yT{YcWv7sq;&$@G0G^Uf92JK*8N>o z<`vi0$#Is&9q?ANzuQ(Q+mWo;SROQ4Yx^ovrAczmIbC}zr_Lv(S5q=~GhSP8@D#mC zmrE+zb76A0&-7URzM7V#>m)U^6P!MRs;rVYxQEXN#&=O;DROGg;*eXV*>K6lQ2I^o zPl`Q~NO{QDjD@*;Q#rZcwXOUuvTUL6c|M87ev+=sGl|qa-E_8PtH|XU6<s-7j_~u% zEe9<M_b@sNKl7K|)ttlU*BC&582^^i0lMFNF34N@-G4fQIx#R6za!#XH^gH7tL(>0 z{EzE%_8E$Fq5CgU&L7GFL@$&P$oXaGzVp5ke?uV!G<|24Kh4UAIfl#iU6KDK{&f-} zUHkyL7n2)6xqv7u@!u=I0_015BOl#;Y5;OLL8?B~7~Oe^GV#9TK=S{o4l6TI{Bt*a z;Q)TN{!Os%H13yQSgAiZNJaU7C<F7$U7toE{Um%w{{-KcmA~_jjz2ZbUkCiG{9agh zd|CegCV%GN5r1BdKmAACe>b=JUASk5?O5}Xx+y0%%9AA3yhSfKH&HO%q;#aUx_9G} zW`~*+&N0jJOr5b~$sPCIBa32>JQC(^mb0`b*C6xIth=wx%ARC%+(w8+zM|req{;?& zr;d%AKW%?B7MR*eyq;smurkB!{Ru4p7Uj|{A$X<K=Ne^2Un(ahJz}Dj9PHZP_gtRt z@N2QOhN2va;Z8@Ip`>^ZN8da2QhRSDaGE*?I0W4~P)f~ifFJPwnbPyRxP`RXEstb5 z<N}+g^78{TGIK<(2b@+e7ObtePHZ_d)N<>C%za*mxUlMPE$$zcXr=$QciA3DwwMgh ziAVh-?*CZTzyF%})r9Z0^Tm<z17kW`^4;RoI=1NyH?Sqtw*!^sHaRl(#UI1*eRjV0 zaf)=U!VVqjs(My0s(hSv+4gYbIyYGhGkze;>vO)(=hQQuGd0#3`klD6uaw~d--~QI z2Idm|r!!Rt`>&V2c4n}Q)OCq!>g;%wt3?~BzU>h%OPPPbj!RsURuvlu93_djZ7oZS z>$@5nvk-i56hC$sP4VfLgn_QLY_a$4mE7J4y6n$O^*1ldXpNiBP48mc^<aQMCuiu# zS6Bb2Yv22}qJM46=cAW*um{|SH7$Qt|7Z35x0*i+`J+9QA_H0qnrF9-4}O^XuqZB- zD$e<QyL-NfYj}7;757bXmggHTyM>2GUBt?9mT!+)!i0xkDu^m*TFBg+J7ifsEZV;N z)5q>b3(HwYCmXvyv1GSqk%HaXLwl=-UD2Xxx5~;T%w9`NliJX)&qyonzj3+!N8y=M zk<jexU2XrX@q=F&Kj?mDB)8eiZhJwuLtIVLm5r?=B5N6DHx7!6F4`x~b0`kTECwu4 zTq#lyFs)5kYct8O5T&FVu!|}t#HP>2w)ecmXboHIV#YK5LD{tay35&)A@NGgiLzKP zW%+E|?Ci-W^fUbwBTJaCoBrq1!ME+d&_%mc=iSLotL^{SwEq?V^Gntb@<EZ$ee&}? zZ${w#eu)PBd;RYT_~%#r&lUNCAd?sTUv$468gU7Y!i2_uLU94!?{yrO=P`r-%?O`q zfS>h$7h&C*Z~SjG+LQrELOC}m;|7&qGJp6!m&@Y*R3QJG9_DTVepdcE$h-JfKFaw) zQaRxrMIZLTu|T6=p?Um&?f-w4i)5qePdoUX8I&M@cBQ|yI{pkAf2P~C$SU%2gYP5^ zz0mMU>9~oI+LI85DSS8Wt%v$Xu57>H|LNsa%KIdB)-<z2VFGeNclHNty%EzdP|6b= zv>zM6R?lXU>N+!(v3H9$Z=^!#uJVd7S#OCNyHLYmdATro#ehMIOw9tPAKJh6<^Q8E zq}5j<vi|h1vVUl7CtLszzy}BbLVyTZ1FQv5z7R2#B*1!L1F#Vw1;~I+z-E9Ppa9VN zTcD%@sDZ5j4L}QQ1GWP&rV(ZbuoFP*GeF4*>;jm8-2gMd0<Z#X06VY;K<n>?av#76 zZ~@!^55NoX0sMdfAPAuKg`gA$L;z7h3^)KB1P%e>z+pfFkOZUvw4Dr;vVa_L1ds<5 z07c*^padubDu610wo!*t1JDGt0Bt}A&;|5>W599X1aK122hetgP#OWofC+F4Fa=Hn zX22Q19IyZ^0kn-Zls14ZU<aH9>;VVh9N-9?2b=(Bzy(0txj}gWSoMEa{U7B2=zEp8 zke?OnOZc#@KdGc8Du8a7HsTeDi(njCiIKp`SK#nO*Ez&<j|yd6nI>WoZGlB8?^D`c zEZYiFdluSv7gkR%6g2fNVIti08|F=>QbrfEN88`pxDNWi>s!JEg|`penhzE9w5Cjd z9g<t=|E<`+CFK)Aci+Ce{j2QXYWrVp|LFYx#?SFAyI7-u*ge5HYlT2=>M0e}=C9V- z$FU6wWq3^Q#uNQSyC4vEvD8@5pbi$fzq0?L0If&?`ous1M6NdVwl}%l&>4=XFDRJn z%XT|iI^X8z9<iu5zcIbCARY9;KC@Zut6soL`|nsj{|i;Vz8!qEaeTG?{~G^ib^OK8 z<1hB;->47{ySG2}z1ZBM`;$#YJ>eU=MX2n=7TlDYqIP7eO!!zgixzbBA0RkScWct8 zacT)er@eT631c?h(l(k}u>0}6bHpTA|Jm$<p0<`S$Lhi3)76&MBTmE<PJ1&;moQ=r z@sqZ0<@a?Or}}=^fR*<DcDeocV+#awxn8ENw*Oz#{#X2ObiWT8frcBrUo`G95BT87 z_csDKVabms<o|NP!VLg)D}T!Wq=$az*z*6qA|Ku3!vER-HG&dJMzYa;IA{c%A5Y-_ zf4=_*$wt$U*Zh462go1!Mm`$*2aP_2<bJvT2GtzJ0=PaOm*2Pk<0o|e|BK`=?|)qS z{crn0zRoxK2WYe(<nf~{1QdNi@ejk#nE?Fo`7iSiKG&ZXMEz|2r9nRTviw#1_r?Al zeL<dfy~6er<HlaGWZp8$g|{aPh7H8xmoVD54^|WTbkzqIL_N&XE=wCw4b658j+Yn6 zQSkTDHW!#oV42**m@&9z)J^B)zJO@$v#bibd6g=0p?bSziudq^I@Z<A*8A(6>0B87 z>cqd?G*;|i{c?M3V;b8=eb~2Y)&Bh&`?uQuKezwxTTv0AoW~`K-Ht^hi&RL6OD4sO zy*RiiK38XVfp+5DkO<ox8^x8R!9%fv<w18?Z#7?!NnkF`!1@aLN3hl_y80a(h2R&l zwpyfeXis@XfUJ3uvg$3vW*Mol%4$C|{sQR~hd;Oe-}B$Zm+jF=RFvLG3v=^o`(JJU zzwr9k^hZ~+bK5@A#GNKJ4Qy|6@H4$$D{XYP-F~ci#9$MB#8gtD>fQH*1dhjF&@~Rq zjoJG##S$hk`cO(8ovvc2aMCGf5))21t4|igM#U;uf?@LBIDM0_R&s23I;>msZD|~1 zL%W%YsM@WYkISdkGF#+g@Mq<O9`3oqb(12Oj`GvlF{b#AVTIxbmCbsJCml%0ZV2_X z^4t`*#?<J<nBAe4oH?sT$9aO#>^f<*`reQr#jEk<ak+Gk>#{SnR20qE3dzJ*Ds#!? z>WQ98x2x5AkYVyYW&2KdWaa!rv#fu17~(-?mAZvh{ae+)U#NeR=9}aM*+-K`4tX+O zbynuOq!v{Xq8f3V8uQjZ{3`nzU8T;T$6M~38*VAj@Z7<1om{$PUk&M#mI;SVPse1Q zCI&l?HAnhYIJq0%f0_3XLrQq?U|@;9^bVZ5ZLz`bhdQ?MN!|=>O<jlK;_I<Wq#3ok zgTbjj<SLRrG~7@yW6{<+x@Vrv!cAT2MV(_vf!IU;TL#;;wDid-STbhKhi);mNU)q9 zl+1kE-Sv%Lt>};Dvi_94X*=QM<E;Kq(VrFn3qAV=d0L#{eSFD0Mps1jKl?vu6o?;9 z$p2%4g`0t&^*_|W|FBv<UMuoZjyK9aN4eL?3*~|RK-WLfD75;pM?ad7e0Es4^Iwo} z0P?>be*$@WC<h#Qy}WQFP!>8G4+4#g@jqOD#-RY&WdDMEE0C}HP5r-&`ik=3(G_4+ zZ<LFUvhR&yKaAnmzdxb+?}bGxKIr$?`r}+zkk7O%A1+?6K0hV>AAkSzRD_3rf3Vc$ zPu$iCr>434GtJl?G#-o7lsquO3b=E>qi3pX8PTOGR9kn{!eki7q+^hn+O9NhUf}Q} z#<7+I<+Q2viEPH?zP%*n^i2I2_MQOUXqM`+y<Wls?ZkFVm<`8I&&ek@$Mo|!G(0>s zj%Ukrt#^yvO>Dl7RM_3CTB1fYIsxNtxgDCqY)PloH8Qjx#53Ago7tM$Zfm}+JkY{p zL2pVTdPLgQGEj`&py!>~4SvStX>IK%%C&|W4RZXk?Rvhi9+urom6aVx-v20#C6ik9 zSk3soJ{MY=AfA(sWuYpvoC@FR)U4RwmGOIAyw>j>ID_}-pJIPk^$$Il=^w9uCF%7R zy94W_EYI@Tw&aPI*$8)%oV$c!uwuehyxpto_;9gr@w`c8r%+67SGHY%cv_+n$B{E7 zsSzBU4~@Fov?bdV8tE6B&bkt=cQ~Ye@j(maCd!B{Ypz5It&x7ta67`2o53;BL25p- zC-aVSmuAgk;e5Pe8neIcTEANfYHzPyJV>&}rb72B;Xbl;n-(+K%_kNMQu-Y=9H1Ed zPT1+U6T*uA2rr)x)_xKe;+M_MUDcn}{{JuR|GO8?sh($47{9Prw5qUI(mCS8g)HhF z7~Bh17qA-{x7!FGPcYNSr@4Bxjvgx_Ix*2nY<k$6(S|psra8}M6S;)dk@Z~93f-SN zJZDU%C~KbF>U+IA%MZ)B?*ipI+!qH4%DYDxrv&@rX${qe_jX?C`^4I+(lI<;POW8< z?O`hHp;el1mSEnYg&%1V<Dq6QR<0H?tn`@eV0TQ)gx$`qK{sAEw@!T+jGU<wn7Z!6 zzggjacfz_y0n$~ZGOEf)m4i={<|<v+P*Nz>`qLerzp2`HKdk8AhGqS0<~n2)=ecw5 zuhPGZ&=<S}xC57gD}V=Z6}Sd?0@neQGvo!OH{b*K0yhCa01Nm7w}1d35C{Tp18BQo zC_{iyAPfixB7nO<BoGBe12F(vKMu-x;2w|wBm(z=Bp?}h0Hgp90kr-jC?5l9Kst~C zWCB@0Hjo440(rm_ARj>6J%zFmcm_NNUI0ZvG4K*70ZM@~pd6?G&~{Z&Rs*kq*FX(W z3)BH`fO?<-cndTFO#s@i1<F>S4QL160Ubam&;@h@JwPwe2cT{Gp&S4PfgxZR7y(9s zF<=~+044#n{uGqczzpyam<8s5dEgVU04xGa09?9S&Hq}>e?|GPQyUwL_iX4ZOkRjI zwY28aE6a`b+;*YK3&XzlWrc!>%sn?#=?^-`*N88Km|EgLI#wJT<w<sZ)`k=R9uf6X z>)IXXHG)1dk5316RBm@-D}TGEdtQ#O)JRo;Gj0QwySsZ8XW<7J>Xh=6ZR|N;g^bL{ zPds{U?Jg(TvR|f`;Or3JmPlPCjj?cb<n1sU`jjm;UHf6<Y}gW}rEhWQFD>ed{p4M? zpKWbn0#<v|{}In0_)oZhb0z+QqCaR10CWW!-T99)(7#;$M|T70fA`#lX8xV)-#5Va z$S?n2EAsW1qdoc%^+4l(qWpXG92}IFfSv~QqY1@7!0aut!V0MT(RyFczXS3ozPbL7 zGVS?5CK~k<J@*GifzbE^oS%=2;Mbe~;q%|Ae=NxF{YE}|`ZJ0_q0vuK-O*S8=*mC3 z7r_|#(S+*13l@?CKU@D)kgvad{8yh}`%_Qm{hyv+J9}wR_xPsM+Fng>hFd5z`Y1D| zvyK)TzU9YlcaEksrt#F5T9ZgXym3?OIRn+}BgLJ)@_V{j$65p&3`;Z&s4TGuy&@Sm z9iV2`<Z)#fYkM4dyj8rrWV%K!heefJvh2m9t4*SF7sN?e@C|X3k}6&a@4bJ{XM#;| zr=R)Z%jFzf1>PJa$a^&4YO|&(ixImPN9~T=-AG!oT?M^6i$~;L=bMkUWEO}#NXdLO z?bh;YTC78Sa0z2MD7=Je8=Z05`^n#bKK`4?_K#ZJALp;w-=^jEd{NKpO%i2v-LLAu zuIBHq=I=uPrE>}6!c%drN;CHY-Y{mb$jAQhu2|#t_gl2MBxC%uZ>QaJS@2Cs!S%-d zw2)wMv)iAI(s)YI&3b@{H`m&l_|UukSk;;B0h9YKpO%`-G3h_oV!_W){KVYcU`z7; zTWvQa%6Ahn=chV&eyb!a?Z0Zd{kv6FAJwU8c3N%!tMQXx7(eMT96x;VEkjtgKwrk` zi{pAFxglJs2T2S$x-Qr<NpIt_;&OU-e%-qeJzwE+3-0Pl(T$?friIg`FOv^9#b#?g z*m}y*i+L^cnSd6j;qDPC+J=-<&2vMJqLAkMpzqr@|MeMQrTxn;_b2S|NH5)3mqfGL z{#V=oFKqvlLhYNiZX~#MKCDglnO=C|nK0_>Kc6v?6ys~-Qa{mcS0c16h{WbY`!zY+ zlw+DYr#HHt#FLwLtbC@mR*8|AwoR?7*S|tn>}~Cq^|_}*qt%0a*r)WAC9Xa<?NA(Y z3fo^o8SqJjq9J5g=%L|oxj?y(ee*J*X+Gs#rGb)ED!O#nhK7W9o{em_NYe>;Z77%V z(Bq|wWR8nuf0vet%vLHRz5<iVI%S!&mZY9aoX_S3yfS!B6=$Z$3(CKoQEd*8W|1h( z@r;S;thtQsl~uIe#Rd-?<A40&_eA-xmF}z0EBbe6S^vt_<pZAEdF=UF{af+B&~<j? z`x$}1g*-5H4IJekqY=o^b?_feEB+VqJ<#-{^}e280RD&e^8T*KN7ww(ec#CEL0A8g zFNVfFL!iv)A5DM9|EdJ}O5eyw*#@Zg=z9MbPmB+a0?G*B{apT)d{S7r4fxsmH-mis zZ{&Z;KR|i+=uUWa|2xV*N5>x>6`mi7NB;M}od5nF<PR+OSBTfbM7)6nO&iEQ7bMHY zmoMMG!;=ieaqtNVN!E~1l8{iY_P<yA-_ZZ=abBNPWKn6>dC-WskX{zsT9TSHKz@J7 z-bgXfsBH_)Q=!9dJ8>2T>l(Do9P=32o2#W9YhLG7Gg7Q4f3&aU8X-qTQsN}0QRc9T zrJ$2t6T#ajo@F@rvD$82I_J7gBhL)Y25h^=kwv2$A6R~MlHpRhT1e3rz8QbMA@)VX zz>6Io^1f?54UbCQRxy1W&oaRs=oePM*Ww)QVQ#t;E!m+#d9iytWF}MEbb?Do^wNSY zDx+rv-}TW-y~&QZuT#zL8Q#WMmomJ^Wpll5hO)ec+h6s0zE;K+`zyGt&-)COt)A=& z-te>bcUAw?zS~W3zkJ2x>NU^nSpQoAfkC(L{8W^t<F_!)_{8Lgsp*-IvvZJMK!*dv z8>~!U{yZF9JbVH|qW_xl<L21jX?Wxbxr|N9<mA^5^<`rP9c0+aax<9xB(-j(K0O+} z`vQh`UH1~^l-maF#*fDq&0MzE=}56F7da5K%WoLvV5h=z=51lWOO4rX{Atsgy&rkU zX`an(xnP$prc%$-ELVcH8f$55E@U0a4hXWd$;nzz!;rwxtFBH>#7k7Xgz?-?QNKtx z5bPR~)F0&F?{Z6Oefm^hO@4EhUdGGKkHb>$=aQ~bQ+|ore9Sm6<9uAsaAu1OxnYM- z?~TW5X{Konqx*R?OMX`EepA5}{i9pfKifumLRJ<h)m8ml^*_FAST6l7%krCH`Q5HG zVMy?BAbIlh{WA$2m2`4-AKsdGJlwMR_CYreK8M+yRJK4m&Uf7g7qXrvtIP|v%SY!Y zY^$@%^6Vk4&Xc)}-w|N2Qx50po`8}ToRXN25}nEX&w~$R_4Fht>P8N#TTw}ES35}L zht+zrhSlu;xWkJ<>O4WWZ2@nw9UV==R|y(y@mp^mBo4&6CbCgHRKr`D)B4RG$|cMm zd(jCWOP_czyZ3d$XW49G+J$vPXARDk^~bda*9=O%`bx`I^rvRIKNuc$ttjHH{<c;9 zS=FCks6XSCN#uMRYOFS%@hJ$D>Sc8_@F19Ic8u`yGFKC^vMr~zeoCXcJv#Wz7DAFs z{5uPqi@5|<N*GdzyaE_)Ya**0MHHFxNfx_ZYho4jPOcF(?lKux_u<Ud-ou!<>p`iI z^jA&(w{r*ju+sjwEuTMLNGrZqm(oA-f2IAe_}|FKL_R0F-ibhWUL)TdT@U?t-+%o9 z{Lhu^^(*pGzB{@H8jS&m{9gg^eUT@OMu9`mp#0H<{Qr%xkO=r${~HHv-G$}<dqut> z)D%hF2QPH}nHRpJ`yaSrACMpZqv`L&A2xz~7W^;2xFR1#8onHNl>3irkM4UwPr)>T z?|)hUf7$=v0rDx9>yL7VaN#>1fDaG=ga8q+23QNM1Bd|<U_Gz_K--Z*Nd{~JHUs1U z1waXG0jL0KU@Jfa&;r|l?EoEseq$$;^Z*0E2<!rwfZYHyzyh!WYydlew&8$sFR%~b z1h@chfCu0O_yB%D01yPwHbPJe10sMZAO;)&4g!Y&ao{i@0Z0N;0NPFlN?AY-I0DE6 z3V<ST6i@<`0Tn<MPy^6*8c=EiT7Wj71Ly*Jz%k%BZ~{09=mQ1-+Rg|{W55JB1(*V- z0W;tXU=COSmVgz2wy}ZI7O(@(0``Cda1L+;&I3+>GvETa0&c(sV0HZc|A_JTuNEzG z!gHTaMse*p)!h=kK`oPoF_m4DRGjrfVy=Dn$ex!3NzO7?)tDSSRR|B=!x|E_*r!y; znP5n;4puEDr-C{OvpJ%t9U0x2nWl78&)_<oRDG1_h1K+;6sWS|EUY|NO>&{d(7B9I z@MId@Xs97}|Msi>3h8GQw62+onW#s6++AKxH-DaEJR&URb@T^XrcDoY)MVuv8{(aE z6DB6(a%^iI;>CoHM{EBvG_rF3Jhg03gr8;Vn_c5r{J(PkT-Bfd2>t2&V7dPEvE3P2 zbv%2vvfZa~y0hobVjYFMWXS`qtwxp{V*B}mPvjqwE$a4D+7{H#D>*iE{S!rk>70C6 zN)yjEo>E7l=6y0RtS&W>Rd2!e?=L0sC3o0yN9nRR4MiYxmXq4+baUMLrk9#yZFjcL za<e`e4omVeu1&f;A)9I}725XFZkJhP--uGFud%RM=Vq-X%(LSQ{-$nb37XoP&HITZ zCzDTR8{zguW$je&)M_*cHw|K<?>EScy>-H>{<2kRT6DQ#Pr0R|%<i%e+Ar@E%M8`Z zzMpg6c0|GKTD<I8<KCXrwh4mOjWUCkl+D)W#T?_N?{nEe6<73+Y`H(7u=Sjbl4kkR zKSTd^{I8#1zN&x!5&Bm)9(4Uo9>rZqDm$*z(k>jtKgzj3E}m>%PSG1IyLEG$&eI#@ zWRhf*JVX}6>zl8bxlw2hTE^+V&)3&(6)7>%6IagCVwfjr9y*s|@j!pp(3{GAQwdg* zP}M_)$lI=AoFklvElkug*&uu@x9IGN1lH0--2pQ4y>?jqQ}Ld<Tv9uP>dbc@i%Lz+ z+Y-1#Gek~E-0DSoQQ({7sk%B*^g1m^x`Tpw)ilS5?oxE9-oG|IoGsTlS(#Z)XEGGJ zhoIcm(r47j=*gSp@iCvx1D?C&nw%K1vfFE$Y=-h1ct2!(YBPzJ7rhg0+N8XMF>2DS zbU0O8%06tJ^)M@V2PgUK9Y_6kba01a6-;x~ibFbSJd<K-lJ_|0$~8Ve&_I(ZZpQBC z-do8!yopt8-C9<hUBql!8IKklt{%=k{z%5$h$ujqyS-T_?RIvs#?kFc>?g4YA{!|# zmNT=Zha3%4A63g~;4M!UkmMPB%iu%Ytgac5Y~(|=!$VN(5~0!I!|IF~z3degt~zIX z9O85Oa}<Kp=i0-kGaigAY|LHE8@2tB`}>>!y8wMbG(~CNdrn`{_~D;nKS)>Y2l0Q! z{gV@H2hZq+L^We}ul4eOYuLR}_uYqL!IJRBdMb66;kUPA@vrC;v#7XZ_pR9-`BdcG zJIebOW&RBO>!>#0r14t9*p0P|7xpV3YkAW8ylljfaqQ(KDGR}u+a6ih@{VQd=DP?j zVV>Ki=bKE|^}m^GF`|}H>9L48mKI#k>9xrtfVL@tB`2?pv-_xZSjP`_<%@>=@qOj| zOS|0v4Ocy2k!0pF@K4d7-{TKl5Ow$x{Xkg<=vjCu0|Z55(1>_Hn*L7wV-MIGo^RqW z+#vDG6Y$V8@X%NcX!Hkk2Z90c?~T9g2l<D;k&k4fk^Xq#g`zGf|3x3<qgaq3%=^*w zcj_+<^1prlA<DHu$9x~u9Nm9_GC_=CkI+7$|Kmr~-;uBWRsC^R$A9>5xc_`EsDtln zN0`p@eY!FyjbBJ%$_uH*#z)CS4tCsr?1WWRHWTU!^zUfh^2}Dz%)pe^>oLhok`p)g z^jKKo6!)kM9T1T?H~L(0>$$zkshN)&_NHB{%rPBgZEua)z`#PU>*)5xms_%QgW6=e zgLCdRf(V*C#j)PDisp~|=M{r0A3u?zY~ZZW*1MO=dUM34qlNww@dQTbTyJjA#DeH( zU2R+MV5OU=g=N*uY|9_b>x%tkU)IOrCB<%TqIEg{6#KcVKmQf|k2%Gsa~xL^K9W6n z_xOVDOY_YPd-CL&)SH-|d3f|K7~l$AQr~quk^3eaTc>eA+^HqZ#!UkQ^{?7X$z$7u z3_Y*$P2_l}(6UooU7REr^pkVkH@<Z?;{OkQ`q6pfNAp+oZ{_*JLM$${{SguGSM_i8 z`tL8i{`=n9JYHsld%W4!4c-n3GQ8L#+O4h;Zu^rS7H)R8Ws11>Rti_47Lzh9(<8J? zzlK1wp-NaRVZc6r-?(T<r!!5;P*%!f$@uNSCb_|b=cmV;%7ujGPS++E%z4T>n&s;# zKcn&0{Ak*xNHCzzH?7?>?MIy{FJh!KpLX$u5u=>%-kH?iQ;j>z^6ejt23cbscR6@2 z(l$4SxDg#UotVvVxYya#D|kaLopP7*wklnr%SR8o9w4&BPn4)pQj(Qvt;-9I2`>+r z_uSQZTwY5?E+mC_da!b~Z3!b3@yGMsw|cmue=FxdYT~;oftI(5R`qXH|9+wVO<8U{ z_gE%(Y&b-|<HhYKF-{K-C&qfM@n*j>;ZuKx&>5@asGBhvWEQ@w#x5C8&CG3s6dsK! zsm!itC1V-YfrmFz2eBGUveP6S%(luZ8^g~hx$!LLc$2V6oQ{xIGj+1jDNm{3eOm=p zt8%^045b8Y*CL2nL$v<m4YzmA5$gvyrMl!r2i|MxR@^+qa9pIG;SrazvWFxmt7OcU z`CPRd94?kE&9TD^^X<@|l=7XQpMpneWShCVCFgzpFqv<a>nFai=-=Aq{^#OVLGcS5 zYyL6*`~SB8x#It$@fT5^1G*31;PX53!O`6i$p8KE2#9~j|1<>ubLThyH!ny+o;Mn6 z5{(3j?gT-8KQFw{p8aS-@^`?(wE$cS|Ec>=tdab0@-MzTX%9(5&)^e)J@^v+KzoBS zLw+=Yd>k}7=JtO<{w0wA?f8@EIHSB5<nN>BE*io&6n#L)<KI30f-lHtT|WM+*H8W< zuAhu;GwW23woGUh-|#TC*uNz4vfRXl7X-8V3>RPG`yP_wCG;LwRLOZG@wlyAB<m&t zlf(_HHjMs*wP$>sW1ok<BXie{ixu$-@|PZaAtzmlz2T2lu#plR44=BfaBb=u$DXcc z+@VtGfS{cdHVU|*27Po~Uix_-Rc!*28bX>C<rVL}FnSd$uiEF{H10i{uIJd@72Ph; z{l{zl-_wEL?B}vR)o$sUo4Hqb=bzDkS-t*v5o`g<A##WEGH?a(0ImYp08ijLa0BoH zya68oZF3V!KL88(1Gj(xAP@)wZUc9KU?2oQ+k`<G4nzQVfk+?<hz4SSSRf9F2krrA zn?xw@14%$K@Bl~w9s;SrBj7QR2BZTS0NO4K%4{G9$OZC%CqO<>06YZ>foA|(|Nr8& z?!V*u(ev>F?++1I=Z<VGP9^9WY->9$TagnObD6v@<%Fj?^Ir24KFsgZ533!fDps(O zj*t4-)=*?^s_o;qz9{xdOXjt~U5k-|c5-YLF@Acjtxu&wHc7{Dj44T<oWwoXE^(vC z{$c-CpMX8BPhyKcUGH}^yw>Y-Xk>(ibm0+;)rs7r>W2@}S+PAeP<*~f=P!+YR#Q`$ zls3qebL);pG9yOD)Rqb(Woym-xYFt_CZ1aO0$cHY^~?<OY#UqojJ_>0HP%6_O1-@W z{CgYIbKZV@FST~+FgA8r1S_*^qv^09<qdErb=oVY*2dM^x$w)W)eMaoXFoRcG|Dpb zF3Nw+a{vb}K;zIWzN@m45xh@XKb;eLsclp`EzL)VxVgkI)9F&h&P!HTXZ*`>lg6;B ziK(1ky?i^%olJR!^yo)gH08F%MmLwP?-?TXFt8R5y&F#b=0Jcf)?inVz^RhG_wL(R z$Pf3|B%7Pt-JjR&N-ywGoVwY<bs^bWxN4NA8?$!cE;DYvL96u=X4)krzI<kMvLJ8? z<FMfPO|bVnCy<r%$IAG<Q_mZY2uT|<{WH!VtJk0ZOYFxa)rWE!G7CxvzUR1-WVqw0 z0yO?^%uWK9PbLEJAE>2qyKfR5e8|sAFl(sbdMZLp@M%>|qU*%MRFj#v(k;nLJQMmo z20H@wEX+{PHfNU-Kh-@$BP)8}s((lID3e&;&F<WdBYk%jx^YU2WpECBY;T3j(Z@68 zW{2H`K8PhPVLCKIT0c5IX*V5m-R@@FG%w<IwR(6Vu;A&m=uD>AUxbiW^k>s@fBvKG z0FH{sEwWYpS&bk4!uV0&l*^&@8>%#J#)q08PTlFLnM&4oiQ-y01vTR)=|0|I-h1g! z`0CAUZdi9en=HPTsG3W1$v#1NMA`BEK|y@AMrU!{5<RR6`_VN=FZ)w9;gR5^K2mZl ztRmbf8<{vT)+V#LkT%~oNhzDN45RAul-Bz?p=LKuUH4>l?Gh%<#bEK6PLtdD`ri3u zOTX#k!^gGZNvnDJ4fCJ!@|G}XlP6Mtq(UqDgSV_duPzty@ZIj_{J)|<EAbx`>p^30 zpgVrPywF`IC<bBxQHg)=_=lm;-(Gp%(29IC^5K`Kjc~yyGy(^Tyr8Jam#0B~r|a-} z*58RgC4hXrZ{kmU5M}uicR^7oH0C54dj#EugPy)<@FVe`$KRlYrOW{GAAY#vR|_&h z{s-XSHGS>3{HwpY8vpr^i2qEm=~!EJbK^_U-0?lJ|DCn}d$CQ2E<JO)A!JRBt+(Xi z;K#+ixe?>VZ4w^6V+M1fNIyFt>!g{C!4+7X5zefr;C|ZSK#MC~C0#6kz-JtLG=P!R zy7=IL=+&$d0pU$-oi26Bx#!y-4_oA$Ow9!vTzesFb=rHYifY#(Yvs8&Jj45|(z6p- zB-(;6`75x6^L;G%k-_|?fvwn2iDi8nu+?U$vf^32e>iou|M3g^9}^+3BTX~*=^j7L z2E$iBri%6IT33-R?;&HT%cS)Jha4N?slh5`cG4x@?NmR%r~M6grosz}FIaENw9a@c zKVmeG$f9M>SC1Jx=k_9pWb4_<5Ssf+?5=iPmH0KW#T^2ZQ9c8F*QGyY8C}w`P@@Pm z-Y_2PH1D?YR0gSOIGqU_i9V@{mDgd#(1Fn%S{5<b4)@$V^;a+Sl`JjrxFhaZMGuWm zC%3kT)Hb;6G0&l^xn=EGUeU@FJ7uJ<T^35Q_x>b5jk?ken`v{KrsyEvTmGk&{;Jpi zyArPGU(53OWcyISQ69f(^ZzUTm(}yvf5iD~l17Lp`%uMk`)S&JM{zGWxeqw`1Z-;y z>VELv5zm&>^k`Q>>eSRbrP$Uav1|*RNzKRnN8$^zrtpG|Dl7I7Ul@>4X*sV^_9iiL y@7^NrY1;d&FAU#a70le~=bS&1c3;`vMb-FSAKggq%fEV<&F^Zl`spW+!2biSVZj3c literal 0 HcmV?d00001 diff --git a/src/editor/img/add.bmp b/src/editor/img/add.bmp new file mode 100644 index 0000000000000000000000000000000000000000..5b379d0601e8f24cb27a9fb94bcffce22dbd5e80 GIT binary patch literal 824 zcma)(u}{K46vnHLF2;$Ktqcr=#K;24jU+CNtc>04=w#y9$uP1R{sB!#*V-7ZBqk*> zu~#I8Mj{XtDiOi2cW^09Ab$Do^}Xw_udi2fa=a%o9U;nC2g|i1CD{Hh?jP>+#WoNU z(o9j5R4SEBCKFp#EEWO7gpkEQgq~5}bY0V>EQX1$>n5dll$taw(Jzz9a2_v0dH>cD z27D^Zh*4o!lz4>mk6!!1Ya?RwJe}TT!8d%b;dh>V?=qX+V({g18S^~%eE2Gt+it-( z`|r(u&+hlG^LgQ$LP6v_0bi+9(EnxhA$&{7CWFWS0`E+Q@aq^JAcE(KGaedFs8Xo} zSn%$2)S8am@1>CkL15dqVHh~ETCEo2+dp5-pJAMZIrwU|s%e_4syGuU+TWW`ykF+| zq{DLX^?Dtna>e-WB8VA0CIM^*1KqapnbH2MHfvYQvQPuYNE}8)E_Ali#kvG6Nq@YX B+7kc( literal 0 HcmV?d00001 diff --git a/src/editor/img/areas.bmp b/src/editor/img/areas.bmp new file mode 100644 index 0000000000000000000000000000000000000000..443f5f77fa68c3138685deba7a2fd7bda6f9aec5 GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7@;XZUX%-VQ`S29c<J{`TRgo|Pd8 z4Z%YL;$JjbPKF*h0!qOZ0~rwYa9Li4!$1V&ax*LiA~eNt^$=Mg2~-JD4`g5}MpF+_ x3^$*kdNlJ1x(CgCh$GQ#f%q391vek41`WZ32y1x4Wic5*^+1FvP8AUb1^|&Ef*Ak+ literal 0 HcmV?d00001 diff --git a/src/editor/img/copy.bmp b/src/editor/img/copy.bmp new file mode 100644 index 0000000000000000000000000000000000000000..7d738d753e343a0fbda8807f7730a2df74426ddc GIT binary patch literal 824 zcmbu7u}g+P0L87wmS~bTaY-D7Xx2?>a??LSH{EosKf%$}{Tn`M4r&Oxq2ZtpI%qlw zB4{~?z#d*6a@H5r<J}?ee!SE3{Ik<NW7G-eV~m5Zv16EHzKiw4eL2PelWBbX(|Mk| zu4~)&(LzxaEz5%-7=93XvMh5P$FeMQlH{MRuQa2>^E}`8wK8mq<oWJa^PIn7OgT+c zEWO=7Xhw*w!!X1H;aqt;pCk!*`pT7YK1kjlH*@1#7-Ml9|H=y?D5ZVhw`~g^=YuvT zgtFETzG<4WEb*R@#$#3T1Amc5(sdm=p>4b*#+eYZSzTfa{9M`32O*6%<Vtm2UrdrW fLGrV*0c~qailSIv6(q=&s;WAl^ey~{&@es$WF+TZ literal 0 HcmV?d00001 diff --git a/src/editor/img/cut.bmp b/src/editor/img/cut.bmp new file mode 100644 index 0000000000000000000000000000000000000000..4ad021b9fbd40bbb6d3139c8ab1a8d084fc6667b GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7>!F#I78X$069#d+ui+QYR2MNASr z)cnlhB5;Orpkq)=PGCn~R7bH#UMx`DH6tRjy(n%%dGeHUb#GI+N(e*K#oW6h8NyDe zEwoDvh^)zhaKr1;Y+~He)C0L5d2w(-m)vMLJG>$l&PHZ<XT}DVrvpWd;(WYnvi0Kq zfNcMwWbce9WM#-~-|V=I-kPw+yqwwHIWxNg%F+Vz5|9;OWqZK@R#`MbpxXTWd^m|F zi^&BlZfR)&st1xlHl_k(5s0zNmMsGc0!fHP$O_Qd5X0f>30eVE08tDv2gnABpqYux VB~?ApKp=pdfX0Q3lf+<P000w%BkKSF literal 0 HcmV?d00001 diff --git a/src/editor/img/delete.bmp b/src/editor/img/delete.bmp new file mode 100644 index 0000000000000000000000000000000000000000..7c870d1b98aae226bd66afe83c0b0b3b3a9e6906 GIT binary patch literal 824 zcmaKpp>Bjg5Qb?hYnm!7u1HK%Eb2mXFMvfNk+qdbUV%qI)*@G~#3GSvn$R!&y$P50 zI+-12XTSM(vJ~gHhiJD~;tT8PXWd2dUccx3`B7^x5aQ^oX__=mlO&06+v&XFz<5y< z+ie@iQ81cEewt^TQzf<)j9!*y;>)sR`#F1@Q(7=`qG0mhyjvEz7=u;(hX+uL?lL~l zbIns#743dq<fd#FQ32pt{^U)ZcFSoozOL(CfA#BX;^cB`;aQ~5|AL=GFqquj9d0@D z1|ujqgy6lOrs;S@i}dYYQ-<&RzU#WSZFv&`#xGk?g+vZN3<IOe)N<sFG@eO-eOO2D d7~?qqMds@3oMR8nNP>yvX73mKxHf~M=o{Jw?4AGs literal 0 HcmV?d00001 diff --git a/src/editor/img/dots.bmp b/src/editor/img/dots.bmp new file mode 100644 index 0000000000000000000000000000000000000000..34b03a879c261525a4597d06cc14ea9f536a2da9 GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7?9f`Ou<q67{AR{&H41eTVT`5_iW zBA{L;Cnq8m1C;^QdwF@m)g#-5l?@bxtN;K1KU^a&Hc)*~P!L=hK?bSnfu4<uiYg4Z zfgqrE{A`H&l4u7Y0=gN(z{3W5HaR)DJl=&!1XQ1$on4jUMI-_SPIYy4U1k6T0o{+E z4fHHfeN%oo5CPo}Vc=l{9S>CBRu)Gj0y@5>rKP(jl}J=vTntnX1U*Cmh)M<q0F*}} A<NyEw literal 0 HcmV?d00001 diff --git a/src/editor/img/editor.bmp b/src/editor/img/editor.bmp new file mode 100644 index 0000000000000000000000000000000000000000..bef82f42c60adefbcebbb84ec9f0f66d4d66fe7c GIT binary patch literal 824 zcmbV{t&hS$5XJXEo*^jy0g{ua2o{h8hahK><SdHdaMY73d=;t!L{kHzkSn&?6Cj$f z0@5asCI}uoWJ4$)4V$-<-I?E;*)7+KX(m?z@e4b1*&i$?^C{G`pR{EHA;*qMM0gSs z3}C}BCgTYX->oJq74J(nCEhg6*>r})kJf`Fu5$;*`h5-2w(aH8#R1;uysqo8%olUc z`88kZwlnqWjR07d_2;_l)rtloL;Zh;16Xc^s^d7G=LsQ>a>e<ErsZ1=5~}>43$Y2q z5IC;t{i=UwG=hZ$!1w(i2o(I1-|e<h6v2pzfQiQ!9`!%$4}j^B#8Z646P%D&AGyn8 V1a$r1C%k&w8$2v=VHWjd>;wi!I{g3u literal 0 HcmV?d00001 diff --git a/src/editor/img/exit.bmp b/src/editor/img/exit.bmp new file mode 100644 index 0000000000000000000000000000000000000000..3d663adee9279f08ac75deb7d0794eebdfcfc8f8 GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7>!F#G``O}s!+Q4uH)Q3)X}EiLP3 z%)o=t)H^vjwalA`2cfC=^786gx&#jbIsn-{K=qT?tiglO)CUCx&EB#F55iQxWba-~ z1Pp=Pwl<(R(1XbCiHeF^bL=Q4y7&D%Pzz8TQ~lQS=kOq)2a(NBPEOu;{W>0mran76 z``G>acn~l^kj<~Iu0HqdIUWS`Ae#CsZ{OlUKnJ6#zxC-e9t3nSvig>m7GTifLB++z Q$m)Ua2Wr6s;OZF|0FAY^Jpcdz literal 0 HcmV?d00001 diff --git a/src/editor/img/items.bmp b/src/editor/img/items.bmp new file mode 100644 index 0000000000000000000000000000000000000000..5f491652a0f18acc738b9a4c79e3c0beca3a8f5c GIT binary patch literal 824 zcmZXSA#=kp429n|;=2*ukZITgO?C@4%-u-fXkp?0!r<UwXkp=CX<=buX<?zE_r+dw zxh^N`Wa&wIkrm%wA5^{<^fSl)&YgVm-xGg&tfx3oS$Qda*WJi6y0o3tHBBQ8(%L!X zU1||CLQ5nz9>}bvPiZS%%r4&Vq%Y}13eqwKo3bnEP{0_m2=zyatnbojPN}~_*<`ji z14alT>j$TE`_ejk50gFwNKzR&U5y_z1P{e=qNzsT;2d~3)0gNO<^`}d+jx)Xc=gZ- z82BLs=z#~EnkIQq3enNI$zzt<mKJz`MKh)icvG694`#s5fcY1CLEbr#gn)sMg%7>x z4mfq)#yPG`62iwAQwWeJg~7J)?>Z(AfC?wG-1qy!91dW}qJACeG-LogUBQzAIFDl< zhRIm1atLrEvDTlLr%sy{+j*b*9!d!sF=mW1d^Us!o!_hO16PO<;=g8rbFXPzmtgQU crSa1qa}Ww5RA`+053VWbn`P!YhpHj{0*E8yQvd(} literal 0 HcmV?d00001 diff --git a/src/editor/img/layers.bmp b/src/editor/img/layers.bmp new file mode 100644 index 0000000000000000000000000000000000000000..5e0b7a2f776858ed1ae9b495ce494c58a5927e85 GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7>!F#JJ7QN_hh$x*lvnqnX~yQKxF z1uFs?LbiIKUQI7AAR^NIsN!sho2jeb&~mMS;v66%(tNL|tw1e6L{IfVFJnc(NWpXu vX3PQu86HiPs0Vr(D?&~NaPuLdgiHbh8SV@?gADaREm#rIF1WF91_J{CQBWvX literal 0 HcmV?d00001 diff --git a/src/editor/img/map_border.bmp b/src/editor/img/map_border.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b593db1af6d5070c288933f319c1192f10c1d97b GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7?9f`Ou<q67{AR{&H41eTVT`5_iW zBA{L;Cnq8m1C;^QdwF@8>#5*Ja07vk0jh^{u`+;0!Nq~<gMxzKT&xUA)B`;m6%|z& zZi5F|=&QnIA?iz_9q=Ga12woT(6h<O$>s4bc#xHm23!`XK07<RD#Z&AvNqO&%K`(Z zy1Ke9GXM{=HPwO30zC^<-;^JY2ickH!)1Yv2dZx?i^GE)tPJ6@K*zVVv~<^`;z5o! VCUDu};$onBAm||iKvXg?008Fj3Zno3 literal 0 HcmV?d00001 diff --git a/src/editor/img/minimap.bmp b/src/editor/img/minimap.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d9e2e570cecd5fb4356b181751414bc0e553da12 GIT binary patch literal 824 zcma)&%?g4*9K`?CMF{ERBm{vFR41WBWYA@y4uVlqAr@Xddi3bkW3SY;N9Z+r1e<nC z@+%!?SDgLrIx905E#jJEo?vu8qd^MKn^^C+#oz&^DVM6MN{JEx45aIN{8!(D-%spi zi~+wA6&gz!-Y^V=H=;r({GAJB1pgo^bi#|TfVV6Q;ghJ)Wjykfh|v4(IF`6XA6(XP z9Ff$SKfEkU^^D7Up4U-&l@@)#`@WxQ{_`>z4Kv2i3Bz!#X?bH`KE!3g&z8$di#{k1 kezo4zG|ER&v~z9qe6(D<%zFUNVS70RK>!}Q){r2HUMm0qQvd(} literal 0 HcmV?d00001 diff --git a/src/editor/img/monsters.bmp b/src/editor/img/monsters.bmp new file mode 100644 index 0000000000000000000000000000000000000000..73b409b9149a19a288a2640501a524cf95f5e900 GIT binary patch literal 824 zcmaKqp-;m=6viJQDryK5Bbk_(D9J>{5<*h31jLDkR3Ii!OiUmqDk=~Y2*d=UvI1Fw zL?9**NCXmzKq8R*0p*u_<Z@X8m)Do?-uv#|ci(n;ezGTS9g~mv_J6+}Idt`1`UkOo zu0ZOf+lnZfN0Ajd6DiWP+3JQ{I1omo+sv)ht)h6O9@0FfUY4b`&v3G=B>={lfA~%F zC1NI%yW#MLi_o@SfBeOVHXhgHD7qjxXv_m!!fWt=B6C)&_r>A`j4Cpi3buqt`u(do zz9ir;m#=6>6*MxK3Va;nMjeh$iV%9eO2@LD&7R1NMIjHb>rd}3MQsfR*Uo(WpJTpm zxfE48FceRBI=ye(Z-QxHvSN;h`jaF<9%8T#Rg3~?X3HtG!C^6<oaZ?i!{N}XsyF?~ z$W+*JwWk5BwPgQ5ILy=l6FB2(0QVoT5HL{5$lh!^6;B<Dm<bIslF*}9L)Kfu`Mi`@ SK!E1`2>}GUMCgepi2MMDF=N;O literal 0 HcmV?d00001 diff --git a/src/editor/img/new.bmp b/src/editor/img/new.bmp new file mode 100644 index 0000000000000000000000000000000000000000..4e2be600c8840fa2da747d2ae87a4982a824c4c4 GIT binary patch literal 824 zcmbV}ArFHv6ok7?&MZ?{+>n@MSR}~|5{pD4XD5+JEI*-gwz9GkTUlANgk9P}U>gnD z<@%uI<9K<**UOF=ol#F%hxghL&zx`Z{J6Kv9H4mQSrkPO1itTkP9;eK7>?t(Um;{p zdDe9fBQFd?%i}}XK04v>H_xSX_zymcBHK@vWq4gE=`a9{<v%{pbCa)xS~P%h{`g<m zc3S^5R}yoE(loXGEb&@vAp~QLQra}l8osXUs;bJe#7v-RzU=jfk>9p0TD4lkqZ7bF gD=IkJp5_lRvn%Hud%$SP!l<|(bsKb_YlI1T0o#=wO#lD@ literal 0 HcmV?d00001 diff --git a/src/editor/img/open.bmp b/src/editor/img/open.bmp new file mode 100644 index 0000000000000000000000000000000000000000..a20ace25ea3caf71256b93605fb61294554a3ba1 GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7>!F#PfK2?inGAS}oy$ipWPC|f^$ zGEgN1+1c7u^mI1NoKib&A{qiJtDQO#NFuAZwXv(8I&tdy)st2)M?=%rubQ@D-Smwc zkkz|5yTm4^&e*ta>bljKX!e#3^LK1pux}S!i?^3oWK8t*O)D4f+_+%J1{Ab&!_vK5 z7w_4<?(`A3`k=6|$f&5g&aTx*4=vrh3x;+>7|ZtUUVH4|&dcZF>SJPK<6>fqt7|r# zIkx`zejr*0LWhCm+GG1RoIJew%&FZsF2mKQq@?8M<tL}7F4(?l&$UZHwC%!~?H5jO zJAZ2Hxl>!tp4@)%{LV`kkKMZo(UPB?T~St+m61`=-n#w#c_7+-@zRcq7k6F0yyxl_ zAObS>-?)16;T?$jlH%fq`uduhn!Nn{0x&2nD#|I!UvXgPnWqm9-?@GSh;Cmy{@@-& zeRWMuTU%Qz1hllYf>C{4O>;-f#g|X+fBkaj>jxlu^z{oweN$s&Z%=PmcUM<;cUKPx zb#{S3b5mneYjbNydkYA)0S$trhwhG!sS~F3PwMZVIBCLE5bEgas;&lFTT@<EURGLK zURG9IR18l)6DCfaJ$v@7nX_iioC#zA!GsAD;Idd5ot>Q>U;tzQ0ai8S2{JGM0G`I1 AT>t<8 literal 0 HcmV?d00001 diff --git a/src/editor/img/optimize.bmp b/src/editor/img/optimize.bmp new file mode 100644 index 0000000000000000000000000000000000000000..ac7ccba2fef6a10e4d3fbcb286d727350f5f6b2b GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7>!F#Mr25>T8&yp2G`hL&rI*8)`R z6}1&e5@Q9#aG*+Jtbiy68V*!Xj1>@<z@0(R3W&*Y^~6{KR}5i5tROzDAXbp13#bLI S3(a;sT!=0_3I<S$fdK&UqZP*h literal 0 HcmV?d00001 diff --git a/src/editor/img/panels.bmp b/src/editor/img/panels.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d9cae63491427f76be26103d424d8d7fd4d44a86 GIT binary patch literal 824 zcmbtSF%H5o3=A-`R7`A)@BoAmQ^bhGPgq$PctGYT|H_NXk)zhBMNy<$cIvq2>&5By zeqOm^C#(lV_lt$wmiiL!H)}>IVCh|NzCS*@-J|XXMsm5m(V~uCEn+(d4`#5bliw=X zh7ewZwdhYNp@pVW^%RzapZFM~_r4vUb4JTlzbR*8{M0j3KZj%D$yPaU3tk12c~sH) j40HWHIWZ)-9Q_A~=X?}zmA`mJj`ArUpQsqxRgZHY*=0B* literal 0 HcmV?d00001 diff --git a/src/editor/img/paste.bmp b/src/editor/img/paste.bmp new file mode 100644 index 0000000000000000000000000000000000000000..26acb9b3ef81fa8962e4900d822ab4421b83bd91 GIT binary patch literal 822 zcmaKov1@}s6vi)faS3z`-JIIu5U3C^&_!qmB~X+?Fp#CtrEYO^wOdw4SNAT`rT>Cs z2M2{Lbt&x-a0#_veaUfE+mFx3dGGhVJJn~CBi3kwdWPqC{|wlu+3zdojbvFK^@(>G z`(lF~tZ7>Px99|<2u9U)9r&8DI?LLwv5_Gn@`ho6e`$F0-qP<J(Zu5pd_M874gU}X z&T2(Q3UlZ_B5zq1_CJ2}bi_YAS`f{rN|B-{BuT<I^7}ZBgB=JhkleTxMar@~Imk54 zAAUGI9gmC61~BU9c1tN9q0><nMe%(fFbs@L>)wc}s+fN<opw#1gB1NJyykgs+cxH3 zUR`(Xx-Lafp(IJ7C;}e@!Oe0$Tija9xoF}E4#Uv%yhS7M(7K~N|Mp&0RUF3@M1ud= Y)<T@0rfK%{j3Zi%_=+y+@gVAc11)25`2YX_ literal 0 HcmV?d00001 diff --git a/src/editor/img/play.bmp b/src/editor/img/play.bmp new file mode 100644 index 0000000000000000000000000000000000000000..f2a2894048a9b168bbeb6df032453e44c6902275 GIT binary patch literal 374 zcmZ8cF$x1A5S-)Er3vH%Dbrh62GZv*frGnJf96*N`w+0W(u|`C!O@xBaoxN1{#Yjn zEA>iV$P+o?KvjbC5n?;|st35?eG62kaLyrwz(UbRDK#Ux>Jh~Zcr_%$B9SBS6UlBu zj(d&IWOHq_IV#HEx}S}ace&O15BaThKX>o4`ho7Zp}q|L!}pi&Imh2T8vC8B;y%uA Je(z&f#RqYjl}!Ku literal 0 HcmV?d00001 diff --git a/src/editor/img/proverka.bmp b/src/editor/img/proverka.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d8e13d5a5553efca3f0e3e69673412d4e382e64e GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7>!F#MrEa!QT@BI51MZfOA`;?<L? zk_`7m6&I7?1(LJ?eL;pTKrMK@kL*(*8>kq6zyf6<ZXiZ6#9l~bK}b9<86;8+3;^Pj B8jk<~ literal 0 HcmV?d00001 diff --git a/src/editor/img/save.bmp b/src/editor/img/save.bmp new file mode 100644 index 0000000000000000000000000000000000000000..95c5102b2cbccf3501e1e58d378feb2412b2b684 GIT binary patch literal 824 zcmb7?Epvo05QfuM)^w_{xbg=&#Uh!hL1K|eWGpf=G8P$$#3GSMEE0*inf8HPQ|7Lp zJ4<GhJlVXvA$fhd6T3Y#KJh)AzZ((k>$mJb-n(yKU<kx1ilQ(KgKvyo2W*Tu#c?dP z#*3nu=lShmOviC#%=6qa988kL#bsH-vfFg6JG3kdQ;aRor)jEfqnbua36@tS@!^s! z1AJ`^j+p=QS(cf$HLW$q9Mk%k{9Ntx!z0+aZmrt2A?Zt}SZZ(jPBjLABvPwN)gMlL z_Oh-?<#^k7l+3;BZnVW43&hhjRa$9lDVDa|z9;sAuLDlePsh_MJM`3hjro<0H=4Fk zEVU2w<lo3M7Xj5FV|!>R$K~@)FEBqv3_RjDeqDaePeYKsJ#<}9>-sZ~ehO@dp{go= MQI4oT7#Oe+?-%M90ssI2 literal 0 HcmV?d00001 diff --git a/src/editor/img/save_a_copy.bmp b/src/editor/img/save_a_copy.bmp new file mode 100644 index 0000000000000000000000000000000000000000..2cf40d543ba0543e6a8dea43b140845a1a1f535a GIT binary patch literal 824 zcmb7?p>KsS5XRXiXO<}}Zu|qwut<_;kXR%VSzB3IS&OVhVv$HB7Ky~XWcxwix+dGQ z>~b{MyRToryOLkt9-`A;Szq{`Zr@!LpZR<0&yVgq6D)CbP17_<lK2;+>Hr5Ox@K7> zw8rbYUf1<KFt+nNvsP8*FdWSD+{I1PfTh|Ey*spR8(WN$#}`GRZKt|U2m!2W8{*)S zg8{rW21m?)@nu<>zBj!!#)Py!hM%iFKX?Q?*S%GzHYEM%G)wQ@IH=A5fJA83D*5Te zH*chb%Hi!e&@%V#r!f|9B#4(~X|>YU(kx@Q<4EiU6EG0WXE?<?9iF_MM*8(t0tmzH zfj645&@8=A>*C+Y!A|-nJVkfNI38MvdHZ@(PYXDdgc$IMKk)k&@++mj^D_`+lb2F1 c`yS%`6+S>e4ffO2wk^LXN8tR^fB}x84?zG2`2YX_ literal 0 HcmV?d00001 diff --git a/src/editor/img/save_minimap.bmp b/src/editor/img/save_minimap.bmp new file mode 100644 index 0000000000000000000000000000000000000000..d77c8374513331ef122acdfef782d62af601dbda GIT binary patch literal 824 zcmb7?FKEOt6o<3T3?}wR6$XQY!FKB0*xAa$Ol9rK%F5Wv$jI2r$jY;km6c~JE6*I< zzBG3wjBRX>U&BlC<>kG+rXTNDVzM{JSH8Q`cOjB#{gVBMoA6Bw42d`_m&?Usk^Ern z2Ea4ouwJjF)@ZZY48w4YjA`HZj73odhJ$IE2EQyzSazFj8xD=*$P{C1=Cdr*woy$Z zr35Rg5<j}cM}V)5K_v5EKF@R0wx+elm^ke06Q8T+`0ykgq+6?|+(_wLQ7pALZmSvt zKoF@_rRuZrPb%x0P=U8@OUZKrv2*T{sI=17QY_DIox=xHLd0Sv@Xk5jGw{5X?Hu*8 zI|>nN<~b#e=2<9~+Ph&l_Xx(D5MIaQ^<>1SI@0isma-pxPj8d^UqmwSB=7nC_%;4? r$>Z}=5b=2s()Nw6>)n12|FT-e;zT^9z_#nEs^S;ri28$p0Soa7M_8pQ literal 0 HcmV?d00001 diff --git a/src/editor/img/select_map.bmp b/src/editor/img/select_map.bmp new file mode 100644 index 0000000000000000000000000000000000000000..6501fc66b39a3666f935c0c9707c0786901b0d8e GIT binary patch literal 824 zcmb7?A#cJ^6ooq`X9$X)F#Z5pZDkWoWiwZ|$|n2(G(nLN45B1+LoJ!88e$~~1j`UC zX@Wo?aQO1&9nz3s9w+zRoOk-&i{N>kmq*8_O@HRpFXzE&n!LvM#*>Z-Xs!EImSs^C zd7fiXnx=FTq$^35Wq9qzSPI^CT}v1Y7|lnomR0e~_b#QW_2+=P^(63~=V8PM+pWH~ z^XdNYo5FC_EFHMwH`(~`zbqCr0dyI{$^-kpul=Xv{%7*0%_P@@T=^|Ju=v$SkNqT+ z){;=VlCVd75Cp<(I&c_<Hl!HfD2nX=FW@+i;SWX{{587uB*00MV8qbzdR;>!o|&GX K#)12H%5l!v!Th%X literal 0 HcmV?d00001 diff --git a/src/editor/img/selectall.bmp b/src/editor/img/selectall.bmp new file mode 100644 index 0000000000000000000000000000000000000000..a2bb47db383d46882954476f65b6dcd7cf6a3787 GIT binary patch literal 824 zcma)&u}Z^G6o!8-fm9tzaj0}@oKidJB;GYs2~=uGOG!(YfCw3*Q#PB?#TO8t;69^2 z_n4#@)8^;9hm(_!n|tHU9y&0&XLY%Hzv~18Ge70~{<$nOU>Tb@jx%UTDbQh*Qo!>b zFSWkd+HCH59`FXd7L>g-tX23e-}ixcV7FJxM`^^Tu;XEj{|OwR+Mj+91i*K}7a)`q zHdP8=1C7|WZCREGylfOjoE#2)iTGBx+Y(+jj^nf5#Ze{`P3R{{qLluZ{?+9l_;a!> z8;(YGrc+%X^0M@=UH2$qs0j~G|K|3tB|Lnd=kx7qwq69=RTEDXqVRFEOw*J;^U)$= F0zV5tlm`F+ literal 0 HcmV?d00001 diff --git a/src/editor/img/stop.bmp b/src/editor/img/stop.bmp new file mode 100644 index 0000000000000000000000000000000000000000..54b343b6a90cbc798f0c739a50b98ad0a9d228ab GIT binary patch literal 374 zcmbtPy9&cF47@<MEQS6+$BY3F+OzjxI>n>?XZ{s~_fqhX(K*SqLnvKx)}3A!mY2sm zz_3y$@=jjK0T-$TxQ#IO!bc-OLyX-~86t#$loA`w46SKI@@R?T4tRAG$0kuT?-ND5 sq2^8fvq;rJsoDI`oYUH$0jGWO{%rpLy}pmF{VrmDJMQnk|I_t}9sHu0J^%m! literal 0 HcmV?d00001 diff --git a/src/editor/img/test.bmp b/src/editor/img/test.bmp new file mode 100644 index 0000000000000000000000000000000000000000..79aa48b418ccf229962451715c31dba254a0cc67 GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7>!F#H+P$S*nBDKyl~)fM6k{9K5d zik_aR;$o+e5MsE*s6jK3JS{-?09^$%3Zi|WxEb~JmA$>~GiO4afu9ReGo(od1^`3j BA$kA+ literal 0 HcmV?d00001 diff --git a/src/editor/img/triggers.bmp b/src/editor/img/triggers.bmp new file mode 100644 index 0000000000000000000000000000000000000000..3af3adbe60cc3f79f42b026796fba829d5bb3a2b GIT binary patch literal 824 zcmb7>yKBNw6voqb>{7be(Mbyq4nhnRL|dqXN<asLPAa982pvR<_!^?12#OETLQrt= z&$K`8X)dLkAGw!vzVqGl%5%ZGF%(ShN6y{vxiTIUe@*=UR*oXL&c^xDFPqIiDZB(o zCX*0&Iuwt`VI*^>(`hJt2B=o65O~Ak&~;s0z+2IeMk7cBUjeXT@I24sl}gso`ss8E ziGXYZY)OuuSEA45a*}_u*+8NsDnKmB*XuPrHjHiCqTlcLkR(Z`)6HgcHk-+F3}lvN zRVo#ja=9$}!{LCQXeN_cEEX88R;%4^&*$^)cAH2fu+cNJ=#R%EZP@O6DwV3$YWaK~ z!!%9yi6$D27CzocsP(?@<5HT63{|h!!{Kl!6r#gou~;gVWE|bkYPFJy=tK~SM9`1N zW0_ahrRQBPm!c2W<HcezO7wa?o>Tgto;+0iyZ=`OSpunOjHurKU@*XiBqR_4HWf*Q m3-te`NqDM%E9`c=e!oANOfXKT6D{F(yIsd|WS<w^hVcX3pKn6| literal 0 HcmV?d00001 diff --git a/src/editor/img/undo.bmp b/src/editor/img/undo.bmp new file mode 100644 index 0000000000000000000000000000000000000000..da2baa3e073cf7a4a7ddaa52cbb766b490b31983 GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7>!F#H*WNYl#;84+}0c1w#>auh@h zLB&7?5cLo(Sk(iKLKX+A$8QCiQ9#9TTQFS(6alJ-s6n;`$Oei-jDqNbkPtyMl@Kn( dRS*TpBv!+5X~Clyt_7$Dj<C99hzc?=007!x67c{4 literal 0 HcmV?d00001 diff --git a/src/editor/img/view.bmp b/src/editor/img/view.bmp new file mode 100644 index 0000000000000000000000000000000000000000..5667c573e731e260ad1a54f4990c9627f46c1e66 GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7>!F#Mq#I)480n$6o*ZrB1ut2b>0 za`9Nb`_QqL&K@UMHw!Ck3u_xY2dDa$_I*cBV%2r*+$Ak-o%HP78S@qb4PUi!%g%#G z%4_PRWo3beU}`yZ^6a{;JAt}@#zI0uT1Ez<QAk+0s;&{uVe^-*1R^yJO<1sjXciWh ziPLAbb@$0DD4?m2j!yuJ1JyXYxgS1#9<HmQwZq)fO5f0E%kF*1TBgmJud1dFQKqA( z&&kEb#KZ*T0{srOw63|WySEQny<cEZV_QdIX@!fshnTpygrt<Hm{>q?Xl!C~N8bbo zXP3z{W+AJeJadk>uYYkxRcTetlv#5pOq&Trwau+rc?ChCVGEb9LRJi9149NF{y^6P YwEz`BP+n09Ffe!QKa8e$NOKt&01<N}umAu6 literal 0 HcmV?d00001 diff --git a/src/editor/img/vpered.bmp b/src/editor/img/vpered.bmp new file mode 100644 index 0000000000000000000000000000000000000000..4ae099b0b6af71a96a25a0040bf001def2a436fa GIT binary patch literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C7H0y=3voj*SO7>!F#JJ7hL&pu6zAYVXo`Vcuc)m+ zEm#rI5VF-fB}Zv`c>xiT=0_E01GNAVb=6x1`fE7Z0TGeryGDirwEz)4)dRhZ6#*j! z(>;(-LMDNM438#C)C0YY6#?zSG#?U5$Rse3;mY6)xO<RQLfE*}1GQj9KwWTS;S2@_ E0LH@#IRF3v literal 0 HcmV?d00001 diff --git a/src/editor/spectrum.pas b/src/editor/spectrum.pas new file mode 100644 index 0000000..d0ef098 --- /dev/null +++ b/src/editor/spectrum.pas @@ -0,0 +1,233 @@ +unit spectrum; + +{$MODE Delphi} + +interface + +uses + LCLIntf, LCLType, LMessages, Classes, Controls, Graphics, + fmod, fmodtypes; + +const + N_SPECTRUM_VALUES = 512; + +type + TSpectrumStyle = (ssSmooth, ssBlock); + + TMiniSpectrum = class (TGraphicControl) + private + FGradient: TBitmap; + FBuffer: TBitmap; + FScale: Single; + FStyle: TSpectrumStyle; + FValues: array [0..N_SPECTRUM_VALUES-1] of Single; + FGradientCount: Word; + FChannel: FMOD_CHANNEL; + FRawData: System.PSingle; + + procedure SetStyle(const Value: TSpectrumStyle); + + protected + procedure Paint(); override; + procedure Resize(); override; + procedure SetEnabled(Value: Boolean); override; + + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Draw(); + procedure SetChannel(ch: FMOD_CHANNEL); + + published + property Align; + property Scale: Single read FScale write FScale; + property Style: TSpectrumStyle read FStyle write SetStyle; + property OnClick; + end; + +implementation + +uses + BinEditor, g_language; + +{ TMiniSpectrum } + +constructor TMiniSpectrum.Create(AOwner: TComponent); +var + X, Y: Integer; + R, G, B: Integer; + C: TColor; + +begin + inherited; + + Color := clBlack; + Parent := AOwner as TWinControl; + Width := Parent.Width; + Height := Parent.Height; + FScale := 64.0; + FStyle := ssSmooth; + Enabled := False; + FChannel := nil; + GetMem(FRawData, N_SPECTRUM_VALUES * SizeOf(Single)); + +// Create draw buffer: + FBuffer := TBitmap.Create(); + FBuffer.PixelFormat := pf32bit; + FBuffer.Width := Width; + FBuffer.Height := Height; + +// Create gradient bitmap: + FGradientCount := 40; + FGradient := TBitmap.Create(); + FGradient.PixelFormat := pf32bit; + FGradient.Width := Width div FGradientCount; + FGradient.Height := Height; + + R := 255; + G := 0; + B := 0; + + for Y := 0 to Height-1 do + begin + if Y > (Height div 2)-1 then + Dec(R, 16) + else + Inc(G, 16); + if R < 0 then + R := 0; + if G > 255 then + G := 255; + C := TColor(RGB(R, G, B)); + for X := 0 to Width-2 do + FGradient.Canvas.Pixels[X, Y] := C; + FGradient.Canvas.Pixels[Width-1, Y] := TColor(0); + end; +end; + +destructor TMiniSpectrum.Destroy; +begin + FreeMem(FRawData); + FGradient.Free; + FBuffer.Free; + + inherited; +end; + +type + PSingleArray = ^TSingleArray; + TSingleArray = array [0..0] of Single; + +procedure TMiniSpectrum.Draw(); +var + Data: PSingleArray; + PeakData: Single; + X, Y, a, nGC: Integer; + ARect: TRect; + res: FMOD_RESULT; + +begin +{$R-} + FBuffer.Canvas.Brush.Color := Color; + FBuffer.Canvas.FillRect(BoundsRect); + + if Enabled then + begin + if FChannel <> nil then + begin + res := FMOD_Channel_GetSpectrum(FChannel, FRawData, + N_SPECTRUM_VALUES, 0, FMOD_DSP_FFT_WINDOW_MAX); + if res <> FMOD_OK then + begin + ZeroMemory(@FValues, SizeOf(FValues)); + end + else + begin + Data := PSingleArray(FRawData); + for X := 0 to High(FValues) do + begin + FValues[X] := Data^[X] * FScale; + if FValues[X] > 1.0 then + FValues[X] := 1.0; + end; + end; + end + else + begin + ZeroMemory(@FValues, SizeOf(FValues)); + end; + + case FStyle of + ssSmooth, + ssBlock: + begin + PeakData := 0.0; + nGC := N_SPECTRUM_VALUES div FGradientCount; + + for X := 0 to FGradientCount do + begin + for a := X*nGC to (X+1)*nGC-1 do + if PeakData < FValues[a] then + PeakData := FValues[a]; + + if PeakData > 0.0 then + begin + Y := Height - Trunc(PeakData*Height); + PeakData := 0; + FBuffer.Canvas.CopyRect(Rect(X*FGradient.Width+1, Y, (X+1)*FGradient.Width, Height), + FGradient.Canvas, Rect(0, Y, FGradient.Width, FGradient.Height)); + end; + end; + end; + end; + end + else // if Enabled ... + begin + FBuffer.Canvas.Font.Color := clWhite; + ARect := BoundsRect; + DrawText(FBuffer.Canvas.Handle, PChar(_lc[I_LAB_SPECTRUM]), -1, ARect, + DT_WORDBREAK or DT_NOPREFIX or DT_VCENTER or DT_CENTER); + end; + + Canvas.Draw(0, 0, FBuffer); +{$R+} +end; + +procedure TMiniSpectrum.SetChannel(ch: FMOD_CHANNEL); +begin + FChannel := ch; +end; + +procedure TMiniSpectrum.Paint; +begin + Draw(); +end; + +procedure TMiniSpectrum.Resize; +begin + inherited; + + if Assigned(FBuffer) then + begin + FBuffer.Width := Width; + FBuffer.Height := Height; + end; +end; + +procedure TMiniSpectrum.SetEnabled(Value: Boolean); +begin + inherited; + + //FSOUND_DSP_SetActive(FSOUND_DSP_GetFFTUnit, Value); +end; + +procedure TMiniSpectrum.SetStyle(const Value: TSpectrumStyle); +begin + if FStyle <> Value then + begin + FStyle := Value; + ZeroMemory(@FValues, SizeOf(FValues)); + end; +end; + +end. diff --git a/src/engine/e_fixedbuffer.pas b/src/engine/e_fixedbuffer.pas new file mode 100644 index 0000000..51fabec --- /dev/null +++ b/src/engine/e_fixedbuffer.pas @@ -0,0 +1,300 @@ +unit e_fixedbuffer; + +// ß íå õî÷ó òðàõàòüñÿ ñ êëàññàìè è ñîçäàíèåì ïî äâà îáúåêòà íà êàæäûé áóôåð, +// êàê â BinEditor/WADEDITOR, ïîýòîìó áóäåò òàê. Ïëþñ ôèêñèðîâàííûé ðàçìåð +// áûñòðåå. -- Primus + +interface + +uses md5asm; + +const + BUF_SIZE = 65536; + +type + TBuffer = record + Data: array [0..BUF_SIZE] of Byte; // îäèí áàéò ñâåðõó íà âñÿêèé ñëó÷àé + ReadPos: Cardinal; + WritePos: Cardinal; + Len: Cardinal; + end; + pTBuffer = ^TBuffer; + +var + RawPos: Cardinal = 0; + +procedure e_Buffer_Clear(B: pTBuffer); + + +procedure e_Buffer_Write_Generic(B: pTBuffer; var V; N: Cardinal); +procedure e_Buffer_Read_Generic(B: pTBuffer; var V; N: Cardinal); + + +procedure e_Buffer_Write(B: pTBuffer; V: Char); overload; + +procedure e_Buffer_Write(B: pTBuffer; V: Byte); overload; +procedure e_Buffer_Write(B: pTBuffer; V: Word); overload; +procedure e_Buffer_Write(B: pTBuffer; V: LongWord); overload; + +procedure e_Buffer_Write(B: pTBuffer; V: ShortInt); overload; +procedure e_Buffer_Write(B: pTBuffer; V: SmallInt); overload; +procedure e_Buffer_Write(B: pTBuffer; V: LongInt); overload; + +procedure e_Buffer_Write(B: pTBuffer; V: string); overload; + +procedure e_Buffer_Write(B: pTBuffer; V: TMD5Digest); overload; + + +function e_Buffer_Read_Char(B: pTBuffer): Char; + +function e_Buffer_Read_Byte(B: pTBuffer): Byte; +function e_Buffer_Read_Word(B: pTBuffer): Word; +function e_Buffer_Read_LongWord(B: pTBuffer): LongWord; + +function e_Buffer_Read_ShortInt(B: pTBuffer): ShortInt; +function e_Buffer_Read_SmallInt(B: pTBuffer): SmallInt; +function e_Buffer_Read_LongInt(B: pTBuffer): LongInt; + +function e_Buffer_Read_String(B: pTBuffer): string; + +function e_Buffer_Read_MD5(B: pTBuffer): TMD5Digest; + + +procedure e_Raw_Read_Generic(P: Pointer; var V; N: Cardinal); + +function e_Raw_Read_Char(P: Pointer): Char; + +function e_Raw_Read_Byte(P: Pointer): Byte; +function e_Raw_Read_Word(P: Pointer): Word; +function e_Raw_Read_LongWord(P: Pointer): LongWord; + +function e_Raw_Read_ShortInt(P: Pointer): ShortInt; +function e_Raw_Read_SmallInt(P: Pointer): SmallInt; +function e_Raw_Read_LongInt(P: Pointer): LongInt; + +function e_Raw_Read_String(P: Pointer): string; + +function e_Raw_Read_MD5(P: Pointer): TMD5Digest; + +procedure e_Raw_Seek(I: Cardinal); + +implementation + +uses Windows, SysUtils; + +procedure e_Buffer_Clear(B: pTBuffer); +begin + B^.WritePos := 0; + B^.ReadPos := 0; + B^.Len := 0; +end; + + +procedure e_Buffer_Write_Generic(B: pTBuffer; var V; N: Cardinal); +begin + if (B^.WritePos + N >= BUF_SIZE) then Exit; + if (B^.WritePos + N > B^.Len) then + B^.Len := B^.WritePos + N + 1; + + MoveMemory(Pointer(Cardinal(Addr(B^.Data)) + B^.WritePos), + @V, N); + + B^.WritePos := B^.WritePos + N; +end; +procedure e_Buffer_Read_Generic(B: pTBuffer; var V; N: Cardinal); +begin + if (B^.ReadPos + N >= BUF_SIZE) then Exit; + + MoveMemory(@V, Pointer(Cardinal(Addr(B^.Data)) + B^.ReadPos), N); + + B^.ReadPos := B^.ReadPos + N; +end; + + +procedure e_Buffer_Write(B: pTBuffer; V: Char); overload; +begin + e_Buffer_Write_Generic(B, V, 1); +end; + +procedure e_Buffer_Write(B: pTBuffer; V: Byte); overload; +begin + e_Buffer_Write_Generic(B, V, 1); +end; +procedure e_Buffer_Write(B: pTBuffer; V: Word); overload; +begin + e_Buffer_Write_Generic(B, V, 2); +end; +procedure e_Buffer_Write(B: pTBuffer; V: LongWord); overload; +begin + e_Buffer_Write_Generic(B, V, 4); +end; + +procedure e_Buffer_Write(B: pTBuffer; V: ShortInt); overload; +begin + e_Buffer_Write_Generic(B, V, 1); +end; +procedure e_Buffer_Write(B: pTBuffer; V: SmallInt); overload; +begin + e_Buffer_Write_Generic(B, V, 2); +end; +procedure e_Buffer_Write(B: pTBuffer; V: LongInt); overload; +begin + e_Buffer_Write_Generic(B, V, 4); +end; + +procedure e_Buffer_Write(B: pTBuffer; V: string); overload; +var + Len: Byte; + P: Cardinal; +begin + Len := Length(V); + e_Buffer_Write_Generic(B, Len, 1); + + if (Len = 0) then Exit; + + P := B^.WritePos + Len; + if (P >= BUF_SIZE) then + begin + Len := BUF_SIZE - B^.WritePos; + P := BUF_SIZE; + end; + + if (P > B^.Len) then B^.Len := P; + + CopyMemory(Pointer(Cardinal(Addr(B^.Data)) + B^.WritePos), + @V[1], Len); + + B^.WritePos := P; +end; + +procedure e_Buffer_Write(B: pTBuffer; V: TMD5Digest); overload; +var + I: Integer; +begin + for I := 0 to 15 do + e_Buffer_Write(B, V.v[I]); +end; + + +function e_Buffer_Read_Char(B: pTBuffer): Char; +begin + e_Buffer_Read_Generic(B, Result, 1); +end; + +function e_Buffer_Read_Byte(B: pTBuffer): Byte; +begin + e_Buffer_Read_Generic(B, Result, 1); +end; +function e_Buffer_Read_Word(B: pTBuffer): Word; +begin + e_Buffer_Read_Generic(B, Result, 2); +end; +function e_Buffer_Read_LongWord(B: pTBuffer): LongWord; +begin + e_Buffer_Read_Generic(B, Result, 4); +end; + +function e_Buffer_Read_ShortInt(B: pTBuffer): ShortInt; +begin + e_Buffer_Read_Generic(B, Result, 1); +end; +function e_Buffer_Read_SmallInt(B: pTBuffer): SmallInt; +begin + e_Buffer_Read_Generic(B, Result, 2); +end; +function e_Buffer_Read_LongInt(B: pTBuffer): LongInt; +begin + e_Buffer_Read_Generic(B, Result, 4); +end; + +function e_Buffer_Read_String(B: pTBuffer): string; +var + Len: Byte; +begin + Len := e_Buffer_Read_Byte(B); + Result := ''; + if Len = 0 then Exit; + + if B^.ReadPos + Len > B^.Len then + Len := B^.Len - B^.ReadPos; + + SetLength(Result, Len); + MoveMemory(@Result[1], Pointer(Cardinal(Addr(B^.Data)) + B^.ReadPos), Len); + + B^.ReadPos := B^.ReadPos + Len; +end; + +function e_Buffer_Read_MD5(B: pTBuffer): TMD5Digest; +var + I: Integer; +begin + for I := 0 to 15 do + Result.v[I] := e_Buffer_Read_Byte(B); +end; + +procedure e_Raw_Read_Generic(P: Pointer; var V; N: Cardinal); +begin + MoveMemory(@V, Pointer(Cardinal(P) + RawPos), N); + + RawPos := RawPos + N; +end; + +function e_Raw_Read_Char(P: Pointer): Char; +begin + e_Raw_Read_Generic(P, Result, 1); +end; + +function e_Raw_Read_Byte(P: Pointer): Byte; +begin + e_Raw_Read_Generic(P, Result, 1); +end; +function e_Raw_Read_Word(P: Pointer): Word; +begin + e_Raw_Read_Generic(P, Result, 2); +end; +function e_Raw_Read_LongWord(P: Pointer): LongWord; +begin + e_Raw_Read_Generic(P, Result, 4); +end; + +function e_Raw_Read_ShortInt(P: Pointer): ShortInt; +begin + e_Raw_Read_Generic(P, Result, 1); +end; +function e_Raw_Read_SmallInt(P: Pointer): SmallInt; +begin + e_Raw_Read_Generic(P, Result, 2); +end; +function e_Raw_Read_LongInt(P: Pointer): LongInt; +begin + e_Raw_Read_Generic(P, Result, 4); +end; + +function e_Raw_Read_String(P: Pointer): string; +var + Len: Byte; +begin + Len := e_Raw_Read_Byte(P); + Result := ''; + if Len = 0 then Exit; + + SetLength(Result, Len); + MoveMemory(@Result[1], Pointer(Cardinal(P) + RawPos), Len); + + RawPos := RawPos + Len; +end; + +function e_Raw_Read_MD5(P: Pointer): TMD5Digest; +var + I: Integer; +begin + for I := 0 to 15 do + Result.v[I] := e_Raw_Read_Byte(P); +end; + +procedure e_Raw_Seek(I: Cardinal); +begin + RawPos := I; +end; + +end. diff --git a/src/engine/e_graphics.pas b/src/engine/e_graphics.pas new file mode 100644 index 0000000..e4eb35a --- /dev/null +++ b/src/engine/e_graphics.pas @@ -0,0 +1,1646 @@ +unit e_graphics; + +interface + +uses + windows, SysUtils, Math, e_log, e_textures, dglOpenGL; + +type + TMirrorType=(M_NONE, M_HORIZONTAL, M_VERTICAL); + TBlending=(B_NONE, B_BLEND, B_FILTER, B_INVERT); + + TPoint2i = record + X, Y: Integer; + end; + + TPoint2f = record + X, Y: Double; + end; + + TRect = windows.TRect; + + TRectWH = record + X, Y: Integer; + Width, Height: Word; + end; + + TRGB = packed record + R, G, B: Byte; + end; + + PPoint = ^TPoint; + PPoint2f = ^TPoint2f; + PRect = ^TRect; + PRectWH = ^TRectWH; + + +//------------------------------------------------------------------ +// ïðîòîòèïû ôóíêöèé +//------------------------------------------------------------------ +procedure e_InitGL(VSync: Boolean); +procedure e_SetViewPort(X, Y, Width, Height: Word); +procedure e_ResizeWindow(Width, Height: Integer); + +procedure e_Draw(ID: DWORD; X, Y: Integer; Alpha: Byte; AlphaChannel: Boolean; + Blending: Boolean; Mirror: TMirrorType = M_NONE); +procedure e_DrawAdv(ID: DWORD; X, Y: Integer; Alpha: Byte; AlphaChannel: Boolean; + Blending: Boolean; Angle: Single; RC: PPoint; Mirror: TMirrorType = M_NONE); +procedure e_DrawSize(ID: DWORD; X, Y: Integer; Alpha: Byte; AlphaChannel: Boolean; + Blending: Boolean; Width, Height: Word; Mirror: TMirrorType = M_NONE); +procedure e_DrawSizeMirror(ID: DWORD; X, Y: Integer; Alpha: Byte; AlphaChannel: Boolean; + Blending: Boolean; Width, Height: Word; Mirror: TMirrorType = M_NONE); +procedure e_DrawFill(ID: DWORD; X, Y: Integer; XCount, YCount: Word; Alpha: Integer; + AlphaChannel: Boolean; Blending: Boolean); +procedure e_DrawPoint(Size: Byte; X, Y: Integer; Red, Green, Blue: Byte); +procedure e_DrawLine(Width: Byte; X1, Y1, X2, Y2: Integer; Red, Green, Blue: Byte; Alpha: Byte = 0); +procedure e_DrawQuad(X1, Y1, X2, Y2: Integer; Red, Green, Blue: Byte; Alpha: Byte = 0); +procedure e_DrawFillQuad(X1, Y1, X2, Y2: Integer; Red, Green, Blue, Alpha: Byte; + Blending: TBlending = B_NONE); + +function e_CreateTexture(FileName: string; var ID: DWORD): Boolean; +function e_CreateTextureEx(FileName: string; var ID: DWORD; fX, fY, fWidth, fHeight: Word): Boolean; +function e_CreateTextureMem(pData: Pointer; var ID: DWORD): Boolean; +function e_CreateTextureMemEx(pData: Pointer; var ID: DWORD; fX, fY, fWidth, fHeight: Word): Boolean; +procedure e_GetTextureSize(ID: DWORD; Width, Height: PWord); +function e_GetTextureSize2(ID: DWORD): TRectWH; +procedure e_DeleteTexture(ID: DWORD); +procedure e_RemoveAllTextures(); + +// SimpleFont +function e_SimpleFontCreate(FontName: PChar; Size: Byte; Weight: Word; DC: HDC): DWORD; +procedure e_SimpleFontFree(Font: DWORD); +procedure e_SimpleFontPrint(X, Y: SmallInt; Text: PChar; Font: Integer; Red, Green, Blue: Byte); +procedure e_SimpleFontPrintEx(X, Y: SmallInt; Text: PChar; Font: DWORD; Red, Green, Blue, + sRed, sGreen, sBlue, sWidth: Byte); + +// CharFont +function e_CharFont_Create(sp: ShortInt=0): DWORD; +procedure e_CharFont_AddChar(FontID: DWORD; Texture: Integer; c: Char; w: Byte); +procedure e_CharFont_Print(FontID: DWORD; X, Y: Integer; Text: string); +procedure e_CharFont_PrintEx(FontID: DWORD; X, Y: Integer; Text: string; + Color: TRGB; Scale: Single = 1.0); +procedure e_CharFont_PrintFmt(FontID: DWORD; X, Y: Integer; Text: string); +procedure e_CharFont_GetSize(FontID: DWORD; Text: string; var w, h: Word); +procedure e_CharFont_GetSizeFmt(FontID: DWORD; Text: string; var w, h: Word); +function e_CharFont_GetMaxWidth(FontID: DWORD): Word; +function e_CharFont_GetMaxHeight(FontID: DWORD): Word; +procedure e_CharFont_Remove(FontID: DWORD); +procedure e_CharFont_RemoveAll(); + +// TextureFont +procedure e_TextureFontBuild(Texture: DWORD; var FontID: DWORD; XCount, YCount: Word; + Space: ShortInt=0); +procedure e_TextureFontKill(FontID: DWORD); +procedure e_TextureFontPrint(X, Y: GLint; Text: string; FontID: DWORD); +procedure e_TextureFontPrintEx(X, Y: GLint; Text: string; FontID: DWORD; Red, Green, + Blue: Byte; Scale: Single; Shadow: Boolean = False); +procedure e_TextureFontPrintFmt(X, Y: GLint; Text: string; FontID: DWORD; Shadow: Boolean = False); +procedure e_TextureFontGetSize(ID: DWORD; var CharWidth, CharHeight: Byte); +procedure e_RemoveAllTextureFont(); + +procedure e_ReleaseEngine(); +procedure e_BeginRender(); +procedure e_Clear(Mask: TGLbitfield; Red, Green, Blue: Single); +procedure e_EndRender(); + +function e_GetGamma(DC: HDC): Byte; +procedure e_SetGamma(Gamma: Byte; DC: HDC); + +procedure e_MakeScreenshot(FileName: string; Width, Height: Word); + +function _RGB(Red, Green, Blue: Byte): TRGB; +function _Point(X, Y: Integer): TPoint2i; +function _Rect(X, Y: Integer; Width, Height: Word): TRectWH; + + +var + e_Colors: TRGB; + +implementation + +type + TTexture = record + ID: DWORD; + Width: Word; + Height: Word; + end; + + TTextureFont = record + TextureID: DWORD; + Base: GLuint; + CharWidth: Byte; + CharHeight: Byte; + end; + + TCharFont = record + Chars: array[0..255] of + record + TextureID: Integer; + Width: Byte; + end; + Space: ShortInt; + Height: ShortInt; + Live: Boolean; + end; + +var + e_Textures: array of TTexture = nil; + e_TextureFonts: array of TTextureFont = nil; + e_CharFonts: array of TCharFont; + +//------------------------------------------------------------------ +// Èíèöèàëèçèðóåò OpenGL +//------------------------------------------------------------------ +procedure e_InitGL(VSync: Boolean); +begin + if VSync then + wglSwapIntervalEXT(1) + else + wglSwapIntervalEXT(0); + glDisable(GL_DEPTH_TEST); + glEnable(GL_SCISSOR_TEST); + e_Colors.R := 255; + e_Colors.G := 255; + e_Colors.B := 255; + glClearColor(0, 0, 0, 0); +end; + +procedure e_SetViewPort(X, Y, Width, Height: Word); +var + mat: Array [0..15] of GLDouble; + +begin + glLoadIdentity(); + glScissor(X, Y, Width, Height); + glViewport(X, Y, Width, Height); + //gluOrtho2D(0, Width, Height, 0); + + glMatrixMode(GL_PROJECTION); + + mat[ 0] := 2.0 / Width; + mat[ 1] := 0.0; + mat[ 2] := 0.0; + mat[ 3] := 0.0; + + mat[ 4] := 0.0; + mat[ 5] := -2.0 / Height; + mat[ 6] := 0.0; + mat[ 7] := 0.0; + + mat[ 8] := 0.0; + mat[ 9] := 0.0; + mat[10] := 1.0; + mat[11] := 0.0; + + mat[12] := -1.0; + mat[13] := 1.0; + mat[14] := 0.0; + mat[15] := 1.0; + + glLoadMatrixd(@mat[0]); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +end; + +//------------------------------------------------------------------ +// Èùåò ñâîáîäíûé ýëåìåíò â ìàññèâå òåêñòóð +//------------------------------------------------------------------ +function FindTexture(): DWORD; +var + i: integer; +begin + if e_Textures <> nil then + for i := 0 to High(e_Textures) do + if e_Textures[i].Width = 0 then + begin + Result := i; + Exit; + end; + + if e_Textures = nil then + begin + SetLength(e_Textures, 32); + Result := 0; + end + else + begin + Result := High(e_Textures) + 1; + SetLength(e_Textures, Length(e_Textures) + 32); + end; +end; + +//------------------------------------------------------------------ +// Ñîçäàåò òåêñòóðó +//------------------------------------------------------------------ +function e_CreateTexture(FileName: String; var ID: DWORD): Boolean; +var + find_id: DWORD; +begin + Result := False; + + e_WriteLog('Loading texture from '+FileName, MSG_NOTIFY); + + find_id := FindTexture(); + + if not LoadTexture(FileName, e_Textures[find_id].ID, e_Textures[find_id].Width, + e_Textures[find_id].Height) then Exit; + + ID := find_id; + + Result := True; +end; + +function e_CreateTextureEx(FileName: String; var ID: DWORD; fX, fY, fWidth, fHeight: Word): Boolean; +var + find_id: DWORD; +begin + Result := False; + + find_id := FindTexture(); + + if not LoadTextureEx(FileName, e_Textures[find_id].ID, fX, fY, fWidth, fHeight) then Exit; + + e_Textures[find_id].Width := fWidth; + e_Textures[find_id].Height := fHeight; + + ID := find_id; + + Result := True; +end; + +function e_CreateTextureMem(pData: Pointer; var ID: DWORD): Boolean; +var + find_id: DWORD; +begin + Result := False; + + find_id := FindTexture; + + if not LoadTextureMem(pData, e_Textures[find_id].ID, e_Textures[find_id].Width, + e_Textures[find_id].Height) then Exit; + + id := find_id; + + Result := True; +end; + +function e_CreateTextureMemEx(pData: Pointer; var ID: DWORD; fX, fY, fWidth, fHeight: Word): Boolean; +var + find_id: DWORD; +begin + Result := False; + + find_id := FindTexture(); + + if not LoadTextureMemEx(pData, e_Textures[find_id].ID, fX, fY, fWidth, fHeight) then Exit; + + e_Textures[find_id].Width := fWidth; + e_Textures[find_id].Height := fHeight; + + ID := find_id; + + Result := True; +end; + +procedure e_GetTextureSize(ID: DWORD; Width, Height: PWord); +begin + if Width <> nil then Width^ := e_Textures[ID].Width; + if Height <> nil then Height^ := e_Textures[ID].Height; +end; + +function e_GetTextureSize2(ID: DWORD): TRectWH; +var + data: Pointer; + x, y: Integer; + w, h: Word; + a: Boolean; + lastline: Integer; +begin + w := e_Textures[ID].Width; + h := e_Textures[ID].Height; + data := GetMemory(w*h*4); + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, e_Textures[ID].ID); + glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); + + Result.Y := 0; + Result.X := 0; + Result.Width := w; + Result.Height := h; + + for y := h-1 downto 0 do + begin + lastline := y; + a := True; + + for x := 1 to w-4 do + begin + a := Byte(Pointer(Integer(data)+y*w*4+x*4+3)^) <> 0; + if a then Break; + end; + + if a then + begin + Result.Y := h-lastline; + Break; + end; + end; + + for y := 0 to h-1 do + begin + lastline := y; + a := True; + + for x := 1 to w-4 do + begin + a := Byte(Pointer(Integer(data)+y*w*4+x*4+3)^) <> 0; + if a then Break; + end; + + if a then + begin + Result.Height := h-lastline-Result.Y; + Break; + end; + end; + + for x := 0 to w-1 do + begin + lastline := x; + a := True; + + for y := 1 to h-4 do + begin + a := Byte(Pointer(Integer(data)+y*w*4+x*4+3)^) <> 0; + if a then Break; + end; + + if a then + begin + Result.X := lastline+1; + Break; + end; + end; + + for x := w-1 downto 0 do + begin + lastline := x; + a := True; + + for y := 1 to h-4 do + begin + a := Byte(Pointer(Integer(data)+y*w*4+x*4+3)^) <> 0; + if a then Break; + end; + + if a then + begin + Result.Width := lastline-Result.X+1; + Break; + end; + end; + + FreeMemory(data); +end; + +procedure e_ResizeWindow(Width, Height: Integer); +begin + if Height = 0 then + Height := 1; + e_SetViewPort(0, 0, Width, Height); +end; + +procedure e_Draw(ID: DWORD; X, Y: Integer; Alpha: Byte; AlphaChannel: Boolean; + Blending: Boolean; Mirror: TMirrorType = M_NONE); +begin + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); + + if (Alpha > 0) or (AlphaChannel) or (Blending) then + glEnable(GL_BLEND) + else + glDisable(GL_BLEND); + + if (AlphaChannel) or (Alpha > 0) then + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + if Alpha > 0 then + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255-Alpha); + + if Blending then + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, e_Textures[ID].ID); + glBegin(GL_QUADS); + + if Mirror = M_NONE then + begin + glTexCoord2i(1, 0); glVertex2i(X + e_Textures[id].Width, Y); + glTexCoord2i(0, 0); glVertex2i(X, Y); + glTexCoord2i(0, -1); glVertex2i(X, Y + e_Textures[id].Height); + glTexCoord2i(1, -1); glVertex2i(X + e_Textures[id].Width, Y + e_Textures[id].Height); + end + else + if Mirror = M_HORIZONTAL then + begin + glTexCoord2i(1, 0); glVertex2i(X, Y); + glTexCoord2i(0, 0); glVertex2i(X + e_Textures[id].Width, Y); + glTexCoord2i(0, -1); glVertex2i(X + e_Textures[id].Width, Y + e_Textures[id].Height); + glTexCoord2i(1, -1); glVertex2i(X, Y + e_Textures[id].Height); + end + else + if Mirror = M_VERTICAL then + begin + glTexCoord2i(1, -1); glVertex2i(X + e_Textures[id].Width, Y); + glTexCoord2i(0, -1); glVertex2i(X, Y); + glTexCoord2i(0, 0); glVertex2i(X, Y + e_Textures[id].Height); + glTexCoord2i(1, 0); glVertex2i(X + e_Textures[id].Width, Y + e_Textures[id].Height); + end; + + glEnd(); + + glDisable(GL_BLEND); +end; + +procedure e_DrawSize(ID: DWORD; X, Y: Integer; Alpha: Byte; AlphaChannel: Boolean; + Blending: Boolean; Width, Height: Word; Mirror: TMirrorType = M_NONE); +begin + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); + + if (Alpha > 0) or (AlphaChannel) or (Blending) then + glEnable(GL_BLEND) + else + glDisable(GL_BLEND); + + if (AlphaChannel) or (Alpha > 0) then + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + if Alpha > 0 then + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255-Alpha); + + if Blending then + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, e_Textures[ID].ID); + + glBegin(GL_QUADS); + glTexCoord2i(0, 1); glVertex2i(X, Y); + glTexCoord2i(1, 1); glVertex2i(X + Width, Y); + glTexCoord2i(1, 0); glVertex2i(X + Width, Y + Height); + glTexCoord2i(0, 0); glVertex2i(X, Y + Height); + glEnd(); + + glDisable(GL_BLEND); +end; + +procedure e_DrawSizeMirror(ID: DWORD; X, Y: Integer; Alpha: Byte; AlphaChannel: Boolean; + Blending: Boolean; Width, Height: Word; Mirror: TMirrorType = M_NONE); +begin + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); + + if (Alpha > 0) or (AlphaChannel) or (Blending) then + glEnable(GL_BLEND) + else + glDisable(GL_BLEND); + + if (AlphaChannel) or (Alpha > 0) then + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + if Alpha > 0 then + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255-Alpha); + + if Blending then + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, e_Textures[ID].ID); + glBegin(GL_QUADS); + + if Mirror = M_NONE then + begin + glTexCoord2i(1, 0); glVertex2i(X + Width, Y); + glTexCoord2i(0, 0); glVertex2i(X, Y); + glTexCoord2i(0, -1); glVertex2i(X, Y + Height); + glTexCoord2i(1, -1); glVertex2i(X + Width, Y + Height); + end + else + if Mirror = M_HORIZONTAL then + begin + glTexCoord2i(1, 0); glVertex2i(X, Y); + glTexCoord2i(0, 0); glVertex2i(X + Width, Y); + glTexCoord2i(0, -1); glVertex2i(X + Width, Y + Height); + glTexCoord2i(1, -1); glVertex2i(X, Y + Height); + end + else + if Mirror = M_VERTICAL then + begin + glTexCoord2i(1, -1); glVertex2i(X + Width, Y); + glTexCoord2i(0, -1); glVertex2i(X, Y); + glTexCoord2i(0, 0); glVertex2i(X, Y + Height); + glTexCoord2i(1, 0); glVertex2i(X + Width, Y + Height); + end; + + glEnd(); + + glDisable(GL_BLEND); +end; + +procedure e_DrawFill(ID: DWORD; X, Y: Integer; XCount, YCount: Word; Alpha: Integer; + AlphaChannel: Boolean; Blending: Boolean); +var + X2, Y2: Integer; + +begin + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); + + if (Alpha > 0) or (AlphaChannel) or (Blending) then + glEnable(GL_BLEND) + else + glDisable(GL_BLEND); + + if (AlphaChannel) or (Alpha > 0) then + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + if Alpha > 0 then + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255-Alpha); + + if Blending then + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + if XCount = 0 then + XCount := 1; + + if YCount = 0 then + YCount := 1; + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, e_Textures[ID].ID); + + X2 := X + e_Textures[ID].Width * XCount; + Y2 := Y + e_Textures[ID].Height * YCount; + + glBegin(GL_QUADS); + glTexCoord2i(0, YCount); glVertex2i(X, Y); + glTexCoord2i(XCount, YCount); glVertex2i(X2, Y); + glTexCoord2i(XCount, 0); glVertex2i(X2, Y2); + glTexCoord2i(0, 0); glVertex2i(X, Y2); + glEnd(); + + glDisable(GL_BLEND); +end; + +procedure e_DrawAdv(ID: DWORD; X, Y: Integer; Alpha: Byte; AlphaChannel: Boolean; + Blending: Boolean; Angle: Single; RC: PPoint; Mirror: TMirrorType = M_NONE); +begin + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); + + if (Alpha > 0) or (AlphaChannel) or (Blending) then + glEnable(GL_BLEND) + else + glDisable(GL_BLEND); + + if (AlphaChannel) or (Alpha > 0) then + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + if Alpha > 0 then + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255-Alpha); + + if Blending then + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + if (Angle <> 0) and (RC <> nil) then + begin + glPushMatrix(); + glTranslatef(X+RC.X, Y+RC.Y, 0); + glRotatef(Angle, 0, 0, 1); + glTranslatef(-(X+RC.X), -(Y+RC.Y), 0); + end; + + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, e_Textures[id].ID); + glBegin(GL_QUADS); //0-1 1-1 + //00 10 + if Mirror = M_NONE then + begin + glTexCoord2i(1, 0); glVertex2i(X + e_Textures[id].Width, Y); + glTexCoord2i(0, 0); glVertex2i(X, Y); + glTexCoord2i(0, -1); glVertex2i(X, Y + e_Textures[id].Height); + glTexCoord2i(1, -1); glVertex2i(X + e_Textures[id].Width, Y + e_Textures[id].Height); + end + else + if Mirror = M_HORIZONTAL then + begin + glTexCoord2i(1, 0); glVertex2i(X, Y); + glTexCoord2i(0, 0); glVertex2i(X + e_Textures[id].Width, Y); + glTexCoord2i(0, -1); glVertex2i(X + e_Textures[id].Width, Y + e_Textures[id].Height); + glTexCoord2i(1, -1); glVertex2i(X, Y + e_Textures[id].Height); + end + else + if Mirror = M_VERTICAL then + begin + glTexCoord2i(1, -1); glVertex2i(X + e_Textures[id].Width, Y); + glTexCoord2i(0, -1); glVertex2i(X, Y); + glTexCoord2i(0, 0); glVertex2i(X, Y + e_Textures[id].Height); + glTexCoord2i(1, 0); glVertex2i(X + e_Textures[id].Width, Y + e_Textures[id].Height); + end; + + glEnd(); + + if Angle <> 0 then + glPopMatrix(); + + glDisable(GL_BLEND); +end; + +procedure e_DrawPoint(Size: Byte; X, Y: Integer; Red, Green, Blue: Byte); +begin + glDisable(GL_TEXTURE_2D); + glColor3ub(Red, Green, Blue); + glPointSize(Size); + + if (Size = 2) or (Size = 4) then + X := X + 1; + + glBegin(GL_POINTS); + glVertex2f(X+0.3, Y+1.0); + glEnd(); + + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); +end; + +procedure e_LineCorrection(var X1, Y1, X2, Y2: Integer); +begin + // Make lines only top-left/bottom-right and top-right/bottom-left + if Y2 < Y1 then + begin + X1 := X1 xor X2; + X2 := X1 xor X2; + X1 := X1 xor X2; + + Y1 := Y1 xor Y2; + Y2 := Y1 xor Y2; + Y1 := Y1 xor Y2; + end; + + // Pixel-perfect hack + if X1 < X2 then + Inc(X2) + else + Inc(X1); + Inc(Y2); +end; + +procedure e_DrawQuad(X1, Y1, X2, Y2: Integer; Red, Green, Blue: Byte; Alpha: Byte = 0); +var + nX1, nY1, nX2, nY2: Integer; +begin + // Only top-left/bottom-right quad + if X1 > X2 then + begin + X1 := X1 xor X2; + X2 := X1 xor X2; + X1 := X1 xor X2; + end; + if Y1 > Y2 then + begin + Y1 := Y1 xor Y2; + Y2 := Y1 xor Y2; + Y1 := Y1 xor Y2; + end; + + if Alpha > 0 then + begin + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + end else + glDisable(GL_BLEND); + + glDisable(GL_TEXTURE_2D); + glColor4ub(Red, Green, Blue, 255-Alpha); + glLineWidth(1); + + glBegin(GL_LINES); + nX1 := X1; nY1 := Y1; + nX2 := X2; nY2 := Y1; + e_LineCorrection(nX1, nY1, nX2, nY2); // Pixel-perfect lines + glVertex2i(nX1, nY1); + glVertex2i(nX2, nY2); + + nX1 := X2; nY1 := Y1; + nX2 := X2; nY2 := Y2; + e_LineCorrection(nX1, nY1, nX2, nY2); + glVertex2i(nX1, nY1); + glVertex2i(nX2, nY2); + + nX1 := X2; nY1 := Y2; + nX2 := X1; nY2 := Y2; + e_LineCorrection(nX1, nY1, nX2, nY2); + glVertex2i(nX1, nY1); + glVertex2i(nX2, nY2); + + nX1 := X1; nY1 := Y2; + nX2 := X1; nY2 := Y1; + e_LineCorrection(nX1, nY1, nX2, nY2); + glVertex2i(nX1, nY1); + glVertex2i(nX2, nY2); + glEnd(); + + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); + + glDisable(GL_BLEND); +end; + +procedure e_DrawFillQuad(X1, Y1, X2, Y2: Integer; Red, Green, Blue, Alpha: Byte; + Blending: TBlending = B_NONE); +begin + if (Alpha > 0) or (Blending <> B_NONE) then + glEnable(GL_BLEND) + else + glDisable(GL_BLEND); + + if Blending = B_BLEND then + glBlendFunc(GL_SRC_ALPHA, GL_ONE) + else + if Blending = B_FILTER then + glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR) + else + if Blending = B_INVERT then + glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO) + else + if Alpha > 0 then + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + glDisable(GL_TEXTURE_2D); + glColor4ub(Red, Green, Blue, 255-Alpha); + + X2 := X2 + 1; + Y2 := Y2 + 1; + + glBegin(GL_QUADS); + glVertex2i(X1, Y1); + glVertex2i(X2, Y1); + glVertex2i(X2, Y2); + glVertex2i(X1, Y2); + glEnd(); + + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); + + glDisable(GL_BLEND); +end; + +procedure e_DrawLine(Width: Byte; X1, Y1, X2, Y2: Integer; Red, Green, Blue: Byte; Alpha: Byte = 0); +begin + // Pixel-perfect lines + if Width = 1 then + e_LineCorrection(X1, Y1, X2, Y2); + + if Alpha > 0 then + begin + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + end else + glDisable(GL_BLEND); + + glDisable(GL_TEXTURE_2D); + glColor4ub(Red, Green, Blue, 255-Alpha); + glLineWidth(Width); + + glBegin(GL_LINES); + glVertex2i(X1, Y1); + glVertex2i(X2, Y2); + glEnd(); + + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); + + glDisable(GL_BLEND); +end; + +//------------------------------------------------------------------ +// Óäàëÿåò òåêñòóðó èç ìàññèâà +//------------------------------------------------------------------ +procedure e_DeleteTexture(ID: DWORD); +begin + glDeleteTextures(1, @e_Textures[ID].ID); + e_Textures[ID].ID := 0; + e_Textures[ID].Width := 0; + e_Textures[ID].Height := 0; +end; + +//------------------------------------------------------------------ +// Óäàëÿåò âñå òåêñòóðû +//------------------------------------------------------------------ +procedure e_RemoveAllTextures(); +var + i: integer; +begin + if e_Textures = nil then Exit; + + for i := 0 to High(e_Textures) do + if e_Textures[i].Width <> 0 then e_DeleteTexture(i); + e_Textures := nil; +end; + +//------------------------------------------------------------------ +// Óäàëÿåò äâèæîê +//------------------------------------------------------------------ +procedure e_ReleaseEngine(); +begin + e_RemoveAllTextures; + e_RemoveAllTextureFont; +end; + +procedure e_BeginRender(); +begin + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0.0); +end; + +procedure e_Clear(Mask: TGLbitfield; Red, Green, Blue: Single); +begin + glClearColor(Red, Green, Blue, 0); + glClear(Mask); +end; + +procedure e_EndRender(); +begin + glPopMatrix(); +end; + +procedure e_MakeScreenshot(FileName: String; Width, Height: Word); +type + aRGB = Array [0..1] of TRGB; + PaRGB = ^aRGB; + + TByteArray = Array [0..1] of Byte; + PByteArray = ^TByteArray; + +var + FILEHEADER: BITMAPFILEHEADER; + INFOHEADER: BITMAPINFOHEADER; + pixels: PByteArray; + tmp: Byte; + i: Integer; + F: File of Byte; + +begin + if (Width mod 4) > 0 then + Width := Width + 4 - (Width mod 4); + + GetMem(pixels, Width*Height*3); + glReadPixels(0, 0, Width, Height, GL_RGB, GL_UNSIGNED_BYTE, pixels); + + {$R-} + for i := 0 to Width * Height - 1 do + with PaRGB(pixels)[i] do + begin + tmp := R; + R := B; + B := tmp; + end; + {$R+} + + with FILEHEADER do + begin + bfType := $4D42; // "BM" + bfSize := Width*Height*3 + SizeOf(BITMAPFILEHEADER) + SizeOf(BITMAPINFOHEADER); + bfReserved1 := 0; + bfReserved2 := 0; + bfOffBits := SizeOf(BITMAPFILEHEADER) + SizeOf(BITMAPINFOHEADER); + end; + + with INFOHEADER do + begin + biSize := SizeOf(BITMAPINFOHEADER); + biWidth := Width; + biHeight := Height; + biPlanes := 1; + biBitCount := 24; + biCompression := 0; + biSizeImage := Width*Height*3; + biXPelsPerMeter := 0; + biYPelsPerMeter := 0; + biClrUsed := 0; + biClrImportant := 0; + end; + + AssignFile(F, FileName); + Rewrite(F); + + BlockWrite(F, FILEHEADER, SizeOf(FILEHEADER)); + BlockWrite(F, INFOHEADER, SizeOf(INFOHEADER)); + BlockWrite(F, pixels[0], Width*Height*3); + + CloseFile(F); + + FreeMem(pixels); +end; + +function e_GetGamma(DC: HDC): Byte; +var + ramp: array [0..256*3-1] of Word; + rgb: array [0..2] of Double; + sum: double; + count: integer; + min: integer; + max: integer; + A, B: double; + i, j: integer; +begin + rgb[0] := 1.0; + rgb[1] := 1.0; + rgb[2] := 1.0; + + GetDeviceGammaRamp(DC, ramp); + + for i := 0 to 2 do + begin + sum := 0; + count := 0; + min := 256 * i; + max := min + 256; + + for j := min to max - 1 do + if ramp[j] > 0 then + begin + B := (j mod 256)/256; + A := ramp[j]/65536; + sum := sum + ln(A)/ln(B); + inc(count); + end; + rgb[i] := sum / count; + end; + + Result := 100 - Trunc(((rgb[0] + rgb[1] + rgb[2])/3 - 0.23) * 100/(2.7 - 0.23)); +end; + +procedure e_SetGamma(Gamma: Byte; DC: HDC); +var + ramp: array [0..256*3-1] of Word; + i: integer; + r: double; + g: double; +begin + g := (100 - Gamma)*(2.7 - 0.23)/100 + 0.23; + + for i := 0 to 255 do + begin + r := Exp(g * ln(i/256))*65536; + if r < 0 then r := 0 + else if r > 65535 then r := 65535; + ramp[i] := trunc(r); + ramp[i + 256] := trunc(r); + ramp[i + 512] := trunc(r); + end; + + SetDeviceGammaRamp(DC, ramp); +end; + +function e_SimpleFontCreate(FontName: PChar; Size: Byte; Weight: Word; DC: HDC): DWORD; +var + font: HFONT; +begin + Result := glGenLists(96); // Generate enough display lists to hold + font := CreateFont(-Size, // height of font + 0, // average character width + 0, // angle of escapement + 0, // base-line orientation angle + Weight, // font weight + 0, // italic + 0, // underline + 0, // strikeout + RUSSIAN_CHARSET, // character set + OUT_TT_PRECIS, // output precision + CLIP_DEFAULT_PRECIS, // clipping precision + ANTIALIASED_QUALITY, // output quality + FF_DONTCARE or DEFAULT_PITCH, // pitch and family + FontName); // font + SelectObject(DC, font); // Sets the new font as the current font in the device context + wglUseFontBitmaps(DC, 32, 224, Result); // Creates a set display lists containing the bitmap fonts +end; + +procedure e_SimpleFontFree(Font: DWORD); +begin + glDeleteLists(Font, 223); // Delete the font display lists, returning used memory +end; + +procedure e_SimpleFontPrint(X, Y: SmallInt; Text: PChar; Font: Integer; Red, Green, Blue: Byte); +begin + glPopAttrib(); // Rendering bug workaround + + glColor3ub(Red, Green, Blue); + glDisable(GL_TEXTURE_2D); // Turn off textures, don't want our text textured + glRasterPos2i(X, Y); // Position the Text + glPushAttrib(GL_LIST_BIT); // Save's the current base list + glListBase(DWORD(Font-32)); // Set the base list to our character list + glCallLists(Length(Text), GL_UNSIGNED_BYTE, Text); // Display the text + glPopAttrib(); // Restore the old base list +end; + +procedure e_SimpleFontPrintEx(X, Y: SmallInt; Text: PChar; Font: DWORD; Red, Green, Blue, + sRed, sGreen, sBlue, sWidth: Byte); +begin + e_SimpleFontPrint(X, Y, Text, Font, Red, Green, Blue); + e_SimpleFontPrint(X+sWidth, Y+sWidth, Text, Font, sRed, sGreen, sBlue); +end; + +function e_CharFont_Create(sp: ShortInt=0): DWORD; +var + i, id: DWORD; +begin + e_WriteLog('Creating CharFont...', MSG_NOTIFY); + + id := DWORD(-1); + + if e_CharFonts <> nil then + for i := 0 to High(e_CharFonts) do + if not e_CharFonts[i].Live then + begin + id := i; + Break; + end; + + if id = DWORD(-1) then + begin + SetLength(e_CharFonts, Length(e_CharFonts) + 1); + id := High(e_CharFonts); + end; + + with e_CharFonts[id] do + begin + for i := 0 to High(Chars) do + with Chars[i] do + begin + TextureID := -1; + Width := 0; + end; + + Space := sp; + Live := True; + end; + + Result := id; +end; + +procedure e_CharFont_AddChar(FontID: DWORD; Texture: Integer; c: Char; w: Byte); +begin + with e_CharFonts[FontID].Chars[Ord(c)] do + begin + TextureID := Texture; + Width := w; + end; +end; + +procedure e_CharFont_Print(FontID: DWORD; X, Y: Integer; Text: string); +var + a: Integer; +begin + if Text = '' then Exit; + if e_CharFonts = nil then Exit; + if Integer(FontID) > High(e_CharFonts) then Exit; + + with e_CharFonts[FontID] do + begin + for a := 1 to Length(Text) do + with Chars[Ord(Text[a])] do + if TextureID <> -1 then + begin + e_Draw(TextureID, X, Y, 0, True, False); + X := X+Width+IfThen(a = Length(Text), 0, Space); + end; + end; +end; + +procedure e_CharFont_PrintEx(FontID: DWORD; X, Y: Integer; Text: string; + Color: TRGB; Scale: Single = 1.0); +var + a: Integer; + c: TRGB; +begin + if Text = '' then Exit; + if e_CharFonts = nil then Exit; + if Integer(FontID) > High(e_CharFonts) then Exit; + + with e_CharFonts[FontID] do + begin + for a := 1 to Length(Text) do + with Chars[Ord(Text[a])] do + if TextureID <> -1 then + begin + if Scale <> 1.0 then + begin + glPushMatrix; + glScalef(Scale, Scale, 0); + end; + + c := e_Colors; + e_Colors := Color; + e_Draw(TextureID, X, Y, 0, True, False); + e_Colors := c; + + if Scale <> 1.0 then glPopMatrix; + + X := X+Width+IfThen(a = Length(Text), 0, Space); + end; + end; +end; + +procedure e_CharFont_PrintFmt(FontID: DWORD; X, Y: Integer; Text: string); +var + a, TX, TY, len: Integer; + tc, c: TRGB; + w, h: Word; +begin + if Text = '' then Exit; + if e_CharFonts = nil then Exit; + if Integer(FontID) > High(e_CharFonts) then Exit; + + c.R := 255; + c.G := 255; + c.B := 255; + + TX := X; + TY := Y; + len := Length(Text); + + e_CharFont_GetSize(FontID, 'A', w, h); + + with e_CharFonts[FontID] do + begin + for a := 1 to len do + begin + case Text[a] of + #10: // line feed + begin + TX := X; + TY := TY + h; + continue; + end; + #1: // black + begin + c.R := 0; c.G := 0; c.B := 0; + continue; + end; + #2: // white + begin + c.R := 255; c.G := 255; c.B := 255; + continue; + end; + #3: // darker + begin + c.R := c.R div 2; c.G := c.G div 2; c.B := c.B div 2; + continue; + end; + #4: // lighter + begin + c.R := Min(c.R * 2, 255); c.G := Min(c.G * 2, 255); c.B := Min(c.B * 2, 255); + continue; + end; + #18: // red + begin + c.R := 255; c.G := 0; c.B := 0; + continue; + end; + #19: // green + begin + c.R := 0; c.G := 255; c.B := 0; + continue; + end; + #20: // blue + begin + c.R := 0; c.G := 0; c.B := 255; + continue; + end; + #21: // yellow + begin + c.R := 255; c.G := 255; c.B := 0; + continue; + end; + end; + + with Chars[Ord(Text[a])] do + if TextureID <> -1 then + begin + tc := e_Colors; + e_Colors := c; + e_Draw(TextureID, TX, TY, 0, True, False); + e_Colors := tc; + + TX := TX+Width+IfThen(a = Length(Text), 0, Space); + end; + end; + end; +end; + +procedure e_CharFont_GetSize(FontID: DWORD; Text: string; var w, h: Word); +var + a: Integer; + h2: Word; +begin + w := 0; + h := 0; + + if Text = '' then Exit; + if e_CharFonts = nil then Exit; + if Integer(FontID) > High(e_CharFonts) then Exit; + + with e_CharFonts[FontID] do + begin + for a := 1 to Length(Text) do + with Chars[Ord(Text[a])] do + if TextureID <> -1 then + begin + w := w+Width+IfThen(a = Length(Text), 0, Space); + e_GetTextureSize(TextureID, nil, @h2); + if h2 > h then h := h2; + end; + end; +end; + +procedure e_CharFont_GetSizeFmt(FontID: DWORD; Text: string; var w, h: Word); +var + a, lines, len: Integer; + h2, w2: Word; +begin + w2 := 0; + w := 0; + h := 0; + + if Text = '' then Exit; + if e_CharFonts = nil then Exit; + if Integer(FontID) > High(e_CharFonts) then Exit; + + lines := 1; + len := Length(Text); + + with e_CharFonts[FontID] do + begin + for a := 1 to len do + begin + if Text[a] = #10 then + begin + Inc(lines); + if w2 > w then + begin + w := w2; + w2 := 0; + end; + continue; + end + else if Text[a] in [#1, #2, #3, #4, #18, #19, #20, #21] then + continue; + + with Chars[Ord(Text[a])] do + if TextureID <> -1 then + begin + w2 := w2 + Width + IfThen(a = len, 0, Space); + e_GetTextureSize(TextureID, nil, @h2); + if h2 > h then h := h2; + end; + end; + end; + + if w2 > w then + w := w2; + h := h * lines; +end; + +function e_CharFont_GetMaxWidth(FontID: DWORD): Word; +var + a: Integer; +begin + Result := 0; + + if e_CharFonts = nil then Exit; + if Integer(FontID) > High(e_CharFonts) then Exit; + + for a := 0 to High(e_CharFonts[FontID].Chars) do + Result := Max(Result, e_CharFonts[FontID].Chars[a].Width); +end; + +function e_CharFont_GetMaxHeight(FontID: DWORD): Word; +var + a: Integer; + h2: Word; +begin + Result := 0; + + if e_CharFonts = nil then Exit; + if Integer(FontID) > High(e_CharFonts) then Exit; + + for a := 0 to High(e_CharFonts[FontID].Chars) do + begin + if e_CharFonts[FontID].Chars[a].TextureID <> -1 then + e_GetTextureSize(e_CharFonts[FontID].Chars[a].TextureID, nil, @h2) + else h2 := 0; + if h2 > Result then Result := h2; + end; +end; + +procedure e_CharFont_Remove(FontID: DWORD); +var + a: Integer; +begin + with e_CharFonts[FontID] do + for a := 0 to High(Chars) do + if Chars[a].TextureID <> -1 then e_DeleteTexture(Chars[a].TextureID); + + e_CharFonts[FontID].Live := False; +end; + +procedure e_CharFont_RemoveAll(); +var + a: Integer; +begin + if e_CharFonts = nil then Exit; + + for a := 0 to High(e_CharFonts) do + e_CharFont_Remove(a); + + e_CharFonts := nil; +end; + +procedure e_TextureFontBuild(Texture: DWORD; var FontID: DWORD; XCount, YCount: Word; + Space: ShortInt=0); +var + loop1 : GLuint; + cx, cy : real; + i, id: DWORD; +begin + e_WriteLog('Creating texture font...', MSG_NOTIFY); + + id := DWORD(-1); + + if e_TextureFonts <> nil then + for i := 0 to High(e_TextureFonts) do + if e_TextureFonts[i].Base = 0 then + begin + id := i; + Break; + end; + + if id = DWORD(-1) then + begin + SetLength(e_TextureFonts, Length(e_TextureFonts) + 1); + id := High(e_TextureFonts); + end; + + with e_TextureFonts[id] do + begin + Base := glGenLists(XCount*YCount); + TextureID := e_Textures[Texture].ID; + CharWidth := (e_Textures[Texture].Width div XCount)+Space; + CharHeight := e_Textures[Texture].Height div YCount; + end; + + glBindTexture(GL_TEXTURE_2D, e_Textures[Texture].ID); + for loop1 := 0 to XCount*YCount-1 do + begin + cx := (loop1 mod XCount)/XCount; + cy := (loop1 div YCount)/YCount; + + glNewList(e_TextureFonts[id].Base+loop1, GL_COMPILE); + glBegin(GL_QUADS); + glTexCoord2f(cx, 1.0-cy-1/YCount); + glVertex2d(0, e_Textures[Texture].Height div YCount); + + glTexCoord2f(cx+1/XCount, 1.0-cy-1/YCount); + glVertex2i(e_Textures[Texture].Width div XCount, e_Textures[Texture].Height div YCount); + + glTexCoord2f(cx+1/XCount, 1.0-cy); + glVertex2i(e_Textures[Texture].Width div XCount, 0); + + glTexCoord2f(cx, 1.0-cy); + glVertex2i(0, 0); + glEnd(); + glTranslated((e_Textures[Texture].Width div XCount)+Space, 0, 0); + glEndList(); + end; + + FontID := id; +end; + +procedure e_TextureFontKill(FontID: DWORD); +begin + glDeleteLists(e_TextureFonts[FontID].Base, 256); + e_TextureFonts[FontID].Base := 0; +end; + +procedure e_TextureFontPrint(X, Y: GLint; Text: string; FontID: DWORD); +begin + if Integer(FontID) > High(e_TextureFonts) then Exit; + if Text = '' then Exit; + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); + + glPushMatrix; + glBindTexture(GL_TEXTURE_2D, e_TextureFonts[FontID].TextureID); + glEnable(GL_TEXTURE_2D); + glTranslated(x, y, 0); + glListBase(DWORD(Integer(e_TextureFonts[FontID].Base)-32)); + glCallLists(Length(Text), GL_UNSIGNED_BYTE, PChar(Text)); + glDisable(GL_TEXTURE_2D); + glPopMatrix; + + glDisable(GL_BLEND); +end; + +// god forgive me for this, but i cannot figure out how to do it without lists +procedure e_TextureFontPrintChar(X, Y: Integer; Ch: Char; FontID: DWORD; Shadow: Boolean = False); +begin + glPushMatrix; + + if Shadow then + begin + glColor4ub(0, 0, 0, 128); + glTranslated(X+1, Y+1, 0); + glCallLists(1, GL_UNSIGNED_BYTE, @Ch); + glPopMatrix; + glPushMatrix; + end; + + glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255); + glTranslated(X, Y, 0); + glCallLists(1, GL_UNSIGNED_BYTE, @Ch); + + glPopMatrix; +end; + +procedure e_TextureFontPrintFmt(X, Y: Integer; Text: string; FontID: DWORD; Shadow: Boolean = False); +var + a, TX, TY, len: Integer; + tc, c: TRGB; + w: Word; +begin + if Text = '' then Exit; + if e_TextureFonts = nil then Exit; + if Integer(FontID) > High(e_TextureFonts) then Exit; + + c.R := 255; + c.G := 255; + c.B := 255; + + TX := X; + TY := Y; + len := Length(Text); + + w := e_TextureFonts[FontID].CharWidth; + + with e_TextureFonts[FontID] do + begin + glBindTexture(GL_TEXTURE_2D, e_TextureFonts[FontID].TextureID); + glEnable(GL_TEXTURE_2D); + glListBase(DWORD(Integer(e_TextureFonts[FontID].Base)-32)); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + + for a := 1 to len do + begin + case Text[a] of + {#10: // line feed + begin + TX := X; + TY := TY + h; + continue; + end;} + #1: // black + begin + c.R := 0; c.G := 0; c.B := 0; + continue; + end; + #2: // white + begin + c.R := 255; c.G := 255; c.B := 255; + continue; + end; + #3: // darker + begin + c.R := c.R div 2; c.G := c.G div 2; c.B := c.B div 2; + continue; + end; + #4: // lighter + begin + c.R := Min(c.R * 2, 255); c.G := Min(c.G * 2, 255); c.B := Min(c.B * 2, 255); + continue; + end; + #18: // red + begin + c.R := 255; c.G := 0; c.B := 0; + continue; + end; + #19: // green + begin + c.R := 0; c.G := 255; c.B := 0; + continue; + end; + #20: // blue + begin + c.R := 0; c.G := 0; c.B := 255; + continue; + end; + #21: // yellow + begin + c.R := 255; c.G := 255; c.B := 0; + continue; + end; + end; + + tc := e_Colors; + e_Colors := c; + e_TextureFontPrintChar(TX, TY, Text[a], FontID, Shadow); + e_Colors := tc; + + TX := TX+w; + end; + glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); + end; +end; + +procedure e_TextureFontPrintEx(X, Y: GLint; Text: string; FontID: DWORD; Red, Green, + Blue: Byte; Scale: Single; Shadow: Boolean = False); +begin + if Text = '' then Exit; + + glPushMatrix; + glBindTexture(GL_TEXTURE_2D, e_TextureFonts[FontID].TextureID); + glEnable(GL_TEXTURE_2D); + glListBase(DWORD(Integer(e_TextureFonts[FontID].Base)-32)); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + + if Shadow then + begin + glColor4ub(0, 0, 0, 128); + glTranslated(x+1, y+1, 0); + glScalef(Scale, Scale, 0); + glCallLists(Length(Text), GL_UNSIGNED_BYTE, PChar(Text)); + glPopMatrix; + glPushMatrix; + end; + + glColor4ub(Red, Green, Blue, 255); + glTranslated(x, y, 0); + glScalef(Scale, Scale, 0); + glCallLists(Length(Text), GL_UNSIGNED_BYTE, PChar(Text)); + + glDisable(GL_TEXTURE_2D); + glPopMatrix; + glColor3ub(e_Colors.R, e_Colors.G, e_Colors.B); + glDisable(GL_BLEND); +end; + +procedure e_TextureFontGetSize(ID: DWORD; var CharWidth, CharHeight: Byte); +begin + if Integer(ID) > High(e_TextureFonts) then + Exit; + CharWidth := e_TextureFonts[ID].CharWidth; + CharHeight := e_TextureFonts[ID].CharHeight; +end; + +procedure e_RemoveAllTextureFont(); +var + i: integer; +begin + if e_TextureFonts = nil then Exit; + + for i := 0 to High(e_TextureFonts) do + if e_TextureFonts[i].Base <> 0 then + begin + glDeleteLists(e_TextureFonts[i].Base, 256); + e_TextureFonts[i].Base := 0; + end; + + e_TextureFonts := nil; +end; + +function _RGB(Red, Green, Blue: Byte): TRGB; +begin + Result.R := Red; + Result.G := Green; + Result.B := Blue; +end; + +function _Point(X, Y: Integer): TPoint2i; +begin + Result.X := X; + Result.Y := Y; +end; + +function _Rect(X, Y: Integer; Width, Height: Word): TRectWH; +begin + Result.X := X; + Result.Y := Y; + Result.Width := Width; + Result.Height := Height; +end; + + +end. + diff --git a/src/engine/e_input.pas b/src/engine/e_input.pas new file mode 100644 index 0000000..6415808 --- /dev/null +++ b/src/engine/e_input.pas @@ -0,0 +1,502 @@ +Unit e_input; + +Interface + +Uses + Windows, + SysUtils, + e_log, + DirectInput; + +{type + TMouseInfo = record + X, Y: Integer; + Buttons: Array [0..3] of Boolean; + Accel: Real; + end;} + +const + e_MaxInputKeys = 256 + 32 + 6 + 6 + 4 - 1; + // 0..255 - 256 Keyboard buttons/keys + // 256..287 - 32 Joystick buttons + // 288..293 - 3 Joystick axises +/- + // 294..299 - 3 Joystick axis rotations +/- + // 300..303 - 2 Joystick sliders +/- + + e_WrongKey = 65535; + + e_IKey_Escape = DIK_ESCAPE; + e_IKey_Backspace = DIK_BACK; + e_IKey_Tab = DIK_TAB; + e_IKey_Enter = DIK_RETURN; + e_IKey_Space = DIK_SPACE; + + e_IKey_Up = DIK_UP; + e_IKey_Left = DIK_LEFT; + e_IKey_Right = DIK_RIGHT; + e_IKey_Down = DIK_DOWN; + +{procedure e_PollMouse();} +function e_InitDirectInput(hWnd: HWND): Boolean; +procedure e_ReleaseDirectInput(); +procedure e_ClearInputBuffer(); +function e_PollInput(): Boolean; +function e_KeyPressed(Key: Word): Boolean; +function e_AnyKeyPressed(): Boolean; +function e_GetFirstKeyPressed(): Word; +function e_JoystickStateToString(mode: Integer): String; + +var + {e_MouseInfo: TMouseInfo;} + e_EnableInput: Boolean = False; + e_JoystickAvailable: Boolean = False; + +Implementation + +const + CUSTOMIZABLE_JOYSTICK = True; + +type + TJoystickCustomField = record + here: Boolean; + min, center, max: Integer; + end; + + TJoystickCustom = record + X: TJoystickCustomField; (* x-axis position *) + Y: TJoystickCustomField; (* y-axis position *) + Z: TJoystickCustomField; (* z-axis position *) + + Rx: TJoystickCustomField; (* x-axis rotation *) + Ry: TJoystickCustomField; (* y-axis rotation *) + Rz: TJoystickCustomField; (* z-axis rotation *) + + Slider: Array [0..1] of TJoystickCustomField; (* extra axes positions *) + POV: Array [0..3] of TJoystickCustomField; (* POV directions *) + end; + +var + lpDI8: IDirectInput8 = nil; + lpDIKeyboard: IDirectInputDevice8 = nil; + {lpDIMouse: IDirectInputDevice8 = nil;} + lpDIJoystick: IDirectInputDevice8 = nil; + ms: TDIMOUSESTATE; + _h_Wnd: HWND; + keyBuffer: Array [0..255] of Byte; + joystickState: TDIJoyState; + joystickCustomized: Boolean = False; + joystickCustom: TJoystickCustom; + + +function GetMaxFromCenter(center: Integer): Integer; +begin + Result := center * 2; + if (Result < center) or (Result > MaxInt) then + Result := MaxInt; +end; + +function PosRelation(pos: Integer; field: TJoystickCustomField): Integer; +begin + if (not field.here) or (pos = field.center) then + Result := 0 + else + if (field.center < pos) then + begin + if (pos > (field.center + ((field.max - field.center) div 3))) then + Result := 1 + else + Result := 0; + end + else // pos < field.center + begin + if (pos < (field.center - ((field.center - field.min) div 3))) then + Result := -1 + else + Result := 0; + end; +end; + +procedure CustomizeJoystick(); +var + i: Integer; +begin + joystickCustom.X.here := (joystickState.lX <> 0); + if (joystickCustom.X.here) then + begin + joystickCustom.X.center := joystickState.lX; + joystickCustom.X.min := 0; + joystickCustom.X.max := GetMaxFromCenter(joystickCustom.X.center); + end; + + joystickCustom.Y.here := (joystickState.lY <> 0); + if (joystickCustom.Y.here) then + begin + joystickCustom.Y.center := joystickState.lY; + joystickCustom.Y.min := 0; + joystickCustom.Y.max := GetMaxFromCenter(joystickCustom.Y.center); + end; + + joystickCustom.Z.here := (joystickState.lZ <> 0); + if (joystickCustom.Z.here) then + begin + joystickCustom.Z.center := joystickState.lZ; + joystickCustom.Z.min := 0; + joystickCustom.Z.max := GetMaxFromCenter(joystickCustom.Z.center); + end; + + joystickCustom.Rx.here := (joystickState.lRx <> 0); + if (joystickCustom.Rx.here) then + begin + joystickCustom.Rx.center := joystickState.lRx; + joystickCustom.Rx.min := 0; + joystickCustom.Rx.max := GetMaxFromCenter(joystickCustom.Rx.center); + end; + + joystickCustom.Ry.here := (joystickState.lRy <> 0); + if (joystickCustom.Ry.here) then + begin + joystickCustom.Ry.center := joystickState.lRy; + joystickCustom.Ry.min := 0; + joystickCustom.Ry.max := GetMaxFromCenter(joystickCustom.Ry.center); + end; + + joystickCustom.Rz.here := (joystickState.lRz <> 0); + if (joystickCustom.Rz.here) then + begin + joystickCustom.Rz.center := joystickState.lRz; + joystickCustom.Rz.min := 0; + joystickCustom.Rz.max := GetMaxFromCenter(joystickCustom.Rz.center); + end; + + for i := 0 to 1 do + begin + joystickCustom.Slider[i].here := (joystickState.rglSlider[i] <> 0); + if (joystickCustom.Slider[i].here) then + begin + joystickCustom.Slider[i].center := joystickState.rglSlider[i]; + joystickCustom.Slider[i].min := 0; + joystickCustom.Slider[i].max := GetMaxFromCenter(joystickCustom.Slider[i].center); + end; + end; + +// TODO: POV 0..3: +// * value = $FFFFFFFF - no POV or it is in its center +// * value = Angle_In_Degrees * 100 +// * 0 - Up, 9000 - Right, 18000 - Down, 27000 - Left +// * How to customize it? + +end; + +{procedure e_PollMouse(); +begin + if (GetForegroundWindow = _h_Wnd) then + if (lpDImouse.GetDeviceState(SizeOf(TDIMOUSESTATE), @ms) <> 0) then + begin + lpDIMouse.Acquire(); + if FAILED(lpDImouse.GetDeviceState(SizeOf(TDIMOUSESTATE), @ms)) then + Exit; + end; + + if ms.lX < 0 then ms.lX := Round(ms.lX * e_MouseInfo.Accel) else + if ms.lX > 0 then ms.lX := Round(ms.lX * e_MouseInfo.Accel); + + if ms.lY < 0 then ms.lY := Round(ms.lY * e_MouseInfo.Accel) else + if ms.lY > 0 then ms.lY := Round(ms.lY * e_MouseInfo.Accel); + + e_MouseInfo.X := e_MouseInfo.X + ms.lX; + e_MouseInfo.Y := e_MouseInfo.Y + ms.lY; + + e_MouseInfo.Buttons[0] := ms.rgbButtons[0] = $080; + e_MouseInfo.Buttons[1] := ms.rgbButtons[1] = $080; + e_MouseInfo.Buttons[2] := ms.rgbButtons[2] = $080; + e_MouseInfo.Buttons[3] := ms.rgbButtons[3] = $080; +end;} + +function PollKeyboard(): Boolean; +begin + Result := False; + + if (GetForegroundWindow() = _h_Wnd) then + if (lpDIKeyboard.GetDeviceState(SizeOf(keyBuffer), @keyBuffer) <> 0) then + begin + lpDIKeyboard.Acquire(); + if FAILED(lpDIKeyboard.GetDeviceState(SizeOf(keyBuffer), @keyBuffer)) then + Exit; + end; + + Result := True; +end; + +function PollJoystick(): Boolean; +begin + Result := False; + + if (lpDIJoystick = nil) then + Exit; + + if (GetForegroundWindow() = _h_Wnd) then + if (lpDIJoystick.GetDeviceState(SizeOf(TDIJoyState), @joystickState) <> 0) then + begin + lpDIJoystick.Acquire(); + if FAILED(lpDIJoystick.GetDeviceState(SizeOf(TDIJoyState), @joystickState)) then + Exit; + end; + + if (not joystickCustomized) and CUSTOMIZABLE_JOYSTICK then + begin + CustomizeJoystick(); + joystickCustomized := True; + end; + + Result := True; +end; + +function InitJoystick(hWnd: HWND): Boolean; +begin + Result := False; + + if FAILED(lpDI8.CreateDevice(GUID_Joystick, lpDIJoystick, nil)) then + Exit; + lpDIJoystick._AddRef(); + + if FAILED(lpDIJoystick.SetDataFormat(c_dfDIJoystick)) then + Exit; + + if FAILED(lpDIJoystick.SetCooperativeLevel(hWnd, DISCL_FOREGROUND or + DISCL_NONEXCLUSIVE)) then + Exit; + lpDIJoystick.Acquire(); + + Result := True; +end; + +function e_InitDirectInput(hWnd: HWND): Boolean; +begin + Result := False; + + if FAILED(DirectInput8Create(GetModuleHandle(nil), DIRECTINPUT_VERSION, + IID_IDirectInput8, lpDI8, nil)) then + Exit; + lpDI8._AddRef(); + +// Keyboard: + if FAILED(lpDI8.CreateDevice(GUID_SysKeyboard, lpDIKeyboard, nil)) then + Exit; + lpDIKeyboard._AddRef(); + + if FAILED(lpDIKeyboard.SetDataFormat(c_dfDIKeyboard)) then + Exit; + + if FAILED(lpDIKeyboard.SetCooperativeLevel(hWnd, DISCL_FOREGROUND or + DISCL_NONEXCLUSIVE)) then + Exit; + lpDIKeyboard.Acquire(); + +// Mouse: +{ Since we don't actually need the mouse in the game, I commented this out. + if FAILED(lpDI8.CreateDevice(GUID_SysMouse, lpDIMouse, nil)) then + Exit; + lpDIMouse._AddRef(); + + if FAILED(lpDIMouse.SetDataFormat(c_dfDIMouse)) then + Exit; + + if FAILED(lpDIMouse.SetCooperativeLevel(hWnd, DISCL_FOREGROUND or DISCL_NONEXCLUSIVE)) then + Exit; + lpDIMouse.Acquire(); +} + +// Joystick: + e_JoystickAvailable := InitJoystick(hWnd); + if (not e_JoystickAvailable) then + lpDIJoystick := nil; + + e_EnableInput := True; + _h_Wnd := hWnd; + + Result := True; +end; + +procedure e_ReleaseDirectInput(); +begin + if lpDIKeyboard <> nil then + begin + lpDIKeyboard.Unacquire(); + lpDIKeyboard._Release(); + lpDIKeyboard := nil; + end; + +{ if lpDIMouse <> nil then + begin + lpDIMouse.Unacquire(); + lpDIMouse._Release(); + lpDIMouse := nil; + end; } + + if lpDIJoystick <> nil then + begin + lpDIJoystick.Unacquire(); + lpDIJoystick._Release(); + lpDIJoystick := nil; + end; + + if lpDI8 <> nil then + begin + lpDI8._Release(); + lpDI8 := nil; + end; +end; + +procedure e_ClearInputBuffer(); +var + i: Integer; + +begin + for i := 0 to 255 do + keyBuffer[i] := 0; + + FillChar(joystickState, SizeOf(TDIJoyState), 0); +end; + +function e_PollInput(): Boolean; +var + kb, js: Boolean; +begin + kb := PollKeyboard(); + js := PollJoystick(); + + Result := kb or js; +end; + +function e_KeyPressed(Key: Word): Boolean; +begin + if ((Key >= 0) and (Key <= 255)) then + begin // Keyboard buttons/keys + Result := (keyBuffer[Key] = $80); + end + else if ((Key >= 256) and (Key <= 287)) then + begin // Joystick buttons + Key := Key - 256; + Result := (joystickState.rgbButtons[Key] = $80); + end + else if (CUSTOMIZABLE_JOYSTICK) then + begin // Joystick axises and sliders + case Key of + 288: Result := (PosRelation(joystickState.lX, joystickCustom.X) = -1); // X- + 289: Result := (PosRelation(joystickState.lX, joystickCustom.X) = 1); // X+ + 290: Result := (PosRelation(joystickState.lY, joystickCustom.Y) = -1); // Y- + 291: Result := (PosRelation(joystickState.lY, joystickCustom.Y) = 1); // Y+ + 292: Result := (PosRelation(joystickState.lZ, joystickCustom.Z) = -1); // Z- + 293: Result := (PosRelation(joystickState.lZ, joystickCustom.Z) = 1); // Z+ + + 294: Result := (PosRelation(joystickState.lRx, joystickCustom.Rx) = -1); // Rx- + 295: Result := (PosRelation(joystickState.lRx, joystickCustom.Rx) = 1); // Rx+ + 296: Result := (PosRelation(joystickState.lRy, joystickCustom.Ry) = -1); // Ry- + 297: Result := (PosRelation(joystickState.lRy, joystickCustom.Ry) = 1); // Ry+ + 298: Result := (PosRelation(joystickState.lRz, joystickCustom.Rz) = -1); // Rz- + 299: Result := (PosRelation(joystickState.lRz, joystickCustom.Rz) = 1); // Rz+ + + 300: Result := (PosRelation(joystickState.rglSlider[0], joystickCustom.Slider[0]) = -1); // Slider1- + 301: Result := (PosRelation(joystickState.rglSlider[0], joystickCustom.Slider[0]) = 1); // Slider1+ + + 302: Result := (PosRelation(joystickState.rglSlider[1], joystickCustom.Slider[1]) = -1); // Slider2- + 303: Result := (PosRelation(joystickState.rglSlider[1], joystickCustom.Slider[1]) = 1); // Slider2+ + + else Result := False; + end; + end + else + Result := False; +end; + +function e_AnyKeyPressed(): Boolean; +var + k: Word; +begin + Result := False; + + for k := 0 to e_MaxInputKeys do + if e_KeyPressed(k) then + begin + Result := True; + Break; + end; +end; + +function e_GetFirstKeyPressed(): Word; +var + k: Word; +begin + Result := e_WrongKey; + + for k := 0 to e_MaxInputKeys do + if e_KeyPressed(k) then + begin + Result := k; + Break; + end; +end; + +//////////////////////////////////////////////////////////////////////////////// + +function e_JoystickStateToString(mode: Integer): String; +var + i: Integer; +begin + Result := ''; + + if (mode = 1) then + begin + // 0..65535: Up/Left .. Down/Right: + Result := Result + 'X=' + IntToStr(joystickState.lX) + ', '; + Result := Result + 'Y=' + IntToStr(joystickState.lY) + ', '; + Result := Result + 'Z=' + IntToStr(joystickState.lZ) + '; '; + end + else if (mode = 2) then + begin + // 0..65535: Left .. Center .. Right: + Result := Result + 'Rx=' + IntToStr(joystickState.lRx) + ', '; + Result := Result + 'Ry=' + IntToStr(joystickState.lRy) + ', '; + Result := Result + 'Rz=' + IntToStr(joystickState.lRz) + '; '; + end + else if (mode = 3) then + begin + // 0..65535: Up .. Down: + Result := Result + 'Slider[0]=' + IntToStr(joystickState.rglSlider[0]) + ', '; + Result := Result + 'Slider[1]=' + IntToStr(joystickState.rglSlider[1]) + '; '; + end + else if (mode = 4) then + begin + // 0..35999: POV angle, Up = 0, Clockwise, Center = $FFFFFFFF: + Result := Result + 'POV[0]=' + IntToStr(joystickState.rgdwPOV[0]) + ', '; + Result := Result + 'POV[1]=' + IntToStr(joystickState.rgdwPOV[1]) + ', '; + Result := Result + 'POV[2]=' + IntToStr(joystickState.rgdwPOV[2]) + ', '; + Result := Result + 'POV[3]=' + IntToStr(joystickState.rgdwPOV[3]) + '; '; + end + else if (mode = 5) then + begin + // 0 or 128 ($80): NotPressed or Pressed: + for i := 0 to 7 do + Result := Result + 'B[' + IntToStr(i) + ']=' + IntToStr(joystickState.rgbButtons[i]) + ', '; + end + else if (mode = 6) then + begin + // 0 or 128 ($80): NotPressed or Pressed: + for i := 8 to 15 do + Result := Result + 'B[' + IntToStr(i) + ']=' + IntToStr(joystickState.rgbButtons[i]) + ', '; + end + else if (mode = 7) then + begin + // 0 or 128 ($80): NotPressed or Pressed: + for i := 16 to 23 do + Result := Result + 'B[' + IntToStr(i) + ']=' + IntToStr(joystickState.rgbButtons[i]) + ', '; + end + else if (mode = 8) then + begin + // 0 or 128 ($80): NotPressed or Pressed: + for i := 24 to 31 do + Result := Result + 'B[' + IntToStr(i) + ']=' + IntToStr(joystickState.rgbButtons[i]) + '; '; + end +end; + +end. diff --git a/src/engine/e_log.pas b/src/engine/e_log.pas new file mode 100644 index 0000000..b2b9826 --- /dev/null +++ b/src/engine/e_log.pas @@ -0,0 +1,71 @@ +unit e_log; + +{$MODE Delphi} + +interface + +uses + SysUtils; + +type + TWriteMode=(WM_NEWFILE, WM_OLDFILE); + TRecordCategory=(MSG_FATALERROR, MSG_WARNING, MSG_NOTIFY); + +procedure e_InitLog(fFileName: String; fWriteMode: TWriteMode); +procedure e_WriteLog(TextLine: String; RecordCategory: TRecordCategory; + WriteTime: Boolean = True); +function DecodeIPV4(ip: LongWord): string; + +implementation + +var + FirstRecord: Boolean; + FileName: String; + +{ TLog } + +function DecodeIPV4(ip: LongWord): string; +begin + Result := Format('%d.%d.%d.%d', [ip and $FF, (ip shr 8) and $FF, (ip shr 16) and $FF, (ip shr 24)]); +end; + +procedure e_WriteLog(TextLine: String; RecordCategory: TRecordCategory; + WriteTime: Boolean = True); +var + LogFile: TextFile; + Prefix: ShortString; +begin + if FileName = '' then Exit; + + Assign(LogFile, FileName); + if FileExists(FileName) then + Append(LogFile) + else + Rewrite(LogFile); + if FirstRecord then + begin + Writeln(LogFile, '--- Log started at '+TimeToStr(Time)+' ---'); + FirstRecord := False; + end; + case RecordCategory of + MSG_FATALERROR: Prefix := '!!!'; + MSG_WARNING: Prefix := '! '; + MSG_NOTIFY: Prefix := '***'; + end; + if WriteTime then + Writeln(LogFile, '['+TimeToStr(Time)+'] '+Prefix+' '+TextLine) + else + Writeln(LogFile, Prefix+' '+TextLine); + Close(LogFile); +end; + +procedure e_InitLog(fFileName: String; fWriteMode: TWriteMode); +begin + FileName := fFileName; + if fWriteMode = WM_NEWFILE then + if FileExists(FileName) then + DeleteFile(FileName); + FirstRecord := True; +end; + +end. diff --git a/src/engine/e_sound.pas b/src/engine/e_sound.pas new file mode 100644 index 0000000..3e0a9fe --- /dev/null +++ b/src/engine/e_sound.pas @@ -0,0 +1,1000 @@ +unit e_sound; + +interface + +uses + fmod, + fmodtypes, + fmoderrors, + e_log, + SysUtils, + Windows; + +type + TSoundRec = record + Data: Pointer; + Sound: FMOD_SOUND; + Loop: Boolean; + nRefs: Integer; + end; + + TBasicSound = class (TObject) + private + FChannel: FMOD_CHANNEL; + + protected + FID: DWORD; + FLoop: Boolean; + FPosition: DWORD; + FPriority: Integer; + + function RawPlay(Pan: Single; Volume: Single; aPos: DWORD): Boolean; + + public + constructor Create(); + destructor Destroy(); override; + procedure SetID(ID: DWORD); + procedure FreeSound(); + function IsPlaying(): Boolean; + procedure Stop(); + function IsPaused(): Boolean; + procedure Pause(Enable: Boolean); + function GetVolume(): Single; + procedure SetVolume(Volume: Single); + function GetPan(): Single; + procedure SetPan(Pan: Single); + function IsMuted(): Boolean; + procedure Mute(Enable: Boolean); + function GetPosition(): DWORD; + procedure SetPosition(aPos: DWORD); + procedure SetPriority(priority: Integer); + end; + +const + NO_SOUND_ID = DWORD(-1); + +function e_InitSoundSystem(Freq: Integer): Boolean; + +function e_LoadSound(FileName: string; var ID: DWORD; bLoop: Boolean): Boolean; +function e_LoadSoundMem(pData: Pointer; Length: Integer; var ID: DWORD; bLoop: Boolean): Boolean; + +function e_PlaySound(ID: DWORD): Boolean; +function e_PlaySoundPan(ID: DWORD; Pan: Single): Boolean; +function e_PlaySoundVolume(ID: DWORD; Volume: Single): Boolean; +function e_PlaySoundPanVolume(ID: DWORD; Pan, Volume: Single): Boolean; + +procedure e_ModifyChannelsVolumes(SoundMod: Single; setMode: Boolean); +procedure e_MuteChannels(Enable: Boolean); +procedure e_StopChannels(); + +procedure e_DeleteSound(ID: DWORD); +procedure e_RemoveAllSounds(); +procedure e_ReleaseSoundSystem(); +procedure e_SoundUpdate(); + +var + e_SoundsArray: array of TSoundRec = nil; + +implementation + +uses + g_window, g_options; + +const + N_CHANNELS = 512; + +var + F_System: FMOD_SYSTEM = nil; + SoundMuted: Boolean = False; + + +function Channel_Callback(channel: FMOD_CHANNEL; callbacktype: FMOD_CHANNEL_CALLBACKTYPE; + commanddata1: Pointer; commanddata2: Pointer): FMOD_RESULT; stdcall; +var + res: FMOD_RESULT; + sound: FMOD_SOUND; + ud: Pointer; + id: DWORD; + +begin + res := FMOD_OK; + + if callbacktype = FMOD_CHANNEL_CALLBACKTYPE_END then + begin + res := FMOD_Channel_GetCurrentSound(channel, sound); + if res = FMOD_OK then + begin + res := FMOD_Sound_GetUserData(sound, ud); + if res = FMOD_OK then + begin + id := DWORD(ud^); + if id < DWORD(Length(e_SoundsArray)) then + if e_SoundsArray[id].nRefs > 0 then + Dec(e_SoundsArray[id].nRefs); + end; + end; + end; + + Result := res; +end; + +function e_InitSoundSystem(Freq: Integer): Boolean; +var + res: FMOD_RESULT; + ver: Cardinal; + output: FMOD_OUTPUTTYPE; + drv: Integer; + +begin + Result := False; + + res := FMOD_System_Create(F_System); + if res <> FMOD_OK then + begin + e_WriteLog('Error creating FMOD system:', MSG_FATALERROR); + e_WriteLog(FMOD_ErrorString(res), MSG_FATALERROR); + Exit; + end; + + res := FMOD_System_GetVersion(F_System, ver); + if res <> FMOD_OK then + begin + e_WriteLog('Error getting FMOD version:', MSG_FATALERROR); + e_WriteLog(FMOD_ErrorString(res), MSG_FATALERROR); + Exit; + end; + + if ver < FMOD_VERSION then + begin + e_WriteLog('FMOD DLL version is too old! Need '+IntToStr(FMOD_VERSION), MSG_FATALERROR); + Exit; + end; + + res := FMOD_System_SetSoftwareFormat(F_System, Freq, + FMOD_SOUND_FORMAT_PCM16, 0, 0, FMOD_DSP_RESAMPLER_LINEAR); + if res <> FMOD_OK then + begin + e_WriteLog('Error setting FMOD software format!', MSG_FATALERROR); + e_WriteLog(FMOD_ErrorString(res), MSG_FATALERROR); + Exit; + end; + + res := FMOD_System_Init(F_System, N_CHANNELS, FMOD_INIT_NORMAL, nil); + if res <> FMOD_OK then + begin + e_WriteLog('Error initializing FMOD system!', MSG_WARNING); + e_WriteLog(FMOD_ErrorString(res), MSG_WARNING); + e_WriteLog('Trying with OUTPUTTYPE_NOSOUND...', MSG_WARNING); + res := FMOD_System_SetOutput(F_System, FMOD_OUTPUTTYPE_NOSOUND); + if res <> FMOD_OK then + begin + e_WriteLog('Error setting FMOD output to NOSOUND!', MSG_FATALERROR); + e_WriteLog(FMOD_ErrorString(res), MSG_FATALERROR); + Exit; + end; + res := FMOD_System_Init(F_System, N_CHANNELS, FMOD_INIT_NORMAL, nil); + if res <> FMOD_OK then + begin + e_WriteLog('Error initializing FMOD system!', MSG_FATALERROR); + e_WriteLog(FMOD_ErrorString(res), MSG_FATALERROR); + Exit; + end; + end; + + res := FMOD_System_GetOutput(F_System, output); + if res <> FMOD_OK then + e_WriteLog('Error getting FMOD output!', MSG_WARNING) + else + case output of + FMOD_OUTPUTTYPE_NOSOUND: e_WriteLog('FMOD Output Method: NOSOUND', MSG_NOTIFY); + FMOD_OUTPUTTYPE_NOSOUND_NRT: e_WriteLog('FMOD Output Method: NOSOUND_NRT', MSG_NOTIFY); + FMOD_OUTPUTTYPE_DSOUND: e_WriteLog('FMOD Output Method: DSOUND', MSG_NOTIFY); + FMOD_OUTPUTTYPE_WINMM: e_WriteLog('FMOD Output Method: WINMM', MSG_NOTIFY); + FMOD_OUTPUTTYPE_OPENAL: e_WriteLog('FMOD Output Method: OPENAL', MSG_NOTIFY); + FMOD_OUTPUTTYPE_WASAPI: e_WriteLog('FMOD Output Method: WASAPI', MSG_NOTIFY); + FMOD_OUTPUTTYPE_ASIO: e_WriteLog('FMOD Output Method: ASIO', MSG_NOTIFY); + else e_WriteLog('FMOD Output Method: Unknown', MSG_NOTIFY); + end; + + res := FMOD_System_GetDriver(F_System, drv); + if res <> FMOD_OK then + e_WriteLog('Error getting FMOD driver!', MSG_WARNING) + else + begin + {res := FMOD_System_GetDriverName(F_System, drv, str, 64); + if res <> FMOD_OK then + e_WriteLog('Error getting FMOD driver name!', MSG_WARNING) + else } + e_WriteLog('FMOD driver id: '+IntToStr(drv), MSG_NOTIFY); + end; + + Result := True; +end; + +function FindESound(): DWORD; +var + i: Integer; + +begin + if e_SoundsArray <> nil then + for i := 0 to High(e_SoundsArray) do + if e_SoundsArray[i].Sound = nil then + begin + Result := i; + Exit; + end; + + if e_SoundsArray = nil then + begin + SetLength(e_SoundsArray, 16); + Result := 0; + end + else + begin + Result := High(e_SoundsArray) + 1; + SetLength(e_SoundsArray, Length(e_SoundsArray) + 16); + end; +end; + +function e_LoadSound(FileName: String; var ID: DWORD; bLoop: Boolean): Boolean; +var + find_id: DWORD; + res: FMOD_RESULT; + bt: Cardinal; + ud: Pointer; + +begin + Result := False; + + e_WriteLog('Loading sound '+FileName+'...', MSG_NOTIFY); + + find_id := FindESound(); + + if bLoop then + bt := FMOD_LOOP_NORMAL + else + bt := FMOD_LOOP_OFF; + + if not bLoop then + res := FMOD_System_CreateSound(F_System, PAnsiChar(FileName), + bt + FMOD_2D + FMOD_HARDWARE, + nil, e_SoundsArray[find_id].Sound) + else + res := FMOD_System_CreateStream(F_System, PAnsiChar(FileName), + bt + FMOD_2D + FMOD_HARDWARE, + nil, e_SoundsArray[find_id].Sound); + if res <> FMOD_OK then + begin + e_SoundsArray[find_id].Sound := nil; + Exit; + end; + + GetMem(ud, SizeOf(DWORD)); + DWORD(ud^) := find_id; + res := FMOD_Sound_SetUserData(e_SoundsArray[find_id].Sound, ud); + if res <> FMOD_OK then + begin + e_SoundsArray[find_id].Sound := nil; + Exit; + end; + + e_SoundsArray[find_id].Data := nil; + e_SoundsArray[find_id].Loop := bLoop; + e_SoundsArray[find_id].nRefs := 0; + + ID := find_id; + + Result := True; +end; + +function e_LoadSoundMem(pData: Pointer; Length: Integer; var ID: DWORD; bLoop: Boolean): Boolean; +var + find_id: DWORD; + res: FMOD_RESULT; + sz: Integer; + bt: Cardinal; + soundExInfo: FMOD_CREATESOUNDEXINFO; + ud: Pointer; + +begin + Result := False; + + find_id := FindESound(); + + sz := SizeOf(FMOD_CREATESOUNDEXINFO); + FillMemory(@soundExInfo, sz, 0); + soundExInfo.cbsize := sz; + soundExInfo.length := Length; + + if bLoop then + bt := FMOD_LOOP_NORMAL + else + bt := FMOD_LOOP_OFF; + + if not bLoop then + res := FMOD_System_CreateSound(F_System, pData, + bt + FMOD_2D + FMOD_HARDWARE + FMOD_OPENMEMORY, + @soundExInfo, e_SoundsArray[find_id].Sound) + else + res := FMOD_System_CreateStream(F_System, pData, + bt + FMOD_2D + FMOD_HARDWARE + FMOD_OPENMEMORY, + @soundExInfo, e_SoundsArray[find_id].Sound); + if res <> FMOD_OK then + begin + e_SoundsArray[find_id].Sound := nil; + Exit; + end; + + GetMem(ud, SizeOf(DWORD)); + DWORD(ud^) := find_id; + res := FMOD_Sound_SetUserData(e_SoundsArray[find_id].Sound, ud); + if res <> FMOD_OK then + begin + e_SoundsArray[find_id].Sound := nil; + Exit; + end; + + e_SoundsArray[find_id].Data := pData; + e_SoundsArray[find_id].Loop := bLoop; + e_SoundsArray[find_id].nRefs := 0; + + ID := find_id; + + Result := True; +end; + +function e_PlaySound(ID: DWORD): Boolean; +var + res: FMOD_RESULT; + Chan: FMOD_CHANNEL; + +begin + if e_SoundsArray[ID].nRefs >= gMaxSimSounds then + begin + Result := True; + Exit; + end; + + Result := False; + + res := FMOD_System_PlaySound(F_System, FMOD_CHANNEL_FREE, + e_SoundsArray[ID].Sound, False, Chan); + if res <> FMOD_OK then + begin + Exit; + end; + + res := FMOD_Channel_SetCallback(Chan, Channel_Callback); + if res <> FMOD_OK then + begin + end; + + if SoundMuted then + begin + res := FMOD_Channel_SetMute(Chan, True); + if res <> FMOD_OK then + begin + end; + end; + + Inc(e_SoundsArray[ID].nRefs); + Result := True; +end; + +function e_PlaySoundPan(ID: DWORD; Pan: Single): Boolean; +var + res: FMOD_RESULT; + Chan: FMOD_CHANNEL; + +begin + if e_SoundsArray[ID].nRefs >= gMaxSimSounds then + begin + Result := True; + Exit; + end; + + Result := False; + + res := FMOD_System_PlaySound(F_System, FMOD_CHANNEL_FREE, + e_SoundsArray[ID].Sound, False, Chan); + if res <> FMOD_OK then + begin + Exit; + end; + + res := FMOD_Channel_SetPan(Chan, Pan); + if res <> FMOD_OK then + begin + end; + + res := FMOD_Channel_SetCallback(Chan, Channel_Callback); + if res <> FMOD_OK then + begin + end; + + if SoundMuted then + begin + res := FMOD_Channel_SetMute(Chan, True); + if res <> FMOD_OK then + begin + end; + end; + + Inc(e_SoundsArray[ID].nRefs); + Result := True; +end; + +function e_PlaySoundVolume(ID: DWORD; Volume: Single): Boolean; +var + res: FMOD_RESULT; + Chan: FMOD_CHANNEL; + +begin + if e_SoundsArray[ID].nRefs >= gMaxSimSounds then + begin + Result := True; + Exit; + end; + + Result := False; + + res := FMOD_System_PlaySound(F_System, FMOD_CHANNEL_FREE, + e_SoundsArray[ID].Sound, False, Chan); + if res <> FMOD_OK then + begin + Exit; + end; + + res := FMOD_Channel_SetVolume(Chan, Volume); + if res <> FMOD_OK then + begin + end; + + res := FMOD_Channel_SetCallback(Chan, Channel_Callback); + if res <> FMOD_OK then + begin + end; + + if SoundMuted then + begin + res := FMOD_Channel_SetMute(Chan, True); + if res <> FMOD_OK then + begin + end; + end; + + Inc(e_SoundsArray[ID].nRefs); + Result := True; +end; + +function e_PlaySoundPanVolume(ID: DWORD; Pan, Volume: Single): Boolean; +var + res: FMOD_RESULT; + Chan: FMOD_CHANNEL; + +begin + if e_SoundsArray[ID].nRefs >= gMaxSimSounds then + begin + Result := True; + Exit; + end; + + Result := False; + + res := FMOD_System_PlaySound(F_System, FMOD_CHANNEL_FREE, + e_SoundsArray[ID].Sound, False, Chan); + if res <> FMOD_OK then + begin + Exit; + end; + + res := FMOD_Channel_SetPan(Chan, Pan); + if res <> FMOD_OK then + begin + end; + + res := FMOD_Channel_SetVolume(Chan, Volume); + if res <> FMOD_OK then + begin + end; + + res := FMOD_Channel_SetCallback(Chan, Channel_Callback); + if res <> FMOD_OK then + begin + end; + + if SoundMuted then + begin + res := FMOD_Channel_SetMute(Chan, True); + if res <> FMOD_OK then + begin + end; + end; + + Inc(e_SoundsArray[ID].nRefs); + Result := True; +end; + +procedure e_DeleteSound(ID: DWORD); +var + res: FMOD_RESULT; + ud: Pointer; + +begin + if e_SoundsArray[ID].Sound = nil then + Exit; + + if e_SoundsArray[ID].Data <> nil then + FreeMem(e_SoundsArray[ID].Data); + + res := FMOD_Sound_GetUserData(e_SoundsArray[ID].Sound, ud); + if res = FMOD_OK then + begin + FreeMem(ud); + end; + + res := FMOD_Sound_Release(e_SoundsArray[ID].Sound); + if res <> FMOD_OK then + begin + e_WriteLog('Error releasing sound:', MSG_WARNING); + e_WriteLog(FMOD_ErrorString(res), MSG_WARNING); + end; + + e_SoundsArray[ID].Sound := nil; + e_SoundsArray[ID].Data := nil; +end; + +procedure e_ModifyChannelsVolumes(SoundMod: Single; setMode: Boolean); +var + res: FMOD_RESULT; + i: Integer; + Chan: FMOD_CHANNEL; + vol: Single; + +begin + for i := 0 to N_CHANNELS-1 do + begin + Chan := nil; + res := FMOD_System_GetChannel(F_System, i, Chan); + + if (res = FMOD_OK) and (Chan <> nil) then + begin + res := FMOD_Channel_GetVolume(Chan, vol); + + if res = FMOD_OK then + begin + if setMode then + vol := SoundMod + else + vol := vol * SoundMod; + + res := FMOD_Channel_SetVolume(Chan, vol); + + if res <> FMOD_OK then + begin + end; + end; + end; + end; +end; + +procedure e_MuteChannels(Enable: Boolean); +var + res: FMOD_RESULT; + i: Integer; + Chan: FMOD_CHANNEL; + +begin + if Enable = SoundMuted then + Exit; + + SoundMuted := Enable; + + for i := 0 to N_CHANNELS-1 do + begin + Chan := nil; + res := FMOD_System_GetChannel(F_System, i, Chan); + + if (res = FMOD_OK) and (Chan <> nil) then + begin + res := FMOD_Channel_SetMute(Chan, Enable); + + if res <> FMOD_OK then + begin + end; + end; + end; +end; + +procedure e_StopChannels(); +var + res: FMOD_RESULT; + i: Integer; + Chan: FMOD_CHANNEL; + +begin + for i := 0 to N_CHANNELS-1 do + begin + Chan := nil; + res := FMOD_System_GetChannel(F_System, i, Chan); + + if (res = FMOD_OK) and (Chan <> nil) then + begin + res := FMOD_Channel_Stop(Chan); + + if res <> FMOD_OK then + begin + end; + end; + end; +end; + +procedure e_RemoveAllSounds(); +var + i: Integer; + +begin + for i := 0 to High(e_SoundsArray) do + if e_SoundsArray[i].Sound <> nil then + e_DeleteSound(i); + + SetLength(e_SoundsArray, 0); + e_SoundsArray := nil; +end; + +procedure e_ReleaseSoundSystem(); +var + res: FMOD_RESULT; + +begin + e_RemoveAllSounds(); + + res := FMOD_System_Close(F_System); + if res <> FMOD_OK then + begin + e_WriteLog('Error closing FMOD system!', MSG_FATALERROR); + e_WriteLog(FMOD_ErrorString(res), MSG_FATALERROR); + Exit; + end; + + res := FMOD_System_Release(F_System); + if res <> FMOD_OK then + begin + e_WriteLog('Error releasing FMOD system!', MSG_FATALERROR); + e_WriteLog(FMOD_ErrorString(res), MSG_FATALERROR); + end; +end; + +procedure e_SoundUpdate(); +begin + FMOD_System_Update(F_System); +end; + +{ TBasicSound: } + +constructor TBasicSound.Create(); +begin + FID := NO_SOUND_ID; + FLoop := False; + FChannel := nil; + FPosition := 0; + FPriority := 128; +end; + +destructor TBasicSound.Destroy(); +begin + FreeSound(); + inherited; +end; + +procedure TBasicSound.FreeSound(); +begin + if FID = NO_SOUND_ID then + Exit; + + Stop(); + FID := NO_SOUND_ID; + FLoop := False; + FPosition := 0; +end; + +function TBasicSound.RawPlay(Pan: Single; Volume: Single; aPos: DWORD): Boolean; +var + res: FMOD_RESULT; + +begin + if e_SoundsArray[FID].nRefs >= gMaxSimSounds then + begin + Result := True; + Exit; + end; + + Result := False; + + if FID = NO_SOUND_ID then + Exit; + + res := FMOD_System_PlaySound(F_System, FMOD_CHANNEL_FREE, + e_SoundsArray[FID].Sound, False, FChannel); + if res <> FMOD_OK then + begin + FChannel := nil; + Exit; + end; + + res := FMOD_Channel_SetPosition(FChannel, aPos, FMOD_TIMEUNIT_MS); + if res <> FMOD_OK then + begin + FPosition := 0; + end + else + FPosition := aPos; + + res := FMOD_Channel_SetPan(FChannel, Pan); + if res <> FMOD_OK then + begin + end; + + res := FMOD_Channel_SetVolume(FChannel, Volume); + if res <> FMOD_OK then + begin + end; + + res := FMOD_Channel_SetCallback(FChannel, Channel_Callback); + if res <> FMOD_OK then + begin + end; + + if SoundMuted then + begin + res := FMOD_Channel_SetMute(FChannel, True); + if res <> FMOD_OK then + begin + end; + end; + + Inc(e_SoundsArray[FID].nRefs); + Result := True; +end; + +procedure TBasicSound.SetID(ID: DWORD); +begin + FreeSound(); + FID := ID; + FLoop := e_SoundsArray[ID].Loop; +end; + +function TBasicSound.IsPlaying(): Boolean; +var + res: FMOD_RESULT; + b: LongBool; + +begin + Result := False; + + if FChannel = nil then + Exit; + + res := FMOD_Channel_IsPlaying(FChannel, b); + if res <> FMOD_OK then + begin + Exit; + end; + + Result := b; +end; + +procedure TBasicSound.Stop(); +var + res: FMOD_RESULT; + +begin + if FChannel = nil then + Exit; + + GetPosition(); + + res := FMOD_Channel_Stop(FChannel); + if res <> FMOD_OK then + begin + end; + + FChannel := nil; +end; + +function TBasicSound.IsPaused(): Boolean; +var + res: FMOD_RESULT; + b: LongBool; + +begin + Result := False; + + if FChannel = nil then + Exit; + + res := FMOD_Channel_GetPaused(FChannel, b); + if res <> FMOD_OK then + begin + Exit; + end; + + Result := b; +end; + +procedure TBasicSound.Pause(Enable: Boolean); +var + res: FMOD_RESULT; + +begin + if FChannel = nil then + Exit; + + res := FMOD_Channel_SetPaused(FChannel, Enable); + if res <> FMOD_OK then + begin + end; + + if Enable then + begin + res := FMOD_Channel_GetPosition(FChannel, FPosition, FMOD_TIMEUNIT_MS); + if res <> FMOD_OK then + begin + end; + end; +end; + +function TBasicSound.GetVolume(): Single; +var + res: FMOD_RESULT; + vol: Single; + +begin + Result := 0.0; + + if FChannel = nil then + Exit; + + res := FMOD_Channel_GetVolume(FChannel, vol); + if res <> FMOD_OK then + begin + Exit; + end; + + Result := vol; +end; + +procedure TBasicSound.SetVolume(Volume: Single); +var + res: FMOD_RESULT; + +begin + if FChannel = nil then + Exit; + + res := FMOD_Channel_SetVolume(FChannel, Volume); + if res <> FMOD_OK then + begin + end; +end; + +function TBasicSound.GetPan(): Single; +var + res: FMOD_RESULT; + pan: Single; + +begin + Result := 0.0; + + if FChannel = nil then + Exit; + + res := FMOD_Channel_GetPan(FChannel, pan); + if res <> FMOD_OK then + begin + Exit; + end; + + Result := pan; +end; + +procedure TBasicSound.SetPan(Pan: Single); +var + res: FMOD_RESULT; + +begin + if FChannel = nil then + Exit; + + res := FMOD_Channel_SetPan(FChannel, Pan); + if res <> FMOD_OK then + begin + end; +end; + +function TBasicSound.IsMuted(): Boolean; +var + res: FMOD_RESULT; + b: LongBool; + +begin + Result := False; + + if FChannel = nil then + Exit; + + res := FMOD_Channel_GetMute(FChannel, b); + if res <> FMOD_OK then + begin + Exit; + end; + + Result := b; +end; + +procedure TBasicSound.Mute(Enable: Boolean); +var + res: FMOD_RESULT; + +begin + if FChannel = nil then + Exit; + + res := FMOD_Channel_SetMute(FChannel, Enable); + if res <> FMOD_OK then + begin + end; +end; + +function TBasicSound.GetPosition(): DWORD; +var + res: FMOD_RESULT; + +begin + Result := 0; + + if FChannel = nil then + Exit; + + res := FMOD_Channel_GetPosition(FChannel, FPosition, FMOD_TIMEUNIT_MS); + if res <> FMOD_OK then + begin + Exit; + end; + + Result := FPosition; +end; + +procedure TBasicSound.SetPosition(aPos: DWORD); +var + res: FMOD_RESULT; + +begin + FPosition := aPos; + + if FChannel = nil then + Exit; + + res := FMOD_Channel_SetPosition(FChannel, FPosition, FMOD_TIMEUNIT_MS); + if res <> FMOD_OK then + begin + end; +end; + +procedure TBasicSound.SetPriority(priority: Integer); +var + res: FMOD_RESULT; + +begin + if (FChannel <> nil) and (FPriority <> priority) and + (priority >= 0) and (priority <= 256) then + begin + FPriority := priority; + res := FMOD_Channel_SetPriority(FChannel, priority); + if res <> FMOD_OK then + begin + end; + end; +end; + +end. diff --git a/src/engine/e_textures.pas b/src/engine/e_textures.pas new file mode 100644 index 0000000..9dd9192 --- /dev/null +++ b/src/engine/e_textures.pas @@ -0,0 +1,435 @@ +unit e_textures; + +{ This unit provides interface to load 24-bit and 32-bit uncompressed images + from Truevision Targa (TGA) graphic files, and create OpenGL textures + from it's data. } + +interface + +uses + Windows, dglOpenGL, SysUtils, e_log; + +var + fUseMipmaps: Boolean = False; + TEXTUREFILTER: Integer = GL_NEAREST; + +// Standard set of images loading functions +function LoadTexture( Filename: String; var Texture: GLuint; + var pWidth, pHeight: Word ): Boolean; + +function LoadTextureEx( Filename: String; var Texture: GLuint; + fX, fY, fWidth, fHeight: Word ): Boolean; + +function LoadTextureMem( pData: Pointer; var Texture: GLuint; + var pWidth, pHeight: Word ): Boolean; + +function LoadTextureMemEx( pData: Pointer; var Texture: GLuint; + fX, fY, fWidth, fHeight: Word ): Boolean; + +implementation + +type + TTGAHeader = packed record + FileType: Byte; + ColorMapType: Byte; + ImageType: Byte; + ColorMapSpec: array[0..4] of Byte; + OrigX: array[0..1] of Byte; + OrigY: array[0..1] of Byte; + Width: array[0..1] of Byte; + Height: array[0..1] of Byte; + BPP: Byte; + ImageInfo: Byte; + end; + +// This is auxiliary function that creates OpenGL texture from raw image data +function CreateTexture( Width, Height, Format: Word; pData: Pointer ): Integer; +var + Texture: GLuint; +begin + glGenTextures( 1, @Texture ); + glBindTexture( GL_TEXTURE_2D, Texture ); + + {Texture blends with object background} + glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); + {Texture does NOT blend with object background} + // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); + + { + Select a filtering type. + BiLinear filtering produces very good results with little performance impact + + GL_NEAREST - Basic texture (grainy looking texture) + GL_LINEAR - BiLinear filtering + GL_LINEAR_MIPMAP_NEAREST - Basic mipmapped texture + GL_LINEAR_MIPMAP_LINEAR - BiLinear Mipmapped texture + } + + // for GL_TEXTURE_MAG_FILTER only first two can be used + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, TEXTUREFILTER ); + // for GL_TEXTURE_MIN_FILTER all of the above can be used + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, TEXTUREFILTER ); + + if Format = GL_RGBA then + begin + if fUseMipmaps then + gluBuild2DMipmaps( GL_TEXTURE_2D, GL_RGBA, Width, Height, GL_RGBA, + GL_UNSIGNED_BYTE, pData ) + else + glTexImage2D( GL_TEXTURE_2D, 0, 4, Width, Height, + 0, GL_RGBA, GL_UNSIGNED_BYTE, pData ); + end else + begin + if fUseMipmaps then + gluBuild2DMipmaps( GL_TEXTURE_2D, 3, Width, Height, GL_RGB, + GL_UNSIGNED_BYTE, pData ) + else + glTexImage2D( GL_TEXTURE_2D, 0, 3, Width, Height, + 0, GL_RGB, GL_UNSIGNED_BYTE, pData ); + end; + + Result := Texture; +end; + +function LoadTextureMem( pData: Pointer; var Texture: GLuint; + var pWidth, pHeight: Word ): Boolean; +var + TGAHeader: TTGAHeader; + image: Pointer; + Width, Height: Integer; + ImageSize: Integer; + i: Integer; + Front: ^Byte; + Back: ^Byte; + Temp: Byte; + BPP: Byte; + +begin + Result := False; + pWidth := 0; + pHeight := 0; + + CopyMemory( @TGAHeader, pData, SizeOf(TGAHeader) ); + + if ( TGAHeader.ImageType <> 2 ) then + begin + e_WriteLog( 'Error loading texture: Bad ImageType', MSG_WARNING ); + Exit; + end; + + if ( TGAHeader.ColorMapType <> 0 ) then + begin + e_WriteLog( 'Error loading texture: Bad ColorMapType', MSG_WARNING ); + Exit; + end; + + if ( TGAHeader.BPP < 24 ) then + begin + e_WriteLog( 'Error loading texture: BPP less than 24', MSG_WARNING ); + Exit; + end; + + Width := TGAHeader.Width[0] + TGAHeader.Width[1] * 256; + Height := TGAHeader.Height[0] + TGAHeader.Height[1] * 256; + BPP := TGAHeader.BPP; + + ImageSize := Width * Height * (BPP div 8); + + GetMem( Image, ImageSize ); + CopyMemory( Image, Pointer( Integer(pData) + SizeOf(TGAHeader) ), ImageSize ); + + for i := 0 to Width * Height - 1 do + begin + Front := Pointer( Integer(Image) + i*(BPP div 8) ); + Back := Pointer( Integer(Image) + i*(BPP div 8) + 2 ); + Temp := Front^; + Front^ := Back^; + Back^ := Temp; + end; + + if ( BPP = 24 ) then + Texture := CreateTexture( Width, Height, GL_RGB, Image ) + else + Texture := CreateTexture( Width, Height, GL_RGBA, Image ); + + FreeMem( Image ); + + pWidth := Width; + pHeight := Height; + + Result := True; +end; + +function LoadTextureMemEx( pData: Pointer; var Texture: GLuint; + fX, fY, fWidth, fHeight: Word ): Boolean; +var + TGAHeader: TTGAHeader; + image, image2: Pointer; + Width, Height: Integer; + ImageSize: Integer; + i, a, b: Integer; + Front: ^Byte; + Back: ^Byte; + Temp: Byte; + BPP: Byte; + Base: Integer; + +begin + Result := False; + + CopyMemory( @TGAHeader, pData, SizeOf(TGAHeader) ); + + if ( TGAHeader.ImageType <> 2 ) then + begin + e_WriteLog( 'Error loading texture: Bad ImageType', MSG_WARNING ); + Exit; + end; + + if ( TGAHeader.ColorMapType <> 0 ) then + begin + e_WriteLog( 'Error loading texture: Bad ColorMapType', MSG_WARNING ); + Exit; + end; + + if ( TGAHeader.BPP < 24 ) then + begin + e_WriteLog( 'Error loading texture: BPP less than 24', MSG_WARNING ); + Exit; + end; + + Width := TGAHeader.Width[0] + TGAHeader.Width[1] * 256; + Height := TGAHeader.Height[0] + TGAHeader.Height[1] * 256; + BPP := TGAHeader.BPP; + + if fX > Width then Exit; + if fY > Height then Exit; + if fX+fWidth > Width then Exit; + if fY+fHeight > Height then Exit; + + ImageSize := Width * Height * (BPP div 8); + GetMem( Image2, ImageSize ); + CopyMemory( Image2, Pointer( Integer(pData) + SizeOf(TGAHeader) ), ImageSize ); + + a := BPP div 8; + + for i := 0 to Width * Height - 1 do + begin + Front := Pointer( Integer(Image2) + i * a ); + Back := Pointer( Integer(Image2) + i * a + 2 ); + Temp := Front^; + Front^ := Back^; + Back^ := Temp; + end; + + fY := Height - (fY + fHeight); + + ImageSize := fHeight * fWidth * (BPP div 8); + GetMem( Image, ImageSize ); + + Base := Integer( Image2 ) + fY * Width * (BPP div 8) + fX * (BPP div 8); + a := fWidth * (BPP div 8); + b := Width * (BPP div 8); + + for i := 0 to fHeight-1 do + CopyMemory( Pointer( Integer(image) + a*i ), Pointer( Base + b*i ), a ); + + if ( BPP = 24 ) then + Texture := CreateTexture( fWidth, fHeight, GL_RGB, image ) + else + Texture := CreateTexture( fWidth, fHeight, GL_RGBA, image ); + + FreeMem( Image ); + FreeMem( Image2 ); + + Result := True; +end; + +function LoadTexture( Filename: String; var Texture: GLuint; + var pWidth, pHeight: Word ): Boolean; +var + TGAHeader: TTGAHeader; + TGAFile: File; + bytesRead: Integer; + image: Pointer; + Width, Height: Integer; + ImageSize: Integer; + i: Integer; + Front: ^Byte; + Back: ^Byte; + Temp: Byte; + BPP: Byte; + +begin + Result := False; + pWidth := 0; + pHeight := 0; + + if not FileExists(Filename) then + begin + e_WriteLog('Texture ' + Filename + ' not found', MSG_WARNING); + Exit; + end; + + AssignFile( TGAFile, Filename ); + Reset( TGAFile, 1 ); + BlockRead( TGAFile, TGAHeader, SizeOf(TGAHeader) ); + + if ( TGAHeader.ImageType <> 2 ) then + begin + CloseFile( TGAFile ); + e_WriteLog( 'Error loading texture: Bad ImageType', MSG_WARNING ); + Exit; + end; + + if ( TGAHeader.ColorMapType <> 0 ) then + begin + CloseFile( TGAFile ); + e_WriteLog( 'Error loading texture: Bad ColorMapType', MSG_WARNING ); + Exit; + end; + + if ( TGAHeader.BPP < 24 ) then + begin + CloseFile( TGAFile ); + e_WriteLog( 'Error loading texture: BPP less than 24', MSG_WARNING ); + Exit; + end; + + Width := TGAHeader.Width[0] + TGAHeader.Width[1] * 256; + Height := TGAHeader.Height[0] + TGAHeader.Height[1] * 256; + BPP := TGAHeader.BPP; + + ImageSize := Width * Height * (BPP div 8); + + GetMem( Image, ImageSize ); + + BlockRead( TGAFile, image^, ImageSize, bytesRead ); + if ( bytesRead <> ImageSize ) then + begin + CloseFile( TGAFile ); + Exit; + end; + + CloseFile( TGAFile ); + + for i := 0 to Width * Height - 1 do + begin + Front := Pointer( Integer(Image) + i * (BPP div 8) ); + Back := Pointer( Integer(Image) + i * (BPP div 8) + 2 ); + Temp := Front^; + Front^ := Back^; + Back^ := Temp; + end; + + if ( BPP = 24 ) then + Texture := CreateTexture( Width, Height, GL_RGB, Image ) + else + Texture := CreateTexture( Width, Height, GL_RGBA, Image ); + + FreeMem( Image ); + + pWidth := Width; + pHeight := Height; + + Result := True; +end; + +function LoadTextureEx( Filename: String; var Texture: GLuint; + fX, fY, fWidth, fHeight: Word ): Boolean; +var + TGAHeader: TTGAHeader; + TGAFile: File; + image, image2: Pointer; + Width, Height: Integer; + ImageSize: Integer; + i: Integer; + Front: ^Byte; + Back: ^Byte; + Temp: Byte; + BPP: Byte; + Base: Integer; + +begin + Result := False; + + if not FileExists(Filename) then + begin + e_WriteLog( 'Texture ' + Filename + ' not found', MSG_WARNING ); + Exit; + end; + + AssignFile( TGAFile, Filename ); + Reset( TGAFile, 1 ); + BlockRead( TGAFile, TGAHeader, SizeOf(TGAHeader) ); + + if ( TGAHeader.ImageType <> 2 ) then + begin + CloseFile( TGAFile ); + e_WriteLog( 'Error loading texture: Bad ImageType', MSG_WARNING ); + Exit; + end; + + if ( TGAHeader.ColorMapType <> 0 ) then + begin + CloseFile( TGAFile ); + e_WriteLog( 'Error loading texture: Bad ColorMapType', MSG_WARNING ); + Exit; + end; + + if ( TGAHeader.BPP < 24 ) then + begin + CloseFile( TGAFile ); + e_WriteLog( 'Error loading texture: BPP less than 24', MSG_WARNING ); + Exit; + end; + + Width := TGAHeader.Width[0] + TGAHeader.Width[1] * 256; + Height := TGAHeader.Height[0] + TGAHeader.Height[1] * 256; + BPP := TGAHeader.BPP; + + if fX > Width then Exit; + if fY > Height then Exit; + if fX+fWidth > Width then Exit; + if fY+fHeight > Height then Exit; + + ImageSize := Width * Height * (BPP div 8); + GetMem( Image2, ImageSize ); + BlockRead( TGAFile, Image2^, ImageSize ); + + CloseFile( TGAFile ); + + for i := 0 to Width * Height - 1 do + begin + Front := Pointer( Integer(Image2) + i * (BPP div 8) ); + Back := Pointer( Integer(Image2) + i * (BPP div 8) + 2 ); + Temp := Front^; + Front^ := Back^; + Back^ := Temp; + end; + + fY := Height - (fY + fHeight); + + ImageSize := fHeight * fWidth * (BPP div 8); + GetMem( Image, ImageSize ); + + Base := Integer(Image2) + fY * Width * (BPP div 8) + fX * (BPP div 8); + + for i := 0 to fHeight-1 do + begin + CopyMemory( Pointer( Integer(image) + fWidth * (BPP div 8) * i ), + Pointer( Base + Width * (BPP div 8) * i), fWidth * (BPP div 8) ); + end; + + if ( BPP = 24 ) then + Texture := CreateTexture( fWidth, fHeight, GL_RGB, Image ) + else + Texture := CreateTexture( fWidth, fHeight, GL_RGBA, Image ); + + FreeMem( Image ); + FreeMem( Image2 ); + + Result := True; +end; + +end. + diff --git a/src/lib/dgl/GL.pas b/src/lib/dgl/GL.pas new file mode 100644 index 0000000..c3eda2f --- /dev/null +++ b/src/lib/dgl/GL.pas @@ -0,0 +1,2226 @@ +(*++ BUILD Version: 0004 // Increment this if a change has global effects + +Copyright (c) 1985-96, Microsoft Corporation + +Module Name: + + gl.h + +Abstract: + + Procedure declarations, constant definitions and macros for the OpenGL + component. + +--*) + +(* +** Copyright 1996 Silicon Graphics, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of Silicon Graphics, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +*) + +{******************************************************************************} +{ Converted to Delphi by Tom Nuydens (tom@delphi3d.net) } +{ For the latest updates, visit Delphi3D: http://www.delphi3d.net } +{******************************************************************************} + +unit GL; + +interface + +uses + SysUtils, Windows; + +type + GLenum = Cardinal; PGLenum = ^GLenum; + GLboolean = Byte; PGLboolean = ^GLboolean; + GLbitfield = Cardinal; PGLbitfield = ^GLbitfield; + GLbyte = ShortInt; PGLbyte = ^GLbyte; + GLshort = SmallInt; PGLshort = ^GLshort; + GLint = Integer; PGLint = ^GLint; + GLsizei = Integer; PGLsizei = ^GLsizei; + GLubyte = Byte; PGLubyte = ^GLubyte; + GLushort = Word; PGLushort = ^GLushort; + GLuint = Cardinal; PGLuint = ^GLuint; + GLfloat = Single; PGLfloat = ^GLfloat; + GLclampf = Single; PGLclampf = ^GLclampf; + GLdouble = Double; PGLdouble = ^GLdouble; + GLclampd = Double; PGLclampd = ^GLclampd; +{ GLvoid = void; } PGLvoid = Pointer; + +{******************************************************************************} + +const + // Version + GL_VERSION_1_1 = 1; + + // AccumOp + GL_ACCUM = $0100; + GL_LOAD = $0101; + GL_RETURN = $0102; + GL_MULT = $0103; + GL_ADD = $0104; + + // AlphaFunction + GL_NEVER = $0200; + GL_LESS = $0201; + GL_EQUAL = $0202; + GL_LEQUAL = $0203; + GL_GREATER = $0204; + GL_NOTEQUAL = $0205; + GL_GEQUAL = $0206; + GL_ALWAYS = $0207; + + // AttribMask + GL_CURRENT_BIT = $00000001; + GL_POINT_BIT = $00000002; + GL_LINE_BIT = $00000004; + GL_POLYGON_BIT = $00000008; + GL_POLYGON_STIPPLE_BIT = $00000010; + GL_PIXEL_MODE_BIT = $00000020; + GL_LIGHTING_BIT = $00000040; + GL_FOG_BIT = $00000080; + GL_DEPTH_BUFFER_BIT = $00000100; + GL_ACCUM_BUFFER_BIT = $00000200; + GL_STENCIL_BUFFER_BIT = $00000400; + GL_VIEWPORT_BIT = $00000800; + GL_TRANSFORM_BIT = $00001000; + GL_ENABLE_BIT = $00002000; + GL_COLOR_BUFFER_BIT = $00004000; + GL_HINT_BIT = $00008000; + GL_EVAL_BIT = $00010000; + GL_LIST_BIT = $00020000; + GL_TEXTURE_BIT = $00040000; + GL_SCISSOR_BIT = $00080000; + GL_ALL_ATTRIB_BITS = $000FFFFF; + + // BeginMode + GL_POINTS = $0000; + GL_LINES = $0001; + GL_LINE_LOOP = $0002; + GL_LINE_STRIP = $0003; + GL_TRIANGLES = $0004; + GL_TRIANGLE_STRIP = $0005; + GL_TRIANGLE_FAN = $0006; + GL_QUADS = $0007; + GL_QUAD_STRIP = $0008; + GL_POLYGON = $0009; + + // BlendingFactorDest + GL_ZERO = 0; + GL_ONE = 1; + GL_SRC_COLOR = $0300; + GL_ONE_MINUS_SRC_COLOR = $0301; + GL_SRC_ALPHA = $0302; + GL_ONE_MINUS_SRC_ALPHA = $0303; + GL_DST_ALPHA = $0304; + GL_ONE_MINUS_DST_ALPHA = $0305; + + // BlendingFactorSrc + // GL_ZERO + // GL_ONE + GL_DST_COLOR = $0306; + GL_ONE_MINUS_DST_COLOR = $0307; + GL_SRC_ALPHA_SATURATE = $0308; + // GL_SRC_ALPHA + // GL_ONE_MINUS_SRC_ALPHA + // GL_DST_ALPHA + // GL_ONE_MINUS_DST_ALPHA + + // Boolean + GL_TRUE = 1; + GL_FALSE = 0; + + // ClearBufferMask + // GL_COLOR_BUFFER_BIT + // GL_ACCUM_BUFFER_BIT + // GL_STENCIL_BUFFER_BIT + // GL_DEPTH_BUFFER_BIT + + // ClientArrayType + // GL_VERTEX_ARRAY + // GL_NORMAL_ARRAY + // GL_COLOR_ARRAY + // GL_INDEX_ARRAY + // GL_TEXTURE_COORD_ARRAY + // GL_EDGE_FLAG_ARRAY + + // ClipPlaneName + GL_CLIP_PLANE0 = $3000; + GL_CLIP_PLANE1 = $3001; + GL_CLIP_PLANE2 = $3002; + GL_CLIP_PLANE3 = $3003; + GL_CLIP_PLANE4 = $3004; + GL_CLIP_PLANE5 = $3005; + + // ColorMaterialFace + // GL_FRONT + // GL_BACK + // GL_FRONT_AND_BACK + + // ColorMaterialParameter + // GL_AMBIENT + // GL_DIFFUSE + // GL_SPECULAR + // GL_EMISSION + // GL_AMBIENT_AND_DIFFUSE + + // ColorPointerType + // GL_BYTE + // GL_UNSIGNED_BYTE + // GL_SHORT + // GL_UNSIGNED_SHORT + // GL_INT + // GL_UNSIGNED_INT + // GL_FLOAT + // GL_DOUBLE + + // CullFaceMode + // GL_FRONT + // GL_BACK + // GL_FRONT_AND_BACK + + // DataType + GL_BYTE = $1400; + GL_UNSIGNED_BYTE = $1401; + GL_SHORT = $1402; + GL_UNSIGNED_SHORT = $1403; + GL_INT = $1404; + GL_UNSIGNED_INT = $1405; + GL_FLOAT = $1406; + GL_2_BYTES = $1407; + GL_3_BYTES = $1408; + GL_4_BYTES = $1409; + GL_DOUBLE = $140A; + + // DepthFunction + // GL_NEVER + // GL_LESS + // GL_EQUAL + // GL_LEQUAL + // GL_GREATER + // GL_NOTEQUAL + // GL_GEQUAL + // GL_ALWAYS + + // DrawBufferMode + GL_NONE = 0; + GL_FRONT_LEFT = $0400; + GL_FRONT_RIGHT = $0401; + GL_BACK_LEFT = $0402; + GL_BACK_RIGHT = $0403; + GL_FRONT = $0404; + GL_BACK = $0405; + GL_LEFT = $0406; + GL_RIGHT = $0407; + GL_FRONT_AND_BACK = $0408; + GL_AUX0 = $0409; + GL_AUX1 = $040A; + GL_AUX2 = $040B; + GL_AUX3 = $040C; + + // Enable + // GL_FOG + // GL_LIGHTING + // GL_TEXTURE_1D + // GL_TEXTURE_2D + // GL_LINE_STIPPLE + // GL_POLYGON_STIPPLE + // GL_CULL_FACE + // GL_ALPHA_TEST + // GL_BLEND + // GL_INDEX_LOGIC_OP + // GL_COLOR_LOGIC_OP + // GL_DITHER + // GL_STENCIL_TEST + // GL_DEPTH_TEST + // GL_CLIP_PLANE0 + // GL_CLIP_PLANE1 + // GL_CLIP_PLANE2 + // GL_CLIP_PLANE3 + // GL_CLIP_PLANE4 + // GL_CLIP_PLANE5 + // GL_LIGHT0 + // GL_LIGHT1 + // GL_LIGHT2 + // GL_LIGHT3 + // GL_LIGHT4 + // GL_LIGHT5 + // GL_LIGHT6 + // GL_LIGHT7 + // GL_TEXTURE_GEN_S + // GL_TEXTURE_GEN_T + // GL_TEXTURE_GEN_R + // GL_TEXTURE_GEN_Q + // GL_MAP1_VERTEX_3 + // GL_MAP1_VERTEX_4 + // GL_MAP1_COLOR_4 + // GL_MAP1_INDEX + // GL_MAP1_NORMAL + // GL_MAP1_TEXTURE_COORD_1 + // GL_MAP1_TEXTURE_COORD_2 + // GL_MAP1_TEXTURE_COORD_3 + // GL_MAP1_TEXTURE_COORD_4 + // GL_MAP2_VERTEX_3 + // GL_MAP2_VERTEX_4 + // GL_MAP2_COLOR_4 + // GL_MAP2_INDEX + // GL_MAP2_NORMAL + // GL_MAP2_TEXTURE_COORD_1 + // GL_MAP2_TEXTURE_COORD_2 + // GL_MAP2_TEXTURE_COORD_3 + // GL_MAP2_TEXTURE_COORD_4 + // GL_POINT_SMOOTH + // GL_LINE_SMOOTH + // GL_POLYGON_SMOOTH + // GL_SCISSOR_TEST + // GL_COLOR_MATERIAL + // GL_NORMALIZE + // GL_AUTO_NORMAL + // GL_VERTEX_ARRAY + // GL_NORMAL_ARRAY + // GL_COLOR_ARRAY + // GL_INDEX_ARRAY + // GL_TEXTURE_COORD_ARRAY + // GL_EDGE_FLAG_ARRAY + // GL_POLYGON_OFFSET_POINT + // GL_POLYGON_OFFSET_LINE + // GL_POLYGON_OFFSET_FILL + + // ErrorCode + GL_NO_ERROR = 0; + GL_INVALID_ENUM = $0500; + GL_INVALID_VALUE = $0501; + GL_INVALID_OPERATION = $0502; + GL_STACK_OVERFLOW = $0503; + GL_STACK_UNDERFLOW = $0504; + GL_OUT_OF_MEMORY = $0505; + + // FeedBackMode + GL_2D = $0600; + GL_3D = $0601; + GL_3D_COLOR = $0602; + GL_3D_COLOR_TEXTURE = $0603; + GL_4D_COLOR_TEXTURE = $0604; + + // FeedBackToken + GL_PASS_THROUGH_TOKEN = $0700; + GL_POINT_TOKEN = $0701; + GL_LINE_TOKEN = $0702; + GL_POLYGON_TOKEN = $0703; + GL_BITMAP_TOKEN = $0704; + GL_DRAW_PIXEL_TOKEN = $0705; + GL_COPY_PIXEL_TOKEN = $0706; + GL_LINE_RESET_TOKEN = $0707; + + // FogMode + // GL_LINEAR + GL_EXP = $0800; + GL_EXP2 = $0801; + + // FogParameter + // GL_FOG_COLOR + // GL_FOG_DENSITY + // GL_FOG_END + // GL_FOG_INDEX + // GL_FOG_MODE + // GL_FOG_START + + // FrontFaceDirection + GL_CW = $0900; + GL_CCW = $0901; + + // GetMapTarget + GL_COEFF = $0A00; + GL_ORDER = $0A01; + GL_DOMAIN = $0A02; + + // GetPixelMap + // GL_PIXEL_MAP_I_TO_I + // GL_PIXEL_MAP_S_TO_S + // GL_PIXEL_MAP_I_TO_R + // GL_PIXEL_MAP_I_TO_G + // GL_PIXEL_MAP_I_TO_B + // GL_PIXEL_MAP_I_TO_A + // GL_PIXEL_MAP_R_TO_R + // GL_PIXEL_MAP_G_TO_G + // GL_PIXEL_MAP_B_TO_B + // GL_PIXEL_MAP_A_TO_A + + // GetPointerTarget + // GL_VERTEX_ARRAY_POINTER + // GL_NORMAL_ARRAY_POINTER + // GL_COLOR_ARRAY_POINTER + // GL_INDEX_ARRAY_POINTER + // GL_TEXTURE_COORD_ARRAY_POINTER + // GL_EDGE_FLAG_ARRAY_POINTER + + // GetTarget + GL_CURRENT_COLOR = $0B00; + GL_CURRENT_INDEX = $0B01; + GL_CURRENT_NORMAL = $0B02; + GL_CURRENT_TEXTURE_COORDS = $0B03; + GL_CURRENT_RASTER_COLOR = $0B04; + GL_CURRENT_RASTER_INDEX = $0B05; + GL_CURRENT_RASTER_TEXTURE_COORDS = $0B06; + GL_CURRENT_RASTER_POSITION = $0B07; + GL_CURRENT_RASTER_POSITION_VALID = $0B08; + GL_CURRENT_RASTER_DISTANCE = $0B09; + GL_POINT_SMOOTH = $0B10; + GL_POINT_SIZE = $0B11; + GL_POINT_SIZE_RANGE = $0B12; + GL_POINT_SIZE_GRANULARITY = $0B13; + GL_LINE_SMOOTH = $0B20; + GL_LINE_WIDTH = $0B21; + GL_LINE_WIDTH_RANGE = $0B22; + GL_LINE_WIDTH_GRANULARITY = $0B23; + GL_LINE_STIPPLE = $0B24; + GL_LINE_STIPPLE_PATTERN = $0B25; + GL_LINE_STIPPLE_REPEAT = $0B26; + GL_LIST_MODE = $0B30; + GL_MAX_LIST_NESTING = $0B31; + GL_LIST_BASE = $0B32; + GL_LIST_INDEX = $0B33; + GL_POLYGON_MODE = $0B40; + GL_POLYGON_SMOOTH = $0B41; + GL_POLYGON_STIPPLE = $0B42; + GL_EDGE_FLAG = $0B43; + GL_CULL_FACE = $0B44; + GL_CULL_FACE_MODE = $0B45; + GL_FRONT_FACE = $0B46; + GL_LIGHTING = $0B50; + GL_LIGHT_MODEL_LOCAL_VIEWER = $0B51; + GL_LIGHT_MODEL_TWO_SIDE = $0B52; + GL_LIGHT_MODEL_AMBIENT = $0B53; + GL_SHADE_MODEL = $0B54; + GL_COLOR_MATERIAL_FACE = $0B55; + GL_COLOR_MATERIAL_PARAMETER = $0B56; + GL_COLOR_MATERIAL = $0B57; + GL_FOG = $0B60; + GL_FOG_INDEX = $0B61; + GL_FOG_DENSITY = $0B62; + GL_FOG_START = $0B63; + GL_FOG_END = $0B64; + GL_FOG_MODE = $0B65; + GL_FOG_COLOR = $0B66; + GL_DEPTH_RANGE = $0B70; + GL_DEPTH_TEST = $0B71; + GL_DEPTH_WRITEMASK = $0B72; + GL_DEPTH_CLEAR_VALUE = $0B73; + GL_DEPTH_FUNC = $0B74; + GL_ACCUM_CLEAR_VALUE = $0B80; + GL_STENCIL_TEST = $0B90; + GL_STENCIL_CLEAR_VALUE = $0B91; + GL_STENCIL_FUNC = $0B92; + GL_STENCIL_VALUE_MASK = $0B93; + GL_STENCIL_FAIL = $0B94; + GL_STENCIL_PASS_DEPTH_FAIL = $0B95; + GL_STENCIL_PASS_DEPTH_PASS = $0B96; + GL_STENCIL_REF = $0B97; + GL_STENCIL_WRITEMASK = $0B98; + GL_MATRIX_MODE = $0BA0; + GL_NORMALIZE = $0BA1; + GL_VIEWPORT = $0BA2; + GL_MODELVIEW_STACK_DEPTH = $0BA3; + GL_PROJECTION_STACK_DEPTH = $0BA4; + GL_TEXTURE_STACK_DEPTH = $0BA5; + GL_MODELVIEW_MATRIX = $0BA6; + GL_PROJECTION_MATRIX = $0BA7; + GL_TEXTURE_MATRIX = $0BA8; + GL_ATTRIB_STACK_DEPTH = $0BB0; + GL_CLIENT_ATTRIB_STACK_DEPTH = $0BB1; + GL_ALPHA_TEST = $0BC0; + GL_ALPHA_TEST_FUNC = $0BC1; + GL_ALPHA_TEST_REF = $0BC2; + GL_DITHER = $0BD0; + GL_BLEND_DST = $0BE0; + GL_BLEND_SRC = $0BE1; + GL_BLEND = $0BE2; + GL_LOGIC_OP_MODE = $0BF0; + GL_INDEX_LOGIC_OP = $0BF1; + GL_COLOR_LOGIC_OP = $0BF2; + GL_AUX_BUFFERS = $0C00; + GL_DRAW_BUFFER = $0C01; + GL_READ_BUFFER = $0C02; + GL_SCISSOR_BOX = $0C10; + GL_SCISSOR_TEST = $0C11; + GL_INDEX_CLEAR_VALUE = $0C20; + GL_INDEX_WRITEMASK = $0C21; + GL_COLOR_CLEAR_VALUE = $0C22; + GL_COLOR_WRITEMASK = $0C23; + GL_INDEX_MODE = $0C30; + GL_RGBA_MODE = $0C31; + GL_DOUBLEBUFFER = $0C32; + GL_STEREO = $0C33; + GL_RENDER_MODE = $0C40; + GL_PERSPECTIVE_CORRECTION_HINT = $0C50; + GL_POINT_SMOOTH_HINT = $0C51; + GL_LINE_SMOOTH_HINT = $0C52; + GL_POLYGON_SMOOTH_HINT = $0C53; + GL_FOG_HINT = $0C54; + GL_TEXTURE_GEN_S = $0C60; + GL_TEXTURE_GEN_T = $0C61; + GL_TEXTURE_GEN_R = $0C62; + GL_TEXTURE_GEN_Q = $0C63; + GL_PIXEL_MAP_I_TO_I = $0C70; + GL_PIXEL_MAP_S_TO_S = $0C71; + GL_PIXEL_MAP_I_TO_R = $0C72; + GL_PIXEL_MAP_I_TO_G = $0C73; + GL_PIXEL_MAP_I_TO_B = $0C74; + GL_PIXEL_MAP_I_TO_A = $0C75; + GL_PIXEL_MAP_R_TO_R = $0C76; + GL_PIXEL_MAP_G_TO_G = $0C77; + GL_PIXEL_MAP_B_TO_B = $0C78; + GL_PIXEL_MAP_A_TO_A = $0C79; + GL_PIXEL_MAP_I_TO_I_SIZE = $0CB0; + GL_PIXEL_MAP_S_TO_S_SIZE = $0CB1; + GL_PIXEL_MAP_I_TO_R_SIZE = $0CB2; + GL_PIXEL_MAP_I_TO_G_SIZE = $0CB3; + GL_PIXEL_MAP_I_TO_B_SIZE = $0CB4; + GL_PIXEL_MAP_I_TO_A_SIZE = $0CB5; + GL_PIXEL_MAP_R_TO_R_SIZE = $0CB6; + GL_PIXEL_MAP_G_TO_G_SIZE = $0CB7; + GL_PIXEL_MAP_B_TO_B_SIZE = $0CB8; + GL_PIXEL_MAP_A_TO_A_SIZE = $0CB9; + GL_UNPACK_SWAP_BYTES = $0CF0; + GL_UNPACK_LSB_FIRST = $0CF1; + GL_UNPACK_ROW_LENGTH = $0CF2; + GL_UNPACK_SKIP_ROWS = $0CF3; + GL_UNPACK_SKIP_PIXELS = $0CF4; + GL_UNPACK_ALIGNMENT = $0CF5; + GL_PACK_SWAP_BYTES = $0D00; + GL_PACK_LSB_FIRST = $0D01; + GL_PACK_ROW_LENGTH = $0D02; + GL_PACK_SKIP_ROWS = $0D03; + GL_PACK_SKIP_PIXELS = $0D04; + GL_PACK_ALIGNMENT = $0D05; + GL_MAP_COLOR = $0D10; + GL_MAP_STENCIL = $0D11; + GL_INDEX_SHIFT = $0D12; + GL_INDEX_OFFSET = $0D13; + GL_RED_SCALE = $0D14; + GL_RED_BIAS = $0D15; + GL_ZOOM_X = $0D16; + GL_ZOOM_Y = $0D17; + GL_GREEN_SCALE = $0D18; + GL_GREEN_BIAS = $0D19; + GL_BLUE_SCALE = $0D1A; + GL_BLUE_BIAS = $0D1B; + GL_ALPHA_SCALE = $0D1C; + GL_ALPHA_BIAS = $0D1D; + GL_DEPTH_SCALE = $0D1E; + GL_DEPTH_BIAS = $0D1F; + GL_MAX_EVAL_ORDER = $0D30; + GL_MAX_LIGHTS = $0D31; + GL_MAX_CLIP_PLANES = $0D32; + GL_MAX_TEXTURE_SIZE = $0D33; + GL_MAX_PIXEL_MAP_TABLE = $0D34; + GL_MAX_ATTRIB_STACK_DEPTH = $0D35; + GL_MAX_MODELVIEW_STACK_DEPTH = $0D36; + GL_MAX_NAME_STACK_DEPTH = $0D37; + GL_MAX_PROJECTION_STACK_DEPTH = $0D38; + GL_MAX_TEXTURE_STACK_DEPTH = $0D39; + GL_MAX_VIEWPORT_DIMS = $0D3A; + GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = $0D3B; + GL_SUBPIXEL_BITS = $0D50; + GL_INDEX_BITS = $0D51; + GL_RED_BITS = $0D52; + GL_GREEN_BITS = $0D53; + GL_BLUE_BITS = $0D54; + GL_ALPHA_BITS = $0D55; + GL_DEPTH_BITS = $0D56; + GL_STENCIL_BITS = $0D57; + GL_ACCUM_RED_BITS = $0D58; + GL_ACCUM_GREEN_BITS = $0D59; + GL_ACCUM_BLUE_BITS = $0D5A; + GL_ACCUM_ALPHA_BITS = $0D5B; + GL_NAME_STACK_DEPTH = $0D70; + GL_AUTO_NORMAL = $0D80; + GL_MAP1_COLOR_4 = $0D90; + GL_MAP1_INDEX = $0D91; + GL_MAP1_NORMAL = $0D92; + GL_MAP1_TEXTURE_COORD_1 = $0D93; + GL_MAP1_TEXTURE_COORD_2 = $0D94; + GL_MAP1_TEXTURE_COORD_3 = $0D95; + GL_MAP1_TEXTURE_COORD_4 = $0D96; + GL_MAP1_VERTEX_3 = $0D97; + GL_MAP1_VERTEX_4 = $0D98; + GL_MAP2_COLOR_4 = $0DB0; + GL_MAP2_INDEX = $0DB1; + GL_MAP2_NORMAL = $0DB2; + GL_MAP2_TEXTURE_COORD_1 = $0DB3; + GL_MAP2_TEXTURE_COORD_2 = $0DB4; + GL_MAP2_TEXTURE_COORD_3 = $0DB5; + GL_MAP2_TEXTURE_COORD_4 = $0DB6; + GL_MAP2_VERTEX_3 = $0DB7; + GL_MAP2_VERTEX_4 = $0DB8; + GL_MAP1_GRID_DOMAIN = $0DD0; + GL_MAP1_GRID_SEGMENTS = $0DD1; + GL_MAP2_GRID_DOMAIN = $0DD2; + GL_MAP2_GRID_SEGMENTS = $0DD3; + GL_TEXTURE_1D = $0DE0; + GL_TEXTURE_2D = $0DE1; + GL_FEEDBACK_BUFFER_POINTER = $0DF0; + GL_FEEDBACK_BUFFER_SIZE = $0DF1; + GL_FEEDBACK_BUFFER_TYPE = $0DF2; + GL_SELECTION_BUFFER_POINTER = $0DF3; + GL_SELECTION_BUFFER_SIZE = $0DF4; + // GL_TEXTURE_BINDING_1D + // GL_TEXTURE_BINDING_2D + // GL_VERTEX_ARRAY + // GL_NORMAL_ARRAY + // GL_COLOR_ARRAY + // GL_INDEX_ARRAY + // GL_TEXTURE_COORD_ARRAY + // GL_EDGE_FLAG_ARRAY + // GL_VERTEX_ARRAY_SIZE + // GL_VERTEX_ARRAY_TYPE + // GL_VERTEX_ARRAY_STRIDE + // GL_NORMAL_ARRAY_TYPE + // GL_NORMAL_ARRAY_STRIDE + // GL_COLOR_ARRAY_SIZE + // GL_COLOR_ARRAY_TYPE + // GL_COLOR_ARRAY_STRIDE + // GL_INDEX_ARRAY_TYPE + // GL_INDEX_ARRAY_STRIDE + // GL_TEXTURE_COORD_ARRAY_SIZE + // GL_TEXTURE_COORD_ARRAY_TYPE + // GL_TEXTURE_COORD_ARRAY_STRIDE + // GL_EDGE_FLAG_ARRAY_STRIDE + // GL_POLYGON_OFFSET_FACTOR + // GL_POLYGON_OFFSET_UNITS + + // GetTextureParameter + // GL_TEXTURE_MAG_FILTER + // GL_TEXTURE_MIN_FILTER + // GL_TEXTURE_WRAP_S + // GL_TEXTURE_WRAP_T + GL_TEXTURE_WIDTH = $1000; + GL_TEXTURE_HEIGHT = $1001; + GL_TEXTURE_INTERNAL_FORMAT = $1003; + GL_TEXTURE_BORDER_COLOR = $1004; + GL_TEXTURE_BORDER = $1005; + // GL_TEXTURE_RED_SIZE + // GL_TEXTURE_GREEN_SIZE + // GL_TEXTURE_BLUE_SIZE + // GL_TEXTURE_ALPHA_SIZE + // GL_TEXTURE_LUMINANCE_SIZE + // GL_TEXTURE_INTENSITY_SIZE + // GL_TEXTURE_PRIORITY + // GL_TEXTURE_RESIDENT + + // HintMode + GL_DONT_CARE = $1100; + GL_FASTEST = $1101; + GL_NICEST = $1102; + + // HintTarget + // GL_PERSPECTIVE_CORRECTION_HINT + // GL_POINT_SMOOTH_HINT + // GL_LINE_SMOOTH_HINT + // GL_POLYGON_SMOOTH_HINT + // GL_FOG_HINT + + // IndexPointerType + // GL_SHORT + // GL_INT + // GL_FLOAT + // GL_DOUBLE + + // LightModelParameter + // GL_LIGHT_MODEL_AMBIENT + // GL_LIGHT_MODEL_LOCAL_VIEWER + // GL_LIGHT_MODEL_TWO_SIDE + + // LightName + GL_LIGHT0 = $4000; + GL_LIGHT1 = $4001; + GL_LIGHT2 = $4002; + GL_LIGHT3 = $4003; + GL_LIGHT4 = $4004; + GL_LIGHT5 = $4005; + GL_LIGHT6 = $4006; + GL_LIGHT7 = $4007; + + // LightParameter + GL_AMBIENT = $1200; + GL_DIFFUSE = $1201; + GL_SPECULAR = $1202; + GL_POSITION = $1203; + GL_SPOT_DIRECTION = $1204; + GL_SPOT_EXPONENT = $1205; + GL_SPOT_CUTOFF = $1206; + GL_CONSTANT_ATTENUATION = $1207; + GL_LINEAR_ATTENUATION = $1208; + GL_QUADRATIC_ATTENUATION = $1209; + + // InterleavedArrays + // GL_V2F + // GL_V3F + // GL_C4UB_V2F + // GL_C4UB_V3F + // GL_C3F_V3F + // GL_N3F_V3F + // GL_C4F_N3F_V3F + // GL_T2F_V3F + // GL_T4F_V4F + // GL_T2F_C4UB_V3F + // GL_T2F_C3F_V3F + // GL_T2F_N3F_V3F + // GL_T2F_C4F_N3F_V3F + // GL_T4F_C4F_N3F_V4F + + // ListMode + GL_COMPILE = $1300; + GL_COMPILE_AND_EXECUTE = $1301; + + // ListNameType + // GL_BYTE + // GL_UNSIGNED_BYTE + // GL_SHORT + // GL_UNSIGNED_SHORT + // GL_INT + // GL_UNSIGNED_INT + // GL_FLOAT + // GL_2_BYTES + // GL_3_BYTES + // GL_4_BYTES + + // LogicOp + GL_CLEAR = $1500; + GL_AND = $1501; + GL_AND_REVERSE = $1502; + GL_COPY = $1503; + GL_AND_INVERTED = $1504; + GL_NOOP = $1505; + GL_XOR = $1506; + GL_OR = $1507; + GL_NOR = $1508; + GL_EQUIV = $1509; + GL_INVERT = $150A; + GL_OR_REVERSE = $150B; + GL_COPY_INVERTED = $150C; + GL_OR_INVERTED = $150D; + GL_NAND = $150E; + GL_SET = $150F; + + // MapTarget + // GL_MAP1_COLOR_4 + // GL_MAP1_INDEX + // GL_MAP1_NORMAL + // GL_MAP1_TEXTURE_COORD_1 + // GL_MAP1_TEXTURE_COORD_2 + // GL_MAP1_TEXTURE_COORD_3 + // GL_MAP1_TEXTURE_COORD_4 + // GL_MAP1_VERTEX_3 + // GL_MAP1_VERTEX_4 + // GL_MAP2_COLOR_4 + // GL_MAP2_INDEX + // GL_MAP2_NORMAL + // GL_MAP2_TEXTURE_COORD_1 + // GL_MAP2_TEXTURE_COORD_2 + // GL_MAP2_TEXTURE_COORD_3 + // GL_MAP2_TEXTURE_COORD_4 + // GL_MAP2_VERTEX_3 + // GL_MAP2_VERTEX_4 + + // MaterialFace + // GL_FRONT + // GL_BACK + // GL_FRONT_AND_BACK + + // MaterialParameter + GL_EMISSION = $1600; + GL_SHININESS = $1601; + GL_AMBIENT_AND_DIFFUSE = $1602; + GL_COLOR_INDEXES = $1603; + // GL_AMBIENT + // GL_DIFFUSE + // GL_SPECULAR + + // MatrixMode + GL_MODELVIEW = $1700; + GL_PROJECTION = $1701; + GL_TEXTURE = $1702; + + // MeshMode1 + // GL_POINT + // GL_LINE + + // MeshMode2 + // GL_POINT + // GL_LINE + // GL_FILL + + // NormalPointerType + // GL_BYTE + // GL_SHORT + // GL_INT + // GL_FLOAT + // GL_DOUBLE + + // PixelCopyType + GL_COLOR = $1800; + GL_DEPTH = $1801; + GL_STENCIL = $1802; + + // PixelFormat + GL_COLOR_INDEX = $1900; + GL_STENCIL_INDEX = $1901; + GL_DEPTH_COMPONENT = $1902; + GL_RED = $1903; + GL_GREEN = $1904; + GL_BLUE = $1905; + GL_ALPHA = $1906; + GL_RGB = $1907; + GL_RGBA = $1908; + GL_LUMINANCE = $1909; + GL_LUMINANCE_ALPHA = $190A; + + // PixelMap + // GL_PIXEL_MAP_I_TO_I + // GL_PIXEL_MAP_S_TO_S + // GL_PIXEL_MAP_I_TO_R + // GL_PIXEL_MAP_I_TO_G + // GL_PIXEL_MAP_I_TO_B + // GL_PIXEL_MAP_I_TO_A + // GL_PIXEL_MAP_R_TO_R + // GL_PIXEL_MAP_G_TO_G + // GL_PIXEL_MAP_B_TO_B + // GL_PIXEL_MAP_A_TO_A + + // PixelStore + // GL_UNPACK_SWAP_BYTES + // GL_UNPACK_LSB_FIRST + // GL_UNPACK_ROW_LENGTH + // GL_UNPACK_SKIP_ROWS + // GL_UNPACK_SKIP_PIXELS + // GL_UNPACK_ALIGNMENT + // GL_PACK_SWAP_BYTES + // GL_PACK_LSB_FIRST + // GL_PACK_ROW_LENGTH + // GL_PACK_SKIP_ROWS + // GL_PACK_SKIP_PIXELS + // GL_PACK_ALIGNMENT + + // PixelTransfer + // GL_MAP_COLOR + // GL_MAP_STENCIL + // GL_INDEX_SHIFT + // GL_INDEX_OFFSET + // GL_RED_SCALE + // GL_RED_BIAS + // GL_GREEN_SCALE + // GL_GREEN_BIAS + // GL_BLUE_SCALE + // GL_BLUE_BIAS + // GL_ALPHA_SCALE + // GL_ALPHA_BIAS + // GL_DEPTH_SCALE + // GL_DEPTH_BIAS + + // PixelType + GL_BITMAP = $1A00; + // GL_BYTE + // GL_UNSIGNED_BYTE + // GL_SHORT + // GL_UNSIGNED_SHORT + // GL_INT + // GL_UNSIGNED_INT + // GL_FLOAT + + // PolygonMode + GL_POINT = $1B00; + GL_LINE = $1B01; + GL_FILL = $1B02; + + // ReadBufferMode + // GL_FRONT_LEFT + // GL_FRONT_RIGHT + // GL_BACK_LEFT + // GL_BACK_RIGHT + // GL_FRONT + // GL_BACK + // GL_LEFT + // GL_RIGHT + // GL_AUX0 + // GL_AUX1 + // GL_AUX2 + // GL_AUX3 + + // RenderingMode + GL_RENDER = $1C00; + GL_FEEDBACK = $1C01; + GL_SELECT = $1C02; + + // ShadingModel + GL_FLAT = $1D00; + GL_SMOOTH = $1D01; + + // StencilFunction + // GL_NEVER + // GL_LESS + // GL_EQUAL + // GL_LEQUAL + // GL_GREATER + // GL_NOTEQUAL + // GL_GEQUAL + // GL_ALWAYS + + // StencilOp + // GL_ZERO + GL_KEEP = $1E00; + GL_REPLACE = $1E01; + GL_INCR = $1E02; + GL_DECR = $1E03; + // GL_INVERT + + // StringName + GL_VENDOR = $1F00; + GL_RENDERER = $1F01; + GL_VERSION = $1F02; + GL_EXTENSIONS = $1F03; + + // TextureCoordName + GL_S = $2000; + GL_T = $2001; + GL_R = $2002; + GL_Q = $2003; + + // TexCoordPointerType + // GL_SHORT + // GL_INT + // GL_FLOAT + // GL_DOUBLE + + // TextureEnvMode + GL_MODULATE = $2100; + GL_DECAL = $2101; + // GL_BLEND + // GL_REPLACE + + // TextureEnvParameter + GL_TEXTURE_ENV_MODE = $2200; + GL_TEXTURE_ENV_COLOR = $2201; + + // TextureEnvTarget + GL_TEXTURE_ENV = $2300; + + // TextureGenMode + GL_EYE_LINEAR = $2400; + GL_OBJECT_LINEAR = $2401; + GL_SPHERE_MAP = $2402; + + // TextureGenParameter + GL_TEXTURE_GEN_MODE = $2500; + GL_OBJECT_PLANE = $2501; + GL_EYE_PLANE = $2502; + + // TextureMagFilter + GL_NEAREST = $2600; + GL_LINEAR = $2601; + + // TextureMinFilter + // GL_NEAREST + // GL_LINEAR + GL_NEAREST_MIPMAP_NEAREST = $2700; + GL_LINEAR_MIPMAP_NEAREST = $2701; + GL_NEAREST_MIPMAP_LINEAR = $2702; + GL_LINEAR_MIPMAP_LINEAR = $2703; + + // TextureParameterName + GL_TEXTURE_MAG_FILTER = $2800; + GL_TEXTURE_MIN_FILTER = $2801; + GL_TEXTURE_WRAP_S = $2802; + GL_TEXTURE_WRAP_T = $2803; + // GL_TEXTURE_BORDER_COLOR + // GL_TEXTURE_PRIORITY + + // TextureTarget + // GL_TEXTURE_1D + // GL_TEXTURE_2D + // GL_PROXY_TEXTURE_1D + // GL_PROXY_TEXTURE_2D + + // TextureWrapMode + GL_CLAMP = $2900; + GL_REPEAT = $2901; + + // VertexPointerType + // GL_SHORT + // GL_INT + // GL_FLOAT + // GL_DOUBLE + + // ClientAttribMask + GL_CLIENT_PIXEL_STORE_BIT = $00000001; + GL_CLIENT_VERTEX_ARRAY_BIT = $00000002; + GL_CLIENT_ALL_ATTRIB_BITS = $FFFFFFFF; + + // polygon_offset + GL_POLYGON_OFFSET_FACTOR = $8038; + GL_POLYGON_OFFSET_UNITS = $2A00; + GL_POLYGON_OFFSET_POINT = $2A01; + GL_POLYGON_OFFSET_LINE = $2A02; + GL_POLYGON_OFFSET_FILL = $8037; + + // texture + GL_ALPHA4 = $803B; + GL_ALPHA8 = $803C; + GL_ALPHA12 = $803D; + GL_ALPHA16 = $803E; + GL_LUMINANCE4 = $803F; + GL_LUMINANCE8 = $8040; + GL_LUMINANCE12 = $8041; + GL_LUMINANCE16 = $8042; + GL_LUMINANCE4_ALPHA4 = $8043; + GL_LUMINANCE6_ALPHA2 = $8044; + GL_LUMINANCE8_ALPHA8 = $8045; + GL_LUMINANCE12_ALPHA4 = $8046; + GL_LUMINANCE12_ALPHA12 = $8047; + GL_LUMINANCE16_ALPHA16 = $8048; + GL_INTENSITY = $8049; + GL_INTENSITY4 = $804A; + GL_INTENSITY8 = $804B; + GL_INTENSITY12 = $804C; + GL_INTENSITY16 = $804D; + GL_R3_G3_B2 = $2A10; + GL_RGB4 = $804F; + GL_RGB5 = $8050; + GL_RGB8 = $8051; + GL_RGB10 = $8052; + GL_RGB12 = $8053; + GL_RGB16 = $8054; + GL_RGBA2 = $8055; + GL_RGBA4 = $8056; + GL_RGB5_A1 = $8057; + GL_RGBA8 = $8058; + GL_RGB10_A2 = $8059; + GL_RGBA12 = $805A; + GL_RGBA16 = $805B; + GL_TEXTURE_RED_SIZE = $805C; + GL_TEXTURE_GREEN_SIZE = $805D; + GL_TEXTURE_BLUE_SIZE = $805E; + GL_TEXTURE_ALPHA_SIZE = $805F; + GL_TEXTURE_LUMINANCE_SIZE = $8060; + GL_TEXTURE_INTENSITY_SIZE = $8061; + GL_PROXY_TEXTURE_1D = $8063; + GL_PROXY_TEXTURE_2D = $8064; + + // texture_object + GL_TEXTURE_PRIORITY = $8066; + GL_TEXTURE_RESIDENT = $8067; + GL_TEXTURE_BINDING_1D = $8068; + GL_TEXTURE_BINDING_2D = $8069; + + // vertex_array + GL_VERTEX_ARRAY = $8074; + GL_NORMAL_ARRAY = $8075; + GL_COLOR_ARRAY = $8076; + GL_INDEX_ARRAY = $8077; + GL_TEXTURE_COORD_ARRAY = $8078; + GL_EDGE_FLAG_ARRAY = $8079; + GL_VERTEX_ARRAY_SIZE = $807A; + GL_VERTEX_ARRAY_TYPE = $807B; + GL_VERTEX_ARRAY_STRIDE = $807C; + GL_NORMAL_ARRAY_TYPE = $807E; + GL_NORMAL_ARRAY_STRIDE = $807F; + GL_COLOR_ARRAY_SIZE = $8081; + GL_COLOR_ARRAY_TYPE = $8082; + GL_COLOR_ARRAY_STRIDE = $8083; + GL_INDEX_ARRAY_TYPE = $8085; + GL_INDEX_ARRAY_STRIDE = $8086; + GL_TEXTURE_COORD_ARRAY_SIZE = $8088; + GL_TEXTURE_COORD_ARRAY_TYPE = $8089; + GL_TEXTURE_COORD_ARRAY_STRIDE = $808A; + GL_EDGE_FLAG_ARRAY_STRIDE = $808C; + GL_VERTEX_ARRAY_POINTER = $808E; + GL_NORMAL_ARRAY_POINTER = $808F; + GL_COLOR_ARRAY_POINTER = $8090; + GL_INDEX_ARRAY_POINTER = $8091; + GL_TEXTURE_COORD_ARRAY_POINTER = $8092; + GL_EDGE_FLAG_ARRAY_POINTER = $8093; + GL_V2F = $2A20; + GL_V3F = $2A21; + GL_C4UB_V2F = $2A22; + GL_C4UB_V3F = $2A23; + GL_C3F_V3F = $2A24; + GL_N3F_V3F = $2A25; + GL_C4F_N3F_V3F = $2A26; + GL_T2F_V3F = $2A27; + GL_T4F_V4F = $2A28; + GL_T2F_C4UB_V3F = $2A29; + GL_T2F_C3F_V3F = $2A2A; + GL_T2F_N3F_V3F = $2A2B; + GL_T2F_C4F_N3F_V3F = $2A2C; + GL_T4F_C4F_N3F_V4F = $2A2D; + + // Extensions + GL_EXT_vertex_array = 1; + GL_WIN_swap_hint = 1; + GL_EXT_bgra = 1; + GL_EXT_paletted_texture = 1; + + // EXT_vertex_array + GL_VERTEX_ARRAY_EXT = $8074; + GL_NORMAL_ARRAY_EXT = $8075; + GL_COLOR_ARRAY_EXT = $8076; + GL_INDEX_ARRAY_EXT = $8077; + GL_TEXTURE_COORD_ARRAY_EXT = $8078; + GL_EDGE_FLAG_ARRAY_EXT = $8079; + GL_VERTEX_ARRAY_SIZE_EXT = $807A; + GL_VERTEX_ARRAY_TYPE_EXT = $807B; + GL_VERTEX_ARRAY_STRIDE_EXT = $807C; + GL_VERTEX_ARRAY_COUNT_EXT = $807D; + GL_NORMAL_ARRAY_TYPE_EXT = $807E; + GL_NORMAL_ARRAY_STRIDE_EXT = $807F; + GL_NORMAL_ARRAY_COUNT_EXT = $8080; + GL_COLOR_ARRAY_SIZE_EXT = $8081; + GL_COLOR_ARRAY_TYPE_EXT = $8082; + GL_COLOR_ARRAY_STRIDE_EXT = $8083; + GL_COLOR_ARRAY_COUNT_EXT = $8084; + GL_INDEX_ARRAY_TYPE_EXT = $8085; + GL_INDEX_ARRAY_STRIDE_EXT = $8086; + GL_INDEX_ARRAY_COUNT_EXT = $8087; + GL_TEXTURE_COORD_ARRAY_SIZE_EXT = $8088; + GL_TEXTURE_COORD_ARRAY_TYPE_EXT = $8089; + GL_TEXTURE_COORD_ARRAY_STRIDE_EXT = $808A; + GL_TEXTURE_COORD_ARRAY_COUNT_EXT = $808B; + GL_EDGE_FLAG_ARRAY_STRIDE_EXT = $808C; + GL_EDGE_FLAG_ARRAY_COUNT_EXT = $808D; + GL_VERTEX_ARRAY_POINTER_EXT = $808E; + GL_NORMAL_ARRAY_POINTER_EXT = $808F; + GL_COLOR_ARRAY_POINTER_EXT = $8090; + GL_INDEX_ARRAY_POINTER_EXT = $8091; + GL_TEXTURE_COORD_ARRAY_POINTER_EXT = $8092; + GL_EDGE_FLAG_ARRAY_POINTER_EXT = $8093; + GL_DOUBLE_EXT = GL_DOUBLE; + + // EXT_bgra + GL_BGR_EXT = $80E0; + GL_BGRA_EXT = $80E1; + + // EXT_paletted_texture + + // These must match the GL_COLOR_TABLE_*_SGI enumerants + GL_COLOR_TABLE_FORMAT_EXT = $80D8; + GL_COLOR_TABLE_WIDTH_EXT = $80D9; + GL_COLOR_TABLE_RED_SIZE_EXT = $80DA; + GL_COLOR_TABLE_GREEN_SIZE_EXT = $80DB; + GL_COLOR_TABLE_BLUE_SIZE_EXT = $80DC; + GL_COLOR_TABLE_ALPHA_SIZE_EXT = $80DD; + GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = $80DE; + GL_COLOR_TABLE_INTENSITY_SIZE_EXT = $80DF; + + GL_COLOR_INDEX1_EXT = $80E2; + GL_COLOR_INDEX2_EXT = $80E3; + GL_COLOR_INDEX4_EXT = $80E4; + GL_COLOR_INDEX8_EXT = $80E5; + GL_COLOR_INDEX12_EXT = $80E6; + GL_COLOR_INDEX16_EXT = $80E7; + + // For compatibility with OpenGL v1.0 + GL_LOGIC_OP = GL_INDEX_LOGIC_OP; + GL_TEXTURE_COMPONENTS = GL_TEXTURE_INTERNAL_FORMAT; + +{******************************************************************************} + +var + glAccum: procedure(op: GLenum; value: GLfloat); stdcall; + glAlphaFunc: procedure(func: GLenum; ref: GLclampf); stdcall; + glAreTexturesResident: function (n: GLsizei; const textures: PGLuint; residences: PGLboolean): GLboolean; stdcall; + glArrayElement: procedure(i: GLint); stdcall; + glBegin: procedure(mode: GLenum); stdcall; + glBindTexture: procedure(target: GLenum; texture: GLuint); stdcall; + glBitmap: procedure (width, height: GLsizei; xorig, yorig: GLfloat; xmove, ymove: GLfloat; const bitmap: PGLubyte); stdcall; + glBlendFunc: procedure(sfactor, dfactor: GLenum); stdcall; + glCallList: procedure(list: GLuint); stdcall; + glCallLists: procedure(n: GLsizei; atype: GLenum; const lists: Pointer); stdcall; + glClear: procedure(mask: GLbitfield); stdcall; + glClearAccum: procedure(red, green, blue, alpha: GLfloat); stdcall; + glClearColor: procedure(red, green, blue, alpha: GLclampf); stdcall; + glClearDepth: procedure(depth: GLclampd); stdcall; + glClearIndex: procedure(c: GLfloat); stdcall; + glClearStencil: procedure(s: GLint); stdcall; + glClipPlane: procedure(plane: GLenum; const equation: PGLdouble); stdcall; + glColor3b: procedure(red, green, blue: GLbyte); stdcall; + glColor3bv: procedure(const v: PGLbyte); stdcall; + glColor3d: procedure(red, green, blue: GLdouble); stdcall; + glColor3dv: procedure(const v: PGLdouble); stdcall; + glColor3f: procedure(red, green, blue: GLfloat); stdcall; + glColor3fv: procedure(const v: PGLfloat); stdcall; + glColor3i: procedure(red, green, blue: GLint); stdcall; + glColor3iv: procedure(const v: PGLint); stdcall; + glColor3s: procedure(red, green, blue: GLshort); stdcall; + glColor3sv: procedure(const v: PGLshort); stdcall; + glColor3ub: procedure(red, green, blue: GLubyte); stdcall; + glColor3ubv: procedure(const v: PGLubyte); stdcall; + glColor3ui: procedure(red, green, blue: GLuint); stdcall; + glColor3uiv: procedure(const v: PGLuint); stdcall; + glColor3us: procedure(red, green, blue: GLushort); stdcall; + glColor3usv: procedure(const v: PGLushort); stdcall; + glColor4b: procedure(red, green, blue, alpha: GLbyte); stdcall; + glColor4bv: procedure(const v: PGLbyte); stdcall; + glColor4d: procedure(red, green, blue, alpha: GLdouble); stdcall; + glColor4dv: procedure(const v: PGLdouble); stdcall; + glColor4f: procedure(red, green, blue, alpha: GLfloat); stdcall; + glColor4fv: procedure(const v: PGLfloat); stdcall; + glColor4i: procedure(red, green, blue, alpha: GLint); stdcall; + glColor4iv: procedure(const v: PGLint); stdcall; + glColor4s: procedure(red, green, blue, alpha: GLshort); stdcall; + glColor4sv: procedure(const v: PGLshort); stdcall; + glColor4ub: procedure(red, green, blue, alpha: GLubyte); stdcall; + glColor4ubv: procedure(const v: PGLubyte); stdcall; + glColor4ui: procedure(red, green, blue, alpha: GLuint); stdcall; + glColor4uiv: procedure(const v: PGLuint); stdcall; + glColor4us: procedure(red, green, blue, alpha: GLushort); stdcall; + glColor4usv: procedure(const v: PGLushort); stdcall; + glColorMask: procedure(red, green, blue, alpha: GLboolean); stdcall; + glColorMaterial: procedure(face, mode: GLenum); stdcall; + glColorPointer: procedure(size: GLint; atype: GLenum; stride: GLsizei; const pointer: Pointer); stdcall; + glCopyPixels: procedure(x, y: GLint; width, height: GLsizei; atype: GLenum); stdcall; + glCopyTexImage1D: procedure (target: GLenum; level: GLint; internalFormat: GLenum; x, y: GLint; width: GLsizei; border: GLint); stdcall; + glCopyTexImage2D: procedure(target: GLenum; level: GLint; internalFormat: GLenum; x, y: GLint; width, height: GLsizei; border: GLint); stdcall; + glCopyTexSubImage1D: procedure(target: GLenum; level, xoffset, x, y: GLint; width: GLsizei); stdcall; + glCopyTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, x, y: GLint; width, height: GLsizei); stdcall; + glCullFace: procedure(mode: GLenum); stdcall; + glDeleteLists: procedure(list: GLuint; range: GLsizei); stdcall; + glDeleteTextures: procedure(n: GLsizei; const textures: PGLuint); stdcall; + glDepthFunc: procedure(func: GLenum); stdcall; + glDepthMask: procedure(flag: GLboolean); stdcall; + glDepthRange: procedure(zNear, zFar: GLclampd); stdcall; + glDisable: procedure(cap: GLenum); stdcall; + glDisableClientState: procedure(aarray: GLenum); stdcall; + glDrawArrays: procedure(mode: GLenum; first: GLint; count: GLsizei); stdcall; + glDrawBuffer: procedure(mode: GLenum); stdcall; + glDrawElements: procedure(mode: GLenum; count: GLsizei; atype: GLenum; const indices: Pointer); stdcall; + glDrawPixels: procedure(width, height: GLsizei; format, atype: GLenum; const pixels: Pointer); stdcall; + glEdgeFlag: procedure(flag: GLboolean); stdcall; + glEdgeFlagPointer: procedure(stride: GLsizei; const pointer: Pointer); stdcall; + glEdgeFlagv: procedure(const flag: PGLboolean); stdcall; + glEnable: procedure(cap: GLenum); stdcall; + glEnableClientState: procedure(aarray: GLenum); stdcall; + glEnd: procedure; stdcall; + glEndList: procedure; stdcall; + glEvalCoord1d: procedure(u: GLdouble); stdcall; + glEvalCoord1dv: procedure(const u: PGLdouble); stdcall; + glEvalCoord1f: procedure(u: GLfloat); stdcall; + glEvalCoord1fv: procedure(const u: PGLfloat); stdcall; + glEvalCoord2d: procedure(u, v: GLdouble); stdcall; + glEvalCoord2dv: procedure(const u: PGLdouble); stdcall; + glEvalCoord2f: procedure(u, v: GLfloat); stdcall; + glEvalCoord2fv: procedure(const u: PGLfloat); stdcall; + glEvalMesh1: procedure(mode: GLenum; i1, i2: GLint); stdcall; + glEvalMesh2: procedure(mode: GLenum; i1, i2, j1, j2: GLint); stdcall; + glEvalPoint1: procedure(i: GLint); stdcall; + glEvalPoint2: procedure(i, j: GLint); stdcall; + glFeedbackBuffer: procedure(size: GLsizei; atype: GLenum; buffer: PGLfloat); stdcall; + glFinish: procedure; stdcall; + glFlush: procedure; stdcall; + glFogf: procedure(pname: GLenum; param: GLfloat); stdcall; + glFogfv: procedure(pname: GLenum; const params: PGLfloat); stdcall; + glFogi: procedure(pname: GLenum; param: GLint); stdcall; + glFogiv: procedure(pname: GLenum; const params: PGLint); stdcall; + glFrontFace: procedure(mode: GLenum); stdcall; + glFrustum: procedure(left, right, bottom, top, zNear, zFar: GLdouble); stdcall; + glGenLists: function(range: GLsizei): GLuint; stdcall; + glGenTextures: procedure(n: GLsizei; textures: PGLuint); stdcall; + glGetBooleanv: procedure(pname: GLenum; params: PGLboolean); stdcall; + glGetClipPlane: procedure(plane: GLenum; equation: PGLdouble); stdcall; + glGetDoublev: procedure(pname: GLenum; params: PGLdouble); stdcall; + glGetError: function: GLenum; stdcall; + glGetFloatv: procedure(pname: GLenum; params: PGLfloat); stdcall; + glGetIntegerv: procedure(pname: GLenum; params: PGLint); stdcall; + glGetLightfv: procedure(light, pname: GLenum; params: PGLfloat); stdcall; + glGetLightiv: procedure(light, pname: GLenum; params: PGLint); stdcall; + glGetMapdv: procedure(target, query: GLenum; v: PGLdouble); stdcall; + glGetMapfv: procedure(target, query: GLenum; v: PGLfloat); stdcall; + glGetMapiv: procedure(target, query: GLenum; v: GLint); stdcall; + glGetMaterialfv: procedure(face, pname: GLenum; params: PGLfloat); stdcall; + glGetMaterialiv: procedure(face, pname: GLenum; params: GLint); stdcall; + glGetPixelMapfv: procedure(map: GLenum; values: PGLfloat); stdcall; + glGetPixelMapuiv: procedure(map: GLenum; values: PGLuint); stdcall; + glGetPixelMapusv: procedure(map: GLenum; values: PGLushort); stdcall; + glGetPointerv: procedure(pname: GLenum; params: Pointer); stdcall; + glGetPolygonStipple: procedure(mask: PGLubyte); stdcall; + glGetString: function(name: GLenum): PGLubyte; stdcall; + glGetTexEnvfv: procedure(target, pname: GLenum; params: PGLfloat); stdcall; + glGetTexEnviv: procedure(target, pname: GLenum; params: PGLint); stdcall; + glGetTexGendv: procedure(coord, pname: GLenum; params: PGLdouble); stdcall; + glGetTexGenfv: procedure(coord, pname: GLenum; params: PGLfloat); stdcall; + glGetTexGeniv: procedure(coord, pname: GLenum; params: PGLint); stdcall; + glGetTexImage: procedure(target: GLenum; level: GLint; format: GLenum; atype: GLenum; pixels: Pointer); stdcall; + glGetTexLevelParameterfv: procedure(target: GLenum; level: GLint; pname: GLenum; params: Pointer); stdcall; + glGetTexLevelParameteriv: procedure(target: GLenum; level: GLint; pname: GLenum; params: PGLint); stdcall; + glGetTexParameterfv: procedure(target, pname: GLenum; params: PGLfloat); stdcall; + glGetTexParameteriv: procedure(target, pname: GLenum; params: PGLint); stdcall; + glHint: procedure(target, mode: GLenum); stdcall; + glIndexMask: procedure(mask: GLuint); stdcall; + glIndexPointer: procedure(atype: GLenum; stride: GLsizei; const pointer: Pointer); stdcall; + glIndexd: procedure(c: GLdouble); stdcall; + glIndexdv: procedure(const c: PGLdouble); stdcall; + glIndexf: procedure(c: GLfloat); stdcall; + glIndexfv: procedure(const c: PGLfloat); stdcall; + glIndexi: procedure(c: GLint); stdcall; + glIndexiv: procedure(const c: PGLint); stdcall; + glIndexs: procedure(c: GLshort); stdcall; + glIndexsv: procedure(const c: PGLshort); stdcall; + glIndexub: procedure(c: GLubyte); stdcall; + glIndexubv: procedure(const c: PGLubyte); stdcall; + glInitNames: procedure; stdcall; + glInterleavedArrays: procedure(format: GLenum; stride: GLsizei; const pointer: Pointer); stdcall; + glIsEnabled: function(cap: GLenum): GLboolean; stdcall; + glIsList: function(list: GLuint): GLboolean; stdcall; + glIsTexture: function(texture: GLuint): GLboolean; stdcall; + glLightModelf: procedure(pname: GLenum; param: GLfloat); stdcall; + glLightModelfv: procedure(pname: GLenum; const params: PGLfloat); stdcall; + glLightModeli: procedure(pname: GLenum; param: GLint); stdcall; + glLightModeliv: procedure(pname: GLenum; const params: PGLint); stdcall; + glLightf: procedure(light, pname: GLenum; param: GLfloat); stdcall; + glLightfv: procedure(light, pname: GLenum; const params: PGLfloat); stdcall; + glLighti: procedure(light, pname: GLenum; param: GLint); stdcall; + glLightiv: procedure(light, pname: GLenum; const params: GLint); stdcall; + glLineStipple: procedure(factor: GLint; pattern: GLushort); stdcall; + glLineWidth: procedure(width: GLfloat); stdcall; + glListBase: procedure(base: GLuint); stdcall; + glLoadIdentity: procedure; stdcall; + glLoadMatrixd: procedure(const m: PGLdouble); stdcall; + glLoadMatrixf: procedure(const m: PGLfloat); stdcall; + glLoadName: procedure(name: GLuint); stdcall; + glLogicOp: procedure(opcode: GLenum); stdcall; + glMap1d: procedure(target: GLenum; u1, u2: GLdouble; stride, order: GLint; const points: PGLdouble); stdcall; + glMap1f: procedure(target: GLenum; u1, u2: GLfloat; stride, order: GLint; const points: PGLfloat); stdcall; + glMap2d: procedure(target: GLenum; u1, u2: GLdouble; ustride, uorder: GLint; v1, v2: GLdouble; vstride, vorder: GLint; const points: PGLdouble); stdcall; + glMap2f: procedure(target: GLenum; u1, u2: GLfloat; ustride, uorder: GLint; v1, v2: GLfloat; vstride, vorder: GLint; const points: PGLfloat); stdcall; + glMapGrid1d: procedure(un: GLint; u1, u2: GLdouble); stdcall; + glMapGrid1f: procedure(un: GLint; u1, u2: GLfloat); stdcall; + glMapGrid2d: procedure(un: GLint; u1, u2: GLdouble; vn: GLint; v1, v2: GLdouble); stdcall; + glMapGrid2f: procedure(un: GLint; u1, u2: GLfloat; vn: GLint; v1, v2: GLfloat); stdcall; + glMaterialf: procedure(face, pname: GLenum; param: GLfloat); stdcall; + glMaterialfv: procedure(face, pname: GLenum; const params: PGLfloat); stdcall; + glMateriali: procedure(face, pname: GLenum; param: GLint); stdcall; + glMaterialiv: procedure(face, pname: GLenum; const params: PGLint); stdcall; + glMatrixMode: procedure(mode: GLenum); stdcall; + glMultMatrixd: procedure(const m: PGLdouble); stdcall; + glMultMatrixf: procedure(const m: PGLfloat); stdcall; + glNewList: procedure(list: GLuint; mode: GLenum); stdcall; + glNormal3b: procedure(nx, ny, nz: GLbyte); stdcall; + glNormal3bv: procedure(const v: PGLbyte); stdcall; + glNormal3d: procedure(nx, ny, nz: GLdouble); stdcall; + glNormal3dv: procedure(const v: PGLdouble); stdcall; + glNormal3f: procedure(nx, ny, nz: GLfloat); stdcall; + glNormal3fv: procedure(const v: PGLfloat); stdcall; + glNormal3i: procedure(nx, ny, nz: GLint); stdcall; + glNormal3iv: procedure(const v: PGLint); stdcall; + glNormal3s: procedure(nx, ny, nz: GLshort); stdcall; + glNormal3sv: procedure(const v: PGLshort); stdcall; + glNormalPointer: procedure(atype: GLenum; stride: GLsizei; const pointer: Pointer); stdcall; + glOrtho: procedure(left, right, bottom, top, zNear, zFar: GLdouble); stdcall; + glPassThrough: procedure(token: GLfloat); stdcall; + glPixelMapfv: procedure(map: GLenum; mapsize: GLsizei; const values: PGLfloat); stdcall; + glPixelMapuiv: procedure(map: GLenum; mapsize: GLsizei; const values: PGLuint); stdcall; + glPixelMapusv: procedure(map: GLenum; mapsize: GLsizei; const values: PGLushort); stdcall; + glPixelStoref: procedure(pname: GLenum; param: GLfloat); stdcall; + glPixelStorei: procedure(pname: GLenum; param: GLint); stdcall; + glPixelTransferf: procedure(pname: GLenum; param: GLfloat); stdcall; + glPixelTransferi: procedure(pname: GLenum; param: GLint); stdcall; + glPixelZoom: procedure(xfactor, yfactor: GLfloat); stdcall; + glPointSize: procedure(size: GLfloat); stdcall; + glPolygonMode: procedure(face, mode: GLenum); stdcall; + glPolygonOffset: procedure(factor, units: GLfloat); stdcall; + glPolygonStipple: procedure(const mask: PGLubyte); stdcall; + glPopAttrib: procedure; stdcall; + glPopClientAttrib: procedure; stdcall; + glPopMatrix: procedure; stdcall; + glPopName: procedure; stdcall; + glPrioritizeTextures: procedure(n: GLsizei; const textures: PGLuint; const priorities: PGLclampf); stdcall; + glPushAttrib: procedure(mask: GLbitfield); stdcall; + glPushClientAttrib: procedure(mask: GLbitfield); stdcall; + glPushMatrix: procedure; stdcall; + glPushName: procedure(name: GLuint); stdcall; + glRasterPos2d: procedure(x, y: GLdouble); stdcall; + glRasterPos2dv: procedure(const v: PGLdouble); stdcall; + glRasterPos2f: procedure(x, y: GLfloat); stdcall; + glRasterPos2fv: procedure(const v: PGLfloat); stdcall; + glRasterPos2i: procedure(x, y: GLint); stdcall; + glRasterPos2iv: procedure(const v: PGLint); stdcall; + glRasterPos2s: procedure(x, y: GLshort); stdcall; + glRasterPos2sv: procedure(const v: PGLshort); stdcall; + glRasterPos3d: procedure(x, y, z: GLdouble); stdcall; + glRasterPos3dv: procedure(const v: PGLdouble); stdcall; + glRasterPos3f: procedure(x, y, z: GLfloat); stdcall; + glRasterPos3fv: procedure(const v: PGLfloat); stdcall; + glRasterPos3i: procedure(x, y, z: GLint); stdcall; + glRasterPos3iv: procedure(const v: PGLint); stdcall; + glRasterPos3s: procedure(x, y, z: GLshort); stdcall; + glRasterPos3sv: procedure(const v: PGLshort); stdcall; + glRasterPos4d: procedure(x, y, z, w: GLdouble); stdcall; + glRasterPos4dv: procedure(const v: PGLdouble); stdcall; + glRasterPos4f: procedure(x, y, z, w: GLfloat); stdcall; + glRasterPos4fv: procedure(const v: PGLfloat); stdcall; + glRasterPos4i: procedure(x, y, z, w: GLint); stdcall; + glRasterPos4iv: procedure(const v: PGLint); stdcall; + glRasterPos4s: procedure(x, y, z, w: GLshort); stdcall; + glRasterPos4sv: procedure(const v: PGLshort); stdcall; + glReadBuffer: procedure(mode: GLenum); stdcall; + glReadPixels: procedure(x, y: GLint; width, height: GLsizei; format, atype: GLenum; pixels: Pointer); stdcall; + glRectd: procedure(x1, y1, x2, y2: GLdouble); stdcall; + glRectdv: procedure(const v1: PGLdouble; const v2: PGLdouble); stdcall; + glRectf: procedure(x1, y1, x2, y2: GLfloat); stdcall; + glRectfv: procedure(const v1: PGLfloat; const v2: PGLfloat); stdcall; + glRecti: procedure(x1, y1, x2, y2: GLint); stdcall; + glRectiv: procedure(const v1: PGLint; const v2: PGLint); stdcall; + glRects: procedure(x1, y1, x2, y2: GLshort); stdcall; + glRectsv: procedure(const v1: PGLshort; const v2: PGLshort); stdcall; + glRenderMode: function(mode: GLint): GLint; stdcall; + glRotated: procedure(angle, x, y, z: GLdouble); stdcall; + glRotatef: procedure(angle, x, y, z: GLfloat); stdcall; + glScaled: procedure(x, y, z: GLdouble); stdcall; + glScalef: procedure(x, y, z: GLfloat); stdcall; + glScissor: procedure(x, y: GLint; width, height: GLsizei); stdcall; + glSelectBuffer: procedure(size: GLsizei; buffer: PGLuint); stdcall; + glShadeModel: procedure(mode: GLenum); stdcall; + glStencilFunc: procedure(func: GLenum; ref: GLint; mask: GLuint); stdcall; + glStencilMask: procedure(mask: GLuint); stdcall; + glStencilOp: procedure(fail, zfail, zpass: GLenum); stdcall; + glTexCoord1d: procedure(s: GLdouble); stdcall; + glTexCoord1dv: procedure(const v: PGLdouble); stdcall; + glTexCoord1f: procedure(s: GLfloat); stdcall; + glTexCoord1fv: procedure(const v: PGLfloat); stdcall; + glTexCoord1i: procedure(s: GLint); stdcall; + glTexCoord1iv: procedure(const v: PGLint); stdcall; + glTexCoord1s: procedure(s: GLshort); stdcall; + glTexCoord1sv: procedure(const v: PGLshort); stdcall; + glTexCoord2d: procedure(s, t: GLdouble); stdcall; + glTexCoord2dv: procedure(const v: PGLdouble); stdcall; + glTexCoord2f: procedure(s, t: GLfloat); stdcall; + glTexCoord2fv: procedure(const v: PGLfloat); stdcall; + glTexCoord2i: procedure(s, t: GLint); stdcall; + glTexCoord2iv: procedure(const v: PGLint); stdcall; + glTexCoord2s: procedure(s, t: GLshort); stdcall; + glTexCoord2sv: procedure(const v: PGLshort); stdcall; + glTexCoord3d: procedure(s, t, r: GLdouble); stdcall; + glTexCoord3dv: procedure(const v: PGLdouble); stdcall; + glTexCoord3f: procedure(s, t, r: GLfloat); stdcall; + glTexCoord3fv: procedure(const v: PGLfloat); stdcall; + glTexCoord3i: procedure(s, t, r: GLint); stdcall; + glTexCoord3iv: procedure(const v: PGLint); stdcall; + glTexCoord3s: procedure(s, t, r: GLshort); stdcall; + glTexCoord3sv: procedure(const v: PGLshort); stdcall; + glTexCoord4d: procedure(s, t, r, q: GLdouble); stdcall; + glTexCoord4dv: procedure(const v: PGLdouble); stdcall; + glTexCoord4f: procedure(s, t, r, q: GLfloat); stdcall; + glTexCoord4fv: procedure(const v: PGLfloat); stdcall; + glTexCoord4i: procedure(s, t, r, q: GLint); stdcall; + glTexCoord4iv: procedure(const v: PGLint); stdcall; + glTexCoord4s: procedure(s, t, r, q: GLshort); stdcall; + glTexCoord4sv: procedure(const v: PGLshort); stdcall; + glTexCoordPointer: procedure(size: GLint; atype: GLenum; stride: GLsizei; const pointer: Pointer); stdcall; + glTexEnvf: procedure(target: GLenum; pname: GLenum; param: GLfloat); stdcall; + glTexEnvfv: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); stdcall; + glTexEnvi: procedure(target: GLenum; pname: GLenum; param: GLint); stdcall; + glTexEnviv: procedure(target: GLenum; pname: GLenum; const params: PGLint); stdcall; + glTexGend: procedure(coord: GLenum; pname: GLenum; param: GLdouble); stdcall; + glTexGendv: procedure(coord: GLenum; pname: GLenum; const params: PGLdouble); stdcall; + glTexGenf: procedure(coord: GLenum; pname: GLenum; param: GLfloat); stdcall; + glTexGenfv: procedure(coord: GLenum; pname: GLenum; const params: PGLfloat); stdcall; + glTexGeni: procedure(coord: GLenum; pname: GLenum; param: GLint); stdcall; + glTexGeniv: procedure(coord: GLenum; pname: GLenum; const params: PGLint); stdcall; + glTexImage1D: procedure(target: GLenum; level, internalformat: GLint; width: GLsizei; border: GLint; format, atype: GLenum; const pixels: Pointer); stdcall; + glTexImage2D: procedure(target: GLenum; level, internalformat: GLint; width, height: GLsizei; border: GLint; format, atype: GLenum; const pixels: Pointer); stdcall; + glTexParameterf: procedure(target: GLenum; pname: GLenum; param: GLfloat); stdcall; + glTexParameterfv: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); stdcall; + glTexParameteri: procedure(target: GLenum; pname: GLenum; param: GLint); stdcall; + glTexParameteriv: procedure(target: GLenum; pname: GLenum; const params: PGLint); stdcall; + glTexSubImage1D: procedure(target: GLenum; level, xoffset: GLint; width: GLsizei; format, atype: GLenum; const pixels: Pointer); stdcall; + glTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset: GLint; width, height: GLsizei; format, atype: GLenum; const pixels: Pointer); stdcall; + glTranslated: procedure(x, y, z: GLdouble); stdcall; + glTranslatef: procedure(x, y, z: GLfloat); stdcall; + glVertex2d: procedure(x, y: GLdouble); stdcall; + glVertex2dv: procedure(const v: PGLdouble); stdcall; + glVertex2f: procedure(x, y: GLfloat); stdcall; + glVertex2fv: procedure(const v: PGLfloat); stdcall; + glVertex2i: procedure(x, y: GLint); stdcall; + glVertex2iv: procedure(const v: PGLint); stdcall; + glVertex2s: procedure(x, y: GLshort); stdcall; + glVertex2sv: procedure(const v: PGLshort); stdcall; + glVertex3d: procedure(x, y, z: GLdouble); stdcall; + glVertex3dv: procedure(const v: PGLdouble); stdcall; + glVertex3f: procedure(x, y, z: GLfloat); stdcall; + glVertex3fv: procedure(const v: PGLfloat); stdcall; + glVertex3i: procedure(x, y, z: GLint); stdcall; + glVertex3iv: procedure(const v: PGLint); stdcall; + glVertex3s: procedure(x, y, z: GLshort); stdcall; + glVertex3sv: procedure(const v: PGLshort); stdcall; + glVertex4d: procedure(x, y, z, w: GLdouble); stdcall; + glVertex4dv: procedure(const v: PGLdouble); stdcall; + glVertex4f: procedure(x, y, z, w: GLfloat); stdcall; + glVertex4fv: procedure(const v: PGLfloat); stdcall; + glVertex4i: procedure(x, y, z, w: GLint); stdcall; + glVertex4iv: procedure(const v: PGLint); stdcall; + glVertex4s: procedure(x, y, z, w: GLshort); stdcall; + glVertex4sv: procedure(const v: PGLshort); stdcall; + glVertexPointer: procedure(size: GLint; atype: GLenum; stride: GLsizei; const pointer: Pointer); stdcall; + glViewport: procedure(x, y: GLint; width, height: GLsizei); stdcall; + ChoosePixelFormat: function(DC: HDC; p2: PPixelFormatDescriptor): Integer; stdcall; + +type + // EXT_vertex_array + PFNGLARRAYELEMENTEXTPROC = procedure(i: GLint); stdcall; + PFNGLDRAWARRAYSEXTPROC = procedure(mode: GLenum; first: GLint; count: GLsizei); stdcall; + PFNGLVERTEXPOINTEREXTPROC = procedure(size: GLint; atype: GLenum; + stride, count: GLsizei; const pointer: Pointer); stdcall; + PFNGLNORMALPOINTEREXTPROC = procedure(atype: GLenum; stride, count: GLsizei; + const pointer: Pointer); stdcall; + PFNGLCOLORPOINTEREXTPROC = procedure(size: GLint; atype: GLenum; stride, count: GLsizei; + const pointer: Pointer); stdcall; + PFNGLINDEXPOINTEREXTPROC = procedure(atype: GLenum; stride, count: GLsizei; + const pointer: Pointer); stdcall; + PFNGLTEXCOORDPOINTEREXTPROC = procedure(size: GLint; atype: GLenum; + stride, count: GLsizei; const pointer: Pointer); stdcall; + PFNGLEDGEFLAGPOINTEREXTPROC = procedure(stride, count: GLsizei; + const pointer: PGLboolean); stdcall; + PFNGLGETPOINTERVEXTPROC = procedure(pname: GLenum; params: Pointer); stdcall; + PFNGLARRAYELEMENTARRAYEXTPROC = procedure(mode: GLenum; count: GLsizei; + const pi: Pointer); stdcall; + + // WIN_swap_hint + PFNGLADDSWAPHINTRECTWINPROC = procedure(x, y: GLint; width, height: GLsizei); stdcall; + + // EXT_paletted_texture + PFNGLCOLORTABLEEXTPROC = procedure(target, internalFormat: GLenum; width: GLsizei; + format, atype: GLenum; const data: Pointer); stdcall; + PFNGLCOLORSUBTABLEEXTPROC = procedure(target: GLenum; start, count: GLsizei; + format, atype: GLenum; const data: Pointer); stdcall; + PFNGLGETCOLORTABLEEXTPROC = procedure(target, format, atype: GLenum; data: Pointer); stdcall; + PFNGLGETCOLORTABLEPARAMETERIVEXTPROC = procedure(target, pname: GLenum; params: PGLint); stdcall; + PFNGLGETCOLORTABLEPARAMETERFVEXTPROC = procedure(target, pname: GLenum; params: PGLfloat); stdcall; + +procedure LoadOpenGL(const dll: String); +procedure FreeOpenGL; + +implementation + +var + hDLL: THandle; + +procedure FreeOpenGL; +begin + + @glAccum := nil; + @glAlphaFunc := nil; + @glAreTexturesResident := nil; + @glArrayElement := nil; + @glBegin := nil; + @glBindTexture := nil; + @glBitmap := nil; + @glBlendFunc := nil; + @glCallList := nil; + @glCallLists := nil; + @glClear := nil; + @glClearAccum := nil; + @glClearColor := nil; + @glClearDepth := nil; + @glClearIndex := nil; + @glClearStencil := nil; + @glClipPlane := nil; + @glColor3b := nil; + @glColor3bv := nil; + @glColor3d := nil; + @glColor3dv := nil; + @glColor3f := nil; + @glColor3fv := nil; + @glColor3i := nil; + @glColor3iv := nil; + @glColor3s := nil; + @glColor3sv := nil; + @glColor3ub := nil; + @glColor3ubv := nil; + @glColor3ui := nil; + @glColor3uiv := nil; + @glColor3us := nil; + @glColor3usv := nil; + @glColor4b := nil; + @glColor4bv := nil; + @glColor4d := nil; + @glColor4dv := nil; + @glColor4f := nil; + @glColor4fv := nil; + @glColor4i := nil; + @glColor4iv := nil; + @glColor4s := nil; + @glColor4sv := nil; + @glColor4ub := nil; + @glColor4ubv := nil; + @glColor4ui := nil; + @glColor4uiv := nil; + @glColor4us := nil; + @glColor4usv := nil; + @glColorMask := nil; + @glColorMaterial := nil; + @glColorPointer := nil; + @glCopyPixels := nil; + @glCopyTexImage1D := nil; + @glCopyTexImage2D := nil; + @glCopyTexSubImage1D := nil; + @glCopyTexSubImage2D := nil; + @glCullFace := nil; + @glDeleteLists := nil; + @glDeleteTextures := nil; + @glDepthFunc := nil; + @glDepthMask := nil; + @glDepthRange := nil; + @glDisable := nil; + @glDisableClientState := nil; + @glDrawArrays := nil; + @glDrawBuffer := nil; + @glDrawElements := nil; + @glDrawPixels := nil; + @glEdgeFlag := nil; + @glEdgeFlagPointer := nil; + @glEdgeFlagv := nil; + @glEnable := nil; + @glEnableClientState := nil; + @glEnd := nil; + @glEndList := nil; + @glEvalCoord1d := nil; + @glEvalCoord1dv := nil; + @glEvalCoord1f := nil; + @glEvalCoord1fv := nil; + @glEvalCoord2d := nil; + @glEvalCoord2dv := nil; + @glEvalCoord2f := nil; + @glEvalCoord2fv := nil; + @glEvalMesh1 := nil; + @glEvalMesh2 := nil; + @glEvalPoint1 := nil; + @glEvalPoint2 := nil; + @glFeedbackBuffer := nil; + @glFinish := nil; + @glFlush := nil; + @glFogf := nil; + @glFogfv := nil; + @glFogi := nil; + @glFogiv := nil; + @glFrontFace := nil; + @glFrustum := nil; + @glGenLists := nil; + @glGenTextures := nil; + @glGetBooleanv := nil; + @glGetClipPlane := nil; + @glGetDoublev := nil; + @glGetError := nil; + @glGetFloatv := nil; + @glGetIntegerv := nil; + @glGetLightfv := nil; + @glGetLightiv := nil; + @glGetMapdv := nil; + @glGetMapfv := nil; + @glGetMapiv := nil; + @glGetMaterialfv := nil; + @glGetMaterialiv := nil; + @glGetPixelMapfv := nil; + @glGetPixelMapuiv := nil; + @glGetPixelMapusv := nil; + @glGetPointerv := nil; + @glGetPolygonStipple := nil; + @glGetString := nil; + @glGetTexEnvfv := nil; + @glGetTexEnviv := nil; + @glGetTexGendv := nil; + @glGetTexGenfv := nil; + @glGetTexGeniv := nil; + @glGetTexImage := nil; + @glGetTexLevelParameterfv := nil; + @glGetTexLevelParameteriv := nil; + @glGetTexParameterfv := nil; + @glGetTexParameteriv := nil; + @glHint := nil; + @glIndexMask := nil; + @glIndexPointer := nil; + @glIndexd := nil; + @glIndexdv := nil; + @glIndexf := nil; + @glIndexfv := nil; + @glIndexi := nil; + @glIndexiv := nil; + @glIndexs := nil; + @glIndexsv := nil; + @glIndexub := nil; + @glIndexubv := nil; + @glInitNames := nil; + @glInterleavedArrays := nil; + @glIsEnabled := nil; + @glIsList := nil; + @glIsTexture := nil; + @glLightModelf := nil; + @glLightModelfv := nil; + @glLightModeli := nil; + @glLightModeliv := nil; + @glLightf := nil; + @glLightfv := nil; + @glLighti := nil; + @glLightiv := nil; + @glLineStipple := nil; + @glLineWidth := nil; + @glListBase := nil; + @glLoadIdentity := nil; + @glLoadMatrixd := nil; + @glLoadMatrixf := nil; + @glLoadName := nil; + @glLogicOp := nil; + @glMap1d := nil; + @glMap1f := nil; + @glMap2d := nil; + @glMap2f := nil; + @glMapGrid1d := nil; + @glMapGrid1f := nil; + @glMapGrid2d := nil; + @glMapGrid2f := nil; + @glMaterialf := nil; + @glMaterialfv := nil; + @glMateriali := nil; + @glMaterialiv := nil; + @glMatrixMode := nil; + @glMultMatrixd := nil; + @glMultMatrixf := nil; + @glNewList := nil; + @glNormal3b := nil; + @glNormal3bv := nil; + @glNormal3d := nil; + @glNormal3dv := nil; + @glNormal3f := nil; + @glNormal3fv := nil; + @glNormal3i := nil; + @glNormal3iv := nil; + @glNormal3s := nil; + @glNormal3sv := nil; + @glNormalPointer := nil; + @glOrtho := nil; + @glPassThrough := nil; + @glPixelMapfv := nil; + @glPixelMapuiv := nil; + @glPixelMapusv := nil; + @glPixelStoref := nil; + @glPixelStorei := nil; + @glPixelTransferf := nil; + @glPixelTransferi := nil; + @glPixelZoom := nil; + @glPointSize := nil; + @glPolygonMode := nil; + @glPolygonOffset := nil; + @glPolygonStipple := nil; + @glPopAttrib := nil; + @glPopClientAttrib := nil; + @glPopMatrix := nil; + @glPopName := nil; + @glPrioritizeTextures := nil; + @glPushAttrib := nil; + @glPushClientAttrib := nil; + @glPushMatrix := nil; + @glPushName := nil; + @glRasterPos2d := nil; + @glRasterPos2dv := nil; + @glRasterPos2f := nil; + @glRasterPos2fv := nil; + @glRasterPos2i := nil; + @glRasterPos2iv := nil; + @glRasterPos2s := nil; + @glRasterPos2sv := nil; + @glRasterPos3d := nil; + @glRasterPos3dv := nil; + @glRasterPos3f := nil; + @glRasterPos3fv := nil; + @glRasterPos3i := nil; + @glRasterPos3iv := nil; + @glRasterPos3s := nil; + @glRasterPos3sv := nil; + @glRasterPos4d := nil; + @glRasterPos4dv := nil; + @glRasterPos4f := nil; + @glRasterPos4fv := nil; + @glRasterPos4i := nil; + @glRasterPos4iv := nil; + @glRasterPos4s := nil; + @glRasterPos4sv := nil; + @glReadBuffer := nil; + @glReadPixels := nil; + @glRectd := nil; + @glRectdv := nil; + @glRectf := nil; + @glRectfv := nil; + @glRecti := nil; + @glRectiv := nil; + @glRects := nil; + @glRectsv := nil; + @glRenderMode := nil; + @glRotated := nil; + @glRotatef := nil; + @glScaled := nil; + @glScalef := nil; + @glScissor := nil; + @glSelectBuffer := nil; + @glShadeModel := nil; + @glStencilFunc := nil; + @glStencilMask := nil; + @glStencilOp := nil; + @glTexCoord1d := nil; + @glTexCoord1dv := nil; + @glTexCoord1f := nil; + @glTexCoord1fv := nil; + @glTexCoord1i := nil; + @glTexCoord1iv := nil; + @glTexCoord1s := nil; + @glTexCoord1sv := nil; + @glTexCoord2d := nil; + @glTexCoord2dv := nil; + @glTexCoord2f := nil; + @glTexCoord2fv := nil; + @glTexCoord2i := nil; + @glTexCoord2iv := nil; + @glTexCoord2s := nil; + @glTexCoord2sv := nil; + @glTexCoord3d := nil; + @glTexCoord3dv := nil; + @glTexCoord3f := nil; + @glTexCoord3fv := nil; + @glTexCoord3i := nil; + @glTexCoord3iv := nil; + @glTexCoord3s := nil; + @glTexCoord3sv := nil; + @glTexCoord4d := nil; + @glTexCoord4dv := nil; + @glTexCoord4f := nil; + @glTexCoord4fv := nil; + @glTexCoord4i := nil; + @glTexCoord4iv := nil; + @glTexCoord4s := nil; + @glTexCoord4sv := nil; + @glTexCoordPointer := nil; + @glTexEnvf := nil; + @glTexEnvfv := nil; + @glTexEnvi := nil; + @glTexEnviv := nil; + @glTexGend := nil; + @glTexGendv := nil; + @glTexGenf := nil; + @glTexGenfv := nil; + @glTexGeni := nil; + @glTexGeniv := nil; + @glTexImage1D := nil; + @glTexImage2D := nil; + @glTexParameterf := nil; + @glTexParameterfv := nil; + @glTexParameteri := nil; + @glTexParameteriv := nil; + @glTexSubImage1D := nil; + @glTexSubImage2D := nil; + @glTranslated := nil; + @glTranslatef := nil; + @glVertex2d := nil; + @glVertex2dv := nil; + @glVertex2f := nil; + @glVertex2fv := nil; + @glVertex2i := nil; + @glVertex2iv := nil; + @glVertex2s := nil; + @glVertex2sv := nil; + @glVertex3d := nil; + @glVertex3dv := nil; + @glVertex3f := nil; + @glVertex3fv := nil; + @glVertex3i := nil; + @glVertex3iv := nil; + @glVertex3s := nil; + @glVertex3sv := nil; + @glVertex4d := nil; + @glVertex4dv := nil; + @glVertex4f := nil; + @glVertex4fv := nil; + @glVertex4i := nil; + @glVertex4iv := nil; + @glVertex4s := nil; + @glVertex4sv := nil; + @glVertexPointer := nil; + @glViewport := nil; + @ChoosePixelFormat := nil; + + FreeLibrary(hDLL); + +end; + +procedure LoadOpenGL(const dll: String); +begin + + FreeOpenGL; + + hDLL := LoadLibrary(PChar(dll)); + if hDLL = 0 then raise Exception.Create('Could not load OpenGL from ' + dll); + + @glAccum := GetProcAddress(hDLL, 'glAccum'); + @glAlphaFunc := GetProcAddress(hDLL, 'glAlphaFunc'); + @glAreTexturesResident := GetProcAddress(hDLL, 'glAreTexturesResident'); + @glArrayElement := GetProcAddress(hDLL, 'glArrayElement'); + @glBegin := GetProcAddress(hDLL, 'glBegin'); + @glBindTexture := GetProcAddress(hDLL, 'glBindTexture'); + @glBitmap := GetProcAddress(hDLL, 'glBitmap'); + @glBlendFunc := GetProcAddress(hDLL, 'glBlendFunc'); + @glCallList := GetProcAddress(hDLL, 'glCallList'); + @glCallLists := GetProcAddress(hDLL, 'glCallLists'); + @glClear := GetProcAddress(hDLL, 'glClear'); + @glClearAccum := GetProcAddress(hDLL, 'glClearAccum'); + @glClearColor := GetProcAddress(hDLL, 'glClearColor'); + @glClearDepth := GetProcAddress(hDLL, 'glClearDepth'); + @glClearIndex := GetProcAddress(hDLL, 'glClearIndex'); + @glClearStencil := GetProcAddress(hDLL, 'glClearStencil'); + @glClipPlane := GetProcAddress(hDLL, 'glClipPlane'); + @glColor3b := GetProcAddress(hDLL, 'glColor3b'); + @glColor3bv := GetProcAddress(hDLL, 'glColor3bv'); + @glColor3d := GetProcAddress(hDLL, 'glColor3d'); + @glColor3dv := GetProcAddress(hDLL, 'glColor3dv'); + @glColor3f := GetProcAddress(hDLL, 'glColor3f'); + @glColor3fv := GetProcAddress(hDLL, 'glColor3fv'); + @glColor3i := GetProcAddress(hDLL, 'glColor3i'); + @glColor3iv := GetProcAddress(hDLL, 'glColor3iv'); + @glColor3s := GetProcAddress(hDLL, 'glColor3s'); + @glColor3sv := GetProcAddress(hDLL, 'glColor3sv'); + @glColor3ub := GetProcAddress(hDLL, 'glColor3ub'); + @glColor3ubv := GetProcAddress(hDLL, 'glColor3ubv'); + @glColor3ui := GetProcAddress(hDLL, 'glColor3ui'); + @glColor3uiv := GetProcAddress(hDLL, 'glColor3uiv'); + @glColor3us := GetProcAddress(hDLL, 'glColor3us'); + @glColor3usv := GetProcAddress(hDLL, 'glColor3usv'); + @glColor4b := GetProcAddress(hDLL, 'glColor4b'); + @glColor4bv := GetProcAddress(hDLL, 'glColor4bv'); + @glColor4d := GetProcAddress(hDLL, 'glColor4d'); + @glColor4dv := GetProcAddress(hDLL, 'glColor4dv'); + @glColor4f := GetProcAddress(hDLL, 'glColor4f'); + @glColor4fv := GetProcAddress(hDLL, 'glColor4fv'); + @glColor4i := GetProcAddress(hDLL, 'glColor4i'); + @glColor4iv := GetProcAddress(hDLL, 'glColor4iv'); + @glColor4s := GetProcAddress(hDLL, 'glColor4s'); + @glColor4sv := GetProcAddress(hDLL, 'glColor4sv'); + @glColor4ub := GetProcAddress(hDLL, 'glColor4ub'); + @glColor4ubv := GetProcAddress(hDLL, 'glColor4ubv'); + @glColor4ui := GetProcAddress(hDLL, 'glColor4ui'); + @glColor4uiv := GetProcAddress(hDLL, 'glColor4uiv'); + @glColor4us := GetProcAddress(hDLL, 'glColor4us'); + @glColor4usv := GetProcAddress(hDLL, 'glColor4usv'); + @glColorMask := GetProcAddress(hDLL, 'glColorMask'); + @glColorMaterial := GetProcAddress(hDLL, 'glColorMaterial'); + @glColorPointer := GetProcAddress(hDLL, 'glColorPointer'); + @glCopyPixels := GetProcAddress(hDLL, 'glCopyPixels'); + @glCopyTexImage1D := GetProcAddress(hDLL, 'glCopyTexImage1D'); + @glCopyTexImage2D := GetProcAddress(hDLL, 'glCopyTexImage2D'); + @glCopyTexSubImage1D := GetProcAddress(hDLL, 'glCopyTexSubImage1D'); + @glCopyTexSubImage2D := GetProcAddress(hDLL, 'glCopyTexSubImage2D'); + @glCullFace := GetProcAddress(hDLL, 'glCullFace'); + @glDeleteLists := GetProcAddress(hDLL, 'glDeleteLists'); + @glDeleteTextures := GetProcAddress(hDLL, 'glDeleteTextures'); + @glDepthFunc := GetProcAddress(hDLL, 'glDepthFunc'); + @glDepthMask := GetProcAddress(hDLL, 'glDepthMask'); + @glDepthRange := GetProcAddress(hDLL, 'glDepthRange'); + @glDisable := GetProcAddress(hDLL, 'glDisable'); + @glDisableClientState := GetProcAddress(hDLL, 'glDisableClientState'); + @glDrawArrays := GetProcAddress(hDLL, 'glDrawArrays'); + @glDrawBuffer := GetProcAddress(hDLL, 'glDrawBuffer'); + @glDrawElements := GetProcAddress(hDLL, 'glDrawElements'); + @glDrawPixels := GetProcAddress(hDLL, 'glDrawPixels'); + @glEdgeFlag := GetProcAddress(hDLL, 'glEdgeFlag'); + @glEdgeFlagPointer := GetProcAddress(hDLL, 'glEdgeFlagPointer'); + @glEdgeFlagv := GetProcAddress(hDLL, 'glEdgeFlagv'); + @glEnable := GetProcAddress(hDLL, 'glEnable'); + @glEnableClientState := GetProcAddress(hDLL, 'glEnableClientState'); + @glEnd := GetProcAddress(hDLL, 'glEnd'); + @glEndList := GetProcAddress(hDLL, 'glEndList'); + @glEvalCoord1d := GetProcAddress(hDLL, 'glEvalCoord1d'); + @glEvalCoord1dv := GetProcAddress(hDLL, 'glEvalCoord1dv'); + @glEvalCoord1f := GetProcAddress(hDLL, 'glEvalCoord1f'); + @glEvalCoord1fv := GetProcAddress(hDLL, 'glEvalCoord1fv'); + @glEvalCoord2d := GetProcAddress(hDLL, 'glEvalCoord2d'); + @glEvalCoord2dv := GetProcAddress(hDLL, 'glEvalCoord2dv'); + @glEvalCoord2f := GetProcAddress(hDLL, 'glEvalCoord2f'); + @glEvalCoord2fv := GetProcAddress(hDLL, 'glEvalCoord2fv'); + @glEvalMesh1 := GetProcAddress(hDLL, 'glEvalMesh1'); + @glEvalMesh2 := GetProcAddress(hDLL, 'glEvalMesh2'); + @glEvalPoint1 := GetProcAddress(hDLL, 'glEvalPoint1'); + @glEvalPoint2 := GetProcAddress(hDLL, 'glEvalPoint2'); + @glFeedbackBuffer := GetProcAddress(hDLL, 'glFeedbackBuffer'); + @glFinish := GetProcAddress(hDLL, 'glFinish'); + @glFlush := GetProcAddress(hDLL, 'glFlush'); + @glFogf := GetProcAddress(hDLL, 'glFogf'); + @glFogfv := GetProcAddress(hDLL, 'glFogfv'); + @glFogi := GetProcAddress(hDLL, 'glFogi'); + @glFogiv := GetProcAddress(hDLL, 'glFogiv'); + @glFrontFace := GetProcAddress(hDLL, 'glFrontFace'); + @glFrustum := GetProcAddress(hDLL, 'glFrustum'); + @glGenLists := GetProcAddress(hDLL, 'glGenLists'); + @glGenTextures := GetProcAddress(hDLL, 'glGenTextures'); + @glGetBooleanv := GetProcAddress(hDLL, 'glGetBooleanv'); + @glGetClipPlane := GetProcAddress(hDLL, 'glGetClipPlane'); + @glGetDoublev := GetProcAddress(hDLL, 'glGetDoublev'); + @glGetError := GetProcAddress(hDLL, 'glGetError'); + @glGetFloatv := GetProcAddress(hDLL, 'glGetFloatv'); + @glGetIntegerv := GetProcAddress(hDLL, 'glGetIntegerv'); + @glGetLightfv := GetProcAddress(hDLL, 'glGetLightfv'); + @glGetLightiv := GetProcAddress(hDLL, 'glGetLightiv'); + @glGetMapdv := GetProcAddress(hDLL, 'glGetMapdv'); + @glGetMapfv := GetProcAddress(hDLL, 'glGetMapfv'); + @glGetMapiv := GetProcAddress(hDLL, 'glGetMapiv'); + @glGetMaterialfv := GetProcAddress(hDLL, 'glGetMaterialfv'); + @glGetMaterialiv := GetProcAddress(hDLL, 'glGetMaterialiv'); + @glGetPixelMapfv := GetProcAddress(hDLL, 'glGetPixelMapfv'); + @glGetPixelMapuiv := GetProcAddress(hDLL, 'glGetPixelMapuiv'); + @glGetPixelMapusv := GetProcAddress(hDLL, 'glGetPixelMapusv'); + @glGetPointerv := GetProcAddress(hDLL, 'glGetPointerv'); + @glGetPolygonStipple := GetProcAddress(hDLL, 'glGetPolygonStipple'); + @glGetString := GetProcAddress(hDLL, 'glGetString'); + @glGetTexEnvfv := GetProcAddress(hDLL, 'glGetTexEnvfv'); + @glGetTexEnviv := GetProcAddress(hDLL, 'glGetTexEnviv'); + @glGetTexGendv := GetProcAddress(hDLL, 'glGetTexGendv'); + @glGetTexGenfv := GetProcAddress(hDLL, 'glGetTexGenfv'); + @glGetTexGeniv := GetProcAddress(hDLL, 'glGetTexGeniv'); + @glGetTexImage := GetProcAddress(hDLL, 'glGetTexImage'); + @glGetTexLevelParameterfv := GetProcAddress(hDLL, 'glGetTexLevelParameterfv'); + @glGetTexLevelParameteriv := GetProcAddress(hDLL, 'glGetTexLevelParameteriv'); + @glGetTexParameterfv := GetProcAddress(hDLL, 'glGetTexParameterfv'); + @glGetTexParameteriv := GetProcAddress(hDLL, 'glGetTexParameteriv'); + @glHint := GetProcAddress(hDLL, 'glHint'); + @glIndexMask := GetProcAddress(hDLL, 'glIndexMask'); + @glIndexPointer := GetProcAddress(hDLL, 'glIndexPointer'); + @glIndexd := GetProcAddress(hDLL, 'glIndexd'); + @glIndexdv := GetProcAddress(hDLL, 'glIndexdv'); + @glIndexf := GetProcAddress(hDLL, 'glIndexf'); + @glIndexfv := GetProcAddress(hDLL, 'glIndexfv'); + @glIndexi := GetProcAddress(hDLL, 'glIndexi'); + @glIndexiv := GetProcAddress(hDLL, 'glIndexiv'); + @glIndexs := GetProcAddress(hDLL, 'glIndexs'); + @glIndexsv := GetProcAddress(hDLL, 'glIndexsv'); + @glIndexub := GetProcAddress(hDLL, 'glIndexub'); + @glIndexubv := GetProcAddress(hDLL, 'glIndexubv'); + @glInitNames := GetProcAddress(hDLL, 'glInitNames'); + @glInterleavedArrays := GetProcAddress(hDLL, 'glInterleavedArrays'); + @glIsEnabled := GetProcAddress(hDLL, 'glIsEnabled'); + @glIsList := GetProcAddress(hDLL, 'glIsList'); + @glIsTexture := GetProcAddress(hDLL, 'glIsTexture'); + @glLightModelf := GetProcAddress(hDLL, 'glLightModelf'); + @glLightModelfv := GetProcAddress(hDLL, 'glLightModelfv'); + @glLightModeli := GetProcAddress(hDLL, 'glLightModeli'); + @glLightModeliv := GetProcAddress(hDLL, 'glLightModeliv'); + @glLightf := GetProcAddress(hDLL, 'glLightf'); + @glLightfv := GetProcAddress(hDLL, 'glLightfv'); + @glLighti := GetProcAddress(hDLL, 'glLighti'); + @glLightiv := GetProcAddress(hDLL, 'glLightiv'); + @glLineStipple := GetProcAddress(hDLL, 'glLineStipple'); + @glLineWidth := GetProcAddress(hDLL, 'glLineWidth'); + @glListBase := GetProcAddress(hDLL, 'glListBase'); + @glLoadIdentity := GetProcAddress(hDLL, 'glLoadIdentity'); + @glLoadMatrixd := GetProcAddress(hDLL, 'glLoadMatrixd'); + @glLoadMatrixf := GetProcAddress(hDLL, 'glLoadMatrixf'); + @glLoadName := GetProcAddress(hDLL, 'glLoadName'); + @glLogicOp := GetProcAddress(hDLL, 'glLogicOp'); + @glMap1d := GetProcAddress(hDLL, 'glMap1d'); + @glMap1f := GetProcAddress(hDLL, 'glMap1f'); + @glMap2d := GetProcAddress(hDLL, 'glMap2d'); + @glMap2f := GetProcAddress(hDLL, 'glMap2f'); + @glMapGrid1d := GetProcAddress(hDLL, 'glMapGrid1d'); + @glMapGrid1f := GetProcAddress(hDLL, 'glMapGrid1f'); + @glMapGrid2d := GetProcAddress(hDLL, 'glMapGrid2d'); + @glMapGrid2f := GetProcAddress(hDLL, 'glMapGrid2f'); + @glMaterialf := GetProcAddress(hDLL, 'glMaterialf'); + @glMaterialfv := GetProcAddress(hDLL, 'glMaterialfv'); + @glMateriali := GetProcAddress(hDLL, 'glMateriali'); + @glMaterialiv := GetProcAddress(hDLL, 'glMaterialiv'); + @glMatrixMode := GetProcAddress(hDLL, 'glMatrixMode'); + @glMultMatrixd := GetProcAddress(hDLL, 'glMultMatrixd'); + @glMultMatrixf := GetProcAddress(hDLL, 'glMultMatrixf'); + @glNewList := GetProcAddress(hDLL, 'glNewList'); + @glNormal3b := GetProcAddress(hDLL, 'glNormal3b'); + @glNormal3bv := GetProcAddress(hDLL, 'glNormal3bv'); + @glNormal3d := GetProcAddress(hDLL, 'glNormal3d'); + @glNormal3dv := GetProcAddress(hDLL, 'glNormal3dv'); + @glNormal3f := GetProcAddress(hDLL, 'glNormal3f'); + @glNormal3fv := GetProcAddress(hDLL, 'glNormal3fv'); + @glNormal3i := GetProcAddress(hDLL, 'glNormal3i'); + @glNormal3iv := GetProcAddress(hDLL, 'glNormal3iv'); + @glNormal3s := GetProcAddress(hDLL, 'glNormal3s'); + @glNormal3sv := GetProcAddress(hDLL, 'glNormal3sv'); + @glNormalPointer := GetProcAddress(hDLL, 'glNormalPointer'); + @glOrtho := GetProcAddress(hDLL, 'glOrtho'); + @glPassThrough := GetProcAddress(hDLL, 'glPassThrough'); + @glPixelMapfv := GetProcAddress(hDLL, 'glPixelMapfv'); + @glPixelMapuiv := GetProcAddress(hDLL, 'glPixelMapuiv'); + @glPixelMapusv := GetProcAddress(hDLL, 'glPixelMapusv'); + @glPixelStoref := GetProcAddress(hDLL, 'glPixelStoref'); + @glPixelStorei := GetProcAddress(hDLL, 'glPixelStorei'); + @glPixelTransferf := GetProcAddress(hDLL, 'glPixelTransferf'); + @glPixelTransferi := GetProcAddress(hDLL, 'glPixelTransferi'); + @glPixelZoom := GetProcAddress(hDLL, 'glPixelZoom'); + @glPointSize := GetProcAddress(hDLL, 'glPointSize'); + @glPolygonMode := GetProcAddress(hDLL, 'glPolygonMode'); + @glPolygonOffset := GetProcAddress(hDLL, 'glPolygonOffset'); + @glPolygonStipple := GetProcAddress(hDLL, 'glPolygonStipple'); + @glPopAttrib := GetProcAddress(hDLL, 'glPopAttrib'); + @glPopClientAttrib := GetProcAddress(hDLL, 'glPopClientAttrib'); + @glPopMatrix := GetProcAddress(hDLL, 'glPopMatrix'); + @glPopName := GetProcAddress(hDLL, 'glPopName'); + @glPrioritizeTextures := GetProcAddress(hDLL, 'glPrioritizeTextures'); + @glPushAttrib := GetProcAddress(hDLL, 'glPushAttrib'); + @glPushClientAttrib := GetProcAddress(hDLL, 'glPushClientAttrib'); + @glPushMatrix := GetProcAddress(hDLL, 'glPushMatrix'); + @glPushName := GetProcAddress(hDLL, 'glPushName'); + @glRasterPos2d := GetProcAddress(hDLL, 'glRasterPos2d'); + @glRasterPos2dv := GetProcAddress(hDLL, 'glRasterPos2dv'); + @glRasterPos2f := GetProcAddress(hDLL, 'glRasterPos2f'); + @glRasterPos2fv := GetProcAddress(hDLL, 'glRasterPos2fv'); + @glRasterPos2i := GetProcAddress(hDLL, 'glRasterPos2i'); + @glRasterPos2iv := GetProcAddress(hDLL, 'glRasterPos2iv'); + @glRasterPos2s := GetProcAddress(hDLL, 'glRasterPos2s'); + @glRasterPos2sv := GetProcAddress(hDLL, 'glRasterPos2sv'); + @glRasterPos3d := GetProcAddress(hDLL, 'glRasterPos3d'); + @glRasterPos3dv := GetProcAddress(hDLL, 'glRasterPos3dv'); + @glRasterPos3f := GetProcAddress(hDLL, 'glRasterPos3f'); + @glRasterPos3fv := GetProcAddress(hDLL, 'glRasterPos3fv'); + @glRasterPos3i := GetProcAddress(hDLL, 'glRasterPos3i'); + @glRasterPos3iv := GetProcAddress(hDLL, 'glRasterPos3iv'); + @glRasterPos3s := GetProcAddress(hDLL, 'glRasterPos3s'); + @glRasterPos3sv := GetProcAddress(hDLL, 'glRasterPos3sv'); + @glRasterPos4d := GetProcAddress(hDLL, 'glRasterPos4d'); + @glRasterPos4dv := GetProcAddress(hDLL, 'glRasterPos4dv'); + @glRasterPos4f := GetProcAddress(hDLL, 'glRasterPos4f'); + @glRasterPos4fv := GetProcAddress(hDLL, 'glRasterPos4fv'); + @glRasterPos4i := GetProcAddress(hDLL, 'glRasterPos4i'); + @glRasterPos4iv := GetProcAddress(hDLL, 'glRasterPos4iv'); + @glRasterPos4s := GetProcAddress(hDLL, 'glRasterPos4s'); + @glRasterPos4sv := GetProcAddress(hDLL, 'glRasterPos4sv'); + @glReadBuffer := GetProcAddress(hDLL, 'glReadBuffer'); + @glReadPixels := GetProcAddress(hDLL, 'glReadPixels'); + @glRectd := GetProcAddress(hDLL, 'glRectd'); + @glRectdv := GetProcAddress(hDLL, 'glRectdv'); + @glRectf := GetProcAddress(hDLL, 'glRectf'); + @glRectfv := GetProcAddress(hDLL, 'glRectfv'); + @glRecti := GetProcAddress(hDLL, 'glRecti'); + @glRectiv := GetProcAddress(hDLL, 'glRectiv'); + @glRects := GetProcAddress(hDLL, 'glRects'); + @glRectsv := GetProcAddress(hDLL, 'glRectsv'); + @glRenderMode := GetProcAddress(hDLL, 'glRenderMode'); + @glRotated := GetProcAddress(hDLL, 'glRotated'); + @glRotatef := GetProcAddress(hDLL, 'glRotatef'); + @glScaled := GetProcAddress(hDLL, 'glScaled'); + @glScalef := GetProcAddress(hDLL, 'glScalef'); + @glScissor := GetProcAddress(hDLL, 'glScissor'); + @glSelectBuffer := GetProcAddress(hDLL, 'glSelectBuffer'); + @glShadeModel := GetProcAddress(hDLL, 'glShadeModel'); + @glStencilFunc := GetProcAddress(hDLL, 'glStencilFunc'); + @glStencilMask := GetProcAddress(hDLL, 'glStencilMask'); + @glStencilOp := GetProcAddress(hDLL, 'glStencilOp'); + @glTexCoord1d := GetProcAddress(hDLL, 'glTexCoord1d'); + @glTexCoord1dv := GetProcAddress(hDLL, 'glTexCoord1dv'); + @glTexCoord1f := GetProcAddress(hDLL, 'glTexCoord1f'); + @glTexCoord1fv := GetProcAddress(hDLL, 'glTexCoord1fv'); + @glTexCoord1i := GetProcAddress(hDLL, 'glTexCoord1i'); + @glTexCoord1iv := GetProcAddress(hDLL, 'glTexCoord1iv'); + @glTexCoord1s := GetProcAddress(hDLL, 'glTexCoord1s'); + @glTexCoord1sv := GetProcAddress(hDLL, 'glTexCoord1sv'); + @glTexCoord2d := GetProcAddress(hDLL, 'glTexCoord2d'); + @glTexCoord2dv := GetProcAddress(hDLL, 'glTexCoord2dv'); + @glTexCoord2f := GetProcAddress(hDLL, 'glTexCoord2f'); + @glTexCoord2fv := GetProcAddress(hDLL, 'glTexCoord2fv'); + @glTexCoord2i := GetProcAddress(hDLL, 'glTexCoord2i'); + @glTexCoord2iv := GetProcAddress(hDLL, 'glTexCoord2iv'); + @glTexCoord2s := GetProcAddress(hDLL, 'glTexCoord2s'); + @glTexCoord2sv := GetProcAddress(hDLL, 'glTexCoord2sv'); + @glTexCoord3d := GetProcAddress(hDLL, 'glTexCoord3d'); + @glTexCoord3dv := GetProcAddress(hDLL, 'glTexCoord3dv'); + @glTexCoord3f := GetProcAddress(hDLL, 'glTexCoord3f'); + @glTexCoord3fv := GetProcAddress(hDLL, 'glTexCoord3fv'); + @glTexCoord3i := GetProcAddress(hDLL, 'glTexCoord3i'); + @glTexCoord3iv := GetProcAddress(hDLL, 'glTexCoord3iv'); + @glTexCoord3s := GetProcAddress(hDLL, 'glTexCoord3s'); + @glTexCoord3sv := GetProcAddress(hDLL, 'glTexCoord3sv'); + @glTexCoord4d := GetProcAddress(hDLL, 'glTexCoord4d'); + @glTexCoord4dv := GetProcAddress(hDLL, 'glTexCoord4dv'); + @glTexCoord4f := GetProcAddress(hDLL, 'glTexCoord4f'); + @glTexCoord4fv := GetProcAddress(hDLL, 'glTexCoord4fv'); + @glTexCoord4i := GetProcAddress(hDLL, 'glTexCoord4i'); + @glTexCoord4iv := GetProcAddress(hDLL, 'glTexCoord4iv'); + @glTexCoord4s := GetProcAddress(hDLL, 'glTexCoord4s'); + @glTexCoord4sv := GetProcAddress(hDLL, 'glTexCoord4sv'); + @glTexCoordPointer := GetProcAddress(hDLL, 'glTexCoordPointer'); + @glTexEnvf := GetProcAddress(hDLL, 'glTexEnvf'); + @glTexEnvfv := GetProcAddress(hDLL, 'glTexEnvfv'); + @glTexEnvi := GetProcAddress(hDLL, 'glTexEnvi'); + @glTexEnviv := GetProcAddress(hDLL, 'glTexEnviv'); + @glTexGend := GetProcAddress(hDLL, 'glTexGend'); + @glTexGendv := GetProcAddress(hDLL, 'glTexGendv'); + @glTexGenf := GetProcAddress(hDLL, 'glTexGenf'); + @glTexGenfv := GetProcAddress(hDLL, 'glTexGenfv'); + @glTexGeni := GetProcAddress(hDLL, 'glTexGeni'); + @glTexGeniv := GetProcAddress(hDLL, 'glTexGeniv'); + @glTexImage1D := GetProcAddress(hDLL, 'glTexImage1D'); + @glTexImage2D := GetProcAddress(hDLL, 'glTexImage2D'); + @glTexParameterf := GetProcAddress(hDLL, 'glTexParameterf'); + @glTexParameterfv := GetProcAddress(hDLL, 'glTexParameterfv'); + @glTexParameteri := GetProcAddress(hDLL, 'glTexParameteri'); + @glTexParameteriv := GetProcAddress(hDLL, 'glTexParameteriv'); + @glTexSubImage1D := GetProcAddress(hDLL, 'glTexSubImage1D'); + @glTexSubImage2D := GetProcAddress(hDLL, 'glTexSubImage2D'); + @glTranslated := GetProcAddress(hDLL, 'glTranslated'); + @glTranslatef := GetProcAddress(hDLL, 'glTranslatef'); + @glVertex2d := GetProcAddress(hDLL, 'glVertex2d'); + @glVertex2dv := GetProcAddress(hDLL, 'glVertex2dv'); + @glVertex2f := GetProcAddress(hDLL, 'glVertex2f'); + @glVertex2fv := GetProcAddress(hDLL, 'glVertex2fv'); + @glVertex2i := GetProcAddress(hDLL, 'glVertex2i'); + @glVertex2iv := GetProcAddress(hDLL, 'glVertex2iv'); + @glVertex2s := GetProcAddress(hDLL, 'glVertex2s'); + @glVertex2sv := GetProcAddress(hDLL, 'glVertex2sv'); + @glVertex3d := GetProcAddress(hDLL, 'glVertex3d'); + @glVertex3dv := GetProcAddress(hDLL, 'glVertex3dv'); + @glVertex3f := GetProcAddress(hDLL, 'glVertex3f'); + @glVertex3fv := GetProcAddress(hDLL, 'glVertex3fv'); + @glVertex3i := GetProcAddress(hDLL, 'glVertex3i'); + @glVertex3iv := GetProcAddress(hDLL, 'glVertex3iv'); + @glVertex3s := GetProcAddress(hDLL, 'glVertex3s'); + @glVertex3sv := GetProcAddress(hDLL, 'glVertex3sv'); + @glVertex4d := GetProcAddress(hDLL, 'glVertex4d'); + @glVertex4dv := GetProcAddress(hDLL, 'glVertex4dv'); + @glVertex4f := GetProcAddress(hDLL, 'glVertex4f'); + @glVertex4fv := GetProcAddress(hDLL, 'glVertex4fv'); + @glVertex4i := GetProcAddress(hDLL, 'glVertex4i'); + @glVertex4iv := GetProcAddress(hDLL, 'glVertex4iv'); + @glVertex4s := GetProcAddress(hDLL, 'glVertex4s'); + @glVertex4sv := GetProcAddress(hDLL, 'glVertex4sv'); + @glVertexPointer := GetProcAddress(hDLL, 'glVertexPointer'); + @glViewport := GetProcAddress(hDLL, 'glViewport'); + + @ChoosePixelFormat := GetProcAddress(hDLL, 'ChoosePixelFormat'); + if not Assigned(ChoosePixelFormat) then + @ChoosePixelFormat := @Windows.ChoosePixelFormat; + +end; + +initialization + + Set8087CW($133F); + + try + LoadOpenGL('opengl32.dll'); + except end; + +finalization + + FreeOpenGL; + +end. diff --git a/src/lib/dgl/dglOpenGL.pas b/src/lib/dgl/dglOpenGL.pas new file mode 100644 index 0000000..80c8231 --- /dev/null +++ b/src/lib/dgl/dglOpenGL.pas @@ -0,0 +1,15296 @@ +{==============================================================================} +{ } +{ OpenGL 3.2 - Headertranslation } +{ Version 3.2.1 } +{ Date : 15.09.2009 } +{ } +{ Works with : } +{ - Delphi 3 and up } +{ - FreePascal (1.9.3 and up) } +{ } +{==============================================================================} +{ } +{ Containts the translations of glext.h, gl_1_1.h, glu.h and weglext.h. } +{ It also contains some helperfunctions that were inspired by those } +{ found in Mike Lischke's OpenGL12.pas. } +{ } +{ Copyright (C) DGL-OpenGL2-Portteam } +{ All Rights Reserved } +{ } +{ Obtained through: } +{ Delphi OpenGL Community(DGL) - www.delphigl.com } +{ } +{ Converted and maintained by DGL's GL2.0-Team : } +{ - Sascha Willems - http://www.delphigl.de } +{ - Steffen Xonna (Lossy eX) - http://www.dev-center.de } +{ - Lars Middendorf - http://www.3d-seite.de } +{ Additional input : } +{ - Martin Waldegger (Mars) - http://www.basegraph.com } +{ - Benjamin Rosseaux (BeRo) - http://www.0ok.de } +{ Additional thanks: } +{ sigsegv (libdl.so) } +{ } +{ } +{==============================================================================} +{ You may retrieve the latest version of this file at the Delphi OpenGL } +{ Community home page, located at http://www.delphigl.com/ } +{ } +{ The contents of this file are used with permission, subject to } +{ the Mozilla Public License Version 1.1 (the "License"); you may } +{ not use this file except in compliance with the License. You may } +{ obtain a copy of the License at } +{ http://www.mozilla.org/MPL/MPL-1.1.html } +{ } +{ Software distributed under the License is distributed on an } +{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or } +{ implied. See the License for the specific language governing } +{ rights and limitations under the License. } +{ } +{==============================================================================} +{ History : } +{ Version 1.0 Initial Release } +{ Version 1.1 Added PPointer in Tpyessection for compatiblity with Delphi } +{ versions lower than 7 (SW) } +{ Added a function named RaiseLastOSError including a comment } +{ on how to make it run under Delphi versions lower than 7 (SW) } +{ Added some data types according to the GL-Syntax (SW) } +{ Version 1.2 Fixed some problems with getting the addresses of some } +{ Extensions (e.g. glTexImage3D) where the EXT/ARB did work } +{ but not the core-functions (SW) } +{ Version 1.3 A second call to ReadimplementationProperties won't } +{ revert to the default libs anymore (MW) } +{ Libraries now will be released if necessary (MW) } +{ Version 1.3a Small fixes for glSlang-functions (SW) } +{ Version 1.3b Fixed a small bug with GL_ARB_shader_objects, that lead } +{ lead to that extension not loaded correctly (SW) } +{ Version 1.3c more GL 1.5 compliance by FOG_COORD_xx and } +{ ARB less VBO and occlusion query routines (MW) } +{ Version 1.3d Fixed linebreaks (should now be corrected under D5) (SW) } +{ Version 1.4 Changed header to correspond to the OpenGL-Shading } +{ Language specification 1.10 : } +{ - Added new GL_SAMPLER_*-Constants } +{ - Added Constant GL_SHADING_LANGUAGE_VERSION_ARB } +{ - Added Constant GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB } +{ - Added Constant GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB (SW) } +{ Version 1.4a Fixed a missing stdcall for glBindAttribLocationARB (SW) } +{ Version 1.4b Fixed declaration for glUniform*(f/i)vARB (added count) (MW) } +{ glCompileShaderARB changed from function to procedure (MW) } +{ Version 1.5 Added support for FreePascal (BR) } +{ Added type TGLVectorf3/TGLVector3f (SW) } +{ Version 1.6 Added Extension GL_EXT_framebuffer_object (SX) } +{ Version 1.7 Added Extension GL_ARB_fragment_program_shadow (SX) } +{ Added Extension GL_ARB_draw_buffers (SX) } +{ Added Extension GL_ARB_texture_rectangle (SX) } +{ Added Extension GL_ARB_color_buffer_float (SX) } +{ Added Extension GL_ARB_half_float_pixel (SX) } +{ Added Extension GL_ARB_texture_float (SX) } +{ Added Extension GL_ARB_pixel_buffer_object (SX) } +{ Added Extension GL_EXT_depth_bounds_test (SX) } +{ Added Extension GL_EXT_texture_mirror_clamp (SX) } +{ Added Extension GL_EXT_blend_equation_separate (SX) } +{ Added Extension GL_EXT_pixel_buffer_object (SX) } +{ Added Extension GL_EXT_texture_compression_dxt1 (SX) } +{ Added Extension GL_NV_fragment_program_option (SX) } +{ Added Extension GL_NV_fragment_program2 (SX) } +{ Added Extension GL_NV_vertex_program2_option (SX) } +{ Added Extension GL_NV_vertex_program3 (SX) } +{ Version 1.8 Added explicit delegate type definitions (LM) } +{ Added .Net 1.1 Support (LM) } +{ Added .Net overloaded functions (LM) } +{ Added delayed extension loading and stubs (LM) } +{ Added automatic InitOpenGL call in CreateRenderingContext(LM) } +{ Added extra Read_* function (LM) } +{ Version 2.0 fixed some Problem with version string and damn drivers. } +{ String 1.15 identified as OpenGL 1.5 not as OpenGL 1.1 (SX) } +{ Removed unexisting extension GL_ARB_texture_mirror_repeat(SX) } +{ Added Extension WGL_ARB_pixel_format_float (SX) } +{ Added Extension GL_EXT_stencil_clear_tag (SX) } +{ Added Extension GL_EXT_texture_rectangle (SX) } +{ Added Extension GL_EXT_texture_edge_clamp (SX) } +{ Some 1.5 Core Consts added (now completed) (SX) } +{ gluProject need pointer for not .net (SX) } +{ gluUnProject need pointer for not .net (SX) } +{ wglUseFontOutlines* need pointer for not .net (SX) } +{ wglSwapMultipleBuffers need pointer for not .net (SX) } +{ Bug with wglGetExtensionsStringEXT removed } +{ different type for .net (SX) } +{ Added OpenGL 2.0 Core (SX) } +{ Version 2.0.1 fixed some problems with glGetActiveAttrib in 2.0 Core (SX) } +{ fixes some problems with gluProject (SX) } +{ fixes some problems with gluUnProject (SX) } +{ fixes some problems with gluTessVertex (SX) } +{ fixes some problems with gluLoadSamplingMatrices (SX) } +{ Version 2.1 Removed .NET Support (SX) } +{ Better support for Linux (SX) } +{ Better Codeformation (SX) } +{ Added some more Vector/Matrix types (SX) } +{ Added OpenGL 2.1 Core (SX) } +{ Added Extension GL_EXT_packed_depth_stencil (SX) } +{ Added Extension GL_EXT_texture_sRGB (SX) } +{ Added Extension GL_EXT_framebuffer_blit (SX) } +{ Added Extension GL_EXT_framebuffer_multisample (SX) } +{ Added Extension GL_EXT_timer_query (SX) } +{ Added Extension GL_EXT_gpu_program_parameters (SX) } +{ Added Extension GL_EXT_bindable_uniform (SX) } +{ Added Extension GL_EXT_draw_buffers2 (SX) } +{ Added Extension GL_EXT_draw_instanced (SX) } +{ Added Extension GL_EXT_framebuffer_sRGB (SX) } +{ Added Extension GL_EXT_geometry_shader4 (SX) } +{ Added Extension GL_EXT_gpu_shader4 (SX) } +{ Added Extension GL_EXT_packed_float (SX) } +{ Added Extension GL_EXT_texture_array (SX) } +{ Added Extension GL_EXT_texture_buffer_object (SX) } +{ Added Extension GL_EXT_texture_compression_latc (SX) } +{ Added Extension GL_EXT_texture_compression_rgtc (SX) } +{ Added Extension GL_EXT_texture_integer (SX) } +{ Added Extension GL_EXT_texture_shared_exponent (SX) } +{ Added Extension GL_NV_depth_buffer_float (SX) } +{ Added Extension GL_NV_fragment_program4 (SX) } +{ Added Extension GL_NV_framebuffer_multisample_coverage (SX) } +{ Added Extension GL_NV_geometry_program4 (SX) } +{ Added Extension GL_NV_gpu_program4 (SX) } +{ Added Extension GL_NV_parameter_buffer_object (SX) } +{ Added Extension GL_NV_transform_feedback (SX) } +{ Added Extension GL_NV_vertex_program4 (SX) } +{ Version 3.0 fixed some const of GL_EXT_texture_shared_exponent (SX) } +{ possible better support for mac (SX) } +{ Added OpenGL 3.0 Core (SX) } +{ Added Extension GL_ARB_depth_buffer_float (SX) } +{ Added Extension GL_ARB_draw_instanced (SX) } +{ Added Extension GL_ARB_framebuffer_object (SX) } +{ Added Extension GL_ARB_framebuffer_sRGB (SX) } +{ Added Extension GL_ARB_geometry_shader4 (SX) } +{ Added Extension GL_ARB_half_float_vertex (SX) } +{ Added Extension GL_ARB_instanced_arrays (SX) } +{ Added Extension GL_ARB_map_buffer_range (SX) } +{ Added Extension GL_ARB_texture_buffer_object (SX) } +{ Added Extension GL_ARB_texture_compression_rgtc (SX) } +{ Added Extension GL_ARB_texture_rg (SX) } +{ Added Extension GL_ARB_vertex_array_object (SX) } +{ Added Extension GL_NV_conditional_render (SX) } +{ Added Extension GL_NV_present_video (SX) } +{ Added Extension GL_EXT_transform_feedback (SX) } +{ Added Extension GL_EXT_direct_state_access (SX) } +{ Added Extension GL_EXT_vertex_array_bgra (SX) } +{ Added Extension GL_EXT_texture_swizzle (SX) } +{ Added Extension GL_NV_explicit_multisample (SX) } +{ Added Extension GL_NV_transform_feedback2 (SX) } +{ Added Extension WGL_ARB_create_context (SX) } +{ Added Extension WGL_NV_present_video (SX) } +{ Added Extension WGL_NV_video_out (SX) } +{ Added Extension WGL_NV_swap_group (SX) } +{ Added Extension WGL_NV_gpu_affinity (SX) } +{ Added define DGL_TINY_HEADER to suppress automatic } +{ function loading (SX) } +{ glProcedure renamed to dglGetProcAddress and now it's } +{ visible from outside the unit to custom load functions (SX) } +{ dglCheckExtension added to check if an extension exists (SX) } +{ Read_GL_ARB_buffer_object renamed to } +{ Read_GL_ARB_vertex_buffer_object (SX) } +{ Version 3.0.1 fixed an problem with fpc (SX) } +{ Version 3.0.2 fixed an problem with WGL_ARB_create_context (SX) } +{ Version 3.2 Functions from GL_VERSION_3_0 where updated (SX) } +{ Functions from GL_ARB_map_buffer_range where updated (SX) } +{ Functions from GL_NV_present_video where added (SX) } +{ Added consts of GL_ARB_instanced_arrays (SX) } +{ Defines to identify Delphi was changed (prevent for } +{ feature maintenance) (SX) } +{ Added Extension GL_ATI_meminfo (SX) } +{ Added Extension GL_AMD_performance_monitor (SX) } +{ Added Extension GL_AMD_texture_texture4 (SX) } +{ Added Extension GL_AMD_vertex_shader_tesselator (SX) } +{ Added Extension GL_EXT_provoking_vertex (SX) } +{ Added Extension WGL_AMD_gpu_association (SX) } +{ Added OpenGL 3.1 Core (SX) } +{ All deprecated stuff can be disabled if you undef the } +{ define DGL_DEPRECATED (SX) } +{ Added Extension GL_ARB_uniform_buffer_object (SX) } +{ Added Extension GL_ARB_compatibility (SX) } +{ Added Extension GL_ARB_copy_buffer (SX) } +{ Added Extension GL_ARB_shader_texture_lod (SX) } +{ Remove function from GL_NV_present_video (SX) } +{ Added Extension WGL_3DL_stereo_control (SX) } +{ Added Extension GL_EXT_texture_snorm (SX) } +{ Added Extension GL_AMD_draw_buffers_blend (SX) } +{ Added Extension GL_APPLE_texture_range (SX) } +{ Added Extension GL_APPLE_float_pixels (SX) } +{ Added Extension GL_APPLE_vertex_program_evaluators (SX) } +{ Added Extension GL_APPLE_aux_depth_stencil (SX) } +{ Added Extension GL_APPLE_object_purgeable (SX) } +{ Added Extension GL_APPLE_row_bytes (SX) } +{ Added OpenGL 3.2 Core (SX) } +{ Added Extension GL_ARB_depth_clamp (SX) } +{ Added Extension GL_ARB_draw_elements_base_vertex (SX) } +{ Added Extension GL_ARB_fragment_coord_conventions (SX) } +{ Added Extension GL_ARB_provoking_vertex (SX) } +{ Added Extension GL_ARB_seamless_cube_map (SX) } +{ Added Extension GL_ARB_sync (SX) } +{ Added Extension GL_ARB_texture_multisample (SX) } +{ Added Extension GL_ARB_vertex_array_bgra (SX) } +{ Added Extension GL_ARB_draw_buffers_blend (SX) } +{ Added Extension GL_ARB_sample_shading (SX) } +{ Added Extension GL_ARB_texture_cube_map_array (SX) } +{ Added Extension GL_ARB_texture_gather (SX) } +{ Added Extension GL_ARB_texture_query_lod (SX) } +{ Added Extension WGL_ARB_create_context_profile (SX) } +{ Added GLX Core up to Version 1.4 (SX) } +{ Added Extension GLX_ARB_multisample (SX) } +{ Added Extension GLX_ARB_fbconfig_float (SX) } +{ Added Extension GLX_ARB_get_proc_address (SX) } +{ Added Extension GLX_ARB_create_context (SX) } +{ Added Extension GLX_ARB_create_context_profile (SX) } +{ Added Extension GLX_EXT_visual_info (SX) } +{ Added Extension GLX_EXT_visual_rating (SX) } +{ Added Extension GLX_EXT_import_context (SX) } +{ Added Extension GLX_EXT_fbconfig_packed_float (SX) } +{ Added Extension GLX_EXT_framebuffer_sRGB (SX) } +{ Added Extension GLX_EXT_texture_from_pixmap (SX) } +{ Version 3.2.1 Fixed some problems with Delphi < 6 (SX) } + + +{==============================================================================} +{ Header based on glext.h rev 54 (2009-08-03) } +{ This is an important notice for maintaining. Dont remove it. And make sure } +{ to keep him up to date } +{==============================================================================} + + +{$define DGL_DEPRECATED} +{ + This define defines if the header should use deprecated ARB stuff or not. + per Default the Header use deprecated Stuff. +} + + +{.$define DGL_TINY_HEADER} +{ + If you enable the define DGL_TINY_HEADER no function automatically will be loaded if you + call ActivateRenderingContext. This may some bit faster and the smart linker can delete + all non used functions. This will reduce the filesize of your binary file. But in this + case you have to load the functions by yourself. There are two ways to do this. + + 1. You can load whole extension by calling the func Read_Extensionname. But if you do + this it's possible to load functions you dont use. So you have the same "problem" + like before. But it's only an bit smaler. + > Read_GL_ARB_multitexture; + + 2. You are able to load only the functions you exactly need. In this case you are able + to use the variables of the dglOpenGL.pas. So you only need to load the functions + and you can use the header like before. + To do this you have to created and activated an opengl context and than you can load + the needed functions. + > ActivateRenderingContext(fDC, fRC); + > glActiveTextureARB := dglGetProcAddress('glActiveTextureARB'); + > glMultiTexCoord2fARB := dglGetProcAddress('glMultiTexCoord2fARB'); + + So only the function "glActiveTextureARB" and "glMultiTexCoord2fARB" will be loaded. + + + Please notice that the extension variables won't be loaded if this define is active. But + you can call dglCheckExtension to check if any extension exists. You can assign them to + the variables of the dglOpenGL.pas so all code they use this will find them. + + > GL_ARB_shading_language_100 := dglCheckExtension('GL_ARB_shading_language_100'); +} + + +unit dglOpenGL; + +interface + +// defines to configure freepascal +{$IFDEF FPC} + {$MODE Delphi} + + {$IFNDEF WINDOWS} + {$LINKLIB c} + {$ENDIF} +{$ENDIF} + +// known delphi versions +{$IFNDEF FPC} // if freepascal isnt defined + {$IFDEF VER140} // Delphi 6 + {$DEFINE DELPHI6_AND_DOWN} + {$ENDIF} + + {$IFDEF VER130} // Delphi 5 + {$DEFINE DELPHI6_AND_DOWN} + {$ENDIF} + + {$IFDEF VER120} // Delphi 4 + {$DEFINE DELPHI6_AND_DOWN} + {$ENDIF} + + {$IFDEF VER110} // C++ Builder 3 + {$DEFINE DELPHI6_AND_DOWN} + {$ENDIF} + + {$IFDEF VER100} // Delphi 3 + {$DEFINE DELPHI6_AND_DOWN} + {$ENDIF} +{$ENDIF} + +// Options for Delphi < 5 +{$IFDEF DELPHI6_AND_DOWN} + {$A+} +{$ELSE} + {$A4} +{$ENDIF} + +// generell options +{$H+,O+,X+} + +// detecting Windows +{$IFDEF Win32} // Delphi and fpc of 32 Bit Windows + {$DEFINE DGL_WIN} +{$ENDIF} + +{$IFDEF Win64} // Delphi and fpc of 32 Bit Windows + {$DEFINE DGL_WIN} +{$ENDIF} + +// detecting Linux +{$IFDEF linux} // Linux + {$DEFINE DGL_LINUX} +{$ENDIF} + +// detecting 64 Bit CPU +{$IFDEF CPU64} // fpc on 64 bit cpus + {$DEFINE DGL_64BIT} // dgl define for 64 bit +{$ENDIF} + + + +uses + SysUtils + {$IFDEF DGL_WIN}, Windows{$ENDIF} + {$IFDEF DGL_LINUX}, X, XLib, XUtil{$ENDIF} + ; + +type + // Needed for Delphi 6 and less (defined in system.pas for Delphi 7) + PPointer = ^Pointer; + PCardinal = ^Cardinal; + + GLenum = Cardinal; + GLboolean = BYTEBOOL; + GLbitfield = Cardinal; + GLbyte = Shortint; + GLshort = SmallInt; + GLint = Integer; + GLsizei = Integer; + GLubyte = Byte; + GLushort = Word; + GLuint = Cardinal; + GLfloat = Single; + GLclampf = Single; + GLdouble = Double; + GLclampd = Double; + GLvoid = Pointer; + GLint64 = Int64; + GLuint64 = {$IFDEF DELPHI6_AND_DOWN} Int64 {$ELSE} UInt64 {$ENDIF}; + + TGLenum = GLenum; + TGLboolean = GLboolean; + TGLbitfield = GLbitfield; + TGLbyte = GLbyte; + TGLshort = GLshort; + TGLint = GLint; + TGLsizei = GLsizei; + TGLubyte = GLubyte; + TGLushort = GLushort; + TGLuint = GLuint; + TGLfloat = GLfloat; + TGLclampf = GLclampf; + TGLdouble = GLdouble; + TGLclampd = GLclampd; + TGLvoid = GLvoid; + TGLint64 = GLint64; + TGLuint64 = GLuint64; + + PGLboolean = ^GLboolean; + PGLbyte = ^GLbyte; + PGLshort = ^GLshort; + PGLint = ^GLint; + PGLsizei = ^GLsizei; + PGLubyte = ^GLubyte; + PGLushort = ^GLushort; + PGLuint = ^GLuint; + PGLclampf = ^GLclampf; + PGLfloat = ^GLfloat; + PGLdouble = ^GLdouble; + PGLclampd = ^GLclampd; + PGLenum = ^GLenum; + PGLvoid = Pointer; + PPGLvoid = ^PGLvoid; + PGLint64 = ^GLint64; + + // GL_NV_half_float + GLhalfNV = WORD; + TGLhalfNV = GLhalfNV; + PGLhalfNV = ^GLhalfNV; + + // GL_ARB_shader_objects + PGLHandleARB = ^GLHandleARB; + GLHandleARB = Integer; + GLcharARB = AnsiChar; + PGLcharARB = PAnsiChar; + PPGLcharARB = ^PGLcharARB; + + // GL_VERSION_2_0 + GLHandle = Integer; + PGLchar = PAnsiChar; + PPGLchar = ^PGLChar; + + // GL_EXT_timer_query + GLint64EXT = Int64; + TGLint64EXT = GLint64EXT; + PGLint64EXT = ^TGLint64EXT; + + GLuint64EXT = TGLuint64; + TGLuint64EXT = GLuint64EXT; + PGLuint64EXT = ^TGLuint64EXT; + + // WGL_ARB_pbuffer + HPBUFFERARB = THandle; + + // WGL_EXT_pbuffer + HPBUFFEREXT = THandle; + + // WGL_NV_present_video + PHVIDEOOUTPUTDEVICENV = ^HVIDEOOUTPUTDEVICENV; + HVIDEOOUTPUTDEVICENV = THandle; + + // WGL_NV_video_out + PHPVIDEODEV = ^HPVIDEODEV; + HPVIDEODEV = THandle; + + // WGL_NV_gpu_affinity + PHPGPUNV = ^HPGPUNV; + PHGPUNV = ^HGPUNV; + + HPGPUNV = THandle; + HGPUNV = THandle; + + // ARB_sync + GLsync = Pointer; + + // GLX + {$IFDEF DGL_LINUX} + GLXContext = Pointer; + GLXContextID = TXID; + GLXDrawable = TXID; + GLXFBConfig = Pointer; + GLXPbuffer = TXID; + GLXPixmap = TXID; + GLXWindow = TXID; + + Window = TXID; + Colormap = TXID; + Pixmap = TXID; + Font = TXID; + {$ENDIF} + + // Datatypes corresponding to GL's types TGL(name)(type)(count) + TGLVectorub2 = array[0..1] of TGLubyte; + TGLVectori2 = array[0..1] of TGLint; + TGLVectorf2 = array[0..1] of TGLfloat; + TGLVectord2 = array[0..1] of TGLdouble; + TGLVectorp2 = array[0..1] of Pointer; + + TGLVectorub3 = array[0..2] of TGLubyte; + TGLVectori3 = array[0..2] of TGLint; + TGLVectorf3 = array[0..2] of TGLfloat; + TGLVectord3 = array[0..2] of TGLdouble; + TGLVectorp3 = array[0..2] of Pointer; + + TGLVectorub4 = array[0..3] of TGLubyte; + TGLVectori4 = array[0..3] of TGLint; + TGLVectorf4 = array[0..3] of TGLfloat; + TGLVectord4 = array[0..3] of TGLdouble; + TGLVectorp4 = array[0..3] of Pointer; + + TGLArrayf4 = TGLVectorf4; + TGLArrayf3 = TGLVectorf3; + TGLArrayd3 = TGLVectord3; + TGLArrayi4 = TGLVectori4; + TGLArrayp4 = TGLVectorp4; + + TGlMatrixub3 = array[0..2, 0..2] of TGLubyte; + TGlMatrixi3 = array[0..2, 0..2] of TGLint; + TGLMatrixf3 = array[0..2, 0..2] of TGLfloat; + TGLMatrixd3 = array[0..2, 0..2] of TGLdouble; + + TGlMatrixub4 = array[0..3, 0..3] of TGLubyte; + TGlMatrixi4 = array[0..3, 0..3] of TGLint; + TGLMatrixf4 = array[0..3, 0..3] of TGLfloat; + TGLMatrixd4 = array[0..3, 0..3] of TGLdouble; + + TGLVector3f = TGLVectorf3; + + // Datatypes corresponding to OpenGL12.pas for easy porting + TVector3d = TGLVectord3; + + TVector4i = TGLVectori4; + TVector4f = TGLVectorf4; + TVector4p = TGLVectorp4; + + TMatrix4f = TGLMatrixf4; + TMatrix4d = TGLMatrixd4; + + PGLMatrixd4 = ^TGLMatrixd4; + PVector4i = ^TVector4i; + + + +{$IFDEF FPC} + TRect = packed record + Left, Top, Right, Bottom: Longint; + end; +{$ENDIF} + + + PGPU_DEVICE = ^GPU_DEVICE; + GPU_DEVICE = record + cb: DWORD; + DeviceName: array [0..31] of AnsiChar; + DeviceString: array [0..127] of AnsiChar; + Flags: DWORD; + rcVirtualScreen: TRect; + end; + + +type +{$IFDEF FPC} + {$IFDEF DGL_WIN} + PWGLSwap = ^TWGLSwap; + {$EXTERNALSYM _WGLSWAP} + _WGLSWAP = packed record + hdc: HDC; + uiFlags: UINT; + end; + + TWGLSwap = _WGLSWAP; + {$EXTERNALSYM WGLSWAP} + WGLSWAP = _WGLSWAP; + + {$ENDIF} +{$ENDIF} + + // GLU types + TGLUNurbs = record + end; + TGLUQuadric = record + end; + TGLUTesselator = record + end; + PGLUNurbs = ^TGLUNurbs; + PGLUQuadric = ^TGLUQuadric; + PGLUTesselator = ^TGLUTesselator; + // backwards compatibility + TGLUNurbsObj = TGLUNurbs; + TGLUQuadricObj = TGLUQuadric; + TGLUTesselatorObj = TGLUTesselator; + TGLUTriangulatorObj = TGLUTesselator; + PGLUNurbsObj = PGLUNurbs; + PGLUQuadricObj = PGLUQuadric; + PGLUTesselatorObj = PGLUTesselator; + PGLUTriangulatorObj = PGLUTesselator; + + // GLUQuadricCallback + TGLUQuadricErrorProc = procedure(errorCode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + // GLUTessCallback + TGLUTessBeginProc = procedure(AType: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessEdgeFlagProc = procedure(Flag: GLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessVertexProc = procedure(VertexData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessEndProc = procedure; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessErrorProc = procedure(ErrNo: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessCombineProc = procedure(Coords: TGLArrayd3; VertexData: TGLArrayp4; Weight: TGLArrayf4; OutData: PPointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessBeginDataProc = procedure(AType: GLenum; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessEdgeFlagDataProc = procedure(Flag: GLboolean; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessVertexDataProc = procedure(VertexData: Pointer; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessEndDataProc = procedure(UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessErrorDataProc = procedure(ErrNo: GLenum; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TGLUTessCombineDataProc = procedure(Coords: TGLArrayd3; VertexData: TGLArrayp4; Weight: TGLArrayf4; OutData: PPointer; UserData: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + // GLUNurbsCallback + TGLUNurbsErrorProc = procedure(ErrorCode: TGLEnum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + +var + GL_VERSION_1_0, + GL_VERSION_1_1, + GL_VERSION_1_2, + GL_VERSION_1_3, + GL_VERSION_1_4, + GL_VERSION_1_5, + GL_VERSION_2_0, + GL_VERSION_2_1, + GL_VERSION_3_0, + GL_VERSION_3_1, + GL_VERSION_3_2, + GLU_VERSION_1_1, + GLU_VERSION_1_2, + GLU_VERSION_1_3, + GL_3DFX_multisample, + GL_3DFX_tbuffer, + GL_3DFX_texture_compression_FXT1, + GL_APPLE_client_storage, + GL_APPLE_element_array, + GL_APPLE_fence, + GL_APPLE_specular_vector, + GL_APPLE_transform_hint, + GL_APPLE_vertex_array_object, + GL_APPLE_vertex_array_range, + GL_APPLE_ycbcr_422, + GL_APPLE_texture_range, + GL_APPLE_float_pixels, + GL_APPLE_vertex_program_evaluators, + GL_APPLE_aux_depth_stencil, + GL_APPLE_object_purgeable, + GL_APPLE_row_bytes, + GL_ARB_depth_texture, + GL_ARB_fragment_program, + GL_ARB_imaging, + GL_ARB_matrix_palette, + GL_ARB_multisample, + GL_ARB_multitexture, + GL_ARB_point_parameters, + GL_ARB_shadow, + GL_ARB_shadow_ambient, + GL_ARB_texture_border_clamp, + GL_ARB_texture_compression, + GL_ARB_texture_cube_map, + GL_ARB_texture_env_add, + GL_ARB_texture_env_combine, + GL_ARB_texture_env_crossbar, + GL_ARB_texture_env_dot3, + GL_ARB_texture_mirrored_repeat, + GL_ARB_transpose_matrix, + GL_ARB_vertex_blend, + GL_ARB_vertex_buffer_object, + GL_ARB_vertex_program, + GL_ARB_window_pos, + GL_ARB_shader_objects, + GL_ARB_vertex_shader, + GL_ARB_fragment_shader, + GL_ARB_shading_language_100, + GL_ARB_occlusion_query, + GL_ARB_texture_non_power_of_two, + GL_ARB_point_sprite, + GL_ARB_fragment_program_shadow, + GL_ARB_draw_buffers, + GL_ARB_texture_rectangle, + GL_ARB_color_buffer_float, + GL_ARB_half_float_pixel, + GL_ARB_texture_float, + GL_ARB_pixel_buffer_object, + GL_ARB_depth_buffer_float, + GL_ARB_draw_instanced, + GL_ARB_framebuffer_object, + GL_ARB_framebuffer_sRGB, + GL_ARB_geometry_shader4, + GL_ARB_half_float_vertex, + GL_ARB_instanced_arrays, + GL_ARB_map_buffer_range, + GL_ARB_texture_buffer_object, + GL_ARB_texture_compression_rgtc, + GL_ARB_texture_rg, + GL_ARB_vertex_array_object, + GL_ARB_uniform_buffer_object, + GL_ARB_compatibility, + GL_ARB_copy_buffer, + GL_ARB_shader_texture_lod, + GL_ARB_depth_clamp, + GL_ARB_draw_elements_base_vertex, + GL_ARB_fragment_coord_conventions, + GL_ARB_provoking_vertex, + GL_ARB_seamless_cube_map, + GL_ARB_sync, + GL_ARB_texture_multisample, + GL_ARB_vertex_array_bgra, + GL_ARB_draw_buffers_blend, + GL_ARB_sample_shading, + GL_ARB_texture_cube_map_array, + GL_ARB_texture_gather, + GL_ARB_texture_query_lod, + GL_ATI_draw_buffers, + GL_ATI_element_array, + GL_ATI_envmap_bumpmap, + GL_ATI_fragment_shader, + GL_ATI_map_object_buffer, + GL_ATI_pn_triangles, + GL_ATI_separate_stencil, + GL_ATI_text_fragment_shader, + GL_ATI_texture_env_combine3, + GL_ATI_texture_float, + GL_ATI_texture_mirror_once, + GL_ATI_vertex_array_object, + GL_ATI_vertex_attrib_array_object, + GL_ATI_vertex_streams, + GL_ATI_meminfo, + GL_AMD_performance_monitor, + GL_AMD_texture_texture4, + GL_AMD_vertex_shader_tesselator, + GL_AMD_draw_buffers_blend, + GL_EXT_422_pixels, + GL_EXT_abgr, + GL_EXT_bgra, + GL_EXT_blend_color, + GL_EXT_blend_func_separate, + GL_EXT_blend_logic_op, + GL_EXT_blend_minmax, + GL_EXT_blend_subtract, + GL_EXT_clip_volume_hint, + GL_EXT_cmyka, + GL_EXT_color_matrix, + GL_EXT_color_subtable, + GL_EXT_compiled_vertex_array, + GL_EXT_convolution, + GL_EXT_coordinate_frame, + GL_EXT_copy_texture, + GL_EXT_cull_vertex, + GL_EXT_draw_range_elements, + GL_EXT_fog_coord, + GL_EXT_framebuffer_object, + GL_EXT_histogram, + GL_EXT_index_array_formats, + GL_EXT_index_func, + GL_EXT_index_material, + GL_EXT_index_texture, + GL_EXT_light_texture, + GL_EXT_misc_attribute, + GL_EXT_multi_draw_arrays, + GL_EXT_multisample, + GL_EXT_packed_pixels, + GL_EXT_paletted_texture, + GL_EXT_pixel_transform, + GL_EXT_pixel_transform_color_table, + GL_EXT_point_parameters, + GL_EXT_polygon_offset, + GL_EXT_rescale_normal, + GL_EXT_secondary_color, + GL_EXT_separate_specular_color, + GL_EXT_shadow_funcs, + GL_EXT_shared_texture_palette, + GL_EXT_stencil_two_side, + GL_EXT_stencil_wrap, + GL_EXT_subtexture, + GL_EXT_texture, + GL_EXT_texture3D, + GL_EXT_texture_compression_s3tc, + GL_EXT_texture_cube_map, + GL_EXT_texture_edge_clamp, + GL_EXT_texture_env_add, + GL_EXT_texture_env_combine, + GL_EXT_texture_env_dot3, + GL_EXT_texture_filter_anisotropic, + GL_EXT_texture_lod_bias, + GL_EXT_texture_object, + GL_EXT_texture_perturb_normal, + GL_EXT_texture_rectangle, + GL_EXT_vertex_array, + GL_EXT_vertex_shader, + GL_EXT_vertex_weighting, + GL_EXT_depth_bounds_test, + GL_EXT_texture_mirror_clamp, + GL_EXT_blend_equation_separate, + GL_EXT_pixel_buffer_object, + GL_EXT_texture_compression_dxt1, + GL_EXT_stencil_clear_tag, + GL_EXT_packed_depth_stencil, + GL_EXT_texture_sRGB, + GL_EXT_framebuffer_blit, + GL_EXT_framebuffer_multisample, + GL_EXT_timer_query, + GL_EXT_gpu_program_parameters, + GL_EXT_bindable_uniform, + GL_EXT_draw_buffers2, + GL_EXT_draw_instanced, + GL_EXT_framebuffer_sRGB, + GL_EXT_geometry_shader4, + GL_EXT_gpu_shader4, + GL_EXT_packed_float, + GL_EXT_texture_array, + GL_EXT_texture_buffer_object, + GL_EXT_texture_compression_latc, + GL_EXT_texture_compression_rgtc, + GL_EXT_texture_integer, + GL_EXT_texture_shared_exponent, + GL_EXT_transform_feedback, + GL_EXT_direct_state_access, + GL_EXT_vertex_array_bgra, + GL_EXT_texture_swizzle, + GL_EXT_provoking_vertex, + GL_EXT_texture_snorm, + GL_FfdMaskSGIX, + GL_HP_convolution_border_modes, + GL_HP_image_transform, + GL_HP_occlusion_test, + GL_HP_texture_lighting, + GL_IBM_cull_vertex, + GL_IBM_multimode_draw_arrays, + GL_IBM_rasterpos_clip, + GL_IBM_texture_mirrored_repeat, + GL_IBM_vertex_array_lists, + GL_INGR_blend_func_separate, + GL_INGR_color_clamp, + GL_INGR_interlace_read, + GL_INGR_palette_buffer, + GL_INTEL_parallel_arrays, + GL_INTEL_texture_scissor, + GL_MESA_resize_buffers, + GL_MESA_window_pos, + GL_NV_blend_square, + GL_NV_copy_depth_to_color, + GL_NV_depth_clamp, + GL_NV_evaluators, + GL_NV_fence, + GL_NV_float_buffer, + GL_NV_fog_distance, + GL_NV_fragment_program, + GL_NV_half_float, + GL_NV_light_max_exponent, + GL_NV_multisample_filter_hint, + GL_NV_occlusion_query, + GL_NV_packed_depth_stencil, + GL_NV_pixel_data_range, + GL_NV_point_sprite, + GL_NV_primitive_restart, + GL_NV_register_combiners, + GL_NV_register_combiners2, + GL_NV_texgen_emboss, + GL_NV_texgen_reflection, + GL_NV_texture_compression_vtc, + GL_NV_texture_env_combine4, + GL_NV_texture_expand_normal, + GL_NV_texture_rectangle, + GL_NV_texture_shader, + GL_NV_texture_shader2, + GL_NV_texture_shader3, + GL_NV_vertex_array_range, + GL_NV_vertex_array_range2, + GL_NV_vertex_program, + GL_NV_vertex_program1_1, + GL_NV_vertex_program2, + GL_NV_fragment_program_option, + GL_NV_fragment_program2, + GL_NV_vertex_program2_option, + GL_NV_vertex_program3, + GL_NV_depth_buffer_float, + GL_NV_fragment_program4, + GL_NV_framebuffer_multisample_coverage, + GL_NV_geometry_program4, + GL_NV_gpu_program4, + GL_NV_parameter_buffer_object, + GL_NV_transform_feedback, + GL_NV_vertex_program4, + GL_NV_conditional_render, + GL_NV_present_video, + GL_NV_explicit_multisample, + GL_NV_transform_feedback2, + GL_OML_interlace, + GL_OML_resample, + GL_OML_subsample, + GL_PGI_misc_hints, + GL_PGI_vertex_hints, + GL_REND_screen_coordinates, + GL_S3_s3tc, + GL_SGIS_detail_texture, + GL_SGIS_fog_function, + GL_SGIS_generate_mipmap, + GL_SGIS_multisample, + GL_SGIS_pixel_texture, + GL_SGIS_point_line_texgen, + GL_SGIS_point_parameters, + GL_SGIS_sharpen_texture, + GL_SGIS_texture4D, + GL_SGIS_texture_border_clamp, + GL_SGIS_texture_color_mask, + GL_SGIS_texture_edge_clamp, + GL_SGIS_texture_filter4, + GL_SGIS_texture_lod, + GL_SGIS_texture_select, + GL_SGIX_async, + GL_SGIX_async_histogram, + GL_SGIX_async_pixel, + GL_SGIX_blend_alpha_minmax, + GL_SGIX_calligraphic_fragment, + GL_SGIX_clipmap, + GL_SGIX_convolution_accuracy, + GL_SGIX_depth_pass_instrument, + GL_SGIX_depth_texture, + GL_SGIX_flush_raster, + GL_SGIX_fog_offset, + GL_SGIX_fog_scale, + GL_SGIX_fragment_lighting, + GL_SGIX_framezoom, + GL_SGIX_igloo_interface, + GL_SGIX_impact_pixel_texture, + GL_SGIX_instruments, + GL_SGIX_interlace, + GL_SGIX_ir_instrument1, + GL_SGIX_list_priority, + GL_SGIX_pixel_texture, + GL_SGIX_pixel_tiles, + GL_SGIX_polynomial_ffd, + GL_SGIX_reference_plane, + GL_SGIX_resample, + GL_SGIX_scalebias_hint, + GL_SGIX_shadow, + GL_SGIX_shadow_ambient, + GL_SGIX_sprite, + GL_SGIX_subsample, + GL_SGIX_tag_sample_buffer, + GL_SGIX_texture_add_env, + GL_SGIX_texture_coordinate_clamp, + GL_SGIX_texture_lod_bias, + GL_SGIX_texture_multi_buffer, + GL_SGIX_texture_scale_bias, + GL_SGIX_texture_select, + GL_SGIX_vertex_preclip, + GL_SGIX_ycrcb, + GL_SGIX_ycrcb_subsample, + GL_SGIX_ycrcba, + GL_SGI_color_matrix, + GL_SGI_color_table, + GL_SGI_depth_pass_instrument, + GL_SGI_texture_color_table, + GL_SUNX_constant_data, + GL_SUN_convolution_border_modes, + GL_SUN_global_alpha, + GL_SUN_mesh_array, + GL_SUN_slice_accum, + GL_SUN_triangle_list, + GL_SUN_vertex, + + GL_WIN_phong_shading, + GL_WIN_specular_fog, + WGL_3DFX_multisample, + WGL_ARB_buffer_region, + WGL_ARB_extensions_string, + WGL_ARB_make_current_read, + WGL_ARB_multisample, + WGL_ARB_pbuffer, + WGL_ARB_pixel_format, + WGL_ARB_pixel_format_float, + WGL_ARB_render_texture, + WGL_ARB_create_context, + WGL_ARB_create_context_profile, + WGL_ATI_pixel_format_float, + WGL_AMD_gpu_association, + WGL_EXT_depth_float, + WGL_EXT_display_color_table, + WGL_EXT_extensions_string, + WGL_EXT_make_current_read, + WGL_EXT_multisample, + WGL_EXT_pbuffer, + WGL_EXT_pixel_format, + WGL_EXT_swap_control, + WGL_I3D_digital_video_control, + WGL_I3D_gamma, + WGL_I3D_genlock, + WGL_I3D_image_buffer, + WGL_I3D_swap_frame_lock, + WGL_I3D_swap_frame_usage, + WGL_NV_float_buffer, + WGL_NV_render_depth_texture, + WGL_NV_render_texture_rectangle, + WGL_NV_vertex_array_range, + WGL_NV_present_video, + WGL_NV_video_out, + WGL_NV_swap_group, + WGL_NV_gpu_affinity, + WGL_OML_sync_control, + WGL_3DL_stereo_control, + WIN_draw_range_elements, + WIN_swap_hint, + +// GLX_VERSION_1_0, + GLX_VERSION_1_3, + GLX_VERSION_1_4, + GLX_ARB_multisample, + GLX_ARB_fbconfig_float, + GLX_ARB_get_proc_address, + GLX_ARB_create_context, + GLX_ARB_create_context_profile, + GLX_EXT_visual_info, + GLX_EXT_visual_rating, + GLX_EXT_import_context, + GLX_EXT_fbconfig_packed_float, + GLX_EXT_framebuffer_sRGB, + GLX_EXT_texture_from_pixmap: Boolean; + +const + // GL_VERSION_1_1 + { AttribMask } + GL_DEPTH_BUFFER_BIT = $00000100; + GL_STENCIL_BUFFER_BIT = $00000400; + GL_COLOR_BUFFER_BIT = $00004000; + { Boolean } + GL_TRUE = 1; + GL_FALSE = 0; + { BeginMode } + GL_POINTS = $0000; + GL_LINES = $0001; + GL_LINE_LOOP = $0002; + GL_LINE_STRIP = $0003; + GL_TRIANGLES = $0004; + GL_TRIANGLE_STRIP = $0005; + GL_TRIANGLE_FAN = $0006; + { AlphaFunction } + GL_NEVER = $0200; + GL_LESS = $0201; + GL_EQUAL = $0202; + GL_LEQUAL = $0203; + GL_GREATER = $0204; + GL_NOTEQUAL = $0205; + GL_GEQUAL = $0206; + GL_ALWAYS = $0207; + { BlendingFactorDest } + GL_ZERO = 0; + GL_ONE = 1; + GL_SRC_COLOR = $0300; + GL_ONE_MINUS_SRC_COLOR = $0301; + GL_SRC_ALPHA = $0302; + GL_ONE_MINUS_SRC_ALPHA = $0303; + GL_DST_ALPHA = $0304; + GL_ONE_MINUS_DST_ALPHA = $0305; + { BlendingFactorSrc } + GL_DST_COLOR = $0306; + GL_ONE_MINUS_DST_COLOR = $0307; + GL_SRC_ALPHA_SATURATE = $0308; + { DrawBufferMode } + GL_NONE = 0; + GL_FRONT_LEFT = $0400; + GL_FRONT_RIGHT = $0401; + GL_BACK_LEFT = $0402; + GL_BACK_RIGHT = $0403; + GL_FRONT = $0404; + GL_BACK = $0405; + GL_LEFT = $0406; + GL_RIGHT = $0407; + GL_FRONT_AND_BACK = $0408; + { ErrorCode } + GL_NO_ERROR = 0; + GL_INVALID_ENUM = $0500; + GL_INVALID_VALUE = $0501; + GL_INVALID_OPERATION = $0502; + GL_OUT_OF_MEMORY = $0505; + { FrontFaceDirection } + GL_CW = $0900; + GL_CCW = $0901; + { GetPName } + GL_POINT_SIZE = $0B11; + GL_POINT_SIZE_RANGE = $0B12; + GL_POINT_SIZE_GRANULARITY = $0B13; + GL_LINE_SMOOTH = $0B20; + GL_LINE_WIDTH = $0B21; + GL_LINE_WIDTH_RANGE = $0B22; + GL_LINE_WIDTH_GRANULARITY = $0B23; + GL_POLYGON_SMOOTH = $0B41; + GL_CULL_FACE = $0B44; + GL_CULL_FACE_MODE = $0B45; + GL_FRONT_FACE = $0B46; + GL_DEPTH_RANGE = $0B70; + GL_DEPTH_TEST = $0B71; + GL_DEPTH_WRITEMASK = $0B72; + GL_DEPTH_CLEAR_VALUE = $0B73; + GL_DEPTH_FUNC = $0B74; + GL_STENCIL_TEST = $0B90; + GL_STENCIL_CLEAR_VALUE = $0B91; + GL_STENCIL_FUNC = $0B92; + GL_STENCIL_VALUE_MASK = $0B93; + GL_STENCIL_FAIL = $0B94; + GL_STENCIL_PASS_DEPTH_FAIL = $0B95; + GL_STENCIL_PASS_DEPTH_PASS = $0B96; + GL_STENCIL_REF = $0B97; + GL_STENCIL_WRITEMASK = $0B98; + GL_VIEWPORT = $0BA2; + GL_DITHER = $0BD0; + GL_BLEND_DST = $0BE0; + GL_BLEND_SRC = $0BE1; + GL_BLEND = $0BE2; + GL_LOGIC_OP_MODE = $0BF0; + GL_COLOR_LOGIC_OP = $0BF2; + GL_DRAW_BUFFER = $0C01; + GL_READ_BUFFER = $0C02; + GL_SCISSOR_BOX = $0C10; + GL_SCISSOR_TEST = $0C11; + GL_COLOR_CLEAR_VALUE = $0C22; + GL_COLOR_WRITEMASK = $0C23; + GL_DOUBLEBUFFER = $0C32; + GL_STEREO = $0C33; + GL_LINE_SMOOTH_HINT = $0C52; + GL_POLYGON_SMOOTH_HINT = $0C53; + GL_UNPACK_SWAP_BYTES = $0CF0; + GL_UNPACK_LSB_FIRST = $0CF1; + GL_UNPACK_ROW_LENGTH = $0CF2; + GL_UNPACK_SKIP_ROWS = $0CF3; + GL_UNPACK_SKIP_PIXELS = $0CF4; + GL_UNPACK_ALIGNMENT = $0CF5; + GL_PACK_SWAP_BYTES = $0D00; + GL_PACK_LSB_FIRST = $0D01; + GL_PACK_ROW_LENGTH = $0D02; + GL_PACK_SKIP_ROWS = $0D03; + GL_PACK_SKIP_PIXELS = $0D04; + GL_PACK_ALIGNMENT = $0D05; + GL_MAX_TEXTURE_SIZE = $0D33; + GL_MAX_VIEWPORT_DIMS = $0D3A; + GL_SUBPIXEL_BITS = $0D50; + GL_TEXTURE_1D = $0DE0; + GL_TEXTURE_2D = $0DE1; + GL_POLYGON_OFFSET_UNITS = $2A00; + GL_POLYGON_OFFSET_POINT = $2A01; + GL_POLYGON_OFFSET_LINE = $2A02; + GL_POLYGON_OFFSET_FILL = $8037; + GL_POLYGON_OFFSET_FACTOR = $8038; + GL_TEXTURE_BINDING_1D = $8068; + GL_TEXTURE_BINDING_2D = $8069; + { GetTextureParameter } + GL_TEXTURE_WIDTH = $1000; + GL_TEXTURE_HEIGHT = $1001; + GL_TEXTURE_INTERNAL_FORMAT = $1003; + GL_TEXTURE_BORDER_COLOR = $1004; + GL_TEXTURE_BORDER = $1005; + GL_TEXTURE_RED_SIZE = $805C; + GL_TEXTURE_GREEN_SIZE = $805D; + GL_TEXTURE_BLUE_SIZE = $805E; + GL_TEXTURE_ALPHA_SIZE = $805F; + { HintMode } + GL_DONT_CARE = $1100; + GL_FASTEST = $1101; + GL_NICEST = $1102; + { DataType } + GL_BYTE = $1400; + GL_UNSIGNED_BYTE = $1401; + GL_SHORT = $1402; + GL_UNSIGNED_SHORT = $1403; + GL_INT = $1404; + GL_UNSIGNED_INT = $1405; + GL_FLOAT = $1406; + GL_DOUBLE = $140A; + { LogicOp } + GL_CLEAR = $1500; + GL_AND = $1501; + GL_AND_REVERSE = $1502; + GL_COPY = $1503; + GL_AND_INVERTED = $1504; + GL_NOOP = $1505; + GL_XOR = $1506; + GL_OR = $1507; + GL_NOR = $1508; + GL_EQUIV = $1509; + GL_INVERT = $150A; + GL_OR_REVERSE = $150B; + GL_COPY_INVERTED = $150C; + GL_OR_INVERTED = $150D; + GL_NAND = $150E; + GL_SET = $150F; + { MatrixMode (for gl3.h, FBO attachment type) } + GL_TEXTURE = $1702; + { PixelCopyType } + GL_COLOR = $1800; + GL_DEPTH = $1801; + GL_STENCIL = $1802; + { PixelFormat } + GL_STENCIL_INDEX = $1901; + GL_DEPTH_COMPONENT = $1902; + GL_RED = $1903; + GL_GREEN = $1904; + GL_BLUE = $1905; + GL_ALPHA = $1906; + GL_RGB = $1907; + GL_RGBA = $1908; + { PolygonMode } + GL_POINT = $1B00; + GL_LINE = $1B01; + GL_FILL = $1B02; + { StencilOp } + GL_KEEP = $1E00; + GL_REPLACE = $1E01; + GL_INCR = $1E02; + GL_DECR = $1E03; + { StringName } + GL_VENDOR = $1F00; + GL_RENDERER = $1F01; + GL_VERSION = $1F02; + GL_EXTENSIONS = $1F03; + { TextureMagFilter } + GL_NEAREST = $2600; + GL_LINEAR = $2601; + { TextureMinFilter } + GL_NEAREST_MIPMAP_NEAREST = $2700; + GL_LINEAR_MIPMAP_NEAREST = $2701; + GL_NEAREST_MIPMAP_LINEAR = $2702; + GL_LINEAR_MIPMAP_LINEAR = $2703; + { TextureParameterName } + GL_TEXTURE_MAG_FILTER = $2800; + GL_TEXTURE_MIN_FILTER = $2801; + GL_TEXTURE_WRAP_S = $2802; + GL_TEXTURE_WRAP_T = $2803; + { TextureTarget } + GL_PROXY_TEXTURE_1D = $8063; + GL_PROXY_TEXTURE_2D = $8064; + { TextureWrapMode } + GL_REPEAT = $2901; + { PixelInternalFormat } + GL_R3_G3_B2 = $2A10; + GL_RGB4 = $804F; + GL_RGB5 = $8050; + GL_RGB8 = $8051; + GL_RGB10 = $8052; + GL_RGB12 = $8053; + GL_RGB16 = $8054; + GL_RGBA2 = $8055; + GL_RGBA4 = $8056; + GL_RGB5_A1 = $8057; + GL_RGBA8 = $8058; + GL_RGB10_A2 = $8059; + GL_RGBA12 = $805A; + GL_RGBA16 = $805B; +{$ifdef DGL_DEPRECATED} + GL_ACCUM = $0100; + GL_LOAD = $0101; + GL_RETURN = $0102; + GL_MULT = $0103; + GL_ADD = $0104; + GL_CURRENT_BIT = $00000001; + GL_POINT_BIT = $00000002; + GL_LINE_BIT = $00000004; + GL_POLYGON_BIT = $00000008; + GL_POLYGON_STIPPLE_BIT = $00000010; + GL_PIXEL_MODE_BIT = $00000020; + GL_LIGHTING_BIT = $00000040; + GL_FOG_BIT = $00000080; + GL_ACCUM_BUFFER_BIT = $00000200; + GL_VIEWPORT_BIT = $00000800; + GL_TRANSFORM_BIT = $00001000; + GL_ENABLE_BIT = $00002000; + GL_HINT_BIT = $00008000; + GL_EVAL_BIT = $00010000; + GL_LIST_BIT = $00020000; + GL_TEXTURE_BIT = $00040000; + GL_SCISSOR_BIT = $00080000; + GL_ALL_ATTRIB_BITS = $000FFFFF; + GL_QUADS = $0007; + GL_QUAD_STRIP = $0008; + GL_POLYGON = $0009; + GL_CLIP_PLANE0 = $3000; + GL_CLIP_PLANE1 = $3001; + GL_CLIP_PLANE2 = $3002; + GL_CLIP_PLANE3 = $3003; + GL_CLIP_PLANE4 = $3004; + GL_CLIP_PLANE5 = $3005; + GL_2_BYTES = $1407; + GL_3_BYTES = $1408; + GL_4_BYTES = $1409; + GL_AUX0 = $0409; + GL_AUX1 = $040A; + GL_AUX2 = $040B; + GL_AUX3 = $040C; + GL_STACK_OVERFLOW = $0503; + GL_STACK_UNDERFLOW = $0504; + GL_2D = $0600; + GL_3D = $0601; + GL_3D_COLOR = $0602; + GL_3D_COLOR_TEXTURE = $0603; + GL_4D_COLOR_TEXTURE = $0604; + GL_PASS_THROUGH_TOKEN = $0700; + GL_POINT_TOKEN = $0701; + GL_LINE_TOKEN = $0702; + GL_POLYGON_TOKEN = $0703; + GL_BITMAP_TOKEN = $0704; + GL_DRAW_PIXEL_TOKEN = $0705; + GL_COPY_PIXEL_TOKEN = $0706; + GL_LINE_RESET_TOKEN = $0707; + GL_EXP = $0800; + GL_EXP2 = $0801; + GL_COEFF = $0A00; + GL_ORDER = $0A01; + GL_DOMAIN = $0A02; + GL_CURRENT_COLOR = $0B00; + GL_CURRENT_INDEX = $0B01; + GL_CURRENT_NORMAL = $0B02; + GL_CURRENT_TEXTURE_COORDS = $0B03; + GL_CURRENT_RASTER_COLOR = $0B04; + GL_CURRENT_RASTER_INDEX = $0B05; + GL_CURRENT_RASTER_TEXTURE_COORDS = $0B06; + GL_CURRENT_RASTER_POSITION = $0B07; + GL_CURRENT_RASTER_POSITION_VALID = $0B08; + GL_CURRENT_RASTER_DISTANCE = $0B09; + GL_POINT_SMOOTH = $0B10; + GL_LINE_STIPPLE = $0B24; + GL_LINE_STIPPLE_PATTERN = $0B25; + GL_LINE_STIPPLE_REPEAT = $0B26; + GL_LIST_MODE = $0B30; + GL_MAX_LIST_NESTING = $0B31; + GL_LIST_BASE = $0B32; + GL_LIST_INDEX = $0B33; + GL_POLYGON_MODE = $0B40; + GL_POLYGON_STIPPLE = $0B42; + GL_EDGE_FLAG = $0B43; + GL_LIGHTING = $0B50; + GL_LIGHT_MODEL_LOCAL_VIEWER = $0B51; + GL_LIGHT_MODEL_TWO_SIDE = $0B52; + GL_LIGHT_MODEL_AMBIENT = $0B53; + GL_SHADE_MODEL = $0B54; + GL_COLOR_MATERIAL_FACE = $0B55; + GL_COLOR_MATERIAL_PARAMETER = $0B56; + GL_COLOR_MATERIAL = $0B57; + GL_FOG = $0B60; + GL_FOG_INDEX = $0B61; + GL_FOG_DENSITY = $0B62; + GL_FOG_START = $0B63; + GL_FOG_END = $0B64; + GL_FOG_MODE = $0B65; + GL_FOG_COLOR = $0B66; + GL_ACCUM_CLEAR_VALUE = $0B80; + GL_MATRIX_MODE = $0BA0; + GL_NORMALIZE = $0BA1; + GL_MODELVIEW_STACK_DEPTH = $0BA3; + GL_PROJECTION_STACK_DEPTH = $0BA4; + GL_TEXTURE_STACK_DEPTH = $0BA5; + GL_MODELVIEW_MATRIX = $0BA6; + GL_PROJECTION_MATRIX = $0BA7; + GL_TEXTURE_MATRIX = $0BA8; + GL_ATTRIB_STACK_DEPTH = $0BB0; + GL_CLIENT_ATTRIB_STACK_DEPTH = $0BB1; + GL_ALPHA_TEST = $0BC0; + GL_ALPHA_TEST_FUNC = $0BC1; + GL_ALPHA_TEST_REF = $0BC2; + GL_INDEX_LOGIC_OP = $0BF1; + GL_AUX_BUFFERS = $0C00; + GL_INDEX_CLEAR_VALUE = $0C20; + GL_INDEX_WRITEMASK = $0C21; + GL_INDEX_MODE = $0C30; + GL_RGBA_MODE = $0C31; + GL_RENDER_MODE = $0C40; + GL_PERSPECTIVE_CORRECTION_HINT = $0C50; + GL_POINT_SMOOTH_HINT = $0C51; + GL_FOG_HINT = $0C54; + GL_TEXTURE_GEN_S = $0C60; + GL_TEXTURE_GEN_T = $0C61; + GL_TEXTURE_GEN_R = $0C62; + GL_TEXTURE_GEN_Q = $0C63; + GL_PIXEL_MAP_I_TO_I = $0C70; + GL_PIXEL_MAP_S_TO_S = $0C71; + GL_PIXEL_MAP_I_TO_R = $0C72; + GL_PIXEL_MAP_I_TO_G = $0C73; + GL_PIXEL_MAP_I_TO_B = $0C74; + GL_PIXEL_MAP_I_TO_A = $0C75; + GL_PIXEL_MAP_R_TO_R = $0C76; + GL_PIXEL_MAP_G_TO_G = $0C77; + GL_PIXEL_MAP_B_TO_B = $0C78; + GL_PIXEL_MAP_A_TO_A = $0C79; + GL_PIXEL_MAP_I_TO_I_SIZE = $0CB0; + GL_PIXEL_MAP_S_TO_S_SIZE = $0CB1; + GL_PIXEL_MAP_I_TO_R_SIZE = $0CB2; + GL_PIXEL_MAP_I_TO_G_SIZE = $0CB3; + GL_PIXEL_MAP_I_TO_B_SIZE = $0CB4; + GL_PIXEL_MAP_I_TO_A_SIZE = $0CB5; + GL_PIXEL_MAP_R_TO_R_SIZE = $0CB6; + GL_PIXEL_MAP_G_TO_G_SIZE = $0CB7; + GL_PIXEL_MAP_B_TO_B_SIZE = $0CB8; + GL_PIXEL_MAP_A_TO_A_SIZE = $0CB9; + GL_MAP_COLOR = $0D10; + GL_MAP_STENCIL = $0D11; + GL_INDEX_SHIFT = $0D12; + GL_INDEX_OFFSET = $0D13; + GL_RED_SCALE = $0D14; + GL_RED_BIAS = $0D15; + GL_ZOOM_X = $0D16; + GL_ZOOM_Y = $0D17; + GL_GREEN_SCALE = $0D18; + GL_GREEN_BIAS = $0D19; + GL_BLUE_SCALE = $0D1A; + GL_BLUE_BIAS = $0D1B; + GL_ALPHA_SCALE = $0D1C; + GL_ALPHA_BIAS = $0D1D; + GL_DEPTH_SCALE = $0D1E; + GL_DEPTH_BIAS = $0D1F; + GL_MAX_EVAL_ORDER = $0D30; + GL_MAX_LIGHTS = $0D31; + GL_MAX_CLIP_PLANES = $0D32; + GL_MAX_PIXEL_MAP_TABLE = $0D34; + GL_MAX_ATTRIB_STACK_DEPTH = $0D35; + GL_MAX_MODELVIEW_STACK_DEPTH = $0D36; + GL_MAX_NAME_STACK_DEPTH = $0D37; + GL_MAX_PROJECTION_STACK_DEPTH = $0D38; + GL_MAX_TEXTURE_STACK_DEPTH = $0D39; + GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = $0D3B; + GL_INDEX_BITS = $0D51; + GL_RED_BITS = $0D52; + GL_GREEN_BITS = $0D53; + GL_BLUE_BITS = $0D54; + GL_ALPHA_BITS = $0D55; + GL_DEPTH_BITS = $0D56; + GL_STENCIL_BITS = $0D57; + GL_ACCUM_RED_BITS = $0D58; + GL_ACCUM_GREEN_BITS = $0D59; + GL_ACCUM_BLUE_BITS = $0D5A; + GL_ACCUM_ALPHA_BITS = $0D5B; + GL_NAME_STACK_DEPTH = $0D70; + GL_AUTO_NORMAL = $0D80; + GL_MAP1_COLOR_4 = $0D90; + GL_MAP1_INDEX = $0D91; + GL_MAP1_NORMAL = $0D92; + GL_MAP1_TEXTURE_COORD_1 = $0D93; + GL_MAP1_TEXTURE_COORD_2 = $0D94; + GL_MAP1_TEXTURE_COORD_3 = $0D95; + GL_MAP1_TEXTURE_COORD_4 = $0D96; + GL_MAP1_VERTEX_3 = $0D97; + GL_MAP1_VERTEX_4 = $0D98; + GL_MAP2_COLOR_4 = $0DB0; + GL_MAP2_INDEX = $0DB1; + GL_MAP2_NORMAL = $0DB2; + GL_MAP2_TEXTURE_COORD_1 = $0DB3; + GL_MAP2_TEXTURE_COORD_2 = $0DB4; + GL_MAP2_TEXTURE_COORD_3 = $0DB5; + GL_MAP2_TEXTURE_COORD_4 = $0DB6; + GL_MAP2_VERTEX_3 = $0DB7; + GL_MAP2_VERTEX_4 = $0DB8; + GL_MAP1_GRID_DOMAIN = $0DD0; + GL_MAP1_GRID_SEGMENTS = $0DD1; + GL_MAP2_GRID_DOMAIN = $0DD2; + GL_MAP2_GRID_SEGMENTS = $0DD3; + GL_FEEDBACK_BUFFER_POINTER = $0DF0; + GL_FEEDBACK_BUFFER_SIZE = $0DF1; + GL_FEEDBACK_BUFFER_TYPE = $0DF2; + GL_SELECTION_BUFFER_POINTER = $0DF3; + GL_SELECTION_BUFFER_SIZE = $0DF4; + GL_LIGHT0 = $4000; + GL_LIGHT1 = $4001; + GL_LIGHT2 = $4002; + GL_LIGHT3 = $4003; + GL_LIGHT4 = $4004; + GL_LIGHT5 = $4005; + GL_LIGHT6 = $4006; + GL_LIGHT7 = $4007; + GL_AMBIENT = $1200; + GL_DIFFUSE = $1201; + GL_SPECULAR = $1202; + GL_POSITION = $1203; + GL_SPOT_DIRECTION = $1204; + GL_SPOT_EXPONENT = $1205; + GL_SPOT_CUTOFF = $1206; + GL_CONSTANT_ATTENUATION = $1207; + GL_LINEAR_ATTENUATION = $1208; + GL_QUADRATIC_ATTENUATION = $1209; + GL_COMPILE = $1300; + GL_COMPILE_AND_EXECUTE = $1301; + GL_EMISSION = $1600; + GL_SHININESS = $1601; + GL_AMBIENT_AND_DIFFUSE = $1602; + GL_COLOR_INDEXES = $1603; + GL_MODELVIEW = $1700; + GL_PROJECTION = $1701; + GL_COLOR_INDEX = $1900; + GL_LUMINANCE = $1909; + GL_LUMINANCE_ALPHA = $190A; + GL_BITMAP = $1A00; + GL_RENDER = $1C00; + GL_FEEDBACK = $1C01; + GL_SELECT = $1C02; + GL_FLAT = $1D00; + GL_SMOOTH = $1D01; + GL_S = $2000; + GL_T = $2001; + GL_R = $2002; + GL_Q = $2003; + GL_MODULATE = $2100; + GL_DECAL = $2101; + GL_TEXTURE_ENV_MODE = $2200; + GL_TEXTURE_ENV_COLOR = $2201; + GL_TEXTURE_ENV = $2300; + GL_EYE_LINEAR = $2400; + GL_OBJECT_LINEAR = $2401; + GL_SPHERE_MAP = $2402; + GL_TEXTURE_GEN_MODE = $2500; + GL_OBJECT_PLANE = $2501; + GL_EYE_PLANE = $2502; + GL_CLAMP = $2900; + GL_CLIENT_PIXEL_STORE_BIT = $00000001; + GL_CLIENT_VERTEX_ARRAY_BIT = $00000002; + GL_CLIENT_ALL_ATTRIB_BITS = $FFFFFFFF; + GL_ALPHA4 = $803B; + GL_ALPHA8 = $803C; + GL_ALPHA12 = $803D; + GL_ALPHA16 = $803E; + GL_LUMINANCE4 = $803F; + GL_LUMINANCE8 = $8040; + GL_LUMINANCE12 = $8041; + GL_LUMINANCE16 = $8042; + GL_LUMINANCE4_ALPHA4 = $8043; + GL_LUMINANCE6_ALPHA2 = $8044; + GL_LUMINANCE8_ALPHA8 = $8045; + GL_LUMINANCE12_ALPHA4 = $8046; + GL_LUMINANCE12_ALPHA12 = $8047; + GL_LUMINANCE16_ALPHA16 = $8048; + GL_INTENSITY = $8049; + GL_INTENSITY4 = $804A; + GL_INTENSITY8 = $804B; + GL_INTENSITY12 = $804C; + GL_INTENSITY16 = $804D; + GL_TEXTURE_LUMINANCE_SIZE = $8060; + GL_TEXTURE_INTENSITY_SIZE = $8061; + GL_TEXTURE_PRIORITY = $8066; + GL_TEXTURE_RESIDENT = $8067; + GL_VERTEX_ARRAY = $8074; + GL_NORMAL_ARRAY = $8075; + GL_COLOR_ARRAY = $8076; + GL_INDEX_ARRAY = $8077; + GL_TEXTURE_COORD_ARRAY = $8078; + GL_EDGE_FLAG_ARRAY = $8079; + GL_VERTEX_ARRAY_SIZE = $807A; + GL_VERTEX_ARRAY_TYPE = $807B; + GL_VERTEX_ARRAY_STRIDE = $807C; + GL_NORMAL_ARRAY_TYPE = $807E; + GL_NORMAL_ARRAY_STRIDE = $807F; + GL_COLOR_ARRAY_SIZE = $8081; + GL_COLOR_ARRAY_TYPE = $8082; + GL_COLOR_ARRAY_STRIDE = $8083; + GL_INDEX_ARRAY_TYPE = $8085; + GL_INDEX_ARRAY_STRIDE = $8086; + GL_TEXTURE_COORD_ARRAY_SIZE = $8088; + GL_TEXTURE_COORD_ARRAY_TYPE = $8089; + GL_TEXTURE_COORD_ARRAY_STRIDE = $808A; + GL_EDGE_FLAG_ARRAY_STRIDE = $808C; + GL_VERTEX_ARRAY_POINTER = $808E; + GL_NORMAL_ARRAY_POINTER = $808F; + GL_COLOR_ARRAY_POINTER = $8090; + GL_INDEX_ARRAY_POINTER = $8091; + GL_TEXTURE_COORD_ARRAY_POINTER = $8092; + GL_EDGE_FLAG_ARRAY_POINTER = $8093; + GL_V2F = $2A20; + GL_V3F = $2A21; + GL_C4UB_V2F = $2A22; + GL_C4UB_V3F = $2A23; + GL_C3F_V3F = $2A24; + GL_N3F_V3F = $2A25; + GL_C4F_N3F_V3F = $2A26; + GL_T2F_V3F = $2A27; + GL_T4F_V4F = $2A28; + GL_T2F_C4UB_V3F = $2A29; + GL_T2F_C3F_V3F = $2A2A; + GL_T2F_N3F_V3F = $2A2B; + GL_T2F_C4F_N3F_V3F = $2A2C; + GL_T4F_C4F_N3F_V4F = $2A2D; + GL_COLOR_TABLE_FORMAT_EXT = $80D8; + GL_COLOR_TABLE_WIDTH_EXT = $80D9; + GL_COLOR_TABLE_RED_SIZE_EXT = $80DA; + GL_COLOR_TABLE_GREEN_SIZE_EXT = $80DB; + GL_COLOR_TABLE_BLUE_SIZE_EXT = $80DC; + GL_COLOR_TABLE_ALPHA_SIZE_EXT = $80DD; + GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = $80DE; + GL_COLOR_TABLE_INTENSITY_SIZE_EXT = $80DF; + GL_LOGIC_OP = GL_INDEX_LOGIC_OP; + GL_TEXTURE_COMPONENTS = GL_TEXTURE_INTERNAL_FORMAT; +{$endif} + + // GL_VERSION_1_2 + GL_UNSIGNED_BYTE_3_3_2 = $8032; + GL_UNSIGNED_SHORT_4_4_4_4 = $8033; + GL_UNSIGNED_SHORT_5_5_5_1 = $8034; + GL_UNSIGNED_INT_8_8_8_8 = $8035; + GL_UNSIGNED_INT_10_10_10_2 = $8036; + GL_TEXTURE_BINDING_3D = $806A; + GL_PACK_SKIP_IMAGES = $806B; + GL_PACK_IMAGE_HEIGHT = $806C; + GL_UNPACK_SKIP_IMAGES = $806D; + GL_UNPACK_IMAGE_HEIGHT = $806E; + GL_TEXTURE_3D = $806F; + GL_PROXY_TEXTURE_3D = $8070; + GL_TEXTURE_DEPTH = $8071; + GL_TEXTURE_WRAP_R = $8072; + GL_MAX_3D_TEXTURE_SIZE = $8073; + GL_UNSIGNED_BYTE_2_3_3_REV = $8362; + GL_UNSIGNED_SHORT_5_6_5 = $8363; + GL_UNSIGNED_SHORT_5_6_5_REV = $8364; + GL_UNSIGNED_SHORT_4_4_4_4_REV = $8365; + GL_UNSIGNED_SHORT_1_5_5_5_REV = $8366; + GL_UNSIGNED_INT_8_8_8_8_REV = $8367; + GL_UNSIGNED_INT_2_10_10_10_REV = $8368; + GL_BGR = $80E0; + GL_BGRA = $80E1; + GL_MAX_ELEMENTS_VERTICES = $80E8; + GL_MAX_ELEMENTS_INDICES = $80E9; + GL_CLAMP_TO_EDGE = $812F; + GL_TEXTURE_MIN_LOD = $813A; + GL_TEXTURE_MAX_LOD = $813B; + GL_TEXTURE_BASE_LEVEL = $813C; + GL_TEXTURE_MAX_LEVEL = $813D; + GL_SMOOTH_POINT_SIZE_RANGE = $0B12; + GL_SMOOTH_POINT_SIZE_GRANULARITY = $0B13; + GL_SMOOTH_LINE_WIDTH_RANGE = $0B22; + GL_SMOOTH_LINE_WIDTH_GRANULARITY = $0B23; + GL_ALIASED_LINE_WIDTH_RANGE = $846E; +{$ifdef DGL_DEPRECATED} + GL_RESCALE_NORMAL = $803A; + GL_LIGHT_MODEL_COLOR_CONTROL = $81F8; + GL_SINGLE_COLOR = $81F9; + GL_SEPARATE_SPECULAR_COLOR = $81FA; + GL_ALIASED_POINT_SIZE_RANGE = $846D; +{$endif} + + // GL_VERSION_1_3 + GL_TEXTURE0 = $84C0; + GL_TEXTURE1 = $84C1; + GL_TEXTURE2 = $84C2; + GL_TEXTURE3 = $84C3; + GL_TEXTURE4 = $84C4; + GL_TEXTURE5 = $84C5; + GL_TEXTURE6 = $84C6; + GL_TEXTURE7 = $84C7; + GL_TEXTURE8 = $84C8; + GL_TEXTURE9 = $84C9; + GL_TEXTURE10 = $84CA; + GL_TEXTURE11 = $84CB; + GL_TEXTURE12 = $84CC; + GL_TEXTURE13 = $84CD; + GL_TEXTURE14 = $84CE; + GL_TEXTURE15 = $84CF; + GL_TEXTURE16 = $84D0; + GL_TEXTURE17 = $84D1; + GL_TEXTURE18 = $84D2; + GL_TEXTURE19 = $84D3; + GL_TEXTURE20 = $84D4; + GL_TEXTURE21 = $84D5; + GL_TEXTURE22 = $84D6; + GL_TEXTURE23 = $84D7; + GL_TEXTURE24 = $84D8; + GL_TEXTURE25 = $84D9; + GL_TEXTURE26 = $84DA; + GL_TEXTURE27 = $84DB; + GL_TEXTURE28 = $84DC; + GL_TEXTURE29 = $84DD; + GL_TEXTURE30 = $84DE; + GL_TEXTURE31 = $84DF; + GL_ACTIVE_TEXTURE = $84E0; + GL_MULTISAMPLE = $809D; + GL_SAMPLE_ALPHA_TO_COVERAGE = $809E; + GL_SAMPLE_ALPHA_TO_ONE = $809F; + GL_SAMPLE_COVERAGE = $80A0; + GL_SAMPLE_BUFFERS = $80A8; + GL_SAMPLES = $80A9; + GL_SAMPLE_COVERAGE_VALUE = $80AA; + GL_SAMPLE_COVERAGE_INVERT = $80AB; + GL_TEXTURE_CUBE_MAP = $8513; + GL_TEXTURE_BINDING_CUBE_MAP = $8514; + GL_TEXTURE_CUBE_MAP_POSITIVE_X = $8515; + GL_TEXTURE_CUBE_MAP_NEGATIVE_X = $8516; + GL_TEXTURE_CUBE_MAP_POSITIVE_Y = $8517; + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = $8518; + GL_TEXTURE_CUBE_MAP_POSITIVE_Z = $8519; + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = $851A; + GL_PROXY_TEXTURE_CUBE_MAP = $851B; + GL_MAX_CUBE_MAP_TEXTURE_SIZE = $851C; + GL_COMPRESSED_RGB = $84ED; + GL_COMPRESSED_RGBA = $84EE; + GL_TEXTURE_COMPRESSION_HINT = $84EF; + GL_TEXTURE_COMPRESSED_IMAGE_SIZE = $86A0; + GL_TEXTURE_COMPRESSED = $86A1; + GL_NUM_COMPRESSED_TEXTURE_FORMATS = $86A2; + GL_COMPRESSED_TEXTURE_FORMATS = $86A3; + GL_CLAMP_TO_BORDER = $812D; +{$ifdef DGL_DEPRECATED} + GL_CLIENT_ACTIVE_TEXTURE = $84E1; + GL_MAX_TEXTURE_UNITS = $84E2; + GL_TRANSPOSE_MODELVIEW_MATRIX = $84E3; + GL_TRANSPOSE_PROJECTION_MATRIX = $84E4; + GL_TRANSPOSE_TEXTURE_MATRIX = $84E5; + GL_TRANSPOSE_COLOR_MATRIX = $84E6; + GL_MULTISAMPLE_BIT = $20000000; + GL_NORMAL_MAP = $8511; + GL_REFLECTION_MAP = $8512; + GL_COMPRESSED_ALPHA = $84E9; + GL_COMPRESSED_LUMINANCE = $84EA; + GL_COMPRESSED_LUMINANCE_ALPHA = $84EB; + GL_COMPRESSED_INTENSITY = $84EC; + GL_COMBINE = $8570; + GL_COMBINE_RGB = $8571; + GL_COMBINE_ALPHA = $8572; + GL_SOURCE0_RGB = $8580; + GL_SOURCE1_RGB = $8581; + GL_SOURCE2_RGB = $8582; + GL_SOURCE0_ALPHA = $8588; + GL_SOURCE1_ALPHA = $8589; + GL_SOURCE2_ALPHA = $858A; + GL_OPERAND0_RGB = $8590; + GL_OPERAND1_RGB = $8591; + GL_OPERAND2_RGB = $8592; + GL_OPERAND0_ALPHA = $8598; + GL_OPERAND1_ALPHA = $8599; + GL_OPERAND2_ALPHA = $859A; + GL_RGB_SCALE = $8573; + GL_ADD_SIGNED = $8574; + GL_INTERPOLATE = $8575; + GL_SUBTRACT = $84E7; + GL_CONSTANT = $8576; + GL_PRIMARY_COLOR = $8577; + GL_PREVIOUS = $8578; + GL_DOT3_RGB = $86AE; + GL_DOT3_RGBA = $86AF; +{$endif} + + // GL_VERSION_1_4 + GL_BLEND_DST_RGB = $80C8; + GL_BLEND_SRC_RGB = $80C9; + GL_BLEND_DST_ALPHA = $80CA; + GL_BLEND_SRC_ALPHA = $80CB; + GL_POINT_FADE_THRESHOLD_SIZE = $8128; + GL_DEPTH_COMPONENT16 = $81A5; + GL_DEPTH_COMPONENT24 = $81A6; + GL_DEPTH_COMPONENT32 = $81A7; + GL_MIRRORED_REPEAT = $8370; + GL_MAX_TEXTURE_LOD_BIAS = $84FD; + GL_TEXTURE_LOD_BIAS = $8501; + GL_INCR_WRAP = $8507; + GL_DECR_WRAP = $8508; + GL_TEXTURE_DEPTH_SIZE = $884A; + GL_TEXTURE_COMPARE_MODE = $884C; + GL_TEXTURE_COMPARE_FUNC = $884D; +{$ifdef DGL_DEPRECATED} + GL_POINT_SIZE_MIN = $8126; + GL_POINT_SIZE_MAX = $8127; + GL_POINT_DISTANCE_ATTENUATION = $8129; + GL_GENERATE_MIPMAP = $8191; + GL_GENERATE_MIPMAP_HINT = $8192; + GL_FOG_COORDINATE_SOURCE = $8450; + GL_FOG_COORDINATE = $8451; + GL_FRAGMENT_DEPTH = $8452; + GL_CURRENT_FOG_COORDINATE = $8453; + GL_FOG_COORDINATE_ARRAY_TYPE = $8454; + GL_FOG_COORDINATE_ARRAY_STRIDE = $8455; + GL_FOG_COORDINATE_ARRAY_POINTER = $8456; + GL_FOG_COORDINATE_ARRAY = $8457; + GL_COLOR_SUM = $8458; + GL_CURRENT_SECONDARY_COLOR = $8459; + GL_SECONDARY_COLOR_ARRAY_SIZE = $845A; + GL_SECONDARY_COLOR_ARRAY_TYPE = $845B; + GL_SECONDARY_COLOR_ARRAY_STRIDE = $845C; + GL_SECONDARY_COLOR_ARRAY_POINTER = $845D; + GL_SECONDARY_COLOR_ARRAY = $845E; + GL_TEXTURE_FILTER_CONTROL = $8500; + GL_DEPTH_TEXTURE_MODE = $884B; + GL_COMPARE_R_TO_TEXTURE = $884E; +{$endif} + + // GL_VERSION_1_5 + GL_BUFFER_SIZE = $8764; + GL_BUFFER_USAGE = $8765; + GL_QUERY_COUNTER_BITS = $8864; + GL_CURRENT_QUERY = $8865; + GL_QUERY_RESULT = $8866; + GL_QUERY_RESULT_AVAILABLE = $8867; + GL_ARRAY_BUFFER = $8892; + GL_ELEMENT_ARRAY_BUFFER = $8893; + GL_ARRAY_BUFFER_BINDING = $8894; + GL_ELEMENT_ARRAY_BUFFER_BINDING = $8895; + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = $889F; + GL_READ_ONLY = $88B8; + GL_WRITE_ONLY = $88B9; + GL_READ_WRITE = $88BA; + GL_BUFFER_ACCESS = $88BB; + GL_BUFFER_MAPPED = $88BC; + GL_BUFFER_MAP_POINTER = $88BD; + GL_STREAM_DRAW = $88E0; + GL_STREAM_READ = $88E1; + GL_STREAM_COPY = $88E2; + GL_STATIC_DRAW = $88E4; + GL_STATIC_READ = $88E5; + GL_STATIC_COPY = $88E6; + GL_DYNAMIC_DRAW = $88E8; + GL_DYNAMIC_READ = $88E9; + GL_DYNAMIC_COPY = $88EA; + GL_SAMPLES_PASSED = $8914; +{$ifdef DGL_DEPRECATED} + GL_VERTEX_ARRAY_BUFFER_BINDING = $8896; + GL_NORMAL_ARRAY_BUFFER_BINDING = $8897; + GL_COLOR_ARRAY_BUFFER_BINDING = $8898; + GL_INDEX_ARRAY_BUFFER_BINDING = $8899; + GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = $889A; + GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = $889B; + GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = $889C; + GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = $889D; + GL_WEIGHT_ARRAY_BUFFER_BINDING = $889E; + GL_FOG_COORD_SRC = $8450; + GL_FOG_COORD = $8451; + GL_CURRENT_FOG_COORD = $8453; + GL_FOG_COORD_ARRAY_TYPE = $8454; + GL_FOG_COORD_ARRAY_STRIDE = $8455; + GL_FOG_COORD_ARRAY_POINTER = $8456; + GL_FOG_COORD_ARRAY = $8457; + GL_FOG_COORD_ARRAY_BUFFER_BINDING = $889D; + GL_SRC0_RGB = $8580; + GL_SRC1_RGB = $8581; + GL_SRC2_RGB = $8582; + GL_SRC0_ALPHA = $8588; + GL_SRC1_ALPHA = $8589; + GL_SRC2_ALPHA = $858A; +{$endif} + + // GL_VERSION_2_0 + GL_BLEND_EQUATION_RGB = $8009; + GL_VERTEX_ATTRIB_ARRAY_ENABLED = $8622; + GL_VERTEX_ATTRIB_ARRAY_SIZE = $8623; + GL_VERTEX_ATTRIB_ARRAY_STRIDE = $8624; + GL_VERTEX_ATTRIB_ARRAY_TYPE = $8625; + GL_CURRENT_VERTEX_ATTRIB = $8626; + GL_VERTEX_PROGRAM_POINT_SIZE = $8642; + GL_VERTEX_ATTRIB_ARRAY_POINTER = $8645; + GL_STENCIL_BACK_FUNC = $8800; + GL_STENCIL_BACK_FAIL = $8801; + GL_STENCIL_BACK_PASS_DEPTH_FAIL = $8802; + GL_STENCIL_BACK_PASS_DEPTH_PASS = $8803; + GL_MAX_DRAW_BUFFERS = $8824; + GL_DRAW_BUFFER0 = $8825; + GL_DRAW_BUFFER1 = $8826; + GL_DRAW_BUFFER2 = $8827; + GL_DRAW_BUFFER3 = $8828; + GL_DRAW_BUFFER4 = $8829; + GL_DRAW_BUFFER5 = $882A; + GL_DRAW_BUFFER6 = $882B; + GL_DRAW_BUFFER7 = $882C; + GL_DRAW_BUFFER8 = $882D; + GL_DRAW_BUFFER9 = $882E; + GL_DRAW_BUFFER10 = $882F; + GL_DRAW_BUFFER11 = $8830; + GL_DRAW_BUFFER12 = $8831; + GL_DRAW_BUFFER13 = $8832; + GL_DRAW_BUFFER14 = $8833; + GL_DRAW_BUFFER15 = $8834; + GL_BLEND_EQUATION_ALPHA = $883D; + GL_MAX_VERTEX_ATTRIBS = $8869; + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = $886A; + GL_MAX_TEXTURE_IMAGE_UNITS = $8872; + GL_FRAGMENT_SHADER = $8B30; + GL_VERTEX_SHADER = $8B31; + GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = $8B49; + GL_MAX_VERTEX_UNIFORM_COMPONENTS = $8B4A; + GL_MAX_VARYING_FLOATS = $8B4B; + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = $8B4C; + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = $8B4D; + GL_SHADER_TYPE = $8B4F; + GL_FLOAT_VEC2 = $8B50; + GL_FLOAT_VEC3 = $8B51; + GL_FLOAT_VEC4 = $8B52; + GL_INT_VEC2 = $8B53; + GL_INT_VEC3 = $8B54; + GL_INT_VEC4 = $8B55; + GL_BOOL = $8B56; + GL_BOOL_VEC2 = $8B57; + GL_BOOL_VEC3 = $8B58; + GL_BOOL_VEC4 = $8B59; + GL_FLOAT_MAT2 = $8B5A; + GL_FLOAT_MAT3 = $8B5B; + GL_FLOAT_MAT4 = $8B5C; + GL_SAMPLER_1D = $8B5D; + GL_SAMPLER_2D = $8B5E; + GL_SAMPLER_3D = $8B5F; + GL_SAMPLER_CUBE = $8B60; + GL_SAMPLER_1D_SHADOW = $8B61; + GL_SAMPLER_2D_SHADOW = $8B62; + GL_DELETE_STATUS = $8B80; + GL_COMPILE_STATUS = $8B81; + GL_LINK_STATUS = $8B82; + GL_VALIDATE_STATUS = $8B83; + GL_INFO_LOG_LENGTH = $8B84; + GL_ATTACHED_SHADERS = $8B85; + GL_ACTIVE_UNIFORMS = $8B86; + GL_ACTIVE_UNIFORM_MAX_LENGTH = $8B87; + GL_SHADER_SOURCE_LENGTH = $8B88; + GL_ACTIVE_ATTRIBUTES = $8B89; + GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = $8B8A; + GL_FRAGMENT_SHADER_DERIVATIVE_HINT = $8B8B; + GL_SHADING_LANGUAGE_VERSION = $8B8C; + GL_CURRENT_PROGRAM = $8B8D; + GL_POINT_SPRITE_COORD_ORIGIN = $8CA0; + GL_LOWER_LEFT = $8CA1; + GL_UPPER_LEFT = $8CA2; + GL_STENCIL_BACK_REF = $8CA3; + GL_STENCIL_BACK_VALUE_MASK = $8CA4; + GL_STENCIL_BACK_WRITEMASK = $8CA5; +{$ifdef DGL_DEPRECATED} + GL_VERTEX_PROGRAM_TWO_SIDE = $8643; + GL_POINT_SPRITE = $8861; + GL_COORD_REPLACE = $8862; + GL_MAX_TEXTURE_COORDS = $8871; +{$endif} + + // GL_VERSION_2_1 + GL_PIXEL_PACK_BUFFER = $88EB; + GL_PIXEL_UNPACK_BUFFER = $88EC; + GL_PIXEL_PACK_BUFFER_BINDING = $88ED; + GL_PIXEL_UNPACK_BUFFER_BINDING = $88EF; + GL_FLOAT_MAT2x3 = $8B65; + GL_FLOAT_MAT2x4 = $8B66; + GL_FLOAT_MAT3x2 = $8B67; + GL_FLOAT_MAT3x4 = $8B68; + GL_FLOAT_MAT4x2 = $8B69; + GL_FLOAT_MAT4x3 = $8B6A; + GL_SRGB = $8C40; + GL_SRGB8 = $8C41; + GL_SRGB_ALPHA = $8C42; + GL_SRGB8_ALPHA8 = $8C43; + GL_COMPRESSED_SRGB = $8C48; + GL_COMPRESSED_SRGB_ALPHA = $8C49; +{$ifdef DGL_DEPRECATED} + GL_CURRENT_RASTER_SECONDARY_COLOR = $845F; + GL_SLUMINANCE_ALPHA = $8C44; + GL_SLUMINANCE8_ALPHA8 = $8C45; + GL_SLUMINANCE = $8C46; + GL_SLUMINANCE8 = $8C47; + GL_COMPRESSED_SLUMINANCE = $8C4A; + GL_COMPRESSED_SLUMINANCE_ALPHA = $8C4B; +{$endif} + + // GL_VERSION_3_0 + GL_COMPARE_REF_TO_TEXTURE = $884E; + GL_CLIP_DISTANCE0 = $3000; + GL_CLIP_DISTANCE1 = $3001; + GL_CLIP_DISTANCE2 = $3002; + GL_CLIP_DISTANCE3 = $3003; + GL_CLIP_DISTANCE4 = $3004; + GL_CLIP_DISTANCE5 = $3005; + GL_CLIP_DISTANCE6 = $3006; + GL_CLIP_DISTANCE7 = $3007; + GL_MAX_CLIP_DISTANCES = $0D32; + GL_MAJOR_VERSION = $821B; + GL_MINOR_VERSION = $821C; + GL_NUM_EXTENSIONS = $821D; + GL_CONTEXT_FLAGS = $821E; + GL_DEPTH_BUFFER = $8223; + GL_STENCIL_BUFFER = $8224; + GL_COMPRESSED_RED = $8225; + GL_COMPRESSED_RG = $8226; + GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = $0001; + GL_RGBA32F = $8814; + GL_RGB32F = $8815; + GL_RGBA16F = $881A; + GL_RGB16F = $881B; + GL_VERTEX_ATTRIB_ARRAY_INTEGER = $88FD; + GL_MAX_ARRAY_TEXTURE_LAYERS = $88FF; + GL_MIN_PROGRAM_TEXEL_OFFSET = $8904; + GL_MAX_PROGRAM_TEXEL_OFFSET = $8905; + GL_CLAMP_READ_COLOR = $891C; + GL_FIXED_ONLY = $891D; + GL_MAX_VARYING_COMPONENTS = $8B4B; + GL_TEXTURE_1D_ARRAY = $8C18; + GL_PROXY_TEXTURE_1D_ARRAY = $8C19; + GL_TEXTURE_2D_ARRAY = $8C1A; + GL_PROXY_TEXTURE_2D_ARRAY = $8C1B; + GL_TEXTURE_BINDING_1D_ARRAY = $8C1C; + GL_TEXTURE_BINDING_2D_ARRAY = $8C1D; + GL_R11F_G11F_B10F = $8C3A; + GL_UNSIGNED_INT_10F_11F_11F_REV = $8C3B; + GL_RGB9_E5 = $8C3D; + GL_UNSIGNED_INT_5_9_9_9_REV = $8C3E; + GL_TEXTURE_SHARED_SIZE = $8C3F; + GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = $8C76; + GL_TRANSFORM_FEEDBACK_BUFFER_MODE = $8C7F; + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = $8C80; + GL_TRANSFORM_FEEDBACK_VARYINGS = $8C83; + GL_TRANSFORM_FEEDBACK_BUFFER_START = $8C84; + GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = $8C85; + GL_PRIMITIVES_GENERATED = $8C87; + GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = $8C88; + GL_RASTERIZER_DISCARD = $8C89; + GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = $8C8A; + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = $8C8B; + GL_INTERLEAVED_ATTRIBS = $8C8C; + GL_SEPARATE_ATTRIBS = $8C8D; + GL_TRANSFORM_FEEDBACK_BUFFER = $8C8E; + GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = $8C8F; + GL_RGBA32UI = $8D70; + GL_RGB32UI = $8D71; + GL_RGBA16UI = $8D76; + GL_RGB16UI = $8D77; + GL_RGBA8UI = $8D7C; + GL_RGB8UI = $8D7D; + GL_RGBA32I = $8D82; + GL_RGB32I = $8D83; + GL_RGBA16I = $8D88; + GL_RGB16I = $8D89; + GL_RGBA8I = $8D8E; + GL_RGB8I = $8D8F; + GL_RED_INTEGER = $8D94; + GL_GREEN_INTEGER = $8D95; + GL_BLUE_INTEGER = $8D96; + GL_RGB_INTEGER = $8D98; + GL_RGBA_INTEGER = $8D99; + GL_BGR_INTEGER = $8D9A; + GL_BGRA_INTEGER = $8D9B; + GL_SAMPLER_1D_ARRAY = $8DC0; + GL_SAMPLER_2D_ARRAY = $8DC1; + GL_SAMPLER_1D_ARRAY_SHADOW = $8DC3; + GL_SAMPLER_2D_ARRAY_SHADOW = $8DC4; + GL_SAMPLER_CUBE_SHADOW = $8DC5; + GL_UNSIGNED_INT_VEC2 = $8DC6; + GL_UNSIGNED_INT_VEC3 = $8DC7; + GL_UNSIGNED_INT_VEC4 = $8DC8; + GL_INT_SAMPLER_1D = $8DC9; + GL_INT_SAMPLER_2D = $8DCA; + GL_INT_SAMPLER_3D = $8DCB; + GL_INT_SAMPLER_CUBE = $8DCC; + GL_INT_SAMPLER_1D_ARRAY = $8DCE; + GL_INT_SAMPLER_2D_ARRAY = $8DCF; + GL_UNSIGNED_INT_SAMPLER_1D = $8DD1; + GL_UNSIGNED_INT_SAMPLER_2D = $8DD2; + GL_UNSIGNED_INT_SAMPLER_3D = $8DD3; + GL_UNSIGNED_INT_SAMPLER_CUBE = $8DD4; + GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = $8DD6; + GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = $8DD7; + GL_QUERY_WAIT = $8E13; + GL_QUERY_NO_WAIT = $8E14; + GL_QUERY_BY_REGION_WAIT = $8E15; + GL_QUERY_BY_REGION_NO_WAIT = $8E16; + GL_BUFFER_ACCESS_FLAGS = $911F; + GL_BUFFER_MAP_LENGTH = $9120; + GL_BUFFER_MAP_OFFSET = $9121; + { Reuse tokens from ARB_depth_buffer_float } + { reuse GL_DEPTH_COMPONENT32F } + { reuse GL_DEPTH32F_STENCIL8 } + { reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV } + { Reuse tokens from ARB_framebuffer_object } + { reuse GL_INVALID_FRAMEBUFFER_OPERATION } + { reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING } + { reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE } + { reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE } + { reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE } + { reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE } + { reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE } + { reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE } + { reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE } + { reuse GL_FRAMEBUFFER_DEFAULT } + { reuse GL_FRAMEBUFFER_UNDEFINED } + { reuse GL_DEPTH_STENCIL_ATTACHMENT } + { reuse GL_INDEX } + { reuse GL_MAX_RENDERBUFFER_SIZE } + { reuse GL_DEPTH_STENCIL } + { reuse GL_UNSIGNED_INT_24_8 } + { reuse GL_DEPTH24_STENCIL8 } + { reuse GL_TEXTURE_STENCIL_SIZE } + { reuse GL_TEXTURE_RED_TYPE } + { reuse GL_TEXTURE_GREEN_TYPE } + { reuse GL_TEXTURE_BLUE_TYPE } + { reuse GL_TEXTURE_ALPHA_TYPE } + { reuse GL_TEXTURE_DEPTH_TYPE } + { reuse GL_UNSIGNED_NORMALIZED } + { reuse GL_FRAMEBUFFER_BINDING } + { reuse GL_DRAW_FRAMEBUFFER_BINDING } + { reuse GL_RENDERBUFFER_BINDING } + { reuse GL_READ_FRAMEBUFFER } + { reuse GL_DRAW_FRAMEBUFFER } + { reuse GL_READ_FRAMEBUFFER_BINDING } + { reuse GL_RENDERBUFFER_SAMPLES } + { reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE } + { reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME } + { reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL } + { reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE } + { reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER } + { reuse GL_FRAMEBUFFER_COMPLETE } + { reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT } + { reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT } + { reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER } + { reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER } + { reuse GL_FRAMEBUFFER_UNSUPPORTED } + { reuse GL_MAX_COLOR_ATTACHMENTS } + { reuse GL_COLOR_ATTACHMENT0 } + { reuse GL_COLOR_ATTACHMENT1 } + { reuse GL_COLOR_ATTACHMENT2 } + { reuse GL_COLOR_ATTACHMENT3 } + { reuse GL_COLOR_ATTACHMENT4 } + { reuse GL_COLOR_ATTACHMENT5 } + { reuse GL_COLOR_ATTACHMENT6 } + { reuse GL_COLOR_ATTACHMENT7 } + { reuse GL_COLOR_ATTACHMENT8 } + { reuse GL_COLOR_ATTACHMENT9 } + { reuse GL_COLOR_ATTACHMENT10 } + { reuse GL_COLOR_ATTACHMENT11 } + { reuse GL_COLOR_ATTACHMENT12 } + { reuse GL_COLOR_ATTACHMENT13 } + { reuse GL_COLOR_ATTACHMENT14 } + { reuse GL_COLOR_ATTACHMENT15 } + { reuse GL_DEPTH_ATTACHMENT } + { reuse GL_STENCIL_ATTACHMENT } + { reuse GL_FRAMEBUFFER } + { reuse GL_RENDERBUFFER } + { reuse GL_RENDERBUFFER_WIDTH } + { reuse GL_RENDERBUFFER_HEIGHT } + { reuse GL_RENDERBUFFER_INTERNAL_FORMAT } + { reuse GL_STENCIL_INDEX1 } + { reuse GL_STENCIL_INDEX4 } + { reuse GL_STENCIL_INDEX8 } + { reuse GL_STENCIL_INDEX16 } + { reuse GL_RENDERBUFFER_RED_SIZE } + { reuse GL_RENDERBUFFER_GREEN_SIZE } + { reuse GL_RENDERBUFFER_BLUE_SIZE } + { reuse GL_RENDERBUFFER_ALPHA_SIZE } + { reuse GL_RENDERBUFFER_DEPTH_SIZE } + { reuse GL_RENDERBUFFER_STENCIL_SIZE } + { reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE } + { reuse GL_MAX_SAMPLES } + { Reuse tokens from ARB_framebuffer_sRGB } + { reuse GL_FRAMEBUFFER_SRGB } + { Reuse tokens from ARB_half_float_vertex } + { reuse GL_HALF_FLOAT } + { Reuse tokens from ARB_map_buffer_range } + { reuse GL_MAP_READ_BIT } + { reuse GL_MAP_WRITE_BIT } + { reuse GL_MAP_INVALIDATE_RANGE_BIT } + { reuse GL_MAP_INVALIDATE_BUFFER_BIT } + { reuse GL_MAP_FLUSH_EXPLICIT_BIT } + { reuse GL_MAP_UNSYNCHRONIZED_BIT } + { Reuse tokens from ARB_texture_compression_rgtc } + { reuse GL_COMPRESSED_RED_RGTC1 } + { reuse GL_COMPRESSED_SIGNED_RED_RGTC1 } + { reuse GL_COMPRESSED_RG_RGTC2 } + { reuse GL_COMPRESSED_SIGNED_RG_RGTC2 } + { Reuse tokens from ARB_texture_rg } + { reuse GL_RG } + { reuse GL_RG_INTEGER } + { reuse GL_R8 } + { reuse GL_R16 } + { reuse GL_RG8 } + { reuse GL_RG16 } + { reuse GL_R16F } + { reuse GL_R32F } + { reuse GL_RG16F } + { reuse GL_RG32F } + { reuse GL_R8I } + { reuse GL_R8UI } + { reuse GL_R16I } + { reuse GL_R16UI } + { reuse GL_R32I } + { reuse GL_R32UI } + { reuse GL_RG8I } + { reuse GL_RG8UI } + { reuse GL_RG16I } + { reuse GL_RG16UI } + { reuse GL_RG32I } + { reuse GL_RG32UI } + { Reuse tokens from ARB_vertex_array_object } + { reuse GL_VERTEX_ARRAY_BINDING } +{$ifdef DGL_DEPRECATED} + GL_CLAMP_VERTEX_COLOR = $891A; + GL_CLAMP_FRAGMENT_COLOR = $891B; + GL_ALPHA_INTEGER = $8D97; + { Reuse tokens from ARB_framebuffer_object } + { reuse GL_TEXTURE_LUMINANCE_TYPE } + { reuse GL_TEXTURE_INTENSITY_TYPE } +{$endif} + + // GL_VERSION_3_1 + GL_SAMPLER_2D_RECT = $8B63; + GL_SAMPLER_2D_RECT_SHADOW = $8B64; + GL_SAMPLER_BUFFER = $8DC2; + GL_INT_SAMPLER_2D_RECT = $8DCD; + GL_INT_SAMPLER_BUFFER = $8DD0; + GL_UNSIGNED_INT_SAMPLER_2D_RECT = $8DD5; + GL_UNSIGNED_INT_SAMPLER_BUFFER = $8DD8; + GL_TEXTURE_BUFFER = $8C2A; + GL_MAX_TEXTURE_BUFFER_SIZE = $8C2B; + GL_TEXTURE_BINDING_BUFFER = $8C2C; + GL_TEXTURE_BUFFER_DATA_STORE_BINDING = $8C2D; + GL_TEXTURE_BUFFER_FORMAT = $8C2E; + GL_TEXTURE_RECTANGLE = $84F5; + GL_TEXTURE_BINDING_RECTANGLE = $84F6; + GL_PROXY_TEXTURE_RECTANGLE = $84F7; + GL_MAX_RECTANGLE_TEXTURE_SIZE = $84F8; + GL_RED_SNORM = $8F90; + GL_RG_SNORM = $8F91; + GL_RGB_SNORM = $8F92; + GL_RGBA_SNORM = $8F93; + GL_R8_SNORM = $8F94; + GL_RG8_SNORM = $8F95; + GL_RGB8_SNORM = $8F96; + GL_RGBA8_SNORM = $8F97; + GL_R16_SNORM = $8F98; + GL_RG16_SNORM = $8F99; + GL_RGB16_SNORM = $8F9A; + GL_RGBA16_SNORM = $8F9B; + GL_SIGNED_NORMALIZED = $8F9C; + GL_PRIMITIVE_RESTART = $8F9D; + GL_PRIMITIVE_RESTART_INDEX = $8F9E; + { Reuse tokens from ARB_copy_buffer } + { reuse GL_COPY_READ_BUFFER } + { reuse GL_COPY_WRITE_BUFFER } + { Would reuse tokens from ARB_draw_instanced, but it has none } + { Reuse tokens from ARB_uniform_buffer_object } + { reuse GL_UNIFORM_BUFFER } + { reuse GL_UNIFORM_BUFFER_BINDING } + { reuse GL_UNIFORM_BUFFER_START } + { reuse GL_UNIFORM_BUFFER_SIZE } + { reuse GL_MAX_VERTEX_UNIFORM_BLOCKS } + { reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS } + { reuse GL_MAX_COMBINED_UNIFORM_BLOCKS } + { reuse GL_MAX_UNIFORM_BUFFER_BINDINGS } + { reuse GL_MAX_UNIFORM_BLOCK_SIZE } + { reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS } + { reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS } + { reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT } + { reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH } + { reuse GL_ACTIVE_UNIFORM_BLOCKS } + { reuse GL_UNIFORM_TYPE } + { reuse GL_UNIFORM_SIZE } + { reuse GL_UNIFORM_NAME_LENGTH } + { reuse GL_UNIFORM_BLOCK_INDEX } + { reuse GL_UNIFORM_OFFSET } + { reuse GL_UNIFORM_ARRAY_STRIDE } + { reuse GL_UNIFORM_MATRIX_STRIDE } + { reuse GL_UNIFORM_IS_ROW_MAJOR } + { reuse GL_UNIFORM_BLOCK_BINDING } + { reuse GL_UNIFORM_BLOCK_DATA_SIZE } + { reuse GL_UNIFORM_BLOCK_NAME_LENGTH } + { reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS } + { reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES } + { reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER } + { reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER } + { reuse GL_INVALID_INDEX } + + // GL_VERSION_3_2 + GL_CONTEXT_CORE_PROFILE_BIT = $00000001; + GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = $00000002; + GL_LINES_ADJACENCY = $000A; + GL_LINE_STRIP_ADJACENCY = $000B; + GL_TRIANGLES_ADJACENCY = $000C; + GL_TRIANGLE_STRIP_ADJACENCY = $000D; + GL_PROGRAM_POINT_SIZE = $8642; + GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = $8C29; + GL_FRAMEBUFFER_ATTACHMENT_LAYERED = $8DA7; + GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = $8DA8; + GL_GEOMETRY_SHADER = $8DD9; + GL_GEOMETRY_VERTICES_OUT = $8916; + GL_GEOMETRY_INPUT_TYPE = $8917; + GL_GEOMETRY_OUTPUT_TYPE = $8918; + GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = $8DDF; + GL_MAX_GEOMETRY_OUTPUT_VERTICES = $8DE0; + GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = $8DE1; + GL_MAX_VERTEX_OUTPUT_COMPONENTS = $9122; + GL_MAX_GEOMETRY_INPUT_COMPONENTS = $9123; + GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = $9124; + GL_MAX_FRAGMENT_INPUT_COMPONENTS = $9125; + GL_CONTEXT_PROFILE_MASK = $9126; + { reuse GL_MAX_VARYING_COMPONENTS } + { reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER } + { Reuse tokens from ARB_depth_clamp } + { reuse GL_DEPTH_CLAMP } + { Would reuse tokens from ARB_draw_elements_base_vertex, but it has none } + { Would reuse tokens from ARB_fragment_coord_conventions, but it has none } + { Reuse tokens from ARB_provoking_vertex } + { reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION } + { reuse GL_FIRST_VERTEX_CONVENTION } + { reuse GL_LAST_VERTEX_CONVENTION } + { reuse GL_PROVOKING_VERTEX } + { Reuse tokens from ARB_seamless_cube_map } + { reuse GL_TEXTURE_CUBE_MAP_SEAMLESS } + { Reuse tokens from ARB_sync } + { reuse GL_MAX_SERVER_WAIT_TIMEOUT } + { reuse GL_OBJECT_TYPE } + { reuse GL_SYNC_CONDITION } + { reuse GL_SYNC_STATUS } + { reuse GL_SYNC_FLAGS } + { reuse GL_SYNC_FENCE } + { reuse GL_SYNC_GPU_COMMANDS_COMPLETE } + { reuse GL_UNSIGNALED } + { reuse GL_SIGNALED } + { reuse GL_ALREADY_SIGNALED } + { reuse GL_TIMEOUT_EXPIRED } + { reuse GL_CONDITION_SATISFIED } + { reuse GL_WAIT_FAILED } + { reuse GL_TIMEOUT_IGNORED } + { reuse GL_SYNC_FLUSH_COMMANDS_BIT } + { reuse GL_TIMEOUT_IGNORED } + { Reuse tokens from ARB_texture_multisample } + { reuse GL_SAMPLE_POSITION } + { reuse GL_SAMPLE_MASK } + { reuse GL_SAMPLE_MASK_VALUE } + { reuse GL_MAX_SAMPLE_MASK_WORDS } + { reuse GL_TEXTURE_2D_MULTISAMPLE } + { reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE } + { reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY } + { reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY } + { reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE } + { reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY } + { reuse GL_TEXTURE_SAMPLES } + { reuse GL_TEXTURE_FIXED_SAMPLE_LOCATIONS } + { reuse GL_SAMPLER_2D_MULTISAMPLE } + { reuse GL_INT_SAMPLER_2D_MULTISAMPLE } + { reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE } + { reuse GL_SAMPLER_2D_MULTISAMPLE_ARRAY } + { reuse GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY } + { reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY } + { reuse GL_MAX_COLOR_TEXTURE_SAMPLES } + { reuse GL_MAX_DEPTH_TEXTURE_SAMPLES } + { reuse GL_MAX_INTEGER_SAMPLES } + { Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core } + + // GL_3DFX_multisample + GL_MULTISAMPLE_3DFX = $86B2; + GL_SAMPLE_BUFFERS_3DFX = $86B3; + GL_SAMPLES_3DFX = $86B4; + GL_MULTISAMPLE_BIT_3DFX = $20000000; + + // GL_3DFX_texture_compression_FXT1 + GL_COMPRESSED_RGB_FXT1_3DFX = $86B0; + GL_COMPRESSED_RGBA_FXT1_3DFX = $86B1; + + // GL_APPLE_client_storage + GL_UNPACK_CLIENT_STORAGE_APPLE = $85B2; + + // GL_APPLE_element_array + GL_ELEMENT_ARRAY_APPLE = $8768; + GL_ELEMENT_ARRAY_TYPE_APPLE = $8769; + GL_ELEMENT_ARRAY_POINTER_APPLE = $876A; + + // GL_APPLE_fence + GL_DRAW_PIXELS_APPLE = $8A0A; + GL_FENCE_APPLE = $8A0B; + + // GL_APPLE_specular_vector + GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE = $85B0; + + // GL_APPLE_transform_hint + GL_TRANSFORM_HINT_APPLE = $85B1; + + // GL_APPLE_vertex_array_object + GL_VERTEX_ARRAY_BINDING_APPLE = $85B5; + + // GL_APPLE_vertex_array_range + GL_VERTEX_ARRAY_RANGE_APPLE = $851D; + GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE = $851E; + GL_VERTEX_ARRAY_STORAGE_HINT_APPLE = $851F; + GL_VERTEX_ARRAY_RANGE_POINTER_APPLE = $8521; + GL_STORAGE_CACHED_APPLE = $85BE; + GL_STORAGE_SHARED_APPLE = $85BF; + + // GL_APPLE_ycbcr_422 + GL_YCBCR_422_APPLE = $85B9; + GL_UNSIGNED_SHORT_8_8_APPLE = $85BA; + GL_UNSIGNED_SHORT_8_8_REV_APPLE = $85BB; + + // GL_APPLE_texture_range + GL_TEXTURE_RANGE_LENGTH_APPLE = $85B7; + GL_TEXTURE_RANGE_POINTER_APPLE = $85B8; + GL_TEXTURE_STORAGE_HINT_APPLE = $85BC; + GL_STORAGE_PRIVATE_APPLE = $85BD; + { reuse GL_STORAGE_CACHED_APPLE } + { reuse GL_STORAGE_SHARED_APPLE } + + // GL_APPLE_float_pixels + GL_HALF_APPLE = $140B; + GL_RGBA_FLOAT32_APPLE = $8814; + GL_RGB_FLOAT32_APPLE = $8815; + GL_ALPHA_FLOAT32_APPLE = $8816; + GL_INTENSITY_FLOAT32_APPLE = $8817; + GL_LUMINANCE_FLOAT32_APPLE = $8818; + GL_LUMINANCE_ALPHA_FLOAT32_APPLE = $8819; + GL_RGBA_FLOAT16_APPLE = $881A; + GL_RGB_FLOAT16_APPLE = $881B; + GL_ALPHA_FLOAT16_APPLE = $881C; + GL_INTENSITY_FLOAT16_APPLE = $881D; + GL_LUMINANCE_FLOAT16_APPLE = $881E; + GL_LUMINANCE_ALPHA_FLOAT16_APPLE = $881F; + GL_COLOR_FLOAT_APPLE = $8A0F; + + // GL_APPLE_vertex_program_evaluators + GL_VERTEX_ATTRIB_MAP1_APPLE = $8A00; + GL_VERTEX_ATTRIB_MAP2_APPLE = $8A01; + GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE = $8A02; + GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE = $8A03; + GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE = $8A04; + GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE = $8A05; + GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE = $8A06; + GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE = $8A07; + GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE = $8A08; + GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE = $8A09; + + // GL_APPLE_aux_depth_stencil + GL_AUX_DEPTH_STENCIL_APPLE = $8A14; + + // GL_APPLE_object_purgeable + GL_BUFFER_OBJECT_APPLE = $85B3; + GL_RELEASED_APPLE = $8A19; + GL_VOLATILE_APPLE = $8A1A; + GL_RETAINED_APPLE = $8A1B; + GL_UNDEFINED_APPLE = $8A1C; + GL_PURGEABLE_APPLE = $8A1D; + + // GL_APPLE_row_bytes + GL_PACK_ROW_BYTES_APPLE = $8A15; + GL_UNPACK_ROW_BYTES_APPLE = $8A16; + + + // GL_ARB_depth_texture + GL_DEPTH_COMPONENT16_ARB = $81A5; + GL_DEPTH_COMPONENT24_ARB = $81A6; + GL_DEPTH_COMPONENT32_ARB = $81A7; + GL_TEXTURE_DEPTH_SIZE_ARB = $884A; + GL_DEPTH_TEXTURE_MODE_ARB = $884B; + + // GL_ARB_fragment_program + GL_FRAGMENT_PROGRAM_ARB = $8804; + GL_PROGRAM_ALU_INSTRUCTIONS_ARB = $8805; + GL_PROGRAM_TEX_INSTRUCTIONS_ARB = $8806; + GL_PROGRAM_TEX_INDIRECTIONS_ARB = $8807; + GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = $8808; + GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = $8809; + GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = $880A; + GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = $880B; + GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = $880C; + GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = $880D; + GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = $880E; + GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = $880F; + GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = $8810; + GL_MAX_TEXTURE_COORDS_ARB = $8871; + GL_MAX_TEXTURE_IMAGE_UNITS_ARB = $8872; + + // GL_ARB_imaging + GL_CONSTANT_COLOR_ARB = $8001; + GL_ONE_MINUS_CONSTANT_COLOR = $8002; + GL_CONSTANT_ALPHA = $8003; + GL_ONE_MINUS_CONSTANT_ALPHA = $8004; + GL_BLEND_COLOR = $8005; + GL_FUNC_ADD = $8006; + GL_MIN = $8007; + GL_MAX = $8008; + GL_BLEND_EQUATION = $8009; + GL_FUNC_SUBTRACT = $800A; + GL_FUNC_REVERSE_SUBTRACT = $800B; +{$ifdef DGL_DEPRECATED} + GL_CONVOLUTION_1D = $8010; + GL_CONVOLUTION_2D = $8011; + GL_SEPARABLE_2D = $8012; + GL_CONVOLUTION_BORDER_MODE = $8013; + GL_CONVOLUTION_FILTER_SCALE = $8014; + GL_CONVOLUTION_FILTER_BIAS = $8015; + GL_REDUCE = $8016; + GL_CONVOLUTION_FORMAT = $8017; + GL_CONVOLUTION_WIDTH = $8018; + GL_CONVOLUTION_HEIGHT = $8019; + GL_MAX_CONVOLUTION_WIDTH = $801A; + GL_MAX_CONVOLUTION_HEIGHT = $801B; + GL_POST_CONVOLUTION_RED_SCALE = $801C; + GL_POST_CONVOLUTION_GREEN_SCALE = $801D; + GL_POST_CONVOLUTION_BLUE_SCALE = $801E; + GL_POST_CONVOLUTION_ALPHA_SCALE = $801F; + GL_POST_CONVOLUTION_RED_BIAS = $8020; + GL_POST_CONVOLUTION_GREEN_BIAS = $8021; + GL_POST_CONVOLUTION_BLUE_BIAS = $8022; + GL_POST_CONVOLUTION_ALPHA_BIAS = $8023; + GL_HISTOGRAM = $8024; + GL_PROXY_HISTOGRAM = $8025; + GL_HISTOGRAM_WIDTH = $8026; + GL_HISTOGRAM_FORMAT = $8027; + GL_HISTOGRAM_RED_SIZE = $8028; + GL_HISTOGRAM_GREEN_SIZE = $8029; + GL_HISTOGRAM_BLUE_SIZE = $802A; + GL_HISTOGRAM_ALPHA_SIZE = $802B; + GL_HISTOGRAM_LUMINANCE_SIZE = $802C; + GL_HISTOGRAM_SINK = $802D; + GL_MINMAX = $802E; + GL_MINMAX_FORMAT = $802F; + GL_MINMAX_SINK = $8030; + GL_TABLE_TOO_LARGE = $8031; + GL_COLOR_MATRIX = $80B1; + GL_COLOR_MATRIX_STACK_DEPTH = $80B2; + GL_MAX_COLOR_MATRIX_STACK_DEPTH = $80B3; + GL_POST_COLOR_MATRIX_RED_SCALE = $80B4; + GL_POST_COLOR_MATRIX_GREEN_SCALE = $80B5; + GL_POST_COLOR_MATRIX_BLUE_SCALE = $80B6; + GL_POST_COLOR_MATRIX_ALPHA_SCALE = $80B7; + GL_POST_COLOR_MATRIX_RED_BIAS = $80B8; + GL_POST_COLOR_MATRIX_GREEN_BIAS = $80B9; + GL_POST_COLOR_MATRIX_BLUE_BIAS = $80BA; + GL_POST_COLOR_MATRIX_ALPHA_BIAS = $80BB; + GL_COLOR_TABLE = $80D0; + GL_POST_CONVOLUTION_COLOR_TABLE = $80D1; + GL_POST_COLOR_MATRIX_COLOR_TABLE = $80D2; + GL_PROXY_COLOR_TABLE = $80D3; + GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = $80D4; + GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = $80D5; + GL_COLOR_TABLE_SCALE = $80D6; + GL_COLOR_TABLE_BIAS = $80D7; + GL_COLOR_TABLE_FORMAT = $80D8; + GL_COLOR_TABLE_WIDTH = $80D9; + GL_COLOR_TABLE_RED_SIZE = $80DA; + GL_COLOR_TABLE_GREEN_SIZE = $80DB; + GL_COLOR_TABLE_BLUE_SIZE = $80DC; + GL_COLOR_TABLE_ALPHA_SIZE = $80DD; + GL_COLOR_TABLE_LUMINANCE_SIZE = $80DE; + GL_COLOR_TABLE_INTENSITY_SIZE = $80DF; + GL_CONSTANT_BORDER = $8151; + GL_REPLICATE_BORDER = $8153; + GL_CONVOLUTION_BORDER_COLOR = $8154; +{$endif} + + // GL_ARB_matrix_palette + GL_MATRIX_PALETTE_ARB = $8840; + GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = $8841; + GL_MAX_PALETTE_MATRICES_ARB = $8842; + GL_CURRENT_PALETTE_MATRIX_ARB = $8843; + GL_MATRIX_INDEX_ARRAY_ARB = $8844; + GL_CURRENT_MATRIX_INDEX_ARB = $8845; + GL_MATRIX_INDEX_ARRAY_SIZE_ARB = $8846; + GL_MATRIX_INDEX_ARRAY_TYPE_ARB = $8847; + GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = $8848; + GL_MATRIX_INDEX_ARRAY_POINTER_ARB = $8849; + + // GL_ARB_multisample + GL_MULTISAMPLE_ARB = $809D; + GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = $809E; + GL_SAMPLE_ALPHA_TO_ONE_ARB = $809F; + GL_SAMPLE_COVERAGE_ARB = $80A0; + GL_SAMPLE_BUFFERS_ARB = $80A8; + GL_SAMPLES_ARB = $80A9; + GL_SAMPLE_COVERAGE_VALUE_ARB = $80AA; + GL_SAMPLE_COVERAGE_INVERT_ARB = $80AB; + GL_MULTISAMPLE_BIT_ARB = $20000000; + + // GL_ARB_multitexture + GL_TEXTURE0_ARB = $84C0; + GL_TEXTURE1_ARB = $84C1; + GL_TEXTURE2_ARB = $84C2; + GL_TEXTURE3_ARB = $84C3; + GL_TEXTURE4_ARB = $84C4; + GL_TEXTURE5_ARB = $84C5; + GL_TEXTURE6_ARB = $84C6; + GL_TEXTURE7_ARB = $84C7; + GL_TEXTURE8_ARB = $84C8; + GL_TEXTURE9_ARB = $84C9; + GL_TEXTURE10_ARB = $84CA; + GL_TEXTURE11_ARB = $84CB; + GL_TEXTURE12_ARB = $84CC; + GL_TEXTURE13_ARB = $84CD; + GL_TEXTURE14_ARB = $84CE; + GL_TEXTURE15_ARB = $84CF; + GL_TEXTURE16_ARB = $84D0; + GL_TEXTURE17_ARB = $84D1; + GL_TEXTURE18_ARB = $84D2; + GL_TEXTURE19_ARB = $84D3; + GL_TEXTURE20_ARB = $84D4; + GL_TEXTURE21_ARB = $84D5; + GL_TEXTURE22_ARB = $84D6; + GL_TEXTURE23_ARB = $84D7; + GL_TEXTURE24_ARB = $84D8; + GL_TEXTURE25_ARB = $84D9; + GL_TEXTURE26_ARB = $84DA; + GL_TEXTURE27_ARB = $84DB; + GL_TEXTURE28_ARB = $84DC; + GL_TEXTURE29_ARB = $84DD; + GL_TEXTURE30_ARB = $84DE; + GL_TEXTURE31_ARB = $84DF; + GL_ACTIVE_TEXTURE_ARB = $84E0; + GL_CLIENT_ACTIVE_TEXTURE_ARB = $84E1; + GL_MAX_TEXTURE_UNITS_ARB = $84E2; + + // GL_ARB_point_parameters + GL_POINT_SIZE_MIN_ARB = $8126; + GL_POINT_SIZE_MAX_ARB = $8127; + GL_POINT_FADE_THRESHOLD_SIZE_ARB = $8128; + GL_POINT_DISTANCE_ATTENUATION_ARB = $8129; + + // GL_ARB_shadow + GL_TEXTURE_COMPARE_MODE_ARB = $884C; + GL_TEXTURE_COMPARE_FUNC_ARB = $884D; + GL_COMPARE_R_TO_TEXTURE_ARB = $884E; + + // GL_ARB_shadow_ambient + GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = $80BF; + + // GL_ARB_texture_border_clamp + GL_CLAMP_TO_BORDER_ARB = $812D; + + // GL_ARB_texture_compression + GL_COMPRESSED_ALPHA_ARB = $84E9; + GL_COMPRESSED_LUMINANCE_ARB = $84EA; + GL_COMPRESSED_LUMINANCE_ALPHA_ARB = $84EB; + GL_COMPRESSED_INTENSITY_ARB = $84EC; + GL_COMPRESSED_RGB_ARB = $84ED; + GL_COMPRESSED_RGBA_ARB = $84EE; + GL_TEXTURE_COMPRESSION_HINT_ARB = $84EF; + GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = $86A0; + GL_TEXTURE_COMPRESSED_ARB = $86A1; + GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = $86A2; + GL_COMPRESSED_TEXTURE_FORMATS_ARB = $86A3; + + // GL_ARB_texture_cube_map + GL_NORMAL_MAP_ARB = $8511; + GL_REFLECTION_MAP_ARB = $8512; + GL_TEXTURE_CUBE_MAP_ARB = $8513; + GL_TEXTURE_BINDING_CUBE_MAP_ARB = $8514; + GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = $8515; + GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = $8516; + GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = $8517; + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = $8518; + GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = $8519; + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = $851A; + GL_PROXY_TEXTURE_CUBE_MAP_ARB = $851B; + GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = $851C; + + // GL_ARB_texture_env_combine + GL_COMBINE_ARB = $8570; + GL_COMBINE_RGB_ARB = $8571; + GL_COMBINE_ALPHA_ARB = $8572; + GL_SOURCE0_RGB_ARB = $8580; + GL_SOURCE1_RGB_ARB = $8581; + GL_SOURCE2_RGB_ARB = $8582; + GL_SOURCE0_ALPHA_ARB = $8588; + GL_SOURCE1_ALPHA_ARB = $8589; + GL_SOURCE2_ALPHA_ARB = $858A; + GL_OPERAND0_RGB_ARB = $8590; + GL_OPERAND1_RGB_ARB = $8591; + GL_OPERAND2_RGB_ARB = $8592; + GL_OPERAND0_ALPHA_ARB = $8598; + GL_OPERAND1_ALPHA_ARB = $8599; + GL_OPERAND2_ALPHA_ARB = $859A; + GL_RGB_SCALE_ARB = $8573; + GL_ADD_SIGNED_ARB = $8574; + GL_INTERPOLATE_ARB = $8575; + GL_SUBTRACT_ARB = $84E7; + GL_CONSTANT_ARB = $8576; + GL_PRIMARY_COLOR_ARB = $8577; + GL_PREVIOUS_ARB = $8578; + + // GL_ARB_texture_env_dot3 + GL_DOT3_RGB_ARB = $86AE; + GL_DOT3_RGBA_ARB = $86AF; + + // GL_ARB_texture_mirrored_repeat + GL_MIRRORED_REPEAT_ARB = $8370; + + // GL_ARB_transpose_matrix + GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = $84E3; + GL_TRANSPOSE_PROJECTION_MATRIX_ARB = $84E4; + GL_TRANSPOSE_TEXTURE_MATRIX_ARB = $84E5; + GL_TRANSPOSE_COLOR_MATRIX_ARB = $84E6; + + // GL_ARB_vertex_blend + GL_MAX_VERTEX_UNITS_ARB = $86A4; + GL_ACTIVE_VERTEX_UNITS_ARB = $86A5; + GL_WEIGHT_SUM_UNITY_ARB = $86A6; + GL_VERTEX_BLEND_ARB = $86A7; + GL_CURRENT_WEIGHT_ARB = $86A8; + GL_WEIGHT_ARRAY_TYPE_ARB = $86A9; + GL_WEIGHT_ARRAY_STRIDE_ARB = $86AA; + GL_WEIGHT_ARRAY_SIZE_ARB = $86AB; + GL_WEIGHT_ARRAY_POINTER_ARB = $86AC; + GL_WEIGHT_ARRAY_ARB = $86AD; + GL_MODELVIEW0_ARB = $1700; + GL_MODELVIEW1_ARB = $850A; + GL_MODELVIEW2_ARB = $8722; + GL_MODELVIEW3_ARB = $8723; + GL_MODELVIEW4_ARB = $8724; + GL_MODELVIEW5_ARB = $8725; + GL_MODELVIEW6_ARB = $8726; + GL_MODELVIEW7_ARB = $8727; + GL_MODELVIEW8_ARB = $8728; + GL_MODELVIEW9_ARB = $8729; + GL_MODELVIEW10_ARB = $872A; + GL_MODELVIEW11_ARB = $872B; + GL_MODELVIEW12_ARB = $872C; + GL_MODELVIEW13_ARB = $872D; + GL_MODELVIEW14_ARB = $872E; + GL_MODELVIEW15_ARB = $872F; + GL_MODELVIEW16_ARB = $8730; + GL_MODELVIEW17_ARB = $8731; + GL_MODELVIEW18_ARB = $8732; + GL_MODELVIEW19_ARB = $8733; + GL_MODELVIEW20_ARB = $8734; + GL_MODELVIEW21_ARB = $8735; + GL_MODELVIEW22_ARB = $8736; + GL_MODELVIEW23_ARB = $8737; + GL_MODELVIEW24_ARB = $8738; + GL_MODELVIEW25_ARB = $8739; + GL_MODELVIEW26_ARB = $873A; + GL_MODELVIEW27_ARB = $873B; + GL_MODELVIEW28_ARB = $873C; + GL_MODELVIEW29_ARB = $873D; + GL_MODELVIEW30_ARB = $873E; + GL_MODELVIEW31_ARB = $873F; + + // GL_ARB_vertex_buffer_object + GL_BUFFER_SIZE_ARB = $8764; + GL_BUFFER_USAGE_ARB = $8765; + GL_ARRAY_BUFFER_ARB = $8892; + GL_ELEMENT_ARRAY_BUFFER_ARB = $8893; + GL_ARRAY_BUFFER_BINDING_ARB = $8894; + GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = $8895; + GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = $8896; + GL_NORMAL_ARRAY_BUFFER_BINDING_ARB = $8897; + GL_COLOR_ARRAY_BUFFER_BINDING_ARB = $8898; + GL_INDEX_ARRAY_BUFFER_BINDING_ARB = $8899; + GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = $889A; + GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = $889B; + GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = $889C; + GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = $889D; + GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = $889E; + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = $889F; + GL_READ_ONLY_ARB = $88B8; + GL_WRITE_ONLY_ARB = $88B9; + GL_READ_WRITE_ARB = $88BA; + GL_BUFFER_ACCESS_ARB = $88BB; + GL_BUFFER_MAPPED_ARB = $88BC; + GL_BUFFER_MAP_POINTER_ARB = $88BD; + GL_STREAM_DRAW_ARB = $88E0; + GL_STREAM_READ_ARB = $88E1; + GL_STREAM_COPY_ARB = $88E2; + GL_STATIC_DRAW_ARB = $88E4; + GL_STATIC_READ_ARB = $88E5; + GL_STATIC_COPY_ARB = $88E6; + GL_DYNAMIC_DRAW_ARB = $88E8; + GL_DYNAMIC_READ_ARB = $88E9; + GL_DYNAMIC_COPY_ARB = $88EA; + + // GL_ARB_vertex_program + GL_COLOR_SUM_ARB = $8458; + GL_VERTEX_PROGRAM_ARB = $8620; + GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = $8622; + GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = $8623; + GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = $8624; + GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = $8625; + GL_CURRENT_VERTEX_ATTRIB_ARB = $8626; + GL_PROGRAM_LENGTH_ARB = $8627; + GL_PROGRAM_STRING_ARB = $8628; + GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = $862E; + GL_MAX_PROGRAM_MATRICES_ARB = $862F; + GL_CURRENT_MATRIX_STACK_DEPTH_ARB = $8640; + GL_CURRENT_MATRIX_ARB = $8641; + GL_VERTEX_PROGRAM_POINT_SIZE_ARB = $8642; + GL_VERTEX_PROGRAM_TWO_SIDE_ARB = $8643; + GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = $8645; + GL_PROGRAM_ERROR_POSITION_ARB = $864B; + GL_PROGRAM_BINDING_ARB = $8677; + GL_MAX_VERTEX_ATTRIBS_ARB = $8869; + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = $886A; + GL_PROGRAM_ERROR_STRING_ARB = $8874; + GL_PROGRAM_FORMAT_ASCII_ARB = $8875; + GL_PROGRAM_FORMAT_ARB = $8876; + GL_PROGRAM_INSTRUCTIONS_ARB = $88A0; + GL_MAX_PROGRAM_INSTRUCTIONS_ARB = $88A1; + GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = $88A2; + GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = $88A3; + GL_PROGRAM_TEMPORARIES_ARB = $88A4; + GL_MAX_PROGRAM_TEMPORARIES_ARB = $88A5; + GL_PROGRAM_NATIVE_TEMPORARIES_ARB = $88A6; + GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = $88A7; + GL_PROGRAM_PARAMETERS_ARB = $88A8; + GL_MAX_PROGRAM_PARAMETERS_ARB = $88A9; + GL_PROGRAM_NATIVE_PARAMETERS_ARB = $88AA; + GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = $88AB; + GL_PROGRAM_ATTRIBS_ARB = $88AC; + GL_MAX_PROGRAM_ATTRIBS_ARB = $88AD; + GL_PROGRAM_NATIVE_ATTRIBS_ARB = $88AE; + GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = $88AF; + GL_PROGRAM_ADDRESS_REGISTERS_ARB = $88B0; + GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = $88B1; + GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = $88B2; + GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = $88B3; + GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = $88B4; + GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = $88B5; + GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = $88B6; + GL_TRANSPOSE_CURRENT_MATRIX_ARB = $88B7; + GL_MATRIX0_ARB = $88C0; + GL_MATRIX1_ARB = $88C1; + GL_MATRIX2_ARB = $88C2; + GL_MATRIX3_ARB = $88C3; + GL_MATRIX4_ARB = $88C4; + GL_MATRIX5_ARB = $88C5; + GL_MATRIX6_ARB = $88C6; + GL_MATRIX7_ARB = $88C7; + GL_MATRIX8_ARB = $88C8; + GL_MATRIX9_ARB = $88C9; + GL_MATRIX10_ARB = $88CA; + GL_MATRIX11_ARB = $88CB; + GL_MATRIX12_ARB = $88CC; + GL_MATRIX13_ARB = $88CD; + GL_MATRIX14_ARB = $88CE; + GL_MATRIX15_ARB = $88CF; + GL_MATRIX16_ARB = $88D0; + GL_MATRIX17_ARB = $88D1; + GL_MATRIX18_ARB = $88D2; + GL_MATRIX19_ARB = $88D3; + GL_MATRIX20_ARB = $88D4; + GL_MATRIX21_ARB = $88D5; + GL_MATRIX22_ARB = $88D6; + GL_MATRIX23_ARB = $88D7; + GL_MATRIX24_ARB = $88D8; + GL_MATRIX25_ARB = $88D9; + GL_MATRIX26_ARB = $88DA; + GL_MATRIX27_ARB = $88DB; + GL_MATRIX28_ARB = $88DC; + GL_MATRIX29_ARB = $88DD; + GL_MATRIX30_ARB = $88DE; + GL_MATRIX31_ARB = $88DF; + + // GL_ARB_draw_buffers + GL_MAX_DRAW_BUFFERS_ARB = $8824; + GL_DRAW_BUFFER0_ARB = $8825; + GL_DRAW_BUFFER1_ARB = $8826; + GL_DRAW_BUFFER2_ARB = $8827; + GL_DRAW_BUFFER3_ARB = $8828; + GL_DRAW_BUFFER4_ARB = $8829; + GL_DRAW_BUFFER5_ARB = $882A; + GL_DRAW_BUFFER6_ARB = $882B; + GL_DRAW_BUFFER7_ARB = $882C; + GL_DRAW_BUFFER8_ARB = $882D; + GL_DRAW_BUFFER9_ARB = $882E; + GL_DRAW_BUFFER10_ARB = $882F; + GL_DRAW_BUFFER11_ARB = $8830; + GL_DRAW_BUFFER12_ARB = $8831; + GL_DRAW_BUFFER13_ARB = $8832; + GL_DRAW_BUFFER14_ARB = $8833; + GL_DRAW_BUFFER15_ARB = $8834; + + // GL_ARB_texture_rectangle + GL_TEXTURE_RECTANGLE_ARB = $84F5; + GL_TEXTURE_BINDING_RECTANGLE_ARB = $84F6; + GL_PROXY_TEXTURE_RECTANGLE_ARB = $84F7; + GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = $84F8; + + // GL_ARB_color_buffer_float + GL_RGBA_FLOAT_MODE_ARB = $8820; + GL_CLAMP_VERTEX_COLOR_ARB = $891A; + GL_CLAMP_FRAGMENT_COLOR_ARB = $891B; + GL_CLAMP_READ_COLOR_ARB = $891C; + GL_FIXED_ONLY_ARB = $891D; + WGL_TYPE_RGBA_FLOAT_ARB = $21A0; + GLX_RGBA_FLOAT_TYPE = $20B9; + GLX_RGBA_FLOAT_BIT = $00000004; + + // GL_ARB_half_float_pixel + GL_HALF_FLOAT_ARB = $140B; + + // GL_ARB_texture_float + GL_TEXTURE_RED_TYPE_ARB = $8C10; + GL_TEXTURE_GREEN_TYPE_ARB = $8C11; + GL_TEXTURE_BLUE_TYPE_ARB = $8C12; + GL_TEXTURE_ALPHA_TYPE_ARB = $8C13; + GL_TEXTURE_LUMINANCE_TYPE_ARB = $8C14; + GL_TEXTURE_INTENSITY_TYPE_ARB = $8C15; + GL_TEXTURE_DEPTH_TYPE_ARB = $8C16; + GL_UNSIGNED_NORMALIZED_ARB = $8C17; + GL_RGBA32F_ARB = $8814; + GL_RGB32F_ARB = $8815; + GL_ALPHA32F_ARB = $8816; + GL_INTENSITY32F_ARB = $8817; + GL_LUMINANCE32F_ARB = $8818; + GL_LUMINANCE_ALPHA32F_ARB = $8819; + GL_RGBA16F_ARB = $881A; + GL_RGB16F_ARB = $881B; + GL_ALPHA16F_ARB = $881C; + GL_INTENSITY16F_ARB = $881D; + GL_LUMINANCE16F_ARB = $881E; + GL_LUMINANCE_ALPHA16F_ARB = $881F; + + // GL_ARB_pixel_buffer_object + GL_PIXEL_PACK_BUFFER_ARB = $88EB; + GL_PIXEL_UNPACK_BUFFER_ARB = $88EC; + GL_PIXEL_PACK_BUFFER_BINDING_ARB = $88ED; + GL_PIXEL_UNPACK_BUFFER_BINDING_ARB = $88EF; + + // GL_ARB_depth_buffer_float + GL_DEPTH_COMPONENT32F = $8CAC; + GL_DEPTH32F_STENCIL8 = $8CAD; + GL_FLOAT_32_UNSIGNED_INT_24_8_REV = $8DAD; + + // GL_ARB_framebuffer_object + GL_INVALID_FRAMEBUFFER_OPERATION = $0506; + GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = $8210; + GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = $8211; + GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = $8212; + GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = $8213; + GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = $8214; + GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = $8215; + GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = $8216; + GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = $8217; + GL_FRAMEBUFFER_DEFAULT = $8218; + GL_FRAMEBUFFER_UNDEFINED = $8219; + GL_DEPTH_STENCIL_ATTACHMENT = $821A; + GL_MAX_RENDERBUFFER_SIZE = $84E8; + GL_DEPTH_STENCIL = $84F9; + GL_UNSIGNED_INT_24_8 = $84FA; + GL_DEPTH24_STENCIL8 = $88F0; + GL_TEXTURE_STENCIL_SIZE = $88F1; + GL_TEXTURE_RED_TYPE = $8C10; + GL_TEXTURE_GREEN_TYPE = $8C11; + GL_TEXTURE_BLUE_TYPE = $8C12; + GL_TEXTURE_ALPHA_TYPE = $8C13; + GL_TEXTURE_DEPTH_TYPE = $8C16; + GL_UNSIGNED_NORMALIZED = $8C17; + GL_FRAMEBUFFER_BINDING = $8CA6; + GL_DRAW_FRAMEBUFFER_BINDING = GL_FRAMEBUFFER_BINDING; + GL_RENDERBUFFER_BINDING = $8CA7; + GL_READ_FRAMEBUFFER = $8CA8; + GL_DRAW_FRAMEBUFFER = $8CA9; + GL_READ_FRAMEBUFFER_BINDING = $8CAA; + GL_RENDERBUFFER_SAMPLES = $8CAB; + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = $8CD0; + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = $8CD1; + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = $8CD2; + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = $8CD3; + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = $8CD4; + GL_FRAMEBUFFER_COMPLETE = $8CD5; + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = $8CD6; + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = $8CD7; + GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = $8CDB; + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = $8CDC; + GL_FRAMEBUFFER_UNSUPPORTED = $8CDD; + GL_MAX_COLOR_ATTACHMENTS = $8CDF; + GL_COLOR_ATTACHMENT0 = $8CE0; + GL_COLOR_ATTACHMENT1 = $8CE1; + GL_COLOR_ATTACHMENT2 = $8CE2; + GL_COLOR_ATTACHMENT3 = $8CE3; + GL_COLOR_ATTACHMENT4 = $8CE4; + GL_COLOR_ATTACHMENT5 = $8CE5; + GL_COLOR_ATTACHMENT6 = $8CE6; + GL_COLOR_ATTACHMENT7 = $8CE7; + GL_COLOR_ATTACHMENT8 = $8CE8; + GL_COLOR_ATTACHMENT9 = $8CE9; + GL_COLOR_ATTACHMENT10 = $8CEA; + GL_COLOR_ATTACHMENT11 = $8CEB; + GL_COLOR_ATTACHMENT12 = $8CEC; + GL_COLOR_ATTACHMENT13 = $8CED; + GL_COLOR_ATTACHMENT14 = $8CEE; + GL_COLOR_ATTACHMENT15 = $8CEF; + GL_DEPTH_ATTACHMENT = $8D00; + GL_STENCIL_ATTACHMENT = $8D20; + GL_FRAMEBUFFER = $8D40; + GL_RENDERBUFFER = $8D41; + GL_RENDERBUFFER_WIDTH = $8D42; + GL_RENDERBUFFER_HEIGHT = $8D43; + GL_RENDERBUFFER_INTERNAL_FORMAT = $8D44; + GL_STENCIL_INDEX1 = $8D46; + GL_STENCIL_INDEX4 = $8D47; + GL_STENCIL_INDEX8 = $8D48; + GL_STENCIL_INDEX16 = $8D49; + GL_RENDERBUFFER_RED_SIZE = $8D50; + GL_RENDERBUFFER_GREEN_SIZE = $8D51; + GL_RENDERBUFFER_BLUE_SIZE = $8D52; + GL_RENDERBUFFER_ALPHA_SIZE = $8D53; + GL_RENDERBUFFER_DEPTH_SIZE = $8D54; + GL_RENDERBUFFER_STENCIL_SIZE = $8D55; + GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = $8D56; + GL_MAX_SAMPLES = $8D57; +{$ifdef DGL_DEPRECATED} + GL_INDEX = $8222; + GL_TEXTURE_LUMINANCE_TYPE = $8C14; + GL_TEXTURE_INTENSITY_TYPE = $8C15; +{$endif} + + // GL_ARB_framebuffer_sRGB + GL_FRAMEBUFFER_SRGB = $8DB9; + + // GL_ARB_geometry_shader4 + GL_LINES_ADJACENCY_ARB = $000A; + GL_LINE_STRIP_ADJACENCY_ARB = $000B; + GL_TRIANGLES_ADJACENCY_ARB = $000C; + GL_TRIANGLE_STRIP_ADJACENCY_ARB = $000D; + GL_PROGRAM_POINT_SIZE_ARB = $8642; + GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = $8C29; + GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = $8DA7; + GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = $8DA8; + GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = $8DA9; + GL_GEOMETRY_SHADER_ARB = $8DD9; + GL_GEOMETRY_VERTICES_OUT_ARB = $8DDA; + GL_GEOMETRY_INPUT_TYPE_ARB = $8DDB; + GL_GEOMETRY_OUTPUT_TYPE_ARB = $8DDC; + GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB = $8DDD; + GL_MAX_VERTEX_VARYING_COMPONENTS_ARB = $8DDE; + GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = $8DDF; + GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB = $8DE0; + GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = $8DE1; + { reuse GL_MAX_VARYING_COMPONENTS } + { reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER } + + // GL_ARB_half_float_vertex + GL_HALF_FLOAT = $140B; + + // GL_ARB_instanced_arrays + GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = $88FE; + + // GL_ARB_map_buffer_range + GL_MAP_READ_BIT = $0001; + GL_MAP_WRITE_BIT = $0002; + GL_MAP_INVALIDATE_RANGE_BIT = $0004; + GL_MAP_INVALIDATE_BUFFER_BIT = $0008; + GL_MAP_FLUSH_EXPLICIT_BIT = $0010; + GL_MAP_UNSYNCHRONIZED_BIT = $0020; + + // GL_ARB_texture_buffer_object + GL_TEXTURE_BUFFER_ARB = $8C2A; + GL_MAX_TEXTURE_BUFFER_SIZE_ARB = $8C2B; + GL_TEXTURE_BINDING_BUFFER_ARB = $8C2C; + GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB = $8C2D; + GL_TEXTURE_BUFFER_FORMAT_ARB = $8C2E; + + // GL_ARB_texture_compression_rgtc + GL_COMPRESSED_RED_RGTC1 = $8DBB; + GL_COMPRESSED_SIGNED_RED_RGTC1 = $8DBC; + GL_COMPRESSED_RG_RGTC2 = $8DBD; + GL_COMPRESSED_SIGNED_RG_RGTC2 = $8DBE; + + // GL_ARB_texture_rg + GL_RG = $8227; + GL_RG_INTEGER = $8228; + GL_R8 = $8229; + GL_R16 = $822A; + GL_RG8 = $822B; + GL_RG16 = $822C; + GL_R16F = $822D; + GL_R32F = $822E; + GL_RG16F = $822F; + GL_RG32F = $8230; + GL_R8I = $8231; + GL_R8UI = $8232; + GL_R16I = $8233; + GL_R16UI = $8234; + GL_R32I = $8235; + GL_R32UI = $8236; + GL_RG8I = $8237; + GL_RG8UI = $8238; + GL_RG16I = $8239; + GL_RG16UI = $823A; + GL_RG32I = $823B; + GL_RG32UI = $823C; + + // GL_ARB_vertex_array_object + GL_VERTEX_ARRAY_BINDING = $85B5; + + // GL_ARB_uniform_buffer_object + GL_UNIFORM_BUFFER = $8A11; + GL_UNIFORM_BUFFER_BINDING = $8A28; + GL_UNIFORM_BUFFER_START = $8A29; + GL_UNIFORM_BUFFER_SIZE = $8A2A; + GL_MAX_VERTEX_UNIFORM_BLOCKS = $8A2B; + GL_MAX_GEOMETRY_UNIFORM_BLOCKS = $8A2C; + GL_MAX_FRAGMENT_UNIFORM_BLOCKS = $8A2D; + GL_MAX_COMBINED_UNIFORM_BLOCKS = $8A2E; + GL_MAX_UNIFORM_BUFFER_BINDINGS = $8A2F; + GL_MAX_UNIFORM_BLOCK_SIZE = $8A30; + GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = $8A31; + GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = $8A32; + GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = $8A33; + GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = $8A34; + GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = $8A35; + GL_ACTIVE_UNIFORM_BLOCKS = $8A36; + GL_UNIFORM_TYPE = $8A37; + GL_UNIFORM_SIZE = $8A38; + GL_UNIFORM_NAME_LENGTH = $8A39; + GL_UNIFORM_BLOCK_INDEX = $8A3A; + GL_UNIFORM_OFFSET = $8A3B; + GL_UNIFORM_ARRAY_STRIDE = $8A3C; + GL_UNIFORM_MATRIX_STRIDE = $8A3D; + GL_UNIFORM_IS_ROW_MAJOR = $8A3E; + GL_UNIFORM_BLOCK_BINDING = $8A3F; + GL_UNIFORM_BLOCK_DATA_SIZE = $8A40; + GL_UNIFORM_BLOCK_NAME_LENGTH = $8A41; + GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = $8A42; + GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = $8A43; + GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = $8A44; + GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = $8A45; + GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = $8A46; + GL_INVALID_INDEX = $FFFFFFFF; + + // GL_ARB_compatibility + { ARB_compatibility just defines tokens from core 3.0 } + + // GL_ARB_copy_buffer + GL_COPY_READ_BUFFER = $8F36; + GL_COPY_WRITE_BUFFER = $8F37; + + // GL_ARB_depth_clamp + GL_DEPTH_CLAMP = $864F; + + // GL_ARB_provoking_vertex + GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = $8E4C; + GL_FIRST_VERTEX_CONVENTION = $8E4D; + GL_LAST_VERTEX_CONVENTION = $8E4E; + GL_PROVOKING_VERTEX = $8E4F; + + // GL_ARB_seamless_cube_map + GL_TEXTURE_CUBE_MAP_SEAMLESS = $884F; + + // GL_ARB_sync + GL_MAX_SERVER_WAIT_TIMEOUT = $9111; + GL_OBJECT_TYPE = $9112; + GL_SYNC_CONDITION = $9113; + GL_SYNC_STATUS = $9114; + GL_SYNC_FLAGS = $9115; + GL_SYNC_FENCE = $9116; + GL_SYNC_GPU_COMMANDS_COMPLETE = $9117; + GL_UNSIGNALED = $9118; + GL_SIGNALED = $9119; + GL_ALREADY_SIGNALED = $911A; + GL_TIMEOUT_EXPIRED = $911B; + GL_CONDITION_SATISFIED = $911C; + GL_WAIT_FAILED = $911D; + GL_SYNC_FLUSH_COMMANDS_BIT = $00000001; + GL_TIMEOUT_IGNORED = $FFFFFFFFFFFFFFFF; + + // GL_ARB_texture_multisample + GL_SAMPLE_POSITION = $8E50; + GL_SAMPLE_MASK = $8E51; + GL_SAMPLE_MASK_VALUE = $8E52; + GL_MAX_SAMPLE_MASK_WORDS = $8E59; + GL_TEXTURE_2D_MULTISAMPLE = $9100; + GL_PROXY_TEXTURE_2D_MULTISAMPLE = $9101; + GL_TEXTURE_2D_MULTISAMPLE_ARRAY = $9102; + GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = $9103; + GL_TEXTURE_BINDING_2D_MULTISAMPLE = $9104; + GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = $9105; + GL_TEXTURE_SAMPLES = $9106; + GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = $9107; + GL_SAMPLER_2D_MULTISAMPLE = $9108; + GL_INT_SAMPLER_2D_MULTISAMPLE = $9109; + GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = $910A; + GL_SAMPLER_2D_MULTISAMPLE_ARRAY = $910B; + GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = $910C; + GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = $910D; + GL_MAX_COLOR_TEXTURE_SAMPLES = $910E; + GL_MAX_DEPTH_TEXTURE_SAMPLES = $910F; + GL_MAX_INTEGER_SAMPLES = $9110; + + // GL_ARB_vertex_array_bgra + { reuse GL_BGRA } + + // GL_ARB_sample_shading + GL_SAMPLE_SHADING = $8C36; + GL_MIN_SAMPLE_SHADING_VALUE = $8C37; + + // GL_ARB_texture_cube_map_array + GL_TEXTURE_CUBE_MAP_ARRAY = $9009; + GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = $900A; + GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = $900B; + GL_SAMPLER_CUBE_MAP_ARRAY = $900C; + GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = $900D; + GL_INT_SAMPLER_CUBE_MAP_ARRAY = $900E; + GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = $900F; + + // GL_ARB_texture_gather + GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = $8E5E; + GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = $8E5F; + GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS = $8F9F; + + // GL_ATI_draw_buffers + GL_MAX_DRAW_BUFFERS_ATI = $8824; + GL_DRAW_BUFFER0_ATI = $8825; + GL_DRAW_BUFFER1_ATI = $8826; + GL_DRAW_BUFFER2_ATI = $8827; + GL_DRAW_BUFFER3_ATI = $8828; + GL_DRAW_BUFFER4_ATI = $8829; + GL_DRAW_BUFFER5_ATI = $882A; + GL_DRAW_BUFFER6_ATI = $882B; + GL_DRAW_BUFFER7_ATI = $882C; + GL_DRAW_BUFFER8_ATI = $882D; + GL_DRAW_BUFFER9_ATI = $882E; + GL_DRAW_BUFFER10_ATI = $882F; + GL_DRAW_BUFFER11_ATI = $8830; + GL_DRAW_BUFFER12_ATI = $8831; + GL_DRAW_BUFFER13_ATI = $8832; + GL_DRAW_BUFFER14_ATI = $8833; + GL_DRAW_BUFFER15_ATI = $8834; + + // GL_ATI_element_array + GL_ELEMENT_ARRAY_ATI = $8768; + GL_ELEMENT_ARRAY_TYPE_ATI = $8769; + GL_ELEMENT_ARRAY_POINTER_ATI = $876A; + + // GL_ATI_envmap_bumpmap + GL_BUMP_ROT_MATRIX_ATI = $8775; + GL_BUMP_ROT_MATRIX_SIZE_ATI = $8776; + GL_BUMP_NUM_TEX_UNITS_ATI = $8777; + GL_BUMP_TEX_UNITS_ATI = $8778; + GL_DUDV_ATI = $8779; + GL_DU8DV8_ATI = $877A; + GL_BUMP_ENVMAP_ATI = $877B; + GL_BUMP_TARGET_ATI = $877C; + + // GL_ATI_fragment_shader + GL_FRAGMENT_SHADER_ATI = $8920; + GL_REG_0_ATI = $8921; + GL_REG_1_ATI = $8922; + GL_REG_2_ATI = $8923; + GL_REG_3_ATI = $8924; + GL_REG_4_ATI = $8925; + GL_REG_5_ATI = $8926; + GL_REG_6_ATI = $8927; + GL_REG_7_ATI = $8928; + GL_REG_8_ATI = $8929; + GL_REG_9_ATI = $892A; + GL_REG_10_ATI = $892B; + GL_REG_11_ATI = $892C; + GL_REG_12_ATI = $892D; + GL_REG_13_ATI = $892E; + GL_REG_14_ATI = $892F; + GL_REG_15_ATI = $8930; + GL_REG_16_ATI = $8931; + GL_REG_17_ATI = $8932; + GL_REG_18_ATI = $8933; + GL_REG_19_ATI = $8934; + GL_REG_20_ATI = $8935; + GL_REG_21_ATI = $8936; + GL_REG_22_ATI = $8937; + GL_REG_23_ATI = $8938; + GL_REG_24_ATI = $8939; + GL_REG_25_ATI = $893A; + GL_REG_26_ATI = $893B; + GL_REG_27_ATI = $893C; + GL_REG_28_ATI = $893D; + GL_REG_29_ATI = $893E; + GL_REG_30_ATI = $893F; + GL_REG_31_ATI = $8940; + GL_CON_0_ATI = $8941; + GL_CON_1_ATI = $8942; + GL_CON_2_ATI = $8943; + GL_CON_3_ATI = $8944; + GL_CON_4_ATI = $8945; + GL_CON_5_ATI = $8946; + GL_CON_6_ATI = $8947; + GL_CON_7_ATI = $8948; + GL_CON_8_ATI = $8949; + GL_CON_9_ATI = $894A; + GL_CON_10_ATI = $894B; + GL_CON_11_ATI = $894C; + GL_CON_12_ATI = $894D; + GL_CON_13_ATI = $894E; + GL_CON_14_ATI = $894F; + GL_CON_15_ATI = $8950; + GL_CON_16_ATI = $8951; + GL_CON_17_ATI = $8952; + GL_CON_18_ATI = $8953; + GL_CON_19_ATI = $8954; + GL_CON_20_ATI = $8955; + GL_CON_21_ATI = $8956; + GL_CON_22_ATI = $8957; + GL_CON_23_ATI = $8958; + GL_CON_24_ATI = $8959; + GL_CON_25_ATI = $895A; + GL_CON_26_ATI = $895B; + GL_CON_27_ATI = $895C; + GL_CON_28_ATI = $895D; + GL_CON_29_ATI = $895E; + GL_CON_30_ATI = $895F; + GL_CON_31_ATI = $8960; + GL_MOV_ATI = $8961; + GL_ADD_ATI = $8963; + GL_MUL_ATI = $8964; + GL_SUB_ATI = $8965; + GL_DOT3_ATI = $8966; + GL_DOT4_ATI = $8967; + GL_MAD_ATI = $8968; + GL_LERP_ATI = $8969; + GL_CND_ATI = $896A; + GL_CND0_ATI = $896B; + GL_DOT2_ADD_ATI = $896C; + GL_SECONDARY_INTERPOLATOR_ATI = $896D; + GL_NUM_FRAGMENT_REGISTERS_ATI = $896E; + GL_NUM_FRAGMENT_CONSTANTS_ATI = $896F; + GL_NUM_PASSES_ATI = $8970; + GL_NUM_INSTRUCTIONS_PER_PASS_ATI = $8971; + GL_NUM_INSTRUCTIONS_TOTAL_ATI = $8972; + GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI = $8973; + GL_NUM_LOOPBACK_COMPONENTS_ATI = $8974; + GL_COLOR_ALPHA_PAIRING_ATI = $8975; + GL_SWIZZLE_STR_ATI = $8976; + GL_SWIZZLE_STQ_ATI = $8977; + GL_SWIZZLE_STR_DR_ATI = $8978; + GL_SWIZZLE_STQ_DQ_ATI = $8979; + GL_SWIZZLE_STRQ_ATI = $897A; + GL_SWIZZLE_STRQ_DQ_ATI = $897B; + GL_RED_BIT_ATI = $00000001; + GL_GREEN_BIT_ATI = $00000002; + GL_BLUE_BIT_ATI = $00000004; + GL_2X_BIT_ATI = $00000001; + GL_4X_BIT_ATI = $00000002; + GL_8X_BIT_ATI = $00000004; + GL_HALF_BIT_ATI = $00000008; + GL_QUARTER_BIT_ATI = $00000010; + GL_EIGHTH_BIT_ATI = $00000020; + GL_SATURATE_BIT_ATI = $00000040; + GL_COMP_BIT_ATI = $00000002; + GL_NEGATE_BIT_ATI = $00000004; + GL_BIAS_BIT_ATI = $00000008; + + // GL_ATI_pn_triangles + GL_PN_TRIANGLES_ATI = $87F0; + GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = $87F1; + GL_PN_TRIANGLES_POINT_MODE_ATI = $87F2; + GL_PN_TRIANGLES_NORMAL_MODE_ATI = $87F3; + GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI = $87F4; + GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI = $87F5; + GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI = $87F6; + GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = $87F7; + GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = $87F8; + + // GL_ATI_separate_stencil + GL_STENCIL_BACK_FUNC_ATI = $8800; + GL_STENCIL_BACK_FAIL_ATI = $8801; + GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = $8802; + GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI = $8803; + + // GL_ATI_text_fragment_shader + GL_TEXT_FRAGMENT_SHADER_ATI = $8200; + + // GL_ATI_texture_env_combine3 + GL_MODULATE_ADD_ATI = $8744; + GL_MODULATE_SIGNED_ADD_ATI = $8745; + GL_MODULATE_SUBTRACT_ATI = $8746; + + // GL_ATI_texture_float + GL_RGBA_FLOAT32_ATI = $8814; + GL_RGB_FLOAT32_ATI = $8815; + GL_ALPHA_FLOAT32_ATI = $8816; + GL_INTENSITY_FLOAT32_ATI = $8817; + GL_LUMINANCE_FLOAT32_ATI = $8818; + GL_LUMINANCE_ALPHA_FLOAT32_ATI = $8819; + GL_RGBA_FLOAT16_ATI = $881A; + GL_RGB_FLOAT16_ATI = $881B; + GL_ALPHA_FLOAT16_ATI = $881C; + GL_INTENSITY_FLOAT16_ATI = $881D; + GL_LUMINANCE_FLOAT16_ATI = $881E; + GL_LUMINANCE_ALPHA_FLOAT16_ATI = $881F; + + // GL_ATI_texture_mirror_once + GL_MIRROR_CLAMP_ATI = $8742; + GL_MIRROR_CLAMP_TO_EDGE_ATI = $8743; + + // GL_ATI_vertex_array_object + GL_STATIC_ATI = $8760; + GL_DYNAMIC_ATI = $8761; + GL_PRESERVE_ATI = $8762; + GL_DISCARD_ATI = $8763; + GL_OBJECT_BUFFER_SIZE_ATI = $8764; + GL_OBJECT_BUFFER_USAGE_ATI = $8765; + GL_ARRAY_OBJECT_BUFFER_ATI = $8766; + GL_ARRAY_OBJECT_OFFSET_ATI = $8767; + + // GL_ATI_vertex_streams + GL_MAX_VERTEX_STREAMS_ATI = $876B; + GL_VERTEX_STREAM0_ATI = $876C; + GL_VERTEX_STREAM1_ATI = $876D; + GL_VERTEX_STREAM2_ATI = $876E; + GL_VERTEX_STREAM3_ATI = $876F; + GL_VERTEX_STREAM4_ATI = $8770; + GL_VERTEX_STREAM5_ATI = $8771; + GL_VERTEX_STREAM6_ATI = $8772; + GL_VERTEX_STREAM7_ATI = $8773; + GL_VERTEX_SOURCE_ATI = $8774; + + // GL_ATI_meminfo + GL_VBO_FREE_MEMORY_ATI = $87FB; + GL_TEXTURE_FREE_MEMORY_ATI = $87FC; + GL_RENDERBUFFER_FREE_MEMORY_ATI = $87FD; + + // GL_AMD_performance_monitor + GL_COUNTER_TYPE_AMD = $8BC0; + GL_COUNTER_RANGE_AMD = $8BC1; + GL_UNSIGNED_INT64_AMD = $8BC2; + GL_PERCENTAGE_AMD = $8BC3; + GL_PERFMON_RESULT_AVAILABLE_AMD = $8BC4; + GL_PERFMON_RESULT_SIZE_AMD = $8BC5; + GL_PERFMON_RESULT_AMD = $8BC6; + + // GL_AMD_vertex_shader_tesselator + GL_SAMPLER_BUFFER_AMD = $9001; + GL_INT_SAMPLER_BUFFER_AMD = $9002; + GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD = $9003; + GL_TESSELLATION_MODE_AMD = $9004; + GL_TESSELLATION_FACTOR_AMD = $9005; + GL_DISCRETE_AMD = $9006; + GL_CONTINUOUS_AMD = $9007; + + // GL_EXT_422_pixels + GL_422_EXT = $80CC; + GL_422_REV_EXT = $80CD; + GL_422_AVERAGE_EXT = $80CE; + GL_422_REV_AVERAGE_EXT = $80CF; + + // GL_EXT_abgr + GL_ABGR_EXT = $8000; + + // GL_EXT_bgra + GL_BGR_EXT = $80E0; + GL_BGRA_EXT = $80E1; + + // GL_EXT_blend_color + GL_CONSTANT_COLOR_EXT = $8001; + GL_ONE_MINUS_CONSTANT_COLOR_EXT = $8002; + GL_CONSTANT_ALPHA_EXT = $8003; + GL_ONE_MINUS_CONSTANT_ALPHA_EXT = $8004; + GL_BLEND_COLOR_EXT = $8005; + + // GL_EXT_blend_func_separate + GL_BLEND_DST_RGB_EXT = $80C8; + GL_BLEND_SRC_RGB_EXT = $80C9; + GL_BLEND_DST_ALPHA_EXT = $80CA; + GL_BLEND_SRC_ALPHA_EXT = $80CB; + + // GL_EXT_blend_minmax + GL_FUNC_ADD_EXT = $8006; + GL_MIN_EXT = $8007; + GL_MAX_EXT = $8008; + GL_BLEND_EQUATION_EXT = $8009; + + // GL_EXT_blend_subtract + GL_FUNC_SUBTRACT_EXT = $800A; + GL_FUNC_REVERSE_SUBTRACT_EXT = $800B; + + // GL_EXT_clip_volume_hint + GL_CLIP_VOLUME_CLIPPING_HINT_EXT = $80F0; + + // GL_EXT_cmyka + GL_CMYK_EXT = $800C; + GL_CMYKA_EXT = $800D; + GL_PACK_CMYK_HINT_EXT = $800E; + GL_UNPACK_CMYK_HINT_EXT = $800F; + + // GL_EXT_compiled_vertex_array + GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = $81A8; + GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = $81A9; + + // GL_EXT_convolution + GL_CONVOLUTION_1D_EXT = $8010; + GL_CONVOLUTION_2D_EXT = $8011; + GL_SEPARABLE_2D_EXT = $8012; + GL_CONVOLUTION_BORDER_MODE_EXT = $8013; + GL_CONVOLUTION_FILTER_SCALE_EXT = $8014; + GL_CONVOLUTION_FILTER_BIAS_EXT = $8015; + GL_REDUCE_EXT = $8016; + GL_CONVOLUTION_FORMAT_EXT = $8017; + GL_CONVOLUTION_WIDTH_EXT = $8018; + GL_CONVOLUTION_HEIGHT_EXT = $8019; + GL_MAX_CONVOLUTION_WIDTH_EXT = $801A; + GL_MAX_CONVOLUTION_HEIGHT_EXT = $801B; + GL_POST_CONVOLUTION_RED_SCALE_EXT = $801C; + GL_POST_CONVOLUTION_GREEN_SCALE_EXT = $801D; + GL_POST_CONVOLUTION_BLUE_SCALE_EXT = $801E; + GL_POST_CONVOLUTION_ALPHA_SCALE_EXT = $801F; + GL_POST_CONVOLUTION_RED_BIAS_EXT = $8020; + GL_POST_CONVOLUTION_GREEN_BIAS_EXT = $8021; + GL_POST_CONVOLUTION_BLUE_BIAS_EXT = $8022; + GL_POST_CONVOLUTION_ALPHA_BIAS_EXT = $8023; + + // GL_EXT_coordinate_frame + GL_TANGENT_ARRAY_EXT = $8439; + GL_BINORMAL_ARRAY_EXT = $843A; + GL_CURRENT_TANGENT_EXT = $843B; + GL_CURRENT_BINORMAL_EXT = $843C; + GL_TANGENT_ARRAY_TYPE_EXT = $843E; + GL_TANGENT_ARRAY_STRIDE_EXT = $843F; + GL_BINORMAL_ARRAY_TYPE_EXT = $8440; + GL_BINORMAL_ARRAY_STRIDE_EXT = $8441; + GL_TANGENT_ARRAY_POINTER_EXT = $8442; + GL_BINORMAL_ARRAY_POINTER_EXT = $8443; + GL_MAP1_TANGENT_EXT = $8444; + GL_MAP2_TANGENT_EXT = $8445; + GL_MAP1_BINORMAL_EXT = $8446; + GL_MAP2_BINORMAL_EXT = $8447; + + // GL_EXT_cull_vertex + GL_CULL_VERTEX_EXT = $81AA; + GL_CULL_VERTEX_EYE_POSITION_EXT = $81AB; + GL_CULL_VERTEX_OBJECT_POSITION_EXT = $81AC; + + // GL_EXT_draw_range_elements + GL_MAX_ELEMENTS_VERTICES_EXT = $80E8; + GL_MAX_ELEMENTS_INDICES_EXT = $80E9; + + // GL_EXT_fog_coord + GL_FOG_COORDINATE_SOURCE_EXT = $8450; + GL_FOG_COORDINATE_EXT = $8451; + GL_FRAGMENT_DEPTH_EXT = $8452; + GL_CURRENT_FOG_COORDINATE_EXT = $8453; + GL_FOG_COORDINATE_ARRAY_TYPE_EXT = $8454; + GL_FOG_COORDINATE_ARRAY_STRIDE_EXT = $8455; + GL_FOG_COORDINATE_ARRAY_POINTER_EXT = $8456; + GL_FOG_COORDINATE_ARRAY_EXT = $8457; + + // GL_EXT_framebuffer_object + GL_FRAMEBUFFER_EXT = $8D40; + GL_RENDERBUFFER_EXT = $8D41; + GL_STENCIL_INDEX_EXT = $8D45; + GL_STENCIL_INDEX1_EXT = $8D46; + GL_STENCIL_INDEX4_EXT = $8D47; + GL_STENCIL_INDEX8_EXT = $8D48; + GL_STENCIL_INDEX16_EXT = $8D49; + GL_RENDERBUFFER_WIDTH_EXT = $8D42; + GL_RENDERBUFFER_HEIGHT_EXT = $8D43; + GL_RENDERBUFFER_INTERNAL_FORMAT_EXT = $8D44; + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = $8CD0; + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = $8CD1; + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = $8CD2; + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = $8CD3; + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = $8CD4; + GL_COLOR_ATTACHMENT0_EXT = $8CE0; + GL_COLOR_ATTACHMENT1_EXT = $8CE1; + GL_COLOR_ATTACHMENT2_EXT = $8CE2; + GL_COLOR_ATTACHMENT3_EXT = $8CE3; + GL_COLOR_ATTACHMENT4_EXT = $8CE4; + GL_COLOR_ATTACHMENT5_EXT = $8CE5; + GL_COLOR_ATTACHMENT6_EXT = $8CE6; + GL_COLOR_ATTACHMENT7_EXT = $8CE7; + GL_COLOR_ATTACHMENT8_EXT = $8CE8; + GL_COLOR_ATTACHMENT9_EXT = $8CE9; + GL_COLOR_ATTACHMENT10_EXT = $8CEA; + GL_COLOR_ATTACHMENT11_EXT = $8CEB; + GL_COLOR_ATTACHMENT12_EXT = $8CEC; + GL_COLOR_ATTACHMENT13_EXT = $8CED; + GL_COLOR_ATTACHMENT14_EXT = $8CEE; + GL_COLOR_ATTACHMENT15_EXT = $8CEF; + GL_DEPTH_ATTACHMENT_EXT = $8D00; + GL_STENCIL_ATTACHMENT_EXT = $8D20; + GL_FRAMEBUFFER_COMPLETE_EXT = $8CD5; + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = $8CD6; + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = $8CD7; + GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT = $8CD8; + GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = $8CD9; + GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = $8CDA; + GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = $8CDB; + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = $8CDC; + GL_FRAMEBUFFER_UNSUPPORTED_EXT = $8CDD; + GL_FRAMEBUFFER_STATUS_ERROR_EXT = $8CDE; + GL_FRAMEBUFFER_BINDING_EXT = $8CA6; + GL_RENDERBUFFER_BINDING_EXT = $8CA7; + GL_MAX_COLOR_ATTACHMENTS_EXT = $8CDF; + GL_MAX_RENDERBUFFER_SIZE_EXT = $84E8; + GL_INVALID_FRAMEBUFFER_OPERATION_EXT = $0506; + + // GL_EXT_histogram + GL_HISTOGRAM_EXT = $8024; + GL_PROXY_HISTOGRAM_EXT = $8025; + GL_HISTOGRAM_WIDTH_EXT = $8026; + GL_HISTOGRAM_FORMAT_EXT = $8027; + GL_HISTOGRAM_RED_SIZE_EXT = $8028; + GL_HISTOGRAM_GREEN_SIZE_EXT = $8029; + GL_HISTOGRAM_BLUE_SIZE_EXT = $802A; + GL_HISTOGRAM_ALPHA_SIZE_EXT = $802B; + GL_HISTOGRAM_LUMINANCE_SIZE_EXT = $802C; + GL_HISTOGRAM_SINK_EXT = $802D; + GL_MINMAX_EXT = $802E; + GL_MINMAX_FORMAT_EXT = $802F; + GL_MINMAX_SINK_EXT = $8030; + GL_TABLE_TOO_LARGE_EXT = $8031; + + // GL_EXT_index_array_formats + GL_IUI_V2F_EXT = $81AD; + GL_IUI_V3F_EXT = $81AE; + GL_IUI_N3F_V2F_EXT = $81AF; + GL_IUI_N3F_V3F_EXT = $81B0; + GL_T2F_IUI_V2F_EXT = $81B1; + GL_T2F_IUI_V3F_EXT = $81B2; + GL_T2F_IUI_N3F_V2F_EXT = $81B3; + GL_T2F_IUI_N3F_V3F_EXT = $81B4; + + // GL_EXT_index_func + GL_INDEX_TEST_EXT = $81B5; + GL_INDEX_TEST_FUNC_EXT = $81B6; + GL_INDEX_TEST_REF_EXT = $81B7; + + // GL_EXT_index_material + GL_INDEX_MATERIAL_EXT = $81B8; + GL_INDEX_MATERIAL_PARAMETER_EXT = $81B9; + GL_INDEX_MATERIAL_FACE_EXT = $81BA; + + // GL_EXT_light_texture + GL_FRAGMENT_MATERIAL_EXT = $8349; + GL_FRAGMENT_NORMAL_EXT = $834A; + GL_FRAGMENT_COLOR_EXT = $834C; + GL_ATTENUATION_EXT = $834D; + GL_SHADOW_ATTENUATION_EXT = $834E; + GL_TEXTURE_APPLICATION_MODE_EXT = $834F; + GL_TEXTURE_LIGHT_EXT = $8350; + GL_TEXTURE_MATERIAL_FACE_EXT = $8351; + GL_TEXTURE_MATERIAL_PARAMETER_EXT = $8352; + + // GL_EXT_multisample + GL_MULTISAMPLE_EXT = $809D; + GL_SAMPLE_ALPHA_TO_MASK_EXT = $809E; + GL_SAMPLE_ALPHA_TO_ONE_EXT = $809F; + GL_SAMPLE_MASK_EXT = $80A0; + GL_1PASS_EXT = $80A1; + GL_2PASS_0_EXT = $80A2; + GL_2PASS_1_EXT = $80A3; + GL_4PASS_0_EXT = $80A4; + GL_4PASS_1_EXT = $80A5; + GL_4PASS_2_EXT = $80A6; + GL_4PASS_3_EXT = $80A7; + GL_SAMPLE_BUFFERS_EXT = $80A8; + GL_SAMPLES_EXT = $80A9; + GL_SAMPLE_MASK_VALUE_EXT = $80AA; + GL_SAMPLE_MASK_INVERT_EXT = $80AB; + GL_SAMPLE_PATTERN_EXT = $80AC; + GL_MULTISAMPLE_BIT_EXT = $20000000; + + // GL_EXT_packed_pixels + GL_UNSIGNED_BYTE_3_3_2_EXT = $8032; + GL_UNSIGNED_SHORT_4_4_4_4_EXT = $8033; + GL_UNSIGNED_SHORT_5_5_5_1_EXT = $8034; + GL_UNSIGNED_INT_8_8_8_8_EXT = $8035; + GL_UNSIGNED_INT_10_10_10_2_EXT = $8036; + + // GL_EXT_paletted_texture + GL_COLOR_INDEX1_EXT = $80E2; + GL_COLOR_INDEX2_EXT = $80E3; + GL_COLOR_INDEX4_EXT = $80E4; + GL_COLOR_INDEX8_EXT = $80E5; + GL_COLOR_INDEX12_EXT = $80E6; + GL_COLOR_INDEX16_EXT = $80E7; + GL_TEXTURE_INDEX_SIZE_EXT = $80ED; + + // GL_EXT_pixel_transform + GL_PIXEL_TRANSFORM_2D_EXT = $8330; + GL_PIXEL_MAG_FILTER_EXT = $8331; + GL_PIXEL_MIN_FILTER_EXT = $8332; + GL_PIXEL_CUBIC_WEIGHT_EXT = $8333; + GL_CUBIC_EXT = $8334; + GL_AVERAGE_EXT = $8335; + GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = $8336; + GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = $8337; + GL_PIXEL_TRANSFORM_2D_MATRIX_EXT = $8338; + + // GL_EXT_point_parameters + GL_POINT_SIZE_MIN_EXT = $8126; + GL_POINT_SIZE_MAX_EXT = $8127; + GL_POINT_FADE_THRESHOLD_SIZE_EXT = $8128; + GL_DISTANCE_ATTENUATION_EXT = $8129; + + // GL_EXT_polygon_offset + GL_POLYGON_OFFSET_EXT = $8037; + GL_POLYGON_OFFSET_FACTOR_EXT = $8038; + GL_POLYGON_OFFSET_BIAS_EXT = $8039; + + // GL_EXT_rescale_normal + GL_RESCALE_NORMAL_EXT = $803A; + + // GL_EXT_secondary_color + GL_COLOR_SUM_EXT = $8458; + GL_CURRENT_SECONDARY_COLOR_EXT = $8459; + GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = $845A; + GL_SECONDARY_COLOR_ARRAY_TYPE_EXT = $845B; + GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT = $845C; + GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = $845D; + GL_SECONDARY_COLOR_ARRAY_EXT = $845E; + + // GL_EXT_separate_specular_color + GL_LIGHT_MODEL_COLOR_CONTROL_EXT = $81F8; + GL_SINGLE_COLOR_EXT = $81F9; + GL_SEPARATE_SPECULAR_COLOR_EXT = $81FA; + + // GL_EXT_shared_texture_palette + GL_SHARED_TEXTURE_PALETTE_EXT = $81FB; + + // GL_EXT_stencil_two_side + GL_STENCIL_TEST_TWO_SIDE_EXT = $8910; + GL_ACTIVE_STENCIL_FACE_EXT = $8911; + + // GL_EXT_stencil_wrap + GL_INCR_WRAP_EXT = $8507; + GL_DECR_WRAP_EXT = $8508; + + // GL_EXT_texture + GL_ALPHA4_EXT = $803B; + GL_ALPHA8_EXT = $803C; + GL_ALPHA12_EXT = $803D; + GL_ALPHA16_EXT = $803E; + GL_LUMINANCE4_EXT = $803F; + GL_LUMINANCE8_EXT = $8040; + GL_LUMINANCE12_EXT = $8041; + GL_LUMINANCE16_EXT = $8042; + GL_LUMINANCE4_ALPHA4_EXT = $8043; + GL_LUMINANCE6_ALPHA2_EXT = $8044; + GL_LUMINANCE8_ALPHA8_EXT = $8045; + GL_LUMINANCE12_ALPHA4_EXT = $8046; + GL_LUMINANCE12_ALPHA12_EXT = $8047; + GL_LUMINANCE16_ALPHA16_EXT = $8048; + GL_INTENSITY_EXT = $8049; + GL_INTENSITY4_EXT = $804A; + GL_INTENSITY8_EXT = $804B; + GL_INTENSITY12_EXT = $804C; + GL_INTENSITY16_EXT = $804D; + GL_RGB2_EXT = $804E; + GL_RGB4_EXT = $804F; + GL_RGB5_EXT = $8050; + GL_RGB8_EXT = $8051; + GL_RGB10_EXT = $8052; + GL_RGB12_EXT = $8053; + GL_RGB16_EXT = $8054; + GL_RGBA2_EXT = $8055; + GL_RGBA4_EXT = $8056; + GL_RGB5_A1_EXT = $8057; + GL_RGBA8_EXT = $8058; + GL_RGB10_A2_EXT = $8059; + GL_RGBA12_EXT = $805A; + GL_RGBA16_EXT = $805B; + GL_TEXTURE_RED_SIZE_EXT = $805C; + GL_TEXTURE_GREEN_SIZE_EXT = $805D; + GL_TEXTURE_BLUE_SIZE_EXT = $805E; + GL_TEXTURE_ALPHA_SIZE_EXT = $805F; + GL_TEXTURE_LUMINANCE_SIZE_EXT = $8060; + GL_TEXTURE_INTENSITY_SIZE_EXT = $8061; + GL_REPLACE_EXT = $8062; + GL_PROXY_TEXTURE_1D_EXT = $8063; + GL_PROXY_TEXTURE_2D_EXT = $8064; + GL_TEXTURE_TOO_LARGE_EXT = $8065; + + // GL_EXT_texture3D + GL_PACK_SKIP_IMAGES_EXT = $806B; + GL_PACK_IMAGE_HEIGHT_EXT = $806C; + GL_UNPACK_SKIP_IMAGES_EXT = $806D; + GL_UNPACK_IMAGE_HEIGHT_EXT = $806E; + GL_TEXTURE_3D_EXT = $806F; + GL_PROXY_TEXTURE_3D_EXT = $8070; + GL_TEXTURE_DEPTH_EXT = $8071; + GL_TEXTURE_WRAP_R_EXT = $8072; + GL_MAX_3D_TEXTURE_SIZE_EXT = $8073; + + // GL_EXT_texture_compression_s3tc + GL_COMPRESSED_RGB_S3TC_DXT1_EXT = $83F0; + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = $83F1; + GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = $83F2; + GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = $83F3; + + // GL_EXT_texture_cube_map + GL_NORMAL_MAP_EXT = $8511; + GL_REFLECTION_MAP_EXT = $8512; + GL_TEXTURE_CUBE_MAP_EXT = $8513; + GL_TEXTURE_BINDING_CUBE_MAP_EXT = $8514; + GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT = $8515; + GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT = $8516; + GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT = $8517; + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT = $8518; + GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT = $8519; + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT = $851A; + GL_PROXY_TEXTURE_CUBE_MAP_EXT = $851B; + GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT = $851C; + + // GL_EXT_texture_edge_clamp + GL_CLAMP_TO_EDGE_EXT = $812F; + + // GL_EXT_texture_env_combine + GL_COMBINE_EXT = $8570; + GL_COMBINE_RGB_EXT = $8571; + GL_COMBINE_ALPHA_EXT = $8572; + GL_RGB_SCALE_EXT = $8573; + GL_ADD_SIGNED_EXT = $8574; + GL_INTERPOLATE_EXT = $8575; + GL_CONSTANT_EXT = $8576; + GL_PRIMARY_COLOR_EXT = $8577; + GL_PREVIOUS_EXT = $8578; + GL_SOURCE0_RGB_EXT = $8580; + GL_SOURCE1_RGB_EXT = $8581; + GL_SOURCE2_RGB_EXT = $8582; + GL_SOURCE0_ALPHA_EXT = $8588; + GL_SOURCE1_ALPHA_EXT = $8589; + GL_SOURCE2_ALPHA_EXT = $858A; + GL_OPERAND0_RGB_EXT = $8590; + GL_OPERAND1_RGB_EXT = $8591; + GL_OPERAND2_RGB_EXT = $8592; + GL_OPERAND0_ALPHA_EXT = $8598; + GL_OPERAND1_ALPHA_EXT = $8599; + GL_OPERAND2_ALPHA_EXT = $859A; + + // GL_EXT_texture_env_dot3 + GL_DOT3_RGB_EXT = $8740; + GL_DOT3_RGBA_EXT = $8741; + + // GL_EXT_texture_filter_anisotropic + GL_TEXTURE_MAX_ANISOTROPY_EXT = $84FE; + GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = $84FF; + + // GL_EXT_texture_lod_bias + GL_MAX_TEXTURE_LOD_BIAS_EXT = $84FD; + GL_TEXTURE_FILTER_CONTROL_EXT = $8500; + GL_TEXTURE_LOD_BIAS_EXT = $8501; + + // GL_EXT_texture_object + GL_TEXTURE_PRIORITY_EXT = $8066; + GL_TEXTURE_RESIDENT_EXT = $8067; + GL_TEXTURE_1D_BINDING_EXT = $8068; + GL_TEXTURE_2D_BINDING_EXT = $8069; + GL_TEXTURE_3D_BINDING_EXT = $806A; + + // GL_EXT_texture_perturb_normal + GL_PERTURB_EXT = $85AE; + GL_TEXTURE_NORMAL_EXT = $85AF; + + // GL_EXT_texture_rectangle + GL_TEXTURE_RECTANGLE_EXT = $84F5; + GL_TEXTURE_BINDING_RECTANGLE_EXT = $84F6; + GL_PROXY_TEXTURE_RECTANGLE_EXT = $84F7; + GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT = $84F8; + + // GL_EXT_vertex_array + GL_VERTEX_ARRAY_EXT = $8074; + GL_NORMAL_ARRAY_EXT = $8075; + GL_COLOR_ARRAY_EXT = $8076; + GL_INDEX_ARRAY_EXT = $8077; + GL_TEXTURE_COORD_ARRAY_EXT = $8078; + GL_EDGE_FLAG_ARRAY_EXT = $8079; + GL_VERTEX_ARRAY_SIZE_EXT = $807A; + GL_VERTEX_ARRAY_TYPE_EXT = $807B; + GL_VERTEX_ARRAY_STRIDE_EXT = $807C; + GL_VERTEX_ARRAY_COUNT_EXT = $807D; + GL_NORMAL_ARRAY_TYPE_EXT = $807E; + GL_NORMAL_ARRAY_STRIDE_EXT = $807F; + GL_NORMAL_ARRAY_COUNT_EXT = $8080; + GL_COLOR_ARRAY_SIZE_EXT = $8081; + GL_COLOR_ARRAY_TYPE_EXT = $8082; + GL_COLOR_ARRAY_STRIDE_EXT = $8083; + GL_COLOR_ARRAY_COUNT_EXT = $8084; + GL_INDEX_ARRAY_TYPE_EXT = $8085; + GL_INDEX_ARRAY_STRIDE_EXT = $8086; + GL_INDEX_ARRAY_COUNT_EXT = $8087; + GL_TEXTURE_COORD_ARRAY_SIZE_EXT = $8088; + GL_TEXTURE_COORD_ARRAY_TYPE_EXT = $8089; + GL_TEXTURE_COORD_ARRAY_STRIDE_EXT = $808A; + GL_TEXTURE_COORD_ARRAY_COUNT_EXT = $808B; + GL_EDGE_FLAG_ARRAY_STRIDE_EXT = $808C; + GL_EDGE_FLAG_ARRAY_COUNT_EXT = $808D; + GL_VERTEX_ARRAY_POINTER_EXT = $808E; + GL_NORMAL_ARRAY_POINTER_EXT = $808F; + GL_COLOR_ARRAY_POINTER_EXT = $8090; + GL_INDEX_ARRAY_POINTER_EXT = $8091; + GL_TEXTURE_COORD_ARRAY_POINTER_EXT = $8092; + GL_EDGE_FLAG_ARRAY_POINTER_EXT = $8093; + + // GL_EXT_vertex_shader + GL_VERTEX_SHADER_EXT = $8780; + GL_VERTEX_SHADER_BINDING_EXT = $8781; + GL_OP_INDEX_EXT = $8782; + GL_OP_NEGATE_EXT = $8783; + GL_OP_DOT3_EXT = $8784; + GL_OP_DOT4_EXT = $8785; + GL_OP_MUL_EXT = $8786; + GL_OP_ADD_EXT = $8787; + GL_OP_MADD_EXT = $8788; + GL_OP_FRAC_EXT = $8789; + GL_OP_MAX_EXT = $878A; + GL_OP_MIN_EXT = $878B; + GL_OP_SET_GE_EXT = $878C; + GL_OP_SET_LT_EXT = $878D; + GL_OP_CLAMP_EXT = $878E; + GL_OP_FLOOR_EXT = $878F; + GL_OP_ROUND_EXT = $8790; + GL_OP_EXP_BASE_2_EXT = $8791; + GL_OP_LOG_BASE_2_EXT = $8792; + GL_OP_POWER_EXT = $8793; + GL_OP_RECIP_EXT = $8794; + GL_OP_RECIP_SQRT_EXT = $8795; + GL_OP_SUB_EXT = $8796; + GL_OP_CROSS_PRODUCT_EXT = $8797; + GL_OP_MULTIPLY_MATRIX_EXT = $8798; + GL_OP_MOV_EXT = $8799; + GL_OUTPUT_VERTEX_EXT = $879A; + GL_OUTPUT_COLOR0_EXT = $879B; + GL_OUTPUT_COLOR1_EXT = $879C; + GL_OUTPUT_TEXTURE_COORD0_EXT = $879D; + GL_OUTPUT_TEXTURE_COORD1_EXT = $879E; + GL_OUTPUT_TEXTURE_COORD2_EXT = $879F; + GL_OUTPUT_TEXTURE_COORD3_EXT = $87A0; + GL_OUTPUT_TEXTURE_COORD4_EXT = $87A1; + GL_OUTPUT_TEXTURE_COORD5_EXT = $87A2; + GL_OUTPUT_TEXTURE_COORD6_EXT = $87A3; + GL_OUTPUT_TEXTURE_COORD7_EXT = $87A4; + GL_OUTPUT_TEXTURE_COORD8_EXT = $87A5; + GL_OUTPUT_TEXTURE_COORD9_EXT = $87A6; + GL_OUTPUT_TEXTURE_COORD10_EXT = $87A7; + GL_OUTPUT_TEXTURE_COORD11_EXT = $87A8; + GL_OUTPUT_TEXTURE_COORD12_EXT = $87A9; + GL_OUTPUT_TEXTURE_COORD13_EXT = $87AA; + GL_OUTPUT_TEXTURE_COORD14_EXT = $87AB; + GL_OUTPUT_TEXTURE_COORD15_EXT = $87AC; + GL_OUTPUT_TEXTURE_COORD16_EXT = $87AD; + GL_OUTPUT_TEXTURE_COORD17_EXT = $87AE; + GL_OUTPUT_TEXTURE_COORD18_EXT = $87AF; + GL_OUTPUT_TEXTURE_COORD19_EXT = $87B0; + GL_OUTPUT_TEXTURE_COORD20_EXT = $87B1; + GL_OUTPUT_TEXTURE_COORD21_EXT = $87B2; + GL_OUTPUT_TEXTURE_COORD22_EXT = $87B3; + GL_OUTPUT_TEXTURE_COORD23_EXT = $87B4; + GL_OUTPUT_TEXTURE_COORD24_EXT = $87B5; + GL_OUTPUT_TEXTURE_COORD25_EXT = $87B6; + GL_OUTPUT_TEXTURE_COORD26_EXT = $87B7; + GL_OUTPUT_TEXTURE_COORD27_EXT = $87B8; + GL_OUTPUT_TEXTURE_COORD28_EXT = $87B9; + GL_OUTPUT_TEXTURE_COORD29_EXT = $87BA; + GL_OUTPUT_TEXTURE_COORD30_EXT = $87BB; + GL_OUTPUT_TEXTURE_COORD31_EXT = $87BC; + GL_OUTPUT_FOG_EXT = $87BD; + GL_SCALAR_EXT = $87BE; + GL_VECTOR_EXT = $87BF; + GL_MATRIX_EXT = $87C0; + GL_VARIANT_EXT = $87C1; + GL_INVARIANT_EXT = $87C2; + GL_LOCAL_CONSTANT_EXT = $87C3; + GL_LOCAL_EXT = $87C4; + GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = $87C5; + GL_MAX_VERTEX_SHADER_VARIANTS_EXT = $87C6; + GL_MAX_VERTEX_SHADER_INVARIANTS_EXT = $87C7; + GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = $87C8; + GL_MAX_VERTEX_SHADER_LOCALS_EXT = $87C9; + GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = $87CA; + GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = $87CB; + GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = $87CC; + GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = $87CD; + GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = $87CE; + GL_VERTEX_SHADER_INSTRUCTIONS_EXT = $87CF; + GL_VERTEX_SHADER_VARIANTS_EXT = $87D0; + GL_VERTEX_SHADER_INVARIANTS_EXT = $87D1; + GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = $87D2; + GL_VERTEX_SHADER_LOCALS_EXT = $87D3; + GL_VERTEX_SHADER_OPTIMIZED_EXT = $87D4; + GL_X_EXT = $87D5; + GL_Y_EXT = $87D6; + GL_Z_EXT = $87D7; + GL_W_EXT = $87D8; + GL_NEGATIVE_X_EXT = $87D9; + GL_NEGATIVE_Y_EXT = $87DA; + GL_NEGATIVE_Z_EXT = $87DB; + GL_NEGATIVE_W_EXT = $87DC; + GL_ZERO_EXT = $87DD; + GL_ONE_EXT = $87DE; + GL_NEGATIVE_ONE_EXT = $87DF; + GL_NORMALIZED_RANGE_EXT = $87E0; + GL_FULL_RANGE_EXT = $87E1; + GL_CURRENT_VERTEX_EXT = $87E2; + GL_MVP_MATRIX_EXT = $87E3; + GL_VARIANT_VALUE_EXT = $87E4; + GL_VARIANT_DATATYPE_EXT = $87E5; + GL_VARIANT_ARRAY_STRIDE_EXT = $87E6; + GL_VARIANT_ARRAY_TYPE_EXT = $87E7; + GL_VARIANT_ARRAY_EXT = $87E8; + GL_VARIANT_ARRAY_POINTER_EXT = $87E9; + GL_INVARIANT_VALUE_EXT = $87EA; + GL_INVARIANT_DATATYPE_EXT = $87EB; + GL_LOCAL_CONSTANT_VALUE_EXT = $87EC; + GL_LOCAL_CONSTANT_DATATYPE_EXT = $87ED; + + // GL_EXT_vertex_weighting + GL_MODELVIEW0_STACK_DEPTH_EXT = $0BA3; + GL_MODELVIEW1_STACK_DEPTH_EXT = $8502; + GL_MODELVIEW0_MATRIX_EXT = $0BA6; + GL_MODELVIEW1_MATRIX_EXT = $8506; + GL_VERTEX_WEIGHTING_EXT = $8509; + GL_MODELVIEW0_EXT = $1700; + GL_MODELVIEW1_EXT = $850A; + GL_CURRENT_VERTEX_WEIGHT_EXT = $850B; + GL_VERTEX_WEIGHT_ARRAY_EXT = $850C; + GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT = $850D; + GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT = $850E; + GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = $850F; + GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = $8510; + + // GL_EXT_depth_bounds_test + GL_DEPTH_BOUNDS_TEST_EXT = $8890; + GL_DEPTH_BOUNDS_EXT = $8891; + + // GL_EXT_texture_mirror_clamp + GL_MIRROR_CLAMP_EXT = $8742; + GL_MIRROR_CLAMP_TO_EDGE_EXT = $8743; + GL_MIRROR_CLAMP_TO_BORDER_EXT = $8912; + + // GL_EXT_blend_equation_separate + GL_BLEND_EQUATION_RGB_EXT = $8009; + GL_BLEND_EQUATION_ALPHA_EXT = $883D; + + // GL_EXT_pixel_buffer_object + GL_PIXEL_PACK_BUFFER_EXT = $88EB; + GL_PIXEL_UNPACK_BUFFER_EXT = $88EC; + GL_PIXEL_PACK_BUFFER_BINDING_EXT = $88ED; + GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = $88EF; + + // GL_EXT_stencil_clear_tag + GL_STENCIL_TAG_BITS_EXT = $88F2; + GL_STENCIL_CLEAR_TAG_VALUE_EXT = $88F3; + + // GL_EXT_packed_depth_stencil + GL_DEPTH_STENCIL_EXT = $84F9; + GL_UNSIGNED_INT_24_8_EXT = $84FA; + GL_DEPTH24_STENCIL8_EXT = $88F0; + GL_TEXTURE_STENCIL_SIZE_EXT = $88F1; + + // GL_EXT_texture_sRGB + GL_SRGB_EXT = $8C40; + GL_SRGB8_EXT = $8C41; + GL_SRGB_ALPHA_EXT = $8C42; + GL_SRGB8_ALPHA8_EXT = $8C43; + GL_SLUMINANCE_ALPHA_EXT = $8C44; + GL_SLUMINANCE8_ALPHA8_EXT = $8C45; + GL_SLUMINANCE_EXT = $8C46; + GL_SLUMINANCE8_EXT = $8C47; + GL_COMPRESSED_SRGB_EXT = $8C48; + GL_COMPRESSED_SRGB_ALPHA_EXT = $8C49; + GL_COMPRESSED_SLUMINANCE_EXT = $8C4A; + GL_COMPRESSED_SLUMINANCE_ALPHA_EXT = $8C4B; + GL_COMPRESSED_SRGB_S3TC_DXT1_EXT = $8C4C; + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = $8C4D; + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = $8C4E; + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = $8C4F; + + // GL_EXT_framebuffer_blit + GL_READ_FRAMEBUFFER_EXT = $8CA8; + GL_DRAW_FRAMEBUFFER_EXT = $8CA9; + GL_READ_FRAMEBUFFER_BINDING_EXT = GL_FRAMEBUFFER_BINDING_EXT; + GL_DRAW_FRAMEBUFFER_BINDING_EXT = $8CAA; + + // GL_EXT_framebuffer_multisample + GL_RENDERBUFFER_SAMPLES_EXT = $8CAB; + GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = $8D56; + GL_MAX_SAMPLES_EXT = $8D57; + + // GL_EXT_timer_query + GL_TIME_ELAPSED_EXT = $88BF; + + // GL_EXT_bindable_uniform + GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT = $8DE2; + GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = $8DE3; + GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = $8DE4; + GL_MAX_BINDABLE_UNIFORM_SIZE_EXT = $8DED; + GL_UNIFORM_BUFFER_BINDING_EXT = $8DEF; + + // GL_EXT_framebuffer_sRGB + GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT = $20B2; + WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT = $20A9; + GL_FRAMEBUFFER_SRGB_EXT = $8DB9; + GL_FRAMEBUFFER_SRGB_CAPABLE_EXT = $8DBA; + + // GL_EXT_geometry_shader4 + GL_GEOMETRY_SHADER_EXT = $8DD9; + GL_GEOMETRY_VERTICES_OUT_EXT = $8DDA; + GL_GEOMETRY_INPUT_TYPE_EXT = $8DDB; + GL_GEOMETRY_OUTPUT_TYPE_EXT = $8DDC; + GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT = $8C29; + GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT = $8DDD; + GL_MAX_VERTEX_VARYING_COMPONENTS_EXT = $8DDE; + GL_MAX_VARYING_COMPONENTS_EXT = $8B4B; + GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT = $8DDF; + GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT = $8DE0; + GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT = $8DE1; + GL_LINES_ADJACENCY_EXT = $A; + GL_LINE_STRIP_ADJACENCY_EXT = $B; + GL_TRIANGLES_ADJACENCY_EXT = $C; + GL_TRIANGLE_STRIP_ADJACENCY_EXT = $D; + GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT = $8DA8; + GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT = $8DA9; + GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = $8DA7; + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = $8CD4; + GL_PROGRAM_POINT_SIZE_EXT = $8642; + + // GL_EXT_gpu_shader4 + GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT = $88FD; + GL_SAMPLER_1D_ARRAY_EXT = $8DC0; + GL_SAMPLER_2D_ARRAY_EXT = $8DC1; + GL_SAMPLER_BUFFER_EXT = $8DC2; + GL_SAMPLER_1D_ARRAY_SHADOW_EXT = $8DC3; + GL_SAMPLER_2D_ARRAY_SHADOW_EXT = $8DC4; + GL_SAMPLER_CUBE_SHADOW_EXT = $8DC5; + GL_UNSIGNED_INT_VEC2_EXT = $8DC6; + GL_UNSIGNED_INT_VEC3_EXT = $8DC7; + GL_UNSIGNED_INT_VEC4_EXT = $8DC8; + GL_INT_SAMPLER_1D_EXT = $8DC9; + GL_INT_SAMPLER_2D_EXT = $8DCA; + GL_INT_SAMPLER_3D_EXT = $8DCB; + GL_INT_SAMPLER_CUBE_EXT = $8DCC; + GL_INT_SAMPLER_2D_RECT_EXT = $8DCD; + GL_INT_SAMPLER_1D_ARRAY_EXT = $8DCE; + GL_INT_SAMPLER_2D_ARRAY_EXT = $8DCF; + GL_INT_SAMPLER_BUFFER_EXT = $8DD0; + GL_UNSIGNED_INT_SAMPLER_1D_EXT = $8DD1; + GL_UNSIGNED_INT_SAMPLER_2D_EXT = $8DD2; + GL_UNSIGNED_INT_SAMPLER_3D_EXT = $8DD3; + GL_UNSIGNED_INT_SAMPLER_CUBE_EXT = $8DD4; + GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT = $8DD5; + GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT = $8DD6; + GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT = $8DD7; + GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT = $8DD8; + GL_MIN_PROGRAM_TEXEL_OFFSET_EXT = $8904; + GL_MAX_PROGRAM_TEXEL_OFFSET_EXT = $8905; + + // GL_EXT_packed_float + GL_R11F_G11F_B10F_EXT = $8C3A; + GL_UNSIGNED_INT_10F_11F_11F_REV_EXT = $8C3B; + RGBA_SIGNED_COMPONENTS_EXT = $8C3C; + WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT = $20A8; + GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT = $20B1; + GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT = $00000008; + + // GL_EXT_texture_array + GL_TEXTURE_1D_ARRAY_EXT = $8C18; + GL_TEXTURE_2D_ARRAY_EXT = $8C1A; + GL_PROXY_TEXTURE_2D_ARRAY_EXT = $8C1B; + GL_PROXY_TEXTURE_1D_ARRAY_EXT = $8C19; + GL_TEXTURE_BINDING_1D_ARRAY_EXT = $8C1C; + GL_TEXTURE_BINDING_2D_ARRAY_EXT = $8C1D; + GL_MAX_ARRAY_TEXTURE_LAYERS_EXT = $88FF; + GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT = $884E; + + // GL_EXT_texture_buffer_object + GL_TEXTURE_BUFFER_EXT = $8C2A; + GL_MAX_TEXTURE_BUFFER_SIZE_EXT = $8C2B; + GL_TEXTURE_BINDING_BUFFER_EXT = $8C2C; + GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = $8C2D; + GL_TEXTURE_BUFFER_FORMAT_EXT = $8C2E; + + // GL_EXT_texture_compression_latc + GL_COMPRESSED_LUMINANCE_LATC1_EXT = $8C70; + GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = $8C71; + GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = $8C72; + GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = $8C73; + + // GL_EXT_texture_compression_rgtc + GL_COMPRESSED_RED_RGTC1_EXT = $8DBB; + GL_COMPRESSED_SIGNED_RED_RGTC1_EXT = $8DBC; + GL_COMPRESSED_RED_GREEN_RGTC2_EXT = $8DBD; + GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = $8DBE; + + // GL_EXT_texture_integer + GL_RGBA_INTEGER_MODE_EXT = $8D9E; + GL_RGBA32UI_EXT = $8D70; + GL_RGB32UI_EXT = $8D71; + GL_ALPHA32UI_EXT = $8D72; + GL_INTENSITY32UI_EXT = $8D73; + GL_LUMINANCE32UI_EXT = $8D74; + GL_LUMINANCE_ALPHA32UI_EXT = $8D75; + GL_RGBA16UI_EXT = $8D76; + GL_RGB16UI_EXT = $8D77; + GL_ALPHA16UI_EXT = $8D78; + GL_INTENSITY16UI_EXT = $8D79; + GL_LUMINANCE16UI_EXT = $8D7A; + GL_LUMINANCE_ALPHA16UI_EXT = $8D7B; + GL_RGBA8UI_EXT = $8D7C; + GL_RGB8UI_EXT = $8D7D; + GL_ALPHA8UI_EXT = $8D7E; + GL_INTENSITY8UI_EXT = $8D7F; + GL_LUMINANCE8UI_EXT = $8D80; + GL_LUMINANCE_ALPHA8UI_EXT = $8D81; + GL_RGBA32I_EXT = $8D82; + GL_RGB32I_EXT = $8D83; + GL_ALPHA32I_EXT = $8D84; + GL_INTENSITY32I_EXT = $8D85; + GL_LUMINANCE32I_EXT = $8D86; + GL_LUMINANCE_ALPHA32I_EXT = $8D87; + GL_RGBA16I_EXT = $8D88; + GL_RGB16I_EXT = $8D89; + GL_ALPHA16I_EXT = $8D8A; + GL_INTENSITY16I_EXT = $8D8B; + GL_LUMINANCE16I_EXT = $8D8C; + GL_LUMINANCE_ALPHA16I_EXT = $8D8D; + GL_RGBA8I_EXT = $8D8E; + GL_RGB8I_EXT = $8D8F; + GL_ALPHA8I_EXT = $8D90; + GL_INTENSITY8I_EXT = $8D91; + GL_LUMINANCE8I_EXT = $8D92; + GL_LUMINANCE_ALPHA8I_EXT = $8D93; + GL_RED_INTEGER_EXT = $8D94; + GL_GREEN_INTEGER_EXT = $8D95; + GL_BLUE_INTEGER_EXT = $8D96; + GL_ALPHA_INTEGER_EXT = $8D97; + GL_RGB_INTEGER_EXT = $8D98; + GL_RGBA_INTEGER_EXT = $8D99; + GL_BGR_INTEGER_EXT = $8D9A; + GL_BGRA_INTEGER_EXT = $8D9B; + GL_LUMINANCE_INTEGER_EXT = $8D9C; + GL_LUMINANCE_ALPHA_INTEGER_EXT = $8D9D; + + // GL_EXT_texture_shared_exponent + GL_RGB9_E5_EXT = $8C3D; + GL_UNSIGNED_INT_5_9_9_9_REV_EXT = $8C3E; + GL_TEXTURE_SHARED_SIZE_EXT = $8C3F; + + // GL_EXT_transform_feedback + GL_TRANSFORM_FEEDBACK_BUFFER_EXT = $8C8E; + GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT = $8C84; + GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT = $8C85; + GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT = $8C8F; + GL_INTERLEAVED_ATTRIBS_EXT = $8C8C; + GL_SEPARATE_ATTRIBS_EXT = $8C8D; + GL_PRIMITIVES_GENERATED_EXT = $8C87; + GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT = $8C88; + GL_RASTERIZER_DISCARD_EXT = $8C89; + GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = $8C8A; + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = $8C8B; + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT = $8C80; + GL_TRANSFORM_FEEDBACK_VARYINGS_EXT = $8C83; + GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT = $8C7F; + GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT = $8C76; + + // GL_EXT_direct_state_access + GL_PROGRAM_MATRIX_EXT = $8E2D; + GL_TRANSPOSE_PROGRAM_MATRIX_EXT = $8E2E; + GL_PROGRAM_MATRIX_STACK_DEPTH_EXT = $8E2F; + + // GL_EXT_texture_swizzle + GL_TEXTURE_SWIZZLE_R_EXT = $8E42; + GL_TEXTURE_SWIZZLE_G_EXT = $8E43; + GL_TEXTURE_SWIZZLE_B_EXT = $8E44; + GL_TEXTURE_SWIZZLE_A_EXT = $8E45; + GL_TEXTURE_SWIZZLE_RGBA_EXT = $8E46; + + // GL_EXT_provoking_vertex + GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT = $8E4C; + GL_FIRST_VERTEX_CONVENTION_EXT = $8E4D; + GL_LAST_VERTEX_CONVENTION_EXT = $8E4E; + GL_PROVOKING_VERTEX_EXT = $8E4F; + + // GL_EXT_texture_snorm + GL_ALPHA_SNORM = $9010; + GL_LUMINANCE_SNORM = $9011; + GL_LUMINANCE_ALPHA_SNORM = $9012; + GL_INTENSITY_SNORM = $9013; + GL_ALPHA8_SNORM = $9014; + GL_LUMINANCE8_SNORM = $9015; + GL_LUMINANCE8_ALPHA8_SNORM = $9016; + GL_INTENSITY8_SNORM = $9017; + GL_ALPHA16_SNORM = $9018; + GL_LUMINANCE16_SNORM = $9019; + GL_LUMINANCE16_ALPHA16_SNORM = $901A; + GL_INTENSITY16_SNORM = $901B; + { reuse GL_R_SNORM } + { reuse GL_RG_SNORM } + { reuse GL_RGB_SNORM } + { reuse GL_RGBA_SNORM } + { reuse GL_R8_SNORM } + { reuse GL_RG8_SNORM } + { reuse GL_RGB8_SNORM } + { reuse GL_RGBA8_SNORM } + { reuse GL_R16_SNORM } + { reuse GL_RG16_SNORM } + { reuse GL_RGB16_SNORM } + { reuse GL_RGBA16_SNORM } + { reuse GL_SIGNED_NORMALIZED } + + // GL_FfdMaskSGIX + GL_TEXTURE_DEFORMATION_BIT_SGIX = $00000001; + GL_GEOMETRY_DEFORMATION_BIT_SGIX = $00000002; + + // GL_HP_convolution_border_modes + GL_IGNORE_BORDER_HP = $8150; + GL_CONSTANT_BORDER_HP = $8151; + GL_REPLICATE_BORDER_HP = $8153; + GL_CONVOLUTION_BORDER_COLOR_HP = $8154; + + // GL_HP_image_transform + GL_IMAGE_SCALE_X_HP = $8155; + GL_IMAGE_SCALE_Y_HP = $8156; + GL_IMAGE_TRANSLATE_X_HP = $8157; + GL_IMAGE_TRANSLATE_Y_HP = $8158; + GL_IMAGE_ROTATE_ANGLE_HP = $8159; + GL_IMAGE_ROTATE_ORIGIN_X_HP = $815A; + GL_IMAGE_ROTATE_ORIGIN_Y_HP = $815B; + GL_IMAGE_MAG_FILTER_HP = $815C; + GL_IMAGE_MIN_FILTER_HP = $815D; + GL_IMAGE_CUBIC_WEIGHT_HP = $815E; + GL_CUBIC_HP = $815F; + GL_AVERAGE_HP = $8160; + GL_IMAGE_TRANSFORM_2D_HP = $8161; + GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP = $8162; + GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP = $8163; + + // GL_HP_occlusion_test + GL_OCCLUSION_TEST_HP = $8165; + GL_OCCLUSION_TEST_RESULT_HP = $8166; + + // GL_HP_texture_lighting + GL_TEXTURE_LIGHTING_MODE_HP = $8167; + GL_TEXTURE_POST_SPECULAR_HP = $8168; + GL_TEXTURE_PRE_SPECULAR_HP = $8169; + + // GL_IBM_cull_vertex + GL_CULL_VERTEX_IBM = 103050; + + // GL_IBM_rasterpos_clip + GL_RASTER_POSITION_UNCLIPPED_IBM = $19262; + + // GL_IBM_texture_mirrored_repeat + GL_MIRRORED_REPEAT_IBM = $8370; + + // GL_IBM_vertex_array_lists + GL_VERTEX_ARRAY_LIST_IBM = 103070; + GL_NORMAL_ARRAY_LIST_IBM = 103071; + GL_COLOR_ARRAY_LIST_IBM = 103072; + GL_INDEX_ARRAY_LIST_IBM = 103073; + GL_TEXTURE_COORD_ARRAY_LIST_IBM = 103074; + GL_EDGE_FLAG_ARRAY_LIST_IBM = 103075; + GL_FOG_COORDINATE_ARRAY_LIST_IBM = 103076; + GL_SECONDARY_COLOR_ARRAY_LIST_IBM = 103077; + GL_VERTEX_ARRAY_LIST_STRIDE_IBM = 103080; + GL_NORMAL_ARRAY_LIST_STRIDE_IBM = 103081; + GL_COLOR_ARRAY_LIST_STRIDE_IBM = 103082; + GL_INDEX_ARRAY_LIST_STRIDE_IBM = 103083; + GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM = 103084; + GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM = 103085; + GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM = 103086; + GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM = 103087; + + // GL_INGR_color_clamp + GL_RED_MIN_CLAMP_INGR = $8560; + GL_GREEN_MIN_CLAMP_INGR = $8561; + GL_BLUE_MIN_CLAMP_INGR = $8562; + GL_ALPHA_MIN_CLAMP_INGR = $8563; + GL_RED_MAX_CLAMP_INGR = $8564; + GL_GREEN_MAX_CLAMP_INGR = $8565; + GL_BLUE_MAX_CLAMP_INGR = $8566; + GL_ALPHA_MAX_CLAMP_INGR = $8567; + + // GL_INGR_interlace_read + GL_INTERLACE_READ_INGR = $8568; + + // GL_INTEL_parallel_arrays + GL_PARALLEL_ARRAYS_INTEL = $83F4; + GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL = $83F5; + GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL = $83F6; + GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL = $83F7; + GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL = $83F8; + + // GL_NV_copy_depth_to_color + GL_DEPTH_STENCIL_TO_RGBA_NV = $886E; + GL_DEPTH_STENCIL_TO_BGRA_NV = $886F; + + // GL_NV_depth_clamp + GL_DEPTH_CLAMP_NV = $864F; + + // GL_NV_evaluators + GL_EVAL_2D_NV = $86C0; + GL_EVAL_TRIANGULAR_2D_NV = $86C1; + GL_MAP_TESSELLATION_NV = $86C2; + GL_MAP_ATTRIB_U_ORDER_NV = $86C3; + GL_MAP_ATTRIB_V_ORDER_NV = $86C4; + GL_EVAL_FRACTIONAL_TESSELLATION_NV = $86C5; + GL_EVAL_VERTEX_ATTRIB0_NV = $86C6; + GL_EVAL_VERTEX_ATTRIB1_NV = $86C7; + GL_EVAL_VERTEX_ATTRIB2_NV = $86C8; + GL_EVAL_VERTEX_ATTRIB3_NV = $86C9; + GL_EVAL_VERTEX_ATTRIB4_NV = $86CA; + GL_EVAL_VERTEX_ATTRIB5_NV = $86CB; + GL_EVAL_VERTEX_ATTRIB6_NV = $86CC; + GL_EVAL_VERTEX_ATTRIB7_NV = $86CD; + GL_EVAL_VERTEX_ATTRIB8_NV = $86CE; + GL_EVAL_VERTEX_ATTRIB9_NV = $86CF; + GL_EVAL_VERTEX_ATTRIB10_NV = $86D0; + GL_EVAL_VERTEX_ATTRIB11_NV = $86D1; + GL_EVAL_VERTEX_ATTRIB12_NV = $86D2; + GL_EVAL_VERTEX_ATTRIB13_NV = $86D3; + GL_EVAL_VERTEX_ATTRIB14_NV = $86D4; + GL_EVAL_VERTEX_ATTRIB15_NV = $86D5; + GL_MAX_MAP_TESSELLATION_NV = $86D6; + GL_MAX_RATIONAL_EVAL_ORDER_NV = $86D7; + + // GL_NV_fence + GL_ALL_COMPLETED_NV = $84F2; + GL_FENCE_STATUS_NV = $84F3; + GL_FENCE_CONDITION_NV = $84F4; + + // GL_NV_float_buffer + GL_FLOAT_R_NV = $8880; + GL_FLOAT_RG_NV = $8881; + GL_FLOAT_RGB_NV = $8882; + GL_FLOAT_RGBA_NV = $8883; + GL_FLOAT_R16_NV = $8884; + GL_FLOAT_R32_NV = $8885; + GL_FLOAT_RG16_NV = $8886; + GL_FLOAT_RG32_NV = $8887; + GL_FLOAT_RGB16_NV = $8888; + GL_FLOAT_RGB32_NV = $8889; + GL_FLOAT_RGBA16_NV = $888A; + GL_FLOAT_RGBA32_NV = $888B; + GL_TEXTURE_FLOAT_COMPONENTS_NV = $888C; + GL_FLOAT_CLEAR_COLOR_VALUE_NV = $888D; + GL_FLOAT_RGBA_MODE_NV = $888E; + + // GL_NV_fog_distance + GL_FOG_DISTANCE_MODE_NV = $855A; + GL_EYE_RADIAL_NV = $855B; + GL_EYE_PLANE_ABSOLUTE_NV = $855C; + + // GL_NV_fragment_program + GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = $8868; + GL_FRAGMENT_PROGRAM_NV = $8870; + GL_MAX_TEXTURE_COORDS_NV = $8871; + GL_MAX_TEXTURE_IMAGE_UNITS_NV = $8872; + GL_FRAGMENT_PROGRAM_BINDING_NV = $8873; + GL_PROGRAM_ERROR_STRING_NV = $8874; + + // GL_NV_half_float + GL_HALF_FLOAT_NV = $140B; + + // GL_NV_light_max_exponent + GL_MAX_SHININESS_NV = $8504; + GL_MAX_SPOT_EXPONENT_NV = $8505; + + // GL_NV_multisample_filter_hint + GL_MULTISAMPLE_FILTER_HINT_NV = $8534; + + // GL_NV_occlusion_query + GL_PIXEL_COUNTER_BITS_NV = $8864; + GL_CURRENT_OCCLUSION_QUERY_ID_NV = $8865; + GL_PIXEL_COUNT_NV = $8866; + GL_PIXEL_COUNT_AVAILABLE_NV = $8867; + + // GL_NV_packed_depth_stencil + GL_DEPTH_STENCIL_NV = $84F9; + GL_UNSIGNED_INT_24_8_NV = $84FA; + + // GL_NV_pixel_data_range + GL_WRITE_PIXEL_DATA_RANGE_NV = $8878; + GL_READ_PIXEL_DATA_RANGE_NV = $8879; + GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV = $887A; + GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = $887B; + GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = $887C; + GL_READ_PIXEL_DATA_RANGE_POINTER_NV = $887D; + + // GL_NV_point_sprite + GL_POINT_SPRITE_NV = $8861; + GL_COORD_REPLACE_NV = $8862; + GL_POINT_SPRITE_R_MODE_NV = $8863; + + // GL_NV_primitive_restart + GL_PRIMITIVE_RESTART_NV = $8558; + GL_PRIMITIVE_RESTART_INDEX_NV = $8559; + + // GL_NV_register_combiners + GL_REGISTER_COMBINERS_NV = $8522; + GL_VARIABLE_A_NV = $8523; + GL_VARIABLE_B_NV = $8524; + GL_VARIABLE_C_NV = $8525; + GL_VARIABLE_D_NV = $8526; + GL_VARIABLE_E_NV = $8527; + GL_VARIABLE_F_NV = $8528; + GL_VARIABLE_G_NV = $8529; + GL_CONSTANT_COLOR0_NV = $852A; + GL_CONSTANT_COLOR1_NV = $852B; + GL_PRIMARY_COLOR_NV = $852C; + GL_SECONDARY_COLOR_NV = $852D; + GL_SPARE0_NV = $852E; + GL_SPARE1_NV = $852F; + GL_DISCARD_NV = $8530; + GL_E_TIMES_F_NV = $8531; + GL_SPARE0_PLUS_SECONDARY_COLOR_NV = $8532; + GL_UNSIGNED_IDENTITY_NV = $8536; + GL_UNSIGNED_INVERT_NV = $8537; + GL_EXPAND_NORMAL_NV = $8538; + GL_EXPAND_NEGATE_NV = $8539; + GL_HALF_BIAS_NORMAL_NV = $853A; + GL_HALF_BIAS_NEGATE_NV = $853B; + GL_SIGNED_IDENTITY_NV = $853C; + GL_SIGNED_NEGATE_NV = $853D; + GL_SCALE_BY_TWO_NV = $853E; + GL_SCALE_BY_FOUR_NV = $853F; + GL_SCALE_BY_ONE_HALF_NV = $8540; + GL_BIAS_BY_NEGATIVE_ONE_HALF_NV = $8541; + GL_COMBINER_INPUT_NV = $8542; + GL_COMBINER_MAPPING_NV = $8543; + GL_COMBINER_COMPONENT_USAGE_NV = $8544; + GL_COMBINER_AB_DOT_PRODUCT_NV = $8545; + GL_COMBINER_CD_DOT_PRODUCT_NV = $8546; + GL_COMBINER_MUX_SUM_NV = $8547; + GL_COMBINER_SCALE_NV = $8548; + GL_COMBINER_BIAS_NV = $8549; + GL_COMBINER_AB_OUTPUT_NV = $854A; + GL_COMBINER_CD_OUTPUT_NV = $854B; + GL_COMBINER_SUM_OUTPUT_NV = $854C; + GL_MAX_GENERAL_COMBINERS_NV = $854D; + GL_NUM_GENERAL_COMBINERS_NV = $854E; + GL_COLOR_SUM_CLAMP_NV = $854F; + GL_COMBINER0_NV = $8550; + GL_COMBINER1_NV = $8551; + GL_COMBINER2_NV = $8552; + GL_COMBINER3_NV = $8553; + GL_COMBINER4_NV = $8554; + GL_COMBINER5_NV = $8555; + GL_COMBINER6_NV = $8556; + GL_COMBINER7_NV = $8557; + + // GL_NV_register_combiners2 + GL_PER_STAGE_CONSTANTS_NV = $8535; + + // GL_NV_texgen_emboss + GL_EMBOSS_LIGHT_NV = $855D; + GL_EMBOSS_CONSTANT_NV = $855E; + GL_EMBOSS_MAP_NV = $855F; + + // GL_NV_texgen_reflection + GL_NORMAL_MAP_NV = $8511; + GL_REFLECTION_MAP_NV = $8512; + + // GL_NV_texture_env_combine4 + GL_COMBINE4_NV = $8503; + GL_SOURCE3_RGB_NV = $8583; + GL_SOURCE3_ALPHA_NV = $858B; + GL_OPERAND3_RGB_NV = $8593; + GL_OPERAND3_ALPHA_NV = $859B; + + // GL_NV_texture_expand_normal + GL_TEXTURE_UNSIGNED_REMAP_MODE_NV = $888F; + + // GL_NV_texture_rectangle + GL_TEXTURE_RECTANGLE_NV = $84F5; + GL_TEXTURE_BINDING_RECTANGLE_NV = $84F6; + GL_PROXY_TEXTURE_RECTANGLE_NV = $84F7; + GL_MAX_RECTANGLE_TEXTURE_SIZE_NV = $84F8; + + // GL_NV_texture_shader + GL_OFFSET_TEXTURE_RECTANGLE_NV = $864C; + GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV = $864D; + GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = $864E; + GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = $86D9; + GL_UNSIGNED_INT_S8_S8_8_8_NV = $86DA; + GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = $86DB; + GL_DSDT_MAG_INTENSITY_NV = $86DC; + GL_SHADER_CONSISTENT_NV = $86DD; + GL_TEXTURE_SHADER_NV = $86DE; + GL_SHADER_OPERATION_NV = $86DF; + GL_CULL_MODES_NV = $86E0; + GL_OFFSET_TEXTURE_MATRIX_NV = $86E1; + GL_OFFSET_TEXTURE_SCALE_NV = $86E2; + GL_OFFSET_TEXTURE_BIAS_NV = $86E3; + GL_OFFSET_TEXTURE_2D_MATRIX_NV = GL_OFFSET_TEXTURE_MATRIX_NV; + GL_OFFSET_TEXTURE_2D_SCALE_NV = GL_OFFSET_TEXTURE_SCALE_NV; + GL_OFFSET_TEXTURE_2D_BIAS_NV = GL_OFFSET_TEXTURE_BIAS_NV; + GL_PREVIOUS_TEXTURE_INPUT_NV = $86E4; + GL_CONST_EYE_NV = $86E5; + GL_PASS_THROUGH_NV = $86E6; + GL_CULL_FRAGMENT_NV = $86E7; + GL_OFFSET_TEXTURE_2D_NV = $86E8; + GL_DEPENDENT_AR_TEXTURE_2D_NV = $86E9; + GL_DEPENDENT_GB_TEXTURE_2D_NV = $86EA; + GL_DOT_PRODUCT_NV = $86EC; + GL_DOT_PRODUCT_DEPTH_REPLACE_NV = $86ED; + GL_DOT_PRODUCT_TEXTURE_2D_NV = $86EE; + GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = $86F0; + GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = $86F1; + GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV = $86F2; + GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = $86F3; + GL_HILO_NV = $86F4; + GL_DSDT_NV = $86F5; + GL_DSDT_MAG_NV = $86F6; + GL_DSDT_MAG_VIB_NV = $86F7; + GL_HILO16_NV = $86F8; + GL_SIGNED_HILO_NV = $86F9; + GL_SIGNED_HILO16_NV = $86FA; + GL_SIGNED_RGBA_NV = $86FB; + GL_SIGNED_RGBA8_NV = $86FC; + GL_SIGNED_RGB_NV = $86FE; + GL_SIGNED_RGB8_NV = $86FF; + GL_SIGNED_LUMINANCE_NV = $8701; + GL_SIGNED_LUMINANCE8_NV = $8702; + GL_SIGNED_LUMINANCE_ALPHA_NV = $8703; + GL_SIGNED_LUMINANCE8_ALPHA8_NV = $8704; + GL_SIGNED_ALPHA_NV = $8705; + GL_SIGNED_ALPHA8_NV = $8706; + GL_SIGNED_INTENSITY_NV = $8707; + GL_SIGNED_INTENSITY8_NV = $8708; + GL_DSDT8_NV = $8709; + GL_DSDT8_MAG8_NV = $870A; + GL_DSDT8_MAG8_INTENSITY8_NV = $870B; + GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = $870C; + GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = $870D; + GL_HI_SCALE_NV = $870E; + GL_LO_SCALE_NV = $870F; + GL_DS_SCALE_NV = $8710; + GL_DT_SCALE_NV = $8711; + GL_MAGNITUDE_SCALE_NV = $8712; + GL_VIBRANCE_SCALE_NV = $8713; + GL_HI_BIAS_NV = $8714; + GL_LO_BIAS_NV = $8715; + GL_DS_BIAS_NV = $8716; + GL_DT_BIAS_NV = $8717; + GL_MAGNITUDE_BIAS_NV = $8718; + GL_VIBRANCE_BIAS_NV = $8719; + GL_TEXTURE_BORDER_VALUES_NV = $871A; + GL_TEXTURE_HI_SIZE_NV = $871B; + GL_TEXTURE_LO_SIZE_NV = $871C; + GL_TEXTURE_DS_SIZE_NV = $871D; + GL_TEXTURE_DT_SIZE_NV = $871E; + GL_TEXTURE_MAG_SIZE_NV = $871F; + + // GL_NV_texture_shader2 + GL_DOT_PRODUCT_TEXTURE_3D_NV = $86EF; + + // GL_NV_texture_shader3 + GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = $8850; + GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = $8851; + GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = $8852; + GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = $8853; + GL_OFFSET_HILO_TEXTURE_2D_NV = $8854; + GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV = $8855; + GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = $8856; + GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = $8857; + GL_DEPENDENT_HILO_TEXTURE_2D_NV = $8858; + GL_DEPENDENT_RGB_TEXTURE_3D_NV = $8859; + GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = $885A; + GL_DOT_PRODUCT_PASS_THROUGH_NV = $885B; + GL_DOT_PRODUCT_TEXTURE_1D_NV = $885C; + GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = $885D; + GL_HILO8_NV = $885E; + GL_SIGNED_HILO8_NV = $885F; + GL_FORCE_BLUE_TO_ONE_NV = $8860; + + // GL_NV_vertex_array_range + GL_VERTEX_ARRAY_RANGE_NV = $851D; + GL_VERTEX_ARRAY_RANGE_LENGTH_NV = $851E; + GL_VERTEX_ARRAY_RANGE_VALID_NV = $851F; + GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = $8520; + GL_VERTEX_ARRAY_RANGE_POINTER_NV = $8521; + + // GL_NV_vertex_array_range2 + GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = $8533; + + // GL_NV_vertex_program + GL_VERTEX_PROGRAM_NV = $8620; + GL_VERTEX_STATE_PROGRAM_NV = $8621; + GL_ATTRIB_ARRAY_SIZE_NV = $8623; + GL_ATTRIB_ARRAY_STRIDE_NV = $8624; + GL_ATTRIB_ARRAY_TYPE_NV = $8625; + GL_CURRENT_ATTRIB_NV = $8626; + GL_PROGRAM_LENGTH_NV = $8627; + GL_PROGRAM_STRING_NV = $8628; + GL_MODELVIEW_PROJECTION_NV = $8629; + GL_IDENTITY_NV = $862A; + GL_INVERSE_NV = $862B; + GL_TRANSPOSE_NV = $862C; + GL_INVERSE_TRANSPOSE_NV = $862D; + GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV = $862E; + GL_MAX_TRACK_MATRICES_NV = $862F; + GL_MATRIX0_NV = $8630; + GL_MATRIX1_NV = $8631; + GL_MATRIX2_NV = $8632; + GL_MATRIX3_NV = $8633; + GL_MATRIX4_NV = $8634; + GL_MATRIX5_NV = $8635; + GL_MATRIX6_NV = $8636; + GL_MATRIX7_NV = $8637; + GL_CURRENT_MATRIX_STACK_DEPTH_NV = $8640; + GL_CURRENT_MATRIX_NV = $8641; + GL_VERTEX_PROGRAM_POINT_SIZE_NV = $8642; + GL_VERTEX_PROGRAM_TWO_SIDE_NV = $8643; + GL_PROGRAM_PARAMETER_NV = $8644; + GL_ATTRIB_ARRAY_POINTER_NV = $8645; + GL_PROGRAM_TARGET_NV = $8646; + GL_PROGRAM_RESIDENT_NV = $8647; + GL_TRACK_MATRIX_NV = $8648; + GL_TRACK_MATRIX_TRANSFORM_NV = $8649; + GL_VERTEX_PROGRAM_BINDING_NV = $864A; + GL_PROGRAM_ERROR_POSITION_NV = $864B; + GL_VERTEX_ATTRIB_ARRAY0_NV = $8650; + GL_VERTEX_ATTRIB_ARRAY1_NV = $8651; + GL_VERTEX_ATTRIB_ARRAY2_NV = $8652; + GL_VERTEX_ATTRIB_ARRAY3_NV = $8653; + GL_VERTEX_ATTRIB_ARRAY4_NV = $8654; + GL_VERTEX_ATTRIB_ARRAY5_NV = $8655; + GL_VERTEX_ATTRIB_ARRAY6_NV = $8656; + GL_VERTEX_ATTRIB_ARRAY7_NV = $8657; + GL_VERTEX_ATTRIB_ARRAY8_NV = $8658; + GL_VERTEX_ATTRIB_ARRAY9_NV = $8659; + GL_VERTEX_ATTRIB_ARRAY10_NV = $865A; + GL_VERTEX_ATTRIB_ARRAY11_NV = $865B; + GL_VERTEX_ATTRIB_ARRAY12_NV = $865C; + GL_VERTEX_ATTRIB_ARRAY13_NV = $865D; + GL_VERTEX_ATTRIB_ARRAY14_NV = $865E; + GL_VERTEX_ATTRIB_ARRAY15_NV = $865F; + GL_MAP1_VERTEX_ATTRIB0_4_NV = $8660; + GL_MAP1_VERTEX_ATTRIB1_4_NV = $8661; + GL_MAP1_VERTEX_ATTRIB2_4_NV = $8662; + GL_MAP1_VERTEX_ATTRIB3_4_NV = $8663; + GL_MAP1_VERTEX_ATTRIB4_4_NV = $8664; + GL_MAP1_VERTEX_ATTRIB5_4_NV = $8665; + GL_MAP1_VERTEX_ATTRIB6_4_NV = $8666; + GL_MAP1_VERTEX_ATTRIB7_4_NV = $8667; + GL_MAP1_VERTEX_ATTRIB8_4_NV = $8668; + GL_MAP1_VERTEX_ATTRIB9_4_NV = $8669; + GL_MAP1_VERTEX_ATTRIB10_4_NV = $866A; + GL_MAP1_VERTEX_ATTRIB11_4_NV = $866B; + GL_MAP1_VERTEX_ATTRIB12_4_NV = $866C; + GL_MAP1_VERTEX_ATTRIB13_4_NV = $866D; + GL_MAP1_VERTEX_ATTRIB14_4_NV = $866E; + GL_MAP1_VERTEX_ATTRIB15_4_NV = $866F; + GL_MAP2_VERTEX_ATTRIB0_4_NV = $8670; + GL_MAP2_VERTEX_ATTRIB1_4_NV = $8671; + GL_MAP2_VERTEX_ATTRIB2_4_NV = $8672; + GL_MAP2_VERTEX_ATTRIB3_4_NV = $8673; + GL_MAP2_VERTEX_ATTRIB4_4_NV = $8674; + GL_MAP2_VERTEX_ATTRIB5_4_NV = $8675; + GL_MAP2_VERTEX_ATTRIB6_4_NV = $8676; + GL_MAP2_VERTEX_ATTRIB7_4_NV = $8677; + GL_MAP2_VERTEX_ATTRIB8_4_NV = $8678; + GL_MAP2_VERTEX_ATTRIB9_4_NV = $8679; + GL_MAP2_VERTEX_ATTRIB10_4_NV = $867A; + GL_MAP2_VERTEX_ATTRIB11_4_NV = $867B; + GL_MAP2_VERTEX_ATTRIB12_4_NV = $867C; + GL_MAP2_VERTEX_ATTRIB13_4_NV = $867D; + GL_MAP2_VERTEX_ATTRIB14_4_NV = $867E; + GL_MAP2_VERTEX_ATTRIB15_4_NV = $867F; + + // GL_NV_fragment_program2 and GL_NV_vertex_program2_option + GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = $88F4; + GL_MAX_PROGRAM_CALL_DEPTH_NV = $88F5; + + // GL_NV_fragment_program2 + GL_MAX_PROGRAM_IF_DEPTH_NV = $88F6; + GL_MAX_PROGRAM_LOOP_DEPTH_NV = $88F7; + GL_MAX_PROGRAM_LOOP_COUNT_NV = $88F8; + + // GL_NV_vertex_program3 + MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = $8B4C; + + // GL_NV_depth_buffer_float + GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV = $8DAD; + GL_DEPTH_BUFFER_FLOAT_MODE_NV = $8DAF; + + // GL_NV_framebuffer_multisample_coverage + GL_RENDERBUFFER_COVERAGE_SAMPLES_NV = $8CAB; + GL_RENDERBUFFER_COLOR_SAMPLES_NV = $8E10; + + // GL_NV_geometry_program4 + GL_GEOMETRY_PROGRAM_NV = $8C26; + GL_MAX_PROGRAM_OUTPUT_VERTICES_NV = $8C27; + GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV = $8C28; + + // GL_NV_gpu_program4 + GL_PROGRAM_ATTRIB_COMPONENTS_NV = $8906; + GL_PROGRAM_RESULT_COMPONENTS_NV = $8907; + GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV = $8908; + GL_MAX_PROGRAM_RESULT_COMPONENTS_NV = $8909; + GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV = $8DA5; + GL_MAX_PROGRAM_GENERIC_RESULTS_NV = $8DA6; + + // GL_NV_parameter_buffer_object + GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV = $8DA0; + GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV = $8DA1; + GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV = $8DA2; + GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV = $8DA3; + GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV = $8DA4; + + // GL_NV_transform_feedback + GL_TRANSFORM_FEEDBACK_BUFFER_NV = $8C8E; + GL_TRANSFORM_FEEDBACK_BUFFER_START_NV = $8C84; + GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV = $8C85; + GL_TRANSFORM_FEEDBACK_RECORD_NV = $8C86; + GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV = $8C8F; + GL_INTERLEAVED_ATTRIBS_NV = $8C8C; + GL_SEPARATE_ATTRIBS_NV = $8C8D; + GL_PRIMITIVES_GENERATED_NV = $8C87; + GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV = $8C88; + GL_RASTERIZER_DISCARD_NV = $8C89; + GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV = $8C8A; + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV = $8C8B; + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV = $8C80; + GL_TRANSFORM_FEEDBACK_ATTRIBS_NV = $8C7E; + GL_ACTIVE_VARYINGS_NV = $8C81; + GL_ACTIVE_VARYING_MAX_LENGTH_NV = $8C82; + GL_TRANSFORM_FEEDBACK_VARYINGS_NV = $8C83; + GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV = $8C7F; + GL_BACK_PRIMARY_COLOR_NV = $8C77; + GL_BACK_SECONDARY_COLOR_NV = $8C78; + GL_TEXTURE_COORD_NV = $8C79; + GL_CLIP_DISTANCE_NV = $8C7A; + GL_VERTEX_ID_NV = $8C7B; + GL_PRIMITIVE_ID_NV = $8C7C; + GL_GENERIC_ATTRIB_NV = $8C7D; + + // GL_NV_conditional_render + GL_QUERY_WAIT_NV = $8E13; + GL_QUERY_NO_WAIT_NV = $8E14; + GL_QUERY_BY_REGION_WAIT_NV = $8E15; + GL_QUERY_BY_REGION_NO_WAIT_NV = $8E16; + + // GL_NV_present_video + GL_FRAME_NV = $8E26; + GL_FIELDS_NV = $8E27; + GL_CURRENT_TIME_NV = $8E28; + GL_NUM_FILL_STREAMS_NV = $8E29; + GL_PRESENT_TIME_NV = $8E2A; + GL_PRESENT_DURATION_NV = $8E2B; + + // GL_NV_explicit_multisample + GL_SAMPLE_POSITION_NV = $8E50; + GL_SAMPLE_MASK_NV = $8E51; + GL_SAMPLE_MASK_VALUE_NV = $8E52; + GL_TEXTURE_BINDING_RENDERBUFFER_NV = $8E53; + GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV = $8E54; + GL_TEXTURE_RENDERBUFFER_NV = $8E55; + GL_SAMPLER_RENDERBUFFER_NV = $8E56; + GL_INT_SAMPLER_RENDERBUFFER_NV = $8E57; + GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV = $8E58; + GL_MAX_SAMPLE_MASK_WORDS_NV = $8E59; + + // GL_NV_transform_feedback2 + GL_TRANSFORM_FEEDBACK_NV = $8E22; + GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV = $8E23; + GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV = $8E24; + GL_TRANSFORM_FEEDBACK_BINDING_NV = $8E25; + + // GL_OML_interlace + GL_INTERLACE_OML = $8980; + GL_INTERLACE_READ_OML = $8981; + + // GL_OML_resample + GL_PACK_RESAMPLE_OML = $8984; + GL_UNPACK_RESAMPLE_OML = $8985; + GL_RESAMPLE_REPLICATE_OML = $8986; + GL_RESAMPLE_ZERO_FILL_OML = $8987; + GL_RESAMPLE_AVERAGE_OML = $8988; + GL_RESAMPLE_DECIMATE_OML = $8989; + + // GL_OML_subsample + GL_FORMAT_SUBSAMPLE_24_24_OML = $8982; + GL_FORMAT_SUBSAMPLE_244_244_OML = $8983; + + // GL_PGI_misc_hints + GL_PREFER_DOUBLEBUFFER_HINT_PGI = $1A1F8; + GL_CONSERVE_MEMORY_HINT_PGI = $1A1FD; + GL_RECLAIM_MEMORY_HINT_PGI = $1A1FE; + GL_NATIVE_GRAPHICS_HANDLE_PGI = $1A202; + GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI = $1A203; + GL_NATIVE_GRAPHICS_END_HINT_PGI = $1A204; + GL_ALWAYS_FAST_HINT_PGI = $1A20C; + GL_ALWAYS_SOFT_HINT_PGI = $1A20D; + GL_ALLOW_DRAW_OBJ_HINT_PGI = $1A20E; + GL_ALLOW_DRAW_WIN_HINT_PGI = $1A20F; + GL_ALLOW_DRAW_FRG_HINT_PGI = $1A210; + GL_ALLOW_DRAW_MEM_HINT_PGI = $1A211; + GL_STRICT_DEPTHFUNC_HINT_PGI = $1A216; + GL_STRICT_LIGHTING_HINT_PGI = $1A217; + GL_STRICT_SCISSOR_HINT_PGI = $1A218; + GL_FULL_STIPPLE_HINT_PGI = $1A219; + GL_CLIP_NEAR_HINT_PGI = $1A220; + GL_CLIP_FAR_HINT_PGI = $1A221; + GL_WIDE_LINE_HINT_PGI = $1A222; + GL_BACK_NORMALS_HINT_PGI = $1A223; + + // GL_PGI_vertex_hints + GL_VERTEX_DATA_HINT_PGI = $1A22A; + GL_VERTEX_CONSISTENT_HINT_PGI = $1A22B; + GL_MATERIAL_SIDE_HINT_PGI = $1A22C; + GL_MAX_VERTEX_HINT_PGI = $1A22D; + GL_COLOR3_BIT_PGI = $00010000; + GL_COLOR4_BIT_PGI = $00020000; + GL_EDGEFLAG_BIT_PGI = $00040000; + GL_INDEX_BIT_PGI = $00080000; + GL_MAT_AMBIENT_BIT_PGI = $00100000; + GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI = $00200000; + GL_MAT_DIFFUSE_BIT_PGI = $00400000; + GL_MAT_EMISSION_BIT_PGI = $00800000; + GL_MAT_COLOR_INDEXES_BIT_PGI = $01000000; + GL_MAT_SHININESS_BIT_PGI = $02000000; + GL_MAT_SPECULAR_BIT_PGI = $04000000; + GL_NORMAL_BIT_PGI = $08000000; + GL_TEXCOORD1_BIT_PGI = $10000000; + GL_TEXCOORD2_BIT_PGI = $20000000; + GL_TEXCOORD3_BIT_PGI = $40000000; + GL_TEXCOORD4_BIT_PGI = $80000000; + GL_VERTEX23_BIT_PGI = $00000004; + GL_VERTEX4_BIT_PGI = $00000008; + + // GL_REND_screen_coordinates + GL_SCREEN_COORDINATES_REND = $8490; + GL_INVERTED_SCREEN_W_REND = $8491; + + // GL_S3_s3tc + GL_RGB_S3TC = $83A0; + GL_RGB4_S3TC = $83A1; + GL_RGBA_S3TC = $83A2; + GL_RGBA4_S3TC = $83A3; + + // GL_SGIS_detail_texture + GL_DETAIL_TEXTURE_2D_SGIS = $8095; + GL_DETAIL_TEXTURE_2D_BINDING_SGIS = $8096; + GL_LINEAR_DETAIL_SGIS = $8097; + GL_LINEAR_DETAIL_ALPHA_SGIS = $8098; + GL_LINEAR_DETAIL_COLOR_SGIS = $8099; + GL_DETAIL_TEXTURE_LEVEL_SGIS = $809A; + GL_DETAIL_TEXTURE_MODE_SGIS = $809B; + GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS = $809C; + + // GL_SGIS_fog_function + GL_FOG_FUNC_SGIS = $812A; + GL_FOG_FUNC_POINTS_SGIS = $812B; + GL_MAX_FOG_FUNC_POINTS_SGIS = $812C; + + // GL_SGIS_generate_mipmap + GL_GENERATE_MIPMAP_SGIS = $8191; + GL_GENERATE_MIPMAP_HINT_SGIS = $8192; + + // GL_SGIS_multisample + GL_MULTISAMPLE_SGIS = $809D; + GL_SAMPLE_ALPHA_TO_MASK_SGIS = $809E; + GL_SAMPLE_ALPHA_TO_ONE_SGIS = $809F; + GL_SAMPLE_MASK_SGIS = $80A0; + GL_1PASS_SGIS = $80A1; + GL_2PASS_0_SGIS = $80A2; + GL_2PASS_1_SGIS = $80A3; + GL_4PASS_0_SGIS = $80A4; + GL_4PASS_1_SGIS = $80A5; + GL_4PASS_2_SGIS = $80A6; + GL_4PASS_3_SGIS = $80A7; + GL_SAMPLE_BUFFERS_SGIS = $80A8; + GL_SAMPLES_SGIS = $80A9; + GL_SAMPLE_MASK_VALUE_SGIS = $80AA; + GL_SAMPLE_MASK_INVERT_SGIS = $80AB; + GL_SAMPLE_PATTERN_SGIS = $80AC; + + // GL_SGIS_pixel_texture + GL_PIXEL_TEXTURE_SGIS = $8353; + GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS = $8354; + GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS = $8355; + GL_PIXEL_GROUP_COLOR_SGIS = $8356; + + // GL_SGIS_point_line_texgen + GL_EYE_DISTANCE_TO_POINT_SGIS = $81F0; + GL_OBJECT_DISTANCE_TO_POINT_SGIS = $81F1; + GL_EYE_DISTANCE_TO_LINE_SGIS = $81F2; + GL_OBJECT_DISTANCE_TO_LINE_SGIS = $81F3; + GL_EYE_POINT_SGIS = $81F4; + GL_OBJECT_POINT_SGIS = $81F5; + GL_EYE_LINE_SGIS = $81F6; + GL_OBJECT_LINE_SGIS = $81F7; + + // GL_SGIS_point_parameters + GL_POINT_SIZE_MIN_SGIS = $8126; + GL_POINT_SIZE_MAX_SGIS = $8127; + GL_POINT_FADE_THRESHOLD_SIZE_SGIS = $8128; + GL_DISTANCE_ATTENUATION_SGIS = $8129; + + // GL_SGIS_sharpen_texture + GL_LINEAR_SHARPEN_SGIS = $80AD; + GL_LINEAR_SHARPEN_ALPHA_SGIS = $80AE; + GL_LINEAR_SHARPEN_COLOR_SGIS = $80AF; + GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS = $80B0; + + // GL_SGIS_texture4D + GL_PACK_SKIP_VOLUMES_SGIS = $8130; + GL_PACK_IMAGE_DEPTH_SGIS = $8131; + GL_UNPACK_SKIP_VOLUMES_SGIS = $8132; + GL_UNPACK_IMAGE_DEPTH_SGIS = $8133; + GL_TEXTURE_4D_SGIS = $8134; + GL_PROXY_TEXTURE_4D_SGIS = $8135; + GL_TEXTURE_4DSIZE_SGIS = $8136; + GL_TEXTURE_WRAP_Q_SGIS = $8137; + GL_MAX_4D_TEXTURE_SIZE_SGIS = $8138; + GL_TEXTURE_4D_BINDING_SGIS = $814F; + + // GL_SGIS_texture_color_mask + GL_TEXTURE_COLOR_WRITEMASK_SGIS = $81EF; + + // GL_SGIS_texture_edge_clamp + GL_CLAMP_TO_EDGE_SGIS = $812F; + + // GL_SGIS_texture_filter4 + GL_FILTER4_SGIS = $8146; + GL_TEXTURE_FILTER4_SIZE_SGIS = $8147; + + // GL_SGIS_texture_lod + GL_TEXTURE_MIN_LOD_SGIS = $813A; + GL_TEXTURE_MAX_LOD_SGIS = $813B; + GL_TEXTURE_BASE_LEVEL_SGIS = $813C; + GL_TEXTURE_MAX_LEVEL_SGIS = $813D; + + // GL_SGIS_texture_select + GL_DUAL_ALPHA4_SGIS = $8110; + GL_DUAL_ALPHA8_SGIS = $8111; + GL_DUAL_ALPHA12_SGIS = $8112; + GL_DUAL_ALPHA16_SGIS = $8113; + GL_DUAL_LUMINANCE4_SGIS = $8114; + GL_DUAL_LUMINANCE8_SGIS = $8115; + GL_DUAL_LUMINANCE12_SGIS = $8116; + GL_DUAL_LUMINANCE16_SGIS = $8117; + GL_DUAL_INTENSITY4_SGIS = $8118; + GL_DUAL_INTENSITY8_SGIS = $8119; + GL_DUAL_INTENSITY12_SGIS = $811A; + GL_DUAL_INTENSITY16_SGIS = $811B; + GL_DUAL_LUMINANCE_ALPHA4_SGIS = $811C; + GL_DUAL_LUMINANCE_ALPHA8_SGIS = $811D; + GL_QUAD_ALPHA4_SGIS = $811E; + GL_QUAD_ALPHA8_SGIS = $811F; + GL_QUAD_LUMINANCE4_SGIS = $8120; + GL_QUAD_LUMINANCE8_SGIS = $8121; + GL_QUAD_INTENSITY4_SGIS = $8122; + GL_QUAD_INTENSITY8_SGIS = $8123; + GL_DUAL_TEXTURE_SELECT_SGIS = $8124; + GL_QUAD_TEXTURE_SELECT_SGIS = $8125; + + // GL_SGIX_async + GL_ASYNC_MARKER_SGIX = $8329; + + // GL_SGIX_async_histogram + GL_ASYNC_HISTOGRAM_SGIX = $832C; + GL_MAX_ASYNC_HISTOGRAM_SGIX = $832D; + + // GL_SGIX_async_pixel + GL_ASYNC_TEX_IMAGE_SGIX = $835C; + GL_ASYNC_DRAW_PIXELS_SGIX = $835D; + GL_ASYNC_READ_PIXELS_SGIX = $835E; + GL_MAX_ASYNC_TEX_IMAGE_SGIX = $835F; + GL_MAX_ASYNC_DRAW_PIXELS_SGIX = $8360; + GL_MAX_ASYNC_READ_PIXELS_SGIX = $8361; + + // GL_SGIX_blend_alpha_minmax + GL_ALPHA_MIN_SGIX = $8320; + GL_ALPHA_MAX_SGIX = $8321; + + // GL_SGIX_calligraphic_fragment + GL_CALLIGRAPHIC_FRAGMENT_SGIX = $8183; + + // GL_SGIX_clipmap + GL_LINEAR_CLIPMAP_LINEAR_SGIX = $8170; + GL_TEXTURE_CLIPMAP_CENTER_SGIX = $8171; + GL_TEXTURE_CLIPMAP_FRAME_SGIX = $8172; + GL_TEXTURE_CLIPMAP_OFFSET_SGIX = $8173; + GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX = $8174; + GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX = $8175; + GL_TEXTURE_CLIPMAP_DEPTH_SGIX = $8176; + GL_MAX_CLIPMAP_DEPTH_SGIX = $8177; + GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX = $8178; + GL_NEAREST_CLIPMAP_NEAREST_SGIX = $844D; + GL_NEAREST_CLIPMAP_LINEAR_SGIX = $844E; + GL_LINEAR_CLIPMAP_NEAREST_SGIX = $844F; + + // GL_SGIX_convolution_accuracy + GL_CONVOLUTION_HINT_SGIX = $8316; + + // GL_SGIX_depth_texture + GL_DEPTH_COMPONENT16_SGIX = $81A5; + GL_DEPTH_COMPONENT24_SGIX = $81A6; + GL_DEPTH_COMPONENT32_SGIX = $81A7; + + // GL_SGIX_fog_offset + GL_FOG_OFFSET_SGIX = $8198; + GL_FOG_OFFSET_VALUE_SGIX = $8199; + + // GL_SGIX_fog_scale + GL_FOG_SCALE_SGIX = $81FC; + GL_FOG_SCALE_VALUE_SGIX = $81FD; + + // GL_SGIX_fragment_lighting + GL_FRAGMENT_LIGHTING_SGIX = $8400; + GL_FRAGMENT_COLOR_MATERIAL_SGIX = $8401; + GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX = $8402; + GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX = $8403; + GL_MAX_FRAGMENT_LIGHTS_SGIX = $8404; + GL_MAX_ACTIVE_LIGHTS_SGIX = $8405; + GL_CURRENT_RASTER_NORMAL_SGIX = $8406; + GL_LIGHT_ENV_MODE_SGIX = $8407; + GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX = $8408; + GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX = $8409; + GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX = $840A; + GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX = $840B; + GL_FRAGMENT_LIGHT0_SGIX = $840C; + GL_FRAGMENT_LIGHT1_SGIX = $840D; + GL_FRAGMENT_LIGHT2_SGIX = $840E; + GL_FRAGMENT_LIGHT3_SGIX = $840F; + GL_FRAGMENT_LIGHT4_SGIX = $8410; + GL_FRAGMENT_LIGHT5_SGIX = $8411; + GL_FRAGMENT_LIGHT6_SGIX = $8412; + GL_FRAGMENT_LIGHT7_SGIX = $8413; + + // GL_SGIX_framezoom + GL_FRAMEZOOM_SGIX = $818B; + GL_FRAMEZOOM_FACTOR_SGIX = $818C; + GL_MAX_FRAMEZOOM_FACTOR_SGIX = $818D; + + // GL_SGIX_impact_pixel_texture + GL_PIXEL_TEX_GEN_Q_CEILING_SGIX = $8184; + GL_PIXEL_TEX_GEN_Q_ROUND_SGIX = $8185; + GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX = $8186; + GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX = $8187; + GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX = $8188; + GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX = $8189; + GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX = $818A; + + // GL_SGIX_instruments + GL_INSTRUMENT_BUFFER_POINTER_SGIX = $8180; + GL_INSTRUMENT_MEASUREMENTS_SGIX = $8181; + + // GL_SGIX_interlace + GL_INTERLACE_SGIX = $8094; + + // GL_SGIX_ir_instrument1 + GL_IR_INSTRUMENT1_SGIX = $817F; + + // GL_SGIX_list_priority + GL_LIST_PRIORITY_SGIX = $8182; + + // GL_SGIX_pixel_texture + GL_PIXEL_TEX_GEN_SGIX = $8139; + GL_PIXEL_TEX_GEN_MODE_SGIX = $832B; + + // GL_SGIX_pixel_tiles + GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX = $813E; + GL_PIXEL_TILE_CACHE_INCREMENT_SGIX = $813F; + GL_PIXEL_TILE_WIDTH_SGIX = $8140; + GL_PIXEL_TILE_HEIGHT_SGIX = $8141; + GL_PIXEL_TILE_GRID_WIDTH_SGIX = $8142; + GL_PIXEL_TILE_GRID_HEIGHT_SGIX = $8143; + GL_PIXEL_TILE_GRID_DEPTH_SGIX = $8144; + GL_PIXEL_TILE_CACHE_SIZE_SGIX = $8145; + + // GL_SGIX_polynomial_ffd + GL_GEOMETRY_DEFORMATION_SGIX = $8194; + GL_TEXTURE_DEFORMATION_SGIX = $8195; + GL_DEFORMATIONS_MASK_SGIX = $8196; + GL_MAX_DEFORMATION_ORDER_SGIX = $8197; + + // GL_SGIX_reference_plane + GL_REFERENCE_PLANE_SGIX = $817D; + GL_REFERENCE_PLANE_EQUATION_SGIX = $817E; + + // GL_SGIX_resample + GL_PACK_RESAMPLE_SGIX = $842C; + GL_UNPACK_RESAMPLE_SGIX = $842D; + GL_RESAMPLE_REPLICATE_SGIX = $842E; + GL_RESAMPLE_ZERO_FILL_SGIX = $842F; + GL_RESAMPLE_DECIMATE_SGIX = $8430; + + // GL_SGIX_scalebias_hint + GL_SCALEBIAS_HINT_SGIX = $8322; + + // GL_SGIX_shadow + GL_TEXTURE_COMPARE_SGIX = $819A; + GL_TEXTURE_COMPARE_OPERATOR_SGIX = $819B; + GL_TEXTURE_LEQUAL_R_SGIX = $819C; + GL_TEXTURE_GEQUAL_R_SGIX = $819D; + + // GL_SGIX_shadow_ambient + GL_SHADOW_AMBIENT_SGIX = $80BF; + + // GL_SGIX_sprite + GL_SPRITE_SGIX = $8148; + GL_SPRITE_MODE_SGIX = $8149; + GL_SPRITE_AXIS_SGIX = $814A; + GL_SPRITE_TRANSLATION_SGIX = $814B; + GL_SPRITE_AXIAL_SGIX = $814C; + GL_SPRITE_OBJECT_ALIGNED_SGIX = $814D; + GL_SPRITE_EYE_ALIGNED_SGIX = $814E; + + // GL_SGIX_subsample + GL_PACK_SUBSAMPLE_RATE_SGIX = $85A0; + GL_UNPACK_SUBSAMPLE_RATE_SGIX = $85A1; + GL_PIXEL_SUBSAMPLE_4444_SGIX = $85A2; + GL_PIXEL_SUBSAMPLE_2424_SGIX = $85A3; + GL_PIXEL_SUBSAMPLE_4242_SGIX = $85A4; + + // GL_SGIX_texture_add_env + GL_TEXTURE_ENV_BIAS_SGIX = $80BE; + + // GL_SGIX_texture_coordinate_clamp + GL_TEXTURE_MAX_CLAMP_S_SGIX = $8369; + GL_TEXTURE_MAX_CLAMP_T_SGIX = $836A; + GL_TEXTURE_MAX_CLAMP_R_SGIX = $836B; + + // GL_SGIX_texture_lod_bias + GL_TEXTURE_LOD_BIAS_S_SGIX = $818E; + GL_TEXTURE_LOD_BIAS_T_SGIX = $818F; + GL_TEXTURE_LOD_BIAS_R_SGIX = $8190; + + // GL_SGIX_texture_multi_buffer + GL_TEXTURE_MULTI_BUFFER_HINT_SGIX = $812E; + + // GL_SGIX_texture_scale_bias + GL_POST_TEXTURE_FILTER_BIAS_SGIX = $8179; + GL_POST_TEXTURE_FILTER_SCALE_SGIX = $817A; + GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = $817B; + GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = $817C; + + // GL_SGIX_vertex_preclip + GL_VERTEX_PRECLIP_SGIX = $83EE; + GL_VERTEX_PRECLIP_HINT_SGIX = $83EF; + + // GL_SGIX_ycrcb + GL_YCRCB_422_SGIX = $81BB; + GL_YCRCB_444_SGIX = $81BC; + + // GL_SGIX_ycrcba + GL_YCRCB_SGIX = $8318; + GL_YCRCBA_SGIX = $8319; + + // GL_SGI_color_matrix + GL_COLOR_MATRIX_SGI = $80B1; + GL_COLOR_MATRIX_STACK_DEPTH_SGI = $80B2; + GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI = $80B3; + GL_POST_COLOR_MATRIX_RED_SCALE_SGI = $80B4; + GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI = $80B5; + GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI = $80B6; + GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI = $80B7; + GL_POST_COLOR_MATRIX_RED_BIAS_SGI = $80B8; + GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI = $80B9; + GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI = $80BA; + GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI = $80BB; + + // GL_SGI_color_table + GL_COLOR_TABLE_SGI = $80D0; + GL_POST_CONVOLUTION_COLOR_TABLE_SGI = $80D1; + GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI = $80D2; + GL_PROXY_COLOR_TABLE_SGI = $80D3; + GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI = $80D4; + GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI = $80D5; + GL_COLOR_TABLE_SCALE_SGI = $80D6; + GL_COLOR_TABLE_BIAS_SGI = $80D7; + GL_COLOR_TABLE_FORMAT_SGI = $80D8; + GL_COLOR_TABLE_WIDTH_SGI = $80D9; + GL_COLOR_TABLE_RED_SIZE_SGI = $80DA; + GL_COLOR_TABLE_GREEN_SIZE_SGI = $80DB; + GL_COLOR_TABLE_BLUE_SIZE_SGI = $80DC; + GL_COLOR_TABLE_ALPHA_SIZE_SGI = $80DD; + GL_COLOR_TABLE_LUMINANCE_SIZE_SGI = $80DE; + GL_COLOR_TABLE_INTENSITY_SIZE_SGI = $80DF; + + // GL_SGI_depth_pass_instrument + GL_DEPTH_PASS_INSTRUMENT_SGIX = $8310; + GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX = $8311; + GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX = $8312; + + // GL_SGI_texture_color_table + GL_TEXTURE_COLOR_TABLE_SGI = $80BC; + GL_PROXY_TEXTURE_COLOR_TABLE_SGI = $80BD; + + // GL_SUNX_constant_data + GL_UNPACK_CONSTANT_DATA_SUNX = $81D5; + GL_TEXTURE_CONSTANT_DATA_SUNX = $81D6; + + // GL_SUN_convolution_border_modes + GL_WRAP_BORDER_SUN = $81D4; + + // GL_SUN_global_alpha + GL_GLOBAL_ALPHA_SUN = $81D9; + GL_GLOBAL_ALPHA_FACTOR_SUN = $81DA; + + // GL_SUN_mesh_array + GL_QUAD_MESH_SUN = $8614; + GL_TRIANGLE_MESH_SUN = $8615; + + // GL_SUN_slice_accum + GL_SLICE_ACCUM_SUN = $85CC; + + // GL_SUN_triangle_list + GL_RESTART_SUN = $0001; + GL_REPLACE_MIDDLE_SUN = $0002; + GL_REPLACE_OLDEST_SUN = $0003; + GL_TRIANGLE_LIST_SUN = $81D7; + GL_REPLACEMENT_CODE_SUN = $81D8; + GL_REPLACEMENT_CODE_ARRAY_SUN = $85C0; + GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN = $85C1; + GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN = $85C2; + GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN = $85C3; + GL_R1UI_V3F_SUN = $85C4; + GL_R1UI_C4UB_V3F_SUN = $85C5; + GL_R1UI_C3F_V3F_SUN = $85C6; + GL_R1UI_N3F_V3F_SUN = $85C7; + GL_R1UI_C4F_N3F_V3F_SUN = $85C8; + GL_R1UI_T2F_V3F_SUN = $85C9; + GL_R1UI_T2F_N3F_V3F_SUN = $85CA; + GL_R1UI_T2F_C4F_N3F_V3F_SUN = $85CB; + + // GL_WIN_phong_shading + GL_PHONG_WIN = $80EA; + GL_PHONG_HINT_WIN = $80EB; + + // GL_WIN_specular_fog + GL_FOG_SPECULAR_TEXTURE_WIN = $80EC; + + // GL_ARB_vertex_shader + GL_VERTEX_SHADER_ARB = $8B31; + GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = $8B4A; + GL_MAX_VARYING_FLOATS_ARB = $8B4B; + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = $8B4C; + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = $8B4D; + GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = $8B89; + GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = $8B8A; + + // GL_ARB_fragment_shader + GL_FRAGMENT_SHADER_ARB = $8B30; + GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = $8B49; // 1.4 + GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = $8B8B; // 1.4 + + // GL_ARB_occlusion_query + GL_SAMPLES_PASSED_ARB = $8914; + GL_QUERY_COUNTER_BITS_ARB = $8864; + GL_CURRENT_QUERY_ARB = $8865; + GL_QUERY_RESULT_ARB = $8866; + GL_QUERY_RESULT_AVAILABLE_ARB = $8867; + + // GL_ARB_point_sprite + GL_POINT_SPRITE_ARB = $8861; + GL_COORD_REPLACE_ARB = $8862; + + // GL_ARB_shading_language_100 + GL_SHADING_LANGUAGE_VERSION_ARB = $8B8C; // 1.4 + + // GL_ARB_shader_objects + GL_PROGRAM_OBJECT_ARB = $8B40; + + GL_OBJECT_TYPE_ARB = $8B4E; + GL_OBJECT_SUBTYPE_ARB = $8B4F; + GL_OBJECT_DELETE_STATUS_ARB = $8B80; + GL_OBJECT_COMPILE_STATUS_ARB = $8B81; + GL_OBJECT_LINK_STATUS_ARB = $8B82; + GL_OBJECT_VALIDATE_STATUS_ARB = $8B83; + GL_OBJECT_INFO_LOG_LENGTH_ARB = $8B84; + GL_OBJECT_ATTACHED_OBJECTS_ARB = $8B85; + GL_OBJECT_ACTIVE_UNIFORMS_ARB = $8B86; + GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = $8B87; + GL_OBJECT_SHADER_SOURCE_LENGTH_ARB = $8B88; + + GL_SHADER_OBJECT_ARB = $8B48; + + GL_FLOAT_VEC2_ARB = $8B50; + GL_FLOAT_VEC3_ARB = $8B51; + GL_FLOAT_VEC4_ARB = $8B52; + GL_INT_VEC2_ARB = $8B53; + GL_INT_VEC3_ARB = $8B54; + GL_INT_VEC4_ARB = $8B55; + GL_BOOL_ARB = $8B56; + GL_BOOL_VEC2_ARB = $8B57; + GL_BOOL_VEC3_ARB = $8B58; + GL_BOOL_VEC4_ARB = $8B59; + GL_FLOAT_MAT2_ARB = $8B5A; + GL_FLOAT_MAT3_ARB = $8B5B; + GL_FLOAT_MAT4_ARB = $8B5C; + GL_SAMPLER_1D_ARB = $8B5D; + GL_SAMPLER_2D_ARB = $8B5E; + GL_SAMPLER_3D_ARB = $8B5F; + GL_SAMPLER_CUBE_ARB = $8B60; + GL_SAMPLER_1D_SHADOW_ARB = $8B61; + GL_SAMPLER_2D_SHADOW_ARB = $8B62; + GL_SAMPLER_2D_RECT_ARB = $8B63; + GL_SAMPLER_2D_RECT_SHADOW_ARB = $8B64; + + // WGL_3DFX_multisample + WGL_SAMPLE_BUFFERS_3DFX = $2060; + WGL_SAMPLES_3DFX = $2061; + + // WGL_ARB_buffer_region + WGL_FRONT_COLOR_BUFFER_BIT_ARB = $00000001; + WGL_BACK_COLOR_BUFFER_BIT_ARB = $00000002; + WGL_DEPTH_BUFFER_BIT_ARB = $00000004; + WGL_STENCIL_BUFFER_BIT_ARB = $00000008; + + // WGL_ARB_make_current_read + ERROR_INVALID_PIXEL_TYPE_ARB = $2043; + ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB = $2054; + + // WGL_ARB_multisample + WGL_SAMPLE_BUFFERS_ARB = $2041; + WGL_SAMPLES_ARB = $2042; + + // WGL_ARB_pbuffer + WGL_DRAW_TO_PBUFFER_ARB = $202D; + WGL_MAX_PBUFFER_PIXELS_ARB = $202E; + WGL_MAX_PBUFFER_WIDTH_ARB = $202F; + WGL_MAX_PBUFFER_HEIGHT_ARB = $2030; + WGL_PBUFFER_LARGEST_ARB = $2033; + WGL_PBUFFER_WIDTH_ARB = $2034; + WGL_PBUFFER_HEIGHT_ARB = $2035; + WGL_PBUFFER_LOST_ARB = $2036; + + // WGL_ARB_pixel_format + WGL_NUMBER_PIXEL_FORMATS_ARB = $2000; + WGL_DRAW_TO_WINDOW_ARB = $2001; + WGL_DRAW_TO_BITMAP_ARB = $2002; + WGL_ACCELERATION_ARB = $2003; + WGL_NEED_PALETTE_ARB = $2004; + WGL_NEED_SYSTEM_PALETTE_ARB = $2005; + WGL_SWAP_LAYER_BUFFERS_ARB = $2006; + WGL_SWAP_METHOD_ARB = $2007; + WGL_NUMBER_OVERLAYS_ARB = $2008; + WGL_NUMBER_UNDERLAYS_ARB = $2009; + WGL_TRANSPARENT_ARB = $200A; + WGL_TRANSPARENT_RED_VALUE_ARB = $2037; + WGL_TRANSPARENT_GREEN_VALUE_ARB = $2038; + WGL_TRANSPARENT_BLUE_VALUE_ARB = $2039; + WGL_TRANSPARENT_ALPHA_VALUE_ARB = $203A; + WGL_TRANSPARENT_INDEX_VALUE_ARB = $203B; + WGL_SHARE_DEPTH_ARB = $200C; + WGL_SHARE_STENCIL_ARB = $200D; + WGL_SHARE_ACCUM_ARB = $200E; + WGL_SUPPORT_GDI_ARB = $200F; + WGL_SUPPORT_OPENGL_ARB = $2010; + WGL_DOUBLE_BUFFER_ARB = $2011; + WGL_STEREO_ARB = $2012; + WGL_PIXEL_TYPE_ARB = $2013; + WGL_COLOR_BITS_ARB = $2014; + WGL_RED_BITS_ARB = $2015; + WGL_RED_SHIFT_ARB = $2016; + WGL_GREEN_BITS_ARB = $2017; + WGL_GREEN_SHIFT_ARB = $2018; + WGL_BLUE_BITS_ARB = $2019; + WGL_BLUE_SHIFT_ARB = $201A; + WGL_ALPHA_BITS_ARB = $201B; + WGL_ALPHA_SHIFT_ARB = $201C; + WGL_ACCUM_BITS_ARB = $201D; + WGL_ACCUM_RED_BITS_ARB = $201E; + WGL_ACCUM_GREEN_BITS_ARB = $201F; + WGL_ACCUM_BLUE_BITS_ARB = $2020; + WGL_ACCUM_ALPHA_BITS_ARB = $2021; + WGL_DEPTH_BITS_ARB = $2022; + WGL_STENCIL_BITS_ARB = $2023; + WGL_AUX_BUFFERS_ARB = $2024; + WGL_NO_ACCELERATION_ARB = $2025; + WGL_GENERIC_ACCELERATION_ARB = $2026; + WGL_FULL_ACCELERATION_ARB = $2027; + WGL_SWAP_EXCHANGE_ARB = $2028; + WGL_SWAP_COPY_ARB = $2029; + WGL_SWAP_UNDEFINED_ARB = $202A; + WGL_TYPE_RGBA_ARB = $202B; + WGL_TYPE_COLORINDEX_ARB = $202C; + + // WGL_ARB_pixel_format_float + WGL_RGBA_FLOAT_MODE_ARB = $8820; + WGL_CLAMP_VERTEX_COLOR_ARB = $891A; + WGL_CLAMP_FRAGMENT_COLOR_ARB = $891B; + WGL_CLAMP_READ_COLOR_ARB = $891C; + WGL_FIXED_ONLY_ARB = $891D; + + // WGL_ARB_render_texture + WGL_BIND_TO_TEXTURE_RGB_ARB = $2070; + WGL_BIND_TO_TEXTURE_RGBA_ARB = $2071; + WGL_TEXTURE_FORMAT_ARB = $2072; + WGL_TEXTURE_TARGET_ARB = $2073; + WGL_MIPMAP_TEXTURE_ARB = $2074; + WGL_TEXTURE_RGB_ARB = $2075; + WGL_TEXTURE_RGBA_ARB = $2076; + WGL_NO_TEXTURE_ARB = $2077; + WGL_TEXTURE_CUBE_MAP_ARB = $2078; + WGL_TEXTURE_1D_ARB = $2079; + WGL_TEXTURE_2D_ARB = $207A; + WGL_MIPMAP_LEVEL_ARB = $207B; + WGL_CUBE_MAP_FACE_ARB = $207C; + WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = $207D; + WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = $207E; + WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = $207F; + WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = $2080; + WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = $2081; + WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = $2082; + WGL_FRONT_LEFT_ARB = $2083; + WGL_FRONT_RIGHT_ARB = $2084; + WGL_BACK_LEFT_ARB = $2085; + WGL_BACK_RIGHT_ARB = $2086; + WGL_AUX0_ARB = $2087; + WGL_AUX1_ARB = $2088; + WGL_AUX2_ARB = $2089; + WGL_AUX3_ARB = $208A; + WGL_AUX4_ARB = $208B; + WGL_AUX5_ARB = $208C; + WGL_AUX6_ARB = $208D; + WGL_AUX7_ARB = $208E; + WGL_AUX8_ARB = $208F; + WGL_AUX9_ARB = $2090; + + // WGL_ARB_create_context + WGL_CONTEXT_DEBUG_BIT_ARB = $00000001; + WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = $00000002; + WGL_CONTEXT_MAJOR_VERSION_ARB = $2091; + WGL_CONTEXT_MINOR_VERSION_ARB = $2092; + WGL_CONTEXT_LAYER_PLANE_ARB = $2093; + WGL_CONTEXT_FLAGS_ARB = $2094; + ERROR_INVALID_VERSION_ARB = $2095; + + // WGL_ARB_create_context_profile + WGL_CONTEXT_PROFILE_MASK_ARB = $9126; + WGL_CONTEXT_CORE_PROFILE_BIT_ARB = $00000001; + WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = $00000002; + ERROR_INVALID_PROFILE_ARB = $2096; + + // WGL_ATI_pixel_format_float + WGL_TYPE_RGBA_FLOAT_ATI = $21A0; + GL_TYPE_RGBA_FLOAT_ATI = $8820; + GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI = $8835; + + // WGL_AMD_gpu_association + WGL_GPU_VENDOR_AMD = $1F00; + WGL_GPU_RENDERER_STRING_AMD = $1F01; + WGL_GPU_OPENGL_VERSION_STRING_AMD = $1F02; + WGL_GPU_FASTEST_TARGET_GPUS_AMD = $21A2; + WGL_GPU_RAM_AMD = $21A3; + WGL_GPU_CLOCK_AMD = $21A4; + WGL_GPU_NUM_PIPES_AMD = $21A5; + WGL_GPU_NUM_SIMD_AMD = $21A6; + WGL_GPU_NUM_RB_AMD = $21A7; + WGL_GPU_NUM_SPI_AMD = $21A8; + + // WGL_EXT_depth_float + WGL_DEPTH_FLOAT_EXT = $2040; + + // WGL_EXT_make_current_read + ERROR_INVALID_PIXEL_TYPE_EXT = $2043; + + // WGL_EXT_multisample + WGL_SAMPLE_BUFFERS_EXT = $2041; + WGL_SAMPLES_EXT = $2042; + + // WGL_EXT_pbuffer + WGL_DRAW_TO_PBUFFER_EXT = $202D; + WGL_MAX_PBUFFER_PIXELS_EXT = $202E; + WGL_MAX_PBUFFER_WIDTH_EXT = $202F; + WGL_MAX_PBUFFER_HEIGHT_EXT = $2030; + WGL_OPTIMAL_PBUFFER_WIDTH_EXT = $2031; + WGL_OPTIMAL_PBUFFER_HEIGHT_EXT = $2032; + WGL_PBUFFER_LARGEST_EXT = $2033; + WGL_PBUFFER_WIDTH_EXT = $2034; + WGL_PBUFFER_HEIGHT_EXT = $2035; + + // WGL_EXT_pixel_format + WGL_NUMBER_PIXEL_FORMATS_EXT = $2000; + WGL_DRAW_TO_WINDOW_EXT = $2001; + WGL_DRAW_TO_BITMAP_EXT = $2002; + WGL_ACCELERATION_EXT = $2003; + WGL_NEED_PALETTE_EXT = $2004; + WGL_NEED_SYSTEM_PALETTE_EXT = $2005; + WGL_SWAP_LAYER_BUFFERS_EXT = $2006; + WGL_SWAP_METHOD_EXT = $2007; + WGL_NUMBER_OVERLAYS_EXT = $2008; + WGL_NUMBER_UNDERLAYS_EXT = $2009; + WGL_TRANSPARENT_EXT = $200A; + WGL_TRANSPARENT_VALUE_EXT = $200B; + WGL_SHARE_DEPTH_EXT = $200C; + WGL_SHARE_STENCIL_EXT = $200D; + WGL_SHARE_ACCUM_EXT = $200E; + WGL_SUPPORT_GDI_EXT = $200F; + WGL_SUPPORT_OPENGL_EXT = $2010; + WGL_DOUBLE_BUFFER_EXT = $2011; + WGL_STEREO_EXT = $2012; + WGL_PIXEL_TYPE_EXT = $2013; + WGL_COLOR_BITS_EXT = $2014; + WGL_RED_BITS_EXT = $2015; + WGL_RED_SHIFT_EXT = $2016; + WGL_GREEN_BITS_EXT = $2017; + WGL_GREEN_SHIFT_EXT = $2018; + WGL_BLUE_BITS_EXT = $2019; + WGL_BLUE_SHIFT_EXT = $201A; + WGL_ALPHA_BITS_EXT = $201B; + WGL_ALPHA_SHIFT_EXT = $201C; + WGL_ACCUM_BITS_EXT = $201D; + WGL_ACCUM_RED_BITS_EXT = $201E; + WGL_ACCUM_GREEN_BITS_EXT = $201F; + WGL_ACCUM_BLUE_BITS_EXT = $2020; + WGL_ACCUM_ALPHA_BITS_EXT = $2021; + WGL_DEPTH_BITS_EXT = $2022; + WGL_STENCIL_BITS_EXT = $2023; + WGL_AUX_BUFFERS_EXT = $2024; + WGL_NO_ACCELERATION_EXT = $2025; + WGL_GENERIC_ACCELERATION_EXT = $2026; + WGL_FULL_ACCELERATION_EXT = $2027; + WGL_SWAP_EXCHANGE_EXT = $2028; + WGL_SWAP_COPY_EXT = $2029; + WGL_SWAP_UNDEFINED_EXT = $202A; + WGL_TYPE_RGBA_EXT = $202B; + WGL_TYPE_COLORINDEX_EXT = $202C; + + // WGL_I3D_digital_video_control + WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D = $2050; + WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D = $2051; + WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D = $2052; + WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D = $2053; + + // WGL_I3D_gamma + WGL_GAMMA_TABLE_SIZE_I3D = $204E; + WGL_GAMMA_EXCLUDE_DESKTOP_I3D = $204F; + + // WGL_I3D_genlock + WGL_GENLOCK_SOURCE_MULTIVIEW_I3D = $2044; + WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D = $2045; + WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D = $2046; + WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D = $2047; + WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D = $2048; + WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D = $2049; + WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D = $204A; + WGL_GENLOCK_SOURCE_EDGE_RISING_I3D = $204B; + WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D = $204C; + + // WGL_I3D_image_buffer + WGL_IMAGE_BUFFER_MIN_ACCESS_I3D = $00000001; + WGL_IMAGE_BUFFER_LOCK_I3D = $00000002; + + // WGL_NV_float_buffer + WGL_FLOAT_COMPONENTS_NV = $20B0; + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV = $20B1; + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV = $20B2; + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV = $20B3; + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV = $20B4; + WGL_TEXTURE_FLOAT_R_NV = $20B5; + WGL_TEXTURE_FLOAT_RG_NV = $20B6; + WGL_TEXTURE_FLOAT_RGB_NV = $20B7; + WGL_TEXTURE_FLOAT_RGBA_NV = $20B8; + + // WGL_NV_render_depth_texture + WGL_BIND_TO_TEXTURE_DEPTH_NV = $20A3; + WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV = $20A4; + WGL_DEPTH_TEXTURE_FORMAT_NV = $20A5; + WGL_TEXTURE_DEPTH_COMPONENT_NV = $20A6; + WGL_DEPTH_COMPONENT_NV = $20A7; + + // WGL_NV_render_texture_rectangle + WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV = $20A0; + WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV = $20A1; + WGL_TEXTURE_RECTANGLE_NV = $20A2; + + // WGL_NV_present_video + WGL_NUM_VIDEO_SLOTS_NV = $20F0; + + // WGL_NV_video_out + WGL_BIND_TO_VIDEO_RGB_NV = $20C0; + WGL_BIND_TO_VIDEO_RGBA_NV = $20C1; + WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV = $20C2; + WGL_VIDEO_OUT_COLOR_NV = $20C3; + WGL_VIDEO_OUT_ALPHA_NV = $20C4; + WGL_VIDEO_OUT_DEPTH_NV = $20C5; + WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV = $20C6; + WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV = $20C7; + WGL_VIDEO_OUT_FRAME = $20C8; + WGL_VIDEO_OUT_FIELD_1 = $20C9; + WGL_VIDEO_OUT_FIELD_2 = $20CA; + WGL_VIDEO_OUT_STACKED_FIELDS_1_2 = $20CB; + WGL_VIDEO_OUT_STACKED_FIELDS_2_1 = $20CC; + + // WGL_NV_gpu_affinity + WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV = $20D0; + WGL_ERROR_MISSING_AFFINITY_MASK_NV = $20D1; + + // WIN_draw_range_elements + GL_MAX_ELEMENTS_VERTICES_WIN = $80E8; + GL_MAX_ELEMENTS_INDICES_WIN = $80E9; + + // GLX 1.1 and later: + GLX_VENDOR = 1; + GLX_VERSION = 2; + GLX_EXTENSIONS = 3; + + GLX_USE_GL = 1; + GLX_BUFFER_SIZE = 2; + GLX_LEVEL = 3; + GLX_RGBA = 4; + GLX_DOUBLEBUFFER = 5; + GLX_STEREO = 6; + GLX_AUX_BUFFERS = 7; + GLX_RED_SIZE = 8; + GLX_GREEN_SIZE = 9; + GLX_BLUE_SIZE = 10; + GLX_ALPHA_SIZE = 11; + GLX_DEPTH_SIZE = 12; + GLX_STENCIL_SIZE = 13; + GLX_ACCUM_RED_SIZE = 14; + GLX_ACCUM_GREEN_SIZE = 15; + GLX_ACCUM_BLUE_SIZE = 16; + GLX_ACCUM_ALPHA_SIZE = 17; + + // GLX_VERSION_1_3 + GLX_WINDOW_BIT = $00000001; + GLX_PIXMAP_BIT = $00000002; + GLX_PBUFFER_BIT = $00000004; + GLX_RGBA_BIT = $00000001; + GLX_COLOR_INDEX_BIT = $00000002; + GLX_PBUFFER_CLOBBER_MASK = $08000000; + GLX_FRONT_LEFT_BUFFER_BIT = $00000001; + GLX_FRONT_RIGHT_BUFFER_BIT = $00000002; + GLX_BACK_LEFT_BUFFER_BIT = $00000004; + GLX_BACK_RIGHT_BUFFER_BIT = $00000008; + GLX_AUX_BUFFERS_BIT = $00000010; + GLX_DEPTH_BUFFER_BIT = $00000020; + GLX_STENCIL_BUFFER_BIT = $00000040; + GLX_ACCUM_BUFFER_BIT = $00000080; + GLX_CONFIG_CAVEAT = $20; + GLX_X_VISUAL_TYPE = $22; + GLX_TRANSPARENT_TYPE = $23; + GLX_TRANSPARENT_INDEX_VALUE = $24; + GLX_TRANSPARENT_RED_VALUE = $25; + GLX_TRANSPARENT_GREEN_VALUE = $26; + GLX_TRANSPARENT_BLUE_VALUE = $27; + GLX_TRANSPARENT_ALPHA_VALUE = $28; + GLX_DONT_CARE = $FFFFFFFF; + GLX_NONE = $8000; + GLX_SLOW_CONFIG = $8001; + GLX_TRUE_COLOR = $8002; + GLX_DIRECT_COLOR = $8003; + GLX_PSEUDO_COLOR = $8004; + GLX_STATIC_COLOR = $8005; + GLX_GRAY_SCALE = $8006; + GLX_STATIC_GRAY = $8007; + GLX_TRANSPARENT_RGB = $8008; + GLX_TRANSPARENT_INDEX = $8009; + GLX_VISUAL_ID = $800B; + GLX_SCREEN = $800C; + GLX_NON_CONFORMANT_CONFIG = $800D; + GLX_DRAWABLE_TYPE = $8010; + GLX_RENDER_TYPE = $8011; + GLX_X_RENDERABLE = $8012; + GLX_FBCONFIG_ID = $8013; + GLX_RGBA_TYPE = $8014; + GLX_COLOR_INDEX_TYPE = $8015; + GLX_MAX_PBUFFER_WIDTH = $8016; + GLX_MAX_PBUFFER_HEIGHT = $8017; + GLX_MAX_PBUFFER_PIXELS = $8018; + GLX_PRESERVED_CONTENTS = $801B; + GLX_LARGEST_PBUFFER = $801C; + GLX_WIDTH = $801D; + GLX_HEIGHT = $801E; + GLX_EVENT_MASK = $801F; + GLX_DAMAGED = $8020; + GLX_SAVED = $8021; + GLX_WINDOW = $8022; + GLX_PBUFFER = $8023; + GLX_PBUFFER_HEIGHT = $8040; + GLX_PBUFFER_WIDTH = $8041; + + // GLX_VERSION_1_4 + GLX_SAMPLE_BUFFERS = 100000; + GLX_SAMPLES = 100001; + + // GLX_ARB_multisample + GLX_SAMPLE_BUFFERS_ARB = 100000; + GLX_SAMPLES_ARB = 100001; + + // GLX_ARB_fbconfig_float + GLX_RGBA_FLOAT_TYPE_ARB = $20B9; + GLX_RGBA_FLOAT_BIT_ARB = $00000004; + + // GLX_ARB_create_context + GLX_CONTEXT_DEBUG_BIT_ARB = $00000001; + GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = $00000002; + GLX_CONTEXT_MAJOR_VERSION_ARB = $2091; + GLX_CONTEXT_MINOR_VERSION_ARB = $2092; + GLX_CONTEXT_FLAGS_ARB = $2094; + + // GLX_ARB_create_context_profile + GLX_CONTEXT_CORE_PROFILE_BIT_ARB = $00000001; + GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = $00000002; + GLX_CONTEXT_PROFILE_MASK_ARB = $9126; + + // GLX_EXT_visual_info + GLX_X_VISUAL_TYPE_EXT = $22; + GLX_TRANSPARENT_TYPE_EXT = $23; + GLX_TRANSPARENT_INDEX_VALUE_EXT = $24; + GLX_TRANSPARENT_RED_VALUE_EXT = $25; + GLX_TRANSPARENT_GREEN_VALUE_EXT = $26; + GLX_TRANSPARENT_BLUE_VALUE_EXT = $27; + GLX_TRANSPARENT_ALPHA_VALUE_EXT = $28; + GLX_NONE_EXT = $8000; + GLX_TRUE_COLOR_EXT = $8002; + GLX_DIRECT_COLOR_EXT = $8003; + GLX_PSEUDO_COLOR_EXT = $8004; + GLX_STATIC_COLOR_EXT = $8005; + GLX_GRAY_SCALE_EXT = $8006; + GLX_STATIC_GRAY_EXT = $8007; + GLX_TRANSPARENT_RGB_EXT = $8008; + GLX_TRANSPARENT_INDEX_EXT = $8009; + + // GLX_EXT_visual_rating + GLX_VISUAL_CAVEAT_EXT = $20; + GLX_SLOW_VISUAL_EXT = $8001; + GLX_NON_CONFORMANT_VISUAL_EXT = $800D; + (* reuse GLX_NONE_EXT *) + + // GLX_EXT_import_context + GLX_SHARE_CONTEXT_EXT = $800A; + GLX_VISUAL_ID_EXT = $800B; + GLX_SCREEN_EXT = $800C; + + // GLX_EXT_fbconfig_packed_float +// GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT = $20B1; +// GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT = $00000008; + + // GLX_EXT_framebuffer_sRGB +// GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT = $20B2; + + // GLX_EXT_texture_from_pixmap + GLX_TEXTURE_1D_BIT_EXT = $00000001; + GLX_TEXTURE_2D_BIT_EXT = $00000002; + GLX_TEXTURE_RECTANGLE_BIT_EXT = $00000004; + GLX_BIND_TO_TEXTURE_RGB_EXT = $20D0; + GLX_BIND_TO_TEXTURE_RGBA_EXT = $20D1; + GLX_BIND_TO_MIPMAP_TEXTURE_EXT = $20D2; + GLX_BIND_TO_TEXTURE_TARGETS_EXT = $20D3; + GLX_Y_INVERTED_EXT = $20D4; + GLX_TEXTURE_FORMAT_EXT = $20D5; + GLX_TEXTURE_TARGET_EXT = $20D6; + GLX_MIPMAP_TEXTURE_EXT = $20D7; + GLX_TEXTURE_FORMAT_NONE_EXT = $20D8; + GLX_TEXTURE_FORMAT_RGB_EXT = $20D9; + GLX_TEXTURE_FORMAT_RGBA_EXT = $20DA; + GLX_TEXTURE_1D_EXT = $20DB; + GLX_TEXTURE_2D_EXT = $20DC; + GLX_TEXTURE_RECTANGLE_EXT = $20DD; + GLX_FRONT_LEFT_EXT = $20DE; + GLX_FRONT_RIGHT_EXT = $20DF; + GLX_BACK_LEFT_EXT = $20E0; + GLX_BACK_RIGHT_EXT = $20E1; + GLX_FRONT_EXT = GLX_FRONT_LEFT_EXT; + GLX_BACK_EXT = GLX_BACK_LEFT_EXT; + GLX_AUX0_EXT = $20E2; + GLX_AUX1_EXT = $20E3; + GLX_AUX2_EXT = $20E4; + GLX_AUX3_EXT = $20E5; + GLX_AUX4_EXT = $20E6; + GLX_AUX5_EXT = $20E7; + GLX_AUX6_EXT = $20E8; + GLX_AUX7_EXT = $20E9; + GLX_AUX8_EXT = $20EA; + GLX_AUX9_EXT = $20EB; + + + // GLU + GLU_INVALID_ENUM = 100900; + GLU_INVALID_VALUE = 100901; + GLU_OUT_OF_MEMORY = 100902; + GLU_INCOMPATIBLE_GL_VERSION = 100903; + GLU_VERSION = 100800; + GLU_EXTENSIONS = 100801; + GLU_TRUE = GL_TRUE; + GLU_FALSE = GL_FALSE; + GLU_SMOOTH = 100000; + GLU_FLAT = 100001; + GLU_NONE = 100002; + GLU_POINT = 100010; + GLU_LINE = 100011; + GLU_FILL = 100012; + GLU_SILHOUETTE = 100013; + GLU_OUTSIDE = 100020; + GLU_INSIDE = 100021; + GLU_TESS_MAX_COORD = 1.0E150; + GLU_TESS_WINDING_RULE = 100140; + GLU_TESS_BOUNDARY_ONLY = 100141; + GLU_TESS_TOLERANCE = 100142; + GLU_TESS_WINDING_ODD = 100130; + GLU_TESS_WINDING_NONZERO = 100131; + GLU_TESS_WINDING_POSITIVE = 100132; + GLU_TESS_WINDING_NEGATIVE = 100133; + GLU_TESS_WINDING_ABS_GEQ_TWO = 100134; + GLU_TESS_BEGIN = 100100; // TGLUTessBeginProc + GLU_TESS_VERTEX = 100101; // TGLUTessVertexProc + GLU_TESS_END = 100102; // TGLUTessEndProc + GLU_TESS_ERROR = 100103; // TGLUTessErrorProc + GLU_TESS_EDGE_FLAG = 100104; // TGLUTessEdgeFlagProc + GLU_TESS_COMBINE = 100105; // TGLUTessCombineProc + GLU_TESS_BEGIN_DATA = 100106; // TGLUTessBeginDataProc + GLU_TESS_VERTEX_DATA = 100107; // TGLUTessVertexDataProc + GLU_TESS_END_DATA = 100108; // TGLUTessEndDataProc + GLU_TESS_ERROR_DATA = 100109; // TGLUTessErrorDataProc + GLU_TESS_EDGE_FLAG_DATA = 100110; // TGLUTessEdgeFlagDataProc + GLU_TESS_COMBINE_DATA = 100111; // TGLUTessCombineDataProc + GLU_TESS_ERROR1 = 100151; + GLU_TESS_ERROR2 = 100152; + GLU_TESS_ERROR3 = 100153; + GLU_TESS_ERROR4 = 100154; + GLU_TESS_ERROR5 = 100155; + GLU_TESS_ERROR6 = 100156; + GLU_TESS_ERROR7 = 100157; + GLU_TESS_ERROR8 = 100158; + GLU_TESS_MISSING_BEGIN_POLYGON = GLU_TESS_ERROR1; + GLU_TESS_MISSING_BEGIN_CONTOUR = GLU_TESS_ERROR2; + GLU_TESS_MISSING_END_POLYGON = GLU_TESS_ERROR3; + GLU_TESS_MISSING_END_CONTOUR = GLU_TESS_ERROR4; + GLU_TESS_COORD_TOO_LARGE = GLU_TESS_ERROR5; + GLU_TESS_NEED_COMBINE_CALLBACK = GLU_TESS_ERROR6; + GLU_AUTO_LOAD_MATRIX = 100200; + GLU_CULLING = 100201; + GLU_SAMPLING_TOLERANCE = 100203; + GLU_DISPLAY_MODE = 100204; + GLU_PARAMETRIC_TOLERANCE = 100202; + GLU_SAMPLING_METHOD = 100205; + GLU_U_STEP = 100206; + GLU_V_STEP = 100207; + GLU_PATH_LENGTH = 100215; + GLU_PARAMETRIC_ERROR = 100216; + GLU_DOMAIN_DISTANCE = 100217; + GLU_MAP1_TRIM_2 = 100210; + GLU_MAP1_TRIM_3 = 100211; + GLU_OUTLINE_POLYGON = 100240; + GLU_OUTLINE_PATCH = 100241; + GLU_NURBS_ERROR1 = 100251; + GLU_NURBS_ERROR2 = 100252; + GLU_NURBS_ERROR3 = 100253; + GLU_NURBS_ERROR4 = 100254; + GLU_NURBS_ERROR5 = 100255; + GLU_NURBS_ERROR6 = 100256; + GLU_NURBS_ERROR7 = 100257; + GLU_NURBS_ERROR8 = 100258; + GLU_NURBS_ERROR9 = 100259; + GLU_NURBS_ERROR10 = 100260; + GLU_NURBS_ERROR11 = 100261; + GLU_NURBS_ERROR12 = 100262; + GLU_NURBS_ERROR13 = 100263; + GLU_NURBS_ERROR14 = 100264; + GLU_NURBS_ERROR15 = 100265; + GLU_NURBS_ERROR16 = 100266; + GLU_NURBS_ERROR17 = 100267; + GLU_NURBS_ERROR18 = 100268; + GLU_NURBS_ERROR19 = 100269; + GLU_NURBS_ERROR20 = 100270; + GLU_NURBS_ERROR21 = 100271; + GLU_NURBS_ERROR22 = 100272; + GLU_NURBS_ERROR23 = 100273; + GLU_NURBS_ERROR24 = 100274; + GLU_NURBS_ERROR25 = 100275; + GLU_NURBS_ERROR26 = 100276; + GLU_NURBS_ERROR27 = 100277; + GLU_NURBS_ERROR28 = 100278; + GLU_NURBS_ERROR29 = 100279; + GLU_NURBS_ERROR30 = 100280; + GLU_NURBS_ERROR31 = 100281; + GLU_NURBS_ERROR32 = 100282; + GLU_NURBS_ERROR33 = 100283; + GLU_NURBS_ERROR34 = 100284; + GLU_NURBS_ERROR35 = 100285; + GLU_NURBS_ERROR36 = 100286; + GLU_NURBS_ERROR37 = 100287; + GLU_CW = 100120; + GLU_CCW = 100121; + GLU_INTERIOR = 100122; + GLU_EXTERIOR = 100123; + GLU_UNKNOWN = 100124; + GLU_BEGIN = GLU_TESS_BEGIN; + GLU_VERTEX = GLU_TESS_VERTEX; + GLU_END = GLU_TESS_END; + GLU_ERROR = GLU_TESS_ERROR; + GLU_EDGE_FLAG = GLU_TESS_EDGE_FLAG; + +type + // GL_VERSION_1_0 + TglCullFace = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFrontFace = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglHint = procedure(target: TGLenum; mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLineWidth = procedure(width: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPointSize = procedure(size: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPolygonMode = procedure(face: TGLenum; mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglScissor = procedure(x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexParameterf = procedure(target: TGLenum; pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexParameterfv = procedure(target: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexParameteri = procedure(target: TGLenum; pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexParameteriv = procedure(target: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexImage1D = procedure(target: TGLenum; level: TGLint; internalformat: TGLint; width: TGLsizei; border: TGLint; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexImage2D = procedure(target: TGLenum; level: TGLint; internalformat: TGLint; width: TGLsizei; height: TGLsizei; border: TGLint; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawBuffer = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClear = procedure(mask: TGLbitfield); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearColor = procedure(red: TGLclampf; green: TGLclampf; blue: TGLclampf; alpha: TGLclampf); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearStencil = procedure(s: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearDepth = procedure(depth: TGLclampd); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglStencilMask = procedure(mask: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorMask = procedure(red: TGLboolean; green: TGLboolean; blue: TGLboolean; alpha: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDepthMask = procedure(flag: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDisable = procedure(cap: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEnable = procedure(cap: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFinish = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFlush = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBlendFunc = procedure(sfactor: TGLenum; dfactor: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLogicOp = procedure(opcode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglStencilFunc = procedure(func: TGLenum; ref: TGLint; mask: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglStencilOp = procedure(fail: TGLenum; zfail: TGLenum; zpass: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDepthFunc = procedure(func: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelStoref = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelStorei = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReadBuffer = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReadPixels = procedure(x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei; format: TGLenum; _type: TGLenum; pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetBooleanv = procedure(pname: TGLenum; params: PGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetDoublev = procedure(pname: TGLenum; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetError = function(): TGLenum; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFloatv = procedure(pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetIntegerv = procedure(pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetString = function(name: TGLenum): PAnsiChar; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexImage = procedure(target: TGLenum; level: TGLint; format: TGLenum; _type: TGLenum; pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexParameteriv = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexParameterfv = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexLevelParameterfv = procedure(target: TGLenum; level: TGLint; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexLevelParameteriv = procedure(target: TGLenum; level: TGLint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsEnabled = function(cap: TGLenum): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDepthRange = procedure(zNear: TGLclampd; zFar: TGLclampd); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglViewport = procedure(x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_VERSION_1_1 + TglDrawArrays = procedure(mode: TGLenum; first: TGLint; count: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawElements = procedure(mode: TGLenum; count: TGLsizei; _type: TGLenum; const indices: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPointerv = procedure(pname: TGLenum; params: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPolygonOffset = procedure(factor: TGLfloat; units: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTexImage1D = procedure(target: TGLenum; level: TGLint; internalFormat: TGLenum; x: TGLint; y: TGLint; width: TGLsizei; border: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTexImage2D = procedure(target: TGLenum; level: TGLint; internalFormat: TGLenum; x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei; border: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTexSubImage1D = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; x: TGLint; y: TGLint; width: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTexSubImage2D = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexSubImage1D = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; width: TGLsizei; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexSubImage2D = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; width: TGLsizei; height: TGLsizei; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindTexture = procedure(target: TGLenum; texture: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteTextures = procedure(n: TGLsizei; const textures: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenTextures = procedure(n: TGLsizei; textures: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + +{$ifdef DGL_DEPRECATED} + TglAccum = procedure(op: TGLenum; value: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglAlphaFunc = procedure(func: TGLenum; ref: TGLclampf); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglAreTexturesResident = function(n: TGLsizei; const textures: PGLuint; residences: PGLboolean): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglArrayElement = procedure(i: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBegin = procedure(mode: TGLenum); {$IFNDEF CLR}{$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF}{$ENDIF} + TglBitmap = procedure(width: TGLsizei; height: TGLsizei; xorig: TGLfloat; yorig: TGLfloat; xmove: TGLfloat; ymove: TGLfloat; const bitmap: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCallList = procedure(list: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCallLists = procedure(n: TGLsizei; _type: TGLenum; const lists: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearAccum = procedure(red: TGLfloat; green: TGLfloat; blue: TGLfloat; alpha: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearIndex = procedure(c: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClipPlane = procedure(plane: TGLenum; const equation: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3b = procedure(red: TGLbyte; green: TGLbyte; blue: TGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3bv = procedure(const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3d = procedure(red: TGLdouble; green: TGLdouble; blue: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3f = procedure(red: TGLfloat; green: TGLfloat; blue: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3i = procedure(red: TGLint; green: TGLint; blue: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3s = procedure(red: TGLshort; green: TGLshort; blue: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3ub = procedure(red: TGLubyte; green: TGLubyte; blue: TGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3ubv = procedure(const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3ui = procedure(red: TGLuint; green: TGLuint; blue: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3uiv = procedure(const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3us = procedure(red: TGLushort; green: TGLushort; blue: TGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3usv = procedure(const v: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4b = procedure(red: TGLbyte; green: TGLbyte; blue: TGLbyte; alpha: TGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4bv = procedure(const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4d = procedure(red: TGLdouble; green: TGLdouble; blue: TGLdouble; alpha: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4f = procedure(red: TGLfloat; green: TGLfloat; blue: TGLfloat; alpha: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4i = procedure(red: TGLint; green: TGLint; blue: TGLint; alpha: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4s = procedure(red: TGLshort; green: TGLshort; blue: TGLshort; alpha: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4ub = procedure(red: TGLubyte; green: TGLubyte; blue: TGLubyte; alpha: TGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4ubv = procedure(const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4ui = procedure(red: TGLuint; green: TGLuint; blue: TGLuint; alpha: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4uiv = procedure(const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4us = procedure(red: TGLushort; green: TGLushort; blue: TGLushort; alpha: TGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4usv = procedure(const v: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorMaterial = procedure(face: TGLenum; mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorPointer = procedure(size: TGLint; _type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyPixels = procedure(x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei; _type: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteLists = procedure(list: TGLuint; range: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDisableClientState = procedure(_array: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawPixels = procedure(width: TGLsizei; height: TGLsizei; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEdgeFlag = procedure(flag: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEdgeFlagPointer = procedure(stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEdgeFlagv = procedure(const flag: PGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEnableClientState = procedure(_array: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEnd = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndList = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalCoord1d = procedure(u: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalCoord1dv = procedure(const u: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalCoord1f = procedure(u: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalCoord1fv = procedure(const u: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalCoord2d = procedure(u: TGLdouble; v: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalCoord2dv = procedure(const u: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalCoord2f = procedure(u: TGLfloat; v: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalCoord2fv = procedure(const u: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalMesh1 = procedure(mode: TGLenum; i1: TGLint; i2: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalMesh2 = procedure(mode: TGLenum; i1: TGLint; i2: TGLint; j1: TGLint; j2: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalPoint1 = procedure(i: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalPoint2 = procedure(i: TGLint; j: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFeedbackBuffer = procedure(size: TGLsizei; _type: TGLenum; buffer: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogf = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogfv = procedure(pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogi = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogiv = procedure(pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFrustum = procedure(left: TGLdouble; right: TGLdouble; bottom: TGLdouble; top: TGLdouble; zNear: TGLdouble; zFar: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenLists = function(range: TGLsizei): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetClipPlane = procedure(plane: TGLenum; equation: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetLightfv = procedure(light: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetLightiv = procedure(light: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMapdv = procedure(target: TGLenum; query: TGLenum; v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMapfv = procedure(target: TGLenum; query: TGLenum; v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMapiv = procedure(target: TGLenum; query: TGLenum; v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMaterialfv = procedure(face: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMaterialiv = procedure(face: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPixelMapfv = procedure(map: TGLenum; values: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPixelMapuiv = procedure(map: TGLenum; values: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPixelMapusv = procedure(map: TGLenum; values: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPolygonStipple = procedure(mask: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexEnvfv = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexEnviv = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexGendv = procedure(coord: TGLenum; pname: TGLenum; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexGenfv = procedure(coord: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexGeniv = procedure(coord: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexMask = procedure(mask: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexPointer = procedure(_type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexd = procedure(c: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexdv = procedure(const c: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexf = procedure(c: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexfv = procedure(const c: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexi = procedure(c: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexiv = procedure(const c: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexs = procedure(c: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexsv = procedure(const c: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexub = procedure(c: TGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexubv = procedure(const c: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglInitNames = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglInterleavedArrays = procedure(format: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsList = function(list: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsTexture = function(texture: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLightModelf = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLightModelfv = procedure(pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLightModeli = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLightModeliv = procedure(pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLightf = procedure(light: TGLenum; pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLightfv = procedure(light: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLighti = procedure(light: TGLenum; pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLightiv = procedure(light: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLineStipple = procedure(factor: TGLint; pattern: TGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglListBase = procedure(base: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLoadIdentity = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLoadMatrixd = procedure(const m: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLoadMatrixf = procedure(const m: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLoadName = procedure(name: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMap1d = procedure(target: TGLenum; u1: TGLdouble; u2: TGLdouble; stride: TGLint; order: TGLint; const points: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMap1f = procedure(target: TGLenum; u1: TGLfloat; u2: TGLfloat; stride: TGLint; order: TGLint; const points: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMap2d = procedure(target: TGLenum; u1: TGLdouble; u2: TGLdouble; ustride: TGLint; uorder: TGLint; v1: TGLdouble; v2: TGLdouble; vstride: TGLint; vorder: TGLint; const points: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMap2f = procedure(target: TGLenum; u1: TGLfloat; u2: TGLfloat; ustride: TGLint; uorder: TGLint; v1: TGLfloat; v2: TGLfloat; vstride: TGLint; vorder: TGLint; const points: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapGrid1d = procedure(un: TGLint; u1: TGLdouble; u2: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapGrid1f = procedure(un: TGLint; u1: TGLfloat; u2: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapGrid2d = procedure(un: TGLint; u1: TGLdouble; u2: TGLdouble; vn: TGLint; v1: TGLdouble; v2: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapGrid2f = procedure(un: TGLint; u1: TGLfloat; u2: TGLfloat; vn: TGLint; v1: TGLfloat; v2: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMaterialf = procedure(face: TGLenum; pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMaterialfv = procedure(face: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMateriali = procedure(face: TGLenum; pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMaterialiv = procedure(face: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixMode = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultMatrixd = procedure(const m: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultMatrixf = procedure(const m: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNewList = procedure(list: TGLuint; mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3b = procedure(nx: TGLbyte; ny: TGLbyte; nz: TGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3bv = procedure(const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3d = procedure(nx: TGLdouble; ny: TGLdouble; nz: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3f = procedure(nx: TGLfloat; ny: TGLfloat; nz: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3i = procedure(nx: TGLint; ny: TGLint; nz: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3s = procedure(nx: TGLshort; ny: TGLshort; nz: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalPointer = procedure(_type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglOrtho = procedure(left: TGLdouble; right: TGLdouble; bottom: TGLdouble; top: TGLdouble; zNear: TGLdouble; zFar: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPassThrough = procedure(token: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelMapfv = procedure(map: TGLenum; mapsize: TGLsizei; const values: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelMapuiv = procedure(map: TGLenum; mapsize: TGLsizei; const values: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelMapusv = procedure(map: TGLenum; mapsize: TGLsizei; const values: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelTransferf = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelTransferi = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelZoom = procedure(xfactor: TGLfloat; yfactor: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPolygonStipple = procedure(const mask: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPopAttrib = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPopClientAttrib = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPopMatrix = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPopName = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPrioritizeTextures = procedure(n: TGLsizei; const textures: PGLuint; const priorities: PGLclampf); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPushAttrib = procedure(mask: TGLbitfield); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPushClientAttrib = procedure(mask: TGLbitfield); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPushMatrix = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPushName = procedure(name: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos2d = procedure(x: TGLdouble; y: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos2dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos2f = procedure(x: TGLfloat; y: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos2fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos2i = procedure(x: TGLint; y: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos2iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos2s = procedure(x: TGLshort; y: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos2sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos3d = procedure(x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos3dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos3f = procedure(x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos3fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos3i = procedure(x: TGLint; y: TGLint; z: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos3iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos3s = procedure(x: TGLshort; y: TGLshort; z: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos3sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos4d = procedure(x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos4dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos4f = procedure(x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos4fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos4i = procedure(x: TGLint; y: TGLint; z: TGLint; w: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos4iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos4s = procedure(x: TGLshort; y: TGLshort; z: TGLshort; w: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRasterPos4sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRectd = procedure(x1: TGLdouble; y1: TGLdouble; x2: TGLdouble; y2: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRectdv = procedure(const v1: PGLdouble; const v2: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRectf = procedure(x1: TGLfloat; y1: TGLfloat; x2: TGLfloat; y2: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRectfv = procedure(const v1: PGLfloat; const v2: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRecti = procedure(x1: TGLint; y1: TGLint; x2: TGLint; y2: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRectiv = procedure(const v1: PGLint; const v2: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRects = procedure(x1: TGLshort; y1: TGLshort; x2: TGLshort; y2: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRectsv = procedure(const v1: PGLshort; const v2: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRenderMode = function(mode: TGLenum): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRotated = procedure(angle: TGLdouble; x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRotatef = procedure(angle: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglScaled = procedure(x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglScalef = procedure(x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSelectBuffer = procedure(size: TGLsizei; buffer: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglShadeModel = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord1d = procedure(s: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord1dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord1f = procedure(s: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord1fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord1i = procedure(s: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord1iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord1s = procedure(s: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord1sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2d = procedure(s: TGLdouble; t: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2f = procedure(s: TGLfloat; t: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2i = procedure(s: TGLint; t: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2s = procedure(s: TGLshort; t: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord3d = procedure(s: TGLdouble; t: TGLdouble; r: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord3dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord3f = procedure(s: TGLfloat; t: TGLfloat; r: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord3fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord3i = procedure(s: TGLint; t: TGLint; r: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord3iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord3s = procedure(s: TGLshort; t: TGLshort; r: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord3sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4d = procedure(s: TGLdouble; t: TGLdouble; r: TGLdouble; q: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4f = procedure(s: TGLfloat; t: TGLfloat; r: TGLfloat; q: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4i = procedure(s: TGLint; t: TGLint; r: TGLint; q: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4s = procedure(s: TGLshort; t: TGLshort; r: TGLshort; q: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoordPointer = procedure(size: TGLint; _type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexEnvf = procedure(target: TGLenum; pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexEnvfv = procedure(target: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexEnvi = procedure(target: TGLenum; pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexEnviv = procedure(target: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexGend = procedure(coord: TGLenum; pname: TGLenum; param: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexGendv = procedure(coord: TGLenum; pname: TGLenum; const params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexGenf = procedure(coord: TGLenum; pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexGenfv = procedure(coord: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexGeni = procedure(coord: TGLenum; pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexGeniv = procedure(coord: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + + TglTranslated = procedure(x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTranslatef = procedure(x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex2d = procedure(x: TGLdouble; y: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex2dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex2f = procedure(x: TGLfloat; y: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex2fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex2i = procedure(x: TGLint; y: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex2iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex2s = procedure(x: TGLshort; y: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex2sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex3d = procedure(x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex3dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex3f = procedure(x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex3fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex3i = procedure(x: TGLint; y: TGLint; z: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex3iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex3s = procedure(x: TGLshort; y: TGLshort; z: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex3sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex4d = procedure(x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex4dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex4f = procedure(x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex4fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex4i = procedure(x: TGLint; y: TGLint; z: TGLint; w: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex4iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex4s = procedure(x: TGLshort; y: TGLshort; z: TGLshort; w: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex4sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexPointer = procedure(size: TGLint; _type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} +{$endif} + + // GL_VERSION_1_2 + TglBlendColor = procedure(red: TGLclampf; green: TGLclampf; blue: TGLclampf; alpha: TGLclampf); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBlendEquation = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawRangeElements = procedure(mode: TGLenum; start: TGLuint; _end: TGLuint; count: TGLsizei; _type: TGLenum; const indices: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexImage3D = procedure(target: TGLenum; level: TGLint; internalformat: TGLint; width: TGLsizei; height: TGLsizei; depth: TGLsizei; border: TGLint; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexSubImage3D = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; zoffset: TGLint; width: TGLsizei; height: TGLsizei; depth: TGLsizei; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTexSubImage3D = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; zoffset: TGLint; x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} +{$ifdef DGL_DEPRECATED} + TglColorTable = procedure(target: TGLenum; internalformat: TGLenum; width: TGLsizei; format: TGLenum; _type: TGLenum; const table: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorTableParameterfv = procedure(target: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorTableParameteriv = procedure(target: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyColorTable = procedure(target: TGLenum; internalformat: TGLenum; x: TGLint; y: TGLint; width: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetColorTable = procedure(target: TGLenum; format: TGLenum; _type: TGLenum; table: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetColorTableParameterfv = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetColorTableParameteriv = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorSubTable = procedure(target: TGLenum; start: TGLsizei; count: TGLsizei; format: TGLenum; _type: TGLenum; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyColorSubTable = procedure(target: TGLenum; start: TGLsizei; x: TGLint; y: TGLint; width: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionFilter1D = procedure(target: TGLenum; internalformat: TGLenum; width: TGLsizei; format: TGLenum; _type: TGLenum; const image: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionFilter2D = procedure(target: TGLenum; internalformat: TGLenum; width: TGLsizei; height: TGLsizei; format: TGLenum; _type: TGLenum; const image: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionParameterf = procedure(target: TGLenum; pname: TGLenum; params: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionParameterfv = procedure(target: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionParameteri = procedure(target: TGLenum; pname: TGLenum; params: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionParameteriv = procedure(target: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyConvolutionFilter1D = procedure(target: TGLenum; internalformat: TGLenum; x: TGLint; y: TGLint; width: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyConvolutionFilter2D = procedure(target: TGLenum; internalformat: TGLenum; x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetConvolutionFilter = procedure(target: TGLenum; format: TGLenum; _type: TGLenum; image: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetConvolutionParameterfv = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetConvolutionParameteriv = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetSeparableFilter = procedure(target: TGLenum; format: TGLenum; _type: TGLenum; row: PGLvoid; column: PGLvoid; span: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSeparableFilter2D = procedure(target: TGLenum; internalformat: TGLenum; width: TGLsizei; height: TGLsizei; format: TGLenum; _type: TGLenum; const row: PGLvoid; const column: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetHistogram = procedure(target: TGLenum; reset: TGLboolean; format: TGLenum; _type: TGLenum; values: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetHistogramParameterfv = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetHistogramParameteriv = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMinmax = procedure(target: TGLenum; reset: TGLboolean; format: TGLenum; _type: TGLenum; values: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMinmaxParameterfv = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMinmaxParameteriv = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglHistogram = procedure(target: TGLenum; width: TGLsizei; internalformat: TGLenum; sink: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMinmax = procedure(target: TGLenum; internalformat: TGLenum; sink: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglResetHistogram = procedure(target: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglResetMinmax = procedure(target: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} +{$endif} + + // GL_VERSION_1_3 + TglActiveTexture = procedure(texture: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSampleCoverage = procedure(value: TGLclampf; invert: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexImage3D = procedure(target: TGLenum; level: TGLint; internalformat: TGLenum; width: TGLsizei; height: TGLsizei; depth: TGLsizei; border: TGLint; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexImage2D = procedure(target: TGLenum; level: TGLint; internalformat: TGLenum; width: TGLsizei; height: TGLsizei; border: TGLint; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexImage1D = procedure(target: TGLenum; level: TGLint; internalformat: TGLenum; width: TGLsizei; border: TGLint; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexSubImage3D = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; zoffset: TGLint; width: TGLsizei; height: TGLsizei; depth: TGLsizei; format: TGLenum; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexSubImage2D = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; width: TGLsizei; height: TGLsizei; format: TGLenum; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexSubImage1D = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; width: TGLsizei; format: TGLenum; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetCompressedTexImage = procedure(target: TGLenum; level: TGLint; img: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} +{$ifdef DGL_DEPRECATED} + TglClientActiveTexture = procedure(texture: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1d = procedure(target: TGLenum; s: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1dv = procedure(target: TGLenum; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1f = procedure(target: TGLenum; s: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1fv = procedure(target: TGLenum; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1i = procedure(target: TGLenum; s: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1iv = procedure(target: TGLenum; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1s = procedure(target: TGLenum; s: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1sv = procedure(target: TGLenum; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2d = procedure(target: TGLenum; s: TGLdouble; t: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2dv = procedure(target: TGLenum; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2f = procedure(target: TGLenum; s: TGLfloat; t: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2fv = procedure(target: TGLenum; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2i = procedure(target: TGLenum; s: TGLint; t: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2iv = procedure(target: TGLenum; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2s = procedure(target: TGLenum; s: TGLshort; t: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2sv = procedure(target: TGLenum; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3d = procedure(target: TGLenum; s: TGLdouble; t: TGLdouble; r: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3dv = procedure(target: TGLenum; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3f = procedure(target: TGLenum; s: TGLfloat; t: TGLfloat; r: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3fv = procedure(target: TGLenum; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3i = procedure(target: TGLenum; s: TGLint; t: TGLint; r: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3iv = procedure(target: TGLenum; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3s = procedure(target: TGLenum; s: TGLshort; t: TGLshort; r: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3sv = procedure(target: TGLenum; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4d = procedure(target: TGLenum; s: TGLdouble; t: TGLdouble; r: TGLdouble; q: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4dv = procedure(target: TGLenum; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4f = procedure(target: TGLenum; s: TGLfloat; t: TGLfloat; r: TGLfloat; q: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4fv = procedure(target: TGLenum; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4i = procedure(target: TGLenum; s: TGLint; t: TGLint; r: TGLint; q: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4iv = procedure(target: TGLenum; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4s = procedure(target: TGLenum; s: TGLshort; t: TGLshort; r: TGLshort; q: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4sv = procedure(target: TGLenum; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLoadTransposeMatrixf = procedure(const m: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLoadTransposeMatrixd = procedure(const m: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultTransposeMatrixf = procedure(const m: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultTransposeMatrixd = procedure(const m: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} +{$endif} + + // GL_VERSION_1_4 + TglBlendFuncSeparate = procedure(sfactorRGB: TGLenum; dfactorRGB: TGLenum; sfactorAlpha: TGLenum; dfactorAlpha: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiDrawArrays = procedure(mode: TGLenum; first: PGLint; count: PGLsizei; primcount: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiDrawElements = procedure(mode: TGLenum; const count: PGLsizei; _type: TGLenum; const indices: PGLvoid; primcount: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPointParameterf = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPointParameterfv = procedure(pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPointParameteri = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPointParameteriv = procedure(pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} +{$ifdef DGL_DEPRECATED} + TglFogCoordf = procedure(coord: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoordfv = procedure(const coord: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoordd = procedure(coord: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoorddv = procedure(const coord: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoordPointer = procedure(_type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3b = procedure(red: TGLbyte; green: TGLbyte; blue: TGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3bv = procedure(const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3d = procedure(red: TGLdouble; green: TGLdouble; blue: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3f = procedure(red: TGLfloat; green: TGLfloat; blue: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3i = procedure(red: TGLint; green: TGLint; blue: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3s = procedure(red: TGLshort; green: TGLshort; blue: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3ub = procedure(red: TGLubyte; green: TGLubyte; blue: TGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3ubv = procedure(const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3ui = procedure(red: TGLuint; green: TGLuint; blue: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3uiv = procedure(const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3us = procedure(red: TGLushort; green: TGLushort; blue: TGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3usv = procedure(const v: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColorPointer = procedure(size: TGLint; _type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2d = procedure(x: TGLdouble; y: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2f = procedure(x: TGLfloat; y: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2i = procedure(x: TGLint; y: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2s = procedure(x: TGLshort; y: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3d = procedure(x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3dv = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3f = procedure(x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3fv = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3i = procedure(x: TGLint; y: TGLint; z: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3iv = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3s = procedure(x: TGLshort; y: TGLshort; z: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3sv = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} +{$endif} + + // GL_VERSION_1_5 + TglGenQueries = procedure(n: GLsizei; ids: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteQueries = procedure(n: GLsizei; const ids: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsQuery = function(id: GLuint): boolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBeginQuery = procedure(target: GLenum; id: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndQuery = procedure(target: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetQueryiv = procedure(target, pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetQueryObjectiv = procedure(id: GLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetQueryObjectuiv = procedure(id: GLuint; pname: GLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindBuffer = procedure(target: TGLenum; buffer: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteBuffers = procedure(n: TGLsizei; const buffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenBuffers = procedure(n: TGLsizei; buffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsBuffer = function(buffer: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBufferData = procedure(target: TGLenum; size: TGLsizei; const data: PGLvoid; usage: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBufferSubData = procedure(target: TGLenum; offset: TGLsizei; size: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetBufferSubData = procedure(target: TGLenum; offset: TGLsizei; size: TGLsizei; data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapBuffer = function(target: TGLenum; access: TGLenum): PGLvoid; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUnmapBuffer = function(target: TGLenum): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetBufferParameteriv = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetBufferPointerv = procedure(target: TGLenum; pname: TGLenum; params: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_VERSION_2_0 + TglBlendEquationSeparate = procedure(modeRGB: GLenum; modeAlpha: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawBuffers = procedure(n: GLsizei; const bufs: PGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglStencilOpSeparate = procedure(face: GLenum; sfail: GLenum; dpfail: GLenum; dppass: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglStencilFuncSeparate = procedure(frontfunc: GLenum; backfunc: GLenum; ref: GLint; mask: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglStencilMaskSeparate = procedure(face: GLenum; mask: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglAttachShader = procedure(programObj, shaderObj: GLhandle); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindAttribLocation = procedure(programObj: GLhandle; index: GLuint; name: PGLChar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompileShader = procedure(shaderObj: GLhandle); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCreateProgram = function: GLhandle; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCreateShader = function(shaderType: GLenum): GLhandle; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteProgram = procedure(programObj: GLhandle); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteShader = procedure(shaderObj: GLhandle); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDetachShader = procedure(programObj, shaderObj: GLhandle); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDisableVertexAttribArray = procedure(index: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEnableVertexAttribArray = procedure(index: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetActiveAttrib = procedure(programObj: GLhandle; index: GLuint; maxlength: GLsizei; var length: GLint; var size: GLint; var _type: GLenum; name: PGLChar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetActiveUniform = procedure(programObj: GLhandle; index: GLuint; maxLength: GLsizei; var length: GLsizei; var size: GLint; var _type: GLenum; name: PGLChar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetAttachedShaders = procedure(programObj: GLhandle; MaxCount: GLsizei; var Count: GLint; shaders: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetAttribLocation = function(programObj: GLhandle; char: string): glint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramiv = procedure(programObj: GLhandle; pname: TGLenum; params: PGLInt); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramInfoLog = procedure(programObj: GLHandle; maxLength: glsizei; var length: GLint; infoLog: PGLChar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetShaderiv = procedure(shaderObj: GLhandle; pname: TGLenum; params: PGLInt); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetShaderInfoLog = procedure(shaderObj: GLHandle; maxLength: glsizei; var length: glint; infoLog: PGLChar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetShaderSource = procedure(shaderObj: GLhandle; maxlength: GLsizei; var length: GLsizei; source: PGLChar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformLocation = function(programObj: GLhandle; const char: PGLChar): glint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformfv = procedure(programObj: GLhandle; location: GLint; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformiv = procedure(programObj: GLhandle; location: GLint; params: PGLInt); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribfv = procedure(index: GLuint; pname: GLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribiv = procedure(index: GLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribPointerv = procedure(index: GLuint; pname: GLenum; _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsProgram = function(programObj: GLhandle) : TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsShader = function(shaderObj: GLhandle) : TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLinkProgram = procedure(programObj: GLHandle); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglShaderSource = procedure(shaderObj: GLHandle; count: glsizei; _string: PPGLChar; lengths: pglint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUseProgram = procedure(programObj: GLhandle); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1f = procedure(location: GLint; v0: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2f = procedure(location: GLint; v0, v1: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3f = procedure(location: GLint; v0, v1, v2: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4f = procedure(location: GLint; v0, v1, v2, v3: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1i = procedure(location: GLint; v0: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2i = procedure(location: GLint; v0, v1: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3i = procedure(location: GLint; v0, v1, v2: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4i = procedure(location: GLint; v0, v1, v2, v3: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1fv = procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2fv = procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3fv = procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4fv = procedure(location: GLint; count: GLsizei; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1iv = procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2iv = procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3iv = procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4iv = procedure(location: GLint; count: GLsizei; value: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix2fv = procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix3fv = procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix4fv = procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglValidateProgram = procedure(programObj: GLhandle); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1d = procedure(index: GLuint; x: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1dv = procedure(index: GLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1f = procedure(index: GLuint; x: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1fv = procedure(index: GLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1s = procedure(index: GLuint; x: GLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1sv = procedure(index: GLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2d = procedure(index: GLuint; x: GLdouble; y: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2dv = procedure(index: GLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2f = procedure(index: GLuint; x: GLfloat; y: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2fv = procedure(index: GLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2s = procedure(index: GLuint; x: GLshort; y: GLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2sv = procedure(index: GLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3d = procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3dv = procedure(index: GLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3f = procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3fv = procedure(index: GLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3s = procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3sv = procedure(index: GLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4Nbv = procedure(index: GLuint; const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4Niv = procedure(index: GLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4Nsv = procedure(index: GLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4Nub = procedure(index: GLuint; x: GLubyte; y: GLubyte; z: GLubyte; w: GLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4Nubv = procedure(index: GLuint; const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4Nuiv = procedure(index: GLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4Nusv = procedure(index: GLuint; const v: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4bv = procedure(index: GLuint; const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4d = procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4dv = procedure(index: GLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4f = procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4fv = procedure(index: GLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4iv = procedure(index: GLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4s = procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort; w: GLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4sv = procedure(index: GLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4ubv = procedure(index: GLuint; const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4uiv = procedure(index: GLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4usv = procedure(index: GLuint; const v: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribPointer = procedure(index: GLuint; size: GLint; _type: GLenum; normalized: GLboolean; stride: GLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_VERSION_2_1 + TglUniformMatrix2x3fv = procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix3x2fv = procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix2x4fv = procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix4x2fv = procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix3x4fv = procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix4x3fv = procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_VERSION_3_0 + { OpenGL 3.0 also reuses entry points from these extensions: } + { ARB_framebuffer_object } + { ARB_map_buffer_range } + { ARB_vertex_array_object } + TglColorMaski = procedure(index_: GLuint; r: GLboolean; g: GLboolean; b: GLboolean; a: GLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetBooleani_v = procedure(target: GLenum; index_: GLuint; data: PGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetIntegeri_v = procedure(target: GLenum; index_: GLuint; data: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEnablei = procedure(target: GLenum; index_: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDisablei = procedure(target: GLenum; index_: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsEnabledi = function(target: GLenum; index_: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBeginTransformFeedback = procedure(primitiveMode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndTransformFeedback = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindBufferRange = procedure(target: GLenum; index_: GLuint; buffer: GLuint; offset: GLsizei; size: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindBufferBase = procedure(target: GLenum; index_: GLuint; buffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTransformFeedbackVaryings = procedure(program_: GLuint; count: GLsizei; const varyings: PPGLchar; bufferMode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTransformFeedbackVarying = procedure(program_: GLuint; index_: GLuint; bufSize: GLsizei; length: PGLsizei; size: PGLsizei; type_: PGLsizei; name: PGLchar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClampColor = procedure(targe: GLenum; clamp: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBeginConditionalRender = procedure(id: GLuint; mode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndConditionalRender = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribIPointer = procedure(index_: GLuint; size: GLint; type_: GLenum; stride: GLsizei; const pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribIiv = procedure(index_: GLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribIuiv = procedure(index_: GLuint; pname: GLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI1i = procedure(index_: GLuint; x: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI2i = procedure(index_: GLuint; x: GLint; y: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI3i = procedure(index_: GLuint; x: GLint; y: GLint; z: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4i = procedure(index_: GLuint; x: GLint; y: GLint; z: GLint; w: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI1ui = procedure(index_: GLuint; x: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI2ui = procedure(index_: GLuint; x: GLuint; y: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI3ui = procedure(index_: GLuint; x: GLuint; y: GLuint; z: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4ui = procedure(index_: GLuint; x: GLuint; y: GLuint; z: GLuint; w: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI1iv = procedure(index_: GLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI2iv = procedure(index_: GLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI3iv = procedure(index_: GLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4iv = procedure(index_: GLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI1uiv = procedure(index_: GLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI2uiv = procedure(index_: GLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI3uiv = procedure(index_: GLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4uiv = procedure(index_: GLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4bv = procedure(index_: GLuint; const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4sv = procedure(index_: GLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4ubv = procedure(index_: GLuint; const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4usv = procedure(index_: GLuint; const v: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformuiv = procedure(program_: GLuint; location: GLint; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindFragDataLocation = procedure(program_: GLuint; color: GLuint; const name: PGLChar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFragDataLocation = function(program_: GLuint; const name: PGLChar): GLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1ui = procedure(location: GLint; v0: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2ui = procedure(location: GLint; v0: GLuint; v1: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3ui = procedure(location: GLint; v0: GLuint; v1: GLuint; v2: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4ui = procedure(location: GLint; v0: GLuint; v1: GLuint; v2: GLuint; v3: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1uiv = procedure(location: GLint; count: GLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2uiv = procedure(location: GLint; count: GLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3uiv = procedure(location: GLint; count: GLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4uiv = procedure(location: GLint; count: GLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexParameterIiv = procedure(target: GLenum; pname: GLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexParameterIuiv = procedure(target: GLenum; pname: GLenum; const params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexParameterIiv = procedure(target: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexParameterIuiv = procedure(target: GLenum; pname: GLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearBufferiv = procedure(buffer: GLenum; drawbuffer: GLint; const value: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearBufferuiv = procedure(buffer: GLenum; drawbuffer: GLint; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearBufferfv = procedure(buffer: GLenum; drawbuffer: GLint; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearBufferfi = procedure(buffer: GLenum; drawbuffer: GLint; depth: GLfloat; stencil: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetStringi = function(name: GLenum; index: GLuint): PGLubyte; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_VERSION_3_1 + { OpenGL 3.1 also reuses entry points from these extensions: } + { ARB_copy_buffer } + { ARB_uniform_buffer_object } + TglDrawArraysInstanced = procedure(mode: GLenum; first: GLint; count: GLsizei; primcount: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawElementsInstanced = procedure(mode: GLenum; count: GLsizei; type_: GLenum; const indices: PGLvoid; primcount: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexBuffer = procedure(target: GLenum; internalformat: GLenum; buffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPrimitiveRestartIndex = procedure(index_: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_VERSION_3_2 + { OpenGL 3.2 also reuses entry points from these extensions: } + { ARB_draw_elements_base_vertex } + { ARB_provoking_vertex } + { ARB_sync } + { ARB_texture_multisample } + TglGetInteger64i_v = procedure(target: GLenum; index_: GLuint; data: PGLint64); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetBufferParameteri64v = procedure(target: GLenum; pname: GLenum; params: PGLint64); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramParameteri = procedure(program_: GLuint; pname: GLenum; value: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTexture = procedure(target: GLenum; attachment: GLenum; texture: GLuint; level: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTextureFace = procedure(target: GLenum; attachment: GLenum; texture: GLuint; level: GLint; face: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_3DFX_tbuffer + TglTbufferMask3DFX = procedure(mask: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_APPLE_element_array + TglElementPointerAPPLE = procedure(_type: TGLenum; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawElementArrayAPPLE = procedure(mode: TGLenum; first: TGLint; count: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawRangeElementArrayAPPLE = procedure(mode: TGLenum; start: TGLuint; _end: TGLuint; first: TGLint; count: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiDrawElementArrayAPPLE = procedure(mode: TGLenum; const first: PGLint; const count: PGLsizei; primcount: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiDrawRangeElementArrayAPPLE = procedure(mode: TGLenum; start: TGLuint; _end: TGLuint; const first: PGLint; const count: PGLsizei; primcount: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_APPLE_fence + TglGenFencesAPPLE = procedure(n: TGLsizei; fences: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteFencesAPPLE = procedure(n: TGLsizei; const fences: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSetFenceAPPLE = procedure(fence: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsFenceAPPLE = function(fence: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTestFenceAPPLE = function(fence: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFinishFenceAPPLE = procedure(fence: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTestObjectAPPLE = function(_object: TGLenum; name: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFinishObjectAPPLE = procedure(_object: TGLenum; name: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_APPLE_vertex_array_object + TglBindVertexArrayAPPLE = procedure(_array: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteVertexArraysAPPLE = procedure(n: TGLsizei; const arrays: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenVertexArraysAPPLE = procedure(n: TGLsizei; const arrays: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsVertexArrayAPPLE = function(_array: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_APPLE_vertex_array_range + TglVertexArrayRangeAPPLE = procedure(length: TGLsizei; _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFlushVertexArrayRangeAPPLE = procedure(length: TGLsizei; _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexArrayParameteriAPPLE = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_APPLE_texture_range + TglTextureRangeAPPLE = procedure(target: GLenum; length: GLsizei; const Pointer_: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexParameterPointervAPPLE = procedure(target: GLenum; pname: GLenum; params: PPGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_APPLE_vertex_program_evaluators + TglEnableVertexAttribAPPLE = procedure(index_: GLuint; pname: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDisableVertexAttribAPPLE = procedure(index_: GLuint; pname: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsVertexAttribEnabledAPPLE = function(index_: GLuint; pname: GLenum): GLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapVertexAttrib1dAPPLE = procedure(index_: GLuint; size: GLuint; u1: GLdouble; u2: GLdouble; stride: GLint; order: GLint; const points: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapVertexAttrib1fAPPLE = procedure(index_: GLuint; size: GLuint; u1: GLfloat; u2: GLfloat; stride: GLint; order: GLint; const points: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapVertexAttrib2dAPPLE = procedure(index_: GLuint; size: GLuint; u1: GLdouble; u2: GLdouble; ustride: GLint; uorder: GLint; v1: GLdouble; v2: GLdouble; vstride: GLint; vorder: GLint; const points: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapVertexAttrib2fAPPLE = procedure(index_: GLuint; size: GLuint; u1: GLfloat; u2: GLfloat; ustride: GLint; order: GLint; v1: GLfloat; v2: GLfloat; vstride: GLint; vorder: GLint; const points: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_APPLE_object_purgeable + TglObjectPurgeableAPPLE = function(objectType: GLenum; name: GLuint; option: GLenum): GLenum; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglObjectUnpurgeableAPPLE = function(objectType: GLenum; name: GLuint; option: GLenum): GLenum; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetObjectParameterivAPPLE = procedure(objectType: GLenum; name: GLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_matrix_palette + TglCurrentPaletteMatrixARB = procedure(index: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixIndexubvARB = procedure(size: TGLint; const indices: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixIndexusvARB = procedure(size: TGLint; const indices: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixIndexuivARB = procedure(size: TGLint; const indices: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixIndexPointerARB = procedure(size: TGLint; _type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_multisample + TglSampleCoverageARB = procedure(value: TGLclampf; invert: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_multitexture + TglActiveTextureARB = procedure(texture: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClientActiveTextureARB = procedure(texture: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1dARB = procedure(target: TGLenum; s: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1dvARB = procedure(target: TGLenum; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1fARB = procedure(target: TGLenum; s: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1fvARB = procedure(target: TGLenum; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1iARB = procedure(target: TGLenum; s: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1ivARB = procedure(target: TGLenum; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1sARB = procedure(target: TGLenum; s: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1svARB = procedure(target: TGLenum; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2dARB = procedure(target: TGLenum; s: TGLdouble; t: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2dvARB = procedure(target: TGLenum; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2fARB = procedure(target: TGLenum; s: TGLfloat; t: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2fvARB = procedure(target: TGLenum; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2iARB = procedure(target: TGLenum; s: TGLint; t: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2ivARB = procedure(target: TGLenum; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2sARB = procedure(target: TGLenum; s: TGLshort; t: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2svARB = procedure(target: TGLenum; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3dARB = procedure(target: TGLenum; s: TGLdouble; t: TGLdouble; r: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3dvARB = procedure(target: TGLenum; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3fARB = procedure(target: TGLenum; s: TGLfloat; t: TGLfloat; r: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3fvARB = procedure(target: TGLenum; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3iARB = procedure(target: TGLenum; s: TGLint; t: TGLint; r: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3ivARB = procedure(target: TGLenum; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3sARB = procedure(target: TGLenum; s: TGLshort; t: TGLshort; r: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3svARB = procedure(target: TGLenum; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4dARB = procedure(target: TGLenum; s: TGLdouble; t: TGLdouble; r: TGLdouble; q: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4dvARB = procedure(target: TGLenum; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4fARB = procedure(target: TGLenum; s: TGLfloat; t: TGLfloat; r: TGLfloat; q: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4fvARB = procedure(target: TGLenum; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4iARB = procedure(target: TGLenum; s: TGLint; t: TGLint; r: TGLint; q: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4ivARB = procedure(target: TGLenum; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4sARB = procedure(target: TGLenum; s: TGLshort; t: TGLshort; r: TGLshort; q: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4svARB = procedure(target: TGLenum; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_point_parameters + TglPointParameterfARB = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPointParameterfvARB = procedure(pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_texture_compression + TglCompressedTexImage3DARB = procedure(target: TGLenum; level: TGLint; internalformat: TGLenum; width: TGLsizei; height: TGLsizei; depth: TGLsizei; border: TGLint; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexImage2DARB = procedure(target: TGLenum; level: TGLint; internalformat: TGLenum; width: TGLsizei; height: TGLsizei; border: TGLint; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexImage1DARB = procedure(target: TGLenum; level: TGLint; internalformat: TGLenum; width: TGLsizei; border: TGLint; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexSubImage3DARB = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; zoffset: TGLint; width: TGLsizei; height: TGLsizei; depth: TGLsizei; format: TGLenum; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexSubImage2DARB = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; width: TGLsizei; height: TGLsizei; format: TGLenum; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTexSubImage1DARB = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; width: TGLsizei; format: TGLenum; imageSize: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetCompressedTexImageARB = procedure(target: TGLenum; level: TGLint; img: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_transpose_matrix + TglLoadTransposeMatrixfARB = procedure(const m: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLoadTransposeMatrixdARB = procedure(const m: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultTransposeMatrixfARB = procedure(const m: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultTransposeMatrixdARB = procedure(const m: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_vertex_blend + TglWeightbvARB = procedure(size: TGLint; const weights: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWeightsvARB = procedure(size: TGLint; const weights: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWeightivARB = procedure(size: TGLint; const weights: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWeightfvARB = procedure(size: TGLint; const weights: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWeightdvARB = procedure(size: TGLint; const weights: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWeightubvARB = procedure(size: TGLint; const weights: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWeightusvARB = procedure(size: TGLint; const weights: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWeightuivARB = procedure(size: TGLint; const weights: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWeightPointerARB = procedure(size: TGLint; _type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexBlendARB = procedure(count: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_vertex_buffer_object + TglBindBufferARB = procedure(target: TGLenum; buffer: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteBuffersARB = procedure(n: TGLsizei; const buffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenBuffersARB = procedure(n: TGLsizei; buffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsBufferARB = function(buffer: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBufferDataARB = procedure(target: TGLenum; size: TGLsizei; const data: PGLvoid; usage: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBufferSubDataARB = procedure(target: TGLenum; offset: TGLsizei; size: TGLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetBufferSubDataARB = procedure(target: TGLenum; offset: TGLsizei; size: TGLsizei; data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapBufferARB = function(target: TGLenum; access: TGLenum): PGLvoid; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUnmapBufferARB = function(target: TGLenum): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetBufferParameterivARB = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetBufferPointervARB = procedure(target: TGLenum; pname: TGLenum; params: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_vertex_program + TglVertexAttrib1dARB = procedure(index: TGLuint; x: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1dvARB = procedure(index: TGLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1fARB = procedure(index: TGLuint; x: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1fvARB = procedure(index: TGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1sARB = procedure(index: TGLuint; x: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1svARB = procedure(index: TGLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2dARB = procedure(index: TGLuint; x: TGLdouble; y: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2dvARB = procedure(index: TGLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2fARB = procedure(index: TGLuint; x: TGLfloat; y: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2fvARB = procedure(index: TGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2sARB = procedure(index: TGLuint; x: TGLshort; y: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2svARB = procedure(index: TGLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3dARB = procedure(index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3dvARB = procedure(index: TGLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3fARB = procedure(index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3fvARB = procedure(index: TGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3sARB = procedure(index: TGLuint; x: TGLshort; y: TGLshort; z: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3svARB = procedure(index: TGLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4NbvARB = procedure(index: TGLuint; const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4NivARB = procedure(index: TGLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4NsvARB = procedure(index: TGLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4NubARB = procedure(index: TGLuint; x: TGLubyte; y: TGLubyte; z: TGLubyte; w: TGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4NubvARB = procedure(index: TGLuint; const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4NuivARB = procedure(index: TGLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4NusvARB = procedure(index: TGLuint; const v: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4bvARB = procedure(index: TGLuint; const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4dARB = procedure(index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4dvARB = procedure(index: TGLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4fARB = procedure(index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4fvARB = procedure(index: TGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4ivARB = procedure(index: TGLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4sARB = procedure(index: TGLuint; x: TGLshort; y: TGLshort; z: TGLshort; w: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4svARB = procedure(index: TGLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4ubvARB = procedure(index: TGLuint; const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4uivARB = procedure(index: TGLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4usvARB = procedure(index: TGLuint; const v: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribPointerARB = procedure(index: TGLuint; size: TGLint; _type: TGLenum; normalized: TGLboolean; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEnableVertexAttribArrayARB = procedure(index: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDisableVertexAttribArrayARB = procedure(index: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramStringARB = procedure(target: TGLenum; format: TGLenum; len: TGLsizei; const _string: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindProgramARB = procedure(target: TGLenum; _program: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteProgramsARB = procedure(n: TGLsizei; const programs: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenProgramsARB = procedure(n: TGLsizei; programs: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramEnvParameter4dARB = procedure(target: TGLenum; index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramEnvParameter4dvARB = procedure(target: TGLenum; index: TGLuint; const params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramEnvParameter4fARB = procedure(target: TGLenum; index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramEnvParameter4fvARB = procedure(target: TGLenum; index: TGLuint; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramLocalParameter4dARB = procedure(target: TGLenum; index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramLocalParameter4dvARB = procedure(target: TGLenum; index: TGLuint; const params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramLocalParameter4fARB = procedure(target: TGLenum; index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramLocalParameter4fvARB = procedure(target: TGLenum; index: TGLuint; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramEnvParameterdvARB = procedure(target: TGLenum; index: TGLuint; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramEnvParameterfvARB = procedure(target: TGLenum; index: TGLuint; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramLocalParameterdvARB = procedure(target: TGLenum; index: TGLuint; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramLocalParameterfvARB = procedure(target: TGLenum; index: TGLuint; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramivARB = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramStringARB = procedure(target: TGLenum; pname: TGLenum; _string: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribdvARB = procedure(index: TGLuint; pname: TGLenum; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribfvARB = procedure(index: TGLuint; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribivARB = procedure(index: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribPointervARB = procedure(index: TGLuint; pname: TGLenum; _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsProgramARB = function(_program: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_window_pos + TglWindowPos2dARB = procedure(x: TGLdouble; y: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2dvARB = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2fARB = procedure(x: TGLfloat; y: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2fvARB = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2iARB = procedure(x: TGLint; y: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2ivARB = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2sARB = procedure(x: TGLshort; y: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2svARB = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3dARB = procedure(x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3dvARB = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3fARB = procedure(x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3fvARB = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3iARB = procedure(x: TGLint; y: TGLint; z: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3ivARB = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3sARB = procedure(x: TGLshort; y: TGLshort; z: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3svARB = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_draw_buffers + TglDrawBuffersARB = procedure(n: TGLsizei; bufs: PGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_color_buffer_float + TglClampColorARB = procedure(target: TGLenum; clamp: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_vertex_shader + TglGetActiveAttribARB = procedure(programobj: GLhandleARB; index: GLuint; maxLength: GLsizei; var length: GLsizei; var size: GLint; var _type: GLenum; name: PGLcharARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetAttribLocationARB = function(programObj: GLhandleARB; const char: PGLcharARB): glint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindAttribLocationARB = procedure(programObj: GLhandleARB; index: GLuint; const name: PGLcharARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_shader_objects + TglDeleteObjectARB = procedure(Obj: GLHandleARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetHandleARB = function(pname: GlEnum): GLHandleARB; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDetachObjectARB = procedure(container, attached: GLHandleARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCreateShaderObjectARB = function(shaderType: glenum): GLHandleARB; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglShaderSourceARB = procedure(shaderObj: GLHandleARB; count: glsizei; _string: PPGLCharARB; lengths: pglint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompileShaderARB = procedure(shaderObj: GLHandleARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCreateProgramObjectARB = function: GLHandleARB; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglAttachObjectARB = procedure(programObj, shaderObj: GLhandleARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLinkProgramARB = procedure(programObj: GLHandleARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUseProgramObjectARB = procedure(programObj: GLHandleARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglValidateProgramARB = procedure(programObj: GLhandleARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1fARB = procedure(location: glint; v0: glfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2fARB = procedure(location: glint; v0, v1: glfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3fARB = procedure(location: glint; v0, v1, v2: glfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4fARB = procedure(location: glint; v0, v1, v2, v3: glfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1iARB = procedure(location: glint; v0: glint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2iARB = procedure(location: glint; v0, v1: glint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3iARB = procedure(location: glint; v0, v1, v2: glint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4iARB = procedure(location: glint; v0, v1, v2, v3: glint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1fvARB = procedure(location: glint; count: GLsizei; value: pglfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2fvARB = procedure(location: glint; count: GLsizei; value: pglfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3fvARB = procedure(location: glint; count: GLsizei; value: pglfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4fvARB = procedure(location: glint; count: GLsizei; value: pglfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1ivARB = procedure(location: glint; count: GLsizei; value: pglint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2ivARB = procedure(location: glint; count: GLsizei; value: pglint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3ivARB = procedure(location: glint; count: GLsizei; value: pglint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4ivARB = procedure(location: glint; count: GLsizei; value: pglint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix2fvARB = procedure(location: glint; count: glsizei; transpose: glboolean; value: pglfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix3fvARB = procedure(location: glint; count: glsizei; transpose: glboolean; value: pglfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformMatrix4fvARB = procedure(location: glint; count: glsizei; transpose: glboolean; value: pglfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetObjectParameterfvARB = procedure(Obj: GLHandleARB; pname: GLEnum; params: PGLFloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetObjectParameterivARB = procedure(Obj: GLHandleARB; pname: GLEnum; params: PGLInt); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetInfoLogARB = procedure(shaderObj: GLHandleARB; maxLength: glsizei; var length: glint; infoLog: PGLcharARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetAttachedObjectsARB = procedure(programobj: GLhandleARB; maxCount: GLsizei; var count: GLsizei; objects: PGLhandleARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformLocationARB = function(programObj: GLhandleARB; const char: PGLcharARB): glint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetActiveUniformARB = procedure(programobj: GLhandleARB; index: GLuint; maxLength: GLsizei; var length: GLsizei; var size: GLint; var _type: GLenum; name: PGLcharARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformfvARB = procedure(programObj: GLhandleARB; location: GLint; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformivARB = procedure(programObj: GLhandleARB; location: GLint; params: PGLInt); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetShaderSourceARB = procedure(shader: GLhandleARB; maxLength: GLsizei; var length: GLsizei; source: PGLcharARB); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_Occlusion_Query + TglGenQueriesARB = procedure(n: GLsizei; ids: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteQueriesARB = procedure(n: GLsizei; const ids: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsQueryARB = function(id: GLuint): boolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBeginQueryARB = procedure(target: GLenum; id: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndQueryARB = procedure(target: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetQueryivARB = procedure(target, pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetQueryObjectivARB = procedure(id: GLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetQueryObjectuivARB = procedure(id: GLuint; pname: GLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_draw_instanced + TglDrawArraysInstancedARB = procedure(mode: GLenum; first: GLint; count: GLsizei; primcount: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawElementsInstancedARB = procedure(mode: GLenum; count: GLsizei; type_: GLenum; const indices: PGLvoid; primcount: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_framebuffer_object + TglIsRenderbuffer = function(renderbuffer: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindRenderbuffer = procedure(target: GLenum; renderbuffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteRenderbuffers = procedure(n: GLsizei; const renderbuffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenRenderbuffers = procedure(n: GLsizei; renderbuffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRenderbufferStorage = procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetRenderbufferParameteriv = procedure(target: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsFramebuffer = function(framebuffer: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindFramebuffer = procedure(target: GLenum; framebuffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteFramebuffers = procedure(n: GLsizei; const framebuffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenFramebuffers = procedure(n: GLsizei; framebuffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCheckFramebufferStatus = function(target: GLenum): GLenum; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTexture1D = procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTexture2D = procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTexture3D = procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint; zoffset: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferRenderbuffer = procedure(target: GLenum; attachment: GLenum; renderbuffertarget: GLenum; renderbuffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFramebufferAttachmentParameteriv = procedure(target: GLenum; attachment: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenerateMipmap = procedure(target: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBlitFramebuffer = procedure(srcX0: GLint; srcY0: GLint; srcX1: GLint; srcY1: GLint; dstX0: GLint; dstY0: GLint; dstX1: GLint; dstY1: GLint; mask: GLbitfield; filter: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRenderbufferStorageMultisample = procedure(target: GLenum; samples: GLsizei; internalformat: GLenum; width: GLsizei; height: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTextureLayer = procedure(target: GLenum; attachment: GLenum; texture: GLuint; level: GLint; layer: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_geometry_shader4 + TglProgramParameteriARB = procedure(program_: GLuint; pname: GLenum; value: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTextureARB = procedure(target: GLenum; attachment: GLenum; texture: GLuint; level: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTextureLayerARB = procedure(target: GLenum; attachment: GLenum; texture: GLuint; level: GLint; layer: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTextureFaceARB = procedure(target: GLenum; attachment: GLenum; texture: GLuint; level: GLint; face: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_instanced_arrays + TglVertexAttribDivisorARB = procedure(index_: GLuint; divisor: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_map_buffer_range + TglMapBufferRange = function(target: GLenum; offset: GLsizei; length: GLsizei; access: GLbitfield): PGLvoid; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFlushMappedBufferRange = procedure(target: GLenum; offset: GLsizei; length: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_texture_buffer_object + TglTexBufferARB = procedure(target: GLenum; internalformat: GLenum; buffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_vertex_array_object + TglBindVertexArray = procedure(array_: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteVertexArrays = procedure(n: GLsizei; const arrays: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenVertexArrays = procedure(n: GLsizei; arrays: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsVertexArray = function(array_: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_uniform_buffer_object + TglGetUniformIndices = procedure(program_: GLuint; uniformCount: GLsizei; const uniformNames: PPGLchar; uniformIndices: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetActiveUniformsiv = procedure(program_: GLuint; uniformCount: GLsizei; const uniformIndices: PGLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetActiveUniformName = procedure(program_: GLuint; uniformIndex: GLuint; bufSize: GLsizei; length: PGLsizei; uniformName: PGLchar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformBlockIndex = function(program_: GLuint; const uniformBlockName: PGLchar): GLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetActiveUniformBlockiv = procedure(program_: GLuint; uniformBlockIndex: GLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetActiveUniformBlockName = procedure(program_: GLuint; uniformBlockIndex: GLuint; bufSize: GLsizei; length: PGLsizei; uniformBlockName: PGLchar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniformBlockBinding = procedure(program_: GLuint; uniformBlockIndex: GLuint; uniformBlockBinding: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_copy_buffer + TglCopyBufferSubData = procedure(readTarget: GLenum; writeTarget: GLenum; readOffset: GLint; writeOffset: GLint; size: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_draw_elements_base_vertex + TglDrawElementsBaseVertex = procedure(mode: GLenum; count: GLsizei; type_: GLenum; const indices: PGLvoid; basevertex: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawRangeElementsBaseVertex = procedure(mode: GLenum; start: GLuint; end_: GLuint; count: GLsizei; type_: GLenum; const indices: PGLvoid; basevertex: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawElementsInstancedBaseVertex = procedure(mode: GLenum; count: GLsizei; type_: GLenum; const indices: PGLvoid; primcount: GLsizei; basevertex: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiDrawElementsBaseVertex = procedure(mode: GLenum; const count: PGLsizei; type_: GLenum; const indices: PPGLvoid; primcount: GLsizei; const basevertex: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_provoking_vertex + TglProvokingVertex = procedure(mode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_sync + TglFenceSync = function(condition: GLenum; flags: GLbitfield): GLsync; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsSync = function(sync: GLsync): GLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteSync = procedure(sync: GLsync); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClientWaitSync = function(sync: GLsync; flags: GLbitfield; timeout: GLuint64): GLenum; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWaitSync = procedure(sync: GLsync; flags: GLbitfield; timeout: GLuint64); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetInteger64v = procedure(pname: GLenum; params: PGLint64); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetSynciv = procedure(sync: GLsync; pname: GLenum; butSize: GLsizei; length: PGLsizei; values: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_texture_multisample + TglTexImage2DMultisample = procedure(target: GLenum; samples: GLsizei; internalformat: GLint; width: GLsizei; height: GLsizei; fixedsamplelocations: GLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexImage3DMultisample = procedure(target: GLenum; samples: GLsizei; internalformat: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; fixedsamplelocations: GLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultisamplefv = procedure(pname: GLenum; index_: GLuint; val: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSampleMaski = procedure(index_: GLuint; mask: GLbitfield); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_draw_buffers_blend + TglBlendEquationi = procedure(buf: GLuint; mode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBlendEquationSeparatei = procedure(buf: GLuint; modeRGB: GLenum; modeAlpha: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBlendFunci = procedure(buf: GLuint; src: GLenum; dst: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBlendFuncSeparatei = procedure(buf: GLuint; srcRGB: GLenum; dstRGB: GLenum; srcAlpha: GLenum; dstAlpha: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ARB_sample_shading + TglMinSampleShading = procedure(value: GLclampf); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ATI_draw_buffers + TglDrawBuffersATI = procedure(n: TGLsizei; const bufs: PGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ATI_element_array + TglElementPointerATI = procedure(_type: TGLenum; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawElementArrayATI = procedure(mode: TGLenum; count: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawRangeElementArrayATI = procedure(mode: TGLenum; start: TGLuint; _end: TGLuint; count: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ATI_envmap_bumpmap + TglTexBumpParameterivATI = procedure(pname: TGLenum; const param: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexBumpParameterfvATI = procedure(pname: TGLenum; const param: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexBumpParameterivATI = procedure(pname: TGLenum; param: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexBumpParameterfvATI = procedure(pname: TGLenum; param: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ATI_fragment_shader + TglGenFragmentShadersATI = function(range: TGLuint): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindFragmentShaderATI = procedure(id: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteFragmentShaderATI = procedure(id: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBeginFragmentShaderATI = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndFragmentShaderATI = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPassTexCoordATI = procedure(dst: TGLuint; coord: TGLuint; swizzle: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSampleMapATI = procedure(dst: TGLuint; interp: TGLuint; swizzle: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorFragmentOp1ATI = procedure(op: TGLenum; dst: TGLuint; dstMask: TGLuint; dstMod: TGLuint; arg1: TGLuint; arg1Rep: TGLuint; arg1Mod: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorFragmentOp2ATI = procedure(op: TGLenum; dst: TGLuint; dstMask: TGLuint; dstMod: TGLuint; arg1: TGLuint; arg1Rep: TGLuint; arg1Mod: TGLuint; arg2: TGLuint; arg2Rep: TGLuint; arg2Mod: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorFragmentOp3ATI = procedure(op: TGLenum; dst: TGLuint; dstMask: TGLuint; dstMod: TGLuint; arg1: TGLuint; arg1Rep: TGLuint; arg1Mod: TGLuint; arg2: TGLuint; arg2Rep: TGLuint; arg2Mod: TGLuint; arg3: TGLuint; arg3Rep: TGLuint; arg3Mod: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglAlphaFragmentOp1ATI = procedure(op: TGLenum; dst: TGLuint; dstMod: TGLuint; arg1: TGLuint; arg1Rep: TGLuint; arg1Mod: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglAlphaFragmentOp2ATI = procedure(op: TGLenum; dst: TGLuint; dstMod: TGLuint; arg1: TGLuint; arg1Rep: TGLuint; arg1Mod: TGLuint; arg2: TGLuint; arg2Rep: TGLuint; arg2Mod: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglAlphaFragmentOp3ATI = procedure(op: TGLenum; dst: TGLuint; dstMod: TGLuint; arg1: TGLuint; arg1Rep: TGLuint; arg1Mod: TGLuint; arg2: TGLuint; arg2Rep: TGLuint; arg2Mod: TGLuint; arg3: TGLuint; arg3Rep: TGLuint; arg3Mod: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSetFragmentShaderConstantATI = procedure(dst: TGLuint; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ATI_map_object_buffer + TglMapObjectBufferATI = function(buffer: TGLuint): PGLvoid; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUnmapObjectBufferATI = procedure(buffer: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ATI_pn_triangles + TglPNTrianglesiATI = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPNTrianglesfATI = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ATI_separate_stencil + TglStencilOpSeparateATI = procedure(face: TGLenum; sfail: TGLenum; dpfail: TGLenum; dppass: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglStencilFuncSeparateATI = procedure(frontfunc: TGLenum; backfunc: TGLenum; ref: TGLint; mask: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ATI_vertex_array_object + TglNewObjectBufferATI = function(size: TGLsizei; const _pointer: PGLvoid; usage: TGLenum): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsObjectBufferATI = function(buffer: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUpdateObjectBufferATI = procedure(buffer: TGLuint; offset: TGLuint; size: TGLsizei; const _pointer: PGLvoid; preserve: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetObjectBufferfvATI = procedure(buffer: TGLuint; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetObjectBufferivATI = procedure(buffer: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFreeObjectBufferATI = procedure(buffer: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglArrayObjectATI = procedure(_array: TGLenum; size: TGLint; _type: TGLenum; stride: TGLsizei; buffer: TGLuint; offset: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetArrayObjectfvATI = procedure(_array: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetArrayObjectivATI = procedure(_array: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVariantArrayObjectATI = procedure(id: TGLuint; _type: TGLenum; stride: TGLsizei; buffer: TGLuint; offset: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVariantArrayObjectfvATI = procedure(id: TGLuint; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVariantArrayObjectivATI = procedure(id: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ATI_vertex_attrib_array_object + TglVertexAttribArrayObjectATI = procedure(index: TGLuint; size: TGLint; _type: TGLenum; normalized: TGLboolean; stride: TGLsizei; buffer: TGLuint; offset: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribArrayObjectfvATI = procedure(index: TGLuint; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribArrayObjectivATI = procedure(index: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_ATI_vertex_streams + TglVertexStream1sATI = procedure(stream: TGLenum; x: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream1svATI = procedure(stream: TGLenum; const coords: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream1iATI = procedure(stream: TGLenum; x: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream1ivATI = procedure(stream: TGLenum; const coords: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream1fATI = procedure(stream: TGLenum; x: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream1fvATI = procedure(stream: TGLenum; const coords: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream1dATI = procedure(stream: TGLenum; x: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream1dvATI = procedure(stream: TGLenum; const coords: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream2sATI = procedure(stream: TGLenum; x: TGLshort; y: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream2svATI = procedure(stream: TGLenum; const coords: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream2iATI = procedure(stream: TGLenum; x: TGLint; y: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream2ivATI = procedure(stream: TGLenum; const coords: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream2fATI = procedure(stream: TGLenum; x: TGLfloat; y: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream2fvATI = procedure(stream: TGLenum; const coords: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream2dATI = procedure(stream: TGLenum; x: TGLdouble; y: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream2dvATI = procedure(stream: TGLenum; const coords: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream3sATI = procedure(stream: TGLenum; x: TGLshort; y: TGLshort; z: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream3svATI = procedure(stream: TGLenum; const coords: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream3iATI = procedure(stream: TGLenum; x: TGLint; y: TGLint; z: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream3ivATI = procedure(stream: TGLenum; const coords: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream3fATI = procedure(stream: TGLenum; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream3fvATI = procedure(stream: TGLenum; const coords: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream3dATI = procedure(stream: TGLenum; x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream3dvATI = procedure(stream: TGLenum; const coords: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream4sATI = procedure(stream: TGLenum; x: TGLshort; y: TGLshort; z: TGLshort; w: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream4svATI = procedure(stream: TGLenum; const coords: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream4iATI = procedure(stream: TGLenum; x: TGLint; y: TGLint; z: TGLint; w: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream4ivATI = procedure(stream: TGLenum; const coords: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream4fATI = procedure(stream: TGLenum; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream4fvATI = procedure(stream: TGLenum; const coords: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream4dATI = procedure(stream: TGLenum; x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexStream4dvATI = procedure(stream: TGLenum; const coords: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalStream3bATI = procedure(stream: TGLenum; nx: TGLbyte; ny: TGLbyte; nz: TGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalStream3bvATI = procedure(stream: TGLenum; const coords: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalStream3sATI = procedure(stream: TGLenum; nx: TGLshort; ny: TGLshort; nz: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalStream3svATI = procedure(stream: TGLenum; const coords: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalStream3iATI = procedure(stream: TGLenum; nx: TGLint; ny: TGLint; nz: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalStream3ivATI = procedure(stream: TGLenum; const coords: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalStream3fATI = procedure(stream: TGLenum; nx: TGLfloat; ny: TGLfloat; nz: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalStream3fvATI = procedure(stream: TGLenum; const coords: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalStream3dATI = procedure(stream: TGLenum; nx: TGLdouble; ny: TGLdouble; nz: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalStream3dvATI = procedure(stream: TGLenum; const coords: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClientActiveVertexStreamATI = procedure(stream: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexBlendEnviATI = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexBlendEnvfATI = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_AMD_performance_monitor + TglGetPerfMonitorGroupsAMD = procedure(numGroups: PGLint; groupsSize: GLsizei; groups: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPerfMonitorCountersAMD = procedure(group: GLuint; numCounters: PGLint; maxActiveCouters: PGLint; counterSize: GLsizei; counters: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPerfMonitorGroupStringAMD = procedure(group: GLuint; bufSize: GLsizei; length: PGLsizei; groupString: PGLchar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPerfMonitorCounterStringAMD = procedure(group: GLuint; counter: GLuint; bufSize: GLsizei; length: PGLsizei; counterString: PGLchar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPerfMonitorCounterInfoAMD = procedure(group: GLuint; counter: GLuint; pname: GLenum; data: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenPerfMonitorsAMD = procedure(n: GLsizei; monitors: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeletePerfMonitorsAMD = procedure(n: GLsizei; monitors: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSelectPerfMonitorCountersAMD = procedure(monitor: GLuint; enable: GLboolean; group: GLuint; numCounters: GLint; counterList: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBeginPerfMonitorAMD = procedure(monitor: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndPerfMonitorAMD = procedure(monitor: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPerfMonitorCounterDataAMD = procedure(monitor: GLuint; pname: GLenum; dataSize: GLsizei; data: PGLuint; bytesWritten: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_AMD_vertex_shader_tesselator + TglTessellationFactorAMD = procedure(factor: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTessellationModeAMD = procedure(mode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + + // GL_EXT_blend_color + TglBlendColorEXT = procedure(red: TGLclampf; green: TGLclampf; blue: TGLclampf; alpha: TGLclampf); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_blend_func_separate + TglBlendFuncSeparateEXT = procedure(sfactorRGB: TGLenum; dfactorRGB: TGLenum; sfactorAlpha: TGLenum; dfactorAlpha: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_blend_minmax + TglBlendEquationEXT = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_color_subtable + TglColorSubTableEXT = procedure(target: TGLenum; start: TGLsizei; count: TGLsizei; format: TGLenum; _type: TGLenum; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyColorSubTableEXT = procedure(target: TGLenum; start: TGLsizei; x: TGLint; y: TGLint; width: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_compiled_vertex_array + TglLockArraysEXT = procedure(first: TGLint; count: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUnlockArraysEXT = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_convolution + TglConvolutionFilter1DEXT = procedure(target: TGLenum; internalformat: TGLenum; width: TGLsizei; format: TGLenum; _type: TGLenum; const image: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionFilter2DEXT = procedure(target: TGLenum; internalformat: TGLenum; width: TGLsizei; height: TGLsizei; format: TGLenum; _type: TGLenum; const image: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionParameterfEXT = procedure(target: TGLenum; pname: TGLenum; params: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionParameterfvEXT = procedure(target: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionParameteriEXT = procedure(target: TGLenum; pname: TGLenum; params: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglConvolutionParameterivEXT = procedure(target: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyConvolutionFilter1DEXT = procedure(target: TGLenum; internalformat: TGLenum; x: TGLint; y: TGLint; width: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyConvolutionFilter2DEXT = procedure(target: TGLenum; internalformat: TGLenum; x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetConvolutionFilterEXT = procedure(target: TGLenum; format: TGLenum; _type: TGLenum; image: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetConvolutionParameterfvEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetConvolutionParameterivEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetSeparableFilterEXT = procedure(target: TGLenum; format: TGLenum; _type: TGLenum; row: PGLvoid; column: PGLvoid; span: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSeparableFilter2DEXT = procedure(target: TGLenum; internalformat: TGLenum; width: TGLsizei; height: TGLsizei; format: TGLenum; _type: TGLenum; const row: PGLvoid; const column: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_coordinate_frame + TglTangent3bEXT = procedure(tx: TGLbyte; ty: TGLbyte; tz: TGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTangent3bvEXT = procedure(const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTangent3dEXT = procedure(tx: TGLdouble; ty: TGLdouble; tz: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTangent3dvEXT = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTangent3fEXT = procedure(tx: TGLfloat; ty: TGLfloat; tz: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTangent3fvEXT = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTangent3iEXT = procedure(tx: TGLint; ty: TGLint; tz: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTangent3ivEXT = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTangent3sEXT = procedure(tx: TGLshort; ty: TGLshort; tz: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTangent3svEXT = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormal3bEXT = procedure(bx: TGLbyte; by: TGLbyte; bz: TGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormal3bvEXT = procedure(const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormal3dEXT = procedure(bx: TGLdouble; by: TGLdouble; bz: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormal3dvEXT = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormal3fEXT = procedure(bx: TGLfloat; by: TGLfloat; bz: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormal3fvEXT = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormal3iEXT = procedure(bx: TGLint; by: TGLint; bz: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormal3ivEXT = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormal3sEXT = procedure(bx: TGLshort; by: TGLshort; bz: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormal3svEXT = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTangentPointerEXT = procedure(_type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBinormalPointerEXT = procedure(_type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_copy_texture + TglCopyTexImage1DEXT = procedure(target: TGLenum; level: TGLint; internalformat: TGLenum; x: TGLint; y: TGLint; width: TGLsizei; border: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTexImage2DEXT = procedure(target: TGLenum; level: TGLint; internalformat: TGLenum; x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei; border: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTexSubImage1DEXT = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; x: TGLint; y: TGLint; width: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTexSubImage2DEXT = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTexSubImage3DEXT = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; zoffset: TGLint; x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_cull_vertex + TglCullParameterdvEXT = procedure(pname: TGLenum; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCullParameterfvEXT = procedure(pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_draw_range_elements + TglDrawRangeElementsEXT = procedure(mode: TGLenum; start: TGLuint; _end: TGLuint; count: TGLsizei; _type: TGLenum; const indices: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_fog_coord + TglFogCoordfEXT = procedure(coord: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoordfvEXT = procedure(const coord: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoorddEXT = procedure(coord: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoorddvEXT = procedure(const coord: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoordPointerEXT = procedure(_type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_framebuffer_object + TglIsRenderbufferEXT = function(renderbuffer: TGLuint): Boolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindRenderbufferEXT = procedure(target: TGLenum; renderbuffer: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteRenderbuffersEXT = procedure(n: TGLsizei; const renderbuffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenRenderbuffersEXT = procedure(n: TGLsizei; renderbuffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRenderbufferStorageEXT = procedure(target: TGLenum; internalformat: TGLenum; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetRenderbufferParameterivEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsFramebufferEXT = function(framebuffer: TGLuint): Boolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindFramebufferEXT = procedure(target: TGLenum; framebuffer: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteFramebuffersEXT = procedure(n: TGLsizei; const framebuffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenFramebuffersEXT = procedure(n: TGLsizei; framebuffers: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCheckFramebufferStatusEXT = function(target: TGLenum): TGLenum; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTexture1DEXT = procedure(target: TGLenum; attachment: TGLenum; textarget: TGLenum; texture: TGLuint; level: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTexture2DEXT = procedure(target: TGLenum; attachment: TGLenum; textarget: TGLenum; texture: TGLuint; level: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTexture3DEXT = procedure(target: TGLenum; attachment: TGLenum; textarget: TGLenum; texture: TGLuint; level: TGLint; zoffset: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferRenderbufferEXT = procedure(target: TGLenum; attachment: TGLenum; renderbuffertarget: TGLenum; renderbuffer: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFramebufferAttachmentParameterivEXT = procedure(target: TGLenum; attachment: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenerateMipmapEXT = procedure(target: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_histogram + TglGetHistogramEXT = procedure(target: TGLenum; reset: TGLboolean; format: TGLenum; _type: TGLenum; values: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetHistogramParameterfvEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetHistogramParameterivEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMinmaxEXT = procedure(target: TGLenum; reset: TGLboolean; format: TGLenum; _type: TGLenum; values: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMinmaxParameterfvEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMinmaxParameterivEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglHistogramEXT = procedure(target: TGLenum; width: TGLsizei; internalformat: TGLenum; sink: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMinmaxEXT = procedure(target: TGLenum; internalformat: TGLenum; sink: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglResetHistogramEXT = procedure(target: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglResetMinmaxEXT = procedure(target: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_index_func + TglIndexFuncEXT = procedure(func: TGLenum; ref: TGLclampf); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_index_material + TglIndexMaterialEXT = procedure(face: TGLenum; mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_light_texture + TglApplyTextureEXT = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureLightEXT = procedure(pname: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureMaterialEXT = procedure(face: TGLenum; mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_multi_draw_arrays + TglMultiDrawArraysEXT = procedure(mode: TGLenum; first: PGLint; count: PGLsizei; primcount: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiDrawElementsEXT = procedure(mode: TGLenum; const count: PGLsizei; _type: TGLenum; const indices: PGLvoid; primcount: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_multisample + TglSampleMaskEXT = procedure(value: TGLclampf; invert: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSamplePatternEXT = procedure(pattern: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_paletted_texture + TglColorTableEXT = procedure(target: TGLenum; internalFormat: TGLenum; width: TGLsizei; format: TGLenum; _type: TGLenum; const table: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetColorTableEXT = procedure(target: TGLenum; format: TGLenum; _type: TGLenum; data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetColorTableParameterivEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetColorTableParameterfvEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_pixel_transform + TglPixelTransformParameteriEXT = procedure(target: TGLenum; pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelTransformParameterfEXT = procedure(target: TGLenum; pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelTransformParameterivEXT = procedure(target: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelTransformParameterfvEXT = procedure(target: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_point_parameters + TglPointParameterfEXT = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPointParameterfvEXT = procedure(pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_polygon_offset + TglPolygonOffsetEXT = procedure(factor: TGLfloat; bias: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_secondary_color + TglSecondaryColor3bEXT = procedure(red: TGLbyte; green: TGLbyte; blue: TGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3bvEXT = procedure(const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3dEXT = procedure(red: TGLdouble; green: TGLdouble; blue: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3dvEXT = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3fEXT = procedure(red: TGLfloat; green: TGLfloat; blue: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3fvEXT = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3iEXT = procedure(red: TGLint; green: TGLint; blue: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3ivEXT = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3sEXT = procedure(red: TGLshort; green: TGLshort; blue: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3svEXT = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3ubEXT = procedure(red: TGLubyte; green: TGLubyte; blue: TGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3ubvEXT = procedure(const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3uiEXT = procedure(red: TGLuint; green: TGLuint; blue: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3uivEXT = procedure(const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3usEXT = procedure(red: TGLushort; green: TGLushort; blue: TGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3usvEXT = procedure(const v: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColorPointerEXT = procedure(size: TGLint; _type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_stencil_two_side + TglActiveStencilFaceEXT = procedure(face: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_subtexture + TglTexSubImage1DEXT = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; width: TGLsizei; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexSubImage2DEXT = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; width: TGLsizei; height: TGLsizei; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_texture3D + TglTexImage3DEXT = procedure(target: TGLenum; level: TGLint; internalformat: TGLenum; width: TGLsizei; height: TGLsizei; depth: TGLsizei; border: TGLint; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexSubImage3DEXT = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; zoffset: TGLint; width: TGLsizei; height: TGLsizei; depth: TGLsizei; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_texture_object + TglAreTexturesResidentEXT = function(n: TGLsizei; const textures: PGLuint; residences: PGLboolean): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindTextureEXT = procedure(target: TGLenum; texture: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteTexturesEXT = procedure(n: TGLsizei; const textures: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenTexturesEXT = procedure(n: TGLsizei; textures: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsTextureEXT = function(texture: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPrioritizeTexturesEXT = procedure(n: TGLsizei; const textures: PGLuint; const priorities: PGLclampf); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_texture_perturb_normal + TglTextureNormalEXT = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_vertex_array + TglArrayElementEXT = procedure(i: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorPointerEXT = procedure(size: TGLint; _type: TGLenum; stride: TGLsizei; count: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawArraysEXT = procedure(mode: TGLenum; first: TGLint; count: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEdgeFlagPointerEXT = procedure(stride: TGLsizei; count: TGLsizei; const _pointer: PGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPointervEXT = procedure(pname: TGLenum; params: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexPointerEXT = procedure(_type: TGLenum; stride: TGLsizei; count: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalPointerEXT = procedure(_type: TGLenum; stride: TGLsizei; count: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoordPointerEXT = procedure(size: TGLint; _type: TGLenum; stride: TGLsizei; count: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexPointerEXT = procedure(size: TGLint; _type: TGLenum; stride: TGLsizei; count: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_vertex_shader + TglBeginVertexShaderEXT = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndVertexShaderEXT = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindVertexShaderEXT = procedure(id: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenVertexShadersEXT = function(range: TGLuint): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteVertexShaderEXT = procedure(id: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglShaderOp1EXT = procedure(op: TGLenum; res: TGLuint; arg1: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglShaderOp2EXT = procedure(op: TGLenum; res: TGLuint; arg1: TGLuint; arg2: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglShaderOp3EXT = procedure(op: TGLenum; res: TGLuint; arg1: TGLuint; arg2: TGLuint; arg3: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSwizzleEXT = procedure(res: TGLuint; _in: TGLuint; outX: TGLenum; outY: TGLenum; outZ: TGLenum; outW: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWriteMaskEXT = procedure(res: TGLuint; _in: TGLuint; outX: TGLenum; outY: TGLenum; outZ: TGLenum; outW: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglInsertComponentEXT = procedure(res: TGLuint; src: TGLuint; num: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglExtractComponentEXT = procedure(res: TGLuint; src: TGLuint; num: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenSymbolsEXT = function(datatype: TGLenum; storagetype: TGLenum; range: TGLenum; components: TGLuint): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSetInvariantEXT = procedure(id: TGLuint; _type: TGLenum; const addr: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSetLocalConstantEXT = procedure(id: TGLuint; _type: TGLenum; const addr: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVariantbvEXT = procedure(id: TGLuint; const addr: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVariantsvEXT = procedure(id: TGLuint; const addr: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVariantivEXT = procedure(id: TGLuint; const addr: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVariantfvEXT = procedure(id: TGLuint; const addr: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVariantdvEXT = procedure(id: TGLuint; const addr: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVariantubvEXT = procedure(id: TGLuint; const addr: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVariantusvEXT = procedure(id: TGLuint; const addr: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVariantuivEXT = procedure(id: TGLuint; const addr: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVariantPointerEXT = procedure(id: TGLuint; _type: TGLenum; stride: TGLuint; const addr: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEnableVariantClientStateEXT = procedure(id: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDisableVariantClientStateEXT = procedure(id: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindLightParameterEXT = function(light: TGLenum; value: TGLenum): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindMaterialParameterEXT = function(face: TGLenum; value: TGLenum): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindTexGenParameterEXT = function(_unit: TGLenum; coord: TGLenum; value: TGLenum): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindTextureUnitParameterEXT = function(_unit: TGLenum; value: TGLenum): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindParameterEXT = function(value: TGLenum): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsVariantEnabledEXT = function(id: TGLuint; cap: TGLenum): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVariantBooleanvEXT = procedure(id: TGLuint; value: TGLenum; data: PGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVariantIntegervEXT = procedure(id: TGLuint; value: TGLenum; data: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVariantFloatvEXT = procedure(id: TGLuint; value: TGLenum; data: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVariantPointervEXT = procedure(id: TGLuint; value: TGLenum; data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetInvariantBooleanvEXT = procedure(id: TGLuint; value: TGLenum; data: PGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetInvariantIntegervEXT = procedure(id: TGLuint; value: TGLenum; data: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetInvariantFloatvEXT = procedure(id: TGLuint; value: TGLenum; data: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetLocalConstantBooleanvEXT = procedure(id: TGLuint; value: TGLenum; data: PGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetLocalConstantIntegervEXT = procedure(id: TGLuint; value: TGLenum; data: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetLocalConstantFloatvEXT = procedure(id: TGLuint; value: TGLenum; data: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_vertex_weighting + TglVertexWeightfEXT = procedure(weight: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexWeightfvEXT = procedure(const weight: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexWeightPointerEXT = procedure(size: TGLsizei; _type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_stencil_clear_tag + TglStencilClearTagEXT = procedure(stencilTagBits: TGLsizei; stencilClearTag: Tgluint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_framebuffer_blit + TglBlitFramebufferEXT = procedure(srcX0: TGLint; srcY0: TGLint; srcX1: TGLint; srcY1: TGLint; dstX0: TGLint; dstY0: TGLint; dstX1: TGLint; dstY1: TGLint; mask: TGLbitfield; filter: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_framebuffer_multisample + TglRenderbufferStorageMultisampleEXT = procedure(target: TGLenum; samples: TGLsizei; internalformat: TGLenum; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_timer_query + TglGetQueryObjecti64vEXT = procedure(id: TGLuint; pname: TGLenum; params: PGLint64EXT); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetQueryObjectui64vEXT = procedure(id: TGLuint; pname: TGLenum; params: PGLuint64EXT); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_gpu_program_parameters + TglProgramEnvParameters4fvEXT = procedure(target: TGLenum; index: TGLuint; count: TGLsizei; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramLocalParameters4fvEXT = procedure(target: TGLenum; index: TGLuint; count: TGLsizei; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_bindable_uniform + TglUniformBufferEXT = procedure(_program: TGLuint; location: TGLint; buffer: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformBufferSizeEXT = function(_program: TGLuint; location: TGLint): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformOffsetEXT = function(_program: TGLuint; location: TGLint): PGLInt; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_draw_buffers2 + TglColorMaskIndexedEXT = procedure(buf: TGLuint; r: TGLboolean; g: TGLboolean; b: TGLboolean; a: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetBooleanIndexedvEXT = procedure(value: TGLenum; index: TGLuint; data: PGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetIntegerIndexedvEXT = procedure(value: TGLenum; index: TGLuint; data: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEnableIndexedEXT = procedure(target: TGLenum; index: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDisableIndexedEXT = procedure(target: TGLenum; index: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsEnabledIndexedEXT = function(target: TGLenum; index: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_draw_instanced + TglDrawArraysInstancedEXT = procedure(mode: TGLenum; first: TGLint; count: TGLsizei; primcount: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawElementsInstancedEXT = procedure(mode: TGLenum; count: TGLsizei; _type: TGLenum; const indices: Pointer; primcount: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_geometry_shader4 + TglProgramParameteriEXT = procedure (_program: TGLuint; pname: TGLenum; value: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTextureEXT = procedure(target: TGLenum; attachment: TGLenum; texture: TGLuint; level: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} +// TglFramebufferTextureLayerEXT = procedure(target: TGLenum; attachment: TGLenum; texture: TGLuint; level: TGLint; layer: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferTextureFaceEXT = procedure(target: TGLenum; attachment: TGLenum; texture: TGLuint; level: TGLint; face: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_gpu_shader4 + TglVertexAttribI1iEXT = procedure(index: TGLuint; x: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI2iEXT = procedure(index: TGLuint; x: TGLint; y: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI3iEXT = procedure(index: TGLuint; x: TGLint; y: TGLint; z: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4iEXT = procedure(index: TGLuint; x: TGLint; y: TGLint; z: TGLint; w: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI1uiEXT = procedure(index: TGLuint; x: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI2uiEXT = procedure(index: TGLuint; x: TGLuint; y: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI3uiEXT = procedure(index: TGLuint; x: TGLuint; y: TGLuint; z: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4uiEXT = procedure(index: TGLuint; x: TGLuint; y: TGLuint; z: TGLuint; w: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI1ivEXT = procedure(index: TGLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI2ivEXT = procedure(index: TGLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI3ivEXT = procedure(index: TGLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4ivEXT = procedure(index: TGLuint; const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI1uivEXT = procedure(index: TGLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI2uivEXT = procedure(index: TGLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI3uivEXT = procedure(index: TGLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4uivEXT = procedure(index: TGLuint; const v: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4bvEXT = procedure(index: TGLuint; const v: PGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4svEXT = procedure(index: TGLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4ubvEXT = procedure(index: TGLuint; const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribI4usvEXT = procedure(index: TGLuint; const v: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribIPointerEXT = procedure(index: TGLuint; size: TGLint; _type: TGLenum; stride: TGLsizei; const _pointer: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribIivEXT = procedure(index: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribIuivEXT = procedure(index: TGLuint; pname: TGLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1uiEXT = procedure(location: TGLint; v0: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2uiEXT = procedure(location: TGLint; v0: TGLuint; v1: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3uiEXT = procedure(location: TGLint; v0: TGLuint; v1: TGLuint; v2: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4uiEXT = procedure(location: TGLint; v0: TGLuint; v1: TGLuint; v2: TGLuint; v3: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform1uivEXT = procedure(location: TGLint; count: TGLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform2uivEXT = procedure(location: TGLint; count: TGLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform3uivEXT = procedure(location: TGLint; count: TGLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUniform4uivEXT = procedure(location: TGLint; count: TGLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetUniformuivEXT = procedure(_program: TGLuint; location: TGLint; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindFragDataLocationEXT = procedure(_program: TGLuint; colorNumber: TGLuint; const name: PGLchar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFragDataLocationEXT = function(_program: TGLuint; const name: PGLchar): TGLint; + + // GL_EXT_texture_array + TglFramebufferTextureLayerEXT = procedure(target: TGLenum; attachment: TGLenum; texture: TGLuint; level: TGLint; layer: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_texture_buffer_object + TglTexBufferEXT = procedure(target: TGLenum; internalformat: TGLenum; buffer: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_texture_integer + TglClearColorIiEXT = procedure(r: TGLint; g: TGLint; b: TGLint; a: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearColorIuiEXT = procedure(r: TGLuint; g: TGLuint; b: TGLuint; a: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexParameterIivEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexParameterIuivEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexParameterIivEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTexParameterIiuvEXT = procedure(target: TGLenum; pname: TGLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_HP_image_transform + TglImageTransformParameteriHP = procedure(target: TGLenum; pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglImageTransformParameterfHP = procedure(target: TGLenum; pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglImageTransformParameterivHP = procedure(target: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglImageTransformParameterfvHP = procedure(target: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetImageTransformParameterivHP = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetImageTransformParameterfvHP = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_depth_bounds_test + TglDepthBoundsEXT = procedure(zmin: TGLclampd; zmax: TGLclampd); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_blend_equation_separate + TglBlendEquationSeparateEXT = procedure(modeRGB: TGLenum; modeAlpha: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_transform_feedback + TglBeginTransformFeedbackEXT = procedure(primitiveMode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndTransformFeedbackEXT = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindBufferRangeEXT = procedure(target: GLenum; index_: GLuint; buffer: GLuint; offset: GLsizei; size: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindBufferOffsetEXT = procedure(target: GLenum; index_: GLuint; buffer: GLuint; offset: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindBufferBaseEXT = procedure(target: GLenum; index_: GLuint; buffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTransformFeedbackVaryingsEXT = procedure(program_: GLuint; count: GLsizei; const locations: PGLint; bufferMode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTransformFeedbackVaryingEXT = procedure(program_: GLuint; index_: GLuint; location: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_EXT_direct_state_access + TglClientAttribDefaultEXT = procedure(mask: GLbitfield); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPushClientAttribDefaultEXT = procedure(mask: GLbitfield); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixLoadfEXT = procedure(mode: GLenum; const m: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixLoaddEXT = procedure(mode: GLenum; const m: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixMultfEXT = procedure(mode: GLenum; const m: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixMultdEXT = procedure(mode: GLenum; const m: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixLoadIdentityEXT = procedure(mode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixRotatefEXT = procedure(mode: GLenum; angle: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixRotatedEXT = procedure(mode: GLenum; angle: GLdouble; x: GLdouble; y: GLdouble; z: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixScalefEXT = procedure(mode: GLenum; x: GLfloat; y: GLfloat; z: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixScaledEXT = procedure(mode: GLenum; x: GLdouble; y: GLdouble; z: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixTranslatefEXT = procedure(mode: GLenum; x: GLfloat; y: GLfloat; z: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixTranslatedEXT = procedure(mode: GLenum; x: GLdouble; y: GLdouble; z: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixFrustumEXT = procedure(mode: GLenum; left: GLdouble; right: GLdouble; bottom: GLdouble; top: GLdouble; zNear: GLdouble; zFar: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixOrthoEXT = procedure(mode: GLenum; left: GLdouble; right: GLdouble; bottom: GLdouble; top: GLdouble; zNear: GLdouble; zFar: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixPopEXT = procedure(mode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixPushEXT = procedure(mode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixLoadTransposefEXT = procedure(mode: GLenum; const m: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixLoadTransposedEXT = procedure(mode: GLenum; const m: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixMultTransposefEXT = procedure(mode: GLenum; const m: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMatrixMultTransposedEXT = procedure(mode: GLenum; const m: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureParameterfEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; param: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureParameterfvEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureParameteriEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; param: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureParameterivEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureImage1DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; border: GLint; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureImage2DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; border: GLint; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureSubImage1DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureSubImage2DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTextureImage1DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; border: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTextureImage2DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; height: GLsizei; border: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTextureSubImage1DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; xoffset: GLint; x: GLint; y: GLint; width: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTextureSubImage2DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTextureImageEXT = procedure(texture: GLuint; target: GLenum; level: GLint; format: GLenum; type_: GLenum; pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTextureParameterfvEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTextureParameterivEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTextureLevelParameterfvEXT = procedure(texture: GLuint; target: GLenum; level: GLint; pname: GLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTextureLevelParameterivEXT = procedure(texture: GLuint; target: GLenum; level: GLint; pname: GLenum; params: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureImage3DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureSubImage3DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyTextureSubImage3DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexParameterfEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; param: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexParameterfvEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexParameteriEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; param: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexParameterivEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexImage1DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; border: GLint; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexImage2DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; border: GLint; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexSubImage1DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexSubImage2DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyMultiTexImage1DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; border: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyMultiTexImage2DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; height: GLsizei; border: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyMultiTexSubImage1DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; xoffset: GLint; x: GLint; y: GLint; width: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyMultiTexSubImage2DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexImageEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; format: GLenum; type_: GLenum; pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexParameterfvEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexParameterivEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexLevelParameterfvEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; pname: GLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexLevelParameterivEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexImage3DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; format: GLenum; type_: GLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexSubImage3DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; type_: GLenum; const pixels:PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyMultiTexSubImage3DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindMultiTextureEXT = procedure(texunit: GLenum; target: GLenum; texture: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEnableClientStateIndexedEXT = procedure(array_: GLenum; index_: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDisableClientStateIndexedEXT = procedure(array_: GLenum; index_: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoordPointerEXT = procedure(texunit: GLenum; size: GLint; type_: GLenum; stride: GLsizei; const pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexEnvfEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; param: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexEnvfvEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexEnviEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; param: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexEnvivEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexGendEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; param: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexGendvEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; const params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexGenfEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; param: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexGenfvEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexGeniEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; param: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexGenivEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexEnvfvEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexEnvivEXT = procedure(texunit: GLenum; target: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexGendvEXT = procedure(texunit: GLenum; coord: GLenum; pname: GLenum; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexGenfvEXT = procedure(texunit: GLenum; coord: GLenum; pname: GLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexGenivEXT = procedure(texunit: GLenum; coord: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFloatIndexedvEXT = procedure(target: GLenum; index_: GLuint; data: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetDoubleIndexedvEXT = procedure(target: GLenum; index_: GLuint; data: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPointerIndexedvEXT = procedure(target: GLenum; index_: GLuint; data: PPGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTextureImage3DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTextureImage2DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; border: GLint; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTextureImage1DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; border: GLint; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTextureSubImage3DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTextureSubImage2DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedTextureSubImage1DEXT = procedure(texture: GLuint; target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetCompressedTextureImageEXT = procedure(texture: GLuint; target: GLenum; lod: GLint; img: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedMultiTexImage3DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedMultiTexImage2DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; border: GLint; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedMultiTexImage1DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; border: GLint; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedMultiTexSubImage3DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedMultiTexSubImage2DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCompressedMultiTexSubImage1DEXT = procedure(texunit: GLenum; target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; imageSize: GLsizei; const bits: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetCompressedMultiTexImageEXT = procedure(texunit: GLenum; target: GLenum; lod: GLint; img: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramStringEXT = procedure(program_: GLuint; target: GLenum; format: GLenum; len: GLsizei; const string_: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParameter4dEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParameter4dvEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; const params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParameter4fEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParameter4fvEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedProgramLocalParameterdvEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedProgramLocalParameterfvEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedProgramivEXT = procedure(program_: GLuint; target: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedProgramStringEXT = procedure(program_: GLuint; target: GLenum; pname: GLenum; string_: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParameters4fvEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; count: GLsizei; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParameterI4iEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; x: GLint; y: GLint; z: GLint; w: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParameterI4ivEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParametersI4ivEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; count: GLsizei; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParameterI4uiEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; x: GLuint; y: GLuint; z: GLuint; w: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParameterI4uivEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; const params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedProgramLocalParametersI4uivEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; count: GLsizei; const params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedProgramLocalParameterIivEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedProgramLocalParameterIuivEXT = procedure(program_: GLuint; target: GLenum; index_: GLuint; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureParameterIivEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureParameterIuivEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; const params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTextureParameterIivEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTextureParameterIuivEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexParameterIivEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexParameterIuivEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; const params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexParameterIivEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMultiTexParameterIuivEXT = procedure(texture: GLuint; target: GLenum; pname: GLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform1fEXT = procedure(program_: GLuint; location: GLint; v0: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform2fEXT = procedure(program_: GLuint; location: GLint; v0: GLfloat; v1: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform3fEXT = procedure(program_: GLuint; location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform4fEXT = procedure(program_: GLuint; location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat; v3: GLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform1iEXT = procedure(program_: GLuint; location: GLint; v0: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform2iEXT = procedure(program_: GLuint; location: GLint; v0: GLint; v1: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform3iEXT = procedure(program_: GLuint; location: GLint; v0: GLint; v1: GLint; v2: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform4iEXT = procedure(program_: GLuint; location: GLint; v0: GLint; v1: GLint; v2: GLint; v3: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform1fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform2fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform3fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform4fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform1ivEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform2ivEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform3ivEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform4ivEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniformMatrix2fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniformMatrix3fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniformMatrix4fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniformMatrix2x3fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniformMatrix3x2fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniformMatrix2x4fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniformMatrix4x2fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniformMatrix3x4fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniformMatrix4x3fvEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform1uiEXT = procedure(program_: GLuint; location: GLint; v0: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform2uiEXT = procedure(program_: GLuint; location: GLint; v0: GLuint; v1: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform3uiEXT = procedure(program_: GLuint; location: GLint; v0: GLuint; v1: GLuint; v2: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform4uiEXT = procedure(program_: GLuint; location: GLint; v0: GLuint; v1: GLuint; v2: GLuint; v3: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform1uivEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform2uivEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform3uivEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramUniform4uivEXT = procedure(program_: GLuint; location: GLint; count: GLsizei; const value: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedBufferDataEXT = procedure(buffer: GLuint; size: GLsizei; const data: PGLvoid; usage: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedBufferSubDataEXT = procedure(buffer: GLuint; offset: GLsizei; size: GLsizei; const data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapNamedBufferEXT = function(buffer: GLuint; access: GLenum): PGLvoid; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglUnmapNamedBufferEXT = function(buffer: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedBufferParameterivEXT = procedure(buffer: GLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedBufferPointervEXT = procedure(buffer: GLuint; pname: GLenum; params: PPGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedBufferSubDataEXT = procedure(buffer: GLuint; offset: GLsizei; size: GLsizei; data: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureBufferEXT = procedure(texture: GLuint; target: GLenum; internalformat: GLenum; buffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexBufferEXT = procedure(texunit: GLenum; target: GLenum; interformat: GLenum; buffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedRenderbufferStorageEXT = procedure(renderbuffer: GLuint; interformat: GLenum; width: GLsizei; height: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedRenderbufferParameterivEXT = procedure(renderbuffer: GLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCheckNamedFramebufferStatusEXT = function(framebuffer: GLuint; target: GLenum): GLenum; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedFramebufferTexture1DEXT = procedure(framebuffer: GLuint; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedFramebufferTexture2DEXT = procedure(framebuffer: GLuint; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedFramebufferTexture3DEXT = procedure(framebuffer: GLuint; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint; zoffset: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedFramebufferRenderbufferEXT = procedure(framebuffer: GLuint; attachment: GLenum; renderbuffertarget: GLenum; renderbuffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetNamedFramebufferAttachmentParameterivEXT = procedure(framebuffer: GLuint; attachment: GLenum; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenerateTextureMipmapEXT = procedure(texture: GLuint; target: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenerateMultiTexMipmapEXT = procedure(texunit: GLenum; target: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferDrawBufferEXT = procedure(framebuffer: GLuint; mode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferDrawBuffersEXT = procedure(framebuffer: GLuint; n: GLsizei; const bufs: PGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFramebufferReadBufferEXT = procedure(framebuffer: GLuint; mode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFramebufferParameterivEXT = procedure(framebuffer: GLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedRenderbufferStorageMultisampleEXT = procedure(renderbuffer: GLuint; samples: GLsizei; internalformat: GLenum; width: GLsizei; height: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedRenderbufferStorageMultisampleCoverageEXT = procedure(renderbuffer: GLuint; coverageSamples: GLsizei; colorSamples: GLsizei; internalformat: GLenum; width: GLsizei; height: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedFramebufferTextureEXT = procedure(framebuffer: GLuint; attachment: GLenum; texture: GLuint; level: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedFramebufferTextureLayerEXT = procedure(framebuffer: GLuint; attachment: GLenum; texture: GLuint; level: GLint; layer: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNamedFramebufferTextureFaceEXT = procedure(framebuffer: GLuint; attachment: GLenum; texture: GLuint; level: GLint; face: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTextureRenderbufferEXT = procedure(texture: GLuint; target: GLenum; renderbuffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexRenderbufferEXT = procedure(texunit: GLenum; target: GLenum; renderbuffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_IBM_multimode_draw_arrays + TglMultiModeDrawArraysIBM = procedure(mode: TGLenum; const first: PGLint; const count: PGLsizei; primcount: TGLsizei; modestride: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiModeDrawElementsIBM = procedure(const mode: PGLenum; const count: PGLsizei; _type: TGLenum; const indices: PGLvoid; primcount: TGLsizei; modestride: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_IBM_vertex_array_lists + TglColorPointerListIBM = procedure(size: TGLint; _type: TGLenum; stride: TGLint; const _pointer: PGLvoid; ptrstride: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColorPointerListIBM = procedure(size: TGLint; _type: TGLenum; stride: TGLint; const _pointer: PGLvoid; ptrstride: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEdgeFlagPointerListIBM = procedure(stride: TGLint; const _pointer: PGLboolean; ptrstride: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoordPointerListIBM = procedure(_type: TGLenum; stride: TGLint; const _pointer: PGLvoid; ptrstride: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIndexPointerListIBM = procedure(_type: TGLenum; stride: TGLint; const _pointer: PGLvoid; ptrstride: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalPointerListIBM = procedure(_type: TGLenum; stride: TGLint; const _pointer: PGLvoid; ptrstride: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoordPointerListIBM = procedure(size: TGLint; _type: TGLenum; stride: TGLint; const _pointer: PGLvoid; ptrstride: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexPointerListIBM = procedure(size: TGLint; _type: TGLenum; stride: TGLint; const _pointer: PGLvoid; ptrstride: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_INGR_blend_func_separate + TglBlendFuncSeparateINGR = procedure(sfactorRGB: TGLenum; dfactorRGB: TGLenum; sfactorAlpha: TGLenum; dfactorAlpha: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_INTEL_parallel_arrays + TglVertexPointervINTEL = procedure(size: TGLint; _type: TGLenum; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormalPointervINTEL = procedure(_type: TGLenum; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorPointervINTEL = procedure(size: TGLint; _type: TGLenum; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoordPointervINTEL = procedure(size: TGLint; _type: TGLenum; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_MESA_resize_buffers + TglResizeBuffersMESA = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_MESA_window_pos + TglWindowPos2dMESA = procedure(x: TGLdouble; y: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2dvMESA = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2fMESA = procedure(x: TGLfloat; y: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2fvMESA = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2iMESA = procedure(x: TGLint; y: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2ivMESA = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2sMESA = procedure(x: TGLshort; y: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos2svMESA = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3dMESA = procedure(x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3dvMESA = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3fMESA = procedure(x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3fvMESA = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3iMESA = procedure(x: TGLint; y: TGLint; z: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3ivMESA = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3sMESA = procedure(x: TGLshort; y: TGLshort; z: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos3svMESA = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos4dMESA = procedure(x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos4dvMESA = procedure(const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos4fMESA = procedure(x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos4fvMESA = procedure(const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos4iMESA = procedure(x: TGLint; y: TGLint; z: TGLint; w: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos4ivMESA = procedure(const v: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos4sMESA = procedure(x: TGLshort; y: TGLshort; z: TGLshort; w: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglWindowPos4svMESA = procedure(const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_evaluators + TglMapControlPointsNV = procedure(target: TGLenum; index: TGLuint; _type: TGLenum; ustride: TGLsizei; vstride: TGLsizei; uorder: TGLint; vorder: TGLint; _packed: TGLboolean; const points: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapParameterivNV = procedure(target: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMapParameterfvNV = procedure(target: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMapControlPointsNV = procedure(target: TGLenum; index: TGLuint; _type: TGLenum; ustride: TGLsizei; vstride: TGLsizei; _packed: TGLboolean; points: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMapParameterivNV = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMapParameterfvNV = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMapAttribParameterivNV = procedure(target: TGLenum; index: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetMapAttribParameterfvNV = procedure(target: TGLenum; index: TGLuint; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEvalMapsNV = procedure(target: TGLenum; mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_fence + TglDeleteFencesNV = procedure(n: TGLsizei; const fences: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenFencesNV = procedure(n: TGLsizei; fences: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsFenceNV = function(fence: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTestFenceNV = function(fence: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFenceivNV = procedure(fence: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFinishFenceNV = procedure(fence: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSetFenceNV = procedure(fence: TGLuint; condition: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_fragment_program + TglProgramNamedParameter4fNV = procedure(id: TGLuint; len: TGLsizei; const name: PGLubyte; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramNamedParameter4dNV = procedure(id: TGLuint; len: TGLsizei; const name: PGLubyte; x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramNamedParameter4fvNV = procedure(id: TGLuint; len: TGLsizei; const name: PGLubyte; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramNamedParameter4dvNV = procedure(id: TGLuint; len: TGLsizei; const name: PGLubyte; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramNamedParameterfvNV = procedure(id: TGLuint; len: TGLsizei; const name: PGLubyte; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramNamedParameterdvNV = procedure(id: TGLuint; len: TGLsizei; const name: PGLubyte; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_half_float + TglVertex2hNV = procedure(x: TGLhalfNV; y: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex2hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex3hNV = procedure(x: TGLhalfNV; y: TGLhalfNV; z: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex3hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex4hNV = procedure(x: TGLhalfNV; y: TGLhalfNV; z: TGLhalfNV; w: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertex4hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3hNV = procedure(nx: TGLhalfNV; ny: TGLhalfNV; nz: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3hNV = procedure(red: TGLhalfNV; green: TGLhalfNV; blue: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4hNV = procedure(red: TGLhalfNV; green: TGLhalfNV; blue: TGLhalfNV; alpha: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord1hNV = procedure(s: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord1hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2hNV = procedure(s: TGLhalfNV; t: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord3hNV = procedure(s: TGLhalfNV; t: TGLhalfNV; r: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord3hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4hNV = procedure(s: TGLhalfNV; t: TGLhalfNV; r: TGLhalfNV; q: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1hNV = procedure(target: TGLenum; s: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord1hvNV = procedure(target: TGLenum; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2hNV = procedure(target: TGLenum; s: TGLhalfNV; t: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord2hvNV = procedure(target: TGLenum; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3hNV = procedure(target: TGLenum; s: TGLhalfNV; t: TGLhalfNV; r: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord3hvNV = procedure(target: TGLenum; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4hNV = procedure(target: TGLenum; s: TGLhalfNV; t: TGLhalfNV; r: TGLhalfNV; q: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglMultiTexCoord4hvNV = procedure(target: TGLenum; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoordhNV = procedure(fog: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFogCoordhvNV = procedure(const fog: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3hNV = procedure(red: TGLhalfNV; green: TGLhalfNV; blue: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSecondaryColor3hvNV = procedure(const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexWeighthNV = procedure(weight: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexWeighthvNV = procedure(const weight: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1hNV = procedure(index: TGLuint; x: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1hvNV = procedure(index: TGLuint; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2hNV = procedure(index: TGLuint; x: TGLhalfNV; y: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2hvNV = procedure(index: TGLuint; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3hNV = procedure(index: TGLuint; x: TGLhalfNV; y: TGLhalfNV; z: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3hvNV = procedure(index: TGLuint; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4hNV = procedure(index: TGLuint; x: TGLhalfNV; y: TGLhalfNV; z: TGLhalfNV; w: TGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4hvNV = procedure(index: TGLuint; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs1hvNV = procedure(index: TGLuint; n: TGLsizei; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs2hvNV = procedure(index: TGLuint; n: TGLsizei; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs3hvNV = procedure(index: TGLuint; n: TGLsizei; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs4hvNV = procedure(index: TGLuint; n: TGLsizei; const v: PGLhalfNV); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_occlusion_query + TglGenOcclusionQueriesNV = procedure(n: TGLsizei; ids: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteOcclusionQueriesNV = procedure(n: TGLsizei; const ids: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsOcclusionQueryNV = function(id: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBeginOcclusionQueryNV = procedure(id: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndOcclusionQueryNV = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetOcclusionQueryivNV = procedure(id: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetOcclusionQueryuivNV = procedure(id: TGLuint; pname: TGLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_pixel_data_range + TglPixelDataRangeNV = procedure(target: TGLenum; length: TGLsizei; _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFlushPixelDataRangeNV = procedure(target: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_point_sprite + TglPointParameteriNV = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPointParameterivNV = procedure(pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_primitive_restart + TglPrimitiveRestartNV = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPrimitiveRestartIndexNV = procedure(index: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_register_combiners + TglCombinerParameterfvNV = procedure(pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCombinerParameterfNV = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCombinerParameterivNV = procedure(pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCombinerParameteriNV = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCombinerInputNV = procedure(stage: TGLenum; portion: TGLenum; variable: TGLenum; input: TGLenum; mapping: TGLenum; componentUsage: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCombinerOutputNV = procedure(stage: TGLenum; portion: TGLenum; abOutput: TGLenum; cdOutput: TGLenum; sumOutput: TGLenum; scale: TGLenum; bias: TGLenum; abDotProduct: TGLboolean; cdDotProduct: TGLboolean; muxSum: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFinalCombinerInputNV = procedure(variable: TGLenum; input: TGLenum; mapping: TGLenum; componentUsage: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetCombinerInputParameterfvNV = procedure(stage: TGLenum; portion: TGLenum; variable: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetCombinerInputParameterivNV = procedure(stage: TGLenum; portion: TGLenum; variable: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetCombinerOutputParameterfvNV = procedure(stage: TGLenum; portion: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetCombinerOutputParameterivNV = procedure(stage: TGLenum; portion: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFinalCombinerInputParameterfvNV = procedure(variable: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFinalCombinerInputParameterivNV = procedure(variable: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_register_combiners2 + TglCombinerStageParameterfvNV = procedure(stage: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetCombinerStageParameterfvNV = procedure(stage: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_vertex_array_range + TglFlushVertexArrayRangeNV = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexArrayRangeNV = procedure(length: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_vertex_program + TglAreProgramsResidentNV = function(n: TGLsizei; const programs: PGLuint; residences: PGLboolean): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindProgramNV = procedure(target: TGLenum; id: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteProgramsNV = procedure(n: TGLsizei; const programs: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglExecuteProgramNV = procedure(target: TGLenum; id: TGLuint; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenProgramsNV = procedure(n: TGLsizei; programs: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramParameterdvNV = procedure(target: TGLenum; index: TGLuint; pname: TGLenum; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramParameterfvNV = procedure(target: TGLenum; index: TGLuint; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramivNV = procedure(id: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramStringNV = procedure(id: TGLuint; pname: TGLenum; _program: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTrackMatrixivNV = procedure(target: TGLenum; address: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribdvNV = procedure(index: TGLuint; pname: TGLenum; params: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribfvNV = procedure(index: TGLuint; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribivNV = procedure(index: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVertexAttribPointervNV = procedure(index: TGLuint; pname: TGLenum; _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsProgramNV = function(id: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLoadProgramNV = procedure(target: TGLenum; id: TGLuint; len: TGLsizei; const _program: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramParameter4dNV = procedure(target: TGLenum; index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramParameter4dvNV = procedure(target: TGLenum; index: TGLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramParameter4fNV = procedure(target: TGLenum; index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramParameter4fvNV = procedure(target: TGLenum; index: TGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramParameters4dvNV = procedure(target: TGLenum; index: TGLuint; count: TGLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramParameters4fvNV = procedure(target: TGLenum; index: TGLuint; count: TGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglRequestResidentProgramsNV = procedure(n: TGLsizei; const programs: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTrackMatrixNV = procedure(target: TGLenum; address: TGLuint; matrix: TGLenum; transform: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribPointerNV = procedure(index: TGLuint; fsize: TGLint; _type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1dNV = procedure(index: TGLuint; x: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1dvNV = procedure(index: TGLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1fNV = procedure(index: TGLuint; x: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1fvNV = procedure(index: TGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1sNV = procedure(index: TGLuint; x: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib1svNV = procedure(index: TGLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2dNV = procedure(index: TGLuint; x: TGLdouble; y: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2dvNV = procedure(index: TGLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2fNV = procedure(index: TGLuint; x: TGLfloat; y: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2fvNV = procedure(index: TGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2sNV = procedure(index: TGLuint; x: TGLshort; y: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib2svNV = procedure(index: TGLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3dNV = procedure(index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3dvNV = procedure(index: TGLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3fNV = procedure(index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3fvNV = procedure(index: TGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3sNV = procedure(index: TGLuint; x: TGLshort; y: TGLshort; z: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib3svNV = procedure(index: TGLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4dNV = procedure(index: TGLuint; x: TGLdouble; y: TGLdouble; z: TGLdouble; w: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4dvNV = procedure(index: TGLuint; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4fNV = procedure(index: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4fvNV = procedure(index: TGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4sNV = procedure(index: TGLuint; x: TGLshort; y: TGLshort; z: TGLshort; w: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4svNV = procedure(index: TGLuint; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4ubNV = procedure(index: TGLuint; x: TGLubyte; y: TGLubyte; z: TGLubyte; w: TGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttrib4ubvNV = procedure(index: TGLuint; const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs1dvNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs1fvNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs1svNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs2dvNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs2fvNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs2svNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs3dvNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs3fvNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs3svNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs4dvNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs4fvNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs4svNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglVertexAttribs4ubvNV = procedure(index: TGLuint; count: TGLsizei; const v: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_depth_buffer_float + TglDepthRangedNV = procedure(n: TGLdouble; f: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglClearDepthdNV = procedure(d: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDepthBoundsdNV = procedure(zmin: TGLdouble; zmax: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_framebuffer_multisample_coverage + TglRenderbufferStorageMultsampleCoverageNV = procedure(target: TGLenum; coverageSamples: TGLsizei; colorSamples: TGLsizei; internalformat: TGLenum; width: TGLsizei; height: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_geometry_program4 + TglProgramVertexLimitNV = procedure(target: TGLenum; limit: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_gpu_program4 + TglProgramLocalParameterI4iNV = procedure(target: TGLenum; index: TGLuint; x: TGLint; y: TGLint; z: TGLint; w: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramLocalParameterI4ivNV = procedure(target: TGLenum; index: TGLuint; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramLocalParametersI4ivNV = procedure(target: TGLenum; index: TGLuint; count: TGLsizei; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramLocalParameterI4uiNV = procedure(target: TGLenum; index: TGLuint; x: TGLuint; y: TGLuint; z: TGLuint; w: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramLocalParameterI4uivNV = procedure(target: TGLenum; index: TGLuint; const params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramLocalParametersI4uivNV = procedure(target: TGLenum; index: TGLuint; count: TGLsizei; const params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramEnvParameterI4iNV = procedure(target: TGLenum; index: TGLuint; x: TGLint; y: TGLint; z: TGLint; w: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramEnvParameterI4ivNV = procedure(target: TGLenum; index: TGLuint; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramEnvParametersI4ivNV = procedure(target: TGLenum; index: TGLuint; count: TGLsizei; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramEnvParameterI4uiNV = procedure(target: TGLenum; index: TGLuint; x: TGLuint; y: TGLuint; z: TGLuint; w: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramEnvParameterI4uivNV = procedure(target: TGLenum; index: TGLuint; const params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramEnvParametersI4uivNV = procedure(target: TGLenum; index: TGLuint; count: TGLsizei; const params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramLocalParameterIivNV = procedure(target: TGLenum; index: TGLuint; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramLocalParameterIuivNV = procedure(target: TGLenum; index: TGLuint; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramEnvParameterIivNV = procedure(target: TGLenum; index: TGLuint; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetProgramEnvParameterIuivNV = procedure(target: TGLenum; index: TGLuint; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_parameter_buffer_object + TglProgramBufferParametersfvNV = procedure(target: TGLenum; buffer: TGLuint; index: TGLuint; count: TGLsizei; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramBufferParametersIivNV = procedure(target: TGLenum; buffer: TGLuint; index: TGLuint; count: TGLsizei; const params: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglProgramBufferParametersIuivNV = procedure(target: TGLenum; buffer: TGLuint; index: TGLuint; count: TGLuint; const params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_transform_feedback + TglBeginTransformFeedbackNV = procedure(primitiveMode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndTransformFeedbackNV = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTransformFeedbackAttribsNV = procedure(count: TGLsizei; const attribs: TGLint; bufferMode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindBufferRangeNV = procedure(target: GLenum; index: GLuint; buffer: GLuint; offset: GLint; size: GLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindBufferOffsetNV = procedure(target: GLenum; index: GLuint; buffer: GLuint; offset: GLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglBindBufferBaseNV = procedure(target: GLenum; index: GLuint; buffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTransformFeedbackVaryingsNV = procedure(program_: TGLuint; count: TGLsizei; const varyings: PPGLchar; bufferMode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglActiveVaryingNV = procedure(program_: TGLuint; const name: PGLchar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVaryingLocationNV = function(program_: TGLuint; const name: PGLchar): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetActiveVaryingNV = procedure(program_: TGLuint; index: TGLuint; bufSize: TGLsizei; length: PGLsizei; size: PGLsizei; _type: PGLenum; name: PGLchar); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetTransformFeedbackVaryingNV = procedure(program_: TGLuint; index: TGLuint; location: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_conditional_render + TglBeginConditionalRenderNV = procedure(id: GLuint; mode: GLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglEndConditionalRenderNV = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_present_video + TglPresentFrameKeyedNV = procedure(video_slot: GLuint; minPresentTime: GLuint64EXT; beginPresentTimeId: GLuint; presentDuratioId: GLuint; type_: GLenum; target0: GLenum; fill0: GLuint; key0: GLuint; target1: GLenum; fill1: GLuint; key1: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPresentFrameDualFillNV = procedure(video_slot: GLuint; minPresentTime: GLuint64EXT; beginPresentTimeId: GLuint; presentDurationId: GLuint; type_: GLenum; target0: GLenum; fill0: GLuint; target1: GLenum; fill1: GLuint; target2: GLenum; fill2: GLuint; target3: GLenum; fill3: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVideoivNV = procedure(video_slot: GLuint; pname: GLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVideouivNV = procedure(video_slot: GLuint; pname: GLenum; params: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVideoi64vNV = procedure(video_slot: GLuint; pname: GLenum; params: PGLint64EXT); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetVideoui64vNV = procedure(video_slot: GLuint; pname: GLenum; params: PGLuint64EXT); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} +// TglVideoParameterivNV = procedure(video_slot: GLuint; pname: GLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_explicit_multisample + TglGetMultisamplefvNV = procedure (pname: GLenum; index: GLuint; val: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSampleMaskIndexedNV = procedure (index: GLuint; mask: GLbitfield); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexRenderbufferNV = procedure (target: GLenum; renderbuffer: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_NV_transform_feedback2 + TglBindTransformFeedbackNV = procedure(target: GLenum; id: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteTransformFeedbacksNV = procedure(n: GLsizei; ids: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenTransformFeedbacksNV = procedure(n: GLsizei; ids: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsTransformFeedbackNV = function (id: GLuint): GLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPauseTransformFeedbackNV = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglResumeTransformFeedbackNV = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDrawTransformFeedbackNV = procedure(mode: GLenum; id: GLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_PGI_misc_hints + TglHintPGI = procedure(target: TGLenum; mode: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIS_detail_texture + TglDetailTexFuncSGIS = procedure(target: TGLenum; n: TGLsizei; const points: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetDetailTexFuncSGIS = procedure(target: TGLenum; points: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIS_fog_function + TglFogFuncSGIS = procedure(n: TGLsizei; const points: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFogFuncSGIS = procedure(points: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIS_multisample + TglSampleMaskSGIS = procedure(value: TGLclampf; invert: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSamplePatternSGIS = procedure(pattern: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIS_pixel_texture + TglPixelTexGenParameteriSGIS = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelTexGenParameterivSGIS = procedure(pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelTexGenParameterfSGIS = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPixelTexGenParameterfvSGIS = procedure(pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPixelTexGenParameterivSGIS = procedure(pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetPixelTexGenParameterfvSGIS = procedure(pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIS_point_parameters + TglPointParameterfSGIS = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPointParameterfvSGIS = procedure(pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIS_sharpen_texture + TglSharpenTexFuncSGIS = procedure(target: TGLenum; n: TGLsizei; const points: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetSharpenTexFuncSGIS = procedure(target: TGLenum; points: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIS_texture4D + TglTexImage4DSGIS = procedure(target: TGLenum; level: TGLint; internalformat: TGLenum; width: TGLsizei; height: TGLsizei; depth: TGLsizei; size4d: TGLsizei; border: TGLint; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexSubImage4DSGIS = procedure(target: TGLenum; level: TGLint; xoffset: TGLint; yoffset: TGLint; zoffset: TGLint; woffset: TGLint; width: TGLsizei; height: TGLsizei; depth: TGLsizei; size4d: TGLsizei; format: TGLenum; _type: TGLenum; const pixels: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIS_texture_color_mask + TglTextureColorMaskSGIS = procedure(red: TGLboolean; green: TGLboolean; blue: TGLboolean; alpha: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIS_texture_filter4 + TglGetTexFilterFuncSGIS = procedure(target: TGLenum; filter: TGLenum; weights: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexFilterFuncSGIS = procedure(target: TGLenum; filter: TGLenum; n: TGLsizei; const weights: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_async + TglAsyncMarkerSGIX = procedure(marker: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFinishAsyncSGIX = function(markerp: PGLuint): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPollAsyncSGIX = function(markerp: PGLuint): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGenAsyncMarkersSGIX = function(range: TGLsizei): TGLuint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeleteAsyncMarkersSGIX = procedure(marker: TGLuint; range: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglIsAsyncMarkerSGIX = function(marker: TGLuint): TGLboolean; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_flush_raster + TglFlushRasterSGIX = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_fragment_lighting + TglFragmentColorMaterialSGIX = procedure(face: TGLenum; mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentLightfSGIX = procedure(light: TGLenum; pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentLightfvSGIX = procedure(light: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentLightiSGIX = procedure(light: TGLenum; pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentLightivSGIX = procedure(light: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentLightModelfSGIX = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentLightModelfvSGIX = procedure(pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentLightModeliSGIX = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentLightModelivSGIX = procedure(pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentMaterialfSGIX = procedure(face: TGLenum; pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentMaterialfvSGIX = procedure(face: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentMaterialiSGIX = procedure(face: TGLenum; pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglFragmentMaterialivSGIX = procedure(face: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFragmentLightfvSGIX = procedure(light: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFragmentLightivSGIX = procedure(light: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFragmentMaterialfvSGIX = procedure(face: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetFragmentMaterialivSGIX = procedure(face: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLightEnviSGIX = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_framezoom + TglFrameZoomSGIX = procedure(factor: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_igloo_interface + TglIglooInterfaceSGIX = procedure(pname: TGLenum; const params: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_instruments + TglGetInstrumentsSGIX = function(): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglInstrumentsBufferSGIX = procedure(size: TGLsizei; buffer: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglPollInstrumentsSGIX = function(marker_p: PGLint): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReadInstrumentsSGIX = procedure(marker: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglStartInstrumentsSGIX = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglStopInstrumentsSGIX = procedure(marker: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_list_priority + TglGetListParameterfvSGIX = procedure(list: TGLuint; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetListParameterivSGIX = procedure(list: TGLuint; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglListParameterfSGIX = procedure(list: TGLuint; pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglListParameterfvSGIX = procedure(list: TGLuint; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglListParameteriSGIX = procedure(list: TGLuint; pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglListParameterivSGIX = procedure(list: TGLuint; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_pixel_texture + TglPixelTexGenSGIX = procedure(mode: TGLenum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_polynomial_ffd + TglDeformationMap3dSGIX = procedure(target: TGLenum; u1: TGLdouble; u2: TGLdouble; ustride: TGLint; uorder: TGLint; v1: TGLdouble; v2: TGLdouble; vstride: TGLint; vorder: TGLint; w1: TGLdouble; w2: TGLdouble; wstride: TGLint; worder: TGLint; const points: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeformationMap3fSGIX = procedure(target: TGLenum; u1: TGLfloat; u2: TGLfloat; ustride: TGLint; uorder: TGLint; v1: TGLfloat; v2: TGLfloat; vstride: TGLint; vorder: TGLint; w1: TGLfloat; w2: TGLfloat; wstride: TGLint; worder: TGLint; const points: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglDeformSGIX = procedure(mask: TGLbitfield); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglLoadIdentityDeformationMapSGIX = procedure(mask: TGLbitfield); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_reference_plane + TglReferencePlaneSGIX = procedure(const equation: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_sprite + TglSpriteParameterfSGIX = procedure(pname: TGLenum; param: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSpriteParameterfvSGIX = procedure(pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSpriteParameteriSGIX = procedure(pname: TGLenum; param: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglSpriteParameterivSGIX = procedure(pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGIX_tag_sample_buffer + TglTagSampleBufferSGIX = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SGI_color_table + TglColorTableSGI = procedure(target: TGLenum; internalformat: TGLenum; width: TGLsizei; format: TGLenum; _type: TGLenum; const table: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorTableParameterfvSGI = procedure(target: TGLenum; pname: TGLenum; const params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColorTableParameterivSGI = procedure(target: TGLenum; pname: TGLenum; const params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglCopyColorTableSGI = procedure(target: TGLenum; internalformat: TGLenum; x: TGLint; y: TGLint; width: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetColorTableSGI = procedure(target: TGLenum; format: TGLenum; _type: TGLenum; table: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetColorTableParameterfvSGI = procedure(target: TGLenum; pname: TGLenum; params: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGetColorTableParameterivSGI = procedure(target: TGLenum; pname: TGLenum; params: PGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SUNX_constant_data + TglFinishTextureSUNX = procedure(); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SUN_global_alpha + TglGlobalAlphaFactorbSUN = procedure(factor: TGLbyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGlobalAlphaFactorsSUN = procedure(factor: TGLshort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGlobalAlphaFactoriSUN = procedure(factor: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGlobalAlphaFactorfSUN = procedure(factor: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGlobalAlphaFactordSUN = procedure(factor: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGlobalAlphaFactorubSUN = procedure(factor: TGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGlobalAlphaFactorusSUN = procedure(factor: TGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglGlobalAlphaFactoruiSUN = procedure(factor: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SUN_mesh_array + TglDrawMeshArraysSUN = procedure(mode: TGLenum; first: TGLint; count: TGLsizei; width: TGLsizei); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SUN_triangle_list + TglReplacementCodeuiSUN = procedure(code: TGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeusSUN = procedure(code: TGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeubSUN = procedure(code: TGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuivSUN = procedure(const code: PGLuint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeusvSUN = procedure(const code: PGLushort); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeubvSUN = procedure(const code: PGLubyte); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodePointerSUN = procedure(_type: TGLenum; stride: TGLsizei; const _pointer: PGLvoid); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // GL_SUN_vertex + TglColor4ubVertex2fSUN = procedure(r: TGLubyte; g: TGLubyte; b: TGLubyte; a: TGLubyte; x: TGLfloat; y: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4ubVertex2fvSUN = procedure(const c: PGLubyte; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4ubVertex3fSUN = procedure(r: TGLubyte; g: TGLubyte; b: TGLubyte; a: TGLubyte; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4ubVertex3fvSUN = procedure(const c: PGLubyte; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3fVertex3fSUN = procedure(r: TGLfloat; g: TGLfloat; b: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor3fVertex3fvSUN = procedure(const c: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3fVertex3fSUN = procedure(nx: TGLfloat; ny: TGLfloat; nz: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglNormal3fVertex3fvSUN = procedure(const n: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4fNormal3fVertex3fSUN = procedure(r: TGLfloat; g: TGLfloat; b: TGLfloat; a: TGLfloat; nx: TGLfloat; ny: TGLfloat; nz: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglColor4fNormal3fVertex3fvSUN = procedure(const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fVertex3fSUN = procedure(s: TGLfloat; t: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fVertex3fvSUN = procedure(const tc: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4fVertex4fSUN = procedure(s: TGLfloat; t: TGLfloat; p: TGLfloat; q: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4fVertex4fvSUN = procedure(const tc: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fColor4ubVertex3fSUN = procedure(s: TGLfloat; t: TGLfloat; r: TGLubyte; g: TGLubyte; b: TGLubyte; a: TGLubyte; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fColor4ubVertex3fvSUN = procedure(const tc: PGLfloat; const c: PGLubyte; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fColor3fVertex3fSUN = procedure(s: TGLfloat; t: TGLfloat; r: TGLfloat; g: TGLfloat; b: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fColor3fVertex3fvSUN = procedure(const tc: PGLfloat; const c: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fNormal3fVertex3fSUN = procedure(s: TGLfloat; t: TGLfloat; nx: TGLfloat; ny: TGLfloat; nz: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fNormal3fVertex3fvSUN = procedure(const tc: PGLfloat; const n: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fColor4fNormal3fVertex3fSUN = procedure(s: TGLfloat; t: TGLfloat; r: TGLfloat; g: TGLfloat; b: TGLfloat; a: TGLfloat; nx: TGLfloat; ny: TGLfloat; nz: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord2fColor4fNormal3fVertex3fvSUN = procedure(const tc: PGLfloat; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4fColor4fNormal3fVertex4fSUN = procedure(s: TGLfloat; t: TGLfloat; p: TGLfloat; q: TGLfloat; r: TGLfloat; g: TGLfloat; b: TGLfloat; a: TGLfloat; nx: TGLfloat; ny: TGLfloat; nz: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat; w: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglTexCoord4fColor4fNormal3fVertex4fvSUN = procedure(const tc: PGLfloat; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiVertex3fSUN = procedure(rc: TGLuint; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiVertex3fvSUN = procedure(const rc: PGLuint; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiColor4ubVertex3fSUN = procedure(rc: TGLuint; r: TGLubyte; g: TGLubyte; b: TGLubyte; a: TGLubyte; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiColor4ubVertex3fvSUN = procedure(const rc: PGLuint; const c: PGLubyte; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiColor3fVertex3fSUN = procedure(rc: TGLuint; r: TGLfloat; g: TGLfloat; b: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiColor3fVertex3fvSUN = procedure(const rc: PGLuint; const c: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiNormal3fVertex3fSUN = procedure(rc: TGLuint; nx: TGLfloat; ny: TGLfloat; nz: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiNormal3fVertex3fvSUN = procedure(const rc: PGLuint; const n: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiColor4fNormal3fVertex3fSUN = procedure(rc: TGLuint; r: TGLfloat; g: TGLfloat; b: TGLfloat; a: TGLfloat; nx: TGLfloat; ny: TGLfloat; nz: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiColor4fNormal3fVertex3fvSUN = procedure(const rc: PGLuint; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiTexCoord2fVertex3fSUN = procedure(rc: TGLuint; s: TGLfloat; t: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiTexCoord2fVertex3fvSUN = procedure(const rc: PGLuint; const tc: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiTexCoord2fNormal3fVertex3fSUN = procedure(rc: TGLuint; s: TGLfloat; t: TGLfloat; nx: TGLfloat; ny: TGLfloat; nz: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN = procedure(const rc: PGLuint; const tc: PGLfloat; const n: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN = procedure(rc: TGLuint; s: TGLfloat; t: TGLfloat; r: TGLfloat; g: TGLfloat; b: TGLfloat; a: TGLfloat; nx: TGLfloat; ny: TGLfloat; nz: TGLfloat; x: TGLfloat; y: TGLfloat; z: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN = procedure(const rc: PGLuint; const tc: PGLfloat; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + + // window support functions +{$IFDEF DGL_WIN} + TwglGetProcAddress = function(ProcName: PAnsiChar): Pointer; stdcall; + TwglCopyContext = function(p1: HGLRC; p2: HGLRC; p3: Cardinal): BOOL; stdcall; + TwglCreateContext = function(DC: HDC): HGLRC; stdcall; + TwglCreateLayerContext = function(p1: HDC; p2: Integer): HGLRC; stdcall; + TwglDeleteContext = function(p1: HGLRC): BOOL; stdcall; + TwglDescribeLayerPlane = function(p1: HDC; p2, p3: Integer; p4: Cardinal; p5: PLayerPlaneDescriptor): BOOL; stdcall; + TwglGetCurrentContext = function: HGLRC; stdcall; + TwglGetCurrentDC = function: HDC; stdcall; + TwglGetLayerPaletteEntries = function(p1: HDC; p2, p3, p4: Integer; var pcr): Integer; stdcall; + TwglMakeCurrent = function(DC: HDC; p2: HGLRC): BOOL; stdcall; + TwglRealizeLayerPalette = function(p1: HDC; p2: Integer; p3: BOOL): BOOL; stdcall; + TwglSetLayerPaletteEntries = function(p1: HDC; p2, p3, p4: Integer; var pcr): Integer; stdcall; + TwglShareLists = function(p1, p2: HGLRC): BOOL; stdcall; + TwglSwapLayerBuffers = function(p1: HDC; p2: Cardinal): BOOL; stdcall; + TwglSwapMultipleBuffers = function(p1: UINT; const p2: PWGLSWAP): DWORD; stdcall; + TwglUseFontBitmapsA = function(DC: HDC; p2, p3, p4: DWORD): BOOL; stdcall; + TwglUseFontBitmapsW = function(DC: HDC; p2, p3, p4: DWORD): BOOL; stdcall; + TwglUseFontBitmaps = function(DC: HDC; p2, p3, p4: DWORD): BOOL; stdcall; + + TwglUseFontOutlinesA = function(p1: HDC; p2, p3, p4: DWORD; p5, p6: Single; p7: Integer; p8: PGlyphMetricsFloat): BOOL; stdcall; + TwglUseFontOutlinesW = function(p1: HDC; p2, p3, p4: DWORD; p5, p6: Single; p7: Integer; p8: PGlyphMetricsFloat): BOOL; stdcall; + TwglUseFontOutlines = function(p1: HDC; p2, p3, p4: DWORD; p5, p6: Single; p7: Integer; p8: PGlyphMetricsFloat): BOOL; stdcall; + + + // WGL_ARB_buffer_region + TwglCreateBufferRegionARB = function(hDC: HDC; iLayerPlane: TGLint; uType: TGLuint): THandle; stdcall; + TwglDeleteBufferRegionARB = procedure(hRegion: THandle); stdcall; + TwglSaveBufferRegionARB = function(hRegion: THandle; x: TGLint; y: TGLint; width: TGLint; height: TGLint): Boolean; stdcall; + TwglRestoreBufferRegionARB = function(hRegion: THandle; x: TGLint; y: TGLint; width: TGLint; height: TGLint; xSrc: TGLint; ySrc: TGLint): Boolean; stdcall; + + // WGL_ARB_extensions_string + TwglGetExtensionsStringARB = function(hdc: HDC): PAnsiChar; stdcall; + + // WGL_ARB_make_current_read + TwglMakeContextCurrentARB = function(hDrawDC: HDC; hReadDC: HDC; hglrc: HGLRC): Boolean; stdcall; + TwglGetCurrentReadDCARB = function(): HDC; stdcall; + + // WGL_ARB_pbuffer + TwglCreatePbufferARB = function(hDC: HDC; iPixelFormat: TGLint; iWidth: TGLint; iHeight: TGLint; const piAttribList: PGLint): HPBUFFERARB; stdcall; + TwglGetPbufferDCARB = function(hPbuffer: HPBUFFERARB): HDC; stdcall; + TwglReleasePbufferDCARB = function(hPbuffer: HPBUFFERARB; hDC: HDC): TGLint; stdcall; + TwglDestroyPbufferARB = function(hPbuffer: HPBUFFERARB): Boolean; stdcall; + TwglQueryPbufferARB = function(hPbuffer: HPBUFFERARB; iAttribute: TGLint; piValue: PGLint): Boolean; stdcall; + + // WGL_ARB_pixel_format + TwglGetPixelFormatAttribivARB = function(hdc: HDC; iPixelFormat: TGLint; iLayerPlane: TGLint; nAttributes: TGLuint; const piAttributes: PGLint; piValues: PGLint): Boolean; stdcall; + TwglGetPixelFormatAttribfvARB = function(hdc: HDC; iPixelFormat: TGLint; iLayerPlane: TGLint; nAttributes: TGLuint; const piAttributes: PGLint; pfValues: PGLfloat): Boolean; stdcall; + TwglChoosePixelFormatARB = function(hdc: HDC; const piAttribIList: PGLint; const pfAttribFList: PGLfloat; nMaxFormats: TGLuint; piFormats: PGLint; nNumFormats: PGLuint): BOOL; stdcall; + + // WGL_ARB_color_buffer_float + TwglClampColorARB = procedure(target: TGLenum; clamp: TGLenum); stdcall; + + // WGL_ARB_render_texture + TwglBindTexImageARB = function(hPbuffer: HPBUFFERARB; iBuffer: TGLint): Boolean; stdcall; + TwglReleaseTexImageARB = function(hPbuffer: HPBUFFERARB; iBuffer: TGLint): Boolean; stdcall; + TwglSetPbufferAttribARB = function(hPbuffer: HPBUFFERARB; const piAttribList: PGLint): Boolean; stdcall; + + // WGL_ARB_create_context + TwglCreateContextAttribsARB = function(hDC: HDC; hShareContext: HGLRC; const attribList: PGLint): HGLRC; stdcall; + + // WGL_AMD_gpu_association + TwglGetGPUIDsAMD = function(maxCount: Cardinal; ids: PCardinal): Cardinal; stdcall; + TwglGetGPUInfoAMD = function(id: Cardinal; property_: Integer; dataType: GLenum; size: Cardinal; data: Pointer): Integer; stdcall; + TwglGetContextGPUIDAMD = function(hglrc: HGLRC): Cardinal; stdcall; + TwglCreateAssociatedContextAMD = function(id: Cardinal): HGLRC; stdcall; + TwglCreateAssociatedContextAttribsAMD = function(id: Cardinal; hShareContext: HGLRC; const attribList: PInteger): HGLRC; stdcall; + TwglDeleteAssociatedContextAMD = function(hglrc: HGLRC): Boolean; stdcall; + TwglMakeAssociatedContextCurrentAMD = function(hglrc: HGLRC): Boolean; stdcall; + TwglGetCurrentAssociatedContextAMD = function(): HGLRC; stdcall; + TwglBlitContextFramebufferAMD = procedure(dstCtx: HGLRC; srcX0: GLint; srcY0: GLint; srcX1: GLint; srcY1: GLint; dstX0: GLint; dstY0: GLint; dstX1: GLint; dstY1: GLint; mask: GLbitfield; filter: GLenum); stdcall; + + // WGL_EXT_display_color_table + TwglCreateDisplayColorTableEXT = function(id: TGLushort): TGLboolean; stdcall; + TwglLoadDisplayColorTableEXT = function(const table: PGLushort; length: TGLuint): TGLboolean; stdcall; + TwglBindDisplayColorTableEXT = function(id: TGLushort): TGLboolean; stdcall; + TwglDestroyDisplayColorTableEXT = procedure(id: TGLushort); stdcall; + + // WGL_EXT_extensions_string + TwglGetExtensionsStringEXT = function(): PAnsiChar; stdcall; + + // WGL_EXT_make_current_read + TwglMakeContextCurrentEXT = function(hDrawDC: HDC; hReadDC: HDC; hglrc: HGLRC): Boolean; stdcall; + TwglGetCurrentReadDCEXT = function(): HDC; stdcall; + + // WGL_EXT_pbuffer + TwglCreatePbufferEXT = function(hDC: HDC; iPixelFormat: TGLint; iWidth: TGLint; iHeight: TGLint; const piAttribList: PGLint): HPBUFFEREXT; stdcall; + TwglGetPbufferDCEXT = function(hPbuffer: HPBUFFEREXT): HDC; stdcall; + TwglReleasePbufferDCEXT = function(hPbuffer: HPBUFFEREXT; hDC: HDC): TGLint; stdcall; + TwglDestroyPbufferEXT = function(hPbuffer: HPBUFFEREXT): Boolean; stdcall; + TwglQueryPbufferEXT = function(hPbuffer: HPBUFFEREXT; iAttribute: TGLint; piValue: PGLint): Boolean; stdcall; + + // WGL_EXT_pixel_format + TwglGetPixelFormatAttribivEXT = function(hdc: HDC; iPixelFormat: TGLint; iLayerPlane: TGLint; nAttributes: TGLuint; piAttributes: PGLint; piValues: PGLint): Boolean; stdcall; + TwglGetPixelFormatAttribfvEXT = function(hdc: HDC; iPixelFormat: TGLint; iLayerPlane: TGLint; nAttributes: TGLuint; piAttributes: PGLint; pfValues: PGLfloat): Boolean; stdcall; + TwglChoosePixelFormatEXT = function(hdc: HDC; const piAttribIList: PGLint; const pfAttribFList: PGLfloat; nMaxFormats: TGLuint; piFormats: PGLint; nNumFormats: PGLuint): Boolean; stdcall; + + // WGL_EXT_swap_control + TwglSwapIntervalEXT = function(interval: TGLint): Boolean; stdcall; + TwglGetSwapIntervalEXT = function(): TGLint; stdcall; + + // WGL_I3D_digital_video_control + TwglGetDigitalVideoParametersI3D = function(hDC: HDC; iAttribute: TGLint; piValue: PGLint): Boolean; stdcall; + TwglSetDigitalVideoParametersI3D = function(hDC: HDC; iAttribute: TGLint; const piValue: PGLint): Boolean; stdcall; + + // WGL_I3D_gamma + TwglGetGammaTableParametersI3D = function(hDC: HDC; iAttribute: TGLint; piValue: PGLint): Boolean; stdcall; + TwglSetGammaTableParametersI3D = function(hDC: HDC; iAttribute: TGLint; const piValue: PGLint): Boolean; stdcall; + TwglGetGammaTableI3D = function(hDC: HDC; iEntries: TGLint; puRed: PGLushort; puGreen: PGLushort; puBlue: PGLushort): Boolean; stdcall; + TwglSetGammaTableI3D = function(hDC: HDC; iEntries: TGLint; const puRed: PGLushort; const puGreen: PGLushort; const puBlue: PGLushort): Boolean; stdcall; + + // WGL_I3D_genlock + TwglEnableGenlockI3D = function(hDC: HDC): Boolean; stdcall; + TwglDisableGenlockI3D = function(hDC: HDC): Boolean; stdcall; + TwglIsEnabledGenlockI3D = function(hDC: HDC; pFlag: Boolean): Boolean; stdcall; + TwglGenlockSourceI3D = function(hDC: HDC; uSource: TGLuint): Boolean; stdcall; + TwglGetGenlockSourceI3D = function(hDC: HDC; uSource: PGLuint): Boolean; stdcall; + TwglGenlockSourceEdgeI3D = function(hDC: HDC; uEdge: TGLuint): Boolean; stdcall; + TwglGetGenlockSourceEdgeI3D = function(hDC: HDC; uEdge: PGLuint): Boolean; stdcall; + TwglGenlockSampleRateI3D = function(hDC: HDC; uRate: TGLuint): Boolean; stdcall; + TwglGetGenlockSampleRateI3D = function(hDC: HDC; uRate: PGLuint): Boolean; stdcall; + TwglGenlockSourceDelayI3D = function(hDC: HDC; uDelay: TGLuint): Boolean; stdcall; + TwglGetGenlockSourceDelayI3D = function(hDC: HDC; uDelay: PGLuint): Boolean; stdcall; + TwglQueryGenlockMaxSourceDelayI3D = function(hDC: HDC; uMaxLineDelay: PGLuint; uMaxPixelDelay: PGLuint): Boolean; stdcall; + + // WGL_I3D_image_buffer + TwglCreateImageBufferI3D = function(hDC: HDC; dwSize: TGLuint; uFlags: TGLuint): TGLvoid; stdcall; + TwglDestroyImageBufferI3D = function(hDC: HDC; pAddress: TGLvoid): Boolean; stdcall; + TwglAssociateImageBufferEventsI3D = function(hDC: HDC; const pEvent: THandle; const pAddress: PGLvoid; const pSize: PGLuint; count: TGLuint): Boolean; stdcall; + TwglReleaseImageBufferEventsI3D = function(hDC: HDC; const pAddress: PGLvoid; count: TGLuint): Boolean; stdcall; + + // WGL_I3D_swap_frame_lock + TwglEnableFrameLockI3D = function(): Boolean; stdcall; + TwglDisableFrameLockI3D = function(): Boolean; stdcall; + TwglIsEnabledFrameLockI3D = function(pFlag: Boolean): Boolean; stdcall; + TwglQueryFrameLockMasterI3D = function(pFlag: Boolean): Boolean; stdcall; + + // WGL_I3D_swap_frame_usage + TwglGetFrameUsageI3D = function(pUsage: PGLfloat): Boolean; stdcall; + TwglBeginFrameTrackingI3D = function(): Boolean; stdcall; + TwglEndFrameTrackingI3D = function(): Boolean; stdcall; + TwglQueryFrameTrackingI3D = function(pFrameCount: PGLuint; pMissedFrames: PGLuint; pLastMissedUsage: PGLfloat): Boolean; stdcall; + + // WGL_NV_vertex_array_range + TwglAllocateMemoryNV = procedure(size: TGLsizei; readfreq: TGLfloat; writefreq: TGLfloat; priority: TGLfloat); stdcall; + TwglFreeMemoryNV = procedure(_pointer: Pointer); stdcall; + + // WGL_NV_present_video + TwglEnumerateVideoDevicesNV = function(hdc: HDC; phDeviceList: PHVIDEOOUTPUTDEVICENV): Integer; stdcall; + TwglBindVideoDeviceNV = function(hd: HDC; uVideoSlot: Cardinal; hVideoDevice: HVIDEOOUTPUTDEVICENV; piAttribList: PInteger): Boolean; stdcall; + TwglQueryCurrentContextNV = function(iAttribute: Integer; piValue: PInteger): Boolean; stdcall; + + // WGL_NV_video_out + TwglGetVideoDeviceNV = function(hDC: HDC; numDevices: Integer; hVideoDevice: PHPVIDEODEV): Boolean; stdcall; + TwglReleaseVideoDeviceNV = function(hVideoDevice: HPVIDEODEV): Boolean; stdcall; + TwglBindVideoImageNV = function(hVideoDevice: HPVIDEODEV; hPbuffer: HPBUFFERARB; iVideoBuffer: Integer): Boolean; stdcall; + TwglReleaseVideoImageNV = function(hPbuffer: HPBUFFERARB; iVideoBuffer: Integer): Boolean; stdcall; + TwglSendPbufferToVideoNV = function(hPbuffer: HPBUFFERARB; iBufferType: Integer; pulCounterPbuffer: PCardinal; bBlock: Boolean): Boolean; stdcall; + TwglGetVideoInfoNV = function(hpVideoDevice: HPVIDEODEV; pulCounterOutputPbuffer: PCardinal; pulCounterOutputVideo: PCardinal): Boolean; stdcall; + + // WGL_NV_swap_group + TwglJoinSwapGroupNV = function(hDC: HDC; group: GLuint): Boolean; stdcall; + TwglBindSwapBarrierNV = function(group: GLuint; barrier: GLuint): Boolean; stdcall; + TwglQuerySwapGroupNV = function(hDC: HDC; group: PGLuint; barrier: PGLuint): Boolean; stdcall; + TwglQueryMaxSwapGroupsNV = function(hDC: HDC; mxGroups: PGLuint; maxBarriers: PGLuint): Boolean; stdcall; + TwglQueryFrameCountNV = function(hDC: HDC; count: PGLuint): Boolean; stdcall; + TwglResetFrameCountNV = function(hDC: HDC): Boolean; stdcall; + + // WGL_NV_gpu_affinity + TwglEnumGpusNV = function(iGpuIndex: Cardinal; phGpu: PHGPUNV): Boolean; stdcall; + TwglEnumGpuDevicesNV = function(hGpu: HGPUNV; iDeviceIndex: Cardinal; lpGpuDevice: PGPU_DEVICE): Boolean; stdcall; + TwglCreateAffinityDCNV = function(const phGpuList: PHGPUNV): HDC; stdcall; + TwglEnumGpusFromAffinityDCNV = function(hAffinityDC: HDC; iGpuIndex: Cardinal; hGpu: PHGPUNV): Boolean; stdcall; + TwglDeleteDCNV = function(hDC: HDC): Boolean; stdcall; + + // WGL_OML_sync_control + TwglGetSyncValuesOML = function(hdc: HDC; ust: PGLint64; msc: PGLint64; sbc: PGLint64): Boolean; stdcall; + TwglGetMscRateOML = function(hdc: HDC; numerator: PGLint; denominator: PGLint): Boolean; stdcall; + TwglSwapBuffersMscOML = function(hdc: HDC; target_msc: TGLint64; divisor: TGLint64; remainder: TGLint64): TGLint64; stdcall; + TwglSwapLayerBuffersMscOML = function(hdc: HDC; fuPlanes: TGLint; target_msc: TGLint64; divisor: TGLint64; remainder: TGLint64): TGLint64; stdcall; + TwglWaitForMscOML = function(hdc: HDC; target_msc: TGLint64; divisor: TGLint64; remainder: TGLint64; ust: PGLint64; msc: PGLint64; sbc: PGLint64): Boolean; stdcall; + TwglWaitForSbcOML = function(hdc: HDC; target_sbc: TGLint64; ust: PGLint64; msc: PGLint64; sbc: PGLint64): Boolean; stdcall; + + // WGL_3DL_stereo_control + TwglSetStereoEmitterState3DL = function(hDC: HDC; uState: UINT): Boolean; stdcall; + + // WIN_draw_range_elements + TglDrawRangeElementsWIN = procedure(mode: TGLenum; start: TGLuint; _end: TGLuint; count: TGLsizei; _type: TGLenum; const indices: PGLvoid); stdcall; + + // WIN_swap_hint + TglAddSwapHintRectWIN = procedure(x: TGLint; y: TGLint; width: TGLsizei; height: TGLsizei); stdcall; +{$ENDIF} + +{$IFDEF DGL_LINUX} + TglXChooseVisual = function(dpy: PDisplay; screen: GLint; attribList: PGLint): PXVisualInfo; cdecl; + TglXCopyContext = procedure(dpy: PDisplay; src: GLXContext; dst: GLXContext; mask: GLuint); cdecl; + TglXCreateContext = function(dpy: PDisplay; vis: PXVisualInfo; shareList: GLXContext; direct: GLboolean): GLXContext; cdecl; + TglXCreateGLXPixmap = function(dpy: PDisplay; vis: PXVisualInfo; pixmap: Pixmap): GLXPixmap cdecl; + TglXDestroyContext = procedure(dpy: PDisplay; ctx: GLXContext); cdecl; + TglXDestroyGLXPixmap = procedure(dpy : PDisplay; pix: GLXPixmap); cdecl; + TglXGetConfig = function(dpy : PDisplay; vis: PXVisualInfo; attrib: GLint; value: PGLint): GLint; cdecl; + TglXGetCurrentContext = function: GLXContext cdecl; + TglXGetCurrentDrawable = function: GLXDrawable cdecl; + TglXIsDirect = function(dpy: PDisplay; ctx: GLXContext): glboolean; cdecl; + TglXMakeCurrent = function(dpy: PDisplay; drawable: GLXDrawable; ctx: GLXContext): GLboolean cdecl; + TglXQueryExtension = function(dpy: PDisplay; errorBase: PGLint; eventBase: PGLint): GLboolean; cdecl; + TglXQueryVersion = function(dpy: PDisplay; major: PGLint; minor: PGLint): GLboolean cdecl; + TglXSwapBuffers = procedure(dpy: PDisplay; drawable: GLXDrawable); cdecl; + TglXUseXFont = procedure(font: Font; first: GLint; count: GLint; listBase: GLint); cdecl; + TglXWaitGL = procedure; cdecl; + TglXWaitX = procedure; cdecl; + + TglXGetClientString = function(dpy: PDisplay; name: GLint): PGLchar; cdecl; + TglXQueryServerString = function(dpy: PDisplay; screen: GLint; name: GLint): PGLchar; cdecl; + TglXQueryExtensionsString = function(dpy: PDisplay; screen: GLint): PGLchar; cdecl; + + // GLX_VERSION_1_3 + TglXGetFBConfigs = function(dpy: PDisplay; screen: GLint; nelements: PGLint): GLXFBConfig; cdecl; + TglXChooseFBConfig = function(dpy: PDisplay; screen: GLint; attrib_list: PGLint; nelements: PGLint): GLXFBConfig; cdecl; + TglXGetFBConfigAttrib = function(dpy: PDisplay; config: GLXFBConfig; attribute: GLint; value: PGLint): glint; cdecl; + TglXGetVisualFromFBConfig = function(dpy: PDisplay; config: GLXFBConfig) : PXVisualInfo; + TglXCreateWindow = function(dpy: PDisplay; config: GLXFBConfig; win: Window; attrib_list: PGLint): GLXWindow; cdecl; + TglXDestroyWindow = procedure(dpy: PDisplay; win: GLXWindow); cdecl; + TglXCreatePixmap = function(dpy: PDisplay; config: GLXFBConfig; pixmap: Pixmap; attrib_list: PGLint): GLXPixmap; cdecl; + + TglXDestroyPixmap = procedure(dpy: PDisplay; pixmap: GLXPixmap); cdecl; + TglXCreatePbuffer = function(dpy: PDisplay; config: GLXFBConfig; attrib_list: PGLint): GLXPbuffer; cdecl; + TglXDestroyPbuffer = procedure(dpy: PDisplay; pbuf: GLXPbuffer); cdecl; + TglXQueryDrawable = procedure(dpy: PDisplay; draw: GLXDrawable; attribute: GLint; value: PGLuint); cdecl; + TglXCreateNewContext = function(dpy: PDisplay; config: GLXFBConfig; render_type: GLint; share_list: GLXContext; direct: GLboolean): GLXContext cdecl; + TglXMakeContextCurrent = function(display: PDisplay; draw: GLXDrawable; read_: GLXDrawable; ctx: GLXContext): GLboolean; cdecl; + TglXGetCurrentReadDrawable = function: GLXDrawable; cdecl; + TglXGetCurreentDisplay = function: PDisplay; + + TglXQueryContext = function(dpy: PDisplay; ctx: GLXContext; attribute: GLint; value: PGLint): GLint; cdecl; + TglXSelectEvent = procedure(dpy: PDisplay; draw: GLXDrawable; event_mask: GLuint); cdecl; + TglXGetSelectedEvent = procedure(dpy: PDisplay; draw: GLXDrawable; event_mask: PGLuint); cdecl; + + // GLX_VERSION_1_4 + TglXGetProcAddress = function(const name: PAnsiChar): pointer; cdecl; + + // GLX_ARB_get_proc_address + TglXGetProcAddressARB = function(const name: PAnsiChar): pointer; cdecl; + + // GLX_ARB_create_context + TglXCreateContextAttribsARB = function(dpy: PDisplay; config: GLXFBConfig; share_context: GLXContext; direct: GLboolean; const attrib_list: PGLint): GLXContext; cdecl; + + // GLX_EXT_import_context + TglXGetCurrentDisplayEXT = function: PDisplay; cdecl; + TglXQueryContextInfoEXT = function(dpy: PDisplay; context: GLXContext; attribute: GLint; value: PGLint): GLint; cdecl; + TglXGetContextIDEXT = function(const context: GLXContext): GLXContextID; cdecl; + TglXImportContextEXT = function(dpy: PDisplay; contextID: GLXContextID): GLXContext; cdecl; + TglXFreeContextEXT = procedure(dpy: PDisplay; context: GLXContext); cdecl; + + // GLX_EXT_texture_from_pixmap + TglXBindTexImageEXT = procedure(dpy: PDisplay; drawable: GLXDrawable; buffer: GLint; const attrib_list: PGLint); cdecl; + TglXReleaseTexImageEXT = procedure(dpy: PDisplay; drawable: GLXDrawable; buffer: GLint); cdecl; +{$ENDIF} + + // GL utility functions and procedures + TgluErrorString = function(errCode: TGLEnum): PAnsiChar; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluGetString = function(name: TGLEnum): PAnsiChar; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluOrtho2D = procedure(left, right, bottom, top: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluPerspective = procedure(fovy, aspect, zNear, zFar: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluPickMatrix = procedure(x, y, width, height: TGLdouble; const viewport: TVector4i); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluLookAt = procedure(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluProject = function(objx, objy, obyz: GLdouble; modelMatrix: PGLdouble; projMatrix: PGLdouble; viewport: PGLint; var winx, winy, winz: GLDouble): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluUnProject = function(winx, winy, winz: GLdouble; modelMatrix: PGLdouble; projMatrix: PGLdouble; viewport: PGLint; var objx, objy, objz: GLdouble): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluScaleImage = function(format: TGLEnum; widthin, heightin: TGLint; typein: TGLEnum; datain: Pointer; widthout, heightout: TGLint; typeout: TGLEnum; const dataout: Pointer): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluBuild1DMipmaps = function(target: TGLEnum; components, width: TGLint; format, atype: TGLEnum; const data: Pointer): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluBuild2DMipmaps = function(target: TGLEnum; components, width, height: TGLint; format, atype: TGLEnum; const Data: Pointer): TGLint; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluNewQuadric = function: PGLUquadric; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluDeleteQuadric = procedure(state: PGLUquadric); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluQuadricNormals = procedure(quadObject: PGLUquadric; normals: TGLEnum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluQuadricTexture = procedure(quadObject: PGLUquadric; textureCoords: TGLboolean); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluQuadricOrientation = procedure(quadObject: PGLUquadric; orientation: TGLEnum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluQuadricDrawStyle = procedure(quadObject: PGLUquadric; drawStyle: TGLEnum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluCylinder = procedure(quadObject: PGLUquadric; baseRadius, topRadius, height: TGLdouble; slices, stacks: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluDisk = procedure(quadObject: PGLUquadric; innerRadius, outerRadius: TGLdouble; slices, loops: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluPartialDisk = procedure(quadObject: PGLUquadric; innerRadius, outerRadius: TGLdouble; slices, loops: TGLint; startAngle, sweepAngle: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluSphere = procedure(quadObject: PGLUquadric; radius: TGLdouble; slices, stacks: TGLint); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluQuadricCallback = procedure(quadObject: PGLUquadric; which: TGLEnum; fn: TGLUQuadricErrorProc); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluNewTess = function: PGLUtesselator; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluDeleteTess = procedure(tess: PGLUtesselator); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluTessBeginPolygon = procedure(tess: PGLUtesselator; polygon_data: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluTessBeginContour = procedure(tess: PGLUtesselator); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluTessVertex = procedure(tess: PGLUtesselator; const coords: TGLArrayd3; data: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluTessEndContour = procedure(tess: PGLUtesselator); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluTessEndPolygon = procedure(tess: PGLUtesselator); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluTessProperty = procedure(tess: PGLUtesselator; which: TGLEnum; value: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluTessNormal = procedure(tess: PGLUtesselator; x, y, z: TGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluTessCallback = procedure(tess: PGLUtesselator; which: TGLEnum; fn: Pointer); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluGetTessProperty = procedure(tess: PGLUtesselator; which: TGLEnum; value: PGLdouble); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluNewNurbsRenderer = function: PGLUnurbs; {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluDeleteNurbsRenderer = procedure(nobj: PGLUnurbs); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluBeginSurface = procedure(nobj: PGLUnurbs); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluBeginCurve = procedure(nobj: PGLUnurbs); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluEndCurve = procedure(nobj: PGLUnurbs); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluEndSurface = procedure(nobj: PGLUnurbs); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluBeginTrim = procedure(nobj: PGLUnurbs); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluEndTrim = procedure(nobj: PGLUnurbs); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluPwlCurve = procedure(nobj: PGLUnurbs; count: TGLint; points: PGLfloat; stride: TGLint; atype: TGLEnum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluNurbsCurve = procedure(nobj: PGLUnurbs; nknots: TGLint; knot: PGLfloat; stride: TGLint; ctlarray: PGLfloat; order: TGLint; atype: TGLEnum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluNurbsSurface = procedure(nobj: PGLUnurbs; sknot_count: TGLint; sknot: PGLfloat; tknot_count: TGLint; tknot: PGLfloat; s_stride, t_stride: TGLint; ctlarray: PGLfloat; sorder, torder: TGLint; atype: TGLEnum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluLoadSamplingMatrices = procedure(nobj: PGLUnurbs; const modelMatrix, projMatrix: TGLMatrixf4; const viewport: TVector4i); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluNurbsProperty = procedure(nobj: PGLUnurbs; aproperty: TGLEnum; value: TGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluGetNurbsProperty = procedure(nobj: PGLUnurbs; aproperty: TGLEnum; value: PGLfloat); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluNurbsCallback = procedure(nobj: PGLUnurbs; which: TGLEnum; fn: TGLUNurbsErrorProc); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluBeginPolygon = procedure(tess: PGLUtesselator); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluNextContour = procedure(tess: PGLUtesselator; atype: TGLEnum); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + TgluEndPolygon = procedure(tess: PGLUtesselator); {$IFDEF DGL_WIN}stdcall; {$ELSE}cdecl; {$ENDIF} + +var + // GL_VERSION_1_0 + glCullFace: TglCullFace; + glFrontFace: TglFrontFace; + glHint: TglHint; + glLineWidth: TglLineWidth; + glPointSize: TglPointSize; + glPolygonMode: TglPolygonMode; + glScissor: TglScissor; + glTexParameterf: TglTexParameterf; + glTexParameterfv: TglTexParameterfv; + glTexParameteri: TglTexParameteri; + glTexParameteriv: TglTexParameteriv; + glTexImage1D: TglTexImage1D; + glTexImage2D: TglTexImage2D; + glDrawBuffer: TglDrawBuffer; + glClear: TglClear; + glClearColor: TglClearColor; + glClearStencil: TglClearStencil; + glClearDepth: TglClearDepth; + glStencilMask: TglStencilMask; + glColorMask: TglColorMask; + glDepthMask: TglDepthMask; + glDisable: TglDisable; + glEnable: TglEnable; + glFinish: TglFinish; + glFlush: TglFlush; + glBlendFunc: TglBlendFunc; + glLogicOp: TglLogicOp; + glStencilFunc: TglStencilFunc; + glStencilOp: TglStencilOp; + glDepthFunc: TglDepthFunc; + glPixelStoref: TglPixelStoref; + glPixelStorei: TglPixelStorei; + glReadBuffer: TglReadBuffer; + glReadPixels: TglReadPixels; + glGetBooleanv: TglGetBooleanv; + glGetDoublev: TglGetDoublev; + glGetError: TglGetError; + glGetFloatv: TglGetFloatv; + glGetIntegerv: TglGetIntegerv; + glGetString: TglGetString; + glGetTexImage: TglGetTexImage; + glGetTexParameteriv: TglGetTexParameteriv; + glGetTexParameterfv: TglGetTexParameterfv; + glGetTexLevelParameterfv: TglGetTexLevelParameterfv; + glGetTexLevelParameteriv: TglGetTexLevelParameteriv; + glIsEnabled: TglIsEnabled; + glDepthRange: TglDepthRange; + glViewport: TglViewport; + + // GL_VERSION_1_1 + glDrawArrays: TglDrawArrays; + glDrawElements: TglDrawElements; + glGetPointerv: TglGetPointerv; + glPolygonOffset: TglPolygonOffset; + glCopyTexImage1D: TglCopyTexImage1D; + glCopyTexImage2D: TglCopyTexImage2D; + glCopyTexSubImage1D: TglCopyTexSubImage1D; + glCopyTexSubImage2D: TglCopyTexSubImage2D; + glTexSubImage1D: TglTexSubImage1D; + glTexSubImage2D: TglTexSubImage2D; + glBindTexture: TglBindTexture; + glDeleteTextures: TglDeleteTextures; + glGenTextures: TglGenTextures; +{$ifdef DGL_DEPRECATED} + glAccum: TglAccum; + glAlphaFunc: TglAlphaFunc; + glAreTexturesResident: TglAreTexturesResident; + glArrayElement: TglArrayElement; + glBegin: TglBegin; + glBitmap: TglBitmap; + glCallList: TglCallList; + glCallLists: TglCallLists; + glClearAccum: TglClearAccum; + glClearIndex: TglClearIndex; + glClipPlane: TglClipPlane; + glColor3b: TglColor3b; + glColor3bv: TglColor3bv; + glColor3d: TglColor3d; + glColor3dv: TglColor3dv; + glColor3f: TglColor3f; + glColor3fv: TglColor3fv; + glColor3i: TglColor3i; + glColor3iv: TglColor3iv; + glColor3s: TglColor3s; + glColor3sv: TglColor3sv; + glColor3ub: TglColor3ub; + glColor3ubv: TglColor3ubv; + glColor3ui: TglColor3ui; + glColor3uiv: TglColor3uiv; + glColor3us: TglColor3us; + glColor3usv: TglColor3usv; + glColor4b: TglColor4b; + glColor4bv: TglColor4bv; + glColor4d: TglColor4d; + glColor4dv: TglColor4dv; + glColor4f: TglColor4f; + glColor4fv: TglColor4fv; + glColor4i: TglColor4i; + glColor4iv: TglColor4iv; + glColor4s: TglColor4s; + glColor4sv: TglColor4sv; + glColor4ub: TglColor4ub; + glColor4ubv: TglColor4ubv; + glColor4ui: TglColor4ui; + glColor4uiv: TglColor4uiv; + glColor4us: TglColor4us; + glColor4usv: TglColor4usv; + glColorMaterial: TglColorMaterial; + glColorPointer: TglColorPointer; + glCopyPixels: TglCopyPixels; + glDeleteLists: TglDeleteLists; + glDisableClientState: TglDisableClientState; + glDrawPixels: TglDrawPixels; + glEdgeFlag: TglEdgeFlag; + glEdgeFlagPointer: TglEdgeFlagPointer; + glEdgeFlagv: TglEdgeFlagv; + glEnableClientState: TglEnableClientState; + glEnd: TglEnd; + glEndList: TglEndList; + glEvalCoord1d: TglEvalCoord1d; + glEvalCoord1dv: TglEvalCoord1dv; + glEvalCoord1f: TglEvalCoord1f; + glEvalCoord1fv: TglEvalCoord1fv; + glEvalCoord2d: TglEvalCoord2d; + glEvalCoord2dv: TglEvalCoord2dv; + glEvalCoord2f: TglEvalCoord2f; + glEvalCoord2fv: TglEvalCoord2fv; + glEvalMesh1: TglEvalMesh1; + glEvalMesh2: TglEvalMesh2; + glEvalPoint1: TglEvalPoint1; + glEvalPoint2: TglEvalPoint2; + glFeedbackBuffer: TglFeedbackBuffer; + glFogf: TglFogf; + glFogfv: TglFogfv; + glFogi: TglFogi; + glFogiv: TglFogiv; + glFrustum: TglFrustum; + glGenLists: TglGenLists; + glGetClipPlane: TglGetClipPlane; + glGetLightfv: TglGetLightfv; + glGetLightiv: TglGetLightiv; + glGetMapdv: TglGetMapdv; + glGetMapfv: TglGetMapfv; + glGetMapiv: TglGetMapiv; + glGetMaterialfv: TglGetMaterialfv; + glGetMaterialiv: TglGetMaterialiv; + glGetPixelMapfv: TglGetPixelMapfv; + glGetPixelMapuiv: TglGetPixelMapuiv; + glGetPixelMapusv: TglGetPixelMapusv; + glGetPolygonStipple: TglGetPolygonStipple; + glGetTexEnvfv: TglGetTexEnvfv; + glGetTexEnviv: TglGetTexEnviv; + glGetTexGendv: TglGetTexGendv; + glGetTexGenfv: TglGetTexGenfv; + glGetTexGeniv: TglGetTexGeniv; + glIndexMask: TglIndexMask; + glIndexPointer: TglIndexPointer; + glIndexd: TglIndexd; + glIndexdv: TglIndexdv; + glIndexf: TglIndexf; + glIndexfv: TglIndexfv; + glIndexi: TglIndexi; + glIndexiv: TglIndexiv; + glIndexs: TglIndexs; + glIndexsv: TglIndexsv; + glIndexub: TglIndexub; + glIndexubv: TglIndexubv; + glInitNames: TglInitNames; + glInterleavedArrays: TglInterleavedArrays; + glIsList: TglIsList; + glIsTexture: TglIsTexture; + glLightModelf: TglLightModelf; + glLightModelfv: TglLightModelfv; + glLightModeli: TglLightModeli; + glLightModeliv: TglLightModeliv; + glLightf: TglLightf; + glLightfv: TglLightfv; + glLighti: TglLighti; + glLightiv: TglLightiv; + glLineStipple: TglLineStipple; + glListBase: TglListBase; + glLoadIdentity: TglLoadIdentity; + glLoadMatrixd: TglLoadMatrixd; + glLoadMatrixf: TglLoadMatrixf; + glLoadName: TglLoadName; + glMap1d: TglMap1d; + glMap1f: TglMap1f; + glMap2d: TglMap2d; + glMap2f: TglMap2f; + glMapGrid1d: TglMapGrid1d; + glMapGrid1f: TglMapGrid1f; + glMapGrid2d: TglMapGrid2d; + glMapGrid2f: TglMapGrid2f; + glMaterialf: TglMaterialf; + glMaterialfv: TglMaterialfv; + glMateriali: TglMateriali; + glMaterialiv: TglMaterialiv; + glMatrixMode: TglMatrixMode; + glMultMatrixd: TglMultMatrixd; + glMultMatrixf: TglMultMatrixf; + glNewList: TglNewList; + glNormal3b: TglNormal3b; + glNormal3bv: TglNormal3bv; + glNormal3d: TglNormal3d; + glNormal3dv: TglNormal3dv; + glNormal3f: TglNormal3f; + glNormal3fv: TglNormal3fv; + glNormal3i: TglNormal3i; + glNormal3iv: TglNormal3iv; + glNormal3s: TglNormal3s; + glNormal3sv: TglNormal3sv; + glNormalPointer: TglNormalPointer; + glOrtho: TglOrtho; + glPassThrough: TglPassThrough; + glPixelMapfv: TglPixelMapfv; + glPixelMapuiv: TglPixelMapuiv; + glPixelMapusv: TglPixelMapusv; + glPixelTransferf: TglPixelTransferf; + glPixelTransferi: TglPixelTransferi; + glPixelZoom: TglPixelZoom; + glPolygonStipple: TglPolygonStipple; + glPopAttrib: TglPopAttrib; + glPopClientAttrib: TglPopClientAttrib; + glPopMatrix: TglPopMatrix; + glPopName: TglPopName; + glPrioritizeTextures: TglPrioritizeTextures; + glPushAttrib: TglPushAttrib; + glPushClientAttrib: TglPushClientAttrib; + glPushMatrix: TglPushMatrix; + glPushName: TglPushName; + glRasterPos2d: TglRasterPos2d; + glRasterPos2dv: TglRasterPos2dv; + glRasterPos2f: TglRasterPos2f; + glRasterPos2fv: TglRasterPos2fv; + glRasterPos2i: TglRasterPos2i; + glRasterPos2iv: TglRasterPos2iv; + glRasterPos2s: TglRasterPos2s; + glRasterPos2sv: TglRasterPos2sv; + glRasterPos3d: TglRasterPos3d; + glRasterPos3dv: TglRasterPos3dv; + glRasterPos3f: TglRasterPos3f; + glRasterPos3fv: TglRasterPos3fv; + glRasterPos3i: TglRasterPos3i; + glRasterPos3iv: TglRasterPos3iv; + glRasterPos3s: TglRasterPos3s; + glRasterPos3sv: TglRasterPos3sv; + glRasterPos4d: TglRasterPos4d; + glRasterPos4dv: TglRasterPos4dv; + glRasterPos4f: TglRasterPos4f; + glRasterPos4fv: TglRasterPos4fv; + glRasterPos4i: TglRasterPos4i; + glRasterPos4iv: TglRasterPos4iv; + glRasterPos4s: TglRasterPos4s; + glRasterPos4sv: TglRasterPos4sv; + glRectd: TglRectd; + glRectdv: TglRectdv; + glRectf: TglRectf; + glRectfv: TglRectfv; + glRecti: TglRecti; + glRectiv: TglRectiv; + glRects: TglRects; + glRectsv: TglRectsv; + glRenderMode: TglRenderMode; + glRotated: TglRotated; + glRotatef: TglRotatef; + glScaled: TglScaled; + glScalef: TglScalef; + glSelectBuffer: TglSelectBuffer; + glShadeModel: TglShadeModel; + glTexCoord1d: TglTexCoord1d; + glTexCoord1dv: TglTexCoord1dv; + glTexCoord1f: TglTexCoord1f; + glTexCoord1fv: TglTexCoord1fv; + glTexCoord1i: TglTexCoord1i; + glTexCoord1iv: TglTexCoord1iv; + glTexCoord1s: TglTexCoord1s; + glTexCoord1sv: TglTexCoord1sv; + glTexCoord2d: TglTexCoord2d; + glTexCoord2dv: TglTexCoord2dv; + glTexCoord2f: TglTexCoord2f; + glTexCoord2fv: TglTexCoord2fv; + glTexCoord2i: TglTexCoord2i; + glTexCoord2iv: TglTexCoord2iv; + glTexCoord2s: TglTexCoord2s; + glTexCoord2sv: TglTexCoord2sv; + glTexCoord3d: TglTexCoord3d; + glTexCoord3dv: TglTexCoord3dv; + glTexCoord3f: TglTexCoord3f; + glTexCoord3fv: TglTexCoord3fv; + glTexCoord3i: TglTexCoord3i; + glTexCoord3iv: TglTexCoord3iv; + glTexCoord3s: TglTexCoord3s; + glTexCoord3sv: TglTexCoord3sv; + glTexCoord4d: TglTexCoord4d; + glTexCoord4dv: TglTexCoord4dv; + glTexCoord4f: TglTexCoord4f; + glTexCoord4fv: TglTexCoord4fv; + glTexCoord4i: TglTexCoord4i; + glTexCoord4iv: TglTexCoord4iv; + glTexCoord4s: TglTexCoord4s; + glTexCoord4sv: TglTexCoord4sv; + glTexCoordPointer: TglTexCoordPointer; + glTexEnvf: TglTexEnvf; + glTexEnvfv: TglTexEnvfv; + glTexEnvi: TglTexEnvi; + glTexEnviv: TglTexEnviv; + glTexGend: TglTexGend; + glTexGendv: TglTexGendv; + glTexGenf: TglTexGenf; + glTexGenfv: TglTexGenfv; + glTexGeni: TglTexGeni; + glTexGeniv: TglTexGeniv; + glTranslated: TglTranslated; + glTranslatef: TglTranslatef; + glVertex2d: TglVertex2d; + glVertex2dv: TglVertex2dv; + glVertex2f: TglVertex2f; + glVertex2fv: TglVertex2fv; + glVertex2i: TglVertex2i; + glVertex2iv: TglVertex2iv; + glVertex2s: TglVertex2s; + glVertex2sv: TglVertex2sv; + glVertex3d: TglVertex3d; + glVertex3dv: TglVertex3dv; + glVertex3f: TglVertex3f; + glVertex3fv: TglVertex3fv; + glVertex3i: TglVertex3i; + glVertex3iv: TglVertex3iv; + glVertex3s: TglVertex3s; + glVertex3sv: TglVertex3sv; + glVertex4d: TglVertex4d; + glVertex4dv: TglVertex4dv; + glVertex4f: TglVertex4f; + glVertex4fv: TglVertex4fv; + glVertex4i: TglVertex4i; + glVertex4iv: TglVertex4iv; + glVertex4s: TglVertex4s; + glVertex4sv: TglVertex4sv; + glVertexPointer: TglVertexPointer; +{$endif} + + // GL_VERSION_1_2 + glBlendColor: TglBlendColor; + glBlendEquation: TglBlendEquation; + glDrawRangeElements: TglDrawRangeElements; + glTexImage3D: TglTexImage3D; + glTexSubImage3D: TglTexSubImage3D; + glCopyTexSubImage3D: TglCopyTexSubImage3D; +{$ifdef DGL_DEPRECATED} + glColorTable: TglColorTable; + glColorTableParameterfv: TglColorTableParameterfv; + glColorTableParameteriv: TglColorTableParameteriv; + glCopyColorTable: TglCopyColorTable; + glGetColorTable: TglGetColorTable; + glGetColorTableParameterfv: TglGetColorTableParameterfv; + glGetColorTableParameteriv: TglGetColorTableParameteriv; + glColorSubTable: TglColorSubTable; + glCopyColorSubTable: TglCopyColorSubTable; + glConvolutionFilter1D: TglConvolutionFilter1D; + glConvolutionFilter2D: TglConvolutionFilter2D; + glConvolutionParameterf: TglConvolutionParameterf; + glConvolutionParameterfv: TglConvolutionParameterfv; + glConvolutionParameteri: TglConvolutionParameteri; + glConvolutionParameteriv: TglConvolutionParameteriv; + glCopyConvolutionFilter1D: TglCopyConvolutionFilter1D; + glCopyConvolutionFilter2D: TglCopyConvolutionFilter2D; + glGetConvolutionFilter: TglGetConvolutionFilter; + glGetConvolutionParameterfv: TglGetConvolutionParameterfv; + glGetConvolutionParameteriv: TglGetConvolutionParameteriv; + glGetSeparableFilter: TglGetSeparableFilter; + glSeparableFilter2D: TglSeparableFilter2D; + glGetHistogram: TglGetHistogram; + glGetHistogramParameterfv: TglGetHistogramParameterfv; + glGetHistogramParameteriv: TglGetHistogramParameteriv; + glGetMinmax: TglGetMinmax; + glGetMinmaxParameterfv: TglGetMinmaxParameterfv; + glGetMinmaxParameteriv: TglGetMinmaxParameteriv; + glHistogram: TglHistogram; + glMinmax: TglMinmax; + glResetHistogram: TglResetHistogram; + glResetMinmax: TglResetMinmax; +{$endif} + + // GL_VERSION_1_3 + glActiveTexture: TglActiveTexture; + glSampleCoverage: TglSampleCoverage; + glCompressedTexImage3D: TglCompressedTexImage3D; + glCompressedTexImage2D: TglCompressedTexImage2D; + glCompressedTexImage1D: TglCompressedTexImage1D; + glCompressedTexSubImage3D: TglCompressedTexSubImage3D; + glCompressedTexSubImage2D: TglCompressedTexSubImage2D; + glCompressedTexSubImage1D: TglCompressedTexSubImage1D; + glGetCompressedTexImage: TglGetCompressedTexImage; +{$ifdef DGL_DEPRECATED} + glClientActiveTexture: TglClientActiveTexture; + glMultiTexCoord1d: TglMultiTexCoord1d; + glMultiTexCoord1dv: TglMultiTexCoord1dv; + glMultiTexCoord1f: TglMultiTexCoord1f; + glMultiTexCoord1fv: TglMultiTexCoord1fv; + glMultiTexCoord1i: TglMultiTexCoord1i; + glMultiTexCoord1iv: TglMultiTexCoord1iv; + glMultiTexCoord1s: TglMultiTexCoord1s; + glMultiTexCoord1sv: TglMultiTexCoord1sv; + glMultiTexCoord2d: TglMultiTexCoord2d; + glMultiTexCoord2dv: TglMultiTexCoord2dv; + glMultiTexCoord2f: TglMultiTexCoord2f; + glMultiTexCoord2fv: TglMultiTexCoord2fv; + glMultiTexCoord2i: TglMultiTexCoord2i; + glMultiTexCoord2iv: TglMultiTexCoord2iv; + glMultiTexCoord2s: TglMultiTexCoord2s; + glMultiTexCoord2sv: TglMultiTexCoord2sv; + glMultiTexCoord3d: TglMultiTexCoord3d; + glMultiTexCoord3dv: TglMultiTexCoord3dv; + glMultiTexCoord3f: TglMultiTexCoord3f; + glMultiTexCoord3fv: TglMultiTexCoord3fv; + glMultiTexCoord3i: TglMultiTexCoord3i; + glMultiTexCoord3iv: TglMultiTexCoord3iv; + glMultiTexCoord3s: TglMultiTexCoord3s; + glMultiTexCoord3sv: TglMultiTexCoord3sv; + glMultiTexCoord4d: TglMultiTexCoord4d; + glMultiTexCoord4dv: TglMultiTexCoord4dv; + glMultiTexCoord4f: TglMultiTexCoord4f; + glMultiTexCoord4fv: TglMultiTexCoord4fv; + glMultiTexCoord4i: TglMultiTexCoord4i; + glMultiTexCoord4iv: TglMultiTexCoord4iv; + glMultiTexCoord4s: TglMultiTexCoord4s; + glMultiTexCoord4sv: TglMultiTexCoord4sv; + glLoadTransposeMatrixf: TglLoadTransposeMatrixf; + glLoadTransposeMatrixd: TglLoadTransposeMatrixd; + glMultTransposeMatrixf: TglMultTransposeMatrixf; + glMultTransposeMatrixd: TglMultTransposeMatrixd; +{$endif} + + // GL_VERSION_1_4 + glBlendFuncSeparate: TglBlendFuncSeparate; + glMultiDrawArrays: TglMultiDrawArrays; + glMultiDrawElements: TglMultiDrawElements; + glPointParameterf: TglPointParameterf; + glPointParameterfv: TglPointParameterfv; + glPointParameteri: TglPointParameteri; + glPointParameteriv: TglPointParameteriv; +{$ifdef DGL_DEPRECATED} + glFogCoordf: TglFogCoordf; + glFogCoordfv: TglFogCoordfv; + glFogCoordd: TglFogCoordd; + glFogCoorddv: TglFogCoorddv; + glFogCoordPointer: TglFogCoordPointer; + glSecondaryColor3b: TglSecondaryColor3b; + glSecondaryColor3bv: TglSecondaryColor3bv; + glSecondaryColor3d: TglSecondaryColor3d; + glSecondaryColor3dv: TglSecondaryColor3dv; + glSecondaryColor3f: TglSecondaryColor3f; + glSecondaryColor3fv: TglSecondaryColor3fv; + glSecondaryColor3i: TglSecondaryColor3i; + glSecondaryColor3iv: TglSecondaryColor3iv; + glSecondaryColor3s: TglSecondaryColor3s; + glSecondaryColor3sv: TglSecondaryColor3sv; + glSecondaryColor3ub: TglSecondaryColor3ub; + glSecondaryColor3ubv: TglSecondaryColor3ubv; + glSecondaryColor3ui: TglSecondaryColor3ui; + glSecondaryColor3uiv: TglSecondaryColor3uiv; + glSecondaryColor3us: TglSecondaryColor3us; + glSecondaryColor3usv: TglSecondaryColor3usv; + glSecondaryColorPointer: TglSecondaryColorPointer; + glWindowPos2d: TglWindowPos2d; + glWindowPos2dv: TglWindowPos2dv; + glWindowPos2f: TglWindowPos2f; + glWindowPos2fv: TglWindowPos2fv; + glWindowPos2i: TglWindowPos2i; + glWindowPos2iv: TglWindowPos2iv; + glWindowPos2s: TglWindowPos2s; + glWindowPos2sv: TglWindowPos2sv; + glWindowPos3d: TglWindowPos3d; + glWindowPos3dv: TglWindowPos3dv; + glWindowPos3f: TglWindowPos3f; + glWindowPos3fv: TglWindowPos3fv; + glWindowPos3i: TglWindowPos3i; + glWindowPos3iv: TglWindowPos3iv; + glWindowPos3s: TglWindowPos3s; + glWindowPos3sv: TglWindowPos3sv; +{$endif} + + // GL_VERSION_1_5 + glGenQueries: TglGenQueries; + glDeleteQueries: TglDeleteQueries; + glIsQuery: TglIsQuery; + glBeginQuery: TglBeginQuery; + glEndQuery: TglEndQuery; + glGetQueryiv: TglGetQueryiv; + glGetQueryObjectiv: TglGetQueryObjectiv; + glGetQueryObjectuiv: TglGetQueryObjectuiv; + glBindBuffer: TglBindBuffer; + glDeleteBuffers: TglDeleteBuffers; + glGenBuffers: TglGenBuffers; + glIsBuffer: TglIsBuffer; + glBufferData: TglBufferData; + glBufferSubData: TglBufferSubData; + glGetBufferSubData: TglGetBufferSubData; + glMapBuffer: TglMapBuffer; + glUnmapBuffer: TglUnmapBuffer; + glGetBufferParameteriv: TglGetBufferParameteriv; + glGetBufferPointerv: TglGetBufferPointerv; + + // GL_VERSION_2_0 + glBlendEquationSeparate: TglBlendEquationSeparate; + glDrawBuffers: TglDrawBuffers; + glStencilOpSeparate: TglStencilOpSeparate; + glStencilFuncSeparate: TglStencilFuncSeparate; + glStencilMaskSeparate: TglStencilMaskSeparate; + glAttachShader: TglAttachShader; + glBindAttribLocation: TglBindAttribLocation; + glCompileShader: TglCompileShader; + glCreateProgram: TglCreateProgram; + glCreateShader: TglCreateShader; + glDeleteProgram: TglDeleteProgram; + glDeleteShader: TglDeleteShader; + glDetachShader: TglDetachShader; + glDisableVertexAttribArray: TglDisableVertexAttribArray; + glEnableVertexAttribArray: TglEnableVertexAttribArray; + glGetActiveAttrib: TglGetActiveAttrib; + glGetActiveUniform: TglGetActiveUniform; + glGetAttachedShaders: TglGetAttachedShaders; + glGetAttribLocation: TglGetAttribLocation; + glGetProgramiv: TglGetProgramiv; + glGetProgramInfoLog: TglGetProgramInfoLog; + glGetShaderiv: TglGetShaderiv; + glGetShaderInfoLog: TglGetShaderInfoLog; + glGetShaderSource: TglGetShaderSource; + glGetUniformLocation: TglGetUniformLocation; + glGetUniformfv: TglGetUniformfv; + glGetUniformiv: TglGetUniformiv; + glGetVertexAttribfv: TglGetVertexAttribfv; + glGetVertexAttribiv: TglGetVertexAttribiv; + glGetVertexAttribPointerv: TglGetVertexAttribPointerv; + glIsProgram: TglIsProgram; + glIsShader: TglIsShader; + glLinkProgram: TglLinkProgram; + glShaderSource: TglShaderSource; + glUseProgram: TglUseProgram; + glUniform1f: TglUniform1f; + glUniform2f: TglUniform2f; + glUniform3f: TglUniform3f; + glUniform4f: TglUniform4f; + glUniform1i: TglUniform1i; + glUniform2i: TglUniform2i; + glUniform3i: TglUniform3i; + glUniform4i: TglUniform4i; + glUniform1fv: TglUniform1fv; + glUniform2fv: TglUniform2fv; + glUniform3fv: TglUniform3fv; + glUniform4fv: TglUniform4fv; + glUniform1iv: TglUniform1iv; + glUniform2iv: TglUniform2iv; + glUniform3iv: TglUniform3iv; + glUniform4iv: TglUniform4iv; + glUniformMatrix2fv: TglUniformMatrix2fv; + glUniformMatrix3fv: TglUniformMatrix3fv; + glUniformMatrix4fv: TglUniformMatrix4fv; + glValidateProgram: TglValidateProgram; + glVertexAttrib1d: TglVertexAttrib1d; + glVertexAttrib1dv: TglVertexAttrib1dv; + glVertexAttrib1f: TglVertexAttrib1f; + glVertexAttrib1fv: TglVertexAttrib1fv; + glVertexAttrib1s: TglVertexAttrib1s; + glVertexAttrib1sv: TglVertexAttrib1sv; + glVertexAttrib2d: TglVertexAttrib2d; + glVertexAttrib2dv: TglVertexAttrib2dv; + glVertexAttrib2f: TglVertexAttrib2f; + glVertexAttrib2fv: TglVertexAttrib2fv; + glVertexAttrib2s: TglVertexAttrib2s; + glVertexAttrib2sv: TglVertexAttrib2sv; + glVertexAttrib3d: TglVertexAttrib3d; + glVertexAttrib3dv: TglVertexAttrib3dv; + glVertexAttrib3f: TglVertexAttrib3f; + glVertexAttrib3fv: TglVertexAttrib3fv; + glVertexAttrib3s: TglVertexAttrib3s; + glVertexAttrib3sv: TglVertexAttrib3sv; + glVertexAttrib4Nbv: TglVertexAttrib4Nbv; + glVertexAttrib4Niv: TglVertexAttrib4Niv; + glVertexAttrib4Nsv: TglVertexAttrib4Nsv; + glVertexAttrib4Nub: TglVertexAttrib4Nub; + glVertexAttrib4Nubv: TglVertexAttrib4Nubv; + glVertexAttrib4Nuiv: TglVertexAttrib4Nuiv; + glVertexAttrib4Nusv: TglVertexAttrib4Nusv; + glVertexAttrib4bv: TglVertexAttrib4bv; + glVertexAttrib4d: TglVertexAttrib4d; + glVertexAttrib4dv: TglVertexAttrib4dv; + glVertexAttrib4f: TglVertexAttrib4f; + glVertexAttrib4fv: TglVertexAttrib4fv; + glVertexAttrib4iv: TglVertexAttrib4iv; + glVertexAttrib4s: TglVertexAttrib4s; + glVertexAttrib4sv: TglVertexAttrib4sv; + glVertexAttrib4ubv: TglVertexAttrib4ubv; + glVertexAttrib4uiv: TglVertexAttrib4uiv; + glVertexAttrib4usv: TglVertexAttrib4usv; + glVertexAttribPointer: TglVertexAttribPointer; + + // GL_VERSION_2_1 + glUniformMatrix2x3fv: TglUniformMatrix2x3fv; + glUniformMatrix3x2fv: TglUniformMatrix3x2fv; + glUniformMatrix2x4fv: TglUniformMatrix2x4fv; + glUniformMatrix4x2fv: TglUniformMatrix4x2fv; + glUniformMatrix3x4fv: TglUniformMatrix3x4fv; + glUniformMatrix4x3fv: TglUniformMatrix4x3fv; + + // GL_VERSION_3_0 + glColorMaski: TglColorMaski; + glGetBooleani_v: TglGetBooleani_v; + glGetIntegeri_v: TglGetIntegeri_v; + glEnablei: TglEnablei; + glDisablei: TglDisablei; + glIsEnabledi: TglIsEnabledi; + glBeginTransformFeedback: TglBeginTransformFeedback; + glEndTransformFeedback: TglEndTransformFeedback; + glBindBufferRange: TglBindBufferRange; + glBindBufferBase: TglBindBufferBase; + glTransformFeedbackVaryings: TglTransformFeedbackVaryings; + glGetTransformFeedbackVarying: TglGetTransformFeedbackVarying; + glClampColor: TglClampColor; + glBeginConditionalRender: TglBeginConditionalRender; + glEndConditionalRender: TglEndConditionalRender; + glVertexAttribI1i: TglVertexAttribI1i; + glVertexAttribI2i: TglVertexAttribI2i; + glVertexAttribI3i: TglVertexAttribI3i; + glVertexAttribI4i: TglVertexAttribI4i; + glVertexAttribI1ui: TglVertexAttribI1ui; + glVertexAttribI2ui: TglVertexAttribI2ui; + glVertexAttribI3ui: TglVertexAttribI3ui; + glVertexAttribI4ui: TglVertexAttribI4ui; + glVertexAttribI1iv: TglVertexAttribI1iv; + glVertexAttribI2iv: TglVertexAttribI2iv; + glVertexAttribI3iv: TglVertexAttribI3iv; + glVertexAttribI4iv: TglVertexAttribI4iv; + glVertexAttribI1uiv: TglVertexAttribI1uiv; + glVertexAttribI2uiv: TglVertexAttribI2uiv; + glVertexAttribI3uiv: TglVertexAttribI3uiv; + glVertexAttribI4uiv: TglVertexAttribI4uiv; + glVertexAttribI4bv: TglVertexAttribI4bv; + glVertexAttribI4sv: TglVertexAttribI4sv; + glVertexAttribI4ubv: TglVertexAttribI4ubv; + glVertexAttribI4usv: TglVertexAttribI4usv; + glVertexAttribIPointer: TglVertexAttribIPointer; + glGetVertexAttribIiv: TglGetVertexAttribIiv; + glGetVertexAttribIuiv: TglGetVertexAttribIuiv; + glGetUniformuiv: TglGetUniformuiv; + glBindFragDataLocation: TglBindFragDataLocation; + glGetFragDataLocation: TglGetFragDataLocation; + glUniform1ui: TglUniform1ui; + glUniform2ui: TglUniform2ui; + glUniform3ui: TglUniform3ui; + glUniform4ui: TglUniform4ui; + glUniform1uiv: TglUniform1uiv; + glUniform2uiv: TglUniform2uiv; + glUniform3uiv: TglUniform3uiv; + glUniform4uiv: TglUniform4uiv; + glTexParameterIiv: TglTexParameterIiv; + glTexParameterIuiv: TglTexParameterIuiv; + glGetTexParameterIiv: TglGetTexParameterIiv; + glGetTexParameterIuiv: TglGetTexParameterIuiv; + glClearBufferiv: TglClearBufferiv; + glClearBufferuiv: TglClearBufferuiv; + glClearBufferfv: TglClearBufferfv; + glClearBufferfi: TglClearBufferfi; + glGetStringi: TglGetStringi; + + // GL_VERSION_3_1 + glDrawArraysInstanced: TglDrawArraysInstanced; + glDrawElementsInstanced: TglDrawElementsInstanced; + glTexBuffer: TglTexBuffer; + glPrimitiveRestartIndex: TglPrimitiveRestartIndex; + + // GL_VERSION_3_2 + { OpenGL 3.2 also reuses entry points from these extensions: } + { ARB_draw_elements_base_vertex } + { ARB_provoking_vertex } + { ARB_sync } + { ARB_texture_multisample } + glGetInteger64i_v: TglGetInteger64i_v; + glGetBufferParameteri64v: TglGetBufferParameteri64v; + glProgramParameteri: TglProgramParameteri; + glFramebufferTexture: TglFramebufferTexture; + glFramebufferTextureFace: TglFramebufferTextureFace; + + // GL_3DFX_tbuffer + glTbufferMask3DFX: TglTbufferMask3DFX; + + // GL_APPLE_element_array + glElementPointerAPPLE: TglElementPointerAPPLE; + glDrawElementArrayAPPLE: TglDrawElementArrayAPPLE; + glDrawRangeElementArrayAPPLE: TglDrawRangeElementArrayAPPLE; + glMultiDrawElementArrayAPPLE: TglMultiDrawElementArrayAPPLE; + glMultiDrawRangeElementArrayAPPLE: TglMultiDrawRangeElementArrayAPPLE; + + // GL_APPLE_fence + glGenFencesAPPLE: TglGenFencesAPPLE; + glDeleteFencesAPPLE: TglDeleteFencesAPPLE; + glSetFenceAPPLE: TglSetFenceAPPLE; + glIsFenceAPPLE: TglIsFenceAPPLE; + glTestFenceAPPLE: TglTestFenceAPPLE; + glFinishFenceAPPLE: TglFinishFenceAPPLE; + glTestObjectAPPLE: TglTestObjectAPPLE; + glFinishObjectAPPLE: TglFinishObjectAPPLE; + + // GL_APPLE_vertex_array_object + glBindVertexArrayAPPLE: TglBindVertexArrayAPPLE; + glDeleteVertexArraysAPPLE: TglDeleteVertexArraysAPPLE; + glGenVertexArraysAPPLE: TglGenVertexArraysAPPLE; + glIsVertexArrayAPPLE: TglIsVertexArrayAPPLE; + + // GL_APPLE_vertex_array_range + glVertexArrayRangeAPPLE: TglVertexArrayRangeAPPLE; + glFlushVertexArrayRangeAPPLE: TglFlushVertexArrayRangeAPPLE; + glVertexArrayParameteriAPPLE: TglVertexArrayParameteriAPPLE; + + // GL_APPLE_texture_range + glTextureRangeAPPLE: TglTextureRangeAPPLE; + glGetTexParameterPointervAPPLE: TglGetTexParameterPointervAPPLE; + + // GL_APPLE_vertex_program_evaluators + glEnableVertexAttribAPPLE: TglEnableVertexAttribAPPLE; + glDisableVertexAttribAPPLE: TglDisableVertexAttribAPPLE; + glIsVertexAttribEnabledAPPLE: TglIsVertexAttribEnabledAPPLE; + glMapVertexAttrib1dAPPLE: TglMapVertexAttrib1dAPPLE; + glMapVertexAttrib1fAPPLE: TglMapVertexAttrib1fAPPLE; + glMapVertexAttrib2dAPPLE: TglMapVertexAttrib2dAPPLE; + glMapVertexAttrib2fAPPLE: TglMapVertexAttrib2fAPPLE; + + // GL_APPLE_object_purgeable + glObjectPurgeableAPPLE: TglObjectPurgeableAPPLE; + glObjectUnpurgeableAPPLE: TglObjectUnpurgeableAPPLE; + glGetObjectParameterivAPPLE: TglGetObjectParameterivAPPLE; + + // GL_ARB_matrix_palette + glCurrentPaletteMatrixARB: TglCurrentPaletteMatrixARB; + glMatrixIndexubvARB: TglMatrixIndexubvARB; + glMatrixIndexusvARB: TglMatrixIndexusvARB; + glMatrixIndexuivARB: TglMatrixIndexuivARB; + glMatrixIndexPointerARB: TglMatrixIndexPointerARB; + + // GL_ARB_multisample + glSampleCoverageARB: TglSampleCoverageARB; + + // GL_ARB_multitexture + glActiveTextureARB: TglActiveTextureARB; + glClientActiveTextureARB: TglClientActiveTextureARB; + glMultiTexCoord1dARB: TglMultiTexCoord1dARB; + glMultiTexCoord1dvARB: TglMultiTexCoord1dvARB; + glMultiTexCoord1fARB: TglMultiTexCoord1fARB; + glMultiTexCoord1fvARB: TglMultiTexCoord1fvARB; + glMultiTexCoord1iARB: TglMultiTexCoord1iARB; + glMultiTexCoord1ivARB: TglMultiTexCoord1ivARB; + glMultiTexCoord1sARB: TglMultiTexCoord1sARB; + glMultiTexCoord1svARB: TglMultiTexCoord1svARB; + glMultiTexCoord2dARB: TglMultiTexCoord2dARB; + glMultiTexCoord2dvARB: TglMultiTexCoord2dvARB; + glMultiTexCoord2fARB: TglMultiTexCoord2fARB; + glMultiTexCoord2fvARB: TglMultiTexCoord2fvARB; + glMultiTexCoord2iARB: TglMultiTexCoord2iARB; + glMultiTexCoord2ivARB: TglMultiTexCoord2ivARB; + glMultiTexCoord2sARB: TglMultiTexCoord2sARB; + glMultiTexCoord2svARB: TglMultiTexCoord2svARB; + glMultiTexCoord3dARB: TglMultiTexCoord3dARB; + glMultiTexCoord3dvARB: TglMultiTexCoord3dvARB; + glMultiTexCoord3fARB: TglMultiTexCoord3fARB; + glMultiTexCoord3fvARB: TglMultiTexCoord3fvARB; + glMultiTexCoord3iARB: TglMultiTexCoord3iARB; + glMultiTexCoord3ivARB: TglMultiTexCoord3ivARB; + glMultiTexCoord3sARB: TglMultiTexCoord3sARB; + glMultiTexCoord3svARB: TglMultiTexCoord3svARB; + glMultiTexCoord4dARB: TglMultiTexCoord4dARB; + glMultiTexCoord4dvARB: TglMultiTexCoord4dvARB; + glMultiTexCoord4fARB: TglMultiTexCoord4fARB; + glMultiTexCoord4fvARB: TglMultiTexCoord4fvARB; + glMultiTexCoord4iARB: TglMultiTexCoord4iARB; + glMultiTexCoord4ivARB: TglMultiTexCoord4ivARB; + glMultiTexCoord4sARB: TglMultiTexCoord4sARB; + glMultiTexCoord4svARB: TglMultiTexCoord4svARB; + + // GL_ARB_point_parameters + glPointParameterfARB: TglPointParameterfARB; + glPointParameterfvARB: TglPointParameterfvARB; + + // GL_ARB_texture_compression + glCompressedTexImage3DARB: TglCompressedTexImage3DARB; + glCompressedTexImage2DARB: TglCompressedTexImage2DARB; + glCompressedTexImage1DARB: TglCompressedTexImage1DARB; + glCompressedTexSubImage3DARB: TglCompressedTexSubImage3DARB; + glCompressedTexSubImage2DARB: TglCompressedTexSubImage2DARB; + glCompressedTexSubImage1DARB: TglCompressedTexSubImage1DARB; + glGetCompressedTexImageARB: TglGetCompressedTexImageARB; + + // GL_ARB_transpose_matrix + glLoadTransposeMatrixfARB: TglLoadTransposeMatrixfARB; + glLoadTransposeMatrixdARB: TglLoadTransposeMatrixdARB; + glMultTransposeMatrixfARB: TglMultTransposeMatrixfARB; + glMultTransposeMatrixdARB: TglMultTransposeMatrixdARB; + + // GL_ARB_vertex_blend + glWeightbvARB: TglWeightbvARB; + glWeightsvARB: TglWeightsvARB; + glWeightivARB: TglWeightivARB; + glWeightfvARB: TglWeightfvARB; + glWeightdvARB: TglWeightdvARB; + glWeightubvARB: TglWeightubvARB; + glWeightusvARB: TglWeightusvARB; + glWeightuivARB: TglWeightuivARB; + glWeightPointerARB: TglWeightPointerARB; + glVertexBlendARB: TglVertexBlendARB; + + // GL_ARB_vertex_buffer_object + glBindBufferARB: TglBindBufferARB; + glDeleteBuffersARB: TglDeleteBuffersARB; + glGenBuffersARB: TglGenBuffersARB; + glIsBufferARB: TglIsBufferARB; + glBufferDataARB: TglBufferDataARB; + glBufferSubDataARB: TglBufferSubData; + glGetBufferSubDataARB: TglGetBufferSubDataARB; + glMapBufferARB: TglMapBufferARB; + glUnmapBufferARB: TglUnmapBufferARB; + glGetBufferParameterivARB: TglGetBufferParameterivARB; + glGetBufferPointervARB: TglGetBufferPointervARB; + + // GL_ARB_vertex_program + glVertexAttrib1dARB: TglVertexAttrib1dARB; + glVertexAttrib1dvARB: TglVertexAttrib1dvARB; + glVertexAttrib1fARB: TglVertexAttrib1fARB; + glVertexAttrib1fvARB: TglVertexAttrib1fvARB; + glVertexAttrib1sARB: TglVertexAttrib1sARB; + glVertexAttrib1svARB: TglVertexAttrib1svARB; + glVertexAttrib2dARB: TglVertexAttrib2dARB; + glVertexAttrib2dvARB: TglVertexAttrib2dvARB; + glVertexAttrib2fARB: TglVertexAttrib2fARB; + glVertexAttrib2fvARB: TglVertexAttrib2fvARB; + glVertexAttrib2sARB: TglVertexAttrib2sARB; + glVertexAttrib2svARB: TglVertexAttrib2svARB; + glVertexAttrib3dARB: TglVertexAttrib3dARB; + glVertexAttrib3dvARB: TglVertexAttrib3dvARB; + glVertexAttrib3fARB: TglVertexAttrib3fARB; + glVertexAttrib3fvARB: TglVertexAttrib3fvARB; + glVertexAttrib3sARB: TglVertexAttrib3sARB; + glVertexAttrib3svARB: TglVertexAttrib3svARB; + glVertexAttrib4NbvARB: TglVertexAttrib4NbvARB; + glVertexAttrib4NivARB: TglVertexAttrib4NivARB; + glVertexAttrib4NsvARB: TglVertexAttrib4NsvARB; + glVertexAttrib4NubARB: TglVertexAttrib4NubARB; + glVertexAttrib4NubvARB: TglVertexAttrib4NubvARB; + glVertexAttrib4NuivARB: TglVertexAttrib4NuivARB; + glVertexAttrib4NusvARB: TglVertexAttrib4NusvARB; + glVertexAttrib4bvARB: TglVertexAttrib4bvARB; + glVertexAttrib4dARB: TglVertexAttrib4dARB; + glVertexAttrib4dvARB: TglVertexAttrib4dvARB; + glVertexAttrib4fARB: TglVertexAttrib4fARB; + glVertexAttrib4fvARB: TglVertexAttrib4fvARB; + glVertexAttrib4ivARB: TglVertexAttrib4ivARB; + glVertexAttrib4sARB: TglVertexAttrib4sARB; + glVertexAttrib4svARB: TglVertexAttrib4svARB; + glVertexAttrib4ubvARB: TglVertexAttrib4ubvARB; + glVertexAttrib4uivARB: TglVertexAttrib4uivARB; + glVertexAttrib4usvARB: TglVertexAttrib4usvARB; + glVertexAttribPointerARB: TglVertexAttribPointerARB; + glEnableVertexAttribArrayARB: TglEnableVertexAttribArrayARB; + glDisableVertexAttribArrayARB: TglDisableVertexAttribArrayARB; + glProgramStringARB: TglProgramStringARB; + glBindProgramARB: TglBindProgramARB; + glDeleteProgramsARB: TglDeleteProgramsARB; + glGenProgramsARB: TglGenProgramsARB; + + glProgramEnvParameter4dARB: TglProgramEnvParameter4dARB; + glProgramEnvParameter4dvARB: TglProgramEnvParameter4dvARB; + glProgramEnvParameter4fARB: TglProgramEnvParameter4fARB; + glProgramEnvParameter4fvARB: TglProgramEnvParameter4fvARB; + glProgramLocalParameter4dARB: TglProgramLocalParameter4dARB; + glProgramLocalParameter4dvARB: TglProgramLocalParameter4dvARB; + glProgramLocalParameter4fARB: TglProgramLocalParameter4fARB; + glProgramLocalParameter4fvARB: TglProgramLocalParameter4fvARB; + glGetProgramEnvParameterdvARB: TglGetProgramEnvParameterdvARB; + glGetProgramEnvParameterfvARB: TglGetProgramEnvParameterfvARB; + glGetProgramLocalParameterdvARB: TglGetProgramLocalParameterdvARB; + glGetProgramLocalParameterfvARB: TglGetProgramLocalParameterfvARB; + glGetProgramivARB: TglGetProgramivARB; + glGetProgramStringARB: TglGetProgramStringARB; + glGetVertexAttribdvARB: TglGetVertexAttribdvARB; + glGetVertexAttribfvARB: TglGetVertexAttribfvARB; + glGetVertexAttribivARB: TglGetVertexAttribivARB; + glGetVertexAttribPointervARB: TglGetVertexAttribPointervARB; + glIsProgramARB: TglIsProgramARB; + + // GL_ARB_window_pos + glWindowPos2dARB: TglWindowPos2dARB; + glWindowPos2dvARB: TglWindowPos2dvARB; + glWindowPos2fARB: TglWindowPos2fARB; + glWindowPos2fvARB: TglWindowPos2fvARB; + glWindowPos2iARB: TglWindowPos2iARB; + glWindowPos2ivARB: TglWindowPos2ivARB; + glWindowPos2sARB: TglWindowPos2sARB; + glWindowPos2svARB: TglWindowPos2svARB; + glWindowPos3dARB: TglWindowPos3dARB; + glWindowPos3dvARB: TglWindowPos3dvARB; + glWindowPos3fARB: TglWindowPos3fARB; + glWindowPos3fvARB: TglWindowPos3fvARB; + glWindowPos3iARB: TglWindowPos3iARB; + glWindowPos3ivARB: TglWindowPos3ivARB; + glWindowPos3sARB: TglWindowPos3sARB; + glWindowPos3svARB: TglWindowPos3svARB; + + // GL_ARB_draw_buffers + glDrawBuffersARB: TglDrawBuffersARB; + + // GL_ARB_color_buffer_float + glClampColorARB: TglClampColorARB; + + // GL_ARB_vertex_shader + glGetActiveAttribARB: TglGetActiveAttribARB; + glGetAttribLocationARB: TglGetAttribLocationARB; + glBindAttribLocationARB: TglBindAttribLocationARB; + + // GL_ARB_shader_objects + glDeleteObjectARB: TglDeleteObjectARB; + glGetHandleARB: TglGetHandleARB; + glDetachObjectARB: TglDetachObjectARB; + glCreateShaderObjectARB: TglCreateShaderObjectARB; + glShaderSourceARB: TglShaderSourceARB; + glCompileShaderARB: TglCompileShaderARB; + glCreateProgramObjectARB: TglCreateProgramObjectARB; + glAttachObjectARB: TglAttachObjectARB; + glLinkProgramARB: TglLinkProgramARB; + glUseProgramObjectARB: TglUseProgramObjectARB; + glValidateProgramARB: TglValidateProgramARB; + glUniform1fARB: TglUniform1fARB; + glUniform2fARB: TglUniform2fARB; + glUniform3fARB: TglUniform3fARB; + glUniform4fARB: TglUniform4fARB; + glUniform1iARB: TglUniform1iARB; + glUniform2iARB: TglUniform2iARB; + glUniform3iARB: TglUniform3iARB; + glUniform4iARB: TglUniform4iARB; + glUniform1fvARB: TglUniform1fvARB; + glUniform2fvARB: TglUniform2fvARB; + glUniform3fvARB: TglUniform3fvARB; + glUniform4fvARB: TglUniform4fvARB; + glUniform1ivARB: TglUniform1ivARB; + glUniform2ivARB: TglUniform2ivARB; + glUniform3ivARB: TglUniform3ivARB; + glUniform4ivARB: TglUniform4ivARB; + glUniformMatrix2fvARB: TglUniformMatrix2fvARB; + glUniformMatrix3fvARB: TglUniformMatrix3fvARB; + glUniformMatrix4fvARB: TglUniformMatrix4fvARB; + glGetObjectParameterfvARB: TglGetObjectParameterfvARB; + glGetObjectParameterivARB: TglGetObjectParameterivARB; + glGetInfoLogARB: TglGetInfoLogARB; + glGetAttachedObjectsARB: TglGetAttachedObjectsARB; + glGetUniformLocationARB: TglGetUniformLocationARB; + glGetActiveUniformARB: TglGetActiveUniformARB; + glGetUniformfvARB: TglGetUniformfvARB; + glGetUniformivARB: TglGetUniformivARB; + glGetShaderSourceARB: TglGetShaderSourceARB; + + // GL_ARB_Occlusion_Query + glGenQueriesARB: TglGenQueriesARB; + glDeleteQueriesARB: TglDeleteQueriesARB; + glIsQueryARB: TglIsQueryARB; + glBeginQueryARB: TglBeginQueryARB; + glEndQueryARB: TglEndQueryARB; + glGetQueryivARB: TglGetQueryivARB; + glGetQueryObjectivARB: TglGetQueryObjectivARB; + glGetQueryObjectuivARB: TglGetQueryObjectuivARB; + + // GL_ARB_draw_instanced + glDrawArraysInstancedARB: TglDrawArraysInstancedARB; + glDrawElementsInstancedARB: TglDrawElementsInstancedARB; + + // GL_ARB_framebuffer_object + glIsRenderbuffer: TglIsRenderbuffer; + glBindRenderbuffer: TglBindRenderbuffer; + glDeleteRenderbuffers: TglDeleteRenderbuffers; + glGenRenderbuffers: TglGenRenderbuffers; + glRenderbufferStorage: TglRenderbufferStorage; + glGetRenderbufferParameteriv: TglGetRenderbufferParameteriv; + glIsFramebuffer: TglIsFramebuffer; + glBindFramebuffer: TglBindFramebuffer; + glDeleteFramebuffers: TglDeleteFramebuffers; + glGenFramebuffers: TglGenFramebuffers; + glCheckFramebufferStatus: TglCheckFramebufferStatus; + glFramebufferTexture1D: TglFramebufferTexture1D; + glFramebufferTexture2D: TglFramebufferTexture2D; + glFramebufferTexture3D: TglFramebufferTexture3D; + glFramebufferRenderbuffer: TglFramebufferRenderbuffer; + glGetFramebufferAttachmentParameteriv: TglGetFramebufferAttachmentParameteriv; + glGenerateMipmap: TglGenerateMipmap; + glBlitFramebuffer: TglBlitFramebuffer; + glRenderbufferStorageMultisample: TglRenderbufferStorageMultisample; + glFramebufferTextureLayer: TglFramebufferTextureLayer; + + // GL_ARB_geometry_shader4 + glProgramParameteriARB: TglProgramParameteriARB; + glFramebufferTextureARB: TglFramebufferTextureARB; + glFramebufferTextureLayerARB: TglFramebufferTextureLayerARB; + glFramebufferTextureFaceARB: TglFramebufferTextureFaceARB; + + // GL_ARB_instanced_arrays + glVertexAttribDivisorARB: TglVertexAttribDivisorARB; + + // GL_ARB_map_buffer_range + glMapBufferRange: TglMapBufferRange; + glFlushMappedBufferRange: TglFlushMappedBufferRange; + + // GL_ARB_texture_buffer_object + glTexBufferARB: TglTexBufferARB; + + // GL_ARB_vertex_array_object + glBindVertexArray: TglBindVertexArray; + glDeleteVertexArrays: TglDeleteVertexArrays; + glGenVertexArrays: TglGenVertexArrays; + glIsVertexArray: TglIsVertexArray; + + // GL_ARB_uniform_buffer_object + glGetUniformIndices: TglGetUniformIndices; + glGetActiveUniformsiv: TglGetActiveUniformsiv; + glGetActiveUniformName: TglGetActiveUniformName; + glGetUniformBlockIndex: TglGetUniformBlockIndex; + glGetActiveUniformBlockiv: TglGetActiveUniformBlockiv; + glGetActiveUniformBlockName: TglGetActiveUniformBlockName; + glUniformBlockBinding: TglUniformBlockBinding; + + // GL_ARB_copy_buffer + glCopyBufferSubData: TglCopyBufferSubData; + + // GL_ARB_draw_elements_base_vertex + glDrawElementsBaseVertex: TglDrawElementsBaseVertex; + glDrawRangeElementsBaseVertex: TglDrawRangeElementsBaseVertex; + glDrawElementsInstancedBaseVertex: TglDrawElementsInstancedBaseVertex; + glMultiDrawElementsBaseVertex: TglMultiDrawElementsBaseVertex; + + // GL_ARB_provoking_vertex + glProvokingVertex: TglProvokingVertex; + + // GL_ARB_sync + glFenceSync: TglFenceSync; + glIsSync: TglIsSync; + glDeleteSync: TglDeleteSync; + glClientWaitSync: TglClientWaitSync; + glWaitSync: TglWaitSync; + glGetInteger64v: TglGetInteger64v; + glGetSynciv: TglGetSynciv; + + // GL_ARB_texture_multisample + glTexImage2DMultisample: TglTexImage2DMultisample; + glTexImage3DMultisample: TglTexImage3DMultisample; + glGetMultisamplefv: TglGetMultisamplefv; + glSampleMaski: TglSampleMaski; + + // GL_ARB_draw_buffers_blend + glBlendEquationi: TglBlendEquationi; + glBlendEquationSeparatei: TglBlendEquationSeparatei; + glBlendFunci: TglBlendFunci; + glBlendFuncSeparatei: TglBlendFuncSeparatei; + + // GL_ARB_sample_shading + glMinSampleShading: TglMinSampleShading; + + // GL_ATI_draw_buffers + glDrawBuffersATI: TglDrawBuffersATI; + + // GL_ATI_element_array + glElementPointerATI: TglElementPointerATI; + glDrawElementArrayATI: TglDrawElementArrayATI; + glDrawRangeElementArrayATI: TglDrawRangeElementArrayATI; + + // GL_ATI_envmap_bumpmap + glTexBumpParameterivATI: TglTexBumpParameterivATI; + glTexBumpParameterfvATI: TglTexBumpParameterfvATI; + glGetTexBumpParameterivATI: TglGetTexBumpParameterivATI; + glGetTexBumpParameterfvATI: TglGetTexBumpParameterfvATI; + + // GL_ATI_fragment_shader + glGenFragmentShadersATI: TglGenFragmentShadersATI; + glBindFragmentShaderATI: TglBindFragmentShaderATI; + glDeleteFragmentShaderATI: TglDeleteFragmentShaderATI; + glBeginFragmentShaderATI: TglBeginFragmentShaderATI; + glEndFragmentShaderATI: TglEndFragmentShaderATI; + glPassTexCoordATI: TglPassTexCoordATI; + glSampleMapATI: TglSampleMapATI; + glColorFragmentOp1ATI: TglColorFragmentOp1ATI; + glColorFragmentOp2ATI: TglColorFragmentOp2ATI; + glColorFragmentOp3ATI: TglColorFragmentOp3ATI; + glAlphaFragmentOp1ATI: TglAlphaFragmentOp1ATI; + glAlphaFragmentOp2ATI: TglAlphaFragmentOp2ATI; + glAlphaFragmentOp3ATI: TglAlphaFragmentOp3ATI; + glSetFragmentShaderConstantATI: TglSetFragmentShaderConstantATI; + + // GL_ATI_map_object_buffer + glMapObjectBufferATI: TglMapObjectBufferATI; + glUnmapObjectBufferATI: TglUnmapObjectBufferATI; + + // GL_ATI_pn_triangles + glPNTrianglesiATI: TglPNTrianglesiATI; + glPNTrianglesfATI: TglPNTrianglesfATI; + + // GL_ATI_separate_stencil + glStencilOpSeparateATI: TglStencilOpSeparateATI; + glStencilFuncSeparateATI: TglStencilFuncSeparateATI; + + // GL_ATI_vertex_array_object + glNewObjectBufferATI: TglNewObjectBufferATI; + glIsObjectBufferATI: TglIsObjectBufferATI; + glUpdateObjectBufferATI: TglUpdateObjectBufferATI; + glGetObjectBufferfvATI: TglGetObjectBufferfvATI; + glGetObjectBufferivATI: TglGetObjectBufferivATI; + glFreeObjectBufferATI: TglFreeObjectBufferATI; + glArrayObjectATI: TglArrayObjectATI; + glGetArrayObjectfvATI: TglGetArrayObjectfvATI; + glGetArrayObjectivATI: TglGetArrayObjectivATI; + glVariantArrayObjectATI: TglVariantArrayObjectATI; + glGetVariantArrayObjectfvATI: TglGetVariantArrayObjectfvATI; + glGetVariantArrayObjectivATI: TglGetVariantArrayObjectivATI; + glVertexAttribArrayObjectATI: TglVertexAttribArrayObjectATI; + glGetVertexAttribArrayObjectfvATI: TglGetVertexAttribArrayObjectfvATI; + glGetVertexAttribArrayObjectivATI: TglGetVertexAttribArrayObjectivATI; + + // GL_ATI_vertex_streams + glVertexStream1sATI: TglVertexStream1sATI; + glVertexStream1svATI: TglVertexStream1svATI; + glVertexStream1iATI: TglVertexStream1iATI; + glVertexStream1ivATI: TglVertexStream1ivATI; + glVertexStream1fATI: TglVertexStream1fATI; + glVertexStream1fvATI: TglVertexStream1fvATI; + glVertexStream1dATI: TglVertexStream1dATI; + glVertexStream1dvATI: TglVertexStream1dvATI; + glVertexStream2sATI: TglVertexStream2sATI; + glVertexStream2svATI: TglVertexStream2svATI; + glVertexStream2iATI: TglVertexStream2iATI; + glVertexStream2ivATI: TglVertexStream2ivATI; + glVertexStream2fATI: TglVertexStream2fATI; + glVertexStream2fvATI: TglVertexStream2fvATI; + glVertexStream2dATI: TglVertexStream2dATI; + glVertexStream2dvATI: TglVertexStream2dvATI; + glVertexStream3sATI: TglVertexStream3sATI; + glVertexStream3svATI: TglVertexStream3svATI; + glVertexStream3iATI: TglVertexStream3iATI; + glVertexStream3ivATI: TglVertexStream3ivATI; + glVertexStream3fATI: TglVertexStream3fATI; + glVertexStream3fvATI: TglVertexStream3fvATI; + glVertexStream3dATI: TglVertexStream3dATI; + glVertexStream3dvATI: TglVertexStream3dvATI; + glVertexStream4sATI: TglVertexStream4sATI; + glVertexStream4svATI: TglVertexStream4svATI; + glVertexStream4iATI: TglVertexStream4iATI; + glVertexStream4ivATI: TglVertexStream4ivATI; + glVertexStream4fATI: TglVertexStream4fATI; + glVertexStream4fvATI: TglVertexStream4fvATI; + glVertexStream4dATI: TglVertexStream4dATI; + glVertexStream4dvATI: TglVertexStream4dvATI; + glNormalStream3bATI: TglNormalStream3bATI; + glNormalStream3bvATI: TglNormalStream3bvATI; + glNormalStream3sATI: TglNormalStream3sATI; + glNormalStream3svATI: TglNormalStream3svATI; + glNormalStream3iATI: TglNormalStream3iATI; + glNormalStream3ivATI: TglNormalStream3ivATI; + glNormalStream3fATI: TglNormalStream3fATI; + glNormalStream3fvATI: TglNormalStream3fvATI; + glNormalStream3dATI: TglNormalStream3dATI; + glNormalStream3dvATI: TglNormalStream3dvATI; + glClientActiveVertexStreamATI: TglClientActiveVertexStreamATI; + glVertexBlendEnviATI: TglVertexBlendEnviATI; + glVertexBlendEnvfATI: TglVertexBlendEnvfATI; + + // GL_AMD_performance_monitor + glGetPerfMonitorGroupsAMD: TglGetPerfMonitorGroupsAMD; + glGetPerfMonitorCountersAMD: TglGetPerfMonitorCountersAMD; + glGetPerfMonitorGroupStringAMD: TglGetPerfMonitorGroupStringAMD; + glGetPerfMonitorCounterStringAMD: TglGetPerfMonitorCounterStringAMD; + glGetPerfMonitorCounterInfoAMD: TglGetPerfMonitorCounterInfoAMD; + glGenPerfMonitorsAMD: TglGenPerfMonitorsAMD; + glDeletePerfMonitorsAMD: TglDeletePerfMonitorsAMD; + glSelectPerfMonitorCountersAMD: TglSelectPerfMonitorCountersAMD; + glBeginPerfMonitorAMD: TglBeginPerfMonitorAMD; + glEndPerfMonitorAMD: TglEndPerfMonitorAMD; + glGetPerfMonitorCounterDataAMD: TglGetPerfMonitorCounterDataAMD; + + // GL_EXT_blend_color + glBlendColorEXT: TglBlendColorEXT; + + // GL_EXT_blend_func_separate + glBlendFuncSeparateEXT: TglBlendFuncSeparateEXT; + + // GL_EXT_blend_minmax + glBlendEquationEXT: TglBlendEquationEXT; + + // GL_EXT_color_subtable + glColorSubTableEXT: TglColorSubTableEXT; + glCopyColorSubTableEXT: TglCopyColorSubTableEXT; + + // GL_EXT_compiled_vertex_array + glLockArraysEXT: TglLockArraysEXT; + glUnlockArraysEXT: TglUnlockArraysEXT; + + // GL_EXT_convolution + glConvolutionFilter1DEXT: TglConvolutionFilter1DEXT; + glConvolutionFilter2DEXT: TglConvolutionFilter2DEXT; + glConvolutionParameterfEXT: TglConvolutionParameterfEXT; + glConvolutionParameterfvEXT: TglConvolutionParameterfvEXT; + glConvolutionParameteriEXT: TglConvolutionParameteriEXT; + glConvolutionParameterivEXT: TglConvolutionParameterivEXT; + glCopyConvolutionFilter1DEXT: TglCopyConvolutionFilter1DEXT; + glCopyConvolutionFilter2DEXT: TglCopyConvolutionFilter2DEXT; + glGetConvolutionFilterEXT: TglGetConvolutionFilterEXT; + glGetConvolutionParameterfvEXT: TglGetConvolutionParameterfvEXT; + glGetConvolutionParameterivEXT: TglGetConvolutionParameterivEXT; + glGetSeparableFilterEXT: TglGetSeparableFilterEXT; + glSeparableFilter2DEXT: TglSeparableFilter2DEXT; + + // GL_EXT_coordinate_frame + glTangent3bEXT: TglTangent3bEXT; + glTangent3bvEXT: TglTangent3bvEXT; + glTangent3dEXT: TglTangent3dEXT; + glTangent3dvEXT: TglTangent3dvEXT; + glTangent3fEXT: TglTangent3fEXT; + glTangent3fvEXT: TglTangent3fvEXT; + glTangent3iEXT: TglTangent3iEXT; + glTangent3ivEXT: TglTangent3ivEXT; + glTangent3sEXT: TglTangent3sEXT; + glTangent3svEXT: TglTangent3svEXT; + glBinormal3bEXT: TglBinormal3bEXT; + glBinormal3bvEXT: TglBinormal3bvEXT; + glBinormal3dEXT: TglBinormal3dEXT; + glBinormal3dvEXT: TglBinormal3dvEXT; + glBinormal3fEXT: TglBinormal3fEXT; + glBinormal3fvEXT: TglBinormal3fvEXT; + glBinormal3iEXT: TglBinormal3iEXT; + glBinormal3ivEXT: TglBinormal3ivEXT; + glBinormal3sEXT: TglBinormal3sEXT; + glBinormal3svEXT: TglBinormal3svEXT; + glTangentPointerEXT: TglTangentPointerEXT; + glBinormalPointerEXT: TglBinormalPointerEXT; + + // GL_EXT_copy_texture + glCopyTexImage1DEXT: TglCopyTexImage1DEXT; + glCopyTexImage2DEXT: TglCopyTexImage2DEXT; + glCopyTexSubImage1DEXT: TglCopyTexSubImage1DEXT; + glCopyTexSubImage2DEXT: TglCopyTexSubImage2DEXT; + glCopyTexSubImage3DEXT: TglCopyTexSubImage3DEXT; + + // GL_EXT_cull_vertex + glCullParameterdvEXT: TglCullParameterdvEXT; + glCullParameterfvEXT: TglCullParameterfvEXT; + + // GL_EXT_draw_range_elements + glDrawRangeElementsEXT: TglDrawRangeElementsEXT; + + // GL_EXT_fog_coord + glFogCoordfEXT: TglFogCoordfEXT; + glFogCoordfvEXT: TglFogCoordfvEXT; + glFogCoorddEXT: TglFogCoorddEXT; + glFogCoorddvEXT: TglFogCoorddvEXT; + glFogCoordPointerEXT: TglFogCoordPointerEXT; + + // GL_EXT_framebuffer_object + glIsRenderbufferEXT: TglIsRenderbufferEXT; + glBindRenderbufferEXT: TglBindRenderbufferEXT; + glDeleteRenderbuffersEXT: TglDeleteRenderbuffersEXT; + glGenRenderbuffersEXT: TglGenRenderbuffersEXT; + glRenderbufferStorageEXT: TglRenderbufferStorageEXT; + glGetRenderbufferParameterivEXT: TglGetRenderbufferParameterivEXT; + glIsFramebufferEXT: TglIsFramebufferEXT; + glBindFramebufferEXT: TglBindFramebufferEXT; + glDeleteFramebuffersEXT: TglDeleteFramebuffersEXT; + glGenFramebuffersEXT: TglGenFramebuffersEXT; + glCheckFramebufferStatusEXT: TglCheckFramebufferStatusEXT; + glFramebufferTexture1DEXT: TglFramebufferTexture1DEXT; + glFramebufferTexture2DEXT: TglFramebufferTexture2DEXT; + glFramebufferTexture3DEXT: TglFramebufferTexture3DEXT; + glFramebufferRenderbufferEXT: TglFramebufferRenderbufferEXT; + glGetFramebufferAttachmentParameterivEXT: TglGetFramebufferAttachmentParameterivEXT; + glGenerateMipmapEXT: TglGenerateMipmapEXT; + + // GL_EXT_histogram + glGetHistogramEXT: TglGetHistogramEXT; + glGetHistogramParameterfvEXT: TglGetHistogramParameterfvEXT; + glGetHistogramParameterivEXT: TglGetHistogramParameterivEXT; + glGetMinmaxEXT: TglGetMinmaxEXT; + glGetMinmaxParameterfvEXT: TglGetMinmaxParameterfvEXT; + glGetMinmaxParameterivEXT: TglGetMinmaxParameterivEXT; + glHistogramEXT: TglHistogramEXT; + glMinmaxEXT: TglMinmaxEXT; + glResetHistogramEXT: TglResetHistogramEXT; + glResetMinmaxEXT: TglResetMinmaxEXT; + + // GL_EXT_index_func + glIndexFuncEXT: TglIndexFuncEXT; + + // GL_EXT_index_material + glIndexMaterialEXT: TglIndexMaterialEXT; + + // GL_EXT_light_texture + glApplyTextureEXT: TglApplyTextureEXT; + glTextureLightEXT: TglTextureLightEXT; + glTextureMaterialEXT: TglTextureMaterialEXT; + + // GL_EXT_multi_draw_arrays + glMultiDrawArraysEXT: TglMultiDrawArraysEXT; + glMultiDrawElementsEXT: TglMultiDrawElementsEXT; + + // GL_EXT_multisample + glSampleMaskEXT: TglSampleMaskEXT; + glSamplePatternEXT: TglSamplePatternEXT; + + // GL_EXT_paletted_texture + glColorTableEXT: TglColorTableEXT; + glGetColorTableEXT: TglGetColorTableEXT; + glGetColorTableParameterivEXT: TglGetColorTableParameterivEXT; + glGetColorTableParameterfvEXT: TglGetColorTableParameterfvEXT; + + // GL_EXT_pixel_transform + glPixelTransformParameteriEXT: TglPixelTransformParameteriEXT; + glPixelTransformParameterfEXT: TglPixelTransformParameterfEXT; + glPixelTransformParameterivEXT: TglPixelTransformParameterivEXT; + glPixelTransformParameterfvEXT: TglPixelTransformParameterfvEXT; + + // GL_EXT_point_parameters + glPointParameterfEXT: TglPointParameterfEXT; + glPointParameterfvEXT: TglPointParameterfvEXT; + + // GL_EXT_polygon_offset + glPolygonOffsetEXT: TglPolygonOffsetEXT; + + // GL_EXT_secondary_color + glSecondaryColor3bEXT: TglSecondaryColor3bEXT; + glSecondaryColor3bvEXT: TglSecondaryColor3bvEXT; + glSecondaryColor3dEXT: TglSecondaryColor3dEXT; + glSecondaryColor3dvEXT: TglSecondaryColor3dvEXT; + glSecondaryColor3fEXT: TglSecondaryColor3fEXT; + glSecondaryColor3fvEXT: TglSecondaryColor3fvEXT; + glSecondaryColor3iEXT: TglSecondaryColor3iEXT; + glSecondaryColor3ivEXT: TglSecondaryColor3ivEXT; + glSecondaryColor3sEXT: TglSecondaryColor3sEXT; + glSecondaryColor3svEXT: TglSecondaryColor3svEXT; + glSecondaryColor3ubEXT: TglSecondaryColor3ubEXT; + glSecondaryColor3ubvEXT: TglSecondaryColor3ubvEXT; + glSecondaryColor3uiEXT: TglSecondaryColor3uiEXT; + glSecondaryColor3uivEXT: TglSecondaryColor3uivEXT; + glSecondaryColor3usEXT: TglSecondaryColor3usEXT; + glSecondaryColor3usvEXT: TglSecondaryColor3usvEXT; + glSecondaryColorPointerEXT: TglSecondaryColorPointerEXT; + + // GL_EXT_stencil_two_side + glActiveStencilFaceEXT: TglActiveStencilFaceEXT; + + // GL_EXT_subtexture + glTexSubImage1DEXT: TglTexSubImage1DEXT; + glTexSubImage2DEXT: TglTexSubImage2DEXT; + + // GL_EXT_texture3D + glTexImage3DEXT: TglTexImage3DEXT; + glTexSubImage3DEXT: TglTexSubImage3DEXT; + + // GL_EXT_texture_object + glAreTexturesResidentEXT: TglAreTexturesResidentEXT; + glBindTextureEXT: TglBindTextureEXT; + glDeleteTexturesEXT: TglDeleteTexturesEXT; + glGenTexturesEXT: TglGenTexturesEXT; + glIsTextureEXT: TglIsTextureEXT; + glPrioritizeTexturesEXT: TglPrioritizeTexturesEXT; + + // GL_EXT_texture_perturb_normal + glTextureNormalEXT: TglTextureNormalEXT; + + // GL_EXT_vertex_array + glArrayElementEXT: TglArrayElementEXT; + glColorPointerEXT: TglColorPointerEXT; + glDrawArraysEXT: TglDrawArraysEXT; + glEdgeFlagPointerEXT: TglEdgeFlagPointerEXT; + glGetPointervEXT: TglGetPointervEXT; + glIndexPointerEXT: TglIndexPointerEXT; + glNormalPointerEXT: TglNormalPointerEXT; + glTexCoordPointerEXT: TglTexCoordPointerEXT; + glVertexPointerEXT: TglVertexPointerEXT; + + // GL_EXT_vertex_shader + glBeginVertexShaderEXT: TglBeginVertexShaderEXT; + glEndVertexShaderEXT: TglEndVertexShaderEXT; + glBindVertexShaderEXT: TglBindVertexShaderEXT; + glGenVertexShadersEXT: TglGenVertexShadersEXT; + glDeleteVertexShaderEXT: TglDeleteVertexShaderEXT; + glShaderOp1EXT: TglShaderOp1EXT; + glShaderOp2EXT: TglShaderOp2EXT; + glShaderOp3EXT: TglShaderOp3EXT; + glSwizzleEXT: TglSwizzleEXT; + glWriteMaskEXT: TglWriteMaskEXT; + glInsertComponentEXT: TglInsertComponentEXT; + glExtractComponentEXT: TglExtractComponentEXT; + glGenSymbolsEXT: TglGenSymbolsEXT; + glSetInvariantEXT: TglSetInvariantEXT; + glSetLocalConstantEXT: TglSetLocalConstantEXT; + glVariantbvEXT: TglVariantbvEXT; + glVariantsvEXT: TglVariantsvEXT; + glVariantivEXT: TglVariantivEXT; + glVariantfvEXT: TglVariantfvEXT; + glVariantdvEXT: TglVariantdvEXT; + glVariantubvEXT: TglVariantubvEXT; + glVariantusvEXT: TglVariantusvEXT; + glVariantuivEXT: TglVariantuivEXT; + glVariantPointerEXT: TglVariantPointerEXT; + glEnableVariantClientStateEXT: TglEnableVariantClientStateEXT; + glDisableVariantClientStateEXT: TglDisableVariantClientStateEXT; + glBindLightParameterEXT: TglBindLightParameterEXT; + glBindMaterialParameterEXT: TglBindMaterialParameterEXT; + glBindTexGenParameterEXT: TglBindTexGenParameterEXT; + glBindTextureUnitParameterEXT: TglBindTextureUnitParameterEXT; + glBindParameterEXT: TglBindParameterEXT; + glIsVariantEnabledEXT: TglIsVariantEnabledEXT; + glGetVariantBooleanvEXT: TglGetVariantBooleanvEXT; + glGetVariantIntegervEXT: TglGetVariantIntegervEXT; + glGetVariantFloatvEXT: TglGetVariantFloatvEXT; + glGetVariantPointervEXT: TglGetVariantPointervEXT; + glGetInvariantBooleanvEXT: TglGetInvariantBooleanvEXT; + glGetInvariantIntegervEXT: TglGetInvariantIntegervEXT; + glGetInvariantFloatvEXT: TglGetInvariantFloatvEXT; + glGetLocalConstantBooleanvEXT: TglGetLocalConstantBooleanvEXT; + glGetLocalConstantIntegervEXT: TglGetLocalConstantIntegervEXT; + glGetLocalConstantFloatvEXT: TglGetLocalConstantFloatvEXT; + + // GL_EXT_vertex_weighting + glVertexWeightfEXT: TglVertexWeightfEXT; + glVertexWeightfvEXT: TglVertexWeightfvEXT; + glVertexWeightPointerEXT: TglVertexWeightPointerEXT; + + // GL_EXT_stencil_clear_tag + glStencilClearTagEXT: TglStencilClearTagEXT; + + // GL_EXT_framebuffer_blit + glBlitFramebufferEXT: TglBlitFramebufferEXT; + + // GL_EXT_framebuffer_multisample + glRenderbufferStorageMultisampleEXT: TglRenderbufferStorageMultisampleEXT; + + // GL_EXT_timer_query + glGetQueryObjecti64vEXT: TglGetQueryObjecti64vEXT; + glGetQueryObjectui64vEXT: TglGetQueryObjectui64vEXT; + + // GL_EXT_gpu_program_parameters + glProgramEnvParameters4fvEXT: TglProgramEnvParameters4fvEXT; + glProgramLocalParameters4fvEXT: TglProgramLocalParameters4fvEXT; + + // GL_EXT_bindable_uniform + glUniformBufferEXT: TglUniformBufferEXT; + glGetUniformBufferSizeEXT: TglGetUniformBufferSizeEXT; + glGetUniformOffsetEXT: TglGetUniformOffsetEXT; + + // GL_EXT_draw_buffers2 + glColorMaskIndexedEXT: TglColorMaskIndexedEXT; + glGetBooleanIndexedvEXT: TglGetBooleanIndexedvEXT; + glGetIntegerIndexedvEXT: TglGetIntegerIndexedvEXT; + glEnableIndexedEXT: TglEnableIndexedEXT; + glDisableIndexedEXT: TglDisableIndexedEXT; + glIsEnabledIndexedEXT: TglIsEnabledIndexedEXT; + + // GL_EXT_draw_instanced + glDrawArraysInstancedEXT: TglDrawArraysInstancedEXT; + glDrawElementsInstancedEXT: TglDrawElementsInstancedEXT; + + // GL_EXT_geometry_shader4 + glProgramParameteriEXT: TglProgramParameteriEXT; + glFramebufferTextureEXT: TglFramebufferTextureEXT; +// glFramebufferTextureLayerEXT: TglFramebufferTextureLayerEXT; + glFramebufferTextureFaceEXT: TglFramebufferTextureFaceEXT; + + // GL_EXT_gpu_shader4 + glVertexAttribI1iEXT: TglVertexAttribI1iEXT; + glVertexAttribI2iEXT: TglVertexAttribI2iEXT; + glVertexAttribI3iEXT: TglVertexAttribI3iEXT; + glVertexAttribI4iEXT: TglVertexAttribI4iEXT; + glVertexAttribI1uiEXT: TglVertexAttribI1uiEXT; + glVertexAttribI2uiEXT: TglVertexAttribI2uiEXT; + glVertexAttribI3uiEXT: TglVertexAttribI3uiEXT; + glVertexAttribI4uiEXT: TglVertexAttribI4uiEXT; + glVertexAttribI1ivEXT: TglVertexAttribI1ivEXT; + glVertexAttribI2ivEXT: TglVertexAttribI2ivEXT; + glVertexAttribI3ivEXT: TglVertexAttribI3ivEXT; + glVertexAttribI4ivEXT: TglVertexAttribI4ivEXT; + glVertexAttribI1uivEXT: TglVertexAttribI1uivEXT; + glVertexAttribI2uivEXT: TglVertexAttribI2uivEXT; + glVertexAttribI3uivEXT: TglVertexAttribI3uivEXT; + glVertexAttribI4uivEXT: TglVertexAttribI4uivEXT; + glVertexAttribI4bvEXT:TglVertexAttribI4bvEXT ; + glVertexAttribI4svEXT: TglVertexAttribI4svEXT; + glVertexAttribI4ubvEXT: TglVertexAttribI4ubvEXT; + glVertexAttribI4usvEXT: TglVertexAttribI4usvEXT; + glVertexAttribIPointerEXT: TglVertexAttribIPointerEXT; + glGetVertexAttribIivEXT: TglGetVertexAttribIivEXT; + glGetVertexAttribIuivEXT: TglGetVertexAttribIuivEXT; + glUniform1uiEXT: TglUniform1uiEXT; + glUniform2uiEXT: TglUniform2uiEXT; + glUniform3uiEXT: TglUniform3uiEXT; + glUniform4uiEXT: TglUniform4uiEXT; + glUniform1uivEXT: TglUniform1uivEXT; + glUniform2uivEXT: TglUniform2uivEXT; + glUniform3uivEXT: TglUniform3uivEXT; + glUniform4uivEXT: TglUniform4uivEXT; + glGetUniformuivEXT: TglGetUniformuivEXT; + glBindFragDataLocationEXT: TglBindFragDataLocationEXT; + glGetFragDataLocationEXT: TglGetFragDataLocationEXT; + + // GL_EXT_texture_array + glFramebufferTextureLayerEXT: TglFramebufferTextureLayerEXT; + + // GL_EXT_texture_buffer_object + glTexBufferEXT: TglTexBufferEXT; + + // GL_EXT_texture_integer + glClearColorIiEXT: TglClearColorIiEXT; + glClearColorIuiEXT: TglClearColorIuiEXT; + glTexParameterIivEXT: TglTexParameterIivEXT; + glTexParameterIuivEXT: TglTexParameterIuivEXT; + glGetTexParameterIivEXT: TglGetTexParameterIivEXT; + glGetTexParameterIiuvEXT: TglGetTexParameterIiuvEXT; + + // GL_EXT_transform_feedback + glBeginTransformFeedbackEXT: TglBeginTransformFeedbackEXT; + glEndTransformFeedbackEXT: TglEndTransformFeedbackEXT; + glBindBufferRangeEXT: TglBindBufferRangeEXT; + glBindBufferOffsetEXT: TglBindBufferOffsetEXT; + glBindBufferBaseEXT: TglBindBufferBaseEXT; + glTransformFeedbackVaryingsEXT: TglTransformFeedbackVaryingsEXT; + glGetTransformFeedbackVaryingEXT: TglGetTransformFeedbackVaryingEXT; + + // GL_EXT_direct_state_access + glClientAttribDefaultEXT: TglClientAttribDefaultEXT; + glPushClientAttribDefaultEXT: TglPushClientAttribDefaultEXT; + glMatrixLoadfEXT: TglMatrixLoadfEXT; + glMatrixLoaddEXT: TglMatrixLoaddEXT; + glMatrixMultfEXT: TglMatrixMultfEXT; + glMatrixMultdEXT: TglMatrixMultdEXT; + glMatrixLoadIdentityEXT: TglMatrixLoadIdentityEXT; + glMatrixRotatefEXT: TglMatrixRotatefEXT; + glMatrixRotatedEXT: TglMatrixRotatedEXT; + glMatrixScalefEXT: TglMatrixScalefEXT; + glMatrixScaledEXT: TglMatrixScaledEXT; + glMatrixTranslatefEXT: TglMatrixTranslatefEXT; + glMatrixTranslatedEXT: TglMatrixTranslatedEXT; + glMatrixFrustumEXT: TglMatrixFrustumEXT; + glMatrixOrthoEXT: TglMatrixOrthoEXT; + glMatrixPopEXT: TglMatrixPopEXT; + glMatrixPushEXT: TglMatrixPushEXT; + glMatrixLoadTransposefEXT: TglMatrixLoadTransposefEXT; + glMatrixLoadTransposedEXT: TglMatrixLoadTransposedEXT; + glMatrixMultTransposefEXT: TglMatrixMultTransposefEXT; + glMatrixMultTransposedEXT: TglMatrixMultTransposedEXT; + glTextureParameterfEXT: TglTextureParameterfEXT; + glTextureParameterfvEXT: TglTextureParameterfvEXT; + glTextureParameteriEXT: TglTextureParameteriEXT; + glTextureParameterivEXT: TglTextureParameterivEXT; + glTextureImage1DEXT: TglTextureImage1DEXT; + glTextureImage2DEXT: TglTextureImage2DEXT; + glTextureSubImage1DEXT: TglTextureSubImage1DEXT; + glTextureSubImage2DEXT: TglTextureSubImage2DEXT; + glCopyTextureImage1DEXT: TglCopyTextureImage1DEXT; + glCopyTextureImage2DEXT: TglCopyTextureImage2DEXT; + glCopyTextureSubImage1DEXT: TglCopyTextureSubImage1DEXT; + glCopyTextureSubImage2DEXT: TglCopyTextureSubImage2DEXT; + glGetTextureImageEXT: TglGetTextureImageEXT; + glGetTextureParameterfvEXT: TglGetTextureParameterfvEXT; + glGetTextureParameterivEXT: TglGetTextureParameterivEXT; + glGetTextureLevelParameterfvEXT: TglGetTextureLevelParameterfvEXT; + glGetTextureLevelParameterivEXT: TglGetTextureLevelParameterivEXT; + glTextureImage3DEXT: TglTextureImage3DEXT; + glTextureSubImage3DEXT: TglTextureSubImage3DEXT; + glCopyTextureSubImage3DEXT: TglCopyTextureSubImage3DEXT; + glMultiTexParameterfEXT: TglMultiTexParameterfEXT; + glMultiTexParameterfvEXT: TglMultiTexParameterfvEXT; + glMultiTexParameteriEXT: TglMultiTexParameteriEXT; + glMultiTexParameterivEXT: TglMultiTexParameterivEXT; + glMultiTexImage1DEXT: TglMultiTexImage1DEXT; + glMultiTexImage2DEXT: TglMultiTexImage2DEXT; + glMultiTexSubImage1DEXT: TglMultiTexSubImage1DEXT; + glMultiTexSubImage2DEXT: TglMultiTexSubImage2DEXT; + glCopyMultiTexImage1DEXT: TglCopyMultiTexImage1DEXT; + glCopyMultiTexImage2DEXT: TglCopyMultiTexImage2DEXT; + glCopyMultiTexSubImage1DEXT: TglCopyMultiTexSubImage1DEXT; + glCopyMultiTexSubImage2DEXT: TglCopyMultiTexSubImage2DEXT; + glGetMultiTexImageEXT: TglGetMultiTexImageEXT; + glGetMultiTexParameterfvEXT: TglGetMultiTexParameterfvEXT; + glGetMultiTexParameterivEXT: TglGetMultiTexParameterivEXT; + glGetMultiTexLevelParameterfvEXT: TglGetMultiTexLevelParameterfvEXT; + glGetMultiTexLevelParameterivEXT: TglGetMultiTexLevelParameterivEXT; + glMultiTexImage3DEXT: TglMultiTexImage3DEXT; + glMultiTexSubImage3DEXT: TglMultiTexSubImage3DEXT; + glCopyMultiTexSubImage3DEXT: TglCopyMultiTexSubImage3DEXT; + glBindMultiTextureEXT: TglBindMultiTextureEXT; + glEnableClientStateIndexedEXT: TglEnableClientStateIndexedEXT; + glDisableClientStateIndexedEXT: TglDisableClientStateIndexedEXT; + glMultiTexCoordPointerEXT: TglMultiTexCoordPointerEXT; + glMultiTexEnvfEXT: TglMultiTexEnvfEXT; + glMultiTexEnvfvEXT: TglMultiTexEnvfvEXT; + glMultiTexEnviEXT: TglMultiTexEnviEXT; + glMultiTexEnvivEXT: TglMultiTexEnvivEXT; + glMultiTexGendEXT: TglMultiTexGendEXT; + glMultiTexGendvEXT: TglMultiTexGendvEXT; + glMultiTexGenfEXT: TglMultiTexGenfEXT; + glMultiTexGenfvEXT: TglMultiTexGenfvEXT; + glMultiTexGeniEXT: TglMultiTexGeniEXT; + glMultiTexGenivEXT: TglMultiTexGenivEXT; + glGetMultiTexEnvfvEXT: TglGetMultiTexEnvfvEXT; + glGetMultiTexEnvivEXT: TglGetMultiTexEnvivEXT; + glGetMultiTexGendvEXT: TglGetMultiTexGendvEXT; + glGetMultiTexGenfvEXT: TglGetMultiTexGenfvEXT; + glGetMultiTexGenivEXT: TglGetMultiTexGenivEXT; + glGetFloatIndexedvEXT: TglGetFloatIndexedvEXT; + glGetDoubleIndexedvEXT: TglGetDoubleIndexedvEXT; + glGetPointerIndexedvEXT: TglGetPointerIndexedvEXT; + glCompressedTextureImage3DEXT: TglCompressedTextureImage3DEXT; + glCompressedTextureImage2DEXT: TglCompressedTextureImage2DEXT; + glCompressedTextureImage1DEXT: TglCompressedTextureImage1DEXT; + glCompressedTextureSubImage3DEXT: TglCompressedTextureSubImage3DEXT; + glCompressedTextureSubImage2DEXT: TglCompressedTextureSubImage2DEXT; + glCompressedTextureSubImage1DEXT: TglCompressedTextureSubImage1DEXT; + glGetCompressedTextureImageEXT: TglGetCompressedTextureImageEXT; + glCompressedMultiTexImage3DEXT: TglCompressedMultiTexImage3DEXT; + glCompressedMultiTexImage2DEXT: TglCompressedMultiTexImage2DEXT; + glCompressedMultiTexImage1DEXT: TglCompressedMultiTexImage1DEXT; + glCompressedMultiTexSubImage3DEXT: TglCompressedMultiTexSubImage3DEXT; + glCompressedMultiTexSubImage2DEXT: TglCompressedMultiTexSubImage2DEXT; + glCompressedMultiTexSubImage1DEXT: TglCompressedMultiTexSubImage1DEXT; + glGetCompressedMultiTexImageEXT: TglGetCompressedMultiTexImageEXT; + glNamedProgramStringEXT: TglNamedProgramStringEXT; + glNamedProgramLocalParameter4dEXT: TglNamedProgramLocalParameter4dEXT; + glNamedProgramLocalParameter4dvEXT: TglNamedProgramLocalParameter4dvEXT; + glNamedProgramLocalParameter4fEXT: TglNamedProgramLocalParameter4fEXT; + glNamedProgramLocalParameter4fvEXT: TglNamedProgramLocalParameter4fvEXT; + glGetNamedProgramLocalParameterdvEXT: TglGetNamedProgramLocalParameterdvEXT; + glGetNamedProgramLocalParameterfvEXT: TglGetNamedProgramLocalParameterfvEXT; + glGetNamedProgramivEXT: TglGetNamedProgramivEXT; + glGetNamedProgramStringEXT: TglGetNamedProgramStringEXT; + glNamedProgramLocalParameters4fvEXT: TglNamedProgramLocalParameters4fvEXT; + glNamedProgramLocalParameterI4iEXT: TglNamedProgramLocalParameterI4iEXT; + glNamedProgramLocalParameterI4ivEXT: TglNamedProgramLocalParameterI4ivEXT; + glNamedProgramLocalParametersI4ivEXT: TglNamedProgramLocalParametersI4ivEXT; + glNamedProgramLocalParameterI4uiEXT: TglNamedProgramLocalParameterI4uiEXT; + glNamedProgramLocalParameterI4uivEXT: TglNamedProgramLocalParameterI4uivEXT; + glNamedProgramLocalParametersI4uivEXT: TglNamedProgramLocalParametersI4uivEXT; + glGetNamedProgramLocalParameterIivEXT: TglGetNamedProgramLocalParameterIivEXT; + glGetNamedProgramLocalParameterIuivEXT: TglGetNamedProgramLocalParameterIuivEXT; + glTextureParameterIivEXT: TglTextureParameterIivEXT; + glTextureParameterIuivEXT: TglTextureParameterIuivEXT; + glGetTextureParameterIivEXT: TglGetTextureParameterIivEXT; + glGetTextureParameterIuivEXT: TglGetTextureParameterIuivEXT; + glMultiTexParameterIivEXT: TglMultiTexParameterIivEXT; + glMultiTexParameterIuivEXT: TglMultiTexParameterIuivEXT; + glGetMultiTexParameterIivEXT: TglGetMultiTexParameterIivEXT; + glGetMultiTexParameterIuivEXT: TglGetMultiTexParameterIuivEXT; + glProgramUniform1fEXT: TglProgramUniform1fEXT; + glProgramUniform2fEXT: TglProgramUniform2fEXT; + glProgramUniform3fEXT: TglProgramUniform3fEXT; + glProgramUniform4fEXT: TglProgramUniform4fEXT; + glProgramUniform1iEXT: TglProgramUniform1iEXT; + glProgramUniform2iEXT: TglProgramUniform2iEXT; + glProgramUniform3iEXT: TglProgramUniform3iEXT; + glProgramUniform4iEXT: TglProgramUniform4iEXT; + glProgramUniform1fvEXT: TglProgramUniform1fvEXT; + glProgramUniform2fvEXT: TglProgramUniform2fvEXT; + glProgramUniform3fvEXT: TglProgramUniform3fvEXT; + glProgramUniform4fvEXT: TglProgramUniform4fvEXT; + glProgramUniform1ivEXT: TglProgramUniform1ivEXT; + glProgramUniform2ivEXT: TglProgramUniform2ivEXT; + glProgramUniform3ivEXT: TglProgramUniform3ivEXT; + glProgramUniform4ivEXT: TglProgramUniform4ivEXT; + glProgramUniformMatrix2fvEXT: TglProgramUniformMatrix2fvEXT; + glProgramUniformMatrix3fvEXT: TglProgramUniformMatrix3fvEXT; + glProgramUniformMatrix4fvEXT: TglProgramUniformMatrix4fvEXT; + glProgramUniformMatrix2x3fvEXT: TglProgramUniformMatrix2x3fvEXT; + glProgramUniformMatrix3x2fvEXT: TglProgramUniformMatrix3x2fvEXT; + glProgramUniformMatrix2x4fvEXT: TglProgramUniformMatrix2x4fvEXT; + glProgramUniformMatrix4x2fvEXT: TglProgramUniformMatrix4x2fvEXT; + glProgramUniformMatrix3x4fvEXT: TglProgramUniformMatrix3x4fvEXT; + glProgramUniformMatrix4x3fvEXT: TglProgramUniformMatrix4x3fvEXT; + glProgramUniform1uiEXT: TglProgramUniform1uiEXT; + glProgramUniform2uiEXT: TglProgramUniform2uiEXT; + glProgramUniform3uiEXT: TglProgramUniform3uiEXT; + glProgramUniform4uiEXT: TglProgramUniform4uiEXT; + glProgramUniform1uivEXT: TglProgramUniform1uivEXT; + glProgramUniform2uivEXT: TglProgramUniform2uivEXT; + glProgramUniform3uivEXT: TglProgramUniform3uivEXT; + glProgramUniform4uivEXT: TglProgramUniform4uivEXT; + glNamedBufferDataEXT: TglNamedBufferDataEXT; + glNamedBufferSubDataEXT: TglNamedBufferSubDataEXT; + glMapNamedBufferEXT: TglMapNamedBufferEXT; + glUnmapNamedBufferEXT: TglUnmapNamedBufferEXT; + glGetNamedBufferParameterivEXT: TglGetNamedBufferParameterivEXT; + glGetNamedBufferPointervEXT: TglGetNamedBufferPointervEXT; + glGetNamedBufferSubDataEXT: TglGetNamedBufferSubDataEXT; + glTextureBufferEXT: TglTextureBufferEXT; + glMultiTexBufferEXT: TglMultiTexBufferEXT; + glNamedRenderbufferStorageEXT: TglNamedRenderbufferStorageEXT; + glGetNamedRenderbufferParameterivEXT: TglGetNamedRenderbufferParameterivEXT; + glCheckNamedFramebufferStatusEXT: TglCheckNamedFramebufferStatusEXT; + glNamedFramebufferTexture1DEXT: TglNamedFramebufferTexture1DEXT; + glNamedFramebufferTexture2DEXT: TglNamedFramebufferTexture2DEXT; + glNamedFramebufferTexture3DEXT: TglNamedFramebufferTexture3DEXT; + glNamedFramebufferRenderbufferEXT: TglNamedFramebufferRenderbufferEXT; + glGetNamedFramebufferAttachmentParameterivEXT: TglGetNamedFramebufferAttachmentParameterivEXT; + glGenerateTextureMipmapEXT: TglGenerateTextureMipmapEXT; + glGenerateMultiTexMipmapEXT: TglGenerateMultiTexMipmapEXT; + glFramebufferDrawBufferEXT: TglFramebufferDrawBufferEXT; + glFramebufferDrawBuffersEXT: TglFramebufferDrawBuffersEXT; + glFramebufferReadBufferEXT: TglFramebufferReadBufferEXT; + glGetFramebufferParameterivEXT: TglGetFramebufferParameterivEXT; + glNamedRenderbufferStorageMultisampleEXT: TglNamedRenderbufferStorageMultisampleEXT; + glNamedRenderbufferStorageMultisampleCoverageEXT: TglNamedRenderbufferStorageMultisampleCoverageEXT; + glNamedFramebufferTextureEXT: TglNamedFramebufferTextureEXT; + glNamedFramebufferTextureLayerEXT: TglNamedFramebufferTextureLayerEXT; + glNamedFramebufferTextureFaceEXT: TglNamedFramebufferTextureFaceEXT; + glTextureRenderbufferEXT: TglTextureRenderbufferEXT; + glMultiTexRenderbufferEXT: TglMultiTexRenderbufferEXT; + + // GL_HP_image_transform + glImageTransformParameteriHP: TglImageTransformParameteriHP; + glImageTransformParameterfHP: TglImageTransformParameterfHP; + glImageTransformParameterivHP: TglImageTransformParameterivHP; + glImageTransformParameterfvHP: TglImageTransformParameterfvHP; + glGetImageTransformParameterivHP: TglGetImageTransformParameterivHP; + glGetImageTransformParameterfvHP: TglGetImageTransformParameterfvHP; + + // GL_EXT_depth_bounds_test + glDepthBoundsEXT: TglDepthBoundsEXT; + + // GL_EXT_blend_equation_separate + glBlendEquationSeparateEXT: TglBlendEquationSeparateEXT; + + // GL_IBM_multimode_draw_arrays + glMultiModeDrawArraysIBM: TglMultiModeDrawArraysIBM; + glMultiModeDrawElementsIBM: TglMultiModeDrawElementsIBM; + + // GL_IBM_vertex_array_lists + glColorPointerListIBM: TglColorPointerListIBM; + glSecondaryColorPointerListIBM: TglSecondaryColorPointerListIBM; + glEdgeFlagPointerListIBM: TglEdgeFlagPointerListIBM; + glFogCoordPointerListIBM: TglFogCoordPointerListIBM; + glIndexPointerListIBM: TglIndexPointerListIBM; + glNormalPointerListIBM: TglNormalPointerListIBM; + glTexCoordPointerListIBM: TglTexCoordPointerListIBM; + glVertexPointerListIBM: TglVertexPointerListIBM; + + // GL_INGR_blend_func_separate + glBlendFuncSeparateINGR: TglBlendFuncSeparateINGR; + + // GL_INTEL_parallel_arrays + glVertexPointervINTEL: TglVertexPointervINTEL; + glNormalPointervINTEL: TglNormalPointervINTEL; + glColorPointervINTEL: TglColorPointervINTEL; + glTexCoordPointervINTEL: TglTexCoordPointervINTEL; + + // GL_MESA_resize_buffers + glResizeBuffersMESA: TglResizeBuffersMESA; + + // GL_MESA_window_pos + glWindowPos2dMESA: TglWindowPos2dMESA; + glWindowPos2dvMESA: TglWindowPos2dvMESA; + glWindowPos2fMESA: TglWindowPos2fMESA; + glWindowPos2fvMESA: TglWindowPos2fvMESA; + glWindowPos2iMESA: TglWindowPos2iMESA; + glWindowPos2ivMESA: TglWindowPos2ivMESA; + glWindowPos2sMESA: TglWindowPos2sMESA; + glWindowPos2svMESA: TglWindowPos2svMESA; + glWindowPos3dMESA: TglWindowPos3dMESA; + glWindowPos3dvMESA: TglWindowPos3dvMESA; + glWindowPos3fMESA: TglWindowPos3fMESA; + glWindowPos3fvMESA: TglWindowPos3fvMESA; + glWindowPos3iMESA: TglWindowPos3iMESA; + glWindowPos3ivMESA: TglWindowPos3ivMESA; + glWindowPos3sMESA: TglWindowPos3sMESA; + glWindowPos3svMESA: TglWindowPos3svMESA; + glWindowPos4dMESA: TglWindowPos4dMESA; + glWindowPos4dvMESA: TglWindowPos4dvMESA; + glWindowPos4fMESA: TglWindowPos4fMESA; + glWindowPos4fvMESA: TglWindowPos4fvMESA; + glWindowPos4iMESA: TglWindowPos4iMESA; + glWindowPos4ivMESA: TglWindowPos4ivMESA; + glWindowPos4sMESA: TglWindowPos4sMESA; + glWindowPos4svMESA: TglWindowPos4svMESA; + + // GL_NV_evaluators + glMapControlPointsNV: TglMapControlPointsNV; + glMapParameterivNV: TglMapParameterivNV; + glMapParameterfvNV: TglMapParameterfvNV; + glGetMapControlPointsNV: TglGetMapControlPointsNV; + glGetMapParameterivNV: TglGetMapParameterivNV; + glGetMapParameterfvNV: TglGetMapParameterfvNV; + glGetMapAttribParameterivNV: TglGetMapAttribParameterivNV; + glGetMapAttribParameterfvNV: TglGetMapAttribParameterfvNV; + glEvalMapsNV: TglEvalMapsNV; + + // GL_NV_fence + glDeleteFencesNV: TglDeleteFencesNV; + glGenFencesNV: TglGenFencesNV; + glIsFenceNV: TglIsFenceNV; + glTestFenceNV: TglTestFenceNV; + glGetFenceivNV: TglGetFenceivNV; + glFinishFenceNV: TglFinishFenceNV; + glSetFenceNV: TglSetFenceNV; + + // GL_NV_fragment_program + glProgramNamedParameter4fNV: TglProgramNamedParameter4fNV; + glProgramNamedParameter4dNV: TglProgramNamedParameter4dNV; + glProgramNamedParameter4fvNV: TglProgramNamedParameter4fvNV; + glProgramNamedParameter4dvNV: TglProgramNamedParameter4dvNV; + glGetProgramNamedParameterfvNV: TglGetProgramNamedParameterfvNV; + glGetProgramNamedParameterdvNV: TglGetProgramNamedParameterdvNV; + + // GL_NV_half_float + glVertex2hNV: TglVertex2hNV; + glVertex2hvNV: TglVertex2hvNV; + glVertex3hNV: TglVertex3hNV; + glVertex3hvNV: TglVertex3hvNV; + glVertex4hNV: TglVertex4hNV; + glVertex4hvNV: TglVertex4hvNV; + glNormal3hNV: TglNormal3hNV; + glNormal3hvNV: TglNormal3hvNV; + glColor3hNV: TglColor3hNV; + glColor3hvNV: TglColor3hvNV; + glColor4hNV: TglColor4hNV; + glColor4hvNV: TglColor4hvNV; + glTexCoord1hNV: TglTexCoord1hNV; + glTexCoord1hvNV: TglTexCoord1hvNV; + glTexCoord2hNV: TglTexCoord2hNV; + glTexCoord2hvNV: TglTexCoord2hvNV; + glTexCoord3hNV: TglTexCoord3hNV; + glTexCoord3hvNV: TglTexCoord3hvNV; + glTexCoord4hNV: TglTexCoord4hNV; + glTexCoord4hvNV: TglTexCoord4hvNV; + glMultiTexCoord1hNV: TglMultiTexCoord1hNV; + glMultiTexCoord1hvNV: TglMultiTexCoord1hvNV; + glMultiTexCoord2hNV: TglMultiTexCoord2hNV; + glMultiTexCoord2hvNV: TglMultiTexCoord2hvNV; + glMultiTexCoord3hNV: TglMultiTexCoord3hNV; + glMultiTexCoord3hvNV: TglMultiTexCoord3hvNV; + glMultiTexCoord4hNV: TglMultiTexCoord4hNV; + glMultiTexCoord4hvNV: TglMultiTexCoord4hvNV; + glFogCoordhNV: TglFogCoordhNV; + glFogCoordhvNV: TglFogCoordhvNV; + glSecondaryColor3hNV: TglSecondaryColor3hNV; + glSecondaryColor3hvNV: TglSecondaryColor3hvNV; + glVertexWeighthNV: TglVertexWeighthNV; + glVertexWeighthvNV: TglVertexWeighthvNV; + glVertexAttrib1hNV: TglVertexAttrib1hNV; + glVertexAttrib1hvNV: TglVertexAttrib1hvNV; + glVertexAttrib2hNV: TglVertexAttrib2hNV; + glVertexAttrib2hvNV: TglVertexAttrib2hvNV; + glVertexAttrib3hNV: TglVertexAttrib3hNV; + glVertexAttrib3hvNV: TglVertexAttrib3hvNV; + glVertexAttrib4hNV: TglVertexAttrib4hNV; + glVertexAttrib4hvNV: TglVertexAttrib4hvNV; + glVertexAttribs1hvNV: TglVertexAttribs1hvNV; + glVertexAttribs2hvNV: TglVertexAttribs2hvNV; + glVertexAttribs3hvNV: TglVertexAttribs3hvNV; + glVertexAttribs4hvNV: TglVertexAttribs4hvNV; + + // GL_NV_occlusion_query + glGenOcclusionQueriesNV: TglGenOcclusionQueriesNV; + glDeleteOcclusionQueriesNV: TglDeleteOcclusionQueriesNV; + glIsOcclusionQueryNV: TglIsOcclusionQueryNV; + glBeginOcclusionQueryNV: TglBeginOcclusionQueryNV; + glEndOcclusionQueryNV: TglEndOcclusionQueryNV; + glGetOcclusionQueryivNV: TglGetOcclusionQueryivNV; + glGetOcclusionQueryuivNV: TglGetOcclusionQueryuivNV; + + // GL_NV_pixel_data_range + glPixelDataRangeNV: TglPixelDataRangeNV; + glFlushPixelDataRangeNV: TglFlushPixelDataRangeNV; + + // GL_NV_point_sprite + glPointParameteriNV: TglPointParameteriNV; + glPointParameterivNV: TglPointParameterivNV; + + // GL_NV_primitive_restart + glPrimitiveRestartNV: TglPrimitiveRestartNV; + glPrimitiveRestartIndexNV: TglPrimitiveRestartIndexNV; + + // GL_NV_register_combiners + glCombinerParameterfvNV: TglCombinerParameterfvNV; + glCombinerParameterfNV: TglCombinerParameterfNV; + glCombinerParameterivNV: TglCombinerParameterivNV; + glCombinerParameteriNV: TglCombinerParameteriNV; + glCombinerInputNV: TglCombinerInputNV; + glCombinerOutputNV: TglCombinerOutputNV; + glFinalCombinerInputNV: TglFinalCombinerInputNV; + glGetCombinerInputParameterfvNV: TglGetCombinerInputParameterfvNV; + glGetCombinerInputParameterivNV: TglGetCombinerInputParameterivNV; + glGetCombinerOutputParameterfvNV: TglGetCombinerOutputParameterfvNV; + glGetCombinerOutputParameterivNV: TglGetCombinerOutputParameterivNV; + glGetFinalCombinerInputParameterfvNV: TglGetFinalCombinerInputParameterfvNV; + glGetFinalCombinerInputParameterivNV: TglGetFinalCombinerInputParameterivNV; + + // GL_NV_register_combiners2 + glCombinerStageParameterfvNV: TglCombinerStageParameterfvNV; + glGetCombinerStageParameterfvNV: TglGetCombinerStageParameterfvNV; + + // GL_NV_vertex_array_range + glFlushVertexArrayRangeNV: TglFlushVertexArrayRangeNV; + glVertexArrayRangeNV: TglVertexArrayRangeNV; + + // GL_NV_vertex_program + glAreProgramsResidentNV: TglAreProgramsResidentNV; + glBindProgramNV: TglBindProgramNV; + glDeleteProgramsNV: TglDeleteProgramsNV; + glExecuteProgramNV: TglExecuteProgramNV; + glGenProgramsNV: TglGenProgramsNV; + glGetProgramParameterdvNV: TglGetProgramParameterdvNV; + glGetProgramParameterfvNV: TglGetProgramParameterfvNV; + glGetProgramivNV: TglGetProgramivNV; + glGetProgramStringNV: TglGetProgramStringNV; + glGetTrackMatrixivNV: TglGetTrackMatrixivNV; + glGetVertexAttribdvNV: TglGetVertexAttribdvNV; + glGetVertexAttribfvNV: TglGetVertexAttribfvNV; + glGetVertexAttribivNV: TglGetVertexAttribivNV; + glGetVertexAttribPointervNV: TglGetVertexAttribPointervNV; + glIsProgramNV: TglIsProgramNV; + glLoadProgramNV: TglLoadProgramNV; + glProgramParameter4dNV: TglProgramParameter4dNV; + glProgramParameter4dvNV: TglProgramParameter4dvNV; + glProgramParameter4fNV: TglProgramParameter4fNV; + glProgramParameter4fvNV: TglProgramParameter4fvNV; + glProgramParameters4dvNV: TglProgramParameters4dvNV; + glProgramParameters4fvNV: TglProgramParameters4fvNV; + glRequestResidentProgramsNV: TglRequestResidentProgramsNV; + glTrackMatrixNV: TglTrackMatrixNV; + glVertexAttribPointerNV: TglVertexAttribPointerNV; + glVertexAttrib1dNV: TglVertexAttrib1dNV; + glVertexAttrib1dvNV: TglVertexAttrib1dvNV; + glVertexAttrib1fNV: TglVertexAttrib1fNV; + glVertexAttrib1fvNV: TglVertexAttrib1fvNV; + glVertexAttrib1sNV: TglVertexAttrib1sNV; + glVertexAttrib1svNV: TglVertexAttrib1svNV; + glVertexAttrib2dNV: TglVertexAttrib2dNV; + glVertexAttrib2dvNV: TglVertexAttrib2dvNV; + glVertexAttrib2fNV: TglVertexAttrib2fNV; + glVertexAttrib2fvNV: TglVertexAttrib2fvNV; + glVertexAttrib2sNV: TglVertexAttrib2sNV; + glVertexAttrib2svNV: TglVertexAttrib2svNV; + glVertexAttrib3dNV: TglVertexAttrib3dNV; + glVertexAttrib3dvNV: TglVertexAttrib3dvNV; + glVertexAttrib3fNV: TglVertexAttrib3fNV; + glVertexAttrib3fvNV: TglVertexAttrib3fvNV; + glVertexAttrib3sNV: TglVertexAttrib3sNV; + glVertexAttrib3svNV: TglVertexAttrib3svNV; + glVertexAttrib4dNV: TglVertexAttrib4dNV; + glVertexAttrib4dvNV: TglVertexAttrib4dvNV; + glVertexAttrib4fNV: TglVertexAttrib4fNV; + glVertexAttrib4fvNV: TglVertexAttrib4fvNV; + glVertexAttrib4sNV: TglVertexAttrib4sNV; + glVertexAttrib4svNV: TglVertexAttrib4svNV; + glVertexAttrib4ubNV: TglVertexAttrib4ubNV; + glVertexAttrib4ubvNV: TglVertexAttrib4ubvNV; + glVertexAttribs1dvNV: TglVertexAttribs1dvNV; + glVertexAttribs1fvNV: TglVertexAttribs1fvNV; + glVertexAttribs1svNV: TglVertexAttribs1svNV; + glVertexAttribs2dvNV: TglVertexAttribs2dvNV; + glVertexAttribs2fvNV: TglVertexAttribs2fvNV; + glVertexAttribs2svNV: TglVertexAttribs2svNV; + glVertexAttribs3dvNV: TglVertexAttribs3dvNV; + glVertexAttribs3fvNV: TglVertexAttribs3fvNV; + glVertexAttribs3svNV: TglVertexAttribs3svNV; + glVertexAttribs4dvNV: TglVertexAttribs4dvNV; + glVertexAttribs4fvNV: TglVertexAttribs4fvNV; + glVertexAttribs4svNV: TglVertexAttribs4svNV; + glVertexAttribs4ubvNV: TglVertexAttribs4ubvNV; + + // GL_NV_depth_buffer_float + glDepthRangedNV: TglDepthRangedNV; + glClearDepthdNV: TglClearDepthdNV; + glDepthBoundsdNV: TglDepthBoundsdNV; + + // GL_NV_framebuffer_multisample_coverage + glRenderbufferStorageMultsampleCoverageNV: TglRenderbufferStorageMultsampleCoverageNV; + + // GL_NV_geometry_program4 + glProgramVertexLimitNV: TglProgramVertexLimitNV; + + // GL_NV_gpu_program4 + glProgramLocalParameterI4iNV: TglProgramLocalParameterI4iNV; + glProgramLocalParameterI4ivNV: TglProgramLocalParameterI4ivNV; + glProgramLocalParametersI4ivNV: TglProgramLocalParametersI4ivNV; + glProgramLocalParameterI4uiNV: TglProgramLocalParameterI4uiNV; + glProgramLocalParameterI4uivNV: TglProgramLocalParameterI4uivNV; + glProgramLocalParametersI4uivNV: TglProgramLocalParametersI4uivNV; + glProgramEnvParameterI4iNV: TglProgramEnvParameterI4iNV; + glProgramEnvParameterI4ivNV: TglProgramEnvParameterI4ivNV; + glProgramEnvParametersI4ivNV: TglProgramEnvParametersI4ivNV; + glProgramEnvParameterI4uiNV: TglProgramEnvParameterI4uiNV; + glProgramEnvParameterI4uivNV: TglProgramEnvParameterI4uivNV; + glProgramEnvParametersI4uivNV: TglProgramEnvParametersI4uivNV; + glGetProgramLocalParameterIivNV: TglGetProgramLocalParameterIivNV; + glGetProgramLocalParameterIuivNV: TglGetProgramLocalParameterIuivNV; + glGetProgramEnvParameterIivNV: TglGetProgramEnvParameterIivNV; + glGetProgramEnvParameterIuivNV: TglGetProgramEnvParameterIuivNV; + + // GL_NV_parameter_buffer_object + glProgramBufferParametersfvNV: TglProgramBufferParametersfvNV; + glProgramBufferParametersIivNV: TglProgramBufferParametersIivNV; + glProgramBufferParametersIuivNV: TglProgramBufferParametersIuivNV; + + // GL_NV_transform_feedback + glBeginTransformFeedbackNV: TglBeginTransformFeedbackNV; + glEndTransformFeedbackNV: TglEndTransformFeedbackNV; + glTransformFeedbackAttribsNV: TglTransformFeedbackAttribsNV; + glBindBufferRangeNV: TglBindBufferRangeNV; + glBindBufferOffsetNV: TglBindBufferOffsetNV; + glBindBufferBaseNV: TglBindBufferBaseNV; + glTransformFeedbackVaryingsNV: TglTransformFeedbackVaryingsNV; + glActiveVaryingNV: TglActiveVaryingNV; + glGetVaryingLocationNV: TglGetVaryingLocationNV; + glGetActiveVaryingNV: TglGetActiveVaryingNV; + glGetTransformFeedbackVaryingNV: TglGetTransformFeedbackVaryingNV; + + // GL_NV_conditional_render + glBeginConditionalRenderNV: TglBeginConditionalRenderNV; + glEndConditionalRenderNV: TglEndConditionalRenderNV; + + // GL_NV_present_video + glPresentFrameKeyedNV: TglPresentFrameKeyedNV; + glPresentFrameDualFillNV: TglPresentFrameDualFillNV; + glGetVideoivNV: TglGetVideoivNV; + glGetVideouivNV: TglGetVideouivNV; + glGetVideoi64vNV: TglGetVideoi64vNV; + glGetVideoui64vNV: TglGetVideoui64vNV; +// glVideoParameterivNV: TglVideoParameterivNV; + + // GL_NV_explicit_multisample + glGetMultisamplefvNV: TglGetMultisamplefvNV; + glSampleMaskIndexedNV: TglSampleMaskIndexedNV; + glTexRenderbufferNV: TglTexRenderbufferNV; + + // GL_NV_transform_feedback2 + glBindTransformFeedbackNV: TglBindTransformFeedbackNV; + glDeleteTransformFeedbacksNV: TglDeleteTransformFeedbacksNV; + glGenTransformFeedbacksNV: TglGenTransformFeedbacksNV; + glIsTransformFeedbackNV: TglIsTransformFeedbackNV; + glPauseTransformFeedbackNV: TglPauseTransformFeedbackNV; + glResumeTransformFeedbackNV: TglResumeTransformFeedbackNV; + glDrawTransformFeedbackNV: TglDrawTransformFeedbackNV; + + // GL_PGI_misc_hints + glHintPGI: TglHintPGI; + + // GL_SGIS_detail_texture + glDetailTexFuncSGIS: TglDetailTexFuncSGIS; + glGetDetailTexFuncSGIS: TglGetDetailTexFuncSGIS; + + // GL_SGIS_fog_function + glFogFuncSGIS: TglFogFuncSGIS; + glGetFogFuncSGIS: TglGetFogFuncSGIS; + + // GL_SGIS_multisample + glSampleMaskSGIS: TglSampleMaskSGIS; + glSamplePatternSGIS: TglSamplePatternSGIS; + + // GL_SGIS_pixel_texture + glPixelTexGenParameteriSGIS: TglPixelTexGenParameteriSGIS; + glPixelTexGenParameterivSGIS: TglPixelTexGenParameterivSGIS; + glPixelTexGenParameterfSGIS: TglPixelTexGenParameterfSGIS; + glPixelTexGenParameterfvSGIS: TglPixelTexGenParameterfvSGIS; + glGetPixelTexGenParameterivSGIS: TglGetPixelTexGenParameterivSGIS; + glGetPixelTexGenParameterfvSGIS: TglGetPixelTexGenParameterfvSGIS; + + // GL_SGIS_point_parameters + glPointParameterfSGIS: TglPointParameterfSGIS; + glPointParameterfvSGIS: TglPointParameterfvSGIS; + + // GL_SGIS_sharpen_texture + glSharpenTexFuncSGIS: TglSharpenTexFuncSGIS; + glGetSharpenTexFuncSGIS: TglGetSharpenTexFuncSGIS; + + // GL_SGIS_texture4D + glTexImage4DSGIS: TglTexImage4DSGIS; + glTexSubImage4DSGIS: TglTexSubImage4DSGIS; + + // GL_SGIS_texture_color_mask + glTextureColorMaskSGIS: TglTextureColorMaskSGIS; + + // GL_SGIS_texture_filter4 + glGetTexFilterFuncSGIS: TglGetTexFilterFuncSGIS; + glTexFilterFuncSGIS: TglTexFilterFuncSGIS; + + // GL_SGIX_async + glAsyncMarkerSGIX: TglAsyncMarkerSGIX; + glFinishAsyncSGIX: TglFinishAsyncSGIX; + glPollAsyncSGIX: TglPollAsyncSGIX; + glGenAsyncMarkersSGIX: TglGenAsyncMarkersSGIX; + glDeleteAsyncMarkersSGIX: TglDeleteAsyncMarkersSGIX; + glIsAsyncMarkerSGIX: TglIsAsyncMarkerSGIX; + + // GL_SGIX_flush_raster + glFlushRasterSGIX: TglFlushRasterSGIX; + + // GL_SGIX_fragment_lighting + glFragmentColorMaterialSGIX: TglFragmentColorMaterialSGIX; + glFragmentLightfSGIX: TglFragmentLightfSGIX; + glFragmentLightfvSGIX: TglFragmentLightfvSGIX; + glFragmentLightiSGIX: TglFragmentLightiSGIX; + glFragmentLightivSGIX: TglFragmentLightivSGIX; + glFragmentLightModelfSGIX: TglFragmentLightModelfSGIX; + glFragmentLightModelfvSGIX: TglFragmentLightModelfvSGIX; + glFragmentLightModeliSGIX: TglFragmentLightModeliSGIX; + glFragmentLightModelivSGIX: TglFragmentLightModelivSGIX; + glFragmentMaterialfSGIX: TglFragmentMaterialfSGIX; + glFragmentMaterialfvSGIX: TglFragmentMaterialfvSGIX; + glFragmentMaterialiSGIX: TglFragmentMaterialiSGIX; + glFragmentMaterialivSGIX: TglFragmentMaterialivSGIX; + glGetFragmentLightfvSGIX: TglGetFragmentLightfvSGIX; + glGetFragmentLightivSGIX: TglGetFragmentLightivSGIX; + glGetFragmentMaterialfvSGIX: TglGetFragmentMaterialfvSGIX; + glGetFragmentMaterialivSGIX: TglGetFragmentMaterialivSGIX; + glLightEnviSGIX: TglLightEnviSGIX; + + // GL_SGIX_framezoom + glFrameZoomSGIX: TglFrameZoomSGIX; + + // GL_SGIX_igloo_interface + glIglooInterfaceSGIX: TglIglooInterfaceSGIX; + + // GL_SGIX_instruments + glGetInstrumentsSGIX: TglGetInstrumentsSGIX; + glInstrumentsBufferSGIX: TglInstrumentsBufferSGIX; + glPollInstrumentsSGIX: TglPollInstrumentsSGIX; + glReadInstrumentsSGIX: TglReadInstrumentsSGIX; + glStartInstrumentsSGIX: TglStartInstrumentsSGIX; + glStopInstrumentsSGIX: TglStopInstrumentsSGIX; + + // GL_SGIX_list_priority + glGetListParameterfvSGIX: TglGetListParameterfvSGIX; + glGetListParameterivSGIX: TglGetListParameterivSGIX; + glListParameterfSGIX: TglListParameterfSGIX; + glListParameterfvSGIX: TglListParameterfvSGIX; + glListParameteriSGIX: TglListParameteriSGIX; + glListParameterivSGIX: TglListParameterivSGIX; + + // GL_SGIX_pixel_texture + glPixelTexGenSGIX: TglPixelTexGenSGIX; + + // GL_SGIX_polynomial_ffd + glDeformationMap3dSGIX: TglDeformationMap3dSGIX; + glDeformationMap3fSGIX: TglDeformationMap3fSGIX; + glDeformSGIX: TglDeformSGIX; + glLoadIdentityDeformationMapSGIX: TglLoadIdentityDeformationMapSGIX; + + // GL_SGIX_reference_plane + glReferencePlaneSGIX: TglReferencePlaneSGIX; + + // GL_SGIX_sprite + glSpriteParameterfSGIX: TglSpriteParameterfSGIX; + glSpriteParameterfvSGIX: TglSpriteParameterfvSGIX; + glSpriteParameteriSGIX: TglSpriteParameteriSGIX; + glSpriteParameterivSGIX: TglSpriteParameterivSGIX; + + // GL_SGIX_tag_sample_buffer + glTagSampleBufferSGIX: TglTagSampleBufferSGIX; + + // GL_SGI_color_table + glColorTableSGI: TglColorTableSGI; + glColorTableParameterfvSGI: TglColorTableParameterfvSGI; + glColorTableParameterivSGI: TglColorTableParameterivSGI; + glCopyColorTableSGI: TglCopyColorTableSGI; + glGetColorTableSGI: TglGetColorTableSGI; + glGetColorTableParameterfvSGI: TglGetColorTableParameterfvSGI; + glGetColorTableParameterivSGI: TglGetColorTableParameterivSGI; + + // GL_SUNX_constant_data + glFinishTextureSUNX: TglFinishTextureSUNX; + + // GL_SUN_global_alpha + glGlobalAlphaFactorbSUN: TglGlobalAlphaFactorbSUN; + glGlobalAlphaFactorsSUN: TglGlobalAlphaFactorsSUN; + glGlobalAlphaFactoriSUN: TglGlobalAlphaFactoriSUN; + glGlobalAlphaFactorfSUN: TglGlobalAlphaFactorfSUN; + glGlobalAlphaFactordSUN: TglGlobalAlphaFactordSUN; + glGlobalAlphaFactorubSUN: TglGlobalAlphaFactorubSUN; + glGlobalAlphaFactorusSUN: TglGlobalAlphaFactorusSUN; + glGlobalAlphaFactoruiSUN: TglGlobalAlphaFactoruiSUN; + + // GL_SUN_mesh_array + glDrawMeshArraysSUN: TglDrawMeshArraysSUN; + + // GL_SUN_triangle_list + glReplacementCodeuiSUN: TglReplacementCodeuiSUN; + glReplacementCodeusSUN: TglReplacementCodeusSUN; + glReplacementCodeubSUN: TglReplacementCodeubSUN; + glReplacementCodeuivSUN: TglReplacementCodeuivSUN; + glReplacementCodeusvSUN: TglReplacementCodeusvSUN; + glReplacementCodeubvSUN: TglReplacementCodeubvSUN; + glReplacementCodePointerSUN: TglReplacementCodePointerSUN; + + // GL_SUN_vertex + glColor4ubVertex2fSUN: TglColor4ubVertex2fSUN; + glColor4ubVertex2fvSUN: TglColor4ubVertex2fvSUN; + glColor4ubVertex3fSUN: TglColor4ubVertex3fSUN; + glColor4ubVertex3fvSUN: TglColor4ubVertex3fvSUN; + glColor3fVertex3fSUN: TglColor3fVertex3fSUN; + glColor3fVertex3fvSUN: TglColor3fVertex3fvSUN; + glNormal3fVertex3fSUN: TglNormal3fVertex3fSUN; + glNormal3fVertex3fvSUN: TglNormal3fVertex3fvSUN; + glColor4fNormal3fVertex3fSUN: TglColor4fNormal3fVertex3fSUN; + glColor4fNormal3fVertex3fvSUN: TglColor4fNormal3fVertex3fvSUN; + glTexCoord2fVertex3fSUN: TglTexCoord2fVertex3fSUN; + glTexCoord2fVertex3fvSUN: TglTexCoord2fVertex3fvSUN; + glTexCoord4fVertex4fSUN: TglTexCoord4fVertex4fSUN; + glTexCoord4fVertex4fvSUN: TglTexCoord4fVertex4fvSUN; + glTexCoord2fColor4ubVertex3fSUN: TglTexCoord2fColor4ubVertex3fSUN; + glTexCoord2fColor4ubVertex3fvSUN: TglTexCoord2fColor4ubVertex3fvSUN; + glTexCoord2fColor3fVertex3fSUN: TglTexCoord2fColor3fVertex3fSUN; + glTexCoord2fColor3fVertex3fvSUN: TglTexCoord2fColor3fVertex3fvSUN; + glTexCoord2fNormal3fVertex3fSUN: TglTexCoord2fNormal3fVertex3fSUN; + glTexCoord2fNormal3fVertex3fvSUN: TglTexCoord2fNormal3fVertex3fvSUN; + glTexCoord2fColor4fNormal3fVertex3fSUN: TglTexCoord2fColor4fNormal3fVertex3fSUN; + glTexCoord2fColor4fNormal3fVertex3fvSUN: TglTexCoord2fColor4fNormal3fVertex3fvSUN; + glTexCoord4fColor4fNormal3fVertex4fSUN: TglTexCoord4fColor4fNormal3fVertex4fSUN; + glTexCoord4fColor4fNormal3fVertex4fvSUN: TglTexCoord4fColor4fNormal3fVertex4fvSUN; + glReplacementCodeuiVertex3fSUN: TglReplacementCodeuiVertex3fSUN; + glReplacementCodeuiVertex3fvSUN: TglReplacementCodeuiVertex3fvSUN; + glReplacementCodeuiColor4ubVertex3fSUN: TglReplacementCodeuiColor4ubVertex3fSUN; + glReplacementCodeuiColor4ubVertex3fvSUN: TglReplacementCodeuiColor4ubVertex3fvSUN; + glReplacementCodeuiColor3fVertex3fSUN: TglReplacementCodeuiColor3fVertex3fSUN; + glReplacementCodeuiColor3fVertex3fvSUN: TglReplacementCodeuiColor3fVertex3fvSUN; + glReplacementCodeuiNormal3fVertex3fSUN: TglReplacementCodeuiNormal3fVertex3fSUN; + glReplacementCodeuiNormal3fVertex3fvSUN: TglReplacementCodeuiNormal3fVertex3fvSUN; + glReplacementCodeuiColor4fNormal3fVertex3fSUN: TglReplacementCodeuiColor4fNormal3fVertex3fSUN; + glReplacementCodeuiColor4fNormal3fVertex3fvSUN: TglReplacementCodeuiColor4fNormal3fVertex3fvSUN; + glReplacementCodeuiTexCoord2fVertex3fSUN: TglReplacementCodeuiTexCoord2fVertex3fSUN; + glReplacementCodeuiTexCoord2fVertex3fvSUN: TglReplacementCodeuiTexCoord2fVertex3fvSUN; + glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN: TglReplacementCodeuiTexCoord2fNormal3fVertex3fSUN; + glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN: TglReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN; + glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN: TglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN; + glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN: TglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN; + +{$IFDEF DGL_WIN} + wglGetProcAddress: TwglGetProcAddress; + wglCopyContext: TwglCopyContext; + wglCreateContext: TwglCreateContext; + wglCreateLayerContext: TwglCreateLayerContext; + wglDeleteContext: TwglDeleteContext; + wglDescribeLayerPlane: TwglDescribeLayerPlane; + wglGetCurrentContext: TwglGetCurrentContext; + wglGetCurrentDC: TwglGetCurrentDC; + wglGetLayerPaletteEntries: TwglGetLayerPaletteEntries; + wglMakeCurrent: TwglMakeCurrent; + wglRealizeLayerPalette: TwglRealizeLayerPalette; + wglSetLayerPaletteEntries: TwglSetLayerPaletteEntries; + wglShareLists: TwglShareLists; + wglSwapLayerBuffers: TwglSwapLayerBuffers; + wglSwapMultipleBuffers: TwglSwapMultipleBuffers; + wglUseFontBitmapsA: TwglUseFontBitmapsA; + wglUseFontOutlinesA: TwglUseFontOutlinesA; + wglUseFontBitmapsW: TwglUseFontBitmapsW; + wglUseFontOutlinesW: TwglUseFontOutlinesW; + wglUseFontBitmaps: TwglUseFontBitmaps; + wglUseFontOutlines: TwglUseFontOutlines; + + // WGL_ARB_buffer_region + wglCreateBufferRegionARB: TwglCreateBufferRegionARB; + wglDeleteBufferRegionARB: TwglDeleteBufferRegionARB; + wglSaveBufferRegionARB: TwglSaveBufferRegionARB; + wglRestoreBufferRegionARB: TwglRestoreBufferRegionARB; + + // WGL_ARB_extensions_string + wglGetExtensionsStringARB: TwglGetExtensionsStringARB; + + // WGL_ARB_make_current_read + wglMakeContextCurrentARB: TwglMakeContextCurrentARB; + wglGetCurrentReadDCARB: TwglGetCurrentReadDCARB; + + // WGL_ARB_pbuffer + wglCreatePbufferARB: TwglCreatePbufferARB; + wglGetPbufferDCARB: TwglGetPbufferDCARB; + wglReleasePbufferDCARB: TwglReleasePbufferDCARB; + wglDestroyPbufferARB: TwglDestroyPbufferARB; + wglQueryPbufferARB: TwglQueryPbufferARB; + + // WGL_ARB_pixel_format + wglGetPixelFormatAttribivARB: TwglGetPixelFormatAttribivARB; + wglGetPixelFormatAttribfvARB: TwglGetPixelFormatAttribfvARB; + wglChoosePixelFormatARB: TwglChoosePixelFormatARB; + // WGL_ARB_color_buffer_float + wglClampColorARB: TwglClampColorARB; + + // WGL_ARB_render_texture + wglBindTexImageARB: TwglBindTexImageARB; + wglReleaseTexImageARB: TwglReleaseTexImageARB; + wglSetPbufferAttribARB: TwglSetPbufferAttribARB; + + // WGL_ARB_create_context + wglCreateContextAttribsARB: TwglCreateContextAttribsARB; + + // WGL_AMD_gpu_association + wglGetGPUIDsAMD: TwglGetGPUIDsAMD; + wglGetGPUInfoAMD: TwglGetGPUInfoAMD; + wglGetContextGPUIDAMD: TwglGetContextGPUIDAMD; + wglCreateAssociatedContextAMD: TwglCreateAssociatedContextAMD; + wglCreateAssociatedContextAttribsAMD: TwglCreateAssociatedContextAttribsAMD; + wglDeleteAssociatedContextAMD: TwglDeleteAssociatedContextAMD; + wglMakeAssociatedContextCurrentAMD: TwglMakeAssociatedContextCurrentAMD; + wglGetCurrentAssociatedContextAMD: TwglGetCurrentAssociatedContextAMD; + wglBlitContextFramebufferAMD: TwglBlitContextFramebufferAMD; + + // WGL_EXT_display_color_table + wglCreateDisplayColorTableEXT: TwglCreateDisplayColorTableEXT; + wglLoadDisplayColorTableEXT: TwglLoadDisplayColorTableEXT; + wglBindDisplayColorTableEXT: TwglBindDisplayColorTableEXT; + wglDestroyDisplayColorTableEXT: TwglDestroyDisplayColorTableEXT; + + // WGL_EXT_extensions_string + wglGetExtensionsStringEXT: TwglGetExtensionsStringEXT; + + // WGL_EXT_make_current_read + wglMakeContextCurrentEXT: TwglMakeContextCurrentEXT; + wglGetCurrentReadDCEXT: TwglGetCurrentReadDCEXT; + + // WGL_EXT_pbuffer + wglCreatePbufferEXT: TwglCreatePbufferEXT; + wglGetPbufferDCEXT: TwglGetPbufferDCEXT; + wglReleasePbufferDCEXT: TwglReleasePbufferDCEXT; + wglDestroyPbufferEXT: TwglDestroyPbufferEXT; + wglQueryPbufferEXT: TwglQueryPbufferEXT; + + // WGL_EXT_pixel_format + wglGetPixelFormatAttribivEXT: TwglGetPixelFormatAttribivEXT; + wglGetPixelFormatAttribfvEXT: TwglGetPixelFormatAttribfvEXT; + wglChoosePixelFormatEXT: TwglChoosePixelFormatEXT; + + // WGL_EXT_swap_control + wglSwapIntervalEXT: TwglSwapIntervalEXT; + wglGetSwapIntervalEXT: TwglGetSwapIntervalEXT; + + // WGL_I3D_digital_video_control + wglGetDigitalVideoParametersI3D: TwglGetDigitalVideoParametersI3D; + wglSetDigitalVideoParametersI3D: TwglSetDigitalVideoParametersI3D; + + // WGL_I3D_gamma + wglGetGammaTableParametersI3D: TwglGetGammaTableParametersI3D; + wglSetGammaTableParametersI3D: TwglSetGammaTableParametersI3D; + wglGetGammaTableI3D: TwglGetGammaTableI3D; + wglSetGammaTableI3D: TwglSetGammaTableI3D; + + // WGL_I3D_genlock + wglEnableGenlockI3D: TwglEnableGenlockI3D; + wglDisableGenlockI3D: TwglDisableGenlockI3D; + wglIsEnabledGenlockI3D: TwglIsEnabledGenlockI3D; + wglGenlockSourceI3D: TwglGenlockSourceI3D; + wglGetGenlockSourceI3D: TwglGetGenlockSourceI3D; + wglGenlockSourceEdgeI3D: TwglGenlockSourceEdgeI3D; + wglGetGenlockSourceEdgeI3D: TwglGetGenlockSourceEdgeI3D; + wglGenlockSampleRateI3D: TwglGenlockSampleRateI3D; + wglGetGenlockSampleRateI3D: TwglGetGenlockSampleRateI3D; + wglGenlockSourceDelayI3D: TwglGenlockSourceDelayI3D; + wglGetGenlockSourceDelayI3D: TwglGetGenlockSourceDelayI3D; + wglQueryGenlockMaxSourceDelayI3D: TwglQueryGenlockMaxSourceDelayI3D; + + // WGL_I3D_image_buffer + wglCreateImageBufferI3D: TwglCreateImageBufferI3D; + wglDestroyImageBufferI3D: TwglDestroyImageBufferI3D; + wglAssociateImageBufferEventsI3D: TwglAssociateImageBufferEventsI3D; + wglReleaseImageBufferEventsI3D: TwglReleaseImageBufferEventsI3D; + + // WGL_I3D_swap_frame_lock + wglEnableFrameLockI3D: TwglEnableFrameLockI3D; + wglDisableFrameLockI3D: TwglDisableFrameLockI3D; + wglIsEnabledFrameLockI3D: TwglIsEnabledFrameLockI3D; + wglQueryFrameLockMasterI3D: TwglQueryFrameLockMasterI3D; + + // WGL_I3D_swap_frame_usage + wglGetFrameUsageI3D: TwglGetFrameUsageI3D; + wglBeginFrameTrackingI3D: TwglBeginFrameTrackingI3D; + wglEndFrameTrackingI3D: TwglEndFrameTrackingI3D; + wglQueryFrameTrackingI3D: TwglQueryFrameTrackingI3D; + + // WGL_NV_vertex_array_range + wglAllocateMemoryNV: TwglAllocateMemoryNV; + wglFreeMemoryNV: TwglFreeMemoryNV; + + // WGL_NV_present_video + wglEnumerateVideoDevicesNV: TwglEnumerateVideoDevicesNV; + wglBindVideoDeviceNV: TwglBindVideoDeviceNV; + wglQueryCurrentContextNV: TwglQueryCurrentContextNV; + + // WGL_NV_video_out + wglGetVideoDeviceNV: TwglGetVideoDeviceNV; + wglReleaseVideoDeviceNV: TwglReleaseVideoDeviceNV; + wglBindVideoImageNV: TwglBindVideoImageNV; + wglReleaseVideoImageNV: TwglReleaseVideoImageNV; + wglSendPbufferToVideoNV: TwglSendPbufferToVideoNV; + wglGetVideoInfoNV: TwglGetVideoInfoNV; + + // WGL_NV_swap_group + wglJoinSwapGroupNV: TwglJoinSwapGroupNV; + wglBindSwapBarrierNV: TwglBindSwapBarrierNV; + wglQuerySwapGroupNV: TwglQuerySwapGroupNV; + wglQueryMaxSwapGroupsNV: TwglQueryMaxSwapGroupsNV; + wglQueryFrameCountNV: TwglQueryFrameCountNV; + wglResetFrameCountNV: TwglResetFrameCountNV; + + // WGL_NV_gpu_affinity + wglEnumGpusNV: TwglEnumGpusNV; + wglEnumGpuDevicesNV: TwglEnumGpuDevicesNV; + wglCreateAffinityDCNV: TwglCreateAffinityDCNV; + wglEnumGpusFromAffinityDCNV: TwglEnumGpusFromAffinityDCNV; + wglDeleteDCNV: TwglDeleteDCNV; + + // WGL_OML_sync_control + wglGetSyncValuesOML: TwglGetSyncValuesOML; + wglGetMscRateOML: TwglGetMscRateOML; + wglSwapBuffersMscOML: TwglSwapBuffersMscOML; + wglSwapLayerBuffersMscOML: TwglSwapLayerBuffersMscOML; + wglWaitForMscOML: TwglWaitForMscOML; + wglWaitForSbcOML: TwglWaitForSbcOML; + + // WGL_3DL_stereo_control + wglSetStereoEmitterState3DL: TwglSetStereoEmitterState3DL; + + // WIN_draw_range_elements + glDrawRangeElementsWIN: TglDrawRangeElementsWIN; + + // WIN_swap_hint + glAddSwapHintRectWIN: TglAddSwapHintRectWIN; +{$ENDIF} + +{$IFDEF DGL_LINUX} + glXChooseVisual: TglXChooseVisual; + glXCopyContext: TglXCopyContext; + glXCreateContext: TglXCreateContext; + glXCreateGLXPixmap: TglXCreateGLXPixmap; + glXDestroyContext: TglXDestroyContext; + glXDestroyGLXPixmap: TglXDestroyGLXPixmap; + glXGetConfig: TglXGetConfig; + glXGetCurrentContext: TglXGetCurrentContext; + glXGetCurrentDrawable: TglXGetCurrentDrawable; + glXIsDirect: TglXIsDirect; + glXMakeCurrent: TglXMakeCurrent; + glXQueryExtension: TglXQueryExtension; + glXQueryVersion: TglXQueryVersion; + glXSwapBuffers: TglXSwapBuffers; + glXUseXFont: TglXUseXFont; + glXWaitGL: TglXWaitGL; + glXWaitX: TglXWaitX; + + glXGetClientString: TglXGetClientString; + glXQueryServerString: TglXQueryServerString; + glXQueryExtensionsString: TglXQueryExtensionsString; + + // GLX_VERSION_1_3 + glXGetFBConfigs: TglXGetFBConfigs; + glXChooseFBConfig: TglXChooseFBConfig; + glXGetFBConfigAttrib: TglXGetFBConfigAttrib; + glXGetVisualFromFBConfig: TglXGetVisualFromFBConfig; + glXCreateWindow: TglXCreateWindow; + glXDestroyWindow: TglXDestroyWindow; + glXCreatePixmap: TglXCreatePixmap; + + glXDestroyPixmap: TglXDestroyPixmap; + glXCreatePbuffer: TglXCreatePbuffer; + glXDestroyPbuffer: TglXDestroyPbuffer; + glXQueryDrawable: TglXQueryDrawable; + glXCreateNewContext: TglXCreateNewContext; + glXMakeContextCurrent: TglXMakeContextCurrent; + glXGetCurrentReadDrawable: TglXGetCurrentReadDrawable; + glXGetCurreentDisplay: TglXGetCurreentDisplay; + + glXQueryContext: TglXQueryContext; + glXSelectEvent: TglXSelectEvent; + glXGetSelectedEvent: TglXGetSelectedEvent; + + // GLX_VERSION_1_4 + glXGetProcAddress: TglXGetProcAddress; + + // GLX_ARB_get_proc_address + glXGetProcAddressARB: TglXGetProcAddressARB; + + // GLX_ARB_create_context + glXCreateContextAttribsARB: TglXCreateContextAttribsARB; + + // GLX_EXT_import_context + glXGetCurrentDisplayEXT: TglXGetCurrentDisplayEXT; + glXQueryContextInfoEXT: TglXQueryContextInfoEXT; + glXGetContextIDEXT: TglXGetContextIDEXT; + glXImportContextEXT: TglXImportContextEXT; + glXFreeContextEXT: TglXFreeContextEXT; + + // GLX_EXT_texture_from_pixmap + glXBindTexImageEXT: TglXBindTexImageEXT; + glXReleaseTexImageEXT: TglXReleaseTexImageEXT; +{$ENDIF} + + // GL utility functions and procedures + gluErrorString: TgluErrorString; + gluGetString: TgluGetString; + gluOrtho2D: TgluOrtho2D; + gluPerspective: TgluPerspective; + gluPickMatrix: TgluPickMatrix; + gluLookAt: TgluLookAt; + gluProject: TgluProject; + gluUnProject: TgluUnProject; + gluScaleImage: TgluScaleImage; + gluBuild1DMipmaps: TgluBuild1DMipmaps; + gluBuild2DMipmaps: TgluBuild2DMipmaps; + gluNewQuadric: TgluNewQuadric; + gluDeleteQuadric: TgluDeleteQuadric; + gluQuadricNormals: TgluQuadricNormals; + gluQuadricTexture: TgluQuadricTexture; + gluQuadricOrientation: TgluQuadricOrientation; + gluQuadricDrawStyle: TgluQuadricDrawStyle; + gluCylinder: TgluCylinder; + gluDisk: TgluDisk; + gluPartialDisk: TgluPartialDisk; + gluSphere: TgluSphere; + gluQuadricCallback: TgluQuadricCallback; + gluNewTess: TgluNewTess; + gluDeleteTess: TgluDeleteTess; + gluTessBeginPolygon: TgluTessBeginPolygon; + gluTessBeginContour: TgluTessBeginContour; + gluTessVertex: TgluTessVertex; + gluTessEndContour: TgluTessEndContour; + gluTessEndPolygon: TgluTessEndPolygon; + gluTessProperty: TgluTessProperty; + gluTessNormal: TgluTessNormal; + gluTessCallback: TgluTessCallback; + gluGetTessProperty: TgluGetTessProperty; + gluNewNurbsRenderer: TgluNewNurbsRenderer; + gluDeleteNurbsRenderer: TgluDeleteNurbsRenderer; + gluBeginSurface: TgluBeginSurface; + gluBeginCurve: TgluBeginCurve; + gluEndCurve: TgluEndCurve; + gluEndSurface: TgluEndSurface; + gluBeginTrim: TgluBeginTrim; + gluEndTrim: TgluEndTrim; + gluPwlCurve: TgluPwlCurve; + gluNurbsCurve: TgluNurbsCurve; + gluNurbsSurface: TgluNurbsSurface; + gluLoadSamplingMatrices: TgluLoadSamplingMatrices; + gluNurbsProperty: TgluNurbsProperty; + gluGetNurbsProperty: TgluGetNurbsProperty; + gluNurbsCallback: TgluNurbsCallback; + gluBeginPolygon: TgluBeginPolygon; + gluNextContour: TgluNextContour; + gluEndPolygon: TgluEndPolygon; + + +type + TRCOptions = set of (opDoubleBuffered, opGDI, opStereo); + +var + GL_LibHandle: Pointer = nil; + GLU_LibHandle: Pointer = nil; + + LastPixelFormat: Integer; + ExtensionsRead: Boolean; + ImplementationRead: Boolean; + + +const +{$IFDEF DGL_WIN} + OPENGL_LIBNAME = 'OpenGL32.dll'; + GLU_LIBNAME = 'GLU32.dll'; +{$ELSE} + {$IFDEF darwin} + OPENGL_LIBNAME = 'libGL.dylib'; + GLU_LIBNAME = 'libGLU.dylib'; + {$ELSE} + OPENGL_LIBNAME = 'libGL.so.1'; + GLU_LIBNAME = 'libGLU.so.1'; + {$ENDIF} +{$ENDIF} + +function InitOpenGL(LibName: String = OPENGL_LIBNAME; GLULibName: String = GLU_LIBNAME): Boolean; + +function dglGetProcAddress(ProcName: PAnsiChar; LibHandle: Pointer = nil): Pointer; +function dglCheckExtension(Extension: AnsiString): Boolean; + +procedure ReadExtensions; +procedure ReadImplementationProperties; + +// ============================================================================= +// Helper-Functions +// ============================================================================= +{$IFDEF DGL_WIN} + function CreateRenderingContext(DC: HDC; Options: TRCOptions; ColorBits, ZBits, StencilBits, AccumBits, AuxBuffers: Integer; Layer: Integer): HGLRC; + procedure DestroyRenderingContext(RC: HGLRC); + + procedure ActivateRenderingContext(DC: HDC; RC: HGLRC; loadext: boolean = true); + procedure DeactivateRenderingContext; +{$ENDIF} + + +procedure ReadOpenGLCore; +procedure Read_GL_3DFX_tbuffer; +procedure Read_GL_APPLE_element_array; +procedure Read_GL_APPLE_fence; +procedure Read_GL_APPLE_vertex_array_object; +procedure Read_GL_APPLE_vertex_array_range; +procedure Read_GL_APPLE_texture_range; +procedure Read_GL_APPLE_vertex_program_evaluators; +procedure Read_GL_APPLE_object_purgeable; +procedure Read_GL_ARB_matrix_palette; +procedure Read_GL_ARB_multitexture; +procedure Read_GL_ARB_point_parameters; +procedure Read_GL_ARB_texture_compression; +procedure Read_GL_ARB_transpose_matrix; +procedure Read_GL_ARB_vertex_blend; +procedure Read_GL_ARB_vertex_buffer_object; +procedure Read_GL_ARB_vertex_program; +procedure Read_GL_ARB_window_pos; +procedure Read_GL_ARB_color_buffer_float; +procedure Read_GL_ARB_Shader_Objects; +procedure Read_GL_ARB_occlusion_query; +procedure Read_GL_ARB_draw_instanced; +procedure Read_GL_ARB_framebuffer_object; +procedure Read_GL_ARB_geometry_shader4; +procedure Read_GL_ARB_instanced_arrays; +procedure Read_GL_ARB_map_buffer_range; +procedure Read_GL_ARB_texture_buffer_object; +procedure Read_GL_ARB_vertex_array_object; +procedure Read_GL_ARB_uniform_buffer_object; +procedure Read_GL_ARB_copy_buffer; +procedure Read_GL_ARB_draw_elements_base_vertex; +procedure Read_GL_ARB_provoking_vertex; +procedure Read_GL_ARB_sync; +procedure Read_GL_ARB_texture_multisample; +procedure Read_GL_ARB_draw_buffers_blend; +procedure Read_GL_ARB_sample_shading; +procedure Read_GL_ATI_draw_buffers; +procedure Read_GL_ATI_element_array; +procedure Read_GL_ATI_envmap_bumpmap; +procedure Read_GL_ATI_fragment_shader; +procedure Read_GL_ATI_map_object_buffer; +procedure Read_GL_ATI_pn_triangles; +procedure Read_GL_ATI_separate_stencil; +procedure Read_GL_ATI_vertex_array_object; +procedure Read_GL_ATI_vertex_attrib_array_object; +procedure Read_GL_ATI_vertex_streams; +procedure Read_GL_AMD_performance_monitor; +procedure Read_GL_EXT_blend_color; +procedure Read_GL_EXT_blend_func_separate; +procedure Read_GL_EXT_blend_minmax; +procedure Read_GL_EXT_color_subtable; +procedure Read_GL_EXT_compiled_vertex_array; +procedure Read_GL_EXT_convolution; +procedure Read_GL_EXT_coordinate_frame; +procedure Read_GL_EXT_copy_texture; +procedure Read_GL_EXT_cull_vertex; +procedure Read_GL_EXT_draw_range_elements; +procedure Read_GL_EXT_fog_coord; +procedure Read_GL_EXT_framebuffer_object; +procedure Read_GL_EXT_histogram; +procedure Read_GL_EXT_index_func; +procedure Read_GL_EXT_index_material; +procedure Read_GL_EXT_multi_draw_arrays; +procedure Read_GL_EXT_multisample; +procedure Read_GL_EXT_paletted_texture; +procedure Read_GL_EXT_pixel_transform; +procedure Read_GL_EXT_point_parameters; +procedure Read_GL_EXT_polygon_offset; +procedure Read_GL_EXT_secondary_color; +procedure Read_GL_EXT_stencil_two_side; +procedure Read_GL_EXT_subtexture; +procedure Read_GL_EXT_texture3D; +procedure Read_GL_EXT_texture_object; +procedure Read_GL_EXT_texture_perturb_normal; +procedure Read_GL_EXT_vertex_array; +procedure Read_GL_EXT_vertex_shader; +procedure Read_GL_EXT_vertex_weighting; +procedure Read_GL_EXT_depth_bounds_test; +procedure Read_GL_EXT_blend_equation_separate; +procedure Read_GL_EXT_stencil_clear_tag; +procedure Read_GL_EXT_framebuffer_blit; +procedure Read_GL_EXT_framebuffer_multisample; +procedure Read_GL_EXT_timer_query; +procedure Read_GL_EXT_gpu_program_parameters; +procedure Read_GL_EXT_bindable_uniform; +procedure Read_GL_EXT_draw_buffers2; +procedure Read_GL_EXT_draw_instanced; +procedure Read_GL_EXT_geometry_shader4; +procedure Read_GL_EXT_gpu_shader4; +procedure Read_GL_EXT_texture_array; +procedure Read_GL_EXT_texture_buffer_object; +procedure Read_GL_EXT_texture_integer; +procedure Read_GL_EXT_transform_feedback; +procedure Read_GL_EXT_direct_state_access; +procedure Read_GL_HP_image_transform; +procedure Read_GL_IBM_multimode_draw_arrays; +procedure Read_GL_IBM_vertex_array_lists; +procedure Read_GL_INGR_blend_func_separate; +procedure Read_GL_INTEL_parallel_arrays; +procedure Read_GL_MESA_resize_buffers; +procedure Read_GL_MESA_window_pos; +procedure Read_GL_NV_evaluators; +procedure Read_GL_NV_fence; +procedure Read_GL_NV_fragment_program; +procedure Read_GL_NV_half_float; +procedure Read_GL_NV_occlusion_query; +procedure Read_GL_NV_pixel_data_range; +procedure Read_GL_NV_point_sprite; +procedure Read_GL_NV_primitive_restart; +procedure Read_GL_NV_register_combiners; +procedure Read_GL_NV_register_combiners2; +procedure Read_GL_NV_vertex_array_range; +procedure Read_GL_NV_vertex_program; +procedure Read_GL_NV_depth_buffer_float; +procedure Read_GL_NV_framebuffer_multisample_coverage; +procedure Read_GL_NV_geometry_program4; +procedure Read_GL_NV_gpu_program4; +procedure Read_GL_NV_parameter_buffer_object; +procedure Read_GL_NV_transform_feedback; +procedure Read_GL_NV_conditional_render; +procedure Read_GL_NV_present_video; +procedure Read_GL_NV_explicit_multisample; +procedure Read_GL_NV_transform_feedback2; +procedure Read_GL_PGI_misc_hints; +procedure Read_GL_SGIS_detail_texture; +procedure Read_GL_SGIS_fog_function; +procedure Read_GL_SGIS_multisample; +procedure Read_GL_SGIS_pixel_texture; +procedure Read_GL_SGIS_point_parameters; +procedure Read_GL_SGIS_sharpen_texture; +procedure Read_GL_SGIS_texture4D; +procedure Read_GL_SGIS_texture_color_mask; +procedure Read_GL_SGIS_texture_filter4; +procedure Read_GL_SGIX_async; +procedure Read_GL_SGIX_flush_raster; +procedure Read_GL_SGIX_fragment_lighting; +procedure Read_GL_SGIX_framezoom; +procedure Read_GL_SGIX_igloo_interface; +procedure Read_GL_SGIX_instruments; +procedure Read_GL_SGIX_list_priority; +procedure Read_GL_SGIX_pixel_texture; +procedure Read_GL_SGIX_polynomial_ffd; +procedure Read_GL_SGIX_reference_plane; +procedure Read_GL_SGIX_sprite; +procedure Read_GL_SGIX_tag_sample_buffer; +procedure Read_GL_SGI_color_table; +procedure Read_GL_SUNX_constant_data; +procedure Read_GL_SUN_global_alpha; +procedure Read_GL_SUN_mesh_array; +procedure Read_GL_SUN_triangle_list; +procedure Read_GL_SUN_vertex; + +{$IFDEF DGL_WIN} +procedure Read_WGL_ARB_buffer_region; +procedure Read_WGL_ARB_extensions_string; +procedure Read_WGL_ARB_make_current_read; +procedure Read_WGL_ARB_pbuffer; +procedure Read_WGL_ARB_pixel_format; +procedure Read_WGL_ARB_pixel_format_float; +procedure Read_WGL_ARB_render_texture; +procedure Read_WGL_ARB_create_context; +procedure Read_WGL_AMD_gpu_association; +procedure Read_WGL_EXT_display_color_table; +procedure Read_WGL_EXT_extensions_string; +procedure Read_WGL_EXT_make_current_read; +procedure Read_WGL_EXT_pbuffer; +procedure Read_WGL_EXT_pixel_format; +procedure Read_WGL_EXT_swap_control; +procedure Read_WGL_I3D_digital_video_control; +procedure Read_WGL_I3D_gamma; +procedure Read_WGL_I3D_genlock; +procedure Read_WGL_I3D_image_buffer; +procedure Read_WGL_I3D_swap_frame_lock; +procedure Read_WGL_I3D_swap_frame_usage; +procedure Read_WGL_NV_vertex_array_range; +procedure Read_WGL_NV_present_video; +procedure Read_WGL_NV_video_out; +procedure Read_WGL_NV_swap_group; +procedure Read_WGL_NV_gpu_affinity; +procedure Read_WGL_OML_sync_control; +procedure Read_WGL_3DL_stereo_control; + +procedure Read_WIN_draw_range_elements; +procedure Read_WIN_swap_hint; +{$ENDIF} + + +implementation + + +{$IFDEF DGL_LINUX} +const + RTLD_LAZY = $001; + RTLD_NOW = $002; + RTLD_BINDING_MASK = $003; + + // Seems to work on Debian / Fedora + LibraryLib = {$IFDEF Linux} 'libdl.so.2'{$ELSE} 'c'{$ENDIF}; + +function dlopen(Name: PAnsiChar; Flags: LongInt): Pointer; cdecl; external LibraryLib name 'dlopen'; +function dlclose(Lib: Pointer): LongInt; cdecl; external LibraryLib name 'dlclose'; + +function dlsym(Lib: Pointer; Name: PAnsiChar): Pointer; cdecl; external LibraryLib name 'dlsym'; +{$ENDIF} + + +function dglLoadLibrary(Name: PChar): Pointer; +begin + {$IFDEF DGL_WIN} + Result := Pointer(LoadLibrary(Name)); + {$ENDIF} + + {$IFDEF DGL_LINUX} + Result := dlopen(Name, RTLD_LAZY); + {$ENDIF} +end; + + +function dglFreeLibrary(LibHandle: Pointer): Boolean; +begin + if LibHandle = nil then + Result := False + else + {$IFDEF DGL_WIN} + Result := FreeLibrary(HMODULE(LibHandle)); + {$ENDIF} + + {$IFDEF DGL_LINUX} + Result := dlclose(LibHandle) = 0; + {$ENDIF} +end; + + +function dglGetProcAddress(ProcName: PAnsiChar; LibHandle: Pointer = nil): Pointer; +begin + if LibHandle = nil then + LibHandle := GL_LibHandle; + + {$IFDEF DGL_WIN} + Result := GetProcAddress(HMODULE(LibHandle), ProcName); + {$ENDIF} + + {$IFDEF DGL_LINUX} + Result := dlsym(LibHandle, ProcName); + {$ENDIF} + + if result <> nil then + exit; + + {$IFDEF DGL_WIN} + if Addr(wglGetProcAddress) <> nil then + Result := wglGetProcAddress(ProcName); + {$ENDIF} + + {$IFDEF DGL_LINUX} + if Addr(glXGetProcAddress) <> nil then + Result := glXGetProcAddress(ProcName); + + if result <> nil then + exit; + + if Addr(glXGetProcAddressARB) <> nil then + Result := glXGetProcAddressARB(ProcName); + {$ENDIF} +end; + + +function Int_GetExtensionString: AnsiString; +begin + // generel extension string + if not Assigned(@glGetString) then + glGetString := dglGetProcAddress('glGetString'); + + if Assigned(@glGetString) then + Result := glGetString(GL_EXTENSIONS) + else + Result := ''; + + if (GL_LibHandle <> nil) then begin + {$IFDEF DGL_WIN} + // wglGetExtensionsStringEXT + if not Assigned(@wglGetExtensionsStringEXT) then + wglGetExtensionsStringEXT := dglGetProcAddress('wglGetExtensionsStringEXT'); + + if Assigned(@wglGetExtensionsStringEXT) then + Result := Result + #32 + wglGetExtensionsStringEXT; + + // wglGetExtensionsStringARB + if not Assigned(@wglGetExtensionsStringARB) then + wglGetExtensionsStringARB := dglGetProcAddress('wglGetExtensionsStringARB'); + + if Assigned(@wglGetExtensionsStringARB) then + Result := Result + #32 + wglGetExtensionsStringARB(wglGetCurrentDC); + {$ENDIF} + end; + + Result := #32 + Result + #32; +end; + + +function Int_CheckExtension(AllExtensions, CheckExtension: AnsiString): Boolean; +begin + Result := Pos(#32 + CheckExtension + #32, AllExtensions) > 0; +end; + + +function dglCheckExtension(Extension: AnsiString): Boolean; +var + Extensions: AnsiString; +begin + Extensions := Int_GetExtensionString; + Result := Int_CheckExtension(Extensions, Extension); +end; + + + +function InitOpenGL(LibName: String; GLULibName: String): Boolean; +begin + Result := False; + + // free opened libraries + if GL_LibHandle <> nil then + dglFreeLibrary(GL_LibHandle); + + if GLU_LibHandle <> nil then + dglFreeLibrary(GLU_LibHandle); + + // load library + GL_LibHandle := dglLoadLibrary(PChar(LibName)); + GLU_LibHandle := dglLoadLibrary(PChar(GLULibName)); + + // load GL functions + if (GL_LibHandle <> nil) then begin + {$IFDEF DGL_WIN} + wglCopyContext := dglGetProcAddress('wglCopyContext'); + wglCreateLayerContext := dglGetProcAddress('wglCreateLayerContext'); + wglCreateContext := dglGetProcAddress('wglCreateContext'); + wglDeleteContext := dglGetProcAddress('wglDeleteContext'); + wglDescribeLayerPlane := dglGetProcAddress('wglDescribeLayerPlane'); + wglGetCurrentContext := dglGetProcAddress('wglGetCurrentContext'); + wglGetCurrentDC := dglGetProcAddress('wglGetCurrentDC'); + wglGetLayerPaletteEntries := dglGetProcAddress('wglGetLayerPaletteEntries'); + wglGetProcAddress := dglGetProcAddress('wglGetProcAddress'); + wglMakeCurrent := dglGetProcAddress('wglMakeCurrent'); + wglRealizeLayerPalette := dglGetProcAddress('wglRealizeLayerPalette'); + wglSetLayerPaletteEntries := dglGetProcAddress('wglSetLayerPaletteEntries'); + wglShareLists := dglGetProcAddress('wglShareLists'); + wglSwapLayerBuffers := dglGetProcAddress('wglSwapLayerBuffers'); + wglSwapMultipleBuffers := dglGetProcAddress('wglSwapMultipleBuffers'); + wglUseFontBitmapsA := dglGetProcAddress('wglUseFontBitmapsA'); + wglUseFontOutlinesA := dglGetProcAddress('wglUseFontOutlinesA'); + wglUseFontBitmapsW := dglGetProcAddress('wglUseFontBitmapsW'); + wglUseFontOutlinesW := dglGetProcAddress('wglUseFontOutlinesW'); + wglUseFontBitmaps := dglGetProcAddress('wglUseFontBitmapsA'); + wglUseFontOutlines := dglGetProcAddress('wglUseFontOutlinesA'); + {$ENDIF} + + {$IFDEF DGL_LINUX} + glXChooseVisual := dglGetProcAddress('glXChooseVisual'); + glXCopyContext := dglGetProcAddress('glXCopyContext'); + glXCreateContext := dglGetProcAddress('glXCreateContext'); + glXCreateGLXPixmap := dglGetProcAddress('glXCreateGLXPixmap'); + glXDestroyContext := dglGetProcAddress('glXDestroyContext'); + glXDestroyGLXPixmap := dglGetProcAddress('glXDestroyGLXPixmap'); + glXGetConfig := dglGetProcAddress('glXGetConfig'); + glXGetCurrentContext := dglGetProcAddress('glXGetCurrentContext'); + glXGetCurrentDrawable := dglGetProcAddress('glXGetCurrentDrawable'); + glXIsDirect := dglGetProcAddress('glXIsDirect'); + glXMakeCurrent := dglGetProcAddress('glXMakeCurrent'); + glXQueryExtension := dglGetProcAddress('glXQueryExtension'); + glXQueryVersion := dglGetProcAddress('glXQueryVersion'); + glXSwapBuffers := dglGetProcAddress('glXSwapBuffers'); + glXUseXFont := dglGetProcAddress('glXUseXFont'); + glXWaitGL := dglGetProcAddress('glXWaitGL'); + glXWaitX := dglGetProcAddress('glXWaitX'); + + glXGetClientString := dglGetProcAddress('glXGetClientString'); + glXQueryServerString := dglGetProcAddress('glXQueryServerString'); + glXQueryExtensionsString := dglGetProcAddress('glXQueryExtensionsString'); + + // GLX_VERSION_1_3 + glXGetFBConfigs := dglGetProcAddress('glXGetFBConfigs'); + glXChooseFBConfig := dglGetProcAddress('glXChooseFBConfig'); + glXGetFBConfigAttrib := dglGetProcAddress('glXGetFBConfigAttrib'); + glXGetVisualFromFBConfig := dglGetProcAddress('glXGetVisualFromFBConfig'); + glXCreateWindow := dglGetProcAddress('glXCreateWindow'); + glXDestroyWindow := dglGetProcAddress('glXDestroyWindow'); + glXCreatePixmap := dglGetProcAddress('glXCreatePixmap'); + + glXDestroyPixmap := dglGetProcAddress('glXDestroyPixmap'); + glXCreatePbuffer := dglGetProcAddress('glXCreatePbuffer'); + glXDestroyPbuffer := dglGetProcAddress('glXDestroyPbuffer'); + glXQueryDrawable := dglGetProcAddress('glXQueryDrawable'); + glXCreateNewContext := dglGetProcAddress('glXCreateNewContext'); + glXMakeContextCurrent := dglGetProcAddress('glXMakeContextCurrent'); + glXGetCurrentReadDrawable := dglGetProcAddress('glXGetCurrentReadDrawable'); + glXGetCurreentDisplay := dglGetProcAddress('glXGetCurreentDisplay'); + + glXQueryContext := dglGetProcAddress('glXQueryContext'); + glXSelectEvent := dglGetProcAddress('glXSelectEvent'); + glXGetSelectedEvent := dglGetProcAddress('glXGetSelectedEvent'); + + // GLX_VERSION_1_4 + glXGetProcAddress := dglGetProcAddress('glXGetProcAddress'); + + // GLX_ARB_get_proc_address + glXGetProcAddressARB := dglGetProcAddress('glXGetProcAddressARB'); + + // GLX_ARB_create_context + glXCreateContextAttribsARB := dglGetProcAddress('glXCreateContextAttribsARB'); + + // GLX_EXT_import_context + glXGetCurrentDisplayEXT := dglGetProcAddress('glXGetCurrentDisplayEXT'); + glXQueryContextInfoEXT := dglGetProcAddress('glXQueryContextInfoEXT'); + glXGetContextIDEXT := dglGetProcAddress('glXGetContextIDEXT'); + glXImportContextEXT := dglGetProcAddress('glXImportContextEXT'); + glXFreeContextEXT := dglGetProcAddress('glXFreeContextEXT'); + + // GLX_EXT_texture_from_pixmap + glXBindTexImageEXT := dglGetProcAddress('glXBindTexImageEXT'); + glXReleaseTexImageEXT := dglGetProcAddress('glXReleaseTexImageEXT'); + {$ENDIF} + + Result := True; + end; + + // load GLU functions + if GLU_LibHandle <> nil then begin + // GLU ======================================================================== + gluBeginCurve := dglGetProcAddress('gluBeginCurve', GLU_LibHandle); + gluBeginPolygon := dglGetProcAddress('gluBeginPolygon', GLU_LibHandle); + gluBeginSurface := dglGetProcAddress('gluBeginSurface', GLU_LibHandle); + gluBeginTrim := dglGetProcAddress('gluBeginTrim', GLU_LibHandle); + gluBuild1DMipmaps := dglGetProcAddress('gluBuild1DMipmaps', GLU_LibHandle); + gluBuild2DMipmaps := dglGetProcAddress('gluBuild2DMipmaps', GLU_LibHandle); + gluCylinder := dglGetProcAddress('gluCylinder', GLU_LibHandle); + gluDeleteNurbsRenderer := dglGetProcAddress('gluDeleteNurbsRenderer', GLU_LibHandle); + gluDeleteQuadric := dglGetProcAddress('gluDeleteQuadric', GLU_LibHandle); + gluDeleteTess := dglGetProcAddress('gluDeleteTess', GLU_LibHandle); + gluDisk := dglGetProcAddress('gluDisk', GLU_LibHandle); + gluEndCurve := dglGetProcAddress('gluEndCurve', GLU_LibHandle); + gluEndPolygon := dglGetProcAddress('gluEndPolygon', GLU_LibHandle); + gluEndSurface := dglGetProcAddress('gluEndSurface', GLU_LibHandle); + gluEndTrim := dglGetProcAddress('gluEndTrim', GLU_LibHandle); + gluErrorString := dglGetProcAddress('gluErrorString', GLU_LibHandle); + gluGetNurbsProperty := dglGetProcAddress('gluGetNurbsProperty', GLU_LibHandle); + gluGetString := dglGetProcAddress('gluGetString', GLU_LibHandle); + gluGetTessProperty := dglGetProcAddress('gluGetTessProperty', GLU_LibHandle); + gluLoadSamplingMatrices := dglGetProcAddress('gluLoadSamplingMatrices', GLU_LibHandle); + gluLookAt := dglGetProcAddress('gluLookAt', GLU_LibHandle); + gluNewNurbsRenderer := dglGetProcAddress('gluNewNurbsRenderer', GLU_LibHandle); + gluNewQuadric := dglGetProcAddress('gluNewQuadric', GLU_LibHandle); + gluNewTess := dglGetProcAddress('gluNewTess', GLU_LibHandle); + gluNextContour := dglGetProcAddress('gluNextContour', GLU_LibHandle); + gluNurbsCallback := dglGetProcAddress('gluNurbsCallback', GLU_LibHandle); + gluNurbsCurve := dglGetProcAddress('gluNurbsCurve', GLU_LibHandle); + gluNurbsProperty := dglGetProcAddress('gluNurbsProperty', GLU_LibHandle); + gluNurbsSurface := dglGetProcAddress('gluNurbsSurface', GLU_LibHandle); + gluOrtho2D := dglGetProcAddress('gluOrtho2D', GLU_LibHandle); + gluPartialDisk := dglGetProcAddress('gluPartialDisk', GLU_LibHandle); + gluPerspective := dglGetProcAddress('gluPerspective', GLU_LibHandle); + gluPickMatrix := dglGetProcAddress('gluPickMatrix', GLU_LibHandle); + gluProject := dglGetProcAddress('gluProject', GLU_LibHandle); + gluPwlCurve := dglGetProcAddress('gluPwlCurve', GLU_LibHandle); + gluQuadricCallback := dglGetProcAddress('gluQuadricCallback', GLU_LibHandle); + gluQuadricDrawStyle := dglGetProcAddress('gluQuadricDrawStyle', GLU_LibHandle); + gluQuadricNormals := dglGetProcAddress('gluQuadricNormals', GLU_LibHandle); + gluQuadricOrientation := dglGetProcAddress('gluQuadricOrientation', GLU_LibHandle); + gluQuadricTexture := dglGetProcAddress('gluQuadricTexture', GLU_LibHandle); + gluScaleImage := dglGetProcAddress('gluScaleImage', GLU_LibHandle); + gluSphere := dglGetProcAddress('gluSphere', GLU_LibHandle); + gluTessBeginContour := dglGetProcAddress('gluTessBeginContour', GLU_LibHandle); + gluTessBeginPolygon := dglGetProcAddress('gluTessBeginPolygon', GLU_LibHandle); + gluTessCallback := dglGetProcAddress('gluTessCallback', GLU_LibHandle); + gluTessEndContour := dglGetProcAddress('gluTessEndContour', GLU_LibHandle); + gluTessEndPolygon := dglGetProcAddress('gluTessEndPolygon', GLU_LibHandle); + gluTessNormal := dglGetProcAddress('gluTessNormal', GLU_LibHandle); + gluTessProperty := dglGetProcAddress('gluTessProperty', GLU_LibHandle); + gluTessVertex := dglGetProcAddress('gluTessVertex', GLU_LibHandle); + gluUnProject := dglGetProcAddress('gluUnProject', GLU_LibHandle); + end; +end; + +procedure ReadOpenGLCore; +begin + // GL_VERSION_1_0 + glCullFace := dglGetProcAddress('glCullFace'); + glFrontFace := dglGetProcAddress('glFrontFace'); + glHint := dglGetProcAddress('glHint'); + glLineWidth := dglGetProcAddress('glLineWidth'); + glPointSize := dglGetProcAddress('glPointSize'); + glPolygonMode := dglGetProcAddress('glPolygonMode'); + glScissor := dglGetProcAddress('glScissor'); + glTexParameterf := dglGetProcAddress('glTexParameterf'); + glTexParameterfv := dglGetProcAddress('glTexParameterfv'); + glTexParameteri := dglGetProcAddress('glTexParameteri'); + glTexParameteriv := dglGetProcAddress('glTexParameteriv'); + glTexImage1D := dglGetProcAddress('glTexImage1D'); + glTexImage2D := dglGetProcAddress('glTexImage2D'); + glDrawBuffer := dglGetProcAddress('glDrawBuffer'); + glClear := dglGetProcAddress('glClear'); + glClearColor := dglGetProcAddress('glClearColor'); + glClearStencil := dglGetProcAddress('glClearStencil'); + glClearDepth := dglGetProcAddress('glClearDepth'); + glStencilMask := dglGetProcAddress('glStencilMask'); + glColorMask := dglGetProcAddress('glColorMask'); + glDepthMask := dglGetProcAddress('glDepthMask'); + glDisable := dglGetProcAddress('glDisable'); + glEnable := dglGetProcAddress('glEnable'); + glFinish := dglGetProcAddress('glFinish'); + glFlush := dglGetProcAddress('glFlush'); + glBlendFunc := dglGetProcAddress('glBlendFunc'); + glLogicOp := dglGetProcAddress('glLogicOp'); + glStencilFunc := dglGetProcAddress('glStencilFunc'); + glStencilOp := dglGetProcAddress('glStencilOp'); + glDepthFunc := dglGetProcAddress('glDepthFunc'); + glPixelStoref := dglGetProcAddress('glPixelStoref'); + glPixelStorei := dglGetProcAddress('glPixelStorei'); + glReadBuffer := dglGetProcAddress('glReadBuffer'); + glReadPixels := dglGetProcAddress('glReadPixels'); + glGetBooleanv := dglGetProcAddress('glGetBooleanv'); + glGetDoublev := dglGetProcAddress('glGetDoublev'); + glGetError := dglGetProcAddress('glGetError'); + glGetFloatv := dglGetProcAddress('glGetFloatv'); + glGetIntegerv := dglGetProcAddress('glGetIntegerv'); + glGetString := dglGetProcAddress('glGetString'); + glGetTexImage := dglGetProcAddress('glGetTexImage'); + glGetTexParameteriv := dglGetProcAddress('glGetTexParameteriv'); + glGetTexParameterfv := dglGetProcAddress('glGetTexParameterfv'); + glGetTexLevelParameterfv := dglGetProcAddress('glGetTexLevelParameterfv'); + glGetTexLevelParameteriv := dglGetProcAddress('glGetTexLevelParameteriv'); + glIsEnabled := dglGetProcAddress('glIsEnabled'); + glDepthRange := dglGetProcAddress('glDepthRange'); + glViewport := dglGetProcAddress('glViewport'); + + // GL_VERSION_1_1 + glDrawArrays := dglGetProcAddress('glDrawArrays'); + glDrawElements := dglGetProcAddress('glDrawElements'); + glGetPointerv := dglGetProcAddress('glGetPointerv'); + glPolygonOffset := dglGetProcAddress('glPolygonOffset'); + glCopyTexImage1D := dglGetProcAddress('glCopyTexImage1D'); + glCopyTexImage2D := dglGetProcAddress('glCopyTexImage2D'); + glCopyTexSubImage1D := dglGetProcAddress('glCopyTexSubImage1D'); + glCopyTexSubImage2D := dglGetProcAddress('glCopyTexSubImage2D'); + glTexSubImage1D := dglGetProcAddress('glTexSubImage1D'); + glTexSubImage2D := dglGetProcAddress('glTexSubImage2D'); + glBindTexture := dglGetProcAddress('glBindTexture'); + glDeleteTextures := dglGetProcAddress('glDeleteTextures'); + glGenTextures := dglGetProcAddress('glGenTextures'); + +{$ifdef DGL_DEPRECATED} + glAccum := dglGetProcAddress('glAccum'); + glAlphaFunc := dglGetProcAddress('glAlphaFunc'); + glAreTexturesResident := dglGetProcAddress('glAreTexturesResident'); + glArrayElement := dglGetProcAddress('glArrayElement'); + glBegin := dglGetProcAddress('glBegin'); + glBitmap := dglGetProcAddress('glBitmap'); + glCallList := dglGetProcAddress('glCallList'); + glCallLists := dglGetProcAddress('glCallLists'); + glClearAccum := dglGetProcAddress('glClearAccum'); + glClearIndex := dglGetProcAddress('glClearIndex'); + glClipPlane := dglGetProcAddress('glClipPlane'); + glColor3b := dglGetProcAddress('glColor3b'); + glColor3bv := dglGetProcAddress('glColor3bv'); + glColor3d := dglGetProcAddress('glColor3d'); + glColor3dv := dglGetProcAddress('glColor3dv'); + glColor3f := dglGetProcAddress('glColor3f'); + glColor3fv := dglGetProcAddress('glColor3fv'); + glColor3i := dglGetProcAddress('glColor3i'); + glColor3iv := dglGetProcAddress('glColor3iv'); + glColor3s := dglGetProcAddress('glColor3s'); + glColor3sv := dglGetProcAddress('glColor3sv'); + glColor3ub := dglGetProcAddress('glColor3ub'); + glColor3ubv := dglGetProcAddress('glColor3ubv'); + glColor3ui := dglGetProcAddress('glColor3ui'); + glColor3uiv := dglGetProcAddress('glColor3uiv'); + glColor3us := dglGetProcAddress('glColor3us'); + glColor3usv := dglGetProcAddress('glColor3usv'); + glColor4b := dglGetProcAddress('glColor4b'); + glColor4bv := dglGetProcAddress('glColor4bv'); + glColor4d := dglGetProcAddress('glColor4d'); + glColor4dv := dglGetProcAddress('glColor4dv'); + glColor4f := dglGetProcAddress('glColor4f'); + glColor4fv := dglGetProcAddress('glColor4fv'); + glColor4i := dglGetProcAddress('glColor4i'); + glColor4iv := dglGetProcAddress('glColor4iv'); + glColor4s := dglGetProcAddress('glColor4s'); + glColor4sv := dglGetProcAddress('glColor4sv'); + glColor4ub := dglGetProcAddress('glColor4ub'); + glColor4ubv := dglGetProcAddress('glColor4ubv'); + glColor4ui := dglGetProcAddress('glColor4ui'); + glColor4uiv := dglGetProcAddress('glColor4uiv'); + glColor4us := dglGetProcAddress('glColor4us'); + glColor4usv := dglGetProcAddress('glColor4usv'); + glColorMaterial := dglGetProcAddress('glColorMaterial'); + glColorPointer := dglGetProcAddress('glColorPointer'); + glCopyPixels := dglGetProcAddress('glCopyPixels'); + glDeleteLists := dglGetProcAddress('glDeleteLists'); + glDisableClientState := dglGetProcAddress('glDisableClientState'); + glDrawPixels := dglGetProcAddress('glDrawPixels'); + glEdgeFlag := dglGetProcAddress('glEdgeFlag'); + glEdgeFlagPointer := dglGetProcAddress('glEdgeFlagPointer'); + glEdgeFlagv := dglGetProcAddress('glEdgeFlagv'); + glEnableClientState := dglGetProcAddress('glEnableClientState'); + glEnd := dglGetProcAddress('glEnd'); + glEndList := dglGetProcAddress('glEndList'); + glEvalCoord1d := dglGetProcAddress('glEvalCoord1d'); + glEvalCoord1dv := dglGetProcAddress('glEvalCoord1dv'); + glEvalCoord1f := dglGetProcAddress('glEvalCoord1f'); + glEvalCoord1fv := dglGetProcAddress('glEvalCoord1fv'); + glEvalCoord2d := dglGetProcAddress('glEvalCoord2d'); + glEvalCoord2dv := dglGetProcAddress('glEvalCoord2dv'); + glEvalCoord2f := dglGetProcAddress('glEvalCoord2f'); + glEvalCoord2fv := dglGetProcAddress('glEvalCoord2fv'); + glEvalMesh1 := dglGetProcAddress('glEvalMesh1'); + glEvalMesh2 := dglGetProcAddress('glEvalMesh2'); + glEvalPoint1 := dglGetProcAddress('glEvalPoint1'); + glEvalPoint2 := dglGetProcAddress('glEvalPoint2'); + glFeedbackBuffer := dglGetProcAddress('glFeedbackBuffer'); + glFogf := dglGetProcAddress('glFogf'); + glFogfv := dglGetProcAddress('glFogfv'); + glFogi := dglGetProcAddress('glFogi'); + glFogiv := dglGetProcAddress('glFogiv'); + glFrustum := dglGetProcAddress('glFrustum'); + glGenLists := dglGetProcAddress('glGenLists'); + glGetClipPlane := dglGetProcAddress('glGetClipPlane'); + glGetLightfv := dglGetProcAddress('glGetLightfv'); + glGetLightiv := dglGetProcAddress('glGetLightiv'); + glGetMapdv := dglGetProcAddress('glGetMapdv'); + glGetMapfv := dglGetProcAddress('glGetMapfv'); + glGetMapiv := dglGetProcAddress('glGetMapiv'); + glGetMaterialfv := dglGetProcAddress('glGetMaterialfv'); + glGetMaterialiv := dglGetProcAddress('glGetMaterialiv'); + glGetPixelMapfv := dglGetProcAddress('glGetPixelMapfv'); + glGetPixelMapuiv := dglGetProcAddress('glGetPixelMapuiv'); + glGetPixelMapusv := dglGetProcAddress('glGetPixelMapusv'); + glGetPolygonStipple := dglGetProcAddress('glGetPolygonStipple'); + glGetTexEnvfv := dglGetProcAddress('glGetTexEnvfv'); + glGetTexEnviv := dglGetProcAddress('glGetTexEnviv'); + glGetTexGendv := dglGetProcAddress('glGetTexGendv'); + glGetTexGenfv := dglGetProcAddress('glGetTexGenfv'); + glGetTexGeniv := dglGetProcAddress('glGetTexGeniv'); + glIndexMask := dglGetProcAddress('glIndexMask'); + glIndexPointer := dglGetProcAddress('glIndexPointer'); + glIndexd := dglGetProcAddress('glIndexd'); + glIndexdv := dglGetProcAddress('glIndexdv'); + glIndexf := dglGetProcAddress('glIndexf'); + glIndexfv := dglGetProcAddress('glIndexfv'); + glIndexi := dglGetProcAddress('glIndexi'); + glIndexiv := dglGetProcAddress('glIndexiv'); + glIndexs := dglGetProcAddress('glIndexs'); + glIndexsv := dglGetProcAddress('glIndexsv'); + glIndexub := dglGetProcAddress('glIndexub'); + glIndexubv := dglGetProcAddress('glIndexubv'); + glInitNames := dglGetProcAddress('glInitNames'); + glInterleavedArrays := dglGetProcAddress('glInterleavedArrays'); + glIsList := dglGetProcAddress('glIsList'); + glIsTexture := dglGetProcAddress('glIsTexture'); + glLightModelf := dglGetProcAddress('glLightModelf'); + glLightModelfv := dglGetProcAddress('glLightModelfv'); + glLightModeli := dglGetProcAddress('glLightModeli'); + glLightModeliv := dglGetProcAddress('glLightModeliv'); + glLightf := dglGetProcAddress('glLightf'); + glLightfv := dglGetProcAddress('glLightfv'); + glLighti := dglGetProcAddress('glLighti'); + glLightiv := dglGetProcAddress('glLightiv'); + glLineStipple := dglGetProcAddress('glLineStipple'); + glListBase := dglGetProcAddress('glListBase'); + glLoadIdentity := dglGetProcAddress('glLoadIdentity'); + glLoadMatrixd := dglGetProcAddress('glLoadMatrixd'); + glLoadMatrixf := dglGetProcAddress('glLoadMatrixf'); + glLoadName := dglGetProcAddress('glLoadName'); + glMap1d := dglGetProcAddress('glMap1d'); + glMap1f := dglGetProcAddress('glMap1f'); + glMap2d := dglGetProcAddress('glMap2d'); + glMap2f := dglGetProcAddress('glMap2f'); + glMapGrid1d := dglGetProcAddress('glMapGrid1d'); + glMapGrid1f := dglGetProcAddress('glMapGrid1f'); + glMapGrid2d := dglGetProcAddress('glMapGrid2d'); + glMapGrid2f := dglGetProcAddress('glMapGrid2f'); + glMaterialf := dglGetProcAddress('glMaterialf'); + glMaterialfv := dglGetProcAddress('glMaterialfv'); + glMateriali := dglGetProcAddress('glMateriali'); + glMaterialiv := dglGetProcAddress('glMaterialiv'); + glMatrixMode := dglGetProcAddress('glMatrixMode'); + glMultMatrixd := dglGetProcAddress('glMultMatrixd'); + glMultMatrixf := dglGetProcAddress('glMultMatrixf'); + glNewList := dglGetProcAddress('glNewList'); + glNormal3b := dglGetProcAddress('glNormal3b'); + glNormal3bv := dglGetProcAddress('glNormal3bv'); + glNormal3d := dglGetProcAddress('glNormal3d'); + glNormal3dv := dglGetProcAddress('glNormal3dv'); + glNormal3f := dglGetProcAddress('glNormal3f'); + glNormal3fv := dglGetProcAddress('glNormal3fv'); + glNormal3i := dglGetProcAddress('glNormal3i'); + glNormal3iv := dglGetProcAddress('glNormal3iv'); + glNormal3s := dglGetProcAddress('glNormal3s'); + glNormal3sv := dglGetProcAddress('glNormal3sv'); + glNormalPointer := dglGetProcAddress('glNormalPointer'); + glOrtho := dglGetProcAddress('glOrtho'); + glPassThrough := dglGetProcAddress('glPassThrough'); + glPixelMapfv := dglGetProcAddress('glPixelMapfv'); + glPixelMapuiv := dglGetProcAddress('glPixelMapuiv'); + glPixelMapusv := dglGetProcAddress('glPixelMapusv'); + glPixelTransferf := dglGetProcAddress('glPixelTransferf'); + glPixelTransferi := dglGetProcAddress('glPixelTransferi'); + glPixelZoom := dglGetProcAddress('glPixelZoom'); + glPolygonStipple := dglGetProcAddress('glPolygonStipple'); + glPopAttrib := dglGetProcAddress('glPopAttrib'); + glPopClientAttrib := dglGetProcAddress('glPopClientAttrib'); + glPopMatrix := dglGetProcAddress('glPopMatrix'); + glPopName := dglGetProcAddress('glPopName'); + glPrioritizeTextures := dglGetProcAddress('glPrioritizeTextures'); + glPushAttrib := dglGetProcAddress('glPushAttrib'); + glPushClientAttrib := dglGetProcAddress('glPushClientAttrib'); + glPushMatrix := dglGetProcAddress('glPushMatrix'); + glPushName := dglGetProcAddress('glPushName'); + glRasterPos2d := dglGetProcAddress('glRasterPos2d'); + glRasterPos2dv := dglGetProcAddress('glRasterPos2dv'); + glRasterPos2f := dglGetProcAddress('glRasterPos2f'); + glRasterPos2fv := dglGetProcAddress('glRasterPos2fv'); + glRasterPos2i := dglGetProcAddress('glRasterPos2i'); + glRasterPos2iv := dglGetProcAddress('glRasterPos2iv'); + glRasterPos2s := dglGetProcAddress('glRasterPos2s'); + glRasterPos2sv := dglGetProcAddress('glRasterPos2sv'); + glRasterPos3d := dglGetProcAddress('glRasterPos3d'); + glRasterPos3dv := dglGetProcAddress('glRasterPos3dv'); + glRasterPos3f := dglGetProcAddress('glRasterPos3f'); + glRasterPos3fv := dglGetProcAddress('glRasterPos3fv'); + glRasterPos3i := dglGetProcAddress('glRasterPos3i'); + glRasterPos3iv := dglGetProcAddress('glRasterPos3iv'); + glRasterPos3s := dglGetProcAddress('glRasterPos3s'); + glRasterPos3sv := dglGetProcAddress('glRasterPos3sv'); + glRasterPos4d := dglGetProcAddress('glRasterPos4d'); + glRasterPos4dv := dglGetProcAddress('glRasterPos4dv'); + glRasterPos4f := dglGetProcAddress('glRasterPos4f'); + glRasterPos4fv := dglGetProcAddress('glRasterPos4fv'); + glRasterPos4i := dglGetProcAddress('glRasterPos4i'); + glRasterPos4iv := dglGetProcAddress('glRasterPos4iv'); + glRasterPos4s := dglGetProcAddress('glRasterPos4s'); + glRasterPos4sv := dglGetProcAddress('glRasterPos4sv'); + glRectd := dglGetProcAddress('glRectd'); + glRectdv := dglGetProcAddress('glRectdv'); + glRectf := dglGetProcAddress('glRectf'); + glRectfv := dglGetProcAddress('glRectfv'); + glRecti := dglGetProcAddress('glRecti'); + glRectiv := dglGetProcAddress('glRectiv'); + glRects := dglGetProcAddress('glRects'); + glRectsv := dglGetProcAddress('glRectsv'); + glRenderMode := dglGetProcAddress('glRenderMode'); + glRotated := dglGetProcAddress('glRotated'); + glRotatef := dglGetProcAddress('glRotatef'); + glScaled := dglGetProcAddress('glScaled'); + glScalef := dglGetProcAddress('glScalef'); + glSelectBuffer := dglGetProcAddress('glSelectBuffer'); + glShadeModel := dglGetProcAddress('glShadeModel'); + glTexCoord1d := dglGetProcAddress('glTexCoord1d'); + glTexCoord1dv := dglGetProcAddress('glTexCoord1dv'); + glTexCoord1f := dglGetProcAddress('glTexCoord1f'); + glTexCoord1fv := dglGetProcAddress('glTexCoord1fv'); + glTexCoord1i := dglGetProcAddress('glTexCoord1i'); + glTexCoord1iv := dglGetProcAddress('glTexCoord1iv'); + glTexCoord1s := dglGetProcAddress('glTexCoord1s'); + glTexCoord1sv := dglGetProcAddress('glTexCoord1sv'); + glTexCoord2d := dglGetProcAddress('glTexCoord2d'); + glTexCoord2dv := dglGetProcAddress('glTexCoord2dv'); + glTexCoord2f := dglGetProcAddress('glTexCoord2f'); + glTexCoord2fv := dglGetProcAddress('glTexCoord2fv'); + glTexCoord2i := dglGetProcAddress('glTexCoord2i'); + glTexCoord2iv := dglGetProcAddress('glTexCoord2iv'); + glTexCoord2s := dglGetProcAddress('glTexCoord2s'); + glTexCoord2sv := dglGetProcAddress('glTexCoord2sv'); + glTexCoord3d := dglGetProcAddress('glTexCoord3d'); + glTexCoord3dv := dglGetProcAddress('glTexCoord3dv'); + glTexCoord3f := dglGetProcAddress('glTexCoord3f'); + glTexCoord3fv := dglGetProcAddress('glTexCoord3fv'); + glTexCoord3i := dglGetProcAddress('glTexCoord3i'); + glTexCoord3iv := dglGetProcAddress('glTexCoord3iv'); + glTexCoord3s := dglGetProcAddress('glTexCoord3s'); + glTexCoord3sv := dglGetProcAddress('glTexCoord3sv'); + glTexCoord4d := dglGetProcAddress('glTexCoord4d'); + glTexCoord4dv := dglGetProcAddress('glTexCoord4dv'); + glTexCoord4f := dglGetProcAddress('glTexCoord4f'); + glTexCoord4fv := dglGetProcAddress('glTexCoord4fv'); + glTexCoord4i := dglGetProcAddress('glTexCoord4i'); + glTexCoord4iv := dglGetProcAddress('glTexCoord4iv'); + glTexCoord4s := dglGetProcAddress('glTexCoord4s'); + glTexCoord4sv := dglGetProcAddress('glTexCoord4sv'); + glTexCoordPointer := dglGetProcAddress('glTexCoordPointer'); + glTexEnvf := dglGetProcAddress('glTexEnvf'); + glTexEnvfv := dglGetProcAddress('glTexEnvfv'); + glTexEnvi := dglGetProcAddress('glTexEnvi'); + glTexEnviv := dglGetProcAddress('glTexEnviv'); + glTexGend := dglGetProcAddress('glTexGend'); + glTexGendv := dglGetProcAddress('glTexGendv'); + glTexGenf := dglGetProcAddress('glTexGenf'); + glTexGenfv := dglGetProcAddress('glTexGenfv'); + glTexGeni := dglGetProcAddress('glTexGeni'); + glTexGeniv := dglGetProcAddress('glTexGeniv'); + glTranslated := dglGetProcAddress('glTranslated'); + glTranslatef := dglGetProcAddress('glTranslatef'); + glVertex2d := dglGetProcAddress('glVertex2d'); + glVertex2dv := dglGetProcAddress('glVertex2dv'); + glVertex2f := dglGetProcAddress('glVertex2f'); + glVertex2fv := dglGetProcAddress('glVertex2fv'); + glVertex2i := dglGetProcAddress('glVertex2i'); + glVertex2iv := dglGetProcAddress('glVertex2iv'); + glVertex2s := dglGetProcAddress('glVertex2s'); + glVertex2sv := dglGetProcAddress('glVertex2sv'); + glVertex3d := dglGetProcAddress('glVertex3d'); + glVertex3dv := dglGetProcAddress('glVertex3dv'); + glVertex3f := dglGetProcAddress('glVertex3f'); + glVertex3fv := dglGetProcAddress('glVertex3fv'); + glVertex3i := dglGetProcAddress('glVertex3i'); + glVertex3iv := dglGetProcAddress('glVertex3iv'); + glVertex3s := dglGetProcAddress('glVertex3s'); + glVertex3sv := dglGetProcAddress('glVertex3sv'); + glVertex4d := dglGetProcAddress('glVertex4d'); + glVertex4dv := dglGetProcAddress('glVertex4dv'); + glVertex4f := dglGetProcAddress('glVertex4f'); + glVertex4fv := dglGetProcAddress('glVertex4fv'); + glVertex4i := dglGetProcAddress('glVertex4i'); + glVertex4iv := dglGetProcAddress('glVertex4iv'); + glVertex4s := dglGetProcAddress('glVertex4s'); + glVertex4sv := dglGetProcAddress('glVertex4sv'); + glVertexPointer := dglGetProcAddress('glVertexPointer'); +{$endif} + + // GL_VERSION_1_2 + glBlendColor := dglGetProcAddress('glBlendColor'); + glBlendEquation := dglGetProcAddress('glBlendEquation'); + glDrawRangeElements := dglGetProcAddress('glDrawRangeElements'); + glTexImage3D := dglGetProcAddress('glTexImage3D'); + glTexSubImage3D := dglGetProcAddress('glTexSubImage3D'); + glCopyTexSubImage3D := dglGetProcAddress('glCopyTexSubImage3D'); +{$ifdef DGL_DEPRECATED} + glColorTable := dglGetProcAddress('glColorTable'); + glColorTableParameterfv := dglGetProcAddress('glColorTableParameterfv'); + glColorTableParameteriv := dglGetProcAddress('glColorTableParameteriv'); + glCopyColorTable := dglGetProcAddress('glCopyColorTable'); + glGetColorTable := dglGetProcAddress('glGetColorTable'); + glGetColorTableParameterfv := dglGetProcAddress('glGetColorTableParameterfv'); + glGetColorTableParameteriv := dglGetProcAddress('glGetColorTableParameteriv'); + glColorSubTable := dglGetProcAddress('glColorSubTable'); + glCopyColorSubTable := dglGetProcAddress('glCopyColorSubTable'); + glConvolutionFilter1D := dglGetProcAddress('glConvolutionFilter1D'); + glConvolutionFilter2D := dglGetProcAddress('glConvolutionFilter2D'); + glConvolutionParameterf := dglGetProcAddress('glConvolutionParameterf'); + glConvolutionParameterfv := dglGetProcAddress('glConvolutionParameterfv'); + glConvolutionParameteri := dglGetProcAddress('glConvolutionParameteri'); + glConvolutionParameteriv := dglGetProcAddress('glConvolutionParameteriv'); + glCopyConvolutionFilter1D := dglGetProcAddress('glCopyConvolutionFilter1D'); + glCopyConvolutionFilter2D := dglGetProcAddress('glCopyConvolutionFilter2D'); + glGetConvolutionFilter := dglGetProcAddress('glGetConvolutionFilter'); + glGetConvolutionParameterfv := dglGetProcAddress('glGetConvolutionParameterfv'); + glGetConvolutionParameteriv := dglGetProcAddress('glGetConvolutionParameteriv'); + glGetSeparableFilter := dglGetProcAddress('glGetSeparableFilter'); + glSeparableFilter2D := dglGetProcAddress('glSeparableFilter2D'); + glGetHistogram := dglGetProcAddress('glGetHistogram'); + glGetHistogramParameterfv := dglGetProcAddress('glGetHistogramParameterfv'); + glGetHistogramParameteriv := dglGetProcAddress('glGetHistogramParameteriv'); + glGetMinmax := dglGetProcAddress('glGetMinmax'); + glGetMinmaxParameterfv := dglGetProcAddress('glGetMinmaxParameterfv'); + glGetMinmaxParameteriv := dglGetProcAddress('glGetMinmaxParameteriv'); + glHistogram := dglGetProcAddress('glHistogram'); + glMinmax := dglGetProcAddress('glMinmax'); + glResetHistogram := dglGetProcAddress('glResetHistogram'); + glResetMinmax := dglGetProcAddress('glResetMinmax'); +{$endif} + + // GL_VERSION_1_3 + glActiveTexture := dglGetProcAddress('glActiveTexture'); + glSampleCoverage := dglGetProcAddress('glSampleCoverage'); + glCompressedTexImage3D := dglGetProcAddress('glCompressedTexImage3D'); + glCompressedTexImage2D := dglGetProcAddress('glCompressedTexImage2D'); + glCompressedTexImage1D := dglGetProcAddress('glCompressedTexImage1D'); + glCompressedTexSubImage3D := dglGetProcAddress('glCompressedTexSubImage3D'); + glCompressedTexSubImage2D := dglGetProcAddress('glCompressedTexSubImage2D'); + glCompressedTexSubImage1D := dglGetProcAddress('glCompressedTexSubImage1D'); + glGetCompressedTexImage := dglGetProcAddress('glGetCompressedTexImage'); +{$ifdef DGL_DEPRECATED} + glClientActiveTexture := dglGetProcAddress('glClientActiveTexture'); + glMultiTexCoord1d := dglGetProcAddress('glMultiTexCoord1d'); + glMultiTexCoord1dv := dglGetProcAddress('glMultiTexCoord1dv'); + glMultiTexCoord1f := dglGetProcAddress('glMultiTexCoord1f'); + glMultiTexCoord1fv := dglGetProcAddress('glMultiTexCoord1fv'); + glMultiTexCoord1i := dglGetProcAddress('glMultiTexCoord1i'); + glMultiTexCoord1iv := dglGetProcAddress('glMultiTexCoord1iv'); + glMultiTexCoord1s := dglGetProcAddress('glMultiTexCoord1s'); + glMultiTexCoord1sv := dglGetProcAddress('glMultiTexCoord1sv'); + glMultiTexCoord2d := dglGetProcAddress('glMultiTexCoord2d'); + glMultiTexCoord2dv := dglGetProcAddress('glMultiTexCoord2dv'); + glMultiTexCoord2f := dglGetProcAddress('glMultiTexCoord2f'); + glMultiTexCoord2fv := dglGetProcAddress('glMultiTexCoord2fv'); + glMultiTexCoord2i := dglGetProcAddress('glMultiTexCoord2i'); + glMultiTexCoord2iv := dglGetProcAddress('glMultiTexCoord2iv'); + glMultiTexCoord2s := dglGetProcAddress('glMultiTexCoord2s'); + glMultiTexCoord2sv := dglGetProcAddress('glMultiTexCoord2sv'); + glMultiTexCoord3d := dglGetProcAddress('glMultiTexCoord3d'); + glMultiTexCoord3dv := dglGetProcAddress('glMultiTexCoord3dv'); + glMultiTexCoord3f := dglGetProcAddress('glMultiTexCoord3f'); + glMultiTexCoord3fv := dglGetProcAddress('glMultiTexCoord3fv'); + glMultiTexCoord3i := dglGetProcAddress('glMultiTexCoord3i'); + glMultiTexCoord3iv := dglGetProcAddress('glMultiTexCoord3iv'); + glMultiTexCoord3s := dglGetProcAddress('glMultiTexCoord3s'); + glMultiTexCoord3sv := dglGetProcAddress('glMultiTexCoord3sv'); + glMultiTexCoord4d := dglGetProcAddress('glMultiTexCoord4d'); + glMultiTexCoord4dv := dglGetProcAddress('glMultiTexCoord4dv'); + glMultiTexCoord4f := dglGetProcAddress('glMultiTexCoord4f'); + glMultiTexCoord4fv := dglGetProcAddress('glMultiTexCoord4fv'); + glMultiTexCoord4i := dglGetProcAddress('glMultiTexCoord4i'); + glMultiTexCoord4iv := dglGetProcAddress('glMultiTexCoord4iv'); + glMultiTexCoord4s := dglGetProcAddress('glMultiTexCoord4s'); + glMultiTexCoord4sv := dglGetProcAddress('glMultiTexCoord4sv'); + glLoadTransposeMatrixf := dglGetProcAddress('glLoadTransposeMatrixf'); + glLoadTransposeMatrixd := dglGetProcAddress('glLoadTransposeMatrixd'); + glMultTransposeMatrixf := dglGetProcAddress('glMultTransposeMatrixf'); + glMultTransposeMatrixd := dglGetProcAddress('glMultTransposeMatrixd'); +{$endif} + + // GL_VERSION_1_4 + glBlendFuncSeparate := dglGetProcAddress('glBlendFuncSeparate'); + glMultiDrawArrays := dglGetProcAddress('glMultiDrawArrays'); + glMultiDrawElements := dglGetProcAddress('glMultiDrawElements'); + glPointParameterf := dglGetProcAddress('glPointParameterf'); + glPointParameterfv := dglGetProcAddress('glPointParameterfv'); + glPointParameteri := dglGetProcAddress('glPointParameteri'); + glPointParameteriv := dglGetProcAddress('glPointParameteriv'); +{$ifdef DGL_DEPRECATED} + glFogCoordf := dglGetProcAddress('glFogCoordf'); + glFogCoordfv := dglGetProcAddress('glFogCoordfv'); + glFogCoordd := dglGetProcAddress('glFogCoordd'); + glFogCoorddv := dglGetProcAddress('glFogCoorddv'); + glFogCoordPointer := dglGetProcAddress('glFogCoordPointer'); + glSecondaryColor3b := dglGetProcAddress('glSecondaryColor3b'); + glSecondaryColor3bv := dglGetProcAddress('glSecondaryColor3bv'); + glSecondaryColor3d := dglGetProcAddress('glSecondaryColor3d'); + glSecondaryColor3dv := dglGetProcAddress('glSecondaryColor3dv'); + glSecondaryColor3f := dglGetProcAddress('glSecondaryColor3f'); + glSecondaryColor3fv := dglGetProcAddress('glSecondaryColor3fv'); + glSecondaryColor3i := dglGetProcAddress('glSecondaryColor3i'); + glSecondaryColor3iv := dglGetProcAddress('glSecondaryColor3iv'); + glSecondaryColor3s := dglGetProcAddress('glSecondaryColor3s'); + glSecondaryColor3sv := dglGetProcAddress('glSecondaryColor3sv'); + glSecondaryColor3ub := dglGetProcAddress('glSecondaryColor3ub'); + glSecondaryColor3ubv := dglGetProcAddress('glSecondaryColor3ubv'); + glSecondaryColor3ui := dglGetProcAddress('glSecondaryColor3ui'); + glSecondaryColor3uiv := dglGetProcAddress('glSecondaryColor3uiv'); + glSecondaryColor3us := dglGetProcAddress('glSecondaryColor3us'); + glSecondaryColor3usv := dglGetProcAddress('glSecondaryColor3usv'); + glSecondaryColorPointer := dglGetProcAddress('glSecondaryColorPointer'); + glWindowPos2d := dglGetProcAddress('glWindowPos2d'); + glWindowPos2dv := dglGetProcAddress('glWindowPos2dv'); + glWindowPos2f := dglGetProcAddress('glWindowPos2f'); + glWindowPos2fv := dglGetProcAddress('glWindowPos2fv'); + glWindowPos2i := dglGetProcAddress('glWindowPos2i'); + glWindowPos2iv := dglGetProcAddress('glWindowPos2iv'); + glWindowPos2s := dglGetProcAddress('glWindowPos2s'); + glWindowPos2sv := dglGetProcAddress('glWindowPos2sv'); + glWindowPos3d := dglGetProcAddress('glWindowPos3d'); + glWindowPos3dv := dglGetProcAddress('glWindowPos3dv'); + glWindowPos3f := dglGetProcAddress('glWindowPos3f'); + glWindowPos3fv := dglGetProcAddress('glWindowPos3fv'); + glWindowPos3i := dglGetProcAddress('glWindowPos3i'); + glWindowPos3iv := dglGetProcAddress('glWindowPos3iv'); + glWindowPos3s := dglGetProcAddress('glWindowPos3s'); + glWindowPos3sv := dglGetProcAddress('glWindowPos3sv'); +{$endif} + + // GL_VERSION_1_5 + glGenQueries := dglGetProcAddress('glGenQueries'); + glDeleteQueries := dglGetProcAddress('glDeleteQueries'); + glIsQuery := dglGetProcAddress('glIsQuery'); + glBeginQuery := dglGetProcAddress('glBeginQuery'); + glEndQuery := dglGetProcAddress('glEndQuery'); + glGetQueryiv := dglGetProcAddress('glGetQueryiv'); + glGetQueryObjectiv := dglGetProcAddress('glGetQueryObjectiv'); + glGetQueryObjectuiv := dglGetProcAddress('glGetQueryObjectuiv'); + glBindBuffer := dglGetProcAddress('glBindBuffer'); + glDeleteBuffers := dglGetProcAddress('glDeleteBuffers'); + glGenBuffers := dglGetProcAddress('glGenBuffers'); + glIsBuffer := dglGetProcAddress('glIsBuffer'); + glBufferData := dglGetProcAddress('glBufferData'); + glBufferSubData := dglGetProcAddress('glBufferSubData'); + glGetBufferSubData := dglGetProcAddress('glGetBufferSubData'); + glMapBuffer := dglGetProcAddress('glMapBuffer'); + glUnmapBuffer := dglGetProcAddress('glUnmapBuffer'); + glGetBufferParameteriv := dglGetProcAddress('glGetBufferParameteriv'); + glGetBufferPointerv := dglGetProcAddress('glGetBufferPointerv'); + + // GL_VERSION_2_0 + glBlendEquationSeparate := dglGetProcAddress('glBlendEquationSeparate'); + glDrawBuffers := dglGetProcAddress('glDrawBuffers'); + glStencilOpSeparate := dglGetProcAddress('glStencilOpSeparate'); + glStencilFuncSeparate := dglGetProcAddress('glStencilFuncSeparate'); + glStencilMaskSeparate := dglGetProcAddress('glStencilMaskSeparate'); + glAttachShader := dglGetProcAddress('glAttachShader'); + glBindAttribLocation := dglGetProcAddress('glBindAttribLocation'); + glCompileShader := dglGetProcAddress('glCompileShader'); + glCreateProgram := dglGetProcAddress('glCreateProgram'); + glCreateShader := dglGetProcAddress('glCreateShader'); + glDeleteProgram := dglGetProcAddress('glDeleteProgram'); + glDeleteShader := dglGetProcAddress('glDeleteShader'); + glDetachShader := dglGetProcAddress('glDetachShader'); + glDisableVertexAttribArray := dglGetProcAddress('glDisableVertexAttribArray'); + glEnableVertexAttribArray := dglGetProcAddress('glEnableVertexAttribArray'); + glGetActiveAttrib := dglGetProcAddress('glGetActiveAttrib'); + glGetActiveUniform := dglGetProcAddress('glGetActiveUniform'); + glGetAttachedShaders := dglGetProcAddress('glGetAttachedShaders'); + glGetAttribLocation := dglGetProcAddress('glGetAttribLocation'); + glGetProgramiv := dglGetProcAddress('glGetProgramiv'); + glGetProgramInfoLog := dglGetProcAddress('glGetProgramInfoLog'); + glGetShaderiv := dglGetProcAddress('glGetShaderiv'); + glGetShaderInfoLog := dglGetProcAddress('glGetShaderInfoLog'); + glGetShaderSource := dglGetProcAddress('glGetShaderSource'); + glGetUniformLocation := dglGetProcAddress('glGetUniformLocation'); + glGetUniformfv := dglGetProcAddress('glGetUniformfv'); + glGetUniformiv := dglGetProcAddress('glGetUniformiv'); + glGetVertexAttribfv := dglGetProcAddress('glGetVertexAttribfv'); + glGetVertexAttribiv := dglGetProcAddress('glGetVertexAttribiv'); + glGetVertexAttribPointerv := dglGetProcAddress('glGetVertexAttribPointerv'); + glIsProgram := dglGetProcAddress('glIsProgram'); + glIsShader := dglGetProcAddress('glIsShader'); + glLinkProgram := dglGetProcAddress('glLinkProgram'); + glShaderSource := dglGetProcAddress('glShaderSource'); + glUseProgram := dglGetProcAddress('glUseProgram'); + glUniform1f := dglGetProcAddress('glUniform1f'); + glUniform2f := dglGetProcAddress('glUniform2f'); + glUniform3f := dglGetProcAddress('glUniform3f'); + glUniform4f := dglGetProcAddress('glUniform4f'); + glUniform1i := dglGetProcAddress('glUniform1i'); + glUniform2i := dglGetProcAddress('glUniform2i'); + glUniform3i := dglGetProcAddress('glUniform3i'); + glUniform4i := dglGetProcAddress('glUniform4i'); + glUniform1fv := dglGetProcAddress('glUniform1fv'); + glUniform2fv := dglGetProcAddress('glUniform2fv'); + glUniform3fv := dglGetProcAddress('glUniform3fv'); + glUniform4fv := dglGetProcAddress('glUniform4fv'); + glUniform1iv := dglGetProcAddress('glUniform1iv'); + glUniform2iv := dglGetProcAddress('glUniform2iv'); + glUniform3iv := dglGetProcAddress('glUniform3iv'); + glUniform4iv := dglGetProcAddress('glUniform4iv'); + glUniformMatrix2fv := dglGetProcAddress('glUniformMatrix2fv'); + glUniformMatrix3fv := dglGetProcAddress('glUniformMatrix3fv'); + glUniformMatrix4fv := dglGetProcAddress('glUniformMatrix4fv'); + glValidateProgram := dglGetProcAddress('glValidateProgram'); + glVertexAttrib1d := dglGetProcAddress('glVertexAttrib1d'); + glVertexAttrib1dv := dglGetProcAddress('glVertexAttrib1dv'); + glVertexAttrib1f := dglGetProcAddress('glVertexAttrib1f'); + glVertexAttrib1fv := dglGetProcAddress('glVertexAttrib1fv'); + glVertexAttrib1s := dglGetProcAddress('glVertexAttrib1s'); + glVertexAttrib1sv := dglGetProcAddress('glVertexAttrib1sv'); + glVertexAttrib2d := dglGetProcAddress('glVertexAttrib2d'); + glVertexAttrib2dv := dglGetProcAddress('glVertexAttrib2dv'); + glVertexAttrib2f := dglGetProcAddress('glVertexAttrib2f'); + glVertexAttrib2fv := dglGetProcAddress('glVertexAttrib2fv'); + glVertexAttrib2s := dglGetProcAddress('glVertexAttrib2s'); + glVertexAttrib2sv := dglGetProcAddress('glVertexAttrib2sv'); + glVertexAttrib3d := dglGetProcAddress('glVertexAttrib3d'); + glVertexAttrib3dv := dglGetProcAddress('glVertexAttrib3dv'); + glVertexAttrib3f := dglGetProcAddress('glVertexAttrib3f'); + glVertexAttrib3fv := dglGetProcAddress('glVertexAttrib3fv'); + glVertexAttrib3s := dglGetProcAddress('glVertexAttrib3s'); + glVertexAttrib3sv := dglGetProcAddress('glVertexAttrib3sv'); + glVertexAttrib4Nbv := dglGetProcAddress('glVertexAttrib4Nbv'); + glVertexAttrib4Niv := dglGetProcAddress('glVertexAttrib4Niv'); + glVertexAttrib4Nsv := dglGetProcAddress('glVertexAttrib4Nsv'); + glVertexAttrib4Nub := dglGetProcAddress('glVertexAttrib4Nub'); + glVertexAttrib4Nubv := dglGetProcAddress('glVertexAttrib4Nubv'); + glVertexAttrib4Nuiv := dglGetProcAddress('glVertexAttrib4Nuiv'); + glVertexAttrib4Nusv := dglGetProcAddress('glVertexAttrib4Nusv'); + glVertexAttrib4bv := dglGetProcAddress('glVertexAttrib4bv'); + glVertexAttrib4d := dglGetProcAddress('glVertexAttrib4d'); + glVertexAttrib4dv := dglGetProcAddress('glVertexAttrib4dv'); + glVertexAttrib4f := dglGetProcAddress('glVertexAttrib4f'); + glVertexAttrib4fv := dglGetProcAddress('glVertexAttrib4fv'); + glVertexAttrib4iv := dglGetProcAddress('glVertexAttrib4iv'); + glVertexAttrib4s := dglGetProcAddress('glVertexAttrib4s'); + glVertexAttrib4sv := dglGetProcAddress('glVertexAttrib4sv'); + glVertexAttrib4ubv := dglGetProcAddress('glVertexAttrib4ubv'); + glVertexAttrib4uiv := dglGetProcAddress('glVertexAttrib4uiv'); + glVertexAttrib4usv := dglGetProcAddress('glVertexAttrib4usv'); + glVertexAttribPointer := dglGetProcAddress('glVertexAttribPointer'); + + // GL_VERSION_2_1 + glUniformMatrix2x3fv := dglGetProcAddress('glUniformMatrix2x3fv'); + glUniformMatrix3x2fv := dglGetProcAddress('glUniformMatrix3x2fv'); + glUniformMatrix2x4fv := dglGetProcAddress('glUniformMatrix2x4fv'); + glUniformMatrix4x2fv := dglGetProcAddress('glUniformMatrix4x2fv'); + glUniformMatrix3x4fv := dglGetProcAddress('glUniformMatrix3x4fv'); + glUniformMatrix4x3fv := dglGetProcAddress('glUniformMatrix4x3fv'); + + // GL_VERSION_3_0 + { OpenGL 3.0 also reuses entry points from these extensions: } + Read_GL_ARB_framebuffer_object; + Read_GL_ARB_map_buffer_range; + Read_GL_ARB_vertex_array_object; + + glColorMaski := dglGetProcAddress('glColorMaski'); + glGetBooleani_v := dglGetProcAddress('glGetBooleani_v'); + glGetIntegeri_v := dglGetProcAddress('glGetIntegeri_v'); + glEnablei := dglGetProcAddress('glEnablei'); + glDisablei := dglGetProcAddress('glDisablei'); + glIsEnabledi := dglGetProcAddress('glIsEnabledi'); + glBeginTransformFeedback := dglGetProcAddress('glBeginTransformFeedback'); + glEndTransformFeedback := dglGetProcAddress('glEndTransformFeedback'); + glBindBufferRange := dglGetProcAddress('glBindBufferRange'); + glBindBufferBase := dglGetProcAddress('glBindBufferBase'); + glTransformFeedbackVaryings := dglGetProcAddress('glTransformFeedbackVaryings'); + glGetTransformFeedbackVarying := dglGetProcAddress('glGetTransformFeedbackVarying'); + glClampColor := dglGetProcAddress('glClampColor'); + glBeginConditionalRender := dglGetProcAddress('glBeginConditionalRender'); + glEndConditionalRender := dglGetProcAddress('glEndConditionalRender'); + glVertexAttribI1i := dglGetProcAddress('glVertexAttribI1i'); + glVertexAttribI2i := dglGetProcAddress('glVertexAttribI2i'); + glVertexAttribI3i := dglGetProcAddress('glVertexAttribI3i'); + glVertexAttribI4i := dglGetProcAddress('glVertexAttribI4i'); + glVertexAttribI1ui := dglGetProcAddress('glVertexAttribI1ui'); + glVertexAttribI2ui := dglGetProcAddress('glVertexAttribI2ui'); + glVertexAttribI3ui := dglGetProcAddress('glVertexAttribI3ui'); + glVertexAttribI4ui := dglGetProcAddress('glVertexAttribI4ui'); + glVertexAttribI1iv := dglGetProcAddress('glVertexAttribI1iv'); + glVertexAttribI2iv := dglGetProcAddress('glVertexAttribI2iv'); + glVertexAttribI3iv := dglGetProcAddress('glVertexAttribI3iv'); + glVertexAttribI4iv := dglGetProcAddress('glVertexAttribI4iv'); + glVertexAttribI1uiv := dglGetProcAddress('glVertexAttribI1uiv'); + glVertexAttribI2uiv := dglGetProcAddress('glVertexAttribI2uiv'); + glVertexAttribI3uiv := dglGetProcAddress('glVertexAttribI3uiv'); + glVertexAttribI4uiv := dglGetProcAddress('glVertexAttribI4uiv'); + glVertexAttribI4bv := dglGetProcAddress('glVertexAttribI4bv'); + glVertexAttribI4sv := dglGetProcAddress('glVertexAttribI4sv'); + glVertexAttribI4ubv := dglGetProcAddress('glVertexAttribI4ubv'); + glVertexAttribI4usv := dglGetProcAddress('glVertexAttribI4usv'); + glVertexAttribIPointer := dglGetProcAddress('glVertexAttribIPointer'); + glGetVertexAttribIiv := dglGetProcAddress('glGetVertexAttribIiv'); + glGetVertexAttribIuiv := dglGetProcAddress('glGetVertexAttribIuiv'); + glGetUniformuiv := dglGetProcAddress('glGetUniformuiv'); + glBindFragDataLocation := dglGetProcAddress('glBindFragDataLocation'); + glGetFragDataLocation := dglGetProcAddress('glGetFragDataLocation'); + glUniform1ui := dglGetProcAddress('glUniform1ui'); + glUniform2ui := dglGetProcAddress('glUniform2ui'); + glUniform3ui := dglGetProcAddress('glUniform3ui'); + glUniform4ui := dglGetProcAddress('glUniform4ui'); + glUniform1uiv := dglGetProcAddress('glUniform1uiv'); + glUniform2uiv := dglGetProcAddress('glUniform2uiv'); + glUniform3uiv := dglGetProcAddress('glUniform3uiv'); + glUniform4uiv := dglGetProcAddress('glUniform4uiv'); + glTexParameterIiv := dglGetProcAddress('glTexParameterIiv'); + glTexParameterIuiv := dglGetProcAddress('glTexParameterIuiv'); + glGetTexParameterIiv := dglGetProcAddress('glGetTexParameterIiv'); + glGetTexParameterIuiv := dglGetProcAddress('glGetTexParameterIuiv'); + glClearBufferiv := dglGetProcAddress('glClearBufferiv'); + glClearBufferuiv := dglGetProcAddress('glClearBufferuiv'); + glClearBufferfv := dglGetProcAddress('glClearBufferfv'); + glClearBufferfi := dglGetProcAddress('glClearBufferfi'); + glGetStringi := dglGetProcAddress('glGetStringi'); + + // GL_VERSION_3_1 + { OpenGL 3.1 also reuses entry points from these extensions: } + Read_GL_ARB_copy_buffer; + Read_GL_ARB_uniform_buffer_object; + + glDrawArraysInstanced := dglGetProcAddress('glDrawArraysInstanced'); + glDrawElementsInstanced := dglGetProcAddress('glDrawElementsInstanced'); + glTexBuffer := dglGetProcAddress('glTexBuffer'); + glPrimitiveRestartIndex := dglGetProcAddress('glPrimitiveRestartIndex'); + + // GL_VERSION_3_2 + { OpenGL 3.2 also reuses entry points from these extensions: } + Read_GL_ARB_draw_elements_base_vertex; + Read_GL_ARB_provoking_vertex; + Read_GL_ARB_sync; + Read_GL_ARB_texture_multisample; + + glGetInteger64i_v := dglGetProcAddress('glGetInteger64i_v'); + glGetBufferParameteri64v := dglGetProcAddress('glGetBufferParameteri64v'); + glProgramParameteri := dglGetProcAddress('glProgramParameteri'); + glFramebufferTexture := dglGetProcAddress('glFramebufferTexture'); + glFramebufferTextureFace := dglGetProcAddress('glFramebufferTextureFace'); +end; + +procedure Read_GL_3DFX_tbuffer; +begin + glTbufferMask3DFX := dglGetProcAddress('glTbufferMask3DFX'); +end; + +procedure Read_GL_APPLE_element_array; +begin + glElementPointerAPPLE := dglGetProcAddress('glElementPointerAPPLE'); + glDrawElementArrayAPPLE := dglGetProcAddress('glDrawElementArrayAPPLE'); + glDrawRangeElementArrayAPPLE := dglGetProcAddress('glDrawRangeElementArrayAPPLE'); + glMultiDrawElementArrayAPPLE := dglGetProcAddress('glMultiDrawElementArrayAPPLE'); + glMultiDrawRangeElementArrayAPPLE := dglGetProcAddress('glMultiDrawRangeElementArrayAPPLE'); +end; + +procedure Read_GL_APPLE_fence; +begin + glGenFencesAPPLE := dglGetProcAddress('glGenFencesAPPLE'); + glDeleteFencesAPPLE := dglGetProcAddress('glDeleteFencesAPPLE'); + glSetFenceAPPLE := dglGetProcAddress('glSetFenceAPPLE'); + glIsFenceAPPLE := dglGetProcAddress('glIsFenceAPPLE'); + glTestFenceAPPLE := dglGetProcAddress('glTestFenceAPPLE'); + glFinishFenceAPPLE := dglGetProcAddress('glFinishFenceAPPLE'); + glTestObjectAPPLE := dglGetProcAddress('glTestObjectAPPLE'); + glFinishObjectAPPLE := dglGetProcAddress('glFinishObjectAPPLE'); +end; + +procedure Read_GL_APPLE_vertex_array_object; +begin + glBindVertexArrayAPPLE := dglGetProcAddress('glBindVertexArrayAPPLE'); + glDeleteVertexArraysAPPLE := dglGetProcAddress('glDeleteVertexArraysAPPLE'); + glGenVertexArraysAPPLE := dglGetProcAddress('glGenVertexArraysAPPLE'); + glIsVertexArrayAPPLE := dglGetProcAddress('glIsVertexArrayAPPLE'); +end; + +procedure Read_GL_APPLE_vertex_array_range; +begin + glVertexArrayRangeAPPLE := dglGetProcAddress('glVertexArrayRangeAPPLE'); + glFlushVertexArrayRangeAPPLE := dglGetProcAddress('glFlushVertexArrayRangeAPPLE'); + glVertexArrayParameteriAPPLE := dglGetProcAddress('glVertexArrayParameteriAPPLE'); +end; + +procedure Read_GL_APPLE_texture_range; +begin + glTextureRangeAPPLE := dglGetProcAddress('glTextureRangeAPPLE'); + glGetTexParameterPointervAPPLE := dglGetProcAddress('glGetTexParameterPointervAPPLE'); +end; + +procedure Read_GL_APPLE_vertex_program_evaluators; +begin + glEnableVertexAttribAPPLE := dglGetProcAddress('glEnableVertexAttribAPPLE'); + glDisableVertexAttribAPPLE := dglGetProcAddress('glDisableVertexAttribAPPLE'); + glIsVertexAttribEnabledAPPLE := dglGetProcAddress('glIsVertexAttribEnabledAPPLE'); + glMapVertexAttrib1dAPPLE := dglGetProcAddress('glMapVertexAttrib1dAPPLE'); + glMapVertexAttrib1fAPPLE := dglGetProcAddress('glMapVertexAttrib1fAPPLE'); + glMapVertexAttrib2dAPPLE := dglGetProcAddress('glMapVertexAttrib2dAPPLE'); + glMapVertexAttrib2fAPPLE := dglGetProcAddress('glMapVertexAttrib2fAPPLE'); +end; + +procedure Read_GL_APPLE_object_purgeable; +begin + glObjectPurgeableAPPLE := dglGetProcAddress('glObjectPurgeableAPPLE'); + glObjectUnpurgeableAPPLE := dglGetProcAddress('glObjectUnpurgeableAPPLE'); + glGetObjectParameterivAPPLE := dglGetProcAddress('glGetObjectParameterivAPPLE'); +end; + +procedure Read_GL_ARB_matrix_palette; +begin + glCurrentPaletteMatrixARB := dglGetProcAddress('glCurrentPaletteMatrixARB'); + glMatrixIndexubvARB := dglGetProcAddress('glMatrixIndexubvARB'); + glMatrixIndexusvARB := dglGetProcAddress('glMatrixIndexusvARB'); + glMatrixIndexuivARB := dglGetProcAddress('glMatrixIndexuivARB'); + glMatrixIndexPointerARB := dglGetProcAddress('glMatrixIndexPointerARB'); +end; + +procedure Read_GL_ARB_multisample; +begin + glSampleCoverageARB := dglGetProcAddress('glSampleCoverageARB'); +end; + +procedure Read_GL_ARB_multitexture; +begin + glActiveTextureARB := dglGetProcAddress('glActiveTextureARB'); + glClientActiveTextureARB := dglGetProcAddress('glClientActiveTextureARB'); + glMultiTexCoord1dARB := dglGetProcAddress('glMultiTexCoord1dARB'); + glMultiTexCoord1dvARB := dglGetProcAddress('glMultiTexCoord1dvARB'); + glMultiTexCoord1fARB := dglGetProcAddress('glMultiTexCoord1fARB'); + glMultiTexCoord1fvARB := dglGetProcAddress('glMultiTexCoord1fvARB'); + glMultiTexCoord1iARB := dglGetProcAddress('glMultiTexCoord1iARB'); + glMultiTexCoord1ivARB := dglGetProcAddress('glMultiTexCoord1ivARB'); + glMultiTexCoord1sARB := dglGetProcAddress('glMultiTexCoord1sARB'); + glMultiTexCoord1svARB := dglGetProcAddress('glMultiTexCoord1svARB'); + glMultiTexCoord2dARB := dglGetProcAddress('glMultiTexCoord2dARB'); + glMultiTexCoord2dvARB := dglGetProcAddress('glMultiTexCoord2dvARB'); + glMultiTexCoord2fARB := dglGetProcAddress('glMultiTexCoord2fARB'); + glMultiTexCoord2fvARB := dglGetProcAddress('glMultiTexCoord2fvARB'); + glMultiTexCoord2iARB := dglGetProcAddress('glMultiTexCoord2iARB'); + glMultiTexCoord2ivARB := dglGetProcAddress('glMultiTexCoord2ivARB'); + glMultiTexCoord2sARB := dglGetProcAddress('glMultiTexCoord2sARB'); + glMultiTexCoord2svARB := dglGetProcAddress('glMultiTexCoord2svARB'); + glMultiTexCoord3dARB := dglGetProcAddress('glMultiTexCoord3dARB'); + glMultiTexCoord3dvARB := dglGetProcAddress('glMultiTexCoord3dvARB'); + glMultiTexCoord3fARB := dglGetProcAddress('glMultiTexCoord3fARB'); + glMultiTexCoord3fvARB := dglGetProcAddress('glMultiTexCoord3fvARB'); + glMultiTexCoord3iARB := dglGetProcAddress('glMultiTexCoord3iARB'); + glMultiTexCoord3ivARB := dglGetProcAddress('glMultiTexCoord3ivARB'); + glMultiTexCoord3sARB := dglGetProcAddress('glMultiTexCoord3sARB'); + glMultiTexCoord3svARB := dglGetProcAddress('glMultiTexCoord3svARB'); + glMultiTexCoord4dARB := dglGetProcAddress('glMultiTexCoord4dARB'); + glMultiTexCoord4dvARB := dglGetProcAddress('glMultiTexCoord4dvARB'); + glMultiTexCoord4fARB := dglGetProcAddress('glMultiTexCoord4fARB'); + glMultiTexCoord4fvARB := dglGetProcAddress('glMultiTexCoord4fvARB'); + glMultiTexCoord4iARB := dglGetProcAddress('glMultiTexCoord4iARB'); + glMultiTexCoord4ivARB := dglGetProcAddress('glMultiTexCoord4ivARB'); + glMultiTexCoord4sARB := dglGetProcAddress('glMultiTexCoord4sARB'); + glMultiTexCoord4svARB := dglGetProcAddress('glMultiTexCoord4svARB'); +end; + +procedure Read_GL_ARB_point_parameters; +begin + glPointParameterfARB := dglGetProcAddress('glPointParameterfARB'); + glPointParameterfvARB := dglGetProcAddress('glPointParameterfvARB'); +end; + +procedure Read_GL_ARB_texture_compression; +begin + glCompressedTexImage3DARB := dglGetProcAddress('glCompressedTexImage3DARB'); + glCompressedTexImage2DARB := dglGetProcAddress('glCompressedTexImage2DARB'); + glCompressedTexImage1DARB := dglGetProcAddress('glCompressedTexImage1DARB'); + glCompressedTexSubImage3DARB := dglGetProcAddress('glCompressedTexSubImage3DARB'); + glCompressedTexSubImage2DARB := dglGetProcAddress('glCompressedTexSubImage2DARB'); + glCompressedTexSubImage1DARB := dglGetProcAddress('glCompressedTexSubImage1DARB'); + glGetCompressedTexImageARB := dglGetProcAddress('glGetCompressedTexImageARB'); +end; + +procedure Read_GL_ARB_transpose_matrix; +begin + glLoadTransposeMatrixfARB := dglGetProcAddress('glLoadTransposeMatrixfARB'); + glLoadTransposeMatrixdARB := dglGetProcAddress('glLoadTransposeMatrixdARB'); + glMultTransposeMatrixfARB := dglGetProcAddress('glMultTransposeMatrixfARB'); + glMultTransposeMatrixdARB := dglGetProcAddress('glMultTransposeMatrixdARB'); +end; + +procedure Read_GL_ARB_vertex_blend; +begin + glWeightbvARB := dglGetProcAddress('glWeightbvARB'); + glWeightsvARB := dglGetProcAddress('glWeightsvARB'); + glWeightivARB := dglGetProcAddress('glWeightivARB'); + glWeightfvARB := dglGetProcAddress('glWeightfvARB'); + glWeightdvARB := dglGetProcAddress('glWeightdvARB'); + glWeightubvARB := dglGetProcAddress('glWeightubvARB'); + glWeightusvARB := dglGetProcAddress('glWeightusvARB'); + glWeightuivARB := dglGetProcAddress('glWeightuivARB'); + glWeightPointerARB := dglGetProcAddress('glWeightPointerARB'); + glVertexBlendARB := dglGetProcAddress('glVertexBlendARB'); +end; + +procedure Read_GL_ARB_vertex_buffer_object; +begin + glBindBufferARB := dglGetProcAddress('glBindBufferARB'); + glDeleteBuffersARB := dglGetProcAddress('glDeleteBuffersARB'); + glGenBuffersARB := dglGetProcAddress('glGenBuffersARB'); + glIsBufferARB := dglGetProcAddress('glIsBufferARB'); + glBufferDataARB := dglGetProcAddress('glBufferDataARB'); + glBufferSubDataARB := dglGetProcAddress('glBufferSubDataARB'); + glGetBufferSubDataARB := dglGetProcAddress('glGetBufferSubDataARB'); + glMapBufferARB := dglGetProcAddress('glMapBufferARB'); + glUnmapBufferARB := dglGetProcAddress('glUnmapBufferARB'); + glGetBufferParameterivARB := dglGetProcAddress('glGetBufferParameterivARB'); + glGetBufferPointervARB := dglGetProcAddress('glGetBufferPointervARB'); +end; + +procedure Read_GL_ARB_vertex_program; +begin + glVertexAttrib1dARB := dglGetProcAddress('glVertexAttrib1dARB'); + glVertexAttrib1dvARB := dglGetProcAddress('glVertexAttrib1dvARB'); + glVertexAttrib1fARB := dglGetProcAddress('glVertexAttrib1fARB'); + glVertexAttrib1fvARB := dglGetProcAddress('glVertexAttrib1fvARB'); + glVertexAttrib1sARB := dglGetProcAddress('glVertexAttrib1sARB'); + glVertexAttrib1svARB := dglGetProcAddress('glVertexAttrib1svARB'); + glVertexAttrib2dARB := dglGetProcAddress('glVertexAttrib2dARB'); + glVertexAttrib2dvARB := dglGetProcAddress('glVertexAttrib2dvARB'); + glVertexAttrib2fARB := dglGetProcAddress('glVertexAttrib2fARB'); + glVertexAttrib2fvARB := dglGetProcAddress('glVertexAttrib2fvARB'); + glVertexAttrib2sARB := dglGetProcAddress('glVertexAttrib2sARB'); + glVertexAttrib2svARB := dglGetProcAddress('glVertexAttrib2svARB'); + glVertexAttrib3dARB := dglGetProcAddress('glVertexAttrib3dARB'); + glVertexAttrib3dvARB := dglGetProcAddress('glVertexAttrib3dvARB'); + glVertexAttrib3fARB := dglGetProcAddress('glVertexAttrib3fARB'); + glVertexAttrib3fvARB := dglGetProcAddress('glVertexAttrib3fvARB'); + glVertexAttrib3sARB := dglGetProcAddress('glVertexAttrib3sARB'); + glVertexAttrib3svARB := dglGetProcAddress('glVertexAttrib3svARB'); + glVertexAttrib4NbvARB := dglGetProcAddress('glVertexAttrib4NbvARB'); + glVertexAttrib4NivARB := dglGetProcAddress('glVertexAttrib4NivARB'); + glVertexAttrib4NsvARB := dglGetProcAddress('glVertexAttrib4NsvARB'); + glVertexAttrib4NubARB := dglGetProcAddress('glVertexAttrib4NubARB'); + glVertexAttrib4NubvARB := dglGetProcAddress('glVertexAttrib4NubvARB'); + glVertexAttrib4NuivARB := dglGetProcAddress('glVertexAttrib4NuivARB'); + glVertexAttrib4NusvARB := dglGetProcAddress('glVertexAttrib4NusvARB'); + glVertexAttrib4bvARB := dglGetProcAddress('glVertexAttrib4bvARB'); + glVertexAttrib4dARB := dglGetProcAddress('glVertexAttrib4dARB'); + glVertexAttrib4dvARB := dglGetProcAddress('glVertexAttrib4dvARB'); + glVertexAttrib4fARB := dglGetProcAddress('glVertexAttrib4fARB'); + glVertexAttrib4fvARB := dglGetProcAddress('glVertexAttrib4fvARB'); + glVertexAttrib4ivARB := dglGetProcAddress('glVertexAttrib4ivARB'); + glVertexAttrib4sARB := dglGetProcAddress('glVertexAttrib4sARB'); + glVertexAttrib4svARB := dglGetProcAddress('glVertexAttrib4svARB'); + glVertexAttrib4ubvARB := dglGetProcAddress('glVertexAttrib4ubvARB'); + glVertexAttrib4uivARB := dglGetProcAddress('glVertexAttrib4uivARB'); + glVertexAttrib4usvARB := dglGetProcAddress('glVertexAttrib4usvARB'); + glVertexAttribPointerARB := dglGetProcAddress('glVertexAttribPointerARB'); + glEnableVertexAttribArrayARB := dglGetProcAddress('glEnableVertexAttribArrayARB'); + glDisableVertexAttribArrayARB := dglGetProcAddress('glDisableVertexAttribArrayARB'); + glProgramStringARB := dglGetProcAddress('glProgramStringARB'); + glBindProgramARB := dglGetProcAddress('glBindProgramARB'); + glDeleteProgramsARB := dglGetProcAddress('glDeleteProgramsARB'); + glGenProgramsARB := dglGetProcAddress('glGenProgramsARB'); + glProgramEnvParameter4dARB := dglGetProcAddress('glProgramEnvParameter4dARB'); + glProgramEnvParameter4dvARB := dglGetProcAddress('glProgramEnvParameter4dvARB'); + glProgramEnvParameter4fARB := dglGetProcAddress('glProgramEnvParameter4fARB'); + glProgramEnvParameter4fvARB := dglGetProcAddress('glProgramEnvParameter4fvARB'); + glProgramLocalParameter4dARB := dglGetProcAddress('glProgramLocalParameter4dARB'); + glProgramLocalParameter4dvARB := dglGetProcAddress('glProgramLocalParameter4dvARB'); + glProgramLocalParameter4fARB := dglGetProcAddress('glProgramLocalParameter4fARB'); + glProgramLocalParameter4fvARB := dglGetProcAddress('glProgramLocalParameter4fvARB'); + glGetProgramEnvParameterdvARB := dglGetProcAddress('glGetProgramEnvParameterdvARB'); + glGetProgramEnvParameterfvARB := dglGetProcAddress('glGetProgramEnvParameterfvARB'); + glGetProgramLocalParameterdvARB := dglGetProcAddress('glGetProgramLocalParameterdvARB'); + glGetProgramLocalParameterfvARB := dglGetProcAddress('glGetProgramLocalParameterfvARB'); + glGetProgramivARB := dglGetProcAddress('glGetProgramivARB'); + glGetProgramStringARB := dglGetProcAddress('glGetProgramStringARB'); + glGetVertexAttribdvARB := dglGetProcAddress('glGetVertexAttribdvARB'); + glGetVertexAttribfvARB := dglGetProcAddress('glGetVertexAttribfvARB'); + glGetVertexAttribivARB := dglGetProcAddress('glGetVertexAttribivARB'); + glGetVertexAttribPointervARB := dglGetProcAddress('glGetVertexAttribPointervARB'); + glIsProgramARB := dglGetProcAddress('glIsProgramARB'); +end; + +procedure Read_GL_ARB_window_pos; +begin + glWindowPos2dARB := dglGetProcAddress('glWindowPos2dARB'); + glWindowPos2dvARB := dglGetProcAddress('glWindowPos2dvARB'); + glWindowPos2fARB := dglGetProcAddress('glWindowPos2fARB'); + glWindowPos2fvARB := dglGetProcAddress('glWindowPos2fvARB'); + glWindowPos2iARB := dglGetProcAddress('glWindowPos2iARB'); + glWindowPos2ivARB := dglGetProcAddress('glWindowPos2ivARB'); + glWindowPos2sARB := dglGetProcAddress('glWindowPos2sARB'); + glWindowPos2svARB := dglGetProcAddress('glWindowPos2svARB'); + glWindowPos3dARB := dglGetProcAddress('glWindowPos3dARB'); + glWindowPos3dvARB := dglGetProcAddress('glWindowPos3dvARB'); + glWindowPos3fARB := dglGetProcAddress('glWindowPos3fARB'); + glWindowPos3fvARB := dglGetProcAddress('glWindowPos3fvARB'); + glWindowPos3iARB := dglGetProcAddress('glWindowPos3iARB'); + glWindowPos3ivARB := dglGetProcAddress('glWindowPos3ivARB'); + glWindowPos3sARB := dglGetProcAddress('glWindowPos3sARB'); + glWindowPos3svARB := dglGetProcAddress('glWindowPos3svARB'); +end; + +procedure Read_GL_ARB_draw_buffers; +begin + glDrawBuffersARB := dglGetProcAddress('glDrawBuffersARB'); +end; + +procedure Read_GL_ARB_color_buffer_float; +begin + glClampColorARB := dglGetProcAddress('glClampColorARB'); +end; + +procedure Read_GL_ARB_Shader_Objects; +begin + // GL_ARB_Shader_Objects + glCreateShaderObjectARB := dglGetProcAddress('glCreateShaderObjectARB'); + glShaderSourceARB := dglGetProcAddress('glShaderSourceARB'); + glCompileShaderARB := dglGetProcAddress('glCompileShaderARB'); + glDeleteObjectARB := dglGetProcAddress('glDeleteObjectARB'); + glGetHandleARB := dglGetProcAddress('glGetHandleARB'); + glDetachObjectARB := dglGetProcAddress('glDetachObjectARB'); + glCreateProgramObjectARB := dglGetProcAddress('glCreateProgramObjectARB'); + glAttachObjectARB := dglGetProcAddress('glAttachObjectARB'); + glLinkProgramARB := dglGetProcAddress('glLinkProgramARB'); + glUseProgramObjectARB := dglGetProcAddress('glUseProgramObjectARB'); + glValidateProgramARB := dglGetProcAddress('glValidateProgramARB'); + glGetObjectParameterfvARB := dglGetProcAddress('glGetObjectParameterfvARB'); + glGetObjectParameterivARB := dglGetProcAddress('glGetObjectParameterivARB'); + glGetActiveUniformARB := dglGetProcAddress('glGetActiveUniformARB'); + glGetAttachedObjectsARB := dglGetProcAddress('glGetAttachedObjectsARB'); + glGetShaderSourceARB := dglGetProcAddress('glGetShaderSourceARB'); + glGetUniformfvARB := dglGetProcAddress('glGetUniformfvARB'); + glGetUniformivARB := dglGetProcAddress('glGetUniformivARB'); + glGetUniformLocationARB := dglGetProcAddress('glGetUniformLocationARB'); + glGetInfoLogARB := dglGetProcAddress('glGetInfoLogARB'); + glUniform1fARB := dglGetProcAddress('glUniform1fARB'); + glUniform2fARB := dglGetProcAddress('glUniform2fARB'); + glUniform3fARB := dglGetProcAddress('glUniform3fARB'); + glUniform4fARB := dglGetProcAddress('glUniform4fARB'); + glUniform1iARB := dglGetProcAddress('glUniform1iARB'); + glUniform2iARB := dglGetProcAddress('glUniform2iARB'); + glUniform3iARB := dglGetProcAddress('glUniform3iARB'); + glUniform4iARB := dglGetProcAddress('glUniform4iARB'); + glUniform1fvARB := dglGetProcAddress('glUniform1fvARB'); + glUniform2fvARB := dglGetProcAddress('glUniform2fvARB'); + glUniform3fvARB := dglGetProcAddress('glUniform3fvARB'); + glUniform4fvARB := dglGetProcAddress('glUniform4fvARB'); + glUniform1ivARB := dglGetProcAddress('glUniform1ivARB'); + glUniform2ivARB := dglGetProcAddress('glUniform2ivARB'); + glUniform3ivARB := dglGetProcAddress('glUniform3ivARB'); + glUniform4ivARB := dglGetProcAddress('glUniform4ivARB'); + glUniformMatrix2fvARB := dglGetProcAddress('glUniformMatrix2fvARB'); + glUniformMatrix3fvARB := dglGetProcAddress('glUniformMatrix3fvARB'); + glUniformMatrix4fvARB := dglGetProcAddress('glUniformMatrix4fvARB'); + + // GL_ARB_vertex_shader + glGetActiveAttribARB := dglGetProcAddress('glGetActiveAttribARB'); + glGetAttribLocationARB := dglGetProcAddress('glGetAttribLocationARB'); + glBindAttribLocationARB := dglGetProcAddress('glBindAttribLocationARB'); + glGetVertexAttribPointervARB := dglGetProcAddress('glGetVertexAttribPointervARB'); +end; + +procedure Read_GL_ARB_occlusion_query; +begin + glGenQueriesARB := dglGetProcAddress('glGenQueriesARB'); + glDeleteQueriesARB := dglGetProcAddress('glDeleteQueriesARB'); + glIsQueryARB := dglGetProcAddress('glIsQueryARB'); + glBeginQueryARB := dglGetProcAddress('glBeginQueryARB'); + glEndQueryARB := dglGetProcAddress('glEndQueryARB'); + glGetQueryivARB := dglGetProcAddress('glGetQueryivARB'); + glGetQueryObjectivARB := dglGetProcAddress('glGetQueryObjectivARB'); + glGetQueryObjectuivARB := dglGetProcAddress('glGetQueryObjectuivARB'); +end; + +procedure Read_GL_ARB_draw_instanced; +begin + glDrawArraysInstancedARB := dglGetProcAddress('glDrawArraysInstancedARB'); + glDrawElementsInstancedARB := dglGetProcAddress('glDrawElementsInstancedARB'); +end; + +procedure Read_GL_ARB_framebuffer_object; +begin + glIsRenderbuffer := dglGetProcAddress('glIsRenderbuffer'); + glBindRenderbuffer := dglGetProcAddress('glBindRenderbuffer'); + glDeleteRenderbuffers := dglGetProcAddress('glDeleteRenderbuffers'); + glGenRenderbuffers := dglGetProcAddress('glGenRenderbuffers'); + glRenderbufferStorage := dglGetProcAddress('glRenderbufferStorage'); + glGetRenderbufferParameteriv := dglGetProcAddress('glGetRenderbufferParameteriv'); + glIsFramebuffer := dglGetProcAddress('glIsFramebuffer'); + glBindFramebuffer := dglGetProcAddress('glBindFramebuffer'); + glDeleteFramebuffers := dglGetProcAddress('glDeleteFramebuffers'); + glGenFramebuffers := dglGetProcAddress('glGenFramebuffers'); + glCheckFramebufferStatus := dglGetProcAddress('glCheckFramebufferStatus'); + glFramebufferTexture1D := dglGetProcAddress('glFramebufferTexture1D'); + glFramebufferTexture2D := dglGetProcAddress('glFramebufferTexture2D'); + glFramebufferTexture3D := dglGetProcAddress('glFramebufferTexture3D'); + glFramebufferRenderbuffer := dglGetProcAddress('glFramebufferRenderbuffer'); + glGetFramebufferAttachmentParameteriv := dglGetProcAddress('glGetFramebufferAttachmentParameteriv'); + glGenerateMipmap := dglGetProcAddress('glGenerateMipmap'); + glBlitFramebuffer := dglGetProcAddress('glBlitFramebuffer'); + glRenderbufferStorageMultisample := dglGetProcAddress('glRenderbufferStorageMultisample'); + glFramebufferTextureLayer := dglGetProcAddress('glFramebufferTextureLayer'); +end; + +procedure Read_GL_ARB_geometry_shader4; +begin + glProgramParameteriARB := dglGetProcAddress('glProgramParameteriARB'); + glFramebufferTextureARB := dglGetProcAddress('glFramebufferTextureARB'); + glFramebufferTextureLayerARB := dglGetProcAddress('glFramebufferTextureLayerARB'); + glFramebufferTextureFaceARB := dglGetProcAddress('glFramebufferTextureFaceARB'); +end; + +procedure Read_GL_ARB_instanced_arrays; +begin + glVertexAttribDivisorARB := dglGetProcAddress('glVertexAttribDivisorARB'); +end; + +procedure Read_GL_ARB_map_buffer_range; +begin + glMapBufferRange := dglGetProcAddress('glMapBufferRange'); + glFlushMappedBufferRange := dglGetProcAddress('glFlushMappedBufferRange'); +end; + +procedure Read_GL_ARB_texture_buffer_object; +begin + glTexBufferARB := dglGetProcAddress('glTexBufferARB'); +end; + +procedure Read_GL_ARB_vertex_array_object; +begin + glBindVertexArray := dglGetProcAddress('glBindVertexArray'); + glDeleteVertexArrays := dglGetProcAddress('glDeleteVertexArrays'); + glGenVertexArrays := dglGetProcAddress('glGenVertexArrays'); + glIsVertexArray := dglGetProcAddress('glIsVertexArray'); +end; + +procedure Read_GL_ARB_uniform_buffer_object; +begin + glGetUniformIndices := dglGetProcAddress('glGetUniformIndices'); + glGetActiveUniformsiv := dglGetProcAddress('glGetActiveUniformsiv'); + glGetActiveUniformName := dglGetProcAddress('glGetActiveUniformName'); + glGetUniformBlockIndex := dglGetProcAddress('glGetUniformBlockIndex'); + glGetActiveUniformBlockiv := dglGetProcAddress('glGetActiveUniformBlockiv'); + glGetActiveUniformBlockName := dglGetProcAddress('glGetActiveUniformBlockName'); + glUniformBlockBinding := dglGetProcAddress('glUniformBlockBinding'); +end; + +procedure Read_GL_ARB_copy_buffer; +begin + glCopyBufferSubData := dglGetProcAddress('glCopyBufferSubData'); +end; + +procedure Read_GL_ARB_draw_elements_base_vertex; +begin + glDrawElementsBaseVertex := dglGetProcAddress('glDrawElementsBaseVertex'); + glDrawRangeElementsBaseVertex := dglGetProcAddress('glDrawRangeElementsBaseVertex'); + glDrawElementsInstancedBaseVertex := dglGetProcAddress('glDrawElementsInstancedBaseVertex'); + glMultiDrawElementsBaseVertex := dglGetProcAddress('glMultiDrawElementsBaseVertex'); +end; + +procedure Read_GL_ARB_provoking_vertex; +begin + glProvokingVertex := dglGetProcAddress('glProvokingVertex'); +end; + +procedure Read_GL_ARB_sync; +begin + glFenceSync := dglGetProcAddress('glFenceSync'); + glIsSync := dglGetProcAddress('glIsSync'); + glDeleteSync := dglGetProcAddress('glDeleteSync'); + glClientWaitSync := dglGetProcAddress('glClientWaitSync'); + glWaitSync := dglGetProcAddress('glWaitSync'); + glGetInteger64v := dglGetProcAddress('glGetInteger64v'); + glGetSynciv := dglGetProcAddress('glGetSynciv'); +end; + +procedure Read_GL_ARB_texture_multisample; +begin + glTexImage2DMultisample := dglGetProcAddress('glTexImage2DMultisample'); + glTexImage3DMultisample := dglGetProcAddress('glTexImage3DMultisample'); + glGetMultisamplefv := dglGetProcAddress('glGetMultisamplefv'); + glSampleMaski := dglGetProcAddress('glSampleMaski'); +end; + +procedure Read_GL_ARB_draw_buffers_blend; +begin + glBlendEquationi := dglGetProcAddress('glBlendEquationi'); + glBlendEquationSeparatei := dglGetProcAddress('glBlendEquationSeparatei'); + glBlendFunci := dglGetProcAddress('glBlendFunci'); + glBlendFuncSeparatei := dglGetProcAddress('glBlendFuncSeparatei'); +end; + +procedure Read_GL_ARB_sample_shading; +begin + glMinSampleShading := dglGetProcAddress('glMinSampleShading');; +end; + +procedure Read_GL_ATI_draw_buffers; +begin + glDrawBuffersATI := dglGetProcAddress('glDrawBuffersATI'); +end; + +procedure Read_GL_ATI_element_array; +begin + glElementPointerATI := dglGetProcAddress('glElementPointerATI'); + glDrawElementArrayATI := dglGetProcAddress('glDrawElementArrayATI'); + glDrawRangeElementArrayATI := dglGetProcAddress('glDrawRangeElementArrayATI'); +end; + +procedure Read_GL_ATI_envmap_bumpmap; +begin + glTexBumpParameterivATI := dglGetProcAddress('glTexBumpParameterivATI'); + glTexBumpParameterfvATI := dglGetProcAddress('glTexBumpParameterfvATI'); + glGetTexBumpParameterivATI := dglGetProcAddress('glGetTexBumpParameterivATI'); + glGetTexBumpParameterfvATI := dglGetProcAddress('glGetTexBumpParameterfvATI'); +end; + +procedure Read_GL_ATI_fragment_shader; +begin + glGenFragmentShadersATI := dglGetProcAddress('glGenFragmentShadersATI'); + glBindFragmentShaderATI := dglGetProcAddress('glBindFragmentShaderATI'); + glDeleteFragmentShaderATI := dglGetProcAddress('glDeleteFragmentShaderATI'); + glBeginFragmentShaderATI := dglGetProcAddress('glBeginFragmentShaderATI'); + glEndFragmentShaderATI := dglGetProcAddress('glEndFragmentShaderATI'); + glPassTexCoordATI := dglGetProcAddress('glPassTexCoordATI'); + glSampleMapATI := dglGetProcAddress('glSampleMapATI'); + glColorFragmentOp1ATI := dglGetProcAddress('glColorFragmentOp1ATI'); + glColorFragmentOp2ATI := dglGetProcAddress('glColorFragmentOp2ATI'); + glColorFragmentOp3ATI := dglGetProcAddress('glColorFragmentOp3ATI'); + glAlphaFragmentOp1ATI := dglGetProcAddress('glAlphaFragmentOp1ATI'); + glAlphaFragmentOp2ATI := dglGetProcAddress('glAlphaFragmentOp2ATI'); + glAlphaFragmentOp3ATI := dglGetProcAddress('glAlphaFragmentOp3ATI'); + glSetFragmentShaderConstantATI := dglGetProcAddress('glSetFragmentShaderConstantATI'); +end; + +procedure Read_GL_ATI_map_object_buffer; +begin + glMapObjectBufferATI := dglGetProcAddress('glMapObjectBufferATI'); + glUnmapObjectBufferATI := dglGetProcAddress('glUnmapObjectBufferATI'); +end; + +procedure Read_GL_ATI_pn_triangles; +begin + glPNTrianglesiATI := dglGetProcAddress('glPNTrianglesiATI'); + glPNTrianglesfATI := dglGetProcAddress('glPNTrianglesfATI'); +end; + +procedure Read_GL_ATI_separate_stencil; +begin + glStencilOpSeparateATI := dglGetProcAddress('glStencilOpSeparateATI'); + glStencilFuncSeparateATI := dglGetProcAddress('glStencilFuncSeparateATI'); +end; + +procedure Read_GL_ATI_vertex_array_object; +begin + glNewObjectBufferATI := dglGetProcAddress('glNewObjectBufferATI'); + glIsObjectBufferATI := dglGetProcAddress('glIsObjectBufferATI'); + glUpdateObjectBufferATI := dglGetProcAddress('glUpdateObjectBufferATI'); + glGetObjectBufferfvATI := dglGetProcAddress('glGetObjectBufferfvATI'); + glGetObjectBufferivATI := dglGetProcAddress('glGetObjectBufferivATI'); + glFreeObjectBufferATI := dglGetProcAddress('glFreeObjectBufferATI'); + glArrayObjectATI := dglGetProcAddress('glArrayObjectATI'); + glGetArrayObjectfvATI := dglGetProcAddress('glGetArrayObjectfvATI'); + glGetArrayObjectivATI := dglGetProcAddress('glGetArrayObjectivATI'); + glVariantArrayObjectATI := dglGetProcAddress('glVariantArrayObjectATI'); + glGetVariantArrayObjectfvATI := dglGetProcAddress('glGetVariantArrayObjectfvATI'); + glGetVariantArrayObjectivATI := dglGetProcAddress('glGetVariantArrayObjectivATI'); + +end; + +procedure Read_GL_ATI_vertex_attrib_array_object; +begin + glVertexAttribArrayObjectATI := dglGetProcAddress('glVertexAttribArrayObjectATI'); + glGetVertexAttribArrayObjectfvATI := dglGetProcAddress('glGetVertexAttribArrayObjectfvATI'); + glGetVertexAttribArrayObjectivATI := dglGetProcAddress('glGetVertexAttribArrayObjectivATI'); +end; + +procedure Read_GL_ATI_vertex_streams; +begin + glVertexStream1sATI := dglGetProcAddress('glVertexStream1sATI'); + glVertexStream1svATI := dglGetProcAddress('glVertexStream1svATI'); + glVertexStream1iATI := dglGetProcAddress('glVertexStream1iATI'); + glVertexStream1ivATI := dglGetProcAddress('glVertexStream1ivATI'); + glVertexStream1fATI := dglGetProcAddress('glVertexStream1fATI'); + glVertexStream1fvATI := dglGetProcAddress('glVertexStream1fvATI'); + glVertexStream1dATI := dglGetProcAddress('glVertexStream1dATI'); + glVertexStream1dvATI := dglGetProcAddress('glVertexStream1dvATI'); + glVertexStream2sATI := dglGetProcAddress('glVertexStream2sATI'); + glVertexStream2svATI := dglGetProcAddress('glVertexStream2svATI'); + glVertexStream2iATI := dglGetProcAddress('glVertexStream2iATI'); + glVertexStream2ivATI := dglGetProcAddress('glVertexStream2ivATI'); + glVertexStream2fATI := dglGetProcAddress('glVertexStream2fATI'); + glVertexStream2fvATI := dglGetProcAddress('glVertexStream2fvATI'); + glVertexStream2dATI := dglGetProcAddress('glVertexStream2dATI'); + glVertexStream2dvATI := dglGetProcAddress('glVertexStream2dvATI'); + glVertexStream3sATI := dglGetProcAddress('glVertexStream3sATI'); + glVertexStream3svATI := dglGetProcAddress('glVertexStream3svATI'); + glVertexStream3iATI := dglGetProcAddress('glVertexStream3iATI'); + glVertexStream3ivATI := dglGetProcAddress('glVertexStream3ivATI'); + glVertexStream3fATI := dglGetProcAddress('glVertexStream3fATI'); + glVertexStream3fvATI := dglGetProcAddress('glVertexStream3fvATI'); + glVertexStream3dATI := dglGetProcAddress('glVertexStream3dATI'); + glVertexStream3dvATI := dglGetProcAddress('glVertexStream3dvATI'); + glVertexStream4sATI := dglGetProcAddress('glVertexStream4sATI'); + glVertexStream4svATI := dglGetProcAddress('glVertexStream4svATI'); + glVertexStream4iATI := dglGetProcAddress('glVertexStream4iATI'); + glVertexStream4ivATI := dglGetProcAddress('glVertexStream4ivATI'); + glVertexStream4fATI := dglGetProcAddress('glVertexStream4fATI'); + glVertexStream4fvATI := dglGetProcAddress('glVertexStream4fvATI'); + glVertexStream4dATI := dglGetProcAddress('glVertexStream4dATI'); + glVertexStream4dvATI := dglGetProcAddress('glVertexStream4dvATI'); + glNormalStream3bATI := dglGetProcAddress('glNormalStream3bATI'); + glNormalStream3bvATI := dglGetProcAddress('glNormalStream3bvATI'); + glNormalStream3sATI := dglGetProcAddress('glNormalStream3sATI'); + glNormalStream3svATI := dglGetProcAddress('glNormalStream3svATI'); + glNormalStream3iATI := dglGetProcAddress('glNormalStream3iATI'); + glNormalStream3ivATI := dglGetProcAddress('glNormalStream3ivATI'); + glNormalStream3fATI := dglGetProcAddress('glNormalStream3fATI'); + glNormalStream3fvATI := dglGetProcAddress('glNormalStream3fvATI'); + glNormalStream3dATI := dglGetProcAddress('glNormalStream3dATI'); + glNormalStream3dvATI := dglGetProcAddress('glNormalStream3dvATI'); + glClientActiveVertexStreamATI := dglGetProcAddress('glClientActiveVertexStreamATI'); + glVertexBlendEnviATI := dglGetProcAddress('glVertexBlendEnviATI'); + glVertexBlendEnvfATI := dglGetProcAddress('glVertexBlendEnvfATI'); +end; + +procedure Read_GL_AMD_performance_monitor; +begin + glGetPerfMonitorGroupsAMD := dglGetProcAddress('glGetPerfMonitorGroupsAMD'); + glGetPerfMonitorCountersAMD := dglGetProcAddress('glGetPerfMonitorCountersAMD'); + glGetPerfMonitorGroupStringAMD := dglGetProcAddress('glGetPerfMonitorGroupStringAMD'); + glGetPerfMonitorCounterStringAMD := dglGetProcAddress('glGetPerfMonitorCounterStringAMD'); + glGetPerfMonitorCounterInfoAMD := dglGetProcAddress('glGetPerfMonitorCounterInfoAMD'); + glGenPerfMonitorsAMD := dglGetProcAddress('glGenPerfMonitorsAMD'); + glDeletePerfMonitorsAMD := dglGetProcAddress('glDeletePerfMonitorsAMD'); + glSelectPerfMonitorCountersAMD := dglGetProcAddress('glSelectPerfMonitorCountersAMD'); + glBeginPerfMonitorAMD := dglGetProcAddress('glBeginPerfMonitorAMD'); + glEndPerfMonitorAMD := dglGetProcAddress('glEndPerfMonitorAMD'); + glGetPerfMonitorCounterDataAMD := dglGetProcAddress('glGetPerfMonitorCounterDataAMD'); +end; + +procedure Read_GL_EXT_blend_color; +begin + glBlendColorEXT := dglGetProcAddress('glBlendColorEXT'); +end; + +procedure Read_GL_EXT_blend_func_separate; +begin + glBlendFuncSeparateEXT := dglGetProcAddress('glBlendFuncSeparateEXT'); +end; + +procedure Read_GL_EXT_blend_minmax; +begin + glBlendEquationEXT := dglGetProcAddress('glBlendEquationEXT'); +end; + +procedure Read_GL_EXT_color_subtable; +begin + glColorSubTableEXT := dglGetProcAddress('glColorSubTableEXT'); + glCopyColorSubTableEXT := dglGetProcAddress('glCopyColorSubTableEXT'); +end; + +procedure Read_GL_EXT_compiled_vertex_array; +begin + glLockArraysEXT := dglGetProcAddress('glLockArraysEXT'); + glUnlockArraysEXT := dglGetProcAddress('glUnlockArraysEXT'); +end; + +procedure Read_GL_EXT_convolution; +begin + glConvolutionFilter1DEXT := dglGetProcAddress('glConvolutionFilter1DEXT'); + glConvolutionFilter2DEXT := dglGetProcAddress('glConvolutionFilter2DEXT'); + glConvolutionParameterfEXT := dglGetProcAddress('glConvolutionParameterfEXT'); + glConvolutionParameterfvEXT := dglGetProcAddress('glConvolutionParameterfvEXT'); + glConvolutionParameteriEXT := dglGetProcAddress('glConvolutionParameteriEXT'); + glConvolutionParameterivEXT := dglGetProcAddress('glConvolutionParameterivEXT'); + glCopyConvolutionFilter1DEXT := dglGetProcAddress('glCopyConvolutionFilter1DEXT'); + glCopyConvolutionFilter2DEXT := dglGetProcAddress('glCopyConvolutionFilter2DEXT'); + glGetConvolutionFilterEXT := dglGetProcAddress('glGetConvolutionFilterEXT'); + glGetConvolutionParameterfvEXT := dglGetProcAddress('glGetConvolutionParameterfvEXT'); + glGetConvolutionParameterivEXT := dglGetProcAddress('glGetConvolutionParameterivEXT'); + glGetSeparableFilterEXT := dglGetProcAddress('glGetSeparableFilterEXT'); + glSeparableFilter2DEXT := dglGetProcAddress('glSeparableFilter2DEXT'); +end; + +procedure Read_GL_EXT_coordinate_frame; +begin + glTangent3bEXT := dglGetProcAddress('glTangent3bEXT'); + glTangent3bvEXT := dglGetProcAddress('glTangent3bvEXT'); + glTangent3dEXT := dglGetProcAddress('glTangent3dEXT'); + glTangent3dvEXT := dglGetProcAddress('glTangent3dvEXT'); + glTangent3fEXT := dglGetProcAddress('glTangent3fEXT'); + glTangent3fvEXT := dglGetProcAddress('glTangent3fvEXT'); + glTangent3iEXT := dglGetProcAddress('glTangent3iEXT'); + glTangent3ivEXT := dglGetProcAddress('glTangent3ivEXT'); + glTangent3sEXT := dglGetProcAddress('glTangent3sEXT'); + glTangent3svEXT := dglGetProcAddress('glTangent3svEXT'); + glBinormal3bEXT := dglGetProcAddress('glBinormal3bEXT'); + glBinormal3bvEXT := dglGetProcAddress('glBinormal3bvEXT'); + glBinormal3dEXT := dglGetProcAddress('glBinormal3dEXT'); + glBinormal3dvEXT := dglGetProcAddress('glBinormal3dvEXT'); + glBinormal3fEXT := dglGetProcAddress('glBinormal3fEXT'); + glBinormal3fvEXT := dglGetProcAddress('glBinormal3fvEXT'); + glBinormal3iEXT := dglGetProcAddress('glBinormal3iEXT'); + glBinormal3ivEXT := dglGetProcAddress('glBinormal3ivEXT'); + glBinormal3sEXT := dglGetProcAddress('glBinormal3sEXT'); + glBinormal3svEXT := dglGetProcAddress('glBinormal3svEXT'); + glTangentPointerEXT := dglGetProcAddress('glTangentPointerEXT'); + glBinormalPointerEXT := dglGetProcAddress('glBinormalPointerEXT'); +end; + +procedure Read_GL_EXT_copy_texture; +begin + glCopyTexImage1DEXT := dglGetProcAddress('glCopyTexImage1DEXT'); + glCopyTexImage2DEXT := dglGetProcAddress('glCopyTexImage2DEXT'); + glCopyTexSubImage1DEXT := dglGetProcAddress('glCopyTexSubImage1DEXT'); + glCopyTexSubImage2DEXT := dglGetProcAddress('glCopyTexSubImage2DEXT'); + glCopyTexSubImage3DEXT := dglGetProcAddress('glCopyTexSubImage3DEXT'); +end; + +procedure Read_GL_EXT_cull_vertex; +begin + glCullParameterdvEXT := dglGetProcAddress('glCullParameterdvEXT'); + glCullParameterfvEXT := dglGetProcAddress('glCullParameterfvEXT'); +end; + +procedure Read_GL_EXT_draw_range_elements; +begin + glDrawRangeElementsEXT := dglGetProcAddress('glDrawRangeElementsEXT'); +end; + +procedure Read_GL_EXT_fog_coord; +begin + glFogCoordfEXT := dglGetProcAddress('glFogCoordfEXT'); + glFogCoordfvEXT := dglGetProcAddress('glFogCoordfvEXT'); + glFogCoorddEXT := dglGetProcAddress('glFogCoorddEXT'); + glFogCoorddvEXT := dglGetProcAddress('glFogCoorddvEXT'); + glFogCoordPointerEXT := dglGetProcAddress('glFogCoordPointerEXT'); +end; + +procedure Read_GL_EXT_framebuffer_object; +begin + glIsRenderbufferEXT := dglGetProcAddress('glIsRenderbufferEXT'); + glBindRenderbufferEXT := dglGetProcAddress('glBindRenderbufferEXT'); + glDeleteRenderbuffersEXT := dglGetProcAddress('glDeleteRenderbuffersEXT'); + glGenRenderbuffersEXT := dglGetProcAddress('glGenRenderbuffersEXT'); + glRenderbufferStorageEXT := dglGetProcAddress('glRenderbufferStorageEXT'); + glGetRenderbufferParameterivEXT := dglGetProcAddress('glGetRenderbufferParameterivEXT'); + glIsFramebufferEXT := dglGetProcAddress('glIsFramebufferEXT'); + glBindFramebufferEXT := dglGetProcAddress('glBindFramebufferEXT'); + glDeleteFramebuffersEXT := dglGetProcAddress('glDeleteFramebuffersEXT'); + glGenFramebuffersEXT := dglGetProcAddress('glGenFramebuffersEXT'); + glCheckFramebufferStatusEXT := dglGetProcAddress('glCheckFramebufferStatusEXT'); + glFramebufferTexture1DEXT := dglGetProcAddress('glFramebufferTexture1DEXT'); + glFramebufferTexture2DEXT := dglGetProcAddress('glFramebufferTexture2DEXT'); + glFramebufferTexture3DEXT := dglGetProcAddress('glFramebufferTexture3DEXT'); + glFramebufferRenderbufferEXT := dglGetProcAddress('glFramebufferRenderbufferEXT'); + glGetFramebufferAttachmentParameterivEXT := dglGetProcAddress('glGetFramebufferAttachmentParameterivEXT'); + glGenerateMipmapEXT := dglGetProcAddress('glGenerateMipmapEXT'); +end; + +procedure Read_GL_EXT_histogram; +begin + glGetHistogramEXT := dglGetProcAddress('glGetHistogramEXT'); + glGetHistogramParameterfvEXT := dglGetProcAddress('glGetHistogramParameterfvEXT'); + glGetHistogramParameterivEXT := dglGetProcAddress('glGetHistogramParameterivEXT'); + glGetMinmaxEXT := dglGetProcAddress('glGetMinmaxEXT'); + glGetMinmaxParameterfvEXT := dglGetProcAddress('glGetMinmaxParameterfvEXT'); + glGetMinmaxParameterivEXT := dglGetProcAddress('glGetMinmaxParameterivEXT'); + glHistogramEXT := dglGetProcAddress('glHistogramEXT'); + glMinmaxEXT := dglGetProcAddress('glMinmaxEXT'); + glResetHistogramEXT := dglGetProcAddress('glResetHistogramEXT'); + glResetMinmaxEXT := dglGetProcAddress('glResetMinmaxEXT'); +end; + +procedure Read_GL_EXT_index_func; +begin + glIndexFuncEXT := dglGetProcAddress('glIndexFuncEXT'); +end; + +procedure Read_GL_EXT_index_material; +begin + glIndexMaterialEXT := dglGetProcAddress('glIndexMaterialEXT'); +end; + +procedure Read_GL_EXT_light_texture; +begin + glApplyTextureEXT := dglGetProcAddress('glApplyTextureEXT'); + glTextureLightEXT := dglGetProcAddress('glTextureLightEXT'); + glTextureMaterialEXT := dglGetProcAddress('glTextureMaterialEXT'); +end; + +procedure Read_GL_EXT_multi_draw_arrays; +begin + glMultiDrawArraysEXT := dglGetProcAddress('glMultiDrawArraysEXT'); + glMultiDrawElementsEXT := dglGetProcAddress('glMultiDrawElementsEXT'); +end; + +procedure Read_GL_EXT_multisample; +begin + glSampleMaskEXT := dglGetProcAddress('glSampleMaskEXT'); + glSamplePatternEXT := dglGetProcAddress('glSamplePatternEXT'); +end; + +procedure Read_GL_EXT_paletted_texture; +begin + glColorTableEXT := dglGetProcAddress('glColorTableEXT'); + glGetColorTableEXT := dglGetProcAddress('glGetColorTableEXT'); + glGetColorTableParameterivEXT := dglGetProcAddress('glGetColorTableParameterivEXT'); + glGetColorTableParameterfvEXT := dglGetProcAddress('glGetColorTableParameterfvEXT'); +end; + +procedure Read_GL_EXT_pixel_transform; +begin + glPixelTransformParameteriEXT := dglGetProcAddress('glPixelTransformParameteriEXT'); + glPixelTransformParameterfEXT := dglGetProcAddress('glPixelTransformParameterfEXT'); + glPixelTransformParameterivEXT := dglGetProcAddress('glPixelTransformParameterivEXT'); + glPixelTransformParameterfvEXT := dglGetProcAddress('glPixelTransformParameterfvEXT'); +end; + +procedure Read_GL_EXT_point_parameters; +begin + glPointParameterfEXT := dglGetProcAddress('glPointParameterfEXT'); + glPointParameterfvEXT := dglGetProcAddress('glPointParameterfvEXT'); +end; + +procedure Read_GL_EXT_polygon_offset; +begin + glPolygonOffsetEXT := dglGetProcAddress('glPolygonOffsetEXT'); +end; + +procedure Read_GL_EXT_secondary_color; +begin + glSecondaryColor3bEXT := dglGetProcAddress('glSecondaryColor3bEXT'); + glSecondaryColor3bvEXT := dglGetProcAddress('glSecondaryColor3bvEXT'); + glSecondaryColor3dEXT := dglGetProcAddress('glSecondaryColor3dEXT'); + glSecondaryColor3dvEXT := dglGetProcAddress('glSecondaryColor3dvEXT'); + glSecondaryColor3fEXT := dglGetProcAddress('glSecondaryColor3fEXT'); + glSecondaryColor3fvEXT := dglGetProcAddress('glSecondaryColor3fvEXT'); + glSecondaryColor3iEXT := dglGetProcAddress('glSecondaryColor3iEXT'); + glSecondaryColor3ivEXT := dglGetProcAddress('glSecondaryColor3ivEXT'); + glSecondaryColor3sEXT := dglGetProcAddress('glSecondaryColor3sEXT'); + glSecondaryColor3svEXT := dglGetProcAddress('glSecondaryColor3svEXT'); + glSecondaryColor3ubEXT := dglGetProcAddress('glSecondaryColor3ubEXT'); + glSecondaryColor3ubvEXT := dglGetProcAddress('glSecondaryColor3ubvEXT'); + glSecondaryColor3uiEXT := dglGetProcAddress('glSecondaryColor3uiEXT'); + glSecondaryColor3uivEXT := dglGetProcAddress('glSecondaryColor3uivEXT'); + glSecondaryColor3usEXT := dglGetProcAddress('glSecondaryColor3usEXT'); + glSecondaryColor3usvEXT := dglGetProcAddress('glSecondaryColor3usvEXT'); + glSecondaryColorPointerEXT := dglGetProcAddress('glSecondaryColorPointerEXT'); +end; + +procedure Read_GL_EXT_stencil_two_side; +begin + glActiveStencilFaceEXT := dglGetProcAddress('glActiveStencilFaceEXT'); +end; + +procedure Read_GL_EXT_subtexture; +begin + glTexSubImage1DEXT := dglGetProcAddress('glTexSubImage1DEXT'); + glTexSubImage2DEXT := dglGetProcAddress('glTexSubImage2DEXT'); +end; + +procedure Read_GL_EXT_texture3D; +begin + glTexImage3DEXT := dglGetProcAddress('glTexImage3DEXT'); + glTexSubImage3DEXT := dglGetProcAddress('glTexSubImage3DEXT'); +end; + +procedure Read_GL_EXT_texture_object; +begin + glAreTexturesResidentEXT := dglGetProcAddress('glAreTexturesResidentEXT'); + glBindTextureEXT := dglGetProcAddress('glBindTextureEXT'); + glDeleteTexturesEXT := dglGetProcAddress('glDeleteTexturesEXT'); + glGenTexturesEXT := dglGetProcAddress('glGenTexturesEXT'); + glIsTextureEXT := dglGetProcAddress('glIsTextureEXT'); + glPrioritizeTexturesEXT := dglGetProcAddress('glPrioritizeTexturesEXT'); +end; + +procedure Read_GL_EXT_texture_perturb_normal; +begin + glTextureNormalEXT := dglGetProcAddress('glTextureNormalEXT'); +end; + +procedure Read_GL_EXT_vertex_array; +begin + glArrayElementEXT := dglGetProcAddress('glArrayElementEXT'); + glColorPointerEXT := dglGetProcAddress('glColorPointerEXT'); + glDrawArraysEXT := dglGetProcAddress('glDrawArraysEXT'); + glEdgeFlagPointerEXT := dglGetProcAddress('glEdgeFlagPointerEXT'); + glGetPointervEXT := dglGetProcAddress('glGetPointervEXT'); + glIndexPointerEXT := dglGetProcAddress('glIndexPointerEXT'); + glNormalPointerEXT := dglGetProcAddress('glNormalPointerEXT'); + glTexCoordPointerEXT := dglGetProcAddress('glTexCoordPointerEXT'); + glVertexPointerEXT := dglGetProcAddress('glVertexPointerEXT'); +end; + +procedure Read_GL_EXT_vertex_shader; +begin + glBeginVertexShaderEXT := dglGetProcAddress('glBeginVertexShaderEXT'); + glEndVertexShaderEXT := dglGetProcAddress('glEndVertexShaderEXT'); + glBindVertexShaderEXT := dglGetProcAddress('glBindVertexShaderEXT'); + glGenVertexShadersEXT := dglGetProcAddress('glGenVertexShadersEXT'); + glDeleteVertexShaderEXT := dglGetProcAddress('glDeleteVertexShaderEXT'); + glShaderOp1EXT := dglGetProcAddress('glShaderOp1EXT'); + glShaderOp2EXT := dglGetProcAddress('glShaderOp2EXT'); + glShaderOp3EXT := dglGetProcAddress('glShaderOp3EXT'); + glSwizzleEXT := dglGetProcAddress('glSwizzleEXT'); + glWriteMaskEXT := dglGetProcAddress('glWriteMaskEXT'); + glInsertComponentEXT := dglGetProcAddress('glInsertComponentEXT'); + glExtractComponentEXT := dglGetProcAddress('glExtractComponentEXT'); + glGenSymbolsEXT := dglGetProcAddress('glGenSymbolsEXT'); + glSetInvariantEXT := dglGetProcAddress('glSetInvariantEXT'); + glSetLocalConstantEXT := dglGetProcAddress('glSetLocalConstantEXT'); + glVariantbvEXT := dglGetProcAddress('glVariantbvEXT'); + glVariantsvEXT := dglGetProcAddress('glVariantsvEXT'); + glVariantivEXT := dglGetProcAddress('glVariantivEXT'); + glVariantfvEXT := dglGetProcAddress('glVariantfvEXT'); + glVariantdvEXT := dglGetProcAddress('glVariantdvEXT'); + glVariantubvEXT := dglGetProcAddress('glVariantubvEXT'); + glVariantusvEXT := dglGetProcAddress('glVariantusvEXT'); + glVariantuivEXT := dglGetProcAddress('glVariantuivEXT'); + glVariantPointerEXT := dglGetProcAddress('glVariantPointerEXT'); + glEnableVariantClientStateEXT := dglGetProcAddress('glEnableVariantClientStateEXT'); + glDisableVariantClientStateEXT := dglGetProcAddress('glDisableVariantClientStateEXT'); + glBindLightParameterEXT := dglGetProcAddress('glBindLightParameterEXT'); + glBindMaterialParameterEXT := dglGetProcAddress('glBindMaterialParameterEXT'); + glBindTexGenParameterEXT := dglGetProcAddress('glBindTexGenParameterEXT'); + glBindTextureUnitParameterEXT := dglGetProcAddress('glBindTextureUnitParameterEXT'); + glBindParameterEXT := dglGetProcAddress('glBindParameterEXT'); + glIsVariantEnabledEXT := dglGetProcAddress('glIsVariantEnabledEXT'); + glGetVariantBooleanvEXT := dglGetProcAddress('glGetVariantBooleanvEXT'); + glGetVariantIntegervEXT := dglGetProcAddress('glGetVariantIntegervEXT'); + glGetVariantFloatvEXT := dglGetProcAddress('glGetVariantFloatvEXT'); + glGetVariantPointervEXT := dglGetProcAddress('glGetVariantPointervEXT'); + glGetInvariantBooleanvEXT := dglGetProcAddress('glGetInvariantBooleanvEXT'); + glGetInvariantIntegervEXT := dglGetProcAddress('glGetInvariantIntegervEXT'); + glGetInvariantFloatvEXT := dglGetProcAddress('glGetInvariantFloatvEXT'); + glGetLocalConstantBooleanvEXT := dglGetProcAddress('glGetLocalConstantBooleanvEXT'); + glGetLocalConstantIntegervEXT := dglGetProcAddress('glGetLocalConstantIntegervEXT'); + glGetLocalConstantFloatvEXT := dglGetProcAddress('glGetLocalConstantFloatvEXT'); +end; + +procedure Read_GL_EXT_vertex_weighting; +begin + glVertexWeightfEXT := dglGetProcAddress('glVertexWeightfEXT'); + glVertexWeightfvEXT := dglGetProcAddress('glVertexWeightfvEXT'); + glVertexWeightPointerEXT := dglGetProcAddress('glVertexWeightPointerEXT'); +end; + +procedure Read_GL_EXT_depth_bounds_test; +begin + glImageTransformParameteriHP := dglGetProcAddress('glImageTransformParameteriHP'); + glDepthBoundsEXT := dglGetProcAddress('glDepthBoundsEXT'); +end; + +procedure Read_GL_EXT_blend_equation_separate; +begin + glBlendEquationSeparateEXT := dglGetProcAddress('glBlendEquationSeparateEXT'); +end; + +procedure Read_GL_EXT_stencil_clear_tag; +begin + glStencilClearTagEXT := dglGetProcAddress('glStencilClearTagEXT'); +end; + +procedure Read_GL_EXT_framebuffer_blit; +begin + glBlitFramebufferEXT := dglGetProcAddress('glBlitFramebufferEXT'); +end; + +procedure Read_GL_EXT_framebuffer_multisample; +begin + glRenderbufferStorageMultisampleEXT := dglGetProcAddress('glRenderbufferStorageMultisampleEXT'); +end; + +procedure Read_GL_EXT_timer_query; +begin + glGetQueryObjecti64vEXT := dglGetProcAddress('glGetQueryObjecti64vEXT'); + glGetQueryObjectui64vEXT := dglGetProcAddress('glGetQueryObjectui64vEXT'); +end; + +procedure Read_GL_EXT_gpu_program_parameters; +begin + glProgramEnvParameters4fvEXT := dglGetProcAddress('glProgramEnvParameters4fvEXT'); + glProgramLocalParameters4fvEXT := dglGetProcAddress('glProgramLocalParameters4fvEXT'); +end; + +procedure Read_GL_EXT_bindable_uniform; +begin + glUniformBufferEXT := dglGetProcAddress('glUniformBufferEXT'); + glGetUniformBufferSizeEXT := dglGetProcAddress('glGetUniformBufferSizeEXT'); + glGetUniformOffsetEXT := dglGetProcAddress('glGetUniformOffsetEXT'); +end; + +procedure Read_GL_EXT_draw_buffers2; +begin + glColorMaskIndexedEXT := dglGetProcAddress('glColorMaskIndexedEXT'); + glGetBooleanIndexedvEXT := dglGetProcAddress('glGetBooleanIndexedvEXT'); + glGetIntegerIndexedvEXT := dglGetProcAddress('glGetIntegerIndexedvEXT'); + glEnableIndexedEXT := dglGetProcAddress('glEnableIndexedEXT'); + glDisableIndexedEXT := dglGetProcAddress('glDisableIndexedEXT'); + glIsEnabledIndexedEXT := dglGetProcAddress('glIsEnabledIndexedEXT'); +end; + +procedure Read_GL_EXT_draw_instanced; +begin + glDrawArraysInstancedEXT := dglGetProcAddress('glDrawArraysInstancedEXT'); + glDrawElementsInstancedEXT := dglGetProcAddress('glDrawElementsInstancedEXT'); +end; + +procedure Read_GL_EXT_geometry_shader4; +begin + glProgramParameteriEXT := dglGetProcAddress('glProgramParameteriEXT'); + glFramebufferTextureEXT := dglGetProcAddress('glFramebufferTextureEXT'); +// glFramebufferTextureLayerEXT := dglGetProcAddress('glFramebufferTextureLayerEXT'); + glFramebufferTextureFaceEXT := dglGetProcAddress('glFramebufferTextureFaceEXT'); +end; + +procedure Read_GL_EXT_gpu_shader4; +begin + glVertexAttribI1iEXT := dglGetProcAddress('glVertexAttribI1iEXT'); + glVertexAttribI2iEXT := dglGetProcAddress('glVertexAttribI2iEXT'); + glVertexAttribI3iEXT := dglGetProcAddress('glVertexAttribI3iEXT'); + glVertexAttribI4iEXT := dglGetProcAddress('glVertexAttribI4iEXT'); + glVertexAttribI1uiEXT := dglGetProcAddress('glVertexAttribI1uiEXT'); + glVertexAttribI2uiEXT := dglGetProcAddress('glVertexAttribI2uiEXT'); + glVertexAttribI3uiEXT := dglGetProcAddress('glVertexAttribI3uiEXT'); + glVertexAttribI4uiEXT := dglGetProcAddress('glVertexAttribI4uiEXT'); + glVertexAttribI1ivEXT := dglGetProcAddress('glVertexAttribI1ivEXT'); + glVertexAttribI2ivEXT := dglGetProcAddress('glVertexAttribI2ivEXT'); + glVertexAttribI3ivEXT := dglGetProcAddress('glVertexAttribI3ivEXT'); + glVertexAttribI4ivEXT := dglGetProcAddress('glVertexAttribI4ivEXT'); + glVertexAttribI1uivEXT := dglGetProcAddress('glVertexAttribI1uivEXT'); + glVertexAttribI2uivEXT := dglGetProcAddress('glVertexAttribI2uivEXT'); + glVertexAttribI3uivEXT := dglGetProcAddress('glVertexAttribI3uivEXT'); + glVertexAttribI4uivEXT := dglGetProcAddress('glVertexAttribI4uivEXT'); + glVertexAttribI4bvEXT := dglGetProcAddress('glVertexAttribI4bvEXT'); + glVertexAttribI4svEXT := dglGetProcAddress('glVertexAttribI4svEXT'); + glVertexAttribI4ubvEXT := dglGetProcAddress('glVertexAttribI4ubvEXT'); + glVertexAttribI4usvEXT := dglGetProcAddress('glVertexAttribI4usvEXT'); + glVertexAttribIPointerEXT := dglGetProcAddress('glVertexAttribIPointerEXT'); + glGetVertexAttribIivEXT := dglGetProcAddress('glGetVertexAttribIivEXT'); + glGetVertexAttribIuivEXT := dglGetProcAddress('glGetVertexAttribIuivEXT'); + glUniform1uiEXT := dglGetProcAddress('glUniform1uiEXT'); + glUniform2uiEXT := dglGetProcAddress('glUniform2uiEXT'); + glUniform3uiEXT := dglGetProcAddress('glUniform3uiEXT'); + glUniform4uiEXT := dglGetProcAddress('glUniform4uiEXT'); + glUniform1uivEXT := dglGetProcAddress('glUniform1uivEXT'); + glUniform2uivEXT := dglGetProcAddress('glUniform2uivEXT'); + glUniform3uivEXT := dglGetProcAddress('glUniform3uivEXT'); + glUniform4uivEXT := dglGetProcAddress('glUniform4uivEXT'); + glGetUniformuivEXT := dglGetProcAddress('glGetUniformuivEXT'); + glBindFragDataLocationEXT := dglGetProcAddress('glBindFragDataLocationEXT'); + glGetFragDataLocationEXT := dglGetProcAddress('glGetFragDataLocationEXT'); +end; + +procedure Read_GL_EXT_texture_array; +begin + glFramebufferTextureLayerEXT := dglGetProcAddress('glFramebufferTextureLayerEXT'); +end; + +procedure Read_GL_EXT_texture_buffer_object; +begin + glTexBufferEXT := dglGetProcAddress('glTexBufferEXT'); +end; + +procedure Read_GL_EXT_texture_integer; +begin + glClearColorIiEXT := dglGetProcAddress('glClearColorIiEXT'); + glClearColorIuiEXT := dglGetProcAddress('glClearColorIuiEXT'); + glTexParameterIivEXT := dglGetProcAddress('glTexParameterIivEXT'); + glTexParameterIuivEXT := dglGetProcAddress('glTexParameterIuivEXT'); + glGetTexParameterIivEXT := dglGetProcAddress('glGetTexParameterIivEXT'); + glGetTexParameterIiuvEXT := dglGetProcAddress('glGetTexParameterIiuvEXT'); +end; + +procedure Read_GL_EXT_transform_feedback; +begin + glBeginTransformFeedbackEXT := dglGetProcAddress('lBeginTransformFeedbackEXT'); + glEndTransformFeedbackEXT := dglGetProcAddress('glEndTransformFeedbackEXT'); + glBindBufferRangeEXT := dglGetProcAddress('glBindBufferRangeEXT'); + glBindBufferOffsetEXT := dglGetProcAddress('glBindBufferOffsetEXT'); + glBindBufferBaseEXT := dglGetProcAddress('glBindBufferBaseEXT'); + glTransformFeedbackVaryingsEXT := dglGetProcAddress('glTransformFeedbackVaryingsEXT'); + glGetTransformFeedbackVaryingEXT := dglGetProcAddress('glGetTransformFeedbackVaryingEXT'); +end; + +procedure Read_GL_EXT_direct_state_access; +begin + glClientAttribDefaultEXT := dglGetProcAddress('glClientAttribDefaultEXT'); + glPushClientAttribDefaultEXT := dglGetProcAddress('glPushClientAttribDefaultEXT'); + glMatrixLoadfEXT := dglGetProcAddress('glMatrixLoadfEXT'); + glMatrixLoaddEXT := dglGetProcAddress('glMatrixLoaddEXT'); + glMatrixMultfEXT := dglGetProcAddress('glMatrixMultfEXT'); + glMatrixMultdEXT := dglGetProcAddress('glMatrixMultdEXT'); + glMatrixLoadIdentityEXT := dglGetProcAddress('glMatrixLoadIdentityEXT'); + glMatrixRotatefEXT := dglGetProcAddress('glMatrixRotatefEXT'); + glMatrixRotatedEXT := dglGetProcAddress('glMatrixRotatedEXT'); + glMatrixScalefEXT := dglGetProcAddress('glMatrixScalefEXT'); + glMatrixScaledEXT := dglGetProcAddress('glMatrixScaledEXT'); + glMatrixTranslatefEXT := dglGetProcAddress('glMatrixTranslatefEXT'); + glMatrixTranslatedEXT := dglGetProcAddress('glMatrixTranslatedEXT'); + glMatrixFrustumEXT := dglGetProcAddress('glMatrixFrustumEXT'); + glMatrixOrthoEXT := dglGetProcAddress('glMatrixOrthoEXT'); + glMatrixPopEXT := dglGetProcAddress('glMatrixPopEXT'); + glMatrixPushEXT := dglGetProcAddress('glMatrixPushEXT'); + glMatrixLoadTransposefEXT := dglGetProcAddress('glMatrixLoadTransposefEXT'); + glMatrixLoadTransposedEXT := dglGetProcAddress('glMatrixLoadTransposedEXT'); + glMatrixMultTransposefEXT := dglGetProcAddress('glMatrixMultTransposefEXT'); + glMatrixMultTransposedEXT := dglGetProcAddress('glMatrixMultTransposedEXT'); + glTextureParameterfEXT := dglGetProcAddress('glTextureParameterfEXT'); + glTextureParameterfvEXT := dglGetProcAddress('glTextureParameterfvEXT'); + glTextureParameteriEXT := dglGetProcAddress('glTextureParameteriEXT'); + glTextureParameterivEXT := dglGetProcAddress('glTextureParameterivEXT'); + glTextureImage1DEXT := dglGetProcAddress('glTextureImage1DEXT'); + glTextureImage2DEXT := dglGetProcAddress('glTextureImage2DEXT'); + glTextureSubImage1DEXT := dglGetProcAddress('glTextureSubImage1DEXT'); + glTextureSubImage2DEXT := dglGetProcAddress('glTextureSubImage2DEXT'); + glCopyTextureImage1DEXT := dglGetProcAddress('glCopyTextureImage1DEXT'); + glCopyTextureImage2DEXT := dglGetProcAddress('glCopyTextureImage2DEXT'); + glCopyTextureSubImage1DEXT := dglGetProcAddress('glCopyTextureSubImage1DEXT'); + glCopyTextureSubImage2DEXT := dglGetProcAddress('glCopyTextureSubImage2DEXT'); + glGetTextureImageEXT := dglGetProcAddress('glGetTextureImageEXT'); + glGetTextureParameterfvEXT := dglGetProcAddress('glGetTextureParameterfvEXT'); + glGetTextureParameterivEXT := dglGetProcAddress('glGetTextureParameterivEXT'); + glGetTextureLevelParameterfvEXT := dglGetProcAddress('glGetTextureLevelParameterfvEXT'); + glGetTextureLevelParameterivEXT := dglGetProcAddress('glGetTextureLevelParameterivEXT'); + glTextureImage3DEXT := dglGetProcAddress('glTextureImage3DEXT'); + glTextureSubImage3DEXT := dglGetProcAddress('glTextureSubImage3DEXT'); + glCopyTextureSubImage3DEXT := dglGetProcAddress('glCopyTextureSubImage3DEXT'); + glMultiTexParameterfEXT := dglGetProcAddress('glMultiTexParameterfEXT'); + glMultiTexParameterfvEXT := dglGetProcAddress('glMultiTexParameterfvEXT'); + glMultiTexParameteriEXT := dglGetProcAddress('glMultiTexParameteriEXT'); + glMultiTexParameterivEXT := dglGetProcAddress('glMultiTexParameterivEXT'); + glMultiTexImage1DEXT := dglGetProcAddress('glMultiTexImage1DEXT'); + glMultiTexImage2DEXT := dglGetProcAddress('glMultiTexImage2DEXT'); + glMultiTexSubImage1DEXT := dglGetProcAddress('glMultiTexSubImage1DEXT'); + glMultiTexSubImage2DEXT := dglGetProcAddress('glMultiTexSubImage2DEXT'); + glCopyMultiTexImage1DEXT := dglGetProcAddress('glCopyMultiTexImage1DEXT'); + glCopyMultiTexImage2DEXT := dglGetProcAddress('glCopyMultiTexImage2DEXT'); + glCopyMultiTexSubImage1DEXT := dglGetProcAddress('glCopyMultiTexSubImage1DEXT'); + glCopyMultiTexSubImage2DEXT := dglGetProcAddress('glCopyMultiTexSubImage2DEXT'); + glGetMultiTexImageEXT := dglGetProcAddress('glGetMultiTexImageEXT'); + glGetMultiTexParameterfvEXT := dglGetProcAddress('glGetMultiTexParameterfvEXT'); + glGetMultiTexParameterivEXT := dglGetProcAddress('glGetMultiTexParameterivEXT'); + glGetMultiTexLevelParameterfvEXT := dglGetProcAddress('glGetMultiTexLevelParameterfvEXT'); + glGetMultiTexLevelParameterivEXT := dglGetProcAddress('glGetMultiTexLevelParameterivEXT'); + glMultiTexImage3DEXT := dglGetProcAddress('glMultiTexImage3DEXT'); + glMultiTexSubImage3DEXT := dglGetProcAddress('glMultiTexSubImage3DEXT'); + glCopyMultiTexSubImage3DEXT := dglGetProcAddress('glCopyMultiTexSubImage3DEXT'); + glBindMultiTextureEXT := dglGetProcAddress('glBindMultiTextureEXT'); + glEnableClientStateIndexedEXT := dglGetProcAddress('glEnableClientStateIndexedEXT'); + glDisableClientStateIndexedEXT := dglGetProcAddress('glDisableClientStateIndexedEXT'); + glMultiTexCoordPointerEXT := dglGetProcAddress('glMultiTexCoordPointerEXT'); + glMultiTexEnvfEXT := dglGetProcAddress('glMultiTexEnvfEXT'); + glMultiTexEnvfvEXT := dglGetProcAddress('glMultiTexEnvfvEXT'); + glMultiTexEnviEXT := dglGetProcAddress('glMultiTexEnviEXT'); + glMultiTexEnvivEXT := dglGetProcAddress('glMultiTexEnvivEXT'); + glMultiTexGendEXT := dglGetProcAddress('glMultiTexGendEXT'); + glMultiTexGendvEXT := dglGetProcAddress('glMultiTexGendvEXT'); + glMultiTexGenfEXT := dglGetProcAddress('glMultiTexGenfEXT'); + glMultiTexGenfvEXT := dglGetProcAddress('glMultiTexGenfvEXT'); + glMultiTexGeniEXT := dglGetProcAddress('glMultiTexGeniEXT'); + glMultiTexGenivEXT := dglGetProcAddress('glMultiTexGenivEXT'); + glGetMultiTexEnvfvEXT := dglGetProcAddress('glGetMultiTexEnvfvEXT'); + glGetMultiTexEnvivEXT := dglGetProcAddress('glGetMultiTexEnvivEXT'); + glGetMultiTexGendvEXT := dglGetProcAddress('glGetMultiTexGendvEXT'); + glGetMultiTexGenfvEXT := dglGetProcAddress('glGetMultiTexGenfvEXT'); + glGetMultiTexGenivEXT := dglGetProcAddress('glGetMultiTexGenivEXT'); + glGetFloatIndexedvEXT := dglGetProcAddress('glGetFloatIndexedvEXT'); + glGetDoubleIndexedvEXT := dglGetProcAddress('glGetDoubleIndexedvEXT'); + glGetPointerIndexedvEXT := dglGetProcAddress('glGetPointerIndexedvEXT'); + glCompressedTextureImage3DEXT := dglGetProcAddress('glCompressedTextureImage3DEXT'); + glCompressedTextureImage2DEXT := dglGetProcAddress('glCompressedTextureImage2DEXT'); + glCompressedTextureImage1DEXT := dglGetProcAddress('glCompressedTextureImage1DEXT'); + glCompressedTextureSubImage3DEXT := dglGetProcAddress('glCompressedTextureSubImage3DEXT'); + glCompressedTextureSubImage2DEXT := dglGetProcAddress('glCompressedTextureSubImage2DEXT'); + glCompressedTextureSubImage1DEXT := dglGetProcAddress('glCompressedTextureSubImage1DEXT'); + glGetCompressedTextureImageEXT := dglGetProcAddress('glGetCompressedTextureImageEXT'); + glCompressedMultiTexImage3DEXT := dglGetProcAddress('glCompressedMultiTexImage3DEXT'); + glCompressedMultiTexImage2DEXT := dglGetProcAddress('glCompressedMultiTexImage2DEXT'); + glCompressedMultiTexImage1DEXT := dglGetProcAddress('glCompressedMultiTexImage1DEXT'); + glCompressedMultiTexSubImage3DEXT := dglGetProcAddress('glCompressedMultiTexSubImage3DEXT'); + glCompressedMultiTexSubImage2DEXT := dglGetProcAddress('glCompressedMultiTexSubImage2DEXT'); + glCompressedMultiTexSubImage1DEXT := dglGetProcAddress('glCompressedMultiTexSubImage1DEXT'); + glGetCompressedMultiTexImageEXT := dglGetProcAddress('glGetCompressedMultiTexImageEXT'); + glNamedProgramStringEXT := dglGetProcAddress('glNamedProgramStringEXT'); + glNamedProgramLocalParameter4dEXT := dglGetProcAddress('glNamedProgramLocalParameter4dEXT'); + glNamedProgramLocalParameter4dvEXT := dglGetProcAddress('glNamedProgramLocalParameter4dvEXT'); + glNamedProgramLocalParameter4fEXT := dglGetProcAddress('glNamedProgramLocalParameter4fEXT'); + glNamedProgramLocalParameter4fvEXT := dglGetProcAddress('glNamedProgramLocalParameter4fvEXT'); + glGetNamedProgramLocalParameterdvEXT := dglGetProcAddress('glGetNamedProgramLocalParameterdvEXT'); + glGetNamedProgramLocalParameterfvEXT := dglGetProcAddress('glGetNamedProgramLocalParameterfvEXT'); + glGetNamedProgramivEXT := dglGetProcAddress('glGetNamedProgramivEXT'); + glGetNamedProgramStringEXT := dglGetProcAddress('glGetNamedProgramStringEXT'); + glNamedProgramLocalParameters4fvEXT := dglGetProcAddress('glNamedProgramLocalParameters4fvEXT'); + glNamedProgramLocalParameterI4iEXT := dglGetProcAddress('glNamedProgramLocalParameterI4iEXT'); + glNamedProgramLocalParameterI4ivEXT := dglGetProcAddress('glNamedProgramLocalParameterI4ivEXT'); + glNamedProgramLocalParametersI4ivEXT := dglGetProcAddress('glNamedProgramLocalParametersI4ivEXT'); + glNamedProgramLocalParameterI4uiEXT := dglGetProcAddress('glNamedProgramLocalParameterI4uiEXT'); + glNamedProgramLocalParameterI4uivEXT := dglGetProcAddress('glNamedProgramLocalParameterI4uivEXT'); + glNamedProgramLocalParametersI4uivEXT := dglGetProcAddress('glNamedProgramLocalParametersI4uivEXT'); + glGetNamedProgramLocalParameterIivEXT := dglGetProcAddress('glGetNamedProgramLocalParameterIivEXT'); + glGetNamedProgramLocalParameterIuivEXT := dglGetProcAddress('glGetNamedProgramLocalParameterIuivEXT'); + glTextureParameterIivEXT := dglGetProcAddress('glTextureParameterIivEXT'); + glTextureParameterIuivEXT := dglGetProcAddress('glTextureParameterIuivEXT'); + glGetTextureParameterIivEXT := dglGetProcAddress('glGetTextureParameterIivEXT'); + glGetTextureParameterIuivEXT := dglGetProcAddress('glGetTextureParameterIuivEXT'); + glMultiTexParameterIivEXT := dglGetProcAddress('glMultiTexParameterIivEXT'); + glMultiTexParameterIuivEXT := dglGetProcAddress('glMultiTexParameterIuivEXT'); + glGetMultiTexParameterIivEXT := dglGetProcAddress('glGetMultiTexParameterIivEXT'); + glGetMultiTexParameterIuivEXT := dglGetProcAddress('glGetMultiTexParameterIuivEXT'); + glProgramUniform1fEXT := dglGetProcAddress('glProgramUniform1fEXT'); + glProgramUniform2fEXT := dglGetProcAddress('glProgramUniform2fEXT'); + glProgramUniform3fEXT := dglGetProcAddress('glProgramUniform3fEXT'); + glProgramUniform4fEXT := dglGetProcAddress('glProgramUniform4fEXT'); + glProgramUniform1iEXT := dglGetProcAddress('glProgramUniform1iEXT'); + glProgramUniform2iEXT := dglGetProcAddress('glProgramUniform2iEXT'); + glProgramUniform3iEXT := dglGetProcAddress('glProgramUniform3iEXT'); + glProgramUniform4iEXT := dglGetProcAddress('glProgramUniform4iEXT'); + glProgramUniform1fvEXT := dglGetProcAddress('glProgramUniform1fvEXT'); + glProgramUniform2fvEXT := dglGetProcAddress('glProgramUniform2fvEXT'); + glProgramUniform3fvEXT := dglGetProcAddress('glProgramUniform3fvEXT'); + glProgramUniform4fvEXT := dglGetProcAddress('glProgramUniform4fvEXT'); + glProgramUniform1ivEXT := dglGetProcAddress('glProgramUniform1ivEXT'); + glProgramUniform2ivEXT := dglGetProcAddress('glProgramUniform2ivEXT'); + glProgramUniform3ivEXT := dglGetProcAddress('glProgramUniform3ivEXT'); + glProgramUniform4ivEXT := dglGetProcAddress('glProgramUniform4ivEXT'); + glProgramUniformMatrix2fvEXT := dglGetProcAddress('glProgramUniformMatrix2fvEXT'); + glProgramUniformMatrix3fvEXT := dglGetProcAddress('glProgramUniformMatrix3fvEXT'); + glProgramUniformMatrix4fvEXT := dglGetProcAddress('glProgramUniformMatrix4fvEXT'); + glProgramUniformMatrix2x3fvEXT := dglGetProcAddress('glProgramUniformMatrix2x3fvEXT'); + glProgramUniformMatrix3x2fvEXT := dglGetProcAddress('glProgramUniformMatrix3x2fvEXT'); + glProgramUniformMatrix2x4fvEXT := dglGetProcAddress('glProgramUniformMatrix2x4fvEXT'); + glProgramUniformMatrix4x2fvEXT := dglGetProcAddress('glProgramUniformMatrix4x2fvEXT'); + glProgramUniformMatrix3x4fvEXT := dglGetProcAddress('glProgramUniformMatrix3x4fvEXT'); + glProgramUniformMatrix4x3fvEXT := dglGetProcAddress('glProgramUniformMatrix4x3fvEXT'); + glProgramUniform1uiEXT := dglGetProcAddress('glProgramUniform1uiEXT'); + glProgramUniform2uiEXT := dglGetProcAddress('glProgramUniform2uiEXT'); + glProgramUniform3uiEXT := dglGetProcAddress('glProgramUniform3uiEXT'); + glProgramUniform4uiEXT := dglGetProcAddress('glProgramUniform4uiEXT'); + glProgramUniform1uivEXT := dglGetProcAddress('glProgramUniform1uivEXT'); + glProgramUniform2uivEXT := dglGetProcAddress('glProgramUniform2uivEXT'); + glProgramUniform3uivEXT := dglGetProcAddress('glProgramUniform3uivEXT'); + glProgramUniform4uivEXT := dglGetProcAddress('glProgramUniform4uivEXT'); + glNamedBufferDataEXT := dglGetProcAddress('glNamedBufferDataEXT'); + glNamedBufferSubDataEXT := dglGetProcAddress('glNamedBufferSubDataEXT'); + glMapNamedBufferEXT := dglGetProcAddress('glMapNamedBufferEXT'); + glUnmapNamedBufferEXT := dglGetProcAddress('glUnmapNamedBufferEXT'); + glGetNamedBufferParameterivEXT := dglGetProcAddress('glGetNamedBufferParameterivEXT'); + glGetNamedBufferPointervEXT := dglGetProcAddress('glGetNamedBufferPointervEXT'); + glGetNamedBufferSubDataEXT := dglGetProcAddress('glGetNamedBufferSubDataEXT'); + glTextureBufferEXT := dglGetProcAddress('glTextureBufferEXT'); + glMultiTexBufferEXT := dglGetProcAddress('glMultiTexBufferEXT'); + glNamedRenderbufferStorageEXT := dglGetProcAddress('glNamedRenderbufferStorageEXT'); + glGetNamedRenderbufferParameterivEXT := dglGetProcAddress('glGetNamedRenderbufferParameterivEXT'); + glCheckNamedFramebufferStatusEXT := dglGetProcAddress('glCheckNamedFramebufferStatusEXT'); + glNamedFramebufferTexture1DEXT := dglGetProcAddress('glNamedFramebufferTexture1DEXT'); + glNamedFramebufferTexture2DEXT := dglGetProcAddress('glNamedFramebufferTexture2DEXT'); + glNamedFramebufferTexture3DEXT := dglGetProcAddress('glNamedFramebufferTexture3DEXT'); + glNamedFramebufferRenderbufferEXT := dglGetProcAddress('glNamedFramebufferRenderbufferEXT'); + glGetNamedFramebufferAttachmentParameterivEXT := dglGetProcAddress('glGetNamedFramebufferAttachmentParameterivEXT'); + glGenerateTextureMipmapEXT := dglGetProcAddress('glGenerateTextureMipmapEXT'); + glGenerateMultiTexMipmapEXT := dglGetProcAddress('glGenerateMultiTexMipmapEXT'); + glFramebufferDrawBufferEXT := dglGetProcAddress('glFramebufferDrawBufferEXT'); + glFramebufferDrawBuffersEXT := dglGetProcAddress('glFramebufferDrawBuffersEXT'); + glFramebufferReadBufferEXT := dglGetProcAddress('glFramebufferReadBufferEXT'); + glGetFramebufferParameterivEXT := dglGetProcAddress('glGetFramebufferParameterivEXT'); + glNamedRenderbufferStorageMultisampleEXT := dglGetProcAddress('glNamedRenderbufferStorageMultisampleEXT'); + glNamedRenderbufferStorageMultisampleCoverageEXT := dglGetProcAddress('glNamedRenderbufferStorageMultisampleCoverageEXT'); + glNamedFramebufferTextureEXT := dglGetProcAddress('glNamedFramebufferTextureEXT'); + glNamedFramebufferTextureLayerEXT := dglGetProcAddress('glNamedFramebufferTextureLayerEXT'); + glNamedFramebufferTextureFaceEXT := dglGetProcAddress('glNamedFramebufferTextureFaceEXT'); + glTextureRenderbufferEXT := dglGetProcAddress('glTextureRenderbufferEXT'); + glMultiTexRenderbufferEXT := dglGetProcAddress('glMultiTexRenderbufferEXT'); +end; + +procedure Read_GL_HP_image_transform; +begin + glImageTransformParameteriHP := dglGetProcAddress('glImageTransformParameteriHP'); + glImageTransformParameterfHP := dglGetProcAddress('glImageTransformParameterfHP'); + glImageTransformParameterivHP := dglGetProcAddress('glImageTransformParameterivHP'); + glImageTransformParameterfvHP := dglGetProcAddress('glImageTransformParameterfvHP'); + glGetImageTransformParameterivHP := dglGetProcAddress('glGetImageTransformParameterivHP'); + glGetImageTransformParameterfvHP := dglGetProcAddress('glGetImageTransformParameterfvHP'); +end; + +procedure Read_GL_IBM_multimode_draw_arrays; +begin + glMultiModeDrawArraysIBM := dglGetProcAddress('glMultiModeDrawArraysIBM'); + glMultiModeDrawElementsIBM := dglGetProcAddress('glMultiModeDrawElementsIBM'); +end; + +procedure Read_GL_IBM_vertex_array_lists; +begin + glColorPointerListIBM := dglGetProcAddress('glColorPointerListIBM'); + glSecondaryColorPointerListIBM := dglGetProcAddress('glSecondaryColorPointerListIBM'); + glEdgeFlagPointerListIBM := dglGetProcAddress('glEdgeFlagPointerListIBM'); + glFogCoordPointerListIBM := dglGetProcAddress('glFogCoordPointerListIBM'); + glIndexPointerListIBM := dglGetProcAddress('glIndexPointerListIBM'); + glNormalPointerListIBM := dglGetProcAddress('glNormalPointerListIBM'); + glTexCoordPointerListIBM := dglGetProcAddress('glTexCoordPointerListIBM'); + glVertexPointerListIBM := dglGetProcAddress('glVertexPointerListIBM'); +end; + +procedure Read_GL_INGR_blend_func_separate; +begin + glBlendFuncSeparateINGR := dglGetProcAddress('glBlendFuncSeparateINGR'); +end; + +procedure Read_GL_INTEL_parallel_arrays; +begin + glVertexPointervINTEL := dglGetProcAddress('glVertexPointervINTEL'); + glNormalPointervINTEL := dglGetProcAddress('glNormalPointervINTEL'); + glColorPointervINTEL := dglGetProcAddress('glColorPointervINTEL'); + glTexCoordPointervINTEL := dglGetProcAddress('glTexCoordPointervINTEL'); +end; + +procedure Read_GL_MESA_resize_buffers; +begin + glResizeBuffersMESA := dglGetProcAddress('glResizeBuffersMESA'); +end; + +procedure Read_GL_MESA_window_pos; +begin + glWindowPos2dMESA := dglGetProcAddress('glWindowPos2dMESA'); + glWindowPos2dvMESA := dglGetProcAddress('glWindowPos2dvMESA'); + glWindowPos2fMESA := dglGetProcAddress('glWindowPos2fMESA'); + glWindowPos2fvMESA := dglGetProcAddress('glWindowPos2fvMESA'); + glWindowPos2iMESA := dglGetProcAddress('glWindowPos2iMESA'); + glWindowPos2ivMESA := dglGetProcAddress('glWindowPos2ivMESA'); + glWindowPos2sMESA := dglGetProcAddress('glWindowPos2sMESA'); + glWindowPos2svMESA := dglGetProcAddress('glWindowPos2svMESA'); + glWindowPos3dMESA := dglGetProcAddress('glWindowPos3dMESA'); + glWindowPos3dvMESA := dglGetProcAddress('glWindowPos3dvMESA'); + glWindowPos3fMESA := dglGetProcAddress('glWindowPos3fMESA'); + glWindowPos3fvMESA := dglGetProcAddress('glWindowPos3fvMESA'); + glWindowPos3iMESA := dglGetProcAddress('glWindowPos3iMESA'); + glWindowPos3ivMESA := dglGetProcAddress('glWindowPos3ivMESA'); + glWindowPos3sMESA := dglGetProcAddress('glWindowPos3sMESA'); + glWindowPos3svMESA := dglGetProcAddress('glWindowPos3svMESA'); + glWindowPos4dMESA := dglGetProcAddress('glWindowPos4dMESA'); + glWindowPos4dvMESA := dglGetProcAddress('glWindowPos4dvMESA'); + glWindowPos4fMESA := dglGetProcAddress('glWindowPos4fMESA'); + glWindowPos4fvMESA := dglGetProcAddress('glWindowPos4fvMESA'); + glWindowPos4iMESA := dglGetProcAddress('glWindowPos4iMESA'); + glWindowPos4ivMESA := dglGetProcAddress('glWindowPos4ivMESA'); + glWindowPos4sMESA := dglGetProcAddress('glWindowPos4sMESA'); + glWindowPos4svMESA := dglGetProcAddress('glWindowPos4svMESA'); +end; + +procedure Read_GL_NV_evaluators; +begin + glMapControlPointsNV := dglGetProcAddress('glMapControlPointsNV'); + glMapParameterivNV := dglGetProcAddress('glMapParameterivNV'); + glMapParameterfvNV := dglGetProcAddress('glMapParameterfvNV'); + glGetMapControlPointsNV := dglGetProcAddress('glGetMapControlPointsNV'); + glGetMapParameterivNV := dglGetProcAddress('glGetMapParameterivNV'); + glGetMapParameterfvNV := dglGetProcAddress('glGetMapParameterfvNV'); + glGetMapAttribParameterivNV := dglGetProcAddress('glGetMapAttribParameterivNV'); + glGetMapAttribParameterfvNV := dglGetProcAddress('glGetMapAttribParameterfvNV'); + glEvalMapsNV := dglGetProcAddress('glEvalMapsNV'); +end; + +procedure Read_GL_NV_fence; +begin + glDeleteFencesNV := dglGetProcAddress('glDeleteFencesNV'); + glGenFencesNV := dglGetProcAddress('glGenFencesNV'); + glIsFenceNV := dglGetProcAddress('glIsFenceNV'); + glTestFenceNV := dglGetProcAddress('glTestFenceNV'); + glGetFenceivNV := dglGetProcAddress('glGetFenceivNV'); + glFinishFenceNV := dglGetProcAddress('glFinishFenceNV'); + glSetFenceNV := dglGetProcAddress('glSetFenceNV'); +end; + +procedure Read_GL_NV_fragment_program; +begin + glProgramNamedParameter4fNV := dglGetProcAddress('glProgramNamedParameter4fNV'); + glProgramNamedParameter4dNV := dglGetProcAddress('glProgramNamedParameter4dNV'); + glProgramNamedParameter4fvNV := dglGetProcAddress('glProgramNamedParameter4fvNV'); + glProgramNamedParameter4dvNV := dglGetProcAddress('glProgramNamedParameter4dvNV'); + glGetProgramNamedParameterfvNV := dglGetProcAddress('glGetProgramNamedParameterfvNV'); + glGetProgramNamedParameterdvNV := dglGetProcAddress('glGetProgramNamedParameterdvNV'); +end; + +procedure Read_GL_NV_half_float; +begin + glVertex2hNV := dglGetProcAddress('glVertex2hNV'); + glVertex2hvNV := dglGetProcAddress('glVertex2hvNV'); + glVertex3hNV := dglGetProcAddress('glVertex3hNV'); + glVertex3hvNV := dglGetProcAddress('glVertex3hvNV'); + glVertex4hNV := dglGetProcAddress('glVertex4hNV'); + glVertex4hvNV := dglGetProcAddress('glVertex4hvNV'); + glNormal3hNV := dglGetProcAddress('glNormal3hNV'); + glNormal3hvNV := dglGetProcAddress('glNormal3hvNV'); + glColor3hNV := dglGetProcAddress('glColor3hNV'); + glColor3hvNV := dglGetProcAddress('glColor3hvNV'); + glColor4hNV := dglGetProcAddress('glColor4hNV'); + glColor4hvNV := dglGetProcAddress('glColor4hvNV'); + glTexCoord1hNV := dglGetProcAddress('glTexCoord1hNV'); + glTexCoord1hvNV := dglGetProcAddress('glTexCoord1hvNV'); + glTexCoord2hNV := dglGetProcAddress('glTexCoord2hNV'); + glTexCoord2hvNV := dglGetProcAddress('glTexCoord2hvNV'); + glTexCoord3hNV := dglGetProcAddress('glTexCoord3hNV'); + glTexCoord3hvNV := dglGetProcAddress('glTexCoord3hvNV'); + glTexCoord4hNV := dglGetProcAddress('glTexCoord4hNV'); + glTexCoord4hvNV := dglGetProcAddress('glTexCoord4hvNV'); + glMultiTexCoord1hNV := dglGetProcAddress('glMultiTexCoord1hNV'); + glMultiTexCoord1hvNV := dglGetProcAddress('glMultiTexCoord1hvNV'); + glMultiTexCoord2hNV := dglGetProcAddress('glMultiTexCoord2hNV'); + glMultiTexCoord2hvNV := dglGetProcAddress('glMultiTexCoord2hvNV'); + glMultiTexCoord3hNV := dglGetProcAddress('glMultiTexCoord3hNV'); + glMultiTexCoord3hvNV := dglGetProcAddress('glMultiTexCoord3hvNV'); + glMultiTexCoord4hNV := dglGetProcAddress('glMultiTexCoord4hNV'); + glMultiTexCoord4hvNV := dglGetProcAddress('glMultiTexCoord4hvNV'); + glFogCoordhNV := dglGetProcAddress('glFogCoordhNV'); + glFogCoordhvNV := dglGetProcAddress('glFogCoordhvNV'); + glSecondaryColor3hNV := dglGetProcAddress('glSecondaryColor3hNV'); + glSecondaryColor3hvNV := dglGetProcAddress('glSecondaryColor3hvNV'); + glVertexWeighthNV := dglGetProcAddress('glVertexWeighthNV'); + glVertexWeighthvNV := dglGetProcAddress('glVertexWeighthvNV'); + glVertexAttrib1hNV := dglGetProcAddress('glVertexAttrib1hNV'); + glVertexAttrib1hvNV := dglGetProcAddress('glVertexAttrib1hvNV'); + glVertexAttrib2hNV := dglGetProcAddress('glVertexAttrib2hNV'); + glVertexAttrib2hvNV := dglGetProcAddress('glVertexAttrib2hvNV'); + glVertexAttrib3hNV := dglGetProcAddress('glVertexAttrib3hNV'); + glVertexAttrib3hvNV := dglGetProcAddress('glVertexAttrib3hvNV'); + glVertexAttrib4hNV := dglGetProcAddress('glVertexAttrib4hNV'); + glVertexAttrib4hvNV := dglGetProcAddress('glVertexAttrib4hvNV'); + glVertexAttribs1hvNV := dglGetProcAddress('glVertexAttribs1hvNV'); + glVertexAttribs2hvNV := dglGetProcAddress('glVertexAttribs2hvNV'); + glVertexAttribs3hvNV := dglGetProcAddress('glVertexAttribs3hvNV'); + glVertexAttribs4hvNV := dglGetProcAddress('glVertexAttribs4hvNV'); +end; + +procedure Read_GL_NV_occlusion_query; +begin + glGenOcclusionQueriesNV := dglGetProcAddress('glGenOcclusionQueriesNV'); + glDeleteOcclusionQueriesNV := dglGetProcAddress('glDeleteOcclusionQueriesNV'); + glIsOcclusionQueryNV := dglGetProcAddress('glIsOcclusionQueryNV'); + glBeginOcclusionQueryNV := dglGetProcAddress('glBeginOcclusionQueryNV'); + glEndOcclusionQueryNV := dglGetProcAddress('glEndOcclusionQueryNV'); + glGetOcclusionQueryivNV := dglGetProcAddress('glGetOcclusionQueryivNV'); + glGetOcclusionQueryuivNV := dglGetProcAddress('glGetOcclusionQueryuivNV'); +end; + +procedure Read_GL_NV_pixel_data_range; +begin + glPixelDataRangeNV := dglGetProcAddress('glPixelDataRangeNV'); + glFlushPixelDataRangeNV := dglGetProcAddress('glFlushPixelDataRangeNV'); +end; + +procedure Read_GL_NV_point_sprite; +begin + glPointParameteriNV := dglGetProcAddress('glPointParameteriNV'); + glPointParameterivNV := dglGetProcAddress('glPointParameterivNV'); +end; + +procedure Read_GL_NV_primitive_restart; +begin + glPrimitiveRestartNV := dglGetProcAddress('glPrimitiveRestartNV'); + glPrimitiveRestartIndexNV := dglGetProcAddress('glPrimitiveRestartIndexNV'); +end; + +procedure Read_GL_NV_register_combiners; +begin + glCombinerParameterfvNV := dglGetProcAddress('glCombinerParameterfvNV'); + glCombinerParameterfNV := dglGetProcAddress('glCombinerParameterfNV'); + glCombinerParameterivNV := dglGetProcAddress('glCombinerParameterivNV'); + glCombinerParameteriNV := dglGetProcAddress('glCombinerParameteriNV'); + glCombinerInputNV := dglGetProcAddress('glCombinerInputNV'); + glCombinerOutputNV := dglGetProcAddress('glCombinerOutputNV'); + glFinalCombinerInputNV := dglGetProcAddress('glFinalCombinerInputNV'); + glGetCombinerInputParameterfvNV := dglGetProcAddress('glGetCombinerInputParameterfvNV'); + glGetCombinerInputParameterivNV := dglGetProcAddress('glGetCombinerInputParameterivNV'); + glGetCombinerOutputParameterfvNV := dglGetProcAddress('glGetCombinerOutputParameterfvNV'); + glGetCombinerOutputParameterivNV := dglGetProcAddress('glGetCombinerOutputParameterivNV'); + glGetFinalCombinerInputParameterfvNV := dglGetProcAddress('glGetFinalCombinerInputParameterfvNV'); + glGetFinalCombinerInputParameterivNV := dglGetProcAddress('glGetFinalCombinerInputParameterivNV'); +end; + +procedure Read_GL_NV_register_combiners2; +begin + glCombinerStageParameterfvNV := dglGetProcAddress('glCombinerStageParameterfvNV'); + glGetCombinerStageParameterfvNV := dglGetProcAddress('glGetCombinerStageParameterfvNV'); +end; + +procedure Read_GL_NV_vertex_array_range; +begin + glFlushVertexArrayRangeNV := dglGetProcAddress('glFlushVertexArrayRangeNV'); + glVertexArrayRangeNV := dglGetProcAddress('glVertexArrayRangeNV'); +end; + +procedure Read_GL_NV_vertex_program; +begin + glAreProgramsResidentNV := dglGetProcAddress('glAreProgramsResidentNV'); + glBindProgramNV := dglGetProcAddress('glBindProgramNV'); + glDeleteProgramsNV := dglGetProcAddress('glDeleteProgramsNV'); + glExecuteProgramNV := dglGetProcAddress('glExecuteProgramNV'); + glGenProgramsNV := dglGetProcAddress('glGenProgramsNV'); + glGetProgramParameterdvNV := dglGetProcAddress('glGetProgramParameterdvNV'); + glGetProgramParameterfvNV := dglGetProcAddress('glGetProgramParameterfvNV'); + glGetProgramivNV := dglGetProcAddress('glGetProgramivNV'); + glGetProgramStringNV := dglGetProcAddress('glGetProgramStringNV'); + glGetTrackMatrixivNV := dglGetProcAddress('glGetTrackMatrixivNV'); + glGetVertexAttribdvNV := dglGetProcAddress('glGetVertexAttribdvNV'); + glGetVertexAttribfvNV := dglGetProcAddress('glGetVertexAttribfvNV'); + glGetVertexAttribivNV := dglGetProcAddress('glGetVertexAttribivNV'); + glGetVertexAttribPointervNV := dglGetProcAddress('glGetVertexAttribPointervNV'); + glIsProgramNV := dglGetProcAddress('glIsProgramNV'); + glLoadProgramNV := dglGetProcAddress('glLoadProgramNV'); + glProgramParameter4dNV := dglGetProcAddress('glProgramParameter4dNV'); + glProgramParameter4dvNV := dglGetProcAddress('glProgramParameter4dvNV'); + glProgramParameter4fNV := dglGetProcAddress('glProgramParameter4fNV'); + glProgramParameter4fvNV := dglGetProcAddress('glProgramParameter4fvNV'); + glProgramParameters4dvNV := dglGetProcAddress('glProgramParameters4dvNV'); + glProgramParameters4fvNV := dglGetProcAddress('glProgramParameters4fvNV'); + glRequestResidentProgramsNV := dglGetProcAddress('glRequestResidentProgramsNV'); + glTrackMatrixNV := dglGetProcAddress('glTrackMatrixNV'); + glVertexAttribPointerNV := dglGetProcAddress('glVertexAttribPointerNV'); + glVertexAttrib1dNV := dglGetProcAddress('glVertexAttrib1dNV'); + glVertexAttrib1dvNV := dglGetProcAddress('glVertexAttrib1dvNV'); + glVertexAttrib1fNV := dglGetProcAddress('glVertexAttrib1fNV'); + glVertexAttrib1fvNV := dglGetProcAddress('glVertexAttrib1fvNV'); + glVertexAttrib1sNV := dglGetProcAddress('glVertexAttrib1sNV'); + glVertexAttrib1svNV := dglGetProcAddress('glVertexAttrib1svNV'); + glVertexAttrib2dNV := dglGetProcAddress('glVertexAttrib2dNV'); + glVertexAttrib2dvNV := dglGetProcAddress('glVertexAttrib2dvNV'); + glVertexAttrib2fNV := dglGetProcAddress('glVertexAttrib2fNV'); + glVertexAttrib2fvNV := dglGetProcAddress('glVertexAttrib2fvNV'); + glVertexAttrib2sNV := dglGetProcAddress('glVertexAttrib2sNV'); + glVertexAttrib2svNV := dglGetProcAddress('glVertexAttrib2svNV'); + glVertexAttrib3dNV := dglGetProcAddress('glVertexAttrib3dNV'); + glVertexAttrib3dvNV := dglGetProcAddress('glVertexAttrib3dvNV'); + glVertexAttrib3fNV := dglGetProcAddress('glVertexAttrib3fNV'); + glVertexAttrib3fvNV := dglGetProcAddress('glVertexAttrib3fvNV'); + glVertexAttrib3sNV := dglGetProcAddress('glVertexAttrib3sNV'); + glVertexAttrib3svNV := dglGetProcAddress('glVertexAttrib3svNV'); + glVertexAttrib4dNV := dglGetProcAddress('glVertexAttrib4dNV'); + glVertexAttrib4dvNV := dglGetProcAddress('glVertexAttrib4dvNV'); + glVertexAttrib4fNV := dglGetProcAddress('glVertexAttrib4fNV'); + glVertexAttrib4fvNV := dglGetProcAddress('glVertexAttrib4fvNV'); + glVertexAttrib4sNV := dglGetProcAddress('glVertexAttrib4sNV'); + glVertexAttrib4svNV := dglGetProcAddress('glVertexAttrib4svNV'); + glVertexAttrib4ubNV := dglGetProcAddress('glVertexAttrib4ubNV'); + glVertexAttrib4ubvNV := dglGetProcAddress('glVertexAttrib4ubvNV'); + glVertexAttribs1dvNV := dglGetProcAddress('glVertexAttribs1dvNV'); + glVertexAttribs1fvNV := dglGetProcAddress('glVertexAttribs1fvNV'); + glVertexAttribs1svNV := dglGetProcAddress('glVertexAttribs1svNV'); + glVertexAttribs2dvNV := dglGetProcAddress('glVertexAttribs2dvNV'); + glVertexAttribs2fvNV := dglGetProcAddress('glVertexAttribs2fvNV'); + glVertexAttribs2svNV := dglGetProcAddress('glVertexAttribs2svNV'); + glVertexAttribs3dvNV := dglGetProcAddress('glVertexAttribs3dvNV'); + glVertexAttribs3fvNV := dglGetProcAddress('glVertexAttribs3fvNV'); + glVertexAttribs3svNV := dglGetProcAddress('glVertexAttribs3svNV'); + glVertexAttribs4dvNV := dglGetProcAddress('glVertexAttribs4dvNV'); + glVertexAttribs4fvNV := dglGetProcAddress('glVertexAttribs4fvNV'); + glVertexAttribs4svNV := dglGetProcAddress('glVertexAttribs4svNV'); + glVertexAttribs4ubvNV := dglGetProcAddress('glVertexAttribs4ubvNV'); +end; + +procedure Read_GL_NV_depth_buffer_float; +begin + glDepthRangedNV := dglGetProcAddress('glDepthRangedNV'); + glClearDepthdNV := dglGetProcAddress('glClearDepthdNV'); + glDepthBoundsdNV := dglGetProcAddress('glDepthBoundsdNV'); +end; + +procedure Read_GL_NV_framebuffer_multisample_coverage; +begin + glRenderbufferStorageMultsampleCoverageNV := dglGetProcAddress('glRenderbufferStorageMultsampleCoverageNV'); +end; + +procedure Read_GL_NV_geometry_program4; +begin + glProgramVertexLimitNV := dglGetProcAddress('glProgramVertexLimitNV'); +end; + +procedure Read_GL_NV_gpu_program4; +begin + glProgramLocalParameterI4iNV := dglGetProcAddress('glProgramLocalParameterI4iNV'); + glProgramLocalParameterI4ivNV := dglGetProcAddress('glProgramLocalParameterI4ivNV'); + glProgramLocalParametersI4ivNV := dglGetProcAddress('glProgramLocalParametersI4ivNV'); + glProgramLocalParameterI4uiNV := dglGetProcAddress('glProgramLocalParameterI4uiNV'); + glProgramLocalParameterI4uivNV := dglGetProcAddress('glProgramLocalParameterI4uivNV'); + glProgramLocalParametersI4uivNV := dglGetProcAddress('glProgramLocalParametersI4uivNV'); + glProgramEnvParameterI4iNV := dglGetProcAddress('glProgramEnvParameterI4iNV'); + glProgramEnvParameterI4ivNV := dglGetProcAddress('glProgramEnvParameterI4ivNV'); + glProgramEnvParametersI4ivNV := dglGetProcAddress('glProgramEnvParametersI4ivNV'); + glProgramEnvParameterI4uiNV := dglGetProcAddress('glProgramEnvParameterI4uiNV'); + glProgramEnvParameterI4uivNV := dglGetProcAddress('glProgramEnvParameterI4uivNV'); + glProgramEnvParametersI4uivNV := dglGetProcAddress('glProgramEnvParametersI4uivNV'); + glGetProgramLocalParameterIivNV := dglGetProcAddress('glGetProgramLocalParameterIivNV'); + glGetProgramLocalParameterIuivNV := dglGetProcAddress('glGetProgramLocalParameterIuivNV'); + glGetProgramEnvParameterIivNV := dglGetProcAddress('glGetProgramEnvParameterIivNV'); + glGetProgramEnvParameterIuivNV := dglGetProcAddress('glGetProgramEnvParameterIuivNV'); +end; + +procedure Read_GL_NV_parameter_buffer_object; +begin + glProgramBufferParametersfvNV := dglGetProcAddress('glProgramBufferParametersfvNV'); + glProgramBufferParametersIivNV := dglGetProcAddress('glProgramBufferParametersIivNV'); + glProgramBufferParametersIuivNV := dglGetProcAddress('glProgramBufferParametersIuivNV'); +end; + +procedure Read_GL_NV_transform_feedback; +begin + glBeginTransformFeedbackNV := dglGetProcAddress('glBeginTransformFeedbackNV'); + glEndTransformFeedbackNV := dglGetProcAddress('glEndTransformFeedbackNV'); + glTransformFeedbackAttribsNV := dglGetProcAddress('glTransformFeedbackAttribsNV'); + glBindBufferRangeNV := dglGetProcAddress('glBindBufferRangeNV'); + glBindBufferOffsetNV := dglGetProcAddress('glBindBufferOffsetNV'); + glBindBufferBaseNV := dglGetProcAddress('glBindBufferBaseNV'); + glTransformFeedbackVaryingsNV := dglGetProcAddress('glTransformFeedbackVaryingsNV'); + glActiveVaryingNV := dglGetProcAddress('glActiveVaryingNV'); + glGetVaryingLocationNV := dglGetProcAddress('glGetVaryingLocationNV'); + glGetActiveVaryingNV := dglGetProcAddress('glGetActiveVaryingNV'); + glGetTransformFeedbackVaryingNV := dglGetProcAddress('glGetTransformFeedbackVaryingNV'); +end; + +procedure Read_GL_NV_conditional_render; +begin + glBeginConditionalRenderNV := dglGetProcAddress('glBeginConditionalRenderNV'); + glEndConditionalRenderNV := dglGetProcAddress('glEndConditionalRenderNV'); +end; + +procedure Read_GL_NV_present_video; +begin + glPresentFrameKeyedNV := dglGetProcAddress('glPresentFrameKeyedNV'); + glPresentFrameDualFillNV := dglGetProcAddress('glPresentFrameDualFillNV'); + glGetVideoivNV := dglGetProcAddress('glGetVideoivNV'); + glGetVideouivNV := dglGetProcAddress('glGetVideouivNV'); + glGetVideoi64vNV := dglGetProcAddress('glGetVideoi64vNV'); + glGetVideoui64vNV := dglGetProcAddress('glGetVideoui64vNV'); +// glVideoParameterivNV := dglGetProcAddress('glVideoParameterivNV'); +end; + +procedure Read_GL_NV_explicit_multisample; +begin + glGetMultisamplefvNV := dglGetProcAddress('glGetMultisamplefvNV'); + glSampleMaskIndexedNV := dglGetProcAddress('glSampleMaskIndexedNV'); + glTexRenderbufferNV := dglGetProcAddress('glTexRenderbufferNV'); +end; + +procedure Read_GL_NV_transform_feedback2; +begin + glBindTransformFeedbackNV := dglGetProcAddress('glBindTransformFeedbackNV'); + glDeleteTransformFeedbacksNV := dglGetProcAddress('glDeleteTransformFeedbacksNV'); + glGenTransformFeedbacksNV := dglGetProcAddress('glGenTransformFeedbacksNV'); + glIsTransformFeedbackNV := dglGetProcAddress('glIsTransformFeedbackNV'); + glPauseTransformFeedbackNV := dglGetProcAddress('glPauseTransformFeedbackNV'); + glResumeTransformFeedbackNV := dglGetProcAddress('glResumeTransformFeedbackNV'); + glDrawTransformFeedbackNV := dglGetProcAddress('glDrawTransformFeedbackNV'); +end; + +procedure Read_GL_PGI_misc_hints; +begin + glHintPGI := dglGetProcAddress('glHintPGI'); +end; + +procedure Read_GL_SGIS_detail_texture; +begin + glDetailTexFuncSGIS := dglGetProcAddress('glDetailTexFuncSGIS'); + glGetDetailTexFuncSGIS := dglGetProcAddress('glGetDetailTexFuncSGIS'); +end; + +procedure Read_GL_SGIS_fog_function; +begin + glFogFuncSGIS := dglGetProcAddress('glFogFuncSGIS'); + glGetFogFuncSGIS := dglGetProcAddress('glGetFogFuncSGIS'); +end; + +procedure Read_GL_SGIS_multisample; +begin + glSampleMaskSGIS := dglGetProcAddress('glSampleMaskSGIS'); + glSamplePatternSGIS := dglGetProcAddress('glSamplePatternSGIS'); +end; + +procedure Read_GL_SGIS_pixel_texture; +begin + glPixelTexGenParameteriSGIS := dglGetProcAddress('glPixelTexGenParameteriSGIS'); + glPixelTexGenParameterivSGIS := dglGetProcAddress('glPixelTexGenParameterivSGIS'); + glPixelTexGenParameterfSGIS := dglGetProcAddress('glPixelTexGenParameterfSGIS'); + glPixelTexGenParameterfvSGIS := dglGetProcAddress('glPixelTexGenParameterfvSGIS'); + glGetPixelTexGenParameterivSGIS := dglGetProcAddress('glGetPixelTexGenParameterivSGIS'); + glGetPixelTexGenParameterfvSGIS := dglGetProcAddress('glGetPixelTexGenParameterfvSGIS'); +end; + +procedure Read_GL_SGIS_point_parameters; +begin + glPointParameterfSGIS := dglGetProcAddress('glPointParameterfSGIS'); + glPointParameterfvSGIS := dglGetProcAddress('glPointParameterfvSGIS'); +end; + +procedure Read_GL_SGIS_sharpen_texture; +begin + glSharpenTexFuncSGIS := dglGetProcAddress('glSharpenTexFuncSGIS'); + glGetSharpenTexFuncSGIS := dglGetProcAddress('glGetSharpenTexFuncSGIS'); +end; + +procedure Read_GL_SGIS_texture4D; +begin + glTexImage4DSGIS := dglGetProcAddress('glTexImage4DSGIS'); + glTexSubImage4DSGIS := dglGetProcAddress('glTexSubImage4DSGIS'); +end; + +procedure Read_GL_SGIS_texture_color_mask; +begin + glTextureColorMaskSGIS := dglGetProcAddress('glTextureColorMaskSGIS'); +end; + +procedure Read_GL_SGIS_texture_filter4; +begin + glGetTexFilterFuncSGIS := dglGetProcAddress('glGetTexFilterFuncSGIS'); + glTexFilterFuncSGIS := dglGetProcAddress('glTexFilterFuncSGIS'); +end; + +procedure Read_GL_SGIX_async; +begin + glAsyncMarkerSGIX := dglGetProcAddress('glAsyncMarkerSGIX'); + glFinishAsyncSGIX := dglGetProcAddress('glFinishAsyncSGIX'); + glPollAsyncSGIX := dglGetProcAddress('glPollAsyncSGIX'); + glGenAsyncMarkersSGIX := dglGetProcAddress('glGenAsyncMarkersSGIX'); + glDeleteAsyncMarkersSGIX := dglGetProcAddress('glDeleteAsyncMarkersSGIX'); + glIsAsyncMarkerSGIX := dglGetProcAddress('glIsAsyncMarkerSGIX'); +end; + +procedure Read_GL_SGIX_flush_raster; +begin + glFlushRasterSGIX := dglGetProcAddress('glFlushRasterSGIX'); +end; + +procedure Read_GL_SGIX_fragment_lighting; +begin + glFragmentColorMaterialSGIX := dglGetProcAddress('glFragmentColorMaterialSGIX'); + glFragmentLightfSGIX := dglGetProcAddress('glFragmentLightfSGIX'); + glFragmentLightfvSGIX := dglGetProcAddress('glFragmentLightfvSGIX'); + glFragmentLightiSGIX := dglGetProcAddress('glFragmentLightiSGIX'); + glFragmentLightivSGIX := dglGetProcAddress('glFragmentLightivSGIX'); + glFragmentLightModelfSGIX := dglGetProcAddress('glFragmentLightModelfSGIX'); + glFragmentLightModelfvSGIX := dglGetProcAddress('glFragmentLightModelfvSGIX'); + glFragmentLightModeliSGIX := dglGetProcAddress('glFragmentLightModeliSGIX'); + glFragmentLightModelivSGIX := dglGetProcAddress('glFragmentLightModelivSGIX'); + glFragmentMaterialfSGIX := dglGetProcAddress('glFragmentMaterialfSGIX'); + glFragmentMaterialfvSGIX := dglGetProcAddress('glFragmentMaterialfvSGIX'); + glFragmentMaterialiSGIX := dglGetProcAddress('glFragmentMaterialiSGIX'); + glFragmentMaterialivSGIX := dglGetProcAddress('glFragmentMaterialivSGIX'); + glGetFragmentLightfvSGIX := dglGetProcAddress('glGetFragmentLightfvSGIX'); + glGetFragmentLightivSGIX := dglGetProcAddress('glGetFragmentLightivSGIX'); + glGetFragmentMaterialfvSGIX := dglGetProcAddress('glGetFragmentMaterialfvSGIX'); + glGetFragmentMaterialivSGIX := dglGetProcAddress('glGetFragmentMaterialivSGIX'); + glLightEnviSGIX := dglGetProcAddress('glLightEnviSGIX'); +end; + +procedure Read_GL_SGIX_framezoom; +begin + glFrameZoomSGIX := dglGetProcAddress('glFrameZoomSGIX'); +end; + +procedure Read_GL_SGIX_igloo_interface; +begin + glIglooInterfaceSGIX := dglGetProcAddress('glIglooInterfaceSGIX'); +end; + +procedure Read_GL_SGIX_instruments; +begin + glGetInstrumentsSGIX := dglGetProcAddress('glGetInstrumentsSGIX'); + glInstrumentsBufferSGIX := dglGetProcAddress('glInstrumentsBufferSGIX'); + glPollInstrumentsSGIX := dglGetProcAddress('glPollInstrumentsSGIX'); + glReadInstrumentsSGIX := dglGetProcAddress('glReadInstrumentsSGIX'); + glStartInstrumentsSGIX := dglGetProcAddress('glStartInstrumentsSGIX'); + glStopInstrumentsSGIX := dglGetProcAddress('glStopInstrumentsSGIX'); +end; + +procedure Read_GL_SGIX_list_priority; +begin + glGetListParameterfvSGIX := dglGetProcAddress('glGetListParameterfvSGIX'); + glGetListParameterivSGIX := dglGetProcAddress('glGetListParameterivSGIX'); + glListParameterfSGIX := dglGetProcAddress('glListParameterfSGIX'); + glListParameterfvSGIX := dglGetProcAddress('glListParameterfvSGIX'); + glListParameteriSGIX := dglGetProcAddress('glListParameteriSGIX'); + glListParameterivSGIX := dglGetProcAddress('glListParameterivSGIX'); +end; + +procedure Read_GL_SGIX_pixel_texture; +begin + glPixelTexGenSGIX := dglGetProcAddress('glPixelTexGenSGIX'); +end; + +procedure Read_GL_SGIX_polynomial_ffd; +begin + glDeformationMap3dSGIX := dglGetProcAddress('glDeformationMap3dSGIX'); + glDeformationMap3fSGIX := dglGetProcAddress('glDeformationMap3fSGIX'); + glDeformSGIX := dglGetProcAddress('glDeformSGIX'); + glLoadIdentityDeformationMapSGIX := dglGetProcAddress('glLoadIdentityDeformationMapSGIX'); +end; + +procedure Read_GL_SGIX_reference_plane; +begin + glReferencePlaneSGIX := dglGetProcAddress('glReferencePlaneSGIX'); +end; + +procedure Read_GL_SGIX_sprite; +begin + glSpriteParameterfSGIX := dglGetProcAddress('glSpriteParameterfSGIX'); + glSpriteParameterfvSGIX := dglGetProcAddress('glSpriteParameterfvSGIX'); + glSpriteParameteriSGIX := dglGetProcAddress('glSpriteParameteriSGIX'); + glSpriteParameterivSGIX := dglGetProcAddress('glSpriteParameterivSGIX'); +end; + +procedure Read_GL_SGIX_tag_sample_buffer; +begin + glTagSampleBufferSGIX := dglGetProcAddress('glTagSampleBufferSGIX'); +end; + +procedure Read_GL_SGI_color_table; +begin + glColorTableSGI := dglGetProcAddress('glColorTableSGI'); + glColorTableParameterfvSGI := dglGetProcAddress('glColorTableParameterfvSGI'); + glColorTableParameterivSGI := dglGetProcAddress('glColorTableParameterivSGI'); + glCopyColorTableSGI := dglGetProcAddress('glCopyColorTableSGI'); + glGetColorTableSGI := dglGetProcAddress('glGetColorTableSGI'); + glGetColorTableParameterfvSGI := dglGetProcAddress('glGetColorTableParameterfvSGI'); + glGetColorTableParameterivSGI := dglGetProcAddress('glGetColorTableParameterivSGI'); +end; + +procedure Read_GL_SUNX_constant_data; +begin + glFinishTextureSUNX := dglGetProcAddress('glFinishTextureSUNX'); +end; + +procedure Read_GL_SUN_global_alpha; +begin + glGlobalAlphaFactorbSUN := dglGetProcAddress('glGlobalAlphaFactorbSUN'); + glGlobalAlphaFactorsSUN := dglGetProcAddress('glGlobalAlphaFactorsSUN'); + glGlobalAlphaFactoriSUN := dglGetProcAddress('glGlobalAlphaFactoriSUN'); + glGlobalAlphaFactorfSUN := dglGetProcAddress('glGlobalAlphaFactorfSUN'); + glGlobalAlphaFactordSUN := dglGetProcAddress('glGlobalAlphaFactordSUN'); + glGlobalAlphaFactorubSUN := dglGetProcAddress('glGlobalAlphaFactorubSUN'); + glGlobalAlphaFactorusSUN := dglGetProcAddress('glGlobalAlphaFactorusSUN'); + glGlobalAlphaFactoruiSUN := dglGetProcAddress('glGlobalAlphaFactoruiSUN'); +end; + +procedure Read_GL_SUN_mesh_array; +begin + glDrawMeshArraysSUN := dglGetProcAddress('glDrawMeshArraysSUN'); +end; + +procedure Read_GL_SUN_triangle_list; +begin + glReplacementCodeuiSUN := dglGetProcAddress('glReplacementCodeuiSUN'); + glReplacementCodeusSUN := dglGetProcAddress('glReplacementCodeusSUN'); + glReplacementCodeubSUN := dglGetProcAddress('glReplacementCodeubSUN'); + glReplacementCodeuivSUN := dglGetProcAddress('glReplacementCodeuivSUN'); + glReplacementCodeusvSUN := dglGetProcAddress('glReplacementCodeusvSUN'); + glReplacementCodeubvSUN := dglGetProcAddress('glReplacementCodeubvSUN'); + glReplacementCodePointerSUN := dglGetProcAddress('glReplacementCodePointerSUN'); +end; + +procedure Read_GL_SUN_vertex; +begin + glColor4ubVertex2fSUN := dglGetProcAddress('glColor4ubVertex2fSUN'); + glColor4ubVertex2fvSUN := dglGetProcAddress('glColor4ubVertex2fvSUN'); + glColor4ubVertex3fSUN := dglGetProcAddress('glColor4ubVertex3fSUN'); + glColor4ubVertex3fvSUN := dglGetProcAddress('glColor4ubVertex3fvSUN'); + glColor3fVertex3fSUN := dglGetProcAddress('glColor3fVertex3fSUN'); + glColor3fVertex3fvSUN := dglGetProcAddress('glColor3fVertex3fvSUN'); + glNormal3fVertex3fSUN := dglGetProcAddress('glNormal3fVertex3fSUN'); + glNormal3fVertex3fvSUN := dglGetProcAddress('glNormal3fVertex3fvSUN'); + glColor4fNormal3fVertex3fSUN := dglGetProcAddress('glColor4fNormal3fVertex3fSUN'); + glColor4fNormal3fVertex3fvSUN := dglGetProcAddress('glColor4fNormal3fVertex3fvSUN'); + glTexCoord2fVertex3fSUN := dglGetProcAddress('glTexCoord2fVertex3fSUN'); + glTexCoord2fVertex3fvSUN := dglGetProcAddress('glTexCoord2fVertex3fvSUN'); + glTexCoord4fVertex4fSUN := dglGetProcAddress('glTexCoord4fVertex4fSUN'); + glTexCoord4fVertex4fvSUN := dglGetProcAddress('glTexCoord4fVertex4fvSUN'); + glTexCoord2fColor4ubVertex3fSUN := dglGetProcAddress('glTexCoord2fColor4ubVertex3fSUN'); + glTexCoord2fColor4ubVertex3fvSUN := dglGetProcAddress('glTexCoord2fColor4ubVertex3fvSUN'); + glTexCoord2fColor3fVertex3fSUN := dglGetProcAddress('glTexCoord2fColor3fVertex3fSUN'); + glTexCoord2fColor3fVertex3fvSUN := dglGetProcAddress('glTexCoord2fColor3fVertex3fvSUN'); + glTexCoord2fNormal3fVertex3fSUN := dglGetProcAddress('glTexCoord2fNormal3fVertex3fSUN'); + glTexCoord2fNormal3fVertex3fvSUN := dglGetProcAddress('glTexCoord2fNormal3fVertex3fvSUN'); + glTexCoord2fColor4fNormal3fVertex3fSUN := dglGetProcAddress('glTexCoord2fColor4fNormal3fVertex3fSUN'); + glTexCoord2fColor4fNormal3fVertex3fvSUN := dglGetProcAddress('glTexCoord2fColor4fNormal3fVertex3fvSUN'); + glTexCoord4fColor4fNormal3fVertex4fSUN := dglGetProcAddress('glTexCoord4fColor4fNormal3fVertex4fSUN'); + glTexCoord4fColor4fNormal3fVertex4fvSUN := dglGetProcAddress('glTexCoord4fColor4fNormal3fVertex4fvSUN'); + glReplacementCodeuiVertex3fSUN := dglGetProcAddress('glReplacementCodeuiVertex3fSUN'); + glReplacementCodeuiVertex3fvSUN := dglGetProcAddress('glReplacementCodeuiVertex3fvSUN'); + glReplacementCodeuiColor4ubVertex3fSUN := dglGetProcAddress('glReplacementCodeuiColor4ubVertex3fSUN'); + glReplacementCodeuiColor4ubVertex3fvSUN := dglGetProcAddress('glReplacementCodeuiColor4ubVertex3fvSUN'); + glReplacementCodeuiColor3fVertex3fSUN := dglGetProcAddress('glReplacementCodeuiColor3fVertex3fSUN'); + glReplacementCodeuiColor3fVertex3fvSUN := dglGetProcAddress('glReplacementCodeuiColor3fVertex3fvSUN'); + glReplacementCodeuiNormal3fVertex3fSUN := dglGetProcAddress('glReplacementCodeuiNormal3fVertex3fSUN'); + glReplacementCodeuiNormal3fVertex3fvSUN := dglGetProcAddress('glReplacementCodeuiNormal3fVertex3fvSUN'); + glReplacementCodeuiColor4fNormal3fVertex3fSUN := dglGetProcAddress('glReplacementCodeuiColor4fNormal3fVertex3fSUN'); + glReplacementCodeuiColor4fNormal3fVertex3fvSUN := dglGetProcAddress('glReplacementCodeuiColor4fNormal3fVertex3fvSUN'); + glReplacementCodeuiTexCoord2fVertex3fSUN := dglGetProcAddress('glReplacementCodeuiTexCoord2fVertex3fSUN'); + glReplacementCodeuiTexCoord2fVertex3fvSUN := dglGetProcAddress('glReplacementCodeuiTexCoord2fVertex3fvSUN'); + glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN := dglGetProcAddress('glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN'); + glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN := dglGetProcAddress('glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN'); + glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN := dglGetProcAddress('glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN'); + glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN := dglGetProcAddress('glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN'); +end; + +{$IFDEF DGL_WIN} +procedure Read_WGL_ARB_buffer_region; +begin + wglCreateBufferRegionARB := dglGetProcAddress('wglCreateBufferRegionARB'); + wglDeleteBufferRegionARB := dglGetProcAddress('wglDeleteBufferRegionARB'); + wglSaveBufferRegionARB := dglGetProcAddress('wglSaveBufferRegionARB'); + wglRestoreBufferRegionARB := dglGetProcAddress('wglRestoreBufferRegionARB'); +end; + +procedure Read_WGL_ARB_extensions_string; +begin + wglGetExtensionsStringARB := dglGetProcAddress('wglGetExtensionsStringARB'); +end; + +procedure Read_WGL_ARB_make_current_read; +begin + wglMakeContextCurrentARB := dglGetProcAddress('wglMakeContextCurrentARB'); + wglGetCurrentReadDCARB := dglGetProcAddress('wglGetCurrentReadDCARB'); +end; + +procedure Read_WGL_ARB_pbuffer; +begin + wglCreatePbufferARB := dglGetProcAddress('wglCreatePbufferARB'); + wglGetPbufferDCARB := dglGetProcAddress('wglGetPbufferDCARB'); + wglReleasePbufferDCARB := dglGetProcAddress('wglReleasePbufferDCARB'); + wglDestroyPbufferARB := dglGetProcAddress('wglDestroyPbufferARB'); + wglQueryPbufferARB := dglGetProcAddress('wglQueryPbufferARB'); +end; + +procedure Read_WGL_ARB_pixel_format; +begin + wglGetPixelFormatAttribivARB := dglGetProcAddress('wglGetPixelFormatAttribivARB'); + wglGetPixelFormatAttribfvARB := dglGetProcAddress('wglGetPixelFormatAttribfvARB'); + wglChoosePixelFormatARB := dglGetProcAddress('wglChoosePixelFormatARB'); +end; + +procedure Read_WGL_ARB_pixel_format_float; +begin + wglClampColorARB := dglGetProcAddress('wglClampColorARB'); +end; + +procedure Read_WGL_ARB_render_texture; +begin + wglBindTexImageARB := dglGetProcAddress('wglBindTexImageARB'); + wglReleaseTexImageARB := dglGetProcAddress('wglReleaseTexImageARB'); + wglSetPbufferAttribARB := dglGetProcAddress('wglSetPbufferAttribARB'); +end; + +procedure Read_WGL_ARB_create_context; +begin + wglCreateContextAttribsARB := dglGetProcAddress('wglCreateContextAttribsARB'); +end; + +procedure Read_WGL_AMD_gpu_association; +begin + wglGetGPUIDsAMD := dglGetProcAddress('wglGetGPUIDsAMD'); + wglGetGPUInfoAMD := dglGetProcAddress('wglGetGPUInfoAMD'); + wglGetContextGPUIDAMD := dglGetProcAddress('wglGetContextGPUIDAMD'); + wglCreateAssociatedContextAMD := dglGetProcAddress('wglCreateAssociatedContextAMD'); + wglCreateAssociatedContextAttribsAMD := dglGetProcAddress('wglCreateAssociatedContextAttribsAMD'); + wglDeleteAssociatedContextAMD := dglGetProcAddress('wglDeleteAssociatedContextAMD'); + wglMakeAssociatedContextCurrentAMD := dglGetProcAddress('wglMakeAssociatedContextCurrentAMD'); + wglGetCurrentAssociatedContextAMD := dglGetProcAddress('wglGetCurrentAssociatedContextAMD'); + wglBlitContextFramebufferAMD := dglGetProcAddress('wglBlitContextFramebufferAMD'); +end; + +procedure Read_WGL_EXT_display_color_table; +begin + wglCreateDisplayColorTableEXT := dglGetProcAddress('wglCreateDisplayColorTableEXT'); + wglLoadDisplayColorTableEXT := dglGetProcAddress('wglLoadDisplayColorTableEXT'); + wglBindDisplayColorTableEXT := dglGetProcAddress('wglBindDisplayColorTableEXT'); + wglDestroyDisplayColorTableEXT := dglGetProcAddress('wglDestroyDisplayColorTableEXT'); +end; + +procedure Read_WGL_EXT_extensions_string; +begin + wglGetExtensionsStringEXT := dglGetProcAddress('wglGetExtensionsStringEXT'); +end; + +procedure Read_WGL_EXT_make_current_read; +begin + wglMakeContextCurrentEXT := dglGetProcAddress('wglMakeContextCurrentEXT'); + wglGetCurrentReadDCEXT := dglGetProcAddress('wglGetCurrentReadDCEXT'); +end; + +procedure Read_WGL_EXT_pbuffer; +begin + wglCreatePbufferEXT := dglGetProcAddress('wglCreatePbufferEXT'); + wglGetPbufferDCEXT := dglGetProcAddress('wglGetPbufferDCEXT'); + wglReleasePbufferDCEXT := dglGetProcAddress('wglReleasePbufferDCEXT'); + wglDestroyPbufferEXT := dglGetProcAddress('wglDestroyPbufferEXT'); + wglQueryPbufferEXT := dglGetProcAddress('wglQueryPbufferEXT'); +end; + +procedure Read_WGL_EXT_pixel_format; +begin + wglGetPixelFormatAttribivEXT := dglGetProcAddress('wglGetPixelFormatAttribivEXT'); + wglGetPixelFormatAttribfvEXT := dglGetProcAddress('wglGetPixelFormatAttribfvEXT'); + wglChoosePixelFormatEXT := dglGetProcAddress('wglChoosePixelFormatEXT'); +end; + +procedure Read_WGL_EXT_swap_control; +begin + wglSwapIntervalEXT := dglGetProcAddress('wglSwapIntervalEXT'); + wglGetSwapIntervalEXT := dglGetProcAddress('wglGetSwapIntervalEXT'); +end; + +procedure Read_WGL_I3D_digital_video_control; +begin + wglGetDigitalVideoParametersI3D := dglGetProcAddress('wglGetDigitalVideoParametersI3D'); + wglSetDigitalVideoParametersI3D := dglGetProcAddress('wglSetDigitalVideoParametersI3D'); +end; + +procedure Read_WGL_I3D_gamma; +begin + wglGetGammaTableParametersI3D := dglGetProcAddress('wglGetGammaTableParametersI3D'); + wglSetGammaTableParametersI3D := dglGetProcAddress('wglSetGammaTableParametersI3D'); + wglGetGammaTableI3D := dglGetProcAddress('wglGetGammaTableI3D'); + wglSetGammaTableI3D := dglGetProcAddress('wglSetGammaTableI3D'); +end; + +procedure Read_WGL_I3D_genlock; +begin + wglEnableGenlockI3D := dglGetProcAddress('wglEnableGenlockI3D'); + wglDisableGenlockI3D := dglGetProcAddress('wglDisableGenlockI3D'); + wglIsEnabledGenlockI3D := dglGetProcAddress('wglIsEnabledGenlockI3D'); + wglGenlockSourceI3D := dglGetProcAddress('wglGenlockSourceI3D'); + wglGetGenlockSourceI3D := dglGetProcAddress('wglGetGenlockSourceI3D'); + wglGenlockSourceEdgeI3D := dglGetProcAddress('wglGenlockSourceEdgeI3D'); + wglGetGenlockSourceEdgeI3D := dglGetProcAddress('wglGetGenlockSourceEdgeI3D'); + wglGenlockSampleRateI3D := dglGetProcAddress('wglGenlockSampleRateI3D'); + wglGetGenlockSampleRateI3D := dglGetProcAddress('wglGetGenlockSampleRateI3D'); + wglGenlockSourceDelayI3D := dglGetProcAddress('wglGenlockSourceDelayI3D'); + wglGetGenlockSourceDelayI3D := dglGetProcAddress('wglGetGenlockSourceDelayI3D'); + wglQueryGenlockMaxSourceDelayI3D := dglGetProcAddress('wglQueryGenlockMaxSourceDelayI3D'); +end; + +procedure Read_WGL_I3D_image_buffer; +begin + wglCreateImageBufferI3D := dglGetProcAddress('wglCreateImageBufferI3D'); + wglDestroyImageBufferI3D := dglGetProcAddress('wglDestroyImageBufferI3D'); + wglAssociateImageBufferEventsI3D := dglGetProcAddress('wglAssociateImageBufferEventsI3D'); + wglReleaseImageBufferEventsI3D := dglGetProcAddress('wglReleaseImageBufferEventsI3D'); +end; + +procedure Read_WGL_I3D_swap_frame_lock; +begin + wglEnableFrameLockI3D := dglGetProcAddress('wglEnableFrameLockI3D'); + wglDisableFrameLockI3D := dglGetProcAddress('wglDisableFrameLockI3D'); + wglIsEnabledFrameLockI3D := dglGetProcAddress('wglIsEnabledFrameLockI3D'); + wglQueryFrameLockMasterI3D := dglGetProcAddress('wglQueryFrameLockMasterI3D'); +end; + +procedure Read_WGL_I3D_swap_frame_usage; +begin + wglGetFrameUsageI3D := dglGetProcAddress('wglGetFrameUsageI3D'); + wglBeginFrameTrackingI3D := dglGetProcAddress('wglBeginFrameTrackingI3D'); + wglEndFrameTrackingI3D := dglGetProcAddress('wglEndFrameTrackingI3D'); + wglQueryFrameTrackingI3D := dglGetProcAddress('wglQueryFrameTrackingI3D'); +end; + +procedure Read_WGL_NV_vertex_array_range; +begin + wglAllocateMemoryNV := dglGetProcAddress('wglAllocateMemoryNV'); + wglFreeMemoryNV := dglGetProcAddress('wglFreeMemoryNV'); +end; + +procedure Read_WGL_NV_present_video; +begin + wglEnumerateVideoDevicesNV := dglGetProcAddress('wglEnumerateVideoDevicesNV'); + wglBindVideoDeviceNV := dglGetProcAddress('wglBindVideoDeviceNV'); + wglQueryCurrentContextNV := dglGetProcAddress('wglQueryCurrentContextNV'); +end; + +procedure Read_WGL_NV_video_out; +begin + wglGetVideoDeviceNV := dglGetProcAddress('wglGetVideoDeviceNV'); + wglReleaseVideoDeviceNV := dglGetProcAddress('wglReleaseVideoDeviceNV'); + wglBindVideoImageNV := dglGetProcAddress('wglBindVideoImageNV'); + wglReleaseVideoImageNV := dglGetProcAddress('wglReleaseVideoImageNV'); + wglSendPbufferToVideoNV := dglGetProcAddress('wglSendPbufferToVideoNV'); + wglGetVideoInfoNV := dglGetProcAddress('wglGetVideoInfoNV'); +end; + +procedure Read_WGL_NV_swap_group; +begin + wglJoinSwapGroupNV := dglGetProcAddress('wglJoinSwapGroupNV'); + wglBindSwapBarrierNV := dglGetProcAddress('wglBindSwapBarrierNV'); + wglQuerySwapGroupNV := dglGetProcAddress('wglQuerySwapGroupNV'); + wglQueryMaxSwapGroupsNV := dglGetProcAddress('wglQueryMaxSwapGroupsNV'); + wglQueryFrameCountNV := dglGetProcAddress('wglQueryFrameCountNV'); + wglResetFrameCountNV := dglGetProcAddress('wglResetFrameCountNV'); +end; + +procedure Read_WGL_NV_gpu_affinity; +begin + wglEnumGpusNV := dglGetProcAddress('wglEnumGpusNV'); + wglEnumGpuDevicesNV := dglGetProcAddress('wglEnumGpuDevicesNV'); + wglCreateAffinityDCNV := dglGetProcAddress('wglCreateAffinityDCNV'); + wglEnumGpusFromAffinityDCNV := dglGetProcAddress('wglEnumGpusFromAffinityDCNV'); + wglDeleteDCNV := dglGetProcAddress('wglDeleteDCNV'); +end; + +procedure Read_WGL_OML_sync_control; +begin + wglGetSyncValuesOML := dglGetProcAddress('wglGetSyncValuesOML'); + wglGetMscRateOML := dglGetProcAddress('wglGetMscRateOML'); + wglSwapBuffersMscOML := dglGetProcAddress('wglSwapBuffersMscOML'); + wglSwapLayerBuffersMscOML := dglGetProcAddress('wglSwapLayerBuffersMscOML'); + wglWaitForMscOML := dglGetProcAddress('wglWaitForMscOML'); + wglWaitForSbcOML := dglGetProcAddress('wglWaitForSbcOML'); +end; + +procedure Read_WGL_3DL_stereo_control; +begin + wglSetStereoEmitterState3DL := dglGetProcAddress('wglSetStereoEmitterState3DL'); +end; + +procedure Read_WIN_draw_range_elements; +begin + glDrawRangeElementsWIN := dglGetProcAddress('glDrawRangeElementsWIN'); +end; + +procedure Read_WIN_swap_hint; +begin + glAddSwapHintRectWIN := dglGetProcAddress('glAddSwapHintRectWIN'); +end; +{$ENDIF} + + +procedure ReadExtensions; +begin + ReadOpenGLCore; + + Read_GL_3DFX_tbuffer; + Read_GL_APPLE_element_array; + Read_GL_APPLE_fence; + Read_GL_APPLE_vertex_array_object; + Read_GL_APPLE_vertex_array_range; + Read_GL_APPLE_texture_range; + Read_GL_APPLE_vertex_program_evaluators; + Read_GL_APPLE_object_purgeable; + Read_GL_ARB_matrix_palette; + Read_GL_ARB_multitexture; + Read_GL_ARB_point_parameters; + Read_GL_ARB_texture_compression; + Read_GL_ARB_transpose_matrix; + Read_GL_ARB_vertex_blend; + Read_GL_ARB_vertex_buffer_object; + Read_GL_ARB_vertex_program; + Read_GL_ARB_window_pos; + Read_GL_ARB_color_buffer_float; + Read_GL_ARB_Shader_Objects; + Read_GL_ARB_occlusion_query; + Read_GL_ARB_draw_instanced; + Read_GL_ARB_framebuffer_object; + Read_GL_ARB_geometry_shader4; + Read_GL_ARB_instanced_arrays; + Read_GL_ARB_map_buffer_range; + Read_GL_ARB_texture_buffer_object; + Read_GL_ARB_vertex_array_object; + Read_GL_ARB_uniform_buffer_object; + Read_GL_ARB_copy_buffer; + Read_GL_ARB_draw_elements_base_vertex; + Read_GL_ARB_provoking_vertex; + Read_GL_ARB_sync; + Read_GL_ARB_texture_multisample; + Read_GL_ARB_draw_buffers_blend; + Read_GL_ARB_sample_shading; + Read_GL_ATI_draw_buffers; + Read_GL_ATI_element_array; + Read_GL_ATI_envmap_bumpmap; + Read_GL_ATI_fragment_shader; + Read_GL_ATI_map_object_buffer; + Read_GL_ATI_pn_triangles; + Read_GL_ATI_separate_stencil; + Read_GL_ATI_vertex_array_object; + Read_GL_ATI_vertex_attrib_array_object; + Read_GL_ATI_vertex_streams; + Read_GL_AMD_performance_monitor; + Read_GL_EXT_blend_color; + Read_GL_EXT_blend_func_separate; + Read_GL_EXT_blend_minmax; + Read_GL_EXT_color_subtable; + Read_GL_EXT_compiled_vertex_array; + Read_GL_EXT_convolution; + Read_GL_EXT_coordinate_frame; + Read_GL_EXT_copy_texture; + Read_GL_EXT_cull_vertex; + Read_GL_EXT_draw_range_elements; + Read_GL_EXT_fog_coord; + Read_GL_EXT_framebuffer_object; + Read_GL_EXT_histogram; + Read_GL_EXT_index_func; + Read_GL_EXT_index_material; + Read_GL_EXT_multi_draw_arrays; + Read_GL_EXT_multisample; + Read_GL_EXT_paletted_texture; + Read_GL_EXT_pixel_transform; + Read_GL_EXT_point_parameters; + Read_GL_EXT_polygon_offset; + Read_GL_EXT_secondary_color; + Read_GL_EXT_stencil_two_side; + Read_GL_EXT_subtexture; + Read_GL_EXT_texture3D; + Read_GL_EXT_texture_object; + Read_GL_EXT_texture_perturb_normal; + Read_GL_EXT_vertex_array; + Read_GL_EXT_vertex_shader; + Read_GL_EXT_vertex_weighting; + Read_GL_EXT_depth_bounds_test; + Read_GL_EXT_blend_equation_separate; + Read_GL_EXT_stencil_clear_tag; + Read_GL_EXT_framebuffer_blit; + Read_GL_EXT_framebuffer_multisample; + Read_GL_EXT_timer_query; + Read_GL_EXT_gpu_program_parameters; + Read_GL_EXT_bindable_uniform; + Read_GL_EXT_draw_buffers2; + Read_GL_EXT_draw_instanced; + Read_GL_EXT_geometry_shader4; + Read_GL_EXT_gpu_shader4; + Read_GL_EXT_texture_array; + Read_GL_EXT_texture_buffer_object; + Read_GL_EXT_texture_integer; + Read_GL_EXT_transform_feedback; + Read_GL_EXT_direct_state_access; + Read_GL_HP_image_transform; + Read_GL_IBM_multimode_draw_arrays; + Read_GL_IBM_vertex_array_lists; + Read_GL_INGR_blend_func_separate; + Read_GL_INTEL_parallel_arrays; + Read_GL_MESA_resize_buffers; + Read_GL_MESA_window_pos; + Read_GL_NV_evaluators; + Read_GL_NV_fence; + Read_GL_NV_fragment_program; + Read_GL_NV_half_float; + Read_GL_NV_occlusion_query; + Read_GL_NV_pixel_data_range; + Read_GL_NV_point_sprite; + Read_GL_NV_primitive_restart; + Read_GL_NV_register_combiners; + Read_GL_NV_register_combiners2; + Read_GL_NV_vertex_array_range; + Read_GL_NV_vertex_program; + Read_GL_NV_depth_buffer_float; + Read_GL_NV_framebuffer_multisample_coverage; + Read_GL_NV_geometry_program4; + Read_GL_NV_gpu_program4; + Read_GL_NV_parameter_buffer_object; + Read_GL_NV_transform_feedback; + Read_GL_NV_conditional_render; + Read_GL_NV_present_video; + Read_GL_NV_explicit_multisample; + Read_GL_NV_transform_feedback2; + Read_GL_PGI_misc_hints; + Read_GL_SGIS_detail_texture; + Read_GL_SGIS_fog_function; + Read_GL_SGIS_multisample; + Read_GL_SGIS_pixel_texture; + Read_GL_SGIS_point_parameters; + Read_GL_SGIS_sharpen_texture; + Read_GL_SGIS_texture4D; + Read_GL_SGIS_texture_color_mask; + Read_GL_SGIS_texture_filter4; + Read_GL_SGIX_async; + Read_GL_SGIX_flush_raster; + Read_GL_SGIX_fragment_lighting; + Read_GL_SGIX_framezoom; + Read_GL_SGIX_igloo_interface; + Read_GL_SGIX_instruments; + Read_GL_SGIX_list_priority; + Read_GL_SGIX_pixel_texture; + Read_GL_SGIX_polynomial_ffd; + Read_GL_SGIX_reference_plane; + Read_GL_SGIX_sprite; + Read_GL_SGIX_tag_sample_buffer; + Read_GL_SGI_color_table; + Read_GL_SUNX_constant_data; + Read_GL_SUN_global_alpha; + Read_GL_SUN_mesh_array; + Read_GL_SUN_triangle_list; + Read_GL_SUN_vertex; + +{$IFDEF DGL_WIN} + Read_WGL_ARB_buffer_region; + Read_WGL_ARB_extensions_string; + Read_WGL_ARB_make_current_read; + Read_WGL_ARB_pbuffer; + Read_WGL_ARB_pixel_format; + Read_WGL_ARB_pixel_format_float; + Read_WGL_ARB_render_texture; + Read_WGL_ARB_create_context; + Read_WGL_AMD_gpu_association; + Read_WGL_EXT_display_color_table; + Read_WGL_EXT_extensions_string; + Read_WGL_EXT_make_current_read; + Read_WGL_EXT_pbuffer; + Read_WGL_EXT_pixel_format; + Read_WGL_EXT_swap_control; + Read_WGL_I3D_digital_video_control; + Read_WGL_I3D_gamma; + Read_WGL_I3D_genlock; + Read_WGL_I3D_image_buffer; + Read_WGL_I3D_swap_frame_lock; + Read_WGL_I3D_swap_frame_usage; + Read_WGL_NV_vertex_array_range; + Read_WGL_NV_present_video; + Read_WGL_NV_video_out; + Read_WGL_NV_swap_group; + Read_WGL_NV_gpu_affinity; + Read_WGL_OML_sync_control; + Read_WGL_3DL_stereo_control; + + Read_WIN_draw_range_elements; + Read_WIN_swap_hint; +{$ENDIF} + + ExtensionsRead := True; +end; + +// ============================================================================= +// ReadCoreVersion +// ============================================================================= + +procedure ReadCoreVersion; +var + AnsiBuffer: AnsiString; + Buffer: String; + MajorVersion, MinorVersion: Integer; + + procedure TrimAndSplitVersionString(Buffer: String; var Max, Min: Integer); + // Peels out the X.Y form from the given Buffer which must contain a version string like "text Minor.Major.Build text" + // at least however "Major.Minor". + var + Separator: Integer; + begin + try + // There must be at least one dot to separate major and minor version number. + Separator := Pos('.', Buffer); + // At least one number must be before and one after the dot. + if (Separator > 1) and (Separator < Length(Buffer)) and (AnsiChar(Buffer[Separator - 1]) in ['0'..'9']) and + (AnsiChar(Buffer[Separator + 1]) in ['0'..'9']) then + begin + // OK, it's a valid version string. Now remove unnecessary parts. + Dec(Separator); + // Find last non-numeric character before version number. + while (Separator > 0) and (AnsiChar(Buffer[Separator]) in ['0'..'9']) do + Dec(Separator); + // Delete leading characters which do not belong to the version string. + Delete(Buffer, 1, Separator); + Separator := Pos('.', Buffer) + 1; + // Find first non-numeric character after version number + while (Separator <= Length(Buffer)) and (AnsiChar(Buffer[Separator]) in ['0'..'9']) do + Inc(Separator); + // delete trailing characters not belonging to the version string + Delete(Buffer, Separator, 255); + // Now translate the numbers. + Separator := Pos('.', Buffer); // This is necessary because the buffer length might have changed. + Max := StrToInt(Copy(Buffer, 1, Separator - 1)); + Min := StrToInt(Copy(Buffer, Separator + 1, 1)); + end + else + Abort; + except + Min := 0; + Max := 0; + end; + end; + + +begin + // determine version of implementation + // GL + if not Assigned(@glGetString) then + glGetString := dglGetProcAddress('glGetString'); + + AnsiBuffer := glGetString(GL_VERSION); + Buffer := String(AnsiBuffer); + + TrimAndSplitVersionString(Buffer, MajorVersion, MinorVersion); + + GL_VERSION_1_0 := True; + GL_VERSION_1_1 := False; + GL_VERSION_1_2 := False; + GL_VERSION_1_3 := False; + GL_VERSION_1_4 := False; + GL_VERSION_1_5 := False; + GL_VERSION_2_0 := False; + GL_VERSION_2_1 := False; + GL_VERSION_3_0 := False; + GL_VERSION_3_1 := False; + GL_VERSION_3_2 := False; + + if MajorVersion = 1 then + begin + if MinorVersion >= 1 then + GL_VERSION_1_1 := True; + if MinorVersion >= 2 then + GL_VERSION_1_2 := True; + if MinorVersion >= 3 then + GL_VERSION_1_3 := True; + if MinorVersion >= 4 then + GL_VERSION_1_4 := True; + if MinorVersion >= 5 then + GL_VERSION_1_5 := True; + end; + + if MajorVersion >= 2 then + begin + GL_VERSION_1_1 := True; + GL_VERSION_1_2 := True; + GL_VERSION_1_3 := True; + GL_VERSION_1_4 := True; + GL_VERSION_1_5 := True; + GL_VERSION_2_0 := True; + + if MinorVersion >= 1 then + GL_VERSION_2_1 := True; + end; + + if MajorVersion >= 3 then + begin + GL_VERSION_2_1 := True; + GL_VERSION_3_0 := True; + + if MinorVersion >= 1 then + GL_VERSION_3_1 := True; + if MinorVersion >= 2 then + GL_VERSION_3_2 := True; + end; + + + // GLU + GLU_VERSION_1_1 := False; + GLU_VERSION_1_2 := False; + GLU_VERSION_1_3 := False; + + if Assigned(gluGetString) then begin + AnsiBuffer := gluGetString(GLU_VERSION); + Buffer := String(AnsiBuffer); + + TrimAndSplitVersionString(Buffer, Majorversion, MinorVersion); + + GLU_VERSION_1_1 := True; + + if MinorVersion >= 2 then + GLU_VERSION_1_2 := True; + + if MinorVersion >= 3 then + GLU_VERSION_1_3 := True; + end; +end; + + +// ============================================================================= +// ReadImplementationProperties +// ============================================================================= + +procedure ReadImplementationProperties; +var + Buffer: Ansistring; +begin + ReadCoreVersion; + + // Check all extensions + Buffer := Int_GetExtensionString; + + // === 3DFX ==================================================================== + GL_3DFX_multisample := Int_CheckExtension(Buffer, 'GL_3DFX_multisample'); + GL_3DFX_tbuffer := Int_CheckExtension(Buffer, 'GL_3DFX_tbuffer'); + GL_3DFX_texture_compression_FXT1 := Int_CheckExtension(Buffer, 'GL_3DFX_texture_compression_FXT1'); + + // === APPLE =================================================================== + GL_APPLE_client_storage := Int_CheckExtension(Buffer, 'GL_APPLE_client_storage'); + GL_APPLE_element_array := Int_CheckExtension(Buffer, 'GL_APPLE_element_array'); + GL_APPLE_fence := Int_CheckExtension(Buffer, 'GL_APPLE_fence'); + GL_APPLE_specular_vector := Int_CheckExtension(Buffer, 'GL_APPLE_specular_vector'); + GL_APPLE_transform_hint := Int_CheckExtension(Buffer, 'GL_APPLE_transform_hint'); + GL_APPLE_vertex_array_object := Int_CheckExtension(Buffer, 'GL_APPLE_vertex_array_object'); + GL_APPLE_vertex_array_range := Int_CheckExtension(Buffer, 'GL_APPLE_vertex_array_range'); + GL_APPLE_ycbcr_422 := Int_CheckExtension(Buffer, 'GL_APPLE_ycbcr_422'); + GL_APPLE_texture_range := Int_CheckExtension(Buffer, 'GL_APPLE_texture_range'); + GL_APPLE_float_pixels := Int_CheckExtension(Buffer, 'GL_APPLE_float_pixels'); + GL_APPLE_vertex_program_evaluators := Int_CheckExtension(Buffer, 'GL_APPLE_vertex_program_evaluators'); + GL_APPLE_aux_depth_stencil := Int_CheckExtension(Buffer, 'GL_APPLE_aux_depth_stencil'); + GL_APPLE_object_purgeable := Int_CheckExtension(Buffer, 'GL_APPLE_object_purgeable'); + + // === ARB ===================================================================== + GL_ARB_depth_texture := Int_CheckExtension(Buffer, 'GL_ARB_depth_texture'); + GL_ARB_fragment_program := Int_CheckExtension(Buffer, 'GL_ARB_fragment_program'); + GL_ARB_imaging := Int_CheckExtension(Buffer, 'GL_ARB_imaging'); + GL_ARB_matrix_palette := Int_CheckExtension(Buffer, 'GL_ARB_matrix_palette'); + GL_ARB_multisample := Int_CheckExtension(Buffer, 'GL_ARB_multisample'); + GL_ARB_multitexture := Int_CheckExtension(Buffer, 'GL_ARB_multitexture'); + GL_ARB_point_parameters := Int_CheckExtension(Buffer, 'GL_ARB_point_parameters'); + GL_ARB_shadow := Int_CheckExtension(Buffer, 'GL_ARB_shadow'); + GL_ARB_shadow_ambient := Int_CheckExtension(Buffer, 'GL_ARB_shadow_ambient'); + GL_ARB_texture_border_clamp := Int_CheckExtension(Buffer, 'GL_ARB_texture_border_clamp'); + GL_ARB_texture_compression := Int_CheckExtension(Buffer, 'GL_ARB_texture_compression'); + GL_ARB_texture_cube_map := Int_CheckExtension(Buffer, 'GL_ARB_texture_cube_map'); + GL_ARB_texture_env_add := Int_CheckExtension(Buffer, 'GL_ARB_texture_env_add'); + GL_ARB_texture_env_combine := Int_CheckExtension(Buffer, 'GL_ARB_texture_env_combine'); + GL_ARB_texture_env_crossbar := Int_CheckExtension(Buffer, 'GL_ARB_texture_env_crossbar'); + GL_ARB_texture_env_dot3 := Int_CheckExtension(Buffer, 'GL_ARB_texture_env_dot3'); + GL_ARB_texture_mirrored_repeat := Int_CheckExtension(Buffer, 'GL_ARB_texture_mirrored_repeat'); + GL_ARB_transpose_matrix := Int_CheckExtension(Buffer, 'GL_ARB_transpose_matrix'); + GL_ARB_vertex_blend := Int_CheckExtension(Buffer, 'GL_ARB_vertex_blend'); + GL_ARB_vertex_buffer_object := Int_CheckExtension(Buffer, 'GL_ARB_vertex_buffer_object'); + GL_ARB_vertex_program := Int_CheckExtension(Buffer, 'GL_ARB_vertex_program'); + GL_ARB_window_pos := Int_CheckExtension(Buffer, 'GL_ARB_window_pos'); + GL_ARB_shader_objects := Int_CheckExtension(Buffer, 'GL_ARB_shader_objects'); + GL_ARB_vertex_shader := Int_CheckExtension(Buffer, 'GL_ARB_vertex_shader'); + GL_ARB_fragment_shader := Int_CheckExtension(Buffer, 'GL_ARB_fragment_shader'); + GL_ARB_occlusion_query := Int_CheckExtension(Buffer, 'GL_ARB_occlusion_query'); + GL_ARB_shading_language_100 := Int_CheckExtension(Buffer, 'GL_ARB_shading_language_100'); + GL_ARB_point_sprite := Int_CheckExtension(Buffer, 'GL_ARB_point_sprite'); + GL_ARB_texture_non_power_of_two := Int_CheckExtension(Buffer, 'GL_ARB_texture_non_power_of_two'); + GL_ARB_fragment_program_shadow := Int_CheckExtension(Buffer, 'GL_ARB_fragment_program_shadow'); + GL_ARB_draw_buffers := Int_CheckExtension(Buffer, 'GL_ARB_draw_buffers'); + GL_ARB_texture_rectangle := Int_CheckExtension(Buffer, 'GL_ARB_texture_rectangle'); + GL_ARB_color_buffer_float := Int_CheckExtension(Buffer, 'GL_ARB_color_buffer_float'); + GL_ARB_half_float_pixel := Int_CheckExtension(Buffer, 'GL_ARB_half_float_pixel'); + GL_ARB_texture_float := Int_CheckExtension(Buffer, 'GL_ARB_texture_float'); + GL_ARB_pixel_buffer_object := Int_CheckExtension(Buffer, 'GL_ARB_pixel_buffer_object'); + GL_ARB_depth_buffer_float := Int_CheckExtension(Buffer, 'GL_ARB_depth_buffer_float'); + GL_ARB_draw_instanced := Int_CheckExtension(Buffer, 'GL_ARB_draw_instanced'); + GL_ARB_framebuffer_object := Int_CheckExtension(Buffer, 'GL_ARB_framebuffer_object'); + GL_ARB_framebuffer_sRGB := Int_CheckExtension(Buffer, 'GL_ARB_framebuffer_sRGB'); + GL_ARB_geometry_shader4 := Int_CheckExtension(Buffer, 'GL_ARB_geometry_shader4'); + GL_ARB_half_float_vertex := Int_CheckExtension(Buffer, 'GL_ARB_half_float_vertex'); + GL_ARB_instanced_arrays := Int_CheckExtension(Buffer, 'GL_ARB_instanced_arrays'); + GL_ARB_map_buffer_range := Int_CheckExtension(Buffer, 'GL_ARB_map_buffer_range'); + GL_ARB_texture_buffer_object := Int_CheckExtension(Buffer, 'GL_ARB_texture_buffer_object'); + GL_ARB_texture_compression_rgtc := Int_CheckExtension(Buffer, 'GL_ARB_texture_compression_rgtc'); + GL_ARB_texture_rg := Int_CheckExtension(Buffer, 'GL_ARB_texture_rg'); + GL_ARB_vertex_array_object := Int_CheckExtension(Buffer, 'GL_ARB_vertex_array_object'); + GL_ARB_uniform_buffer_object := Int_CheckExtension(Buffer, 'GL_ARB_uniform_buffer_object'); + GL_ARB_compatibility := Int_CheckExtension(Buffer, 'GL_ARB_compatibility'); + GL_ARB_copy_buffer := Int_CheckExtension(Buffer, 'GL_ARB_copy_buffer'); + GL_ARB_shader_texture_lod := Int_CheckExtension(Buffer, 'GL_ARB_shader_texture_lod'); + GL_ARB_depth_clamp := Int_CheckExtension(Buffer, 'GL_ARB_depth_clamp'); + GL_ARB_draw_elements_base_vertex := Int_CheckExtension(Buffer, 'GL_ARB_draw_elements_base_vertex'); + GL_ARB_fragment_coord_conventions := Int_CheckExtension(Buffer, 'GL_ARB_fragment_coord_conventions'); + GL_ARB_provoking_vertex := Int_CheckExtension(Buffer, 'GL_ARB_provoking_vertex'); + GL_ARB_seamless_cube_map := Int_CheckExtension(Buffer, 'GL_ARB_seamless_cube_map'); + GL_ARB_sync := Int_CheckExtension(Buffer, 'GL_ARB_sync'); + GL_ARB_texture_multisample := Int_CheckExtension(Buffer, 'GL_ARB_texture_multisample'); + GL_ARB_vertex_array_bgra := Int_CheckExtension(Buffer, 'GL_ARB_vertex_array_bgra'); + GL_ARB_draw_buffers_blend := Int_CheckExtension(Buffer, 'GL_ARB_draw_buffers_blend'); + GL_ARB_sample_shading := Int_CheckExtension(Buffer, 'GL_ARB_sample_shading'); + GL_ARB_texture_cube_map_array := Int_CheckExtension(Buffer, 'GL_ARB_texture_cube_map_array'); + GL_ARB_texture_gather := Int_CheckExtension(Buffer, 'GL_ARB_texture_gather'); + GL_ARB_texture_query_lod := Int_CheckExtension(Buffer, 'GL_ARB_texture_query_lod'); + + // === ATI/AMD ================================================================= + GL_ATI_draw_buffers := Int_CheckExtension(Buffer, 'GL_ATI_draw_buffers'); + GL_ATI_element_array := Int_CheckExtension(Buffer, 'GL_ATI_element_array'); + GL_ATI_envmap_bumpmap := Int_CheckExtension(Buffer, 'GL_ATI_envmap_bumpmap'); + GL_ATI_fragment_shader := Int_CheckExtension(Buffer, 'GL_ATI_fragment_shader'); + GL_ATI_map_object_buffer := Int_CheckExtension(Buffer, 'GL_ATI_map_object_buffer'); + GL_ATI_pn_triangles := Int_CheckExtension(Buffer, 'GL_ATI_pn_triangles'); + GL_ATI_separate_stencil := Int_CheckExtension(Buffer, 'GL_ATI_separate_stencil'); + GL_ATI_text_fragment_shader := Int_CheckExtension(Buffer, 'GL_ATI_text_fragment_shader'); + GL_ATI_texture_env_combine3 := Int_CheckExtension(Buffer, 'GL_ATI_texture_env_combine3'); + GL_ATI_texture_float := Int_CheckExtension(Buffer, 'GL_ATI_texture_float'); + GL_ATI_texture_mirror_once := Int_CheckExtension(Buffer, 'GL_ATI_texture_mirror_once'); + GL_ATI_vertex_array_object := Int_CheckExtension(Buffer, 'GL_ATI_vertex_array_object'); + GL_ATI_vertex_attrib_array_object := Int_CheckExtension(Buffer, 'GL_ATI_vertex_attrib_array_object'); + GL_ATI_vertex_streams := Int_CheckExtension(Buffer, 'GL_ATI_vertex_streams'); + GL_ATI_meminfo := Int_CheckExtension(Buffer, 'GL_ATI_meminfo'); + GL_AMD_performance_monitor := Int_CheckExtension(Buffer, 'GL_AMD_performance_monitor'); + GL_AMD_texture_texture4 := Int_CheckExtension(Buffer, 'GL_AMD_texture_texture4'); + GL_AMD_vertex_shader_tesselator := Int_CheckExtension(Buffer, 'GL_AMD_vertex_shader_tesselator'); + + // === EXT ===================================================================== + GL_EXT_422_pixels := Int_CheckExtension(Buffer, 'GL_EXT_422_pixels'); + GL_EXT_abgr := Int_CheckExtension(Buffer, 'GL_EXT_abgr'); + GL_EXT_bgra := Int_CheckExtension(Buffer, 'GL_EXT_bgra'); + GL_EXT_blend_color := Int_CheckExtension(Buffer, 'GL_EXT_blend_color'); + GL_EXT_blend_func_separate := Int_CheckExtension(Buffer, 'GL_EXT_blend_func_separate'); + GL_EXT_blend_logic_op := Int_CheckExtension(Buffer, 'GL_EXT_blend_logic_op'); + GL_EXT_blend_minmax := Int_CheckExtension(Buffer, 'GL_EXT_blend_minmax'); + GL_EXT_blend_subtract := Int_CheckExtension(Buffer, 'GL_EXT_blend_subtract'); + GL_EXT_clip_volume_hint := Int_CheckExtension(Buffer, 'GL_EXT_clip_volume_hint'); + GL_EXT_cmyka := Int_CheckExtension(Buffer, 'GL_EXT_cmyka'); + GL_EXT_color_matrix := Int_CheckExtension(Buffer, 'GL_EXT_color_matrix'); + GL_EXT_color_subtable := Int_CheckExtension(Buffer, 'GL_EXT_color_subtable'); + GL_EXT_compiled_vertex_array := Int_CheckExtension(Buffer, 'GL_EXT_compiled_vertex_array'); + GL_EXT_convolution := Int_CheckExtension(Buffer, 'GL_EXT_convolution'); + GL_EXT_coordinate_frame := Int_CheckExtension(Buffer, 'GL_EXT_coordinate_frame'); + GL_EXT_copy_texture := Int_CheckExtension(Buffer, 'GL_EXT_copy_texture'); + GL_EXT_cull_vertex := Int_CheckExtension(Buffer, 'GL_EXT_cull_vertex'); + GL_EXT_draw_range_elements := Int_CheckExtension(Buffer, 'GL_EXT_draw_range_elements'); + GL_EXT_fog_coord := Int_CheckExtension(Buffer, 'GL_EXT_fog_coord'); + GL_EXT_framebuffer_object := Int_CheckExtension(Buffer, 'GL_EXT_framebuffer_object'); + GL_EXT_histogram := Int_CheckExtension(Buffer, 'GL_EXT_histogram'); + GL_EXT_index_array_formats := Int_CheckExtension(Buffer, 'GL_EXT_index_array_formats'); + GL_EXT_index_func := Int_CheckExtension(Buffer, 'GL_EXT_index_func'); + GL_EXT_index_material := Int_CheckExtension(Buffer, 'GL_EXT_index_material'); + GL_EXT_index_texture := Int_CheckExtension(Buffer, 'GL_EXT_index_texture'); + GL_EXT_light_texture := Int_CheckExtension(Buffer, 'GL_EXT_light_texture'); + GL_EXT_misc_attribute := Int_CheckExtension(Buffer, 'GL_EXT_misc_attribute'); + GL_EXT_multi_draw_arrays := Int_CheckExtension(Buffer, 'GL_EXT_multi_draw_arrays'); + GL_EXT_multisample := Int_CheckExtension(Buffer, 'GL_EXT_multisample'); + GL_EXT_packed_pixels := Int_CheckExtension(Buffer, 'GL_EXT_packed_pixels'); + GL_EXT_paletted_texture := Int_CheckExtension(Buffer, 'GL_EXT_paletted_texture'); + GL_EXT_pixel_transform := Int_CheckExtension(Buffer, 'GL_EXT_pixel_transform'); + GL_EXT_pixel_transform_color_table := Int_CheckExtension(Buffer, 'GL_EXT_pixel_transform_color_table'); + GL_EXT_point_parameters := Int_CheckExtension(Buffer, 'GL_EXT_point_parameters'); + GL_EXT_polygon_offset := Int_CheckExtension(Buffer, 'GL_EXT_polygon_offset'); + GL_EXT_rescale_normal := Int_CheckExtension(Buffer, 'GL_EXT_rescale_normal'); + GL_EXT_secondary_color := Int_CheckExtension(Buffer, 'GL_EXT_secondary_color'); + GL_EXT_separate_specular_color := Int_CheckExtension(Buffer, 'GL_EXT_separate_specular_color'); + GL_EXT_shadow_funcs := Int_CheckExtension(Buffer, 'GL_EXT_shadow_funcs'); + GL_EXT_shared_texture_palette := Int_CheckExtension(Buffer, 'GL_EXT_shared_texture_palette'); + GL_EXT_stencil_two_side := Int_CheckExtension(Buffer, 'GL_EXT_stencil_two_side'); + GL_EXT_stencil_wrap := Int_CheckExtension(Buffer, 'GL_EXT_stencil_wrap'); + GL_EXT_subtexture := Int_CheckExtension(Buffer, 'GL_EXT_subtexture'); + GL_EXT_texture := Int_CheckExtension(Buffer, 'GL_EXT_texture'); + GL_EXT_texture3D := Int_CheckExtension(Buffer, 'GL_EXT_texture3D'); + GL_EXT_texture_compression_s3tc := Int_CheckExtension(Buffer, 'GL_EXT_texture_compression_s3tc'); + GL_EXT_texture_cube_map := Int_CheckExtension(Buffer, 'GL_EXT_texture_cube_map'); + GL_EXT_texture_edge_clamp := Int_CheckExtension(Buffer, 'GL_EXT_texture_edge_clamp'); + GL_EXT_texture_env_add := Int_CheckExtension(Buffer, 'GL_EXT_texture_env_add'); + GL_EXT_texture_env_combine := Int_CheckExtension(Buffer, 'GL_EXT_texture_env_combine'); + GL_EXT_texture_env_dot3 := Int_CheckExtension(Buffer, 'GL_EXT_texture_env_dot3'); + GL_EXT_texture_filter_anisotropic := Int_CheckExtension(Buffer, 'GL_EXT_texture_filter_anisotropic'); + GL_EXT_texture_lod_bias := Int_CheckExtension(Buffer, 'GL_EXT_texture_lod_bias'); + GL_EXT_texture_object := Int_CheckExtension(Buffer, 'GL_EXT_texture_object'); + GL_EXT_texture_perturb_normal := Int_CheckExtension(Buffer, 'GL_EXT_texture_perturb_normal'); + GL_EXT_texture_rectangle := Int_CheckExtension(Buffer, 'GL_EXT_texture_rectangle'); + GL_EXT_vertex_array := Int_CheckExtension(Buffer, 'GL_EXT_vertex_array'); + GL_EXT_vertex_shader := Int_CheckExtension(Buffer, 'GL_EXT_vertex_shader'); + GL_EXT_vertex_weighting := Int_CheckExtension(Buffer, 'GL_EXT_vertex_weighting'); + GL_EXT_depth_bounds_test := Int_CheckExtension(Buffer, 'GL_EXT_depth_bounds_test'); + GL_EXT_texture_mirror_clamp := Int_CheckExtension(Buffer, 'GL_EXT_texture_mirror_clamp'); + GL_EXT_blend_equation_separate := Int_CheckExtension(Buffer, 'GL_EXT_blend_equation_separate'); + GL_EXT_pixel_buffer_object := Int_CheckExtension(Buffer, 'GL_EXT_pixel_buffer_object'); + GL_EXT_texture_compression_dxt1 := Int_CheckExtension(Buffer, 'GL_EXT_texture_compression_dxt1'); + GL_EXT_stencil_clear_tag := Int_CheckExtension(Buffer, 'GL_EXT_stencil_clear_tag'); + GL_EXT_packed_depth_stencil := Int_CheckExtension(Buffer, 'GL_EXT_packed_depth_stencil'); + GL_EXT_texture_sRGB := Int_CheckExtension(Buffer, 'GL_EXT_texture_sRGB'); + GL_EXT_framebuffer_blit := Int_CheckExtension(Buffer, 'GL_EXT_framebuffer_blit'); + GL_EXT_framebuffer_multisample := Int_CheckExtension(Buffer, 'GL_EXT_framebuffer_multisample'); + GL_EXT_timer_query := Int_CheckExtension(Buffer, 'GL_EXT_timer_query'); + GL_EXT_gpu_program_parameters := Int_CheckExtension(Buffer, 'GL_EXT_gpu_program_parameters'); + GL_EXT_bindable_uniform := Int_CheckExtension(Buffer, 'GL_EXT_bindable_uniform'); + GL_EXT_draw_buffers2 := Int_CheckExtension(Buffer, 'GL_EXT_draw_buffers2'); + GL_EXT_draw_instanced := Int_CheckExtension(Buffer, 'GL_EXT_draw_instanced'); + GL_EXT_framebuffer_sRGB := Int_CheckExtension(Buffer, 'GL_EXT_framebuffer_sRGB'); + GL_EXT_geometry_shader4 := Int_CheckExtension(Buffer, 'GL_EXT_geometry_shader4'); + GL_EXT_gpu_shader4 := Int_CheckExtension(Buffer, 'GL_EXT_gpu_shader4'); + GL_EXT_packed_float := Int_CheckExtension(Buffer, 'GL_EXT_packed_float'); + GL_EXT_texture_array := Int_CheckExtension(Buffer, 'GL_EXT_texture_array'); + GL_EXT_texture_buffer_object := Int_CheckExtension(Buffer, 'GL_EXT_texture_buffer_object'); + GL_EXT_texture_compression_latc := Int_CheckExtension(Buffer, 'GL_EXT_texture_compression_latc'); + GL_EXT_texture_compression_rgtc := Int_CheckExtension(Buffer, 'GL_EXT_texture_compression_rgtc'); + GL_EXT_texture_integer := Int_CheckExtension(Buffer, 'GL_EXT_texture_integer'); + GL_EXT_texture_shared_exponent := Int_CheckExtension(Buffer, 'GL_EXT_texture_shared_exponent'); + GL_EXT_transform_feedback := Int_CheckExtension(Buffer, 'GL_EXT_transform_feedback'); + GL_EXT_direct_state_access := Int_CheckExtension(Buffer, 'GL_EXT_direct_state_access'); + GL_EXT_vertex_array_bgra := Int_CheckExtension(Buffer, 'GL_EXT_vertex_array_bgra'); + GL_EXT_texture_swizzle := Int_CheckExtension(Buffer, 'GL_EXT_texture_swizzle'); + GL_EXT_provoking_vertex := Int_CheckExtension(Buffer, 'GL_EXT_provoking_vertex'); + + // === HP ====================================================================== + GL_HP_convolution_border_modes := Int_CheckExtension(Buffer, 'GL_HP_convolution_border_modes'); + GL_HP_image_transform := Int_CheckExtension(Buffer, 'GL_HP_image_transform'); + GL_HP_occlusion_test := Int_CheckExtension(Buffer, 'GL_HP_occlusion_test'); + GL_HP_texture_lighting := Int_CheckExtension(Buffer, 'GL_HP_texture_lighting'); + + // === IBM ===================================================================== + GL_IBM_cull_vertex := Int_CheckExtension(Buffer, 'GL_IBM_cull_vertex'); + GL_IBM_multimode_draw_arrays := Int_CheckExtension(Buffer, 'GL_IBM_multimode_draw_arrays'); + GL_IBM_rasterpos_clip := Int_CheckExtension(Buffer, 'GL_IBM_rasterpos_clip'); + GL_IBM_texture_mirrored_repeat := Int_CheckExtension(Buffer, 'GL_IBM_texture_mirrored_repeat'); + GL_IBM_vertex_array_lists := Int_CheckExtension(Buffer, 'GL_IBM_vertex_array_lists'); + + // === INGR ==================================================================== + GL_INGR_blend_func_separate := Int_CheckExtension(Buffer, 'GL_INGR_blend_func_separate'); + GL_INGR_color_clamp := Int_CheckExtension(Buffer, 'GL_INGR_color_clamp'); + GL_INGR_interlace_read := Int_CheckExtension(Buffer, 'GL_INGR_interlace_read'); + GL_INGR_palette_buffer := Int_CheckExtension(Buffer, 'GL_INGR_palette_buffer'); + + // === INTEL =================================================================== + GL_INTEL_parallel_arrays := Int_CheckExtension(Buffer, 'GL_INTEL_parallel_arrays'); + GL_INTEL_texture_scissor := Int_CheckExtension(Buffer, 'GL_INTEL_texture_scissor'); + + // === MESA ==================================================================== + GL_MESA_resize_buffers := Int_CheckExtension(Buffer, 'GL_MESA_resize_buffers'); + GL_MESA_window_pos := Int_CheckExtension(Buffer, 'GL_MESA_window_pos'); + + // === NVIDIA ================================================================== + GL_NV_blend_square := Int_CheckExtension(Buffer, 'GL_NV_blend_square'); + GL_NV_copy_depth_to_color := Int_CheckExtension(Buffer, 'GL_NV_copy_depth_to_color'); + GL_NV_depth_clamp := Int_CheckExtension(Buffer, 'GL_NV_depth_clamp'); + GL_NV_evaluators := Int_CheckExtension(Buffer, 'GL_NV_evaluators'); + GL_NV_fence := Int_CheckExtension(Buffer, 'GL_NV_fence'); + GL_NV_float_buffer := Int_CheckExtension(Buffer, 'GL_NV_float_buffer'); + GL_NV_fog_distance := Int_CheckExtension(Buffer, 'GL_NV_fog_distance'); + GL_NV_fragment_program := Int_CheckExtension(Buffer, 'GL_NV_fragment_program'); + GL_NV_half_float := Int_CheckExtension(Buffer, 'GL_NV_half_float'); + GL_NV_light_max_exponent := Int_CheckExtension(Buffer, 'GL_NV_light_max_exponent'); + GL_NV_multisample_filter_hint := Int_CheckExtension(Buffer, 'GL_NV_multisample_filter_hint'); + GL_NV_occlusion_query := Int_CheckExtension(Buffer, 'GL_NV_occlusion_query'); + GL_NV_packed_depth_stencil := Int_CheckExtension(Buffer, 'GL_NV_packed_depth_stencil'); + GL_NV_pixel_data_range := Int_CheckExtension(Buffer, 'GL_NV_pixel_data_range'); + GL_NV_point_sprite := Int_CheckExtension(Buffer, 'GL_NV_point_sprite'); + GL_NV_primitive_restart := Int_CheckExtension(Buffer, 'GL_NV_primitive_restart'); + GL_NV_register_combiners := Int_CheckExtension(Buffer, 'GL_NV_register_combiners'); + GL_NV_register_combiners2 := Int_CheckExtension(Buffer, 'GL_NV_register_combiners2'); + GL_NV_texgen_emboss := Int_CheckExtension(Buffer, 'GL_NV_texgen_emboss'); + GL_NV_texgen_reflection := Int_CheckExtension(Buffer, 'GL_NV_texgen_reflection'); + GL_NV_texture_compression_vtc := Int_CheckExtension(Buffer, 'GL_NV_texture_compression_vtc'); + GL_NV_texture_env_combine4 := Int_CheckExtension(Buffer, 'GL_NV_texture_env_combine4'); + GL_NV_texture_expand_normal := Int_CheckExtension(Buffer, 'GL_NV_texture_expand_normal'); + GL_NV_texture_rectangle := Int_CheckExtension(Buffer, 'GL_NV_texture_rectangle'); + GL_NV_texture_shader := Int_CheckExtension(Buffer, 'GL_NV_texture_shader'); + GL_NV_texture_shader2 := Int_CheckExtension(Buffer, 'GL_NV_texture_shader2'); + GL_NV_texture_shader3 := Int_CheckExtension(Buffer, 'GL_NV_texture_shader3'); + GL_NV_vertex_array_range := Int_CheckExtension(Buffer, 'GL_NV_vertex_array_range'); + GL_NV_vertex_array_range2 := Int_CheckExtension(Buffer, 'GL_NV_vertex_array_range2'); + GL_NV_vertex_program := Int_CheckExtension(Buffer, 'GL_NV_vertex_program'); + GL_NV_vertex_program1_1 := Int_CheckExtension(Buffer, 'GL_NV_vertex_program1_1'); + GL_NV_vertex_program2 := Int_CheckExtension(Buffer, 'GL_NV_vertex_program2'); + GL_NV_fragment_program_option := Int_CheckExtension(Buffer, 'GL_NV_fragment_program_option'); + GL_NV_fragment_program2 := Int_CheckExtension(Buffer, 'GL_NV_fragment_program2'); + GL_NV_vertex_program2_option := Int_CheckExtension(Buffer, 'GL_NV_vertex_program2_option'); + GL_NV_vertex_program3 := Int_CheckExtension(Buffer, 'GL_NV_vertex_program3'); + GL_NV_depth_buffer_float := Int_CheckExtension(Buffer, 'GL_NV_depth_buffer_float'); + GL_NV_fragment_program4 := Int_CheckExtension(Buffer, 'GL_NV_fragment_program4'); + GL_NV_framebuffer_multisample_coverage := Int_CheckExtension(Buffer, 'GL_NV_framebuffer_multisample_coverage'); + GL_NV_geometry_program4 := Int_CheckExtension(Buffer, 'GL_NV_geometry_program4'); + GL_NV_gpu_program4 := Int_CheckExtension(Buffer, 'GL_NV_gpu_program4'); + GL_NV_parameter_buffer_object := Int_CheckExtension(Buffer, 'GL_NV_parameter_buffer_object'); + GL_NV_transform_feedback := Int_CheckExtension(Buffer, 'GL_NV_transform_feedback'); + GL_NV_vertex_program4 := Int_CheckExtension(Buffer, 'GL_NV_vertex_program4'); + GL_NV_conditional_render := Int_CheckExtension(Buffer, 'GL_NV_conditional_render'); + GL_NV_present_video := Int_CheckExtension(Buffer, 'GL_NV_present_video'); + GL_NV_explicit_multisample := Int_CheckExtension(Buffer, 'GL_NV_explicit_multisample'); + GL_NV_transform_feedback2 := Int_CheckExtension(Buffer, 'GL_NV_transform_feedback2'); + + // === OML ===================================================================== + GL_OML_interlace := Int_CheckExtension(Buffer, 'GL_OML_interlace'); + GL_OML_resample := Int_CheckExtension(Buffer, 'GL_OML_resample'); + GL_OML_subsample := Int_CheckExtension(Buffer, 'GL_OML_subsample'); + + // === PGI ===================================================================== + GL_PGI_misc_hints := Int_CheckExtension(Buffer, 'GL_PGI_misc_hints'); + GL_PGI_vertex_hints := Int_CheckExtension(Buffer, 'GL_PGI_vertex_hints'); + + // === REND ==================================================================== + GL_REND_screen_coordinates := Int_CheckExtension(Buffer, 'GL_REND_screen_coordinates'); + + // === S3 ====================================================================== + GL_S3_s3tc := Int_CheckExtension(Buffer, 'GL_S3_s3tc'); + + // === SGIS ==================================================================== + GL_SGIS_detail_texture := Int_CheckExtension(Buffer, 'GL_SGIS_detail_texture'); + GL_SGIS_fog_function := Int_CheckExtension(Buffer, 'GL_SGIS_fog_function'); + GL_SGIS_generate_mipmap := Int_CheckExtension(Buffer, 'GL_SGIS_generate_mipmap'); + GL_SGIS_multisample := Int_CheckExtension(Buffer, 'GL_SGIS_multisample'); + GL_SGIS_pixel_texture := Int_CheckExtension(Buffer, 'GL_SGIS_pixel_texture'); + GL_SGIS_point_line_texgen := Int_CheckExtension(Buffer, 'GL_SGIS_point_line_texgen'); + GL_SGIS_point_parameters := Int_CheckExtension(Buffer, 'GL_SGIS_point_parameters'); + GL_SGIS_sharpen_texture := Int_CheckExtension(Buffer, 'GL_SGIS_sharpen_texture'); + GL_SGIS_texture4D := Int_CheckExtension(Buffer, 'GL_SGIS_texture4D'); + GL_SGIS_texture_border_clamp := Int_CheckExtension(Buffer, 'GL_SGIS_texture_border_clamp'); + GL_SGIS_texture_color_mask := Int_CheckExtension(Buffer, 'GL_SGIS_texture_color_mask'); + GL_SGIS_texture_edge_clamp := Int_CheckExtension(Buffer, 'GL_SGIS_texture_edge_clamp'); + GL_SGIS_texture_filter4 := Int_CheckExtension(Buffer, 'GL_SGIS_texture_filter4'); + GL_SGIS_texture_lod := Int_CheckExtension(Buffer, 'GL_SGIS_texture_lod'); + GL_SGIS_texture_select := Int_CheckExtension(Buffer, 'GL_SGIS_texture_select'); + + // === SGIX ==================================================================== + GL_FfdMaskSGIX := Int_CheckExtension(Buffer, 'GL_FfdMaskSGIX'); + GL_SGIX_async := Int_CheckExtension(Buffer, 'GL_SGIX_async'); + GL_SGIX_async_histogram := Int_CheckExtension(Buffer, 'GL_SGIX_async_histogram'); + GL_SGIX_async_pixel := Int_CheckExtension(Buffer, 'GL_SGIX_async_pixel'); + GL_SGIX_blend_alpha_minmax := Int_CheckExtension(Buffer, 'GL_SGIX_blend_alpha_minmax'); + GL_SGIX_calligraphic_fragment := Int_CheckExtension(Buffer, 'GL_SGIX_calligraphic_fragment'); + GL_SGIX_clipmap := Int_CheckExtension(Buffer, 'GL_SGIX_clipmap'); + GL_SGIX_convolution_accuracy := Int_CheckExtension(Buffer, 'GL_SGIX_convolution_accuracy'); + GL_SGIX_depth_pass_instrument := Int_CheckExtension(Buffer, 'GL_SGIX_depth_pass_instrument'); + GL_SGIX_depth_texture := Int_CheckExtension(Buffer, 'GL_SGIX_depth_texture'); + GL_SGIX_flush_raster := Int_CheckExtension(Buffer, 'GL_SGIX_flush_raster'); + GL_SGIX_fog_offset := Int_CheckExtension(Buffer, 'GL_SGIX_fog_offset'); + GL_SGIX_fog_scale := Int_CheckExtension(Buffer, 'GL_SGIX_fog_scale'); + GL_SGIX_fragment_lighting := Int_CheckExtension(Buffer, 'GL_SGIX_fragment_lighting'); + GL_SGIX_framezoom := Int_CheckExtension(Buffer, 'GL_SGIX_framezoom'); + GL_SGIX_igloo_interface := Int_CheckExtension(Buffer, 'GL_SGIX_igloo_interface'); + GL_SGIX_impact_pixel_texture := Int_CheckExtension(Buffer, 'GL_SGIX_impact_pixel_texture'); + GL_SGIX_instruments := Int_CheckExtension(Buffer, 'GL_SGIX_instruments'); + GL_SGIX_interlace := Int_CheckExtension(Buffer, 'GL_SGIX_interlace'); + GL_SGIX_ir_instrument1 := Int_CheckExtension(Buffer, 'GL_SGIX_ir_instrument1'); + GL_SGIX_list_priority := Int_CheckExtension(Buffer, 'GL_SGIX_list_priority'); + GL_SGIX_pixel_texture := Int_CheckExtension(Buffer, 'GL_SGIX_pixel_texture'); + GL_SGIX_pixel_tiles := Int_CheckExtension(Buffer, 'GL_SGIX_pixel_tiles'); + GL_SGIX_polynomial_ffd := Int_CheckExtension(Buffer, 'GL_SGIX_polynomial_ffd'); + GL_SGIX_reference_plane := Int_CheckExtension(Buffer, 'GL_SGIX_reference_plane'); + GL_SGIX_resample := Int_CheckExtension(Buffer, 'GL_SGIX_resample'); + GL_SGIX_scalebias_hint := Int_CheckExtension(Buffer, 'GL_SGIX_scalebias_hint'); + GL_SGIX_shadow := Int_CheckExtension(Buffer, 'GL_SGIX_shadow'); + GL_SGIX_shadow_ambient := Int_CheckExtension(Buffer, 'GL_SGIX_shadow_ambient'); + GL_SGIX_sprite := Int_CheckExtension(Buffer, 'GL_SGIX_sprite'); + GL_SGIX_subsample := Int_CheckExtension(Buffer, 'GL_SGIX_subsample'); + GL_SGIX_tag_sample_buffer := Int_CheckExtension(Buffer, 'GL_SGIX_tag_sample_buffer'); + GL_SGIX_texture_add_env := Int_CheckExtension(Buffer, 'GL_SGIX_texture_add_env'); + GL_SGIX_texture_coordinate_clamp := Int_CheckExtension(Buffer, 'GL_SGIX_texture_coordinate_clamp'); + GL_SGIX_texture_lod_bias := Int_CheckExtension(Buffer, 'GL_SGIX_texture_lod_bias'); + GL_SGIX_texture_multi_buffer := Int_CheckExtension(Buffer, 'GL_SGIX_texture_multi_buffer'); + GL_SGIX_texture_scale_bias := Int_CheckExtension(Buffer, 'GL_SGIX_texture_scale_bias'); + GL_SGIX_texture_select := Int_CheckExtension(Buffer, 'GL_SGIX_texture_select'); + GL_SGIX_vertex_preclip := Int_CheckExtension(Buffer, 'GL_SGIX_vertex_preclip'); + GL_SGIX_ycrcb := Int_CheckExtension(Buffer, 'GL_SGIX_ycrcb'); + GL_SGIX_ycrcb_subsample := Int_CheckExtension(Buffer, 'GL_SGIX_ycrcb_subsample'); + GL_SGIX_ycrcba := Int_CheckExtension(Buffer, 'GL_SGIX_ycrcba'); + + // === SGI ===================================================================== + GL_SGI_color_matrix := Int_CheckExtension(Buffer, 'GL_SGI_color_matrix'); + GL_SGI_color_table := Int_CheckExtension(Buffer, 'GL_SGI_color_table'); + GL_SGI_depth_pass_instrument := Int_CheckExtension(Buffer, 'GL_SGI_depth_pass_instrument'); + GL_SGI_texture_color_table := Int_CheckExtension(Buffer, 'GL_SGI_texture_color_table'); + + // === SUN ===================================================================== + GL_SUNX_constant_data := Int_CheckExtension(Buffer, 'GL_SUNX_constant_data'); + GL_SUN_convolution_border_modes := Int_CheckExtension(Buffer, 'GL_SUN_convolution_border_modes'); + GL_SUN_global_alpha := Int_CheckExtension(Buffer, 'GL_SUN_global_alpha'); + GL_SUN_mesh_array := Int_CheckExtension(Buffer, 'GL_SUN_mesh_array'); + GL_SUN_slice_accum := Int_CheckExtension(Buffer, 'GL_SUN_slice_accum'); + GL_SUN_triangle_list := Int_CheckExtension(Buffer, 'GL_SUN_triangle_list'); + GL_SUN_vertex := Int_CheckExtension(Buffer, 'GL_SUN_vertex'); + + // === WIN ===================================================================== + GL_WIN_phong_shading := Int_CheckExtension(Buffer, 'GL_WIN_phong_shading'); + GL_WIN_specular_fog := Int_CheckExtension(Buffer, 'GL_WIN_specular_fog'); + + {$IFDEF DGL_WIN} + // === WGL ===================================================================== + WGL_3DFX_multisample := Int_CheckExtension(Buffer, 'WGL_3DFX_multisample'); + WGL_ARB_buffer_region := Int_CheckExtension(Buffer, 'WGL_ARB_buffer_region'); + WGL_ARB_extensions_string := Int_CheckExtension(Buffer, 'WGL_ARB_extensions_string'); + WGL_ARB_make_current_read := Int_CheckExtension(Buffer, 'WGL_ARB_make_current_read'); + WGL_ARB_multisample := Int_CheckExtension(Buffer, 'WGL_ARB_multisample'); + WGL_ARB_pbuffer := Int_CheckExtension(Buffer, 'WGL_ARB_pbuffer'); + WGL_ARB_pixel_format := Int_CheckExtension(Buffer, 'WGL_ARB_pixel_format'); + WGL_ARB_pixel_format_float := Int_CheckExtension(Buffer, 'WGL_ARB_pixel_format_float'); + WGL_ARB_render_texture := Int_CheckExtension(Buffer, 'WGL_ARB_render_texture'); + WGL_ARB_create_context := Int_CheckExtension(Buffer, 'WGL_ARB_create_context'); + WGL_ARB_create_context_profile := Int_CheckExtension(Buffer, 'WGL_ARB_create_context_profile'); + WGL_ATI_pixel_format_float := Int_CheckExtension(Buffer, 'WGL_ATI_pixel_format_float'); + WGL_AMD_gpu_association := Int_CheckExtension(Buffer, 'WGL_AMD_gpu_association'); + WGL_EXT_depth_float := Int_CheckExtension(Buffer, 'WGL_EXT_depth_float'); + WGL_EXT_display_color_table := Int_CheckExtension(Buffer, 'WGL_EXT_display_color_table'); + WGL_EXT_extensions_string := Int_CheckExtension(Buffer, 'WGL_EXT_extensions_string'); + WGL_EXT_make_current_read := Int_CheckExtension(Buffer, 'WGL_EXT_make_current_read'); + WGL_EXT_multisample := Int_CheckExtension(Buffer, 'WGL_EXT_multisample'); + WGL_EXT_pbuffer := Int_CheckExtension(Buffer, 'WGL_EXT_pbuffer'); + WGL_EXT_pixel_format := Int_CheckExtension(Buffer, 'WGL_EXT_pixel_format'); + WGL_EXT_swap_control := Int_CheckExtension(Buffer, 'WGL_EXT_swap_control'); + WGL_I3D_digital_video_control := Int_CheckExtension(Buffer, 'WGL_I3D_digital_video_control'); + WGL_I3D_gamma := Int_CheckExtension(Buffer, 'WGL_I3D_gamma'); + WGL_I3D_genlock := Int_CheckExtension(Buffer, 'WGL_I3D_genlock'); + WGL_I3D_image_buffer := Int_CheckExtension(Buffer, 'WGL_I3D_image_buffer'); + WGL_I3D_swap_frame_lock := Int_CheckExtension(Buffer, 'WGL_I3D_swap_frame_lock'); + WGL_I3D_swap_frame_usage := Int_CheckExtension(Buffer, 'WGL_I3D_swap_frame_usage'); + WGL_NV_float_buffer := Int_CheckExtension(Buffer, 'WGL_NV_float_buffer'); + WGL_NV_render_depth_texture := Int_CheckExtension(Buffer, 'WGL_NV_render_depth_texture'); + WGL_NV_render_texture_rectangle := Int_CheckExtension(Buffer, 'WGL_NV_render_texture_rectangle'); + WGL_NV_vertex_array_range := Int_CheckExtension(Buffer, 'WGL_NV_vertex_array_range'); + WGL_NV_present_video := Int_CheckExtension(Buffer, 'WGL_NV_present_video'); + WGL_NV_video_out := Int_CheckExtension(Buffer, 'WGL_NV_video_out'); + WGL_NV_swap_group := Int_CheckExtension(Buffer, 'WGL_NV_swap_group'); + WGL_NV_gpu_affinity := Int_CheckExtension(Buffer, 'WGL_NV_gpu_affinity'); + WGL_OML_sync_control := Int_CheckExtension(Buffer, 'WGL_OML_sync_control'); + WGL_3DL_stereo_control := Int_CheckExtension(Buffer, 'WGL_3DL_stereo_control'); + + WIN_draw_range_elements := Int_CheckExtension(Buffer, 'WIN_draw_range_elements'); + WIN_swap_hint := Int_CheckExtension(Buffer, 'WIN_swap_hint'); + {$ENDIF} + + {$IFDEF DGL_LINUX} + // === GLX ===================================================================== + GLX_ARB_multisample := Int_CheckExtension(Buffer, 'GLX_ARB_multisample'); + GLX_ARB_fbconfig_float := Int_CheckExtension(Buffer, 'GLX_ARB_fbconfig_float'); + GLX_ARB_get_proc_address := Int_CheckExtension(Buffer, 'GLX_ARB_get_proc_address'); + GLX_ARB_create_context := Int_CheckExtension(Buffer, 'GLX_ARB_create_context'); + GLX_ARB_create_context_profile := Int_CheckExtension(Buffer, 'GLX_ARB_create_context_profile'); + GLX_EXT_visual_info := Int_CheckExtension(Buffer, 'GLX_EXT_visual_info'); + GLX_EXT_visual_rating := Int_CheckExtension(Buffer, 'GLX_EXT_visual_rating'); + GLX_EXT_import_context := Int_CheckExtension(Buffer, 'GLX_EXT_import_context'); + GLX_EXT_fbconfig_packed_float := Int_CheckExtension(Buffer, 'GLX_EXT_fbconfig_packed_float'); + GLX_EXT_framebuffer_sRGB := Int_CheckExtension(Buffer, 'GLX_EXT_framebuffer_sRGB'); + GLX_EXT_texture_from_pixmap := Int_CheckExtension(Buffer, 'GLX_EXT_texture_from_pixmap'); + {$ENDIF} + ImplementationRead := True; +end; + +{$IFDEF DGL_WIN} +// ============================================================================= +// RaiseLastOSError +// ============================================================================= +// Needed for compatibility with older Delphiversions +// ============================================================================= + +procedure RaiseLastOSError; +begin +{$IFDEF FPC} + raise Exception.Create('RaiseLastOSError!'); // To-Do: find a better solution +{$ELSE} + {$IFDEF DELPHI6_AND_DOWN} // If Delphi 6 or later + SysUtils.RaiseLastWin32Error; + {$ELSE} + SysUtils.RaiseLastOSError; + {$ENDIF} +{$ENDIF} +end; + +// ============================================================================= +// CreateRenderingContext +// ============================================================================= + +function CreateRenderingContext(DC: HDC; Options: TRCOptions; ColorBits, ZBits, StencilBits, AccumBits, AuxBuffers: Integer; Layer: Integer): HGLRC; +const + OBJ_MEMDC = 10; + OBJ_ENHMETADC = 12; + OBJ_METADC = 4; + PFD_DOUBLEBUFFER = $00000001; + PFD_STEREO = $00000002; + PFD_DRAW_TO_WINDOW = $00000004; + PFD_DRAW_TO_BITMAP = $00000008; + PFD_SUPPORT_GDI = $00000010; + PFD_SUPPORT_OPENGL = $00000020; + PFD_TYPE_RGBA = 0; + PFD_MAIN_PLANE = 0; + PFD_OVERLAY_PLANE = 1; + PFD_UNDERLAY_PLANE = LongWord(-1); + MemoryDCs = [OBJ_MEMDC, OBJ_METADC, OBJ_ENHMETADC]; +var + PFDescriptor: TPixelFormatDescriptor; + PixelFormat: Integer; + AType: DWORD; +begin + if GL_LibHandle = nil then + InitOpenGL; + + FillChar(PFDescriptor, SizeOf(PFDescriptor), 0); + + with PFDescriptor do + begin + nSize := SizeOf(PFDescriptor); + nVersion := 1; + dwFlags := PFD_SUPPORT_OPENGL; + + AType := GetObjectType(DC); + + if AType = 0 then + RaiseLastOSError; + + if AType in MemoryDCs then + dwFlags := dwFlags or PFD_DRAW_TO_BITMAP + else + dwFlags := dwFlags or PFD_DRAW_TO_WINDOW; + + if opDoubleBuffered in Options then + dwFlags := dwFlags or PFD_DOUBLEBUFFER; + + if opGDI in Options then + dwFlags := dwFlags or PFD_SUPPORT_GDI; + + if opStereo in Options then + dwFlags := dwFlags or PFD_STEREO; + + iPixelType := PFD_TYPE_RGBA; + cColorBits := ColorBits; + cDepthBits := zBits; + cStencilBits := StencilBits; + cAccumBits := AccumBits; + cAuxBuffers := AuxBuffers; + + if Layer = 0 then + iLayerType := PFD_MAIN_PLANE + else + if Layer > 0 then + iLayerType := PFD_OVERLAY_PLANE + else + iLayerType := Byte(PFD_UNDERLAY_PLANE); + end; + + PixelFormat := ChoosePixelFormat(DC, @PFDescriptor); + + if PixelFormat = 0 then + RaiseLastOSError; + + if GetPixelFormat(DC) <> PixelFormat then + if not SetPixelFormat(DC, PixelFormat, @PFDescriptor) then + RaiseLastOSError; + + DescribePixelFormat(DC, PixelFormat, SizeOf(PFDescriptor), PFDescriptor); + + Result := wglCreateContext(DC); + + if Result = 0 then + RaiseLastOSError + else + LastPixelFormat := 0; +end; + +// ============================================================================= +// DestroyRenderingContext +// ============================================================================= + +procedure DestroyRenderingContext(RC: HGLRC); +begin + wglDeleteContext(RC); +end; + + +// ============================================================================= +// ActivateRenderingContext +// ============================================================================= + +procedure ActivateRenderingContext(DC: HDC; RC: HGLRC; loadext: boolean = true); +begin + Assert((DC <> 0), 'DC must not be 0'); + Assert((RC <> 0), 'RC must not be 0'); + + wglMakeCurrent(DC, RC); + + {$ifdef DGL_TINY_HEADER} + ReadCoreVersion; + {$else} + ReadImplementationProperties; + + if (loadext) then + ReadExtensions; + {$endif} +end; + +// ============================================================================= +// DeactivateRenderingContext +// ============================================================================= + +procedure DeactivateRenderingContext; +begin + wglMakeCurrent(0, 0); +end; +{$ENDIF} + + +initialization + +{$IFDEF CPU386} + Set8087CW($133F); +{$ENDIF} + +finalization + +end. + diff --git a/src/lib/dgl/glExt.pas b/src/lib/dgl/glExt.pas new file mode 100644 index 0000000..462db17 --- /dev/null +++ b/src/lib/dgl/glExt.pas @@ -0,0 +1,9483 @@ +unit GLext; + +(************************************************** + * OpenGL extension loading library * + * Generated by MetaGLext, written by Tom Nuydens * + * (tom@delphi3d.net -- http://www.delphi3d.net * + **************************************************) + +//*** Generated on 2/22/2005 + +interface + +uses + Windows, SysUtils, GL; + +// Not present in Windows.pas. +function wglGetProcAddress(proc: PChar): Pointer; stdcall; external 'OpenGL32.dll'; + +// Test if the given extension name is present in the given extension string. +function glext_ExtensionSupported(const extension: String; const searchIn: String): Boolean; + +// Load the extension with the given name. +function glext_LoadExtension(ext: String): Boolean; + +// Some types that were introduced by extensions: +type + GLintptrARB = Integer; + PGLintptrARB = ^GLintptrARB; + + GLsizeiptrARB = Integer; + PGLsizeiptrARB = ^GLsizeiptrARB; + + GLcharARB = Char; + PGLcharARB = ^GLcharARB; + + GLhandleARB = Cardinal; + PGLhandleARB = ^GLhandleARB; + + GLintptr = Integer; + PGLintptr = ^GLintptr; + + GLsizeiptr = Integer; + PGLsizeiptr = ^GLsizeiptr; + + GLchar = Char; + PGLchar = ^GLchar; + +//***** GL_version_1_2 *****// +const + GL_UNSIGNED_BYTE_3_3_2 = $8032; + GL_UNSIGNED_SHORT_4_4_4_4 = $8033; + GL_UNSIGNED_SHORT_5_5_5_1 = $8034; + GL_UNSIGNED_INT_8_8_8_8 = $8035; + GL_UNSIGNED_INT_10_10_10_2 = $8036; + GL_RESCALE_NORMAL = $803A; + GL_UNSIGNED_BYTE_2_3_3_REV = $8362; + GL_UNSIGNED_SHORT_5_6_5 = $8363; + GL_UNSIGNED_SHORT_5_6_5_REV = $8364; + GL_UNSIGNED_SHORT_4_4_4_4_REV = $8365; + GL_UNSIGNED_SHORT_1_5_5_5_REV = $8366; + GL_UNSIGNED_INT_8_8_8_8_REV = $8367; + GL_UNSIGNED_INT_2_10_10_10_REV = $8368; + GL_BGR = $80E0; + GL_BGRA = $80E1; + GL_MAX_ELEMENTS_VERTICES = $80E8; + GL_MAX_ELEMENTS_INDICES = $80E9; + GL_CLAMP_TO_EDGE = $812F; + GL_TEXTURE_MIN_LOD = $813A; + GL_TEXTURE_MAX_LOD = $813B; + GL_TEXTURE_BASE_LEVEL = $813C; + GL_TEXTURE_MAX_LEVEL = $813D; + GL_LIGHT_MODEL_COLOR_CONTROL = $81F8; + GL_SINGLE_COLOR = $81F9; + GL_SEPARATE_SPECULAR_COLOR = $81FA; + GL_SMOOTH_POINT_SIZE_RANGE = $0B12; + GL_SMOOTH_POINT_SIZE_GRANULARITY = $0B13; + GL_SMOOTH_LINE_WIDTH_RANGE = $0B22; + GL_SMOOTH_LINE_WIDTH_GRANULARITY = $0B23; + GL_ALIASED_POINT_SIZE_RANGE = $846D; + GL_ALIASED_LINE_WIDTH_RANGE = $846E; + GL_PACK_SKIP_IMAGES = $806B; + GL_PACK_IMAGE_HEIGHT = $806C; + GL_UNPACK_SKIP_IMAGES = $806D; + GL_UNPACK_IMAGE_HEIGHT = $806E; + GL_TEXTURE_3D = $806F; + GL_PROXY_TEXTURE_3D = $8070; + GL_TEXTURE_DEPTH = $8071; + GL_TEXTURE_WRAP_R = $8072; + GL_MAX_3D_TEXTURE_SIZE = $8073; +var + glDrawRangeElements: procedure(mode: GLenum; start: GLuint; _end: GLuint; count: GLsizei; _type: GLenum; const indices: PGLvoid); stdcall = nil; + glTexImage3D: procedure(target: GLenum; level: GLint; internalformat: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; format: GLenum; _type: GLenum; const pixels: PGLvoid); stdcall = nil; + glTexSubImage3D: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid); stdcall = nil; + glCopyTexSubImage3D: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei); stdcall = nil; + +function Load_GL_version_1_2: Boolean; + +//***** GL_ARB_imaging *****// +const + GL_CONSTANT_COLOR = $8001; + GL_ONE_MINUS_CONSTANT_COLOR = $8002; + GL_CONSTANT_ALPHA = $8003; + GL_ONE_MINUS_CONSTANT_ALPHA = $8004; + GL_BLEND_COLOR = $8005; + GL_FUNC_ADD = $8006; + GL_MIN = $8007; + GL_MAX = $8008; + GL_BLEND_EQUATION = $8009; + GL_FUNC_SUBTRACT = $800A; + GL_FUNC_REVERSE_SUBTRACT = $800B; + GL_CONVOLUTION_1D = $8010; + GL_CONVOLUTION_2D = $8011; + GL_SEPARABLE_2D = $8012; + GL_CONVOLUTION_BORDER_MODE = $8013; + GL_CONVOLUTION_FILTER_SCALE = $8014; + GL_CONVOLUTION_FILTER_BIAS = $8015; + GL_REDUCE = $8016; + GL_CONVOLUTION_FORMAT = $8017; + GL_CONVOLUTION_WIDTH = $8018; + GL_CONVOLUTION_HEIGHT = $8019; + GL_MAX_CONVOLUTION_WIDTH = $801A; + GL_MAX_CONVOLUTION_HEIGHT = $801B; + GL_POST_CONVOLUTION_RED_SCALE = $801C; + GL_POST_CONVOLUTION_GREEN_SCALE = $801D; + GL_POST_CONVOLUTION_BLUE_SCALE = $801E; + GL_POST_CONVOLUTION_ALPHA_SCALE = $801F; + GL_POST_CONVOLUTION_RED_BIAS = $8020; + GL_POST_CONVOLUTION_GREEN_BIAS = $8021; + GL_POST_CONVOLUTION_BLUE_BIAS = $8022; + GL_POST_CONVOLUTION_ALPHA_BIAS = $8023; + GL_HISTOGRAM = $8024; + GL_PROXY_HISTOGRAM = $8025; + GL_HISTOGRAM_WIDTH = $8026; + GL_HISTOGRAM_FORMAT = $8027; + GL_HISTOGRAM_RED_SIZE = $8028; + GL_HISTOGRAM_GREEN_SIZE = $8029; + GL_HISTOGRAM_BLUE_SIZE = $802A; + GL_HISTOGRAM_ALPHA_SIZE = $802B; + GL_HISTOGRAM_LUMINANCE_SIZE = $802C; + GL_HISTOGRAM_SINK = $802D; + GL_MINMAX = $802E; + GL_MINMAX_FORMAT = $802F; + GL_MINMAX_SINK = $8030; + GL_TABLE_TOO_LARGE = $8031; + GL_COLOR_MATRIX = $80B1; + GL_COLOR_MATRIX_STACK_DEPTH = $80B2; + GL_MAX_COLOR_MATRIX_STACK_DEPTH = $80B3; + GL_POST_COLOR_MATRIX_RED_SCALE = $80B4; + GL_POST_COLOR_MATRIX_GREEN_SCALE = $80B5; + GL_POST_COLOR_MATRIX_BLUE_SCALE = $80B6; + GL_POST_COLOR_MATRIX_ALPHA_SCALE = $80B7; + GL_POST_COLOR_MATRIX_RED_BIAS = $80B8; + GL_POST_COLOR_MATRIX_GREEN_BIAS = $80B9; + GL_POST_COLOR_MATRIX_BLUE_BIAS = $80BA; + GL_POST_COLOR_MATIX_ALPHA_BIAS = $80BB; + GL_COLOR_TABLE = $80D0; + GL_POST_CONVOLUTION_COLOR_TABLE = $80D1; + GL_POST_COLOR_MATRIX_COLOR_TABLE = $80D2; + GL_PROXY_COLOR_TABLE = $80D3; + GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = $80D4; + GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = $80D5; + GL_COLOR_TABLE_SCALE = $80D6; + GL_COLOR_TABLE_BIAS = $80D7; + GL_COLOR_TABLE_FORMAT = $80D8; + GL_COLOR_TABLE_WIDTH = $80D9; + GL_COLOR_TABLE_RED_SIZE = $80DA; + GL_COLOR_TABLE_GREEN_SIZE = $80DB; + GL_COLOR_TABLE_BLUE_SIZE = $80DC; + GL_COLOR_TABLE_ALPHA_SIZE = $80DD; + GL_COLOR_TABLE_LUMINANCE_SIZE = $80DE; + GL_COLOR_TABLE_INTENSITY_SIZE = $80DF; + GL_IGNORE_BORDER = $8150; + GL_CONSTANT_BORDER = $8151; + GL_WRAP_BORDER = $8152; + GL_REPLICATE_BORDER = $8153; + GL_CONVOLUTION_BORDER_COLOR = $8154; +var + glColorTable: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; format: GLenum; _type: GLenum; const table: PGLvoid); stdcall = nil; + glColorTableParameterfv: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); stdcall = nil; + glColorTableParameteriv: procedure(target: GLenum; pname: GLenum; const params: PGLint); stdcall = nil; + glCopyColorTable: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei); stdcall = nil; + glGetColorTable: procedure(target: GLenum; format: GLenum; _type: GLenum; table: PGLvoid); stdcall = nil; + glGetColorTableParameterfv: procedure(target: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetColorTableParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glColorSubTable: procedure(target: GLenum; start: GLsizei; count: GLsizei; format: GLenum; _type: GLenum; const data: PGLvoid); stdcall = nil; + glCopyColorSubTable: procedure(target: GLenum; start: GLsizei; x: GLint; y: GLint; width: GLsizei); stdcall = nil; + glConvolutionFilter1D: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; format: GLenum; _type: GLenum; const image: PGLvoid); stdcall = nil; + glConvolutionFilter2D: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const image: PGLvoid); stdcall = nil; + glConvolutionParameterf: procedure(target: GLenum; pname: GLenum; params: GLfloat); stdcall = nil; + glConvolutionParameterfv: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); stdcall = nil; + glConvolutionParameteri: procedure(target: GLenum; pname: GLenum; params: GLint); stdcall = nil; + glConvolutionParameteriv: procedure(target: GLenum; pname: GLenum; const params: PGLint); stdcall = nil; + glCopyConvolutionFilter1D: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei); stdcall = nil; + glCopyConvolutionFilter2D: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; height: GLsizei); stdcall = nil; + glGetConvolutionFilter: procedure(target: GLenum; format: GLenum; _type: GLenum; image: PGLvoid); stdcall = nil; + glGetConvolutionParameterfv: procedure(target: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetConvolutionParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetSeparableFilter: procedure(target: GLenum; format: GLenum; _type: GLenum; row: PGLvoid; column: PGLvoid; span: PGLvoid); stdcall = nil; + glSeparableFilter2D: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const row: PGLvoid; const column: PGLvoid); stdcall = nil; + glGetHistogram: procedure(target: GLenum; reset: GLboolean; format: GLenum; _type: GLenum; values: PGLvoid); stdcall = nil; + glGetHistogramParameterfv: procedure(target: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetHistogramParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetMinmax: procedure(target: GLenum; reset: GLboolean; format: GLenum; _type: GLenum; values: PGLvoid); stdcall = nil; + glGetMinmaxParameterfv: procedure(target: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetMinmaxParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glHistogram: procedure(target: GLenum; width: GLsizei; internalformat: GLenum; sink: GLboolean); stdcall = nil; + glMinmax: procedure(target: GLenum; internalformat: GLenum; sink: GLboolean); stdcall = nil; + glResetHistogram: procedure(target: GLenum); stdcall = nil; + glResetMinmax: procedure(target: GLenum); stdcall = nil; + glBlendEquation: procedure(mode: GLenum); stdcall = nil; + glBlendColor: procedure(red: GLclampf; green: GLclampf; blue: GLclampf; alpha: GLclampf); stdcall = nil; + +function Load_GL_ARB_imaging: Boolean; + +//***** GL_version_1_3 *****// +const + GL_TEXTURE0 = $84C0; + GL_TEXTURE1 = $84C1; + GL_TEXTURE2 = $84C2; + GL_TEXTURE3 = $84C3; + GL_TEXTURE4 = $84C4; + GL_TEXTURE5 = $84C5; + GL_TEXTURE6 = $84C6; + GL_TEXTURE7 = $84C7; + GL_TEXTURE8 = $84C8; + GL_TEXTURE9 = $84C9; + GL_TEXTURE10 = $84CA; + GL_TEXTURE11 = $84CB; + GL_TEXTURE12 = $84CC; + GL_TEXTURE13 = $84CD; + GL_TEXTURE14 = $84CE; + GL_TEXTURE15 = $84CF; + GL_TEXTURE16 = $84D0; + GL_TEXTURE17 = $84D1; + GL_TEXTURE18 = $84D2; + GL_TEXTURE19 = $84D3; + GL_TEXTURE20 = $84D4; + GL_TEXTURE21 = $84D5; + GL_TEXTURE22 = $84D6; + GL_TEXTURE23 = $84D7; + GL_TEXTURE24 = $84D8; + GL_TEXTURE25 = $84D9; + GL_TEXTURE26 = $84DA; + GL_TEXTURE27 = $84DB; + GL_TEXTURE28 = $84DC; + GL_TEXTURE29 = $84DD; + GL_TEXTURE30 = $84DE; + GL_TEXTURE31 = $84DF; + GL_ACTIVE_TEXTURE = $84E0; + GL_CLIENT_ACTIVE_TEXTURE = $84E1; + GL_MAX_TEXTURE_UNITS = $84E2; + GL_TRANSPOSE_MODELVIEW_MATRIX = $84E3; + GL_TRANSPOSE_PROJECTION_MATRIX = $84E4; + GL_TRANSPOSE_TEXTURE_MATRIX = $84E5; + GL_TRANSPOSE_COLOR_MATRIX = $84E6; + GL_MULTISAMPLE = $809D; + GL_SAMPLE_ALPHA_TO_COVERAGE = $809E; + GL_SAMPLE_ALPHA_TO_ONE = $809F; + GL_SAMPLE_COVERAGE = $80A0; + GL_SAMPLE_BUFFERS = $80A8; + GL_SAMPLES = $80A9; + GL_SAMPLE_COVERAGE_VALUE = $80AA; + GL_SAMPLE_COVERAGE_INVERT = $80AB; + GL_MULTISAMPLE_BIT = $20000000; + GL_NORMAL_MAP = $8511; + GL_REFLECTION_MAP = $8512; + GL_TEXTURE_CUBE_MAP = $8513; + GL_TEXTURE_BINDING_CUBE_MAP = $8514; + GL_TEXTURE_CUBE_MAP_POSITIVE_X = $8515; + GL_TEXTURE_CUBE_MAP_NEGATIVE_X = $8516; + GL_TEXTURE_CUBE_MAP_POSITIVE_Y = $8517; + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = $8518; + GL_TEXTURE_CUBE_MAP_POSITIVE_Z = $8519; + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = $851A; + GL_PROXY_TEXTURE_CUBE_MAP = $851B; + GL_MAX_CUBE_MAP_TEXTURE_SIZE = $851C; + GL_COMPRESSED_ALPHA = $84E9; + GL_COMPRESSED_LUMINANCE = $84EA; + GL_COMPRESSED_LUMINANCE_ALPHA = $84EB; + GL_COMPRESSED_INTENSITY = $84EC; + GL_COMPRESSED_RGB = $84ED; + GL_COMPRESSED_RGBA = $84EE; + GL_TEXTURE_COMPRESSION_HINT = $84EF; + GL_TEXTURE_COMPRESSED_IMAGE_SIZE = $86A0; + GL_TEXTURE_COMPRESSED = $86A1; + GL_NUM_COMPRESSED_TEXTURE_FORMATS = $86A2; + GL_COMPRESSED_TEXTURE_FORMATS = $86A3; + GL_CLAMP_TO_BORDER = $812D; + GL_CLAMP_TO_BORDER_SGIS = $812D; + GL_COMBINE = $8570; + GL_COMBINE_RGB = $8571; + GL_COMBINE_ALPHA = $8572; + GL_SOURCE0_RGB = $8580; + GL_SOURCE1_RGB = $8581; + GL_SOURCE2_RGB = $8582; + GL_SOURCE0_ALPHA = $8588; + GL_SOURCE1_ALPHA = $8589; + GL_SOURCE2_ALPHA = $858A; + GL_OPERAND0_RGB = $8590; + GL_OPERAND1_RGB = $8591; + GL_OPERAND2_RGB = $8592; + GL_OPERAND0_ALPHA = $8598; + GL_OPERAND1_ALPHA = $8599; + GL_OPERAND2_ALPHA = $859A; + GL_RGB_SCALE = $8573; + GL_ADD_SIGNED = $8574; + GL_INTERPOLATE = $8575; + GL_SUBTRACT = $84E7; + GL_CONSTANT = $8576; + GL_PRIMARY_COLOR = $8577; + GL_PREVIOUS = $8578; + GL_DOT3_RGB = $86AE; + GL_DOT3_RGBA = $86AF; +var + glActiveTexture: procedure(texture: GLenum); stdcall = nil; + glClientActiveTexture: procedure(texture: GLenum); stdcall = nil; + glMultiTexCoord1d: procedure(target: GLenum; s: GLdouble); stdcall = nil; + glMultiTexCoord1dv: procedure(target: GLenum; const v: PGLdouble); stdcall = nil; + glMultiTexCoord1f: procedure(target: GLenum; s: GLfloat); stdcall = nil; + glMultiTexCoord1fv: procedure(target: GLenum; const v: PGLfloat); stdcall = nil; + glMultiTexCoord1i: procedure(target: GLenum; s: GLint); stdcall = nil; + glMultiTexCoord1iv: procedure(target: GLenum; const v: PGLint); stdcall = nil; + glMultiTexCoord1s: procedure(target: GLenum; s: GLshort); stdcall = nil; + glMultiTexCoord1sv: procedure(target: GLenum; const v: PGLshort); stdcall = nil; + glMultiTexCoord2d: procedure(target: GLenum; s: GLdouble; t: GLdouble); stdcall = nil; + glMultiTexCoord2dv: procedure(target: GLenum; const v: PGLdouble); stdcall = nil; + glMultiTexCoord2f: procedure(target: GLenum; s: GLfloat; t: GLfloat); stdcall = nil; + glMultiTexCoord2fv: procedure(target: GLenum; const v: PGLfloat); stdcall = nil; + glMultiTexCoord2i: procedure(target: GLenum; s: GLint; t: GLint); stdcall = nil; + glMultiTexCoord2iv: procedure(target: GLenum; const v: PGLint); stdcall = nil; + glMultiTexCoord2s: procedure(target: GLenum; s: GLshort; t: GLshort); stdcall = nil; + glMultiTexCoord2sv: procedure(target: GLenum; const v: PGLshort); stdcall = nil; + glMultiTexCoord3d: procedure(target: GLenum; s: GLdouble; t: GLdouble; r: GLdouble); stdcall = nil; + glMultiTexCoord3dv: procedure(target: GLenum; const v: PGLdouble); stdcall = nil; + glMultiTexCoord3f: procedure(target: GLenum; s: GLfloat; t: GLfloat; r: GLfloat); stdcall = nil; + glMultiTexCoord3fv: procedure(target: GLenum; const v: PGLfloat); stdcall = nil; + glMultiTexCoord3i: procedure(target: GLenum; s: GLint; t: GLint; r: GLint); stdcall = nil; + glMultiTexCoord3iv: procedure(target: GLenum; const v: PGLint); stdcall = nil; + glMultiTexCoord3s: procedure(target: GLenum; s: GLshort; t: GLshort; r: GLshort); stdcall = nil; + glMultiTexCoord3sv: procedure(target: GLenum; const v: PGLshort); stdcall = nil; + glMultiTexCoord4d: procedure(target: GLenum; s: GLdouble; t: GLdouble; r: GLdouble; q: GLdouble); stdcall = nil; + glMultiTexCoord4dv: procedure(target: GLenum; const v: PGLdouble); stdcall = nil; + glMultiTexCoord4f: procedure(target: GLenum; s: GLfloat; t: GLfloat; r: GLfloat; q: GLfloat); stdcall = nil; + glMultiTexCoord4fv: procedure(target: GLenum; const v: PGLfloat); stdcall = nil; + glMultiTexCoord4i: procedure(target: GLenum; s: GLint; t: GLint; r: GLint; q: GLint); stdcall = nil; + glMultiTexCoord4iv: procedure(target: GLenum; const v: PGLint); stdcall = nil; + glMultiTexCoord4s: procedure(target: GLenum; s: GLshort; t: GLshort; r: GLshort; q: GLshort); stdcall = nil; + glMultiTexCoord4sv: procedure(target: GLenum; const v: PGLshort); stdcall = nil; + glLoadTransposeMatrixf: procedure(const m: PGLfloat); stdcall = nil; + glLoadTransposeMatrixd: procedure(const m: PGLdouble); stdcall = nil; + glMultTransposeMatrixf: procedure(const m: PGLfloat); stdcall = nil; + glMultTransposeMatrixd: procedure(const m: PGLdouble); stdcall = nil; + glSampleCoverage: procedure(value: GLclampf; invert: GLboolean); stdcall = nil; + glCompressedTexImage3D: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glCompressedTexImage2D: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glCompressedTexImage1D: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glCompressedTexSubImage3D: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glCompressedTexSubImage2D: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glCompressedTexSubImage1D: procedure(target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glGetCompressedTexImage: procedure(target: GLenum; level: GLint; img: PGLvoid); stdcall = nil; + +function Load_GL_version_1_3: Boolean; + +//***** GL_ARB_multitexture *****// +const + GL_TEXTURE0_ARB = $84C0; + GL_TEXTURE1_ARB = $84C1; + GL_TEXTURE2_ARB = $84C2; + GL_TEXTURE3_ARB = $84C3; + GL_TEXTURE4_ARB = $84C4; + GL_TEXTURE5_ARB = $84C5; + GL_TEXTURE6_ARB = $84C6; + GL_TEXTURE7_ARB = $84C7; + GL_TEXTURE8_ARB = $84C8; + GL_TEXTURE9_ARB = $84C9; + GL_TEXTURE10_ARB = $84CA; + GL_TEXTURE11_ARB = $84CB; + GL_TEXTURE12_ARB = $84CC; + GL_TEXTURE13_ARB = $84CD; + GL_TEXTURE14_ARB = $84CE; + GL_TEXTURE15_ARB = $84CF; + GL_TEXTURE16_ARB = $84D0; + GL_TEXTURE17_ARB = $84D1; + GL_TEXTURE18_ARB = $84D2; + GL_TEXTURE19_ARB = $84D3; + GL_TEXTURE20_ARB = $84D4; + GL_TEXTURE21_ARB = $84D5; + GL_TEXTURE22_ARB = $84D6; + GL_TEXTURE23_ARB = $84D7; + GL_TEXTURE24_ARB = $84D8; + GL_TEXTURE25_ARB = $84D9; + GL_TEXTURE26_ARB = $84DA; + GL_TEXTURE27_ARB = $84DB; + GL_TEXTURE28_ARB = $84DC; + GL_TEXTURE29_ARB = $84DD; + GL_TEXTURE30_ARB = $84DE; + GL_TEXTURE31_ARB = $84DF; + GL_ACTIVE_TEXTURE_ARB = $84E0; + GL_CLIENT_ACTIVE_TEXTURE_ARB = $84E1; + GL_MAX_TEXTURE_UNITS_ARB = $84E2; +var + glActiveTextureARB: procedure(texture: GLenum); stdcall = nil; + glClientActiveTextureARB: procedure(texture: GLenum); stdcall = nil; + glMultiTexCoord1dARB: procedure(target: GLenum; s: GLdouble); stdcall = nil; + glMultiTexCoord1dvARB: procedure(target: GLenum; const v: PGLdouble); stdcall = nil; + glMultiTexCoord1fARB: procedure(target: GLenum; s: GLfloat); stdcall = nil; + glMultiTexCoord1fvARB: procedure(target: GLenum; const v: PGLfloat); stdcall = nil; + glMultiTexCoord1iARB: procedure(target: GLenum; s: GLint); stdcall = nil; + glMultiTexCoord1ivARB: procedure(target: GLenum; const v: PGLint); stdcall = nil; + glMultiTexCoord1sARB: procedure(target: GLenum; s: GLshort); stdcall = nil; + glMultiTexCoord1svARB: procedure(target: GLenum; const v: PGLshort); stdcall = nil; + glMultiTexCoord2dARB: procedure(target: GLenum; s: GLdouble; t: GLdouble); stdcall = nil; + glMultiTexCoord2dvARB: procedure(target: GLenum; const v: PGLdouble); stdcall = nil; + glMultiTexCoord2fARB: procedure(target: GLenum; s: GLfloat; t: GLfloat); stdcall = nil; + glMultiTexCoord2fvARB: procedure(target: GLenum; const v: PGLfloat); stdcall = nil; + glMultiTexCoord2iARB: procedure(target: GLenum; s: GLint; t: GLint); stdcall = nil; + glMultiTexCoord2ivARB: procedure(target: GLenum; const v: PGLint); stdcall = nil; + glMultiTexCoord2sARB: procedure(target: GLenum; s: GLshort; t: GLshort); stdcall = nil; + glMultiTexCoord2svARB: procedure(target: GLenum; const v: PGLshort); stdcall = nil; + glMultiTexCoord3dARB: procedure(target: GLenum; s: GLdouble; t: GLdouble; r: GLdouble); stdcall = nil; + glMultiTexCoord3dvARB: procedure(target: GLenum; const v: PGLdouble); stdcall = nil; + glMultiTexCoord3fARB: procedure(target: GLenum; s: GLfloat; t: GLfloat; r: GLfloat); stdcall = nil; + glMultiTexCoord3fvARB: procedure(target: GLenum; const v: PGLfloat); stdcall = nil; + glMultiTexCoord3iARB: procedure(target: GLenum; s: GLint; t: GLint; r: GLint); stdcall = nil; + glMultiTexCoord3ivARB: procedure(target: GLenum; const v: PGLint); stdcall = nil; + glMultiTexCoord3sARB: procedure(target: GLenum; s: GLshort; t: GLshort; r: GLshort); stdcall = nil; + glMultiTexCoord3svARB: procedure(target: GLenum; const v: PGLshort); stdcall = nil; + glMultiTexCoord4dARB: procedure(target: GLenum; s: GLdouble; t: GLdouble; r: GLdouble; q: GLdouble); stdcall = nil; + glMultiTexCoord4dvARB: procedure(target: GLenum; const v: PGLdouble); stdcall = nil; + glMultiTexCoord4fARB: procedure(target: GLenum; s: GLfloat; t: GLfloat; r: GLfloat; q: GLfloat); stdcall = nil; + glMultiTexCoord4fvARB: procedure(target: GLenum; const v: PGLfloat); stdcall = nil; + glMultiTexCoord4iARB: procedure(target: GLenum; s: GLint; t: GLint; r: GLint; q: GLint); stdcall = nil; + glMultiTexCoord4ivARB: procedure(target: GLenum; const v: PGLint); stdcall = nil; + glMultiTexCoord4sARB: procedure(target: GLenum; s: GLshort; t: GLshort; r: GLshort; q: GLshort); stdcall = nil; + glMultiTexCoord4svARB: procedure(target: GLenum; const v: PGLshort); stdcall = nil; + +function Load_GL_ARB_multitexture: Boolean; + +//***** GL_ARB_transpose_matrix *****// +const + GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = $84E3; + GL_TRANSPOSE_PROJECTION_MATRIX_ARB = $84E4; + GL_TRANSPOSE_TEXTURE_MATRIX_ARB = $84E5; + GL_TRANSPOSE_COLOR_MATRIX_ARB = $84E6; +var + glLoadTransposeMatrixfARB: procedure(m: PGLfloat); stdcall = nil; + glLoadTransposeMatrixdARB: procedure(m: PGLdouble); stdcall = nil; + glMultTransposeMatrixfARB: procedure(m: PGLfloat); stdcall = nil; + glMultTransposeMatrixdARB: procedure(m: PGLdouble); stdcall = nil; + +function Load_GL_ARB_transpose_matrix: Boolean; + +//***** GL_ARB_multisample *****// +const + WGL_SAMPLE_BUFFERS_ARB = $2041; + WGL_SAMPLES_ARB = $2042; + GL_MULTISAMPLE_ARB = $809D; + GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = $809E; + GL_SAMPLE_ALPHA_TO_ONE_ARB = $809F; + GL_SAMPLE_COVERAGE_ARB = $80A0; + GL_MULTISAMPLE_BIT_ARB = $20000000; + GL_SAMPLE_BUFFERS_ARB = $80A8; + GL_SAMPLES_ARB = $80A9; + GL_SAMPLE_COVERAGE_VALUE_ARB = $80AA; + GL_SAMPLE_COVERAGE_INVERT_ARB = $80AB; +var + glSampleCoverageARB: procedure(value: GLclampf; invert: GLboolean); stdcall = nil; + +function Load_GL_ARB_multisample: Boolean; + +//***** GL_ARB_texture_env_add *****// + +function Load_GL_ARB_texture_env_add: Boolean; + +//***** WGL_ARB_extensions_string *****// +var + wglGetExtensionsStringARB: function(hdc: HDC): Pchar; stdcall = nil; + +function Load_WGL_ARB_extensions_string: Boolean; + +//***** WGL_ARB_buffer_region *****// +const + WGL_FRONT_COLOR_BUFFER_BIT_ARB = $0001; + WGL_BACK_COLOR_BUFFER_BIT_ARB = $0002; + WGL_DEPTH_BUFFER_BIT_ARB = $0004; + WGL_STENCIL_BUFFER_BIT_ARB = $0008; +var + wglCreateBufferRegionARB: function(hDC: HDC; iLayerPlane: GLint; uType: GLuint): THandle; stdcall = nil; + wglDeleteBufferRegionARB: procedure(hRegion: THandle); stdcall = nil; + wglSaveBufferRegionARB: function(hRegion: THandle; x: GLint; y: GLint; width: GLint; height: GLint): BOOL; stdcall = nil; + wglRestoreBufferRegionARB: function(hRegion: THandle; x: GLint; y: GLint; width: GLint; height: GLint; xSrc: GLint; ySrc: GLint): BOOL; stdcall = nil; + +function Load_WGL_ARB_buffer_region: Boolean; + +//***** GL_ARB_texture_cube_map *****// +const + GL_NORMAL_MAP_ARB = $8511; + GL_REFLECTION_MAP_ARB = $8512; + GL_TEXTURE_CUBE_MAP_ARB = $8513; + GL_TEXTURE_BINDING_CUBE_MAP_ARB = $8514; + GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = $8515; + GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = $8516; + GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = $8517; + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = $8518; + GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = $8519; + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = $851A; + GL_PROXY_TEXTURE_CUBE_MAP_ARB = $851B; + GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = $851C; + +function Load_GL_ARB_texture_cube_map: Boolean; + +//***** GL_ARB_depth_texture *****// +const + GL_DEPTH_COMPONENT16_ARB = $81A5; + GL_DEPTH_COMPONENT24_ARB = $81A6; + GL_DEPTH_COMPONENT32_ARB = $81A7; + GL_TEXTURE_DEPTH_SIZE_ARB = $884A; + GL_DEPTH_TEXTURE_MODE_ARB = $884B; + +function Load_GL_ARB_depth_texture: Boolean; + +//***** GL_ARB_point_parameters *****// +const + GL_POINT_SIZE_MIN_ARB = $8126; + GL_POINT_SIZE_MAX_ARB = $8127; + GL_POINT_FADE_THRESHOLD_SIZE_ARB = $8128; + GL_POINT_DISTANCE_ATTENUATION_ARB = $8129; +var + glPointParameterfARB: procedure(pname: GLenum; param: GLfloat); stdcall = nil; + glPointParameterfvARB: procedure(pname: GLenum; params: PGLfloat); stdcall = nil; + +function Load_GL_ARB_point_parameters: Boolean; + +//***** GL_ARB_shadow *****// +const + GL_TEXTURE_COMPARE_MODE_ARB = $884C; + GL_TEXTURE_COMPARE_FUNC_ARB = $884D; + GL_COMPARE_R_TO_TEXTURE_ARB = $884E; + +function Load_GL_ARB_shadow: Boolean; + +//***** GL_ARB_shadow_ambient *****// +const + GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = $80BF; + +function Load_GL_ARB_shadow_ambient: Boolean; + +//***** GL_ARB_texture_border_clamp *****// +const + GL_CLAMP_TO_BORDER_ARB = $812D; + +function Load_GL_ARB_texture_border_clamp: Boolean; + +//***** GL_ARB_texture_compression *****// +const + GL_COMPRESSED_ALPHA_ARB = $84E9; + GL_COMPRESSED_LUMINANCE_ARB = $84EA; + GL_COMPRESSED_LUMINANCE_ALPHA_ARB = $84EB; + GL_COMPRESSED_INTENSITY_ARB = $84EC; + GL_COMPRESSED_RGB_ARB = $84ED; + GL_COMPRESSED_RGBA_ARB = $84EE; + GL_TEXTURE_COMPRESSION_HINT_ARB = $84EF; + GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = $86A0; + GL_TEXTURE_COMPRESSED_ARB = $86A1; + GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = $86A2; + GL_COMPRESSED_TEXTURE_FORMATS_ARB = $86A3; +var + glCompressedTexImage3DARB: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glCompressedTexImage2DARB: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glCompressedTexImage1DARB: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glCompressedTexSubImage3DARB: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glCompressedTexSubImage2DARB: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glCompressedTexSubImage1DARB: procedure(target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); stdcall = nil; + glGetCompressedTexImageARB: procedure(target: GLenum; lod: GLint; img: PGLvoid); stdcall = nil; + +function Load_GL_ARB_texture_compression: Boolean; + +//***** GL_ARB_texture_env_combine *****// +const + GL_COMBINE_ARB = $8570; + GL_COMBINE_RGB_ARB = $8571; + GL_COMBINE_ALPHA_ARB = $8572; + GL_SOURCE0_RGB_ARB = $8580; + GL_SOURCE1_RGB_ARB = $8581; + GL_SOURCE2_RGB_ARB = $8582; + GL_SOURCE0_ALPHA_ARB = $8588; + GL_SOURCE1_ALPHA_ARB = $8589; + GL_SOURCE2_ALPHA_ARB = $858A; + GL_OPERAND0_RGB_ARB = $8590; + GL_OPERAND1_RGB_ARB = $8591; + GL_OPERAND2_RGB_ARB = $8592; + GL_OPERAND0_ALPHA_ARB = $8598; + GL_OPERAND1_ALPHA_ARB = $8599; + GL_OPERAND2_ALPHA_ARB = $859A; + GL_RGB_SCALE_ARB = $8573; + GL_ADD_SIGNED_ARB = $8574; + GL_INTERPOLATE_ARB = $8575; + GL_SUBTRACT_ARB = $84E7; + GL_CONSTANT_ARB = $8576; + GL_PRIMARY_COLOR_ARB = $8577; + GL_PREVIOUS_ARB = $8578; + +function Load_GL_ARB_texture_env_combine: Boolean; + +//***** GL_ARB_texture_env_crossbar *****// + +function Load_GL_ARB_texture_env_crossbar: Boolean; + +//***** GL_ARB_texture_env_dot3 *****// +const + GL_DOT3_RGB_ARB = $86AE; + GL_DOT3_RGBA_ARB = $86AF; + +function Load_GL_ARB_texture_env_dot3: Boolean; + +//***** GL_ARB_texture_mirrored_repeat *****// +const + GL_MIRRORED_REPEAT_ARB = $8370; + +function Load_GL_ARB_texture_mirrored_repeat: Boolean; + +//***** GL_ARB_vertex_blend *****// +const + GL_MAX_VERTEX_UNITS_ARB = $86A4; + GL_ACTIVE_VERTEX_UNITS_ARB = $86A5; + GL_WEIGHT_SUM_UNITY_ARB = $86A6; + GL_VERTEX_BLEND_ARB = $86A7; + GL_MODELVIEW0_ARB = $1700; + GL_MODELVIEW1_ARB = $850A; + GL_MODELVIEW2_ARB = $8722; + GL_MODELVIEW3_ARB = $8723; + GL_MODELVIEW4_ARB = $8724; + GL_MODELVIEW5_ARB = $8725; + GL_MODELVIEW6_ARB = $8726; + GL_MODELVIEW7_ARB = $8727; + GL_MODELVIEW8_ARB = $8728; + GL_MODELVIEW9_ARB = $8729; + GL_MODELVIEW10_ARB = $872A; + GL_MODELVIEW11_ARB = $872B; + GL_MODELVIEW12_ARB = $872C; + GL_MODELVIEW13_ARB = $872D; + GL_MODELVIEW14_ARB = $872E; + GL_MODELVIEW15_ARB = $872F; + GL_MODELVIEW16_ARB = $8730; + GL_MODELVIEW17_ARB = $8731; + GL_MODELVIEW18_ARB = $8732; + GL_MODELVIEW19_ARB = $8733; + GL_MODELVIEW20_ARB = $8734; + GL_MODELVIEW21_ARB = $8735; + GL_MODELVIEW22_ARB = $8736; + GL_MODELVIEW23_ARB = $8737; + GL_MODELVIEW24_ARB = $8738; + GL_MODELVIEW25_ARB = $8739; + GL_MODELVIEW26_ARB = $873A; + GL_MODELVIEW27_ARB = $873B; + GL_MODELVIEW28_ARB = $873C; + GL_MODELVIEW29_ARB = $873D; + GL_MODELVIEW30_ARB = $873E; + GL_MODELVIEW31_ARB = $873F; + GL_CURRENT_WEIGHT_ARB = $86A8; + GL_WEIGHT_ARRAY_TYPE_ARB = $86A9; + GL_WEIGHT_ARRAY_STRIDE_ARB = $86AA; + GL_WEIGHT_ARRAY_SIZE_ARB = $86AB; + GL_WEIGHT_ARRAY_POINTER_ARB = $86AC; + GL_WEIGHT_ARRAY_ARB = $86AD; +var + glWeightbvARB: procedure(size: GLint; weights: PGLbyte); stdcall = nil; + glWeightsvARB: procedure(size: GLint; weights: PGLshort); stdcall = nil; + glWeightivARB: procedure(size: GLint; weights: PGLint); stdcall = nil; + glWeightfvARB: procedure(size: GLint; weights: PGLfloat); stdcall = nil; + glWeightdvARB: procedure(size: GLint; weights: PGLdouble); stdcall = nil; + glWeightvARB: procedure(size: GLint; weights: PGLdouble); stdcall = nil; + glWeightubvARB: procedure(size: GLint; weights: PGLubyte); stdcall = nil; + glWeightusvARB: procedure(size: GLint; weights: PGLushort); stdcall = nil; + glWeightuivARB: procedure(size: GLint; weights: PGLuint); stdcall = nil; + glWeightPointerARB: procedure(size: GLint; _type: GLenum; stride: GLsizei; pointer: PGLvoid); stdcall = nil; + glVertexBlendARB: procedure(count: GLint); stdcall = nil; + +function Load_GL_ARB_vertex_blend: Boolean; + +//***** GL_ARB_vertex_program *****// +const + GL_VERTEX_PROGRAM_ARB = $8620; + GL_VERTEX_PROGRAM_POINT_SIZE_ARB = $8642; + GL_VERTEX_PROGRAM_TWO_SIDE_ARB = $8643; + GL_COLOR_SUM_ARB = $8458; + GL_PROGRAM_FORMAT_ASCII_ARB = $8875; + GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = $8622; + GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = $8623; + GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = $8624; + GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = $8625; + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = $886A; + GL_CURRENT_VERTEX_ATTRIB_ARB = $8626; + GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = $8645; + GL_PROGRAM_LENGTH_ARB = $8627; + GL_PROGRAM_FORMAT_ARB = $8876; + GL_PROGRAM_BINDING_ARB = $8677; + GL_PROGRAM_INSTRUCTIONS_ARB = $88A0; + GL_MAX_PROGRAM_INSTRUCTIONS_ARB = $88A1; + GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = $88A2; + GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = $88A3; + GL_PROGRAM_TEMPORARIES_ARB = $88A4; + GL_MAX_PROGRAM_TEMPORARIES_ARB = $88A5; + GL_PROGRAM_NATIVE_TEMPORARIES_ARB = $88A6; + GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = $88A7; + GL_PROGRAM_PARAMETERS_ARB = $88A8; + GL_MAX_PROGRAM_PARAMETERS_ARB = $88A9; + GL_PROGRAM_NATIVE_PARAMETERS_ARB = $88AA; + GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = $88AB; + GL_PROGRAM_ATTRIBS_ARB = $88AC; + GL_MAX_PROGRAM_ATTRIBS_ARB = $88AD; + GL_PROGRAM_NATIVE_ATTRIBS_ARB = $88AE; + GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = $88AF; + GL_PROGRAM_ADDRESS_REGISTERS_ARB = $88B0; + GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = $88B1; + GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = $88B2; + GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = $88B3; + GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = $88B4; + GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = $88B5; + GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = $88B6; + GL_PROGRAM_STRING_ARB = $8628; + GL_PROGRAM_ERROR_POSITION_ARB = $864B; + GL_CURRENT_MATRIX_ARB = $8641; + GL_TRANSPOSE_CURRENT_MATRIX_ARB = $88B7; + GL_CURRENT_MATRIX_STACK_DEPTH_ARB = $8640; + GL_MAX_VERTEX_ATTRIBS_ARB = $8869; + GL_MAX_PROGRAM_MATRICES_ARB = $862F; + GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = $862E; + GL_PROGRAM_ERROR_STRING_ARB = $8874; + GL_MATRIX0_ARB = $88C0; + GL_MATRIX1_ARB = $88C1; + GL_MATRIX2_ARB = $88C2; + GL_MATRIX3_ARB = $88C3; + GL_MATRIX4_ARB = $88C4; + GL_MATRIX5_ARB = $88C5; + GL_MATRIX6_ARB = $88C6; + GL_MATRIX7_ARB = $88C7; + GL_MATRIX8_ARB = $88C8; + GL_MATRIX9_ARB = $88C9; + GL_MATRIX10_ARB = $88CA; + GL_MATRIX11_ARB = $88CB; + GL_MATRIX12_ARB = $88CC; + GL_MATRIX13_ARB = $88CD; + GL_MATRIX14_ARB = $88CE; + GL_MATRIX15_ARB = $88CF; + GL_MATRIX16_ARB = $88D0; + GL_MATRIX17_ARB = $88D1; + GL_MATRIX18_ARB = $88D2; + GL_MATRIX19_ARB = $88D3; + GL_MATRIX20_ARB = $88D4; + GL_MATRIX21_ARB = $88D5; + GL_MATRIX22_ARB = $88D6; + GL_MATRIX23_ARB = $88D7; + GL_MATRIX24_ARB = $88D8; + GL_MATRIX25_ARB = $88D9; + GL_MATRIX26_ARB = $88DA; + GL_MATRIX27_ARB = $88DB; + GL_MATRIX28_ARB = $88DC; + GL_MATRIX29_ARB = $88DD; + GL_MATRIX30_ARB = $88DE; + GL_MATRIX31_ARB = $88DF; +var + glVertexAttrib1sARB: procedure(index: GLuint; x: GLshort); stdcall = nil; + glVertexAttrib1fARB: procedure(index: GLuint; x: GLfloat); stdcall = nil; + glVertexAttrib1dARB: procedure(index: GLuint; x: GLdouble); stdcall = nil; + glVertexAttrib2sARB: procedure(index: GLuint; x: GLshort; y: GLshort); stdcall = nil; + glVertexAttrib2fARB: procedure(index: GLuint; x: GLfloat; y: GLfloat); stdcall = nil; + glVertexAttrib2dARB: procedure(index: GLuint; x: GLdouble; y: GLdouble); stdcall = nil; + glVertexAttrib3sARB: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort); stdcall = nil; + glVertexAttrib3fARB: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glVertexAttrib3dARB: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble); stdcall = nil; + glVertexAttrib4sARB: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort; w: GLshort); stdcall = nil; + glVertexAttrib4fARB: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); stdcall = nil; + glVertexAttrib4dARB: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); stdcall = nil; + glVertexAttrib4NubARB: procedure(index: GLuint; x: GLubyte; y: GLubyte; z: GLubyte; w: GLubyte); stdcall = nil; + glVertexAttrib1svARB: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib1fvARB: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib1dvARB: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib2svARB: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib2fvARB: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib2dvARB: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib3svARB: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib3fvARB: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib3dvARB: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib4bvARB: procedure(index: GLuint; const v: PGLbyte); stdcall = nil; + glVertexAttrib4svARB: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib4ivARB: procedure(index: GLuint; const v: PGLint); stdcall = nil; + glVertexAttrib4ubvARB: procedure(index: GLuint; const v: PGLubyte); stdcall = nil; + glVertexAttrib4usvARB: procedure(index: GLuint; const v: PGLushort); stdcall = nil; + glVertexAttrib4uivARB: procedure(index: GLuint; const v: PGLuint); stdcall = nil; + glVertexAttrib4fvARB: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib4dvARB: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib4NbvARB: procedure(index: GLuint; const v: PGLbyte); stdcall = nil; + glVertexAttrib4NsvARB: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib4NivARB: procedure(index: GLuint; const v: PGLint); stdcall = nil; + glVertexAttrib4NubvARB: procedure(index: GLuint; const v: PGLubyte); stdcall = nil; + glVertexAttrib4NusvARB: procedure(index: GLuint; const v: PGLushort); stdcall = nil; + glVertexAttrib4NuivARB: procedure(index: GLuint; const v: PGLuint); stdcall = nil; + glVertexAttribPointerARB: procedure(index: GLuint; size: GLint; _type: GLenum; normalized: GLboolean; stride: GLsizei; const pointer: PGLvoid); stdcall = nil; + glEnableVertexAttribArrayARB: procedure(index: GLuint); stdcall = nil; + glDisableVertexAttribArrayARB: procedure(index: GLuint); stdcall = nil; + glProgramStringARB: procedure(target: GLenum; format: GLenum; len: GLsizei; const _string: PGLvoid); stdcall = nil; + glBindProgramARB: procedure(target: GLenum; _program: GLuint); stdcall = nil; + glDeleteProgramsARB: procedure(n: GLsizei; const programs: PGLuint); stdcall = nil; + glGenProgramsARB: procedure(n: GLsizei; programs: PGLuint); stdcall = nil; + glProgramEnvParameter4dARB: procedure(target: GLenum; index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); stdcall = nil; + glProgramEnvParameter4dvARB: procedure(target: GLenum; index: GLuint; const params: PGLdouble); stdcall = nil; + glProgramEnvParameter4fARB: procedure(target: GLenum; index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); stdcall = nil; + glProgramEnvParameter4fvARB: procedure(target: GLenum; index: GLuint; const params: PGLfloat); stdcall = nil; + glProgramLocalParameter4dARB: procedure(target: GLenum; index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); stdcall = nil; + glProgramLocalParameter4dvARB: procedure(target: GLenum; index: GLuint; const params: PGLdouble); stdcall = nil; + glProgramLocalParameter4fARB: procedure(target: GLenum; index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); stdcall = nil; + glProgramLocalParameter4fvARB: procedure(target: GLenum; index: GLuint; const params: PGLfloat); stdcall = nil; + glGetProgramEnvParameterdvARB: procedure(target: GLenum; index: GLuint; params: PGLdouble); stdcall = nil; + glGetProgramEnvParameterfvARB: procedure(target: GLenum; index: GLuint; params: PGLfloat); stdcall = nil; + glGetProgramLocalParameterdvARB: procedure(target: GLenum; index: GLuint; params: PGLdouble); stdcall = nil; + glGetProgramLocalParameterfvARB: procedure(target: GLenum; index: GLuint; params: PGLfloat); stdcall = nil; + glGetProgramivARB: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetProgramStringARB: procedure(target: GLenum; pname: GLenum; _string: PGLvoid); stdcall = nil; + glGetVertexAttribdvARB: procedure(index: GLuint; pname: GLenum; params: PGLdouble); stdcall = nil; + glGetVertexAttribfvARB: procedure(index: GLuint; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetVertexAttribivARB: procedure(index: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetVertexAttribPointervARB: procedure(index: GLuint; pname: GLenum; pointer: PGLvoid); stdcall = nil; + glIsProgramARB: function(_program: GLuint): GLboolean; stdcall = nil; + +function Load_GL_ARB_vertex_program: Boolean; + +//***** GL_ARB_window_pos *****// +var + glWindowPos2dARB: procedure(x: GLdouble; y: GLdouble); stdcall = nil; + glWindowPos2fARB: procedure(x: GLfloat; y: GLfloat); stdcall = nil; + glWindowPos2iARB: procedure(x: GLint; y: GLint); stdcall = nil; + glWindowPos2sARB: procedure(x: GLshort; y: GLshort); stdcall = nil; + glWindowPos2dvARB: procedure(const p: PGLdouble); stdcall = nil; + glWindowPos2fvARB: procedure(const p: PGLfloat); stdcall = nil; + glWindowPos2ivARB: procedure(const p: PGLint); stdcall = nil; + glWindowPos2svARB: procedure(const p: PGLshort); stdcall = nil; + glWindowPos3dARB: procedure(x: GLdouble; y: GLdouble; z: GLdouble); stdcall = nil; + glWindowPos3fARB: procedure(x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glWindowPos3iARB: procedure(x: GLint; y: GLint; z: GLint); stdcall = nil; + glWindowPos3sARB: procedure(x: GLshort; y: GLshort; z: GLshort); stdcall = nil; + glWindowPos3dvARB: procedure(const p: PGLdouble); stdcall = nil; + glWindowPos3fvARB: procedure(const p: PGLfloat); stdcall = nil; + glWindowPos3ivARB: procedure(const p: PGLint); stdcall = nil; + glWindowPos3svARB: procedure(const p: PGLshort); stdcall = nil; + +function Load_GL_ARB_window_pos: Boolean; + +//***** GL_EXT_422_pixels *****// +const + GL_422_EXT = $80CC; + GL_422_REV_EXT = $80CD; + GL_422_AVERAGE_EXT = $80CE; + GL_422_REV_AVERAGE_EXT = $80CF; + +function Load_GL_EXT_422_pixels: Boolean; + +//***** GL_EXT_abgr *****// +const + GL_ABGR_EXT = $8000; + +function Load_GL_EXT_abgr: Boolean; + +//***** GL_EXT_bgra *****// +const + GL_BGR_EXT = $80E0; + GL_BGRA_EXT = $80E1; + +function Load_GL_EXT_bgra: Boolean; + +//***** GL_EXT_blend_color *****// +const + GL_CONSTANT_COLOR_EXT = $8001; + GL_ONE_MINUS_CONSTANT_COLOR_EXT = $8002; + GL_CONSTANT_ALPHA_EXT = $8003; + GL_ONE_MINUS_CONSTANT_ALPHA_EXT = $8004; + GL_BLEND_COLOR_EXT = $8005; +var + glBlendColorEXT: procedure(red: GLclampf; green: GLclampf; blue: GLclampf; alpha: GLclampf); stdcall = nil; + +function Load_GL_EXT_blend_color: Boolean; + +//***** GL_EXT_blend_func_separate *****// +const + GL_BLEND_DST_RGB_EXT = $80C8; + GL_BLEND_SRC_RGB_EXT = $80C9; + GL_BLEND_DST_ALPHA_EXT = $80CA; + GL_BLEND_SRC_ALPHA_EXT = $80CB; +var + glBlendFuncSeparateEXT: procedure(sfactorRGB: GLenum; dfactorRGB: GLenum; sfactorAlpha: GLenum; dfactorAlpha: GLenum); stdcall = nil; + +function Load_GL_EXT_blend_func_separate: Boolean; + +//***** GL_EXT_blend_logic_op *****// + +function Load_GL_EXT_blend_logic_op: Boolean; + +//***** GL_EXT_blend_minmax *****// +const + GL_FUNC_ADD_EXT = $8006; + GL_MIN_EXT = $8007; + GL_MAX_EXT = $8008; + GL_BLEND_EQUATION_EXT = $8009; +var + glBlendEquationEXT: procedure(mode: GLenum); stdcall = nil; + +function Load_GL_EXT_blend_minmax: Boolean; + +//***** GL_EXT_blend_subtract *****// +const + GL_FUNC_SUBTRACT_EXT = $800A; + GL_FUNC_REVERSE_SUBTRACT_EXT = $800B; + +function Load_GL_EXT_blend_subtract: Boolean; + +//***** GL_EXT_clip_volume_hint *****// +const + GL_CLIP_VOLUME_CLIPPING_HINT_EXT = $80F0; + +function Load_GL_EXT_clip_volume_hint: Boolean; + +//***** GL_EXT_color_subtable *****// +var + glColorSubTableEXT: procedure(target: GLenum; start: GLsizei; count: GLsizei; format: GLenum; _type: GLenum; const data: PGLvoid); stdcall = nil; + glCopyColorSubTableEXT: procedure(target: GLenum; start: GLsizei; x: GLint; y: GLint; width: GLsizei); stdcall = nil; + +function Load_GL_EXT_color_subtable: Boolean; + +//***** GL_EXT_compiled_vertex_array *****// +const + GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = $81A8; + GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = $81A9; +var + glLockArraysEXT: procedure(first: GLint; count: GLsizei); stdcall = nil; + glUnlockArraysEXT: procedure(); stdcall = nil; + +function Load_GL_EXT_compiled_vertex_array: Boolean; + +//***** GL_EXT_convolution *****// +const + GL_CONVOLUTION_1D_EXT = $8010; + GL_CONVOLUTION_2D_EXT = $8011; + GL_SEPARABLE_2D_EXT = $8012; + GL_CONVOLUTION_BORDER_MODE_EXT = $8013; + GL_CONVOLUTION_FILTER_SCALE_EXT = $8014; + GL_CONVOLUTION_FILTER_BIAS_EXT = $8015; + GL_REDUCE_EXT = $8016; + GL_CONVOLUTION_FORMAT_EXT = $8017; + GL_CONVOLUTION_WIDTH_EXT = $8018; + GL_CONVOLUTION_HEIGHT_EXT = $8019; + GL_MAX_CONVOLUTION_WIDTH_EXT = $801A; + GL_MAX_CONVOLUTION_HEIGHT_EXT = $801B; + GL_POST_CONVOLUTION_RED_SCALE_EXT = $801C; + GL_POST_CONVOLUTION_GREEN_SCALE_EXT = $801D; + GL_POST_CONVOLUTION_BLUE_SCALE_EXT = $801E; + GL_POST_CONVOLUTION_ALPHA_SCALE_EXT = $801F; + GL_POST_CONVOLUTION_RED_BIAS_EXT = $8020; + GL_POST_CONVOLUTION_GREEN_BIAS_EXT = $8021; + GL_POST_CONVOLUTION_BLUE_BIAS_EXT = $8022; + GL_POST_CONVOLUTION_ALPHA_BIAS_EXT = $8023; +var + glConvolutionFilter1DEXT: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; format: GLenum; _type: GLenum; const image: PGLvoid); stdcall = nil; + glConvolutionFilter2DEXT: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const image: PGLvoid); stdcall = nil; + glCopyConvolutionFilter1DEXT: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei); stdcall = nil; + glCopyConvolutionFilter2DEXT: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; height: GLsizei); stdcall = nil; + glGetConvolutionFilterEXT: procedure(target: GLenum; format: GLenum; _type: GLenum; image: PGLvoid); stdcall = nil; + glSeparableFilter2DEXT: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const row: PGLvoid; const column: PGLvoid); stdcall = nil; + glGetSeparableFilterEXT: procedure(target: GLenum; format: GLenum; _type: GLenum; row: PGLvoid; column: PGLvoid; span: PGLvoid); stdcall = nil; + glConvolutionParameteriEXT: procedure(target: GLenum; pname: GLenum; param: GLint); stdcall = nil; + glConvolutionParameterivEXT: procedure(target: GLenum; pname: GLenum; const params: PGLint); stdcall = nil; + glConvolutionParameterfEXT: procedure(target: GLenum; pname: GLenum; param: GLfloat); stdcall = nil; + glConvolutionParameterfvEXT: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); stdcall = nil; + glGetConvolutionParameterivEXT: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetConvolutionParameterfvEXT: procedure(target: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + +function Load_GL_EXT_convolution: Boolean; + +//***** GL_EXT_histogram *****// +const + GL_HISTOGRAM_EXT = $8024; + GL_PROXY_HISTOGRAM_EXT = $8025; + GL_HISTOGRAM_WIDTH_EXT = $8026; + GL_HISTOGRAM_FORMAT_EXT = $8027; + GL_HISTOGRAM_RED_SIZE_EXT = $8028; + GL_HISTOGRAM_GREEN_SIZE_EXT = $8029; + GL_HISTOGRAM_BLUE_SIZE_EXT = $802A; + GL_HISTOGRAM_ALPHA_SIZE_EXT = $802B; + GL_HISTOGRAM_LUMINANCE_SIZE_EXT = $802C; + GL_HISTOGRAM_SINK_EXT = $802D; + GL_MINMAX_EXT = $802E; + GL_MINMAX_FORMAT_EXT = $802F; + GL_MINMAX_SINK_EXT = $8030; +var + glHistogramEXT: procedure(target: GLenum; width: GLsizei; internalformat: GLenum; sink: GLboolean); stdcall = nil; + glResetHistogramEXT: procedure(target: GLenum); stdcall = nil; + glGetHistogramEXT: procedure(target: GLenum; reset: GLboolean; format: GLenum; _type: GLenum; values: PGLvoid); stdcall = nil; + glGetHistogramParameterivEXT: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetHistogramParameterfvEXT: procedure(target: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + glMinmaxEXT: procedure(target: GLenum; internalformat: GLenum; sink: GLboolean); stdcall = nil; + glResetMinmaxEXT: procedure(target: GLenum); stdcall = nil; + glGetMinmaxEXT: procedure(target: GLenum; reset: GLboolean; format: GLenum; _type: GLenum; values: PGLvoid); stdcall = nil; + glGetMinmaxParameterivEXT: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetMinmaxParameterfvEXT: procedure(target: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + +function Load_GL_EXT_histogram: Boolean; + +//***** GL_EXT_multi_draw_arrays *****// +var + glMultiDrawArraysEXT: procedure(mode: GLenum; first: PGLint; count: PGLsizei; primcount: GLsizei); stdcall = nil; + glMultiDrawElementsEXT: procedure(mode: GLenum; count: PGLsizei; _type: GLenum; const indices: PGLvoid; primcount: GLsizei); stdcall = nil; + +function Load_GL_EXT_multi_draw_arrays: Boolean; + +//***** GL_EXT_packed_pixels *****// +const + GL_UNSIGNED_BYTE_3_3_2_EXT = $8032; + GL_UNSIGNED_SHORT_4_4_4_4_EXT = $8033; + GL_UNSIGNED_SHORT_5_5_5_1_EXT = $8034; + GL_UNSIGNED_INT_8_8_8_8_EXT = $8035; + GL_UNSIGNED_INT_10_10_10_2_EXT = $8036; + +function Load_GL_EXT_packed_pixels: Boolean; + +//***** GL_EXT_paletted_texture *****// +const + GL_COLOR_INDEX1_EXT = $80E2; + GL_COLOR_INDEX2_EXT = $80E3; + GL_COLOR_INDEX4_EXT = $80E4; + GL_COLOR_INDEX8_EXT = $80E5; + GL_COLOR_INDEX12_EXT = $80E6; + GL_COLOR_INDEX16_EXT = $80E7; + GL_COLOR_TABLE_FORMAT_EXT = $80D8; + GL_COLOR_TABLE_WIDTH_EXT = $80D9; + GL_COLOR_TABLE_RED_SIZE_EXT = $80DA; + GL_COLOR_TABLE_GREEN_SIZE_EXT = $80DB; + GL_COLOR_TABLE_BLUE_SIZE_EXT = $80DC; + GL_COLOR_TABLE_ALPHA_SIZE_EXT = $80DD; + GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = $80DE; + GL_COLOR_TABLE_INTENSITY_SIZE_EXT = $80DF; + GL_TEXTURE_INDEX_SIZE_EXT = $80ED; + GL_TEXTURE_1D = $0DE0; + GL_TEXTURE_2D = $0DE1; + GL_TEXTURE_3D_EXT = $806F; + // GL_TEXTURE_CUBE_MAP_ARB { already defined } + GL_PROXY_TEXTURE_1D = $8063; + GL_PROXY_TEXTURE_2D = $8064; + GL_PROXY_TEXTURE_3D_EXT = $8070; + // GL_PROXY_TEXTURE_CUBE_MAP_ARB { already defined } + // GL_TEXTURE_1D { already defined } + // GL_TEXTURE_2D { already defined } + // GL_TEXTURE_3D_EXT { already defined } + // GL_TEXTURE_CUBE_MAP_ARB { already defined } +var + glColorTableEXT: procedure(target: GLenum; internalFormat: GLenum; width: GLsizei; format: GLenum; _type: GLenum; const data: PGLvoid); stdcall = nil; + // glColorSubTableEXT { already defined } + glGetColorTableEXT: procedure(target: GLenum; format: GLenum; _type: GLenum; data: PGLvoid); stdcall = nil; + glGetColorTableParameterivEXT: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetColorTableParameterfvEXT: procedure(target: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + +function Load_GL_EXT_paletted_texture: Boolean; + +//***** GL_EXT_point_parameters *****// +const + GL_POINT_SIZE_MIN_EXT = $8126; + GL_POINT_SIZE_MAX_EXT = $8127; + GL_POINT_FADE_THRESHOLD_SIZE_EXT = $8128; + GL_DISTANCE_ATTENUATION_EXT = $8129; +var + glPointParameterfEXT: procedure(pname: GLenum; param: GLfloat); stdcall = nil; + glPointParameterfvEXT: procedure(pname: GLenum; params: PGLfloat); stdcall = nil; + +function Load_GL_EXT_point_parameters: Boolean; + +//***** GL_EXT_polygon_offset *****// +const + GL_POLYGON_OFFSET_EXT = $8037; + GL_POLYGON_OFFSET_FACTOR_EXT = $8038; + GL_POLYGON_OFFSET_BIAS_EXT = $8039; +var + glPolygonOffsetEXT: procedure(factor: GLfloat; bias: GLfloat); stdcall = nil; + +function Load_GL_EXT_polygon_offset: Boolean; + +//***** GL_EXT_separate_specular_color *****// +const + GL_LIGHT_MODEL_COLOR_CONTROL_EXT = $81F8; + GL_SINGLE_COLOR_EXT = $81F9; + GL_SEPARATE_SPECULAR_COLOR_EXT = $81FA; + +function Load_GL_EXT_separate_specular_color: Boolean; + +//***** GL_EXT_shadow_funcs *****// + +function Load_GL_EXT_shadow_funcs: Boolean; + +//***** GL_EXT_shared_texture_palette *****// +const + GL_SHARED_TEXTURE_PALETTE_EXT = $81FB; + +function Load_GL_EXT_shared_texture_palette: Boolean; + +//***** GL_EXT_stencil_two_side *****// +const + GL_STENCIL_TEST_TWO_SIDE_EXT = $8910; + GL_ACTIVE_STENCIL_FACE_EXT = $8911; +var + glActiveStencilFaceEXT: procedure(face: GLenum); stdcall = nil; + +function Load_GL_EXT_stencil_two_side: Boolean; + +//***** GL_EXT_stencil_wrap *****// +const + GL_INCR_WRAP_EXT = $8507; + GL_DECR_WRAP_EXT = $8508; + +function Load_GL_EXT_stencil_wrap: Boolean; + +//***** GL_EXT_subtexture *****// +var + glTexSubImage1DEXT: procedure(target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid); stdcall = nil; + glTexSubImage2DEXT: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid); stdcall = nil; + glTexSubImage3DEXT: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid); stdcall = nil; + +function Load_GL_EXT_subtexture: Boolean; + +//***** GL_EXT_texture3D *****// +const + GL_PACK_SKIP_IMAGES_EXT = $806B; + GL_PACK_IMAGE_HEIGHT_EXT = $806C; + GL_UNPACK_SKIP_IMAGES_EXT = $806D; + GL_UNPACK_IMAGE_HEIGHT_EXT = $806E; + // GL_TEXTURE_3D_EXT { already defined } + // GL_PROXY_TEXTURE_3D_EXT { already defined } + GL_TEXTURE_DEPTH_EXT = $8071; + GL_TEXTURE_WRAP_R_EXT = $8072; + GL_MAX_3D_TEXTURE_SIZE_EXT = $8073; +var + glTexImage3DEXT: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; format: GLenum; _type: GLenum; const pixels: PGLvoid); stdcall = nil; + +function Load_GL_EXT_texture3D: Boolean; + +//***** GL_EXT_texture_compression_s3tc *****// +const + GL_COMPRESSED_RGB_S3TC_DXT1_EXT = $83F0; + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = $83F1; + GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = $83F2; + GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = $83F3; + +function Load_GL_EXT_texture_compression_s3tc: Boolean; + +//***** GL_EXT_texture_env_add *****// + +function Load_GL_EXT_texture_env_add: Boolean; + +//***** GL_EXT_texture_env_combine *****// +const + GL_COMBINE_EXT = $8570; + GL_COMBINE_RGB_EXT = $8571; + GL_COMBINE_ALPHA_EXT = $8572; + GL_SOURCE0_RGB_EXT = $8580; + GL_SOURCE1_RGB_EXT = $8581; + GL_SOURCE2_RGB_EXT = $8582; + GL_SOURCE0_ALPHA_EXT = $8588; + GL_SOURCE1_ALPHA_EXT = $8589; + GL_SOURCE2_ALPHA_EXT = $858A; + GL_OPERAND0_RGB_EXT = $8590; + GL_OPERAND1_RGB_EXT = $8591; + GL_OPERAND2_RGB_EXT = $8592; + GL_OPERAND0_ALPHA_EXT = $8598; + GL_OPERAND1_ALPHA_EXT = $8599; + GL_OPERAND2_ALPHA_EXT = $859A; + GL_RGB_SCALE_EXT = $8573; + GL_ADD_SIGNED_EXT = $8574; + GL_INTERPOLATE_EXT = $8575; + GL_CONSTANT_EXT = $8576; + GL_PRIMARY_COLOR_EXT = $8577; + GL_PREVIOUS_EXT = $8578; + +function Load_GL_EXT_texture_env_combine: Boolean; + +//***** GL_EXT_texture_env_dot3 *****// +const + GL_DOT3_RGB_EXT = $8740; + GL_DOT3_RGBA_EXT = $8741; + +function Load_GL_EXT_texture_env_dot3: Boolean; + +//***** GL_EXT_texture_filter_anisotropic *****// +const + GL_TEXTURE_MAX_ANISOTROPY_EXT = $84FE; + GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = $84FF; + +function Load_GL_EXT_texture_filter_anisotropic: Boolean; + +//***** GL_EXT_texture_lod_bias *****// +const + GL_TEXTURE_FILTER_CONTROL_EXT = $8500; + GL_TEXTURE_LOD_BIAS_EXT = $8501; + GL_MAX_TEXTURE_LOD_BIAS_EXT = $84FD; + +function Load_GL_EXT_texture_lod_bias: Boolean; + +//***** GL_EXT_texture_object *****// +const + GL_TEXTURE_PRIORITY_EXT = $8066; + GL_TEXTURE_RESIDENT_EXT = $8067; + GL_TEXTURE_1D_BINDING_EXT = $8068; + GL_TEXTURE_2D_BINDING_EXT = $8069; + GL_TEXTURE_3D_BINDING_EXT = $806A; +var + glGenTexturesEXT: procedure(n: GLsizei; textures: PGLuint); stdcall = nil; + glDeleteTexturesEXT: procedure(n: GLsizei; const textures: PGLuint); stdcall = nil; + glBindTextureEXT: procedure(target: GLenum; texture: GLuint); stdcall = nil; + glPrioritizeTexturesEXT: procedure(n: GLsizei; const textures: PGLuint; const priorities: PGLclampf); stdcall = nil; + glAreTexturesResidentEXT: function(n: GLsizei; const textures: PGLuint; residences: PGLboolean): GLboolean; stdcall = nil; + glIsTextureEXT: function(texture: GLuint): GLboolean; stdcall = nil; + +function Load_GL_EXT_texture_object: Boolean; + +//***** GL_EXT_vertex_array *****// +const + GL_VERTEX_ARRAY_EXT = $8074; + GL_NORMAL_ARRAY_EXT = $8075; + GL_COLOR_ARRAY_EXT = $8076; + GL_INDEX_ARRAY_EXT = $8077; + GL_TEXTURE_COORD_ARRAY_EXT = $8078; + GL_EDGE_FLAG_ARRAY_EXT = $8079; + GL_DOUBLE_EXT = $140A; + GL_VERTEX_ARRAY_SIZE_EXT = $807A; + GL_VERTEX_ARRAY_TYPE_EXT = $807B; + GL_VERTEX_ARRAY_STRIDE_EXT = $807C; + GL_VERTEX_ARRAY_COUNT_EXT = $807D; + GL_NORMAL_ARRAY_TYPE_EXT = $807E; + GL_NORMAL_ARRAY_STRIDE_EXT = $807F; + GL_NORMAL_ARRAY_COUNT_EXT = $8080; + GL_COLOR_ARRAY_SIZE_EXT = $8081; + GL_COLOR_ARRAY_TYPE_EXT = $8082; + GL_COLOR_ARRAY_STRIDE_EXT = $8083; + GL_COLOR_ARRAY_COUNT_EXT = $8084; + GL_INDEX_ARRAY_TYPE_EXT = $8085; + GL_INDEX_ARRAY_STRIDE_EXT = $8086; + GL_INDEX_ARRAY_COUNT_EXT = $8087; + GL_TEXTURE_COORD_ARRAY_SIZE_EXT = $8088; + GL_TEXTURE_COORD_ARRAY_TYPE_EXT = $8089; + GL_TEXTURE_COORD_ARRAY_STRIDE_EXT = $808A; + GL_TEXTURE_COORD_ARRAY_COUNT_EXT = $808B; + GL_EDGE_FLAG_ARRAY_STRIDE_EXT = $808C; + GL_EDGE_FLAG_ARRAY_COUNT_EXT = $808D; + GL_VERTEX_ARRAY_POINTER_EXT = $808E; + GL_NORMAL_ARRAY_POINTER_EXT = $808F; + GL_COLOR_ARRAY_POINTER_EXT = $8090; + GL_INDEX_ARRAY_POINTER_EXT = $8091; + GL_TEXTURE_COORD_ARRAY_POINTER_EXT = $8092; + GL_EDGE_FLAG_ARRAY_POINTER_EXT = $8093; +var + glArrayElementEXT: procedure(i: GLint); stdcall = nil; + glDrawArraysEXT: procedure(mode: GLenum; first: GLint; count: GLsizei); stdcall = nil; + glVertexPointerEXT: procedure(size: GLint; _type: GLenum; stride: GLsizei; count: GLsizei; const pointer: PGLvoid); stdcall = nil; + glNormalPointerEXT: procedure(_type: GLenum; stride: GLsizei; count: GLsizei; const pointer: PGLvoid); stdcall = nil; + glColorPointerEXT: procedure(size: GLint; _type: GLenum; stride: GLsizei; count: GLsizei; const pointer: PGLvoid); stdcall = nil; + glIndexPointerEXT: procedure(_type: GLenum; stride: GLsizei; count: GLsizei; const pointer: PGLvoid); stdcall = nil; + glTexCoordPointerEXT: procedure(size: GLint; _type: GLenum; stride: GLsizei; count: GLsizei; const pointer: PGLvoid); stdcall = nil; + glEdgeFlagPointerEXT: procedure(stride: GLsizei; count: GLsizei; const pointer: PGLboolean); stdcall = nil; + glGetPointervEXT: procedure(pname: GLenum; params: PGLvoid); stdcall = nil; + +function Load_GL_EXT_vertex_array: Boolean; + +//***** GL_EXT_vertex_shader *****// +const + GL_VERTEX_SHADER_EXT = $8780; + GL_VARIANT_VALUE_EXT = $87E4; + GL_VARIANT_DATATYPE_EXT = $87E5; + GL_VARIANT_ARRAY_STRIDE_EXT = $87E6; + GL_VARIANT_ARRAY_TYPE_EXT = $87E7; + GL_VARIANT_ARRAY_EXT = $87E8; + GL_VARIANT_ARRAY_POINTER_EXT = $87E9; + GL_INVARIANT_VALUE_EXT = $87EA; + GL_INVARIANT_DATATYPE_EXT = $87EB; + GL_LOCAL_CONSTANT_VALUE_EXT = $87EC; + GL_LOCAL_CONSTANT_DATATYPE_EXT = $87ED; + GL_OP_INDEX_EXT = $8782; + GL_OP_NEGATE_EXT = $8783; + GL_OP_DOT3_EXT = $8784; + GL_OP_DOT4_EXT = $8785; + GL_OP_MUL_EXT = $8786; + GL_OP_ADD_EXT = $8787; + GL_OP_MADD_EXT = $8788; + GL_OP_FRAC_EXT = $8789; + GL_OP_MAX_EXT = $878A; + GL_OP_MIN_EXT = $878B; + GL_OP_SET_GE_EXT = $878C; + GL_OP_SET_LT_EXT = $878D; + GL_OP_CLAMP_EXT = $878E; + GL_OP_FLOOR_EXT = $878F; + GL_OP_ROUND_EXT = $8790; + GL_OP_EXP_BASE_2_EXT = $8791; + GL_OP_LOG_BASE_2_EXT = $8792; + GL_OP_POWER_EXT = $8793; + GL_OP_RECIP_EXT = $8794; + GL_OP_RECIP_SQRT_EXT = $8795; + GL_OP_SUB_EXT = $8796; + GL_OP_CROSS_PRODUCT_EXT = $8797; + GL_OP_MULTIPLY_MATRIX_EXT = $8798; + GL_OP_MOV_EXT = $8799; + GL_OUTPUT_VERTEX_EXT = $879A; + GL_OUTPUT_COLOR0_EXT = $879B; + GL_OUTPUT_COLOR1_EXT = $879C; + GL_OUTPUT_TEXTURE_COORD0_EXT = $879D; + GL_OUTPUT_TEXTURE_COORD1_EXT = $879E; + GL_OUTPUT_TEXTURE_COORD2_EXT = $879F; + GL_OUTPUT_TEXTURE_COORD3_EXT = $87A0; + GL_OUTPUT_TEXTURE_COORD4_EXT = $87A1; + GL_OUTPUT_TEXTURE_COORD5_EXT = $87A2; + GL_OUTPUT_TEXTURE_COORD6_EXT = $87A3; + GL_OUTPUT_TEXTURE_COORD7_EXT = $87A4; + GL_OUTPUT_TEXTURE_COORD8_EXT = $87A5; + GL_OUTPUT_TEXTURE_COORD9_EXT = $87A6; + GL_OUTPUT_TEXTURE_COORD10_EXT = $87A7; + GL_OUTPUT_TEXTURE_COORD11_EXT = $87A8; + GL_OUTPUT_TEXTURE_COORD12_EXT = $87A9; + GL_OUTPUT_TEXTURE_COORD13_EXT = $87AA; + GL_OUTPUT_TEXTURE_COORD14_EXT = $87AB; + GL_OUTPUT_TEXTURE_COORD15_EXT = $87AC; + GL_OUTPUT_TEXTURE_COORD16_EXT = $87AD; + GL_OUTPUT_TEXTURE_COORD17_EXT = $87AE; + GL_OUTPUT_TEXTURE_COORD18_EXT = $87AF; + GL_OUTPUT_TEXTURE_COORD19_EXT = $87B0; + GL_OUTPUT_TEXTURE_COORD20_EXT = $87B1; + GL_OUTPUT_TEXTURE_COORD21_EXT = $87B2; + GL_OUTPUT_TEXTURE_COORD22_EXT = $87B3; + GL_OUTPUT_TEXTURE_COORD23_EXT = $87B4; + GL_OUTPUT_TEXTURE_COORD24_EXT = $87B5; + GL_OUTPUT_TEXTURE_COORD25_EXT = $87B6; + GL_OUTPUT_TEXTURE_COORD26_EXT = $87B7; + GL_OUTPUT_TEXTURE_COORD27_EXT = $87B8; + GL_OUTPUT_TEXTURE_COORD28_EXT = $87B9; + GL_OUTPUT_TEXTURE_COORD29_EXT = $87BA; + GL_OUTPUT_TEXTURE_COORD30_EXT = $87BB; + GL_OUTPUT_TEXTURE_COORD31_EXT = $87BC; + GL_OUTPUT_FOG_EXT = $87BD; + GL_SCALAR_EXT = $87BE; + GL_VECTOR_EXT = $87BF; + GL_MATRIX_EXT = $87C0; + GL_VARIANT_EXT = $87C1; + GL_INVARIANT_EXT = $87C2; + GL_LOCAL_CONSTANT_EXT = $87C3; + GL_LOCAL_EXT = $87C4; + GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = $87C5; + GL_MAX_VERTEX_SHADER_VARIANTS_EXT = $87C6; + GL_MAX_VERTEX_SHADER_INVARIANTS_EXT = $87C7; + GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = $87C8; + GL_MAX_VERTEX_SHADER_LOCALS_EXT = $87C9; + GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = $87CA; + GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = $87CB; + GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = $87CC; + GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = $87CD; + GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = $87CE; + GL_VERTEX_SHADER_INSTRUCTIONS_EXT = $87CF; + GL_VERTEX_SHADER_VARIANTS_EXT = $87D0; + GL_VERTEX_SHADER_INVARIANTS_EXT = $87D1; + GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = $87D2; + GL_VERTEX_SHADER_LOCALS_EXT = $87D3; + GL_VERTEX_SHADER_BINDING_EXT = $8781; + GL_VERTEX_SHADER_OPTIMIZED_EXT = $87D4; + GL_X_EXT = $87D5; + GL_Y_EXT = $87D6; + GL_Z_EXT = $87D7; + GL_W_EXT = $87D8; + GL_NEGATIVE_X_EXT = $87D9; + GL_NEGATIVE_Y_EXT = $87DA; + GL_NEGATIVE_Z_EXT = $87DB; + GL_NEGATIVE_W_EXT = $87DC; + GL_ZERO_EXT = $87DD; + GL_ONE_EXT = $87DE; + GL_NEGATIVE_ONE_EXT = $87DF; + GL_NORMALIZED_RANGE_EXT = $87E0; + GL_FULL_RANGE_EXT = $87E1; + GL_CURRENT_VERTEX_EXT = $87E2; + GL_MVP_MATRIX_EXT = $87E3; +var + glBeginVertexShaderEXT: procedure(); stdcall = nil; + glEndVertexShaderEXT: procedure(); stdcall = nil; + glBindVertexShaderEXT: procedure(id: GLuint); stdcall = nil; + glGenVertexShadersEXT: function(range: GLuint): GLuint; stdcall = nil; + glDeleteVertexShaderEXT: procedure(id: GLuint); stdcall = nil; + glShaderOp1EXT: procedure(op: GLenum; res: GLuint; arg1: GLuint); stdcall = nil; + glShaderOp2EXT: procedure(op: GLenum; res: GLuint; arg1: GLuint; arg2: GLuint); stdcall = nil; + glShaderOp3EXT: procedure(op: GLenum; res: GLuint; arg1: GLuint; arg2: GLuint; arg3: GLuint); stdcall = nil; + glSwizzleEXT: procedure(res: GLuint; _in: GLuint; outX: GLenum; outY: GLenum; outZ: GLenum; outW: GLenum); stdcall = nil; + glWriteMaskEXT: procedure(res: GLuint; _in: GLuint; outX: GLenum; outY: GLenum; outZ: GLenum; outW: GLenum); stdcall = nil; + glInsertComponentEXT: procedure(res: GLuint; src: GLuint; num: GLuint); stdcall = nil; + glExtractComponentEXT: procedure(res: GLuint; src: GLuint; num: GLuint); stdcall = nil; + glGenSymbolsEXT: function(datatype: GLenum; storagetype: GLenum; range: GLenum; components: GLuint): GLuint; stdcall = nil; + glSetInvariantEXT: procedure(id: GLuint; _type: GLenum; addr: PGLvoid); stdcall = nil; + glSetLocalConstantEXT: procedure(id: GLuint; _type: GLenum; addr: PGLvoid); stdcall = nil; + glVariantbvEXT: procedure(id: GLuint; addr: PGLbyte); stdcall = nil; + glVariantsvEXT: procedure(id: GLuint; addr: PGLshort); stdcall = nil; + glVariantivEXT: procedure(id: GLuint; addr: PGLint); stdcall = nil; + glVariantfvEXT: procedure(id: GLuint; addr: PGLfloat); stdcall = nil; + glVariantdvEXT: procedure(id: GLuint; addr: PGLdouble); stdcall = nil; + glVariantubvEXT: procedure(id: GLuint; addr: PGLubyte); stdcall = nil; + glVariantusvEXT: procedure(id: GLuint; addr: PGLushort); stdcall = nil; + glVariantuivEXT: procedure(id: GLuint; addr: PGLuint); stdcall = nil; + glVariantPointerEXT: procedure(id: GLuint; _type: GLenum; stride: GLuint; addr: PGLvoid); stdcall = nil; + glEnableVariantClientStateEXT: procedure(id: GLuint); stdcall = nil; + glDisableVariantClientStateEXT: procedure(id: GLuint); stdcall = nil; + glBindLightParameterEXT: function(light: GLenum; value: GLenum): GLuint; stdcall = nil; + glBindMaterialParameterEXT: function(face: GLenum; value: GLenum): GLuint; stdcall = nil; + glBindTexGenParameterEXT: function(_unit: GLenum; coord: GLenum; value: GLenum): GLuint; stdcall = nil; + glBindTextureUnitParameterEXT: function(_unit: GLenum; value: GLenum): GLuint; stdcall = nil; + glBindParameterEXT: function(value: GLenum): GLuint; stdcall = nil; + glIsVariantEnabledEXT: function(id: GLuint; cap: GLenum): GLboolean; stdcall = nil; + glGetVariantBooleanvEXT: procedure(id: GLuint; value: GLenum; data: PGLboolean); stdcall = nil; + glGetVariantIntegervEXT: procedure(id: GLuint; value: GLenum; data: PGLint); stdcall = nil; + glGetVariantFloatvEXT: procedure(id: GLuint; value: GLenum; data: PGLfloat); stdcall = nil; + glGetVariantPointervEXT: procedure(id: GLuint; value: GLenum; data: PGLvoid); stdcall = nil; + glGetInvariantBooleanvEXT: procedure(id: GLuint; value: GLenum; data: PGLboolean); stdcall = nil; + glGetInvariantIntegervEXT: procedure(id: GLuint; value: GLenum; data: PGLint); stdcall = nil; + glGetInvariantFloatvEXT: procedure(id: GLuint; value: GLenum; data: PGLfloat); stdcall = nil; + glGetLocalConstantBooleanvEXT: procedure(id: GLuint; value: GLenum; data: PGLboolean); stdcall = nil; + glGetLocalConstantIntegervEXT: procedure(id: GLuint; value: GLenum; data: PGLint); stdcall = nil; + glGetLocalConstantFloatvEXT: procedure(id: GLuint; value: GLenum; data: PGLfloat); stdcall = nil; + +function Load_GL_EXT_vertex_shader: Boolean; + +//***** GL_EXT_vertex_weighting *****// +const + GL_VERTEX_WEIGHTING_EXT = $8509; + GL_MODELVIEW0_EXT = $1700; + GL_MODELVIEW1_EXT = $850A; + GL_MODELVIEW0_MATRIX_EXT = $0BA6; + GL_MODELVIEW1_MATRIX_EXT = $8506; + GL_CURRENT_VERTEX_WEIGHT_EXT = $850B; + GL_VERTEX_WEIGHT_ARRAY_EXT = $850C; + GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT = $850D; + GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT = $850E; + GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = $850F; + GL_MODELVIEW0_STACK_DEPTH_EXT = $0BA3; + GL_MODELVIEW1_STACK_DEPTH_EXT = $8502; + GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = $8510; +var + glVertexWeightfEXT: procedure(weight: GLfloat); stdcall = nil; + glVertexWeightfvEXT: procedure(weight: PGLfloat); stdcall = nil; + glVertexWeightPointerEXT: procedure(size: GLint; _type: GLenum; stride: GLsizei; pointer: PGLvoid); stdcall = nil; + +function Load_GL_EXT_vertex_weighting: Boolean; + +//***** GL_HP_occlusion_test *****// +const + GL_OCCLUSION_TEST_HP = $8165; + GL_OCCLUSION_TEST_RESULT_HP = $8166; + +function Load_GL_HP_occlusion_test: Boolean; + +//***** GL_NV_blend_square *****// + +function Load_GL_NV_blend_square: Boolean; + +//***** GL_NV_copy_depth_to_color *****// +const + GL_DEPTH_STENCIL_TO_RGBA_NV = $886E; + GL_DEPTH_STENCIL_TO_BGRA_NV = $886F; + +function Load_GL_NV_copy_depth_to_color: Boolean; + +//***** GL_NV_depth_clamp *****// +const + GL_DEPTH_CLAMP_NV = $864F; + +function Load_GL_NV_depth_clamp: Boolean; + +//***** GL_NV_evaluators *****// +const + GL_EVAL_2D_NV = $86C0; + GL_EVAL_TRIANGULAR_2D_NV = $86C1; + GL_MAP_TESSELLATION_NV = $86C2; + GL_MAP_ATTRIB_U_ORDER_NV = $86C3; + GL_MAP_ATTRIB_V_ORDER_NV = $86C4; + GL_EVAL_FRACTIONAL_TESSELLATION_NV = $86C5; + GL_EVAL_VERTEX_ATTRIB0_NV = $86C6; + GL_EVAL_VERTEX_ATTRIB1_NV = $86C7; + GL_EVAL_VERTEX_ATTRIB2_NV = $86C8; + GL_EVAL_VERTEX_ATTRIB3_NV = $86C9; + GL_EVAL_VERTEX_ATTRIB4_NV = $86CA; + GL_EVAL_VERTEX_ATTRIB5_NV = $86CB; + GL_EVAL_VERTEX_ATTRIB6_NV = $86CC; + GL_EVAL_VERTEX_ATTRIB7_NV = $86CD; + GL_EVAL_VERTEX_ATTRIB8_NV = $86CE; + GL_EVAL_VERTEX_ATTRIB9_NV = $86CF; + GL_EVAL_VERTEX_ATTRIB10_NV = $86D0; + GL_EVAL_VERTEX_ATTRIB11_NV = $86D1; + GL_EVAL_VERTEX_ATTRIB12_NV = $86D2; + GL_EVAL_VERTEX_ATTRIB13_NV = $86D3; + GL_EVAL_VERTEX_ATTRIB14_NV = $86D4; + GL_EVAL_VERTEX_ATTRIB15_NV = $86D5; + GL_MAX_MAP_TESSELLATION_NV = $86D6; + GL_MAX_RATIONAL_EVAL_ORDER_NV = $86D7; +var + glMapControlPointsNV: procedure(target: GLenum; index: GLuint; _type: GLenum; ustride: GLsizei; vstride: GLsizei; uorder: GLint; vorder: GLint; _packed: GLboolean; const points: PGLvoid); stdcall = nil; + glMapParameterivNV: procedure(target: GLenum; pname: GLenum; const params: PGLint); stdcall = nil; + glMapParameterfvNV: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); stdcall = nil; + glGetMapControlPointsNV: procedure(target: GLenum; index: GLuint; _type: GLenum; ustride: GLsizei; vstride: GLsizei; _packed: GLboolean; points: PGLvoid); stdcall = nil; + glGetMapParameterivNV: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetMapParameterfvNV: procedure(target: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetMapAttribParameterivNV: procedure(target: GLenum; index: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetMapAttribParameterfvNV: procedure(target: GLenum; index: GLuint; pname: GLenum; params: PGLfloat); stdcall = nil; + glEvalMapsNV: procedure(target: GLenum; mode: GLenum); stdcall = nil; + +function Load_GL_NV_evaluators: Boolean; + +//***** GL_NV_fence *****// +const + GL_ALL_COMPLETED_NV = $84F2; + GL_FENCE_STATUS_NV = $84F3; + GL_FENCE_CONDITION_NV = $84F4; +var + glGenFencesNV: procedure(n: GLsizei; fences: PGLuint); stdcall = nil; + glDeleteFencesNV: procedure(n: GLsizei; const fences: PGLuint); stdcall = nil; + glSetFenceNV: procedure(fence: GLuint; condition: GLenum); stdcall = nil; + glTestFenceNV: function(fence: GLuint): GLboolean; stdcall = nil; + glFinishFenceNV: procedure(fence: GLuint); stdcall = nil; + glIsFenceNV: function(fence: GLuint): GLboolean; stdcall = nil; + glGetFenceivNV: procedure(fence: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + +function Load_GL_NV_fence: Boolean; + +//***** GL_NV_fog_distance *****// +const + GL_FOG_DISTANCE_MODE_NV = $855A; + GL_EYE_RADIAL_NV = $855B; + GL_EYE_PLANE_ABSOLUTE_NV = $855C; + +function Load_GL_NV_fog_distance: Boolean; + +//***** GL_NV_light_max_exponent *****// +const + GL_MAX_SHININESS_NV = $8504; + GL_MAX_SPOT_EXPONENT_NV = $8505; + +function Load_GL_NV_light_max_exponent: Boolean; + +//***** GL_NV_multisample_filter_hint *****// +const + GL_MULTISAMPLE_FILTER_HINT_NV = $8534; + +function Load_GL_NV_multisample_filter_hint: Boolean; + +//***** GL_NV_occlusion_query *****// + // GL_OCCLUSION_TEST_HP { already defined } + // GL_OCCLUSION_TEST_RESULT_HP { already defined } +const + GL_PIXEL_COUNTER_BITS_NV = $8864; + GL_CURRENT_OCCLUSION_QUERY_ID_NV = $8865; + GL_PIXEL_COUNT_NV = $8866; + GL_PIXEL_COUNT_AVAILABLE_NV = $8867; +var + glGenOcclusionQueriesNV: procedure(n: GLsizei; ids: PGLuint); stdcall = nil; + glDeleteOcclusionQueriesNV: procedure(n: GLsizei; const ids: PGLuint); stdcall = nil; + glIsOcclusionQueryNV: function(id: GLuint): GLboolean; stdcall = nil; + glBeginOcclusionQueryNV: procedure(id: GLuint); stdcall = nil; + glEndOcclusionQueryNV: procedure(); stdcall = nil; + glGetOcclusionQueryivNV: procedure(id: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetOcclusionQueryuivNV: procedure(id: GLuint; pname: GLenum; params: PGLuint); stdcall = nil; + +function Load_GL_NV_occlusion_query: Boolean; + +//***** GL_NV_packed_depth_stencil *****// +const + GL_DEPTH_STENCIL_NV = $84F9; + GL_UNSIGNED_INT_24_8_NV = $84FA; + +function Load_GL_NV_packed_depth_stencil: Boolean; + +//***** GL_NV_point_sprite *****// +const + GL_POINT_SPRITE_NV = $8861; + GL_COORD_REPLACE_NV = $8862; + GL_POINT_SPRITE_R_MODE_NV = $8863; +var + glPointParameteriNV: procedure(pname: GLenum; param: GLint); stdcall = nil; + glPointParameterivNV: procedure(pname: GLenum; const params: PGLint); stdcall = nil; + +function Load_GL_NV_point_sprite: Boolean; + +//***** GL_NV_register_combiners *****// +const + GL_REGISTER_COMBINERS_NV = $8522; + GL_COMBINER0_NV = $8550; + GL_COMBINER1_NV = $8551; + GL_COMBINER2_NV = $8552; + GL_COMBINER3_NV = $8553; + GL_COMBINER4_NV = $8554; + GL_COMBINER5_NV = $8555; + GL_COMBINER6_NV = $8556; + GL_COMBINER7_NV = $8557; + GL_VARIABLE_A_NV = $8523; + GL_VARIABLE_B_NV = $8524; + GL_VARIABLE_C_NV = $8525; + GL_VARIABLE_D_NV = $8526; + GL_VARIABLE_E_NV = $8527; + GL_VARIABLE_F_NV = $8528; + GL_VARIABLE_G_NV = $8529; + GL_CONSTANT_COLOR0_NV = $852A; + GL_CONSTANT_COLOR1_NV = $852B; + GL_PRIMARY_COLOR_NV = $852C; + GL_SECONDARY_COLOR_NV = $852D; + GL_SPARE0_NV = $852E; + GL_SPARE1_NV = $852F; + GL_UNSIGNED_IDENTITY_NV = $8536; + GL_UNSIGNED_INVERT_NV = $8537; + GL_EXPAND_NORMAL_NV = $8538; + GL_EXPAND_NEGATE_NV = $8539; + GL_HALF_BIAS_NORMAL_NV = $853A; + GL_HALF_BIAS_NEGATE_NV = $853B; + GL_SIGNED_IDENTITY_NV = $853C; + GL_SIGNED_NEGATE_NV = $853D; + GL_E_TIMES_F_NV = $8531; + GL_SPARE0_PLUS_SECONDARY_COLOR_NV = $8532; + GL_SCALE_BY_TWO_NV = $853E; + GL_SCALE_BY_FOUR_NV = $853F; + GL_SCALE_BY_ONE_HALF_NV = $8540; + GL_BIAS_BY_NEGATIVE_ONE_HALF_NV = $8541; + GL_DISCARD_NV = $8530; + GL_COMBINER_INPUT_NV = $8542; + GL_COMBINER_MAPPING_NV = $8543; + GL_COMBINER_COMPONENT_USAGE_NV = $8544; + GL_COMBINER_AB_DOT_PRODUCT_NV = $8545; + GL_COMBINER_CD_DOT_PRODUCT_NV = $8546; + GL_COMBINER_MUX_SUM_NV = $8547; + GL_COMBINER_SCALE_NV = $8548; + GL_COMBINER_BIAS_NV = $8549; + GL_COMBINER_AB_OUTPUT_NV = $854A; + GL_COMBINER_CD_OUTPUT_NV = $854B; + GL_COMBINER_SUM_OUTPUT_NV = $854C; + GL_NUM_GENERAL_COMBINERS_NV = $854E; + GL_COLOR_SUM_CLAMP_NV = $854F; + GL_MAX_GENERAL_COMBINERS_NV = $854D; +var + glCombinerParameterfvNV: procedure(pname: GLenum; const params: PGLfloat); stdcall = nil; + glCombinerParameterivNV: procedure(pname: GLenum; const params: PGLint); stdcall = nil; + glCombinerParameterfNV: procedure(pname: GLenum; param: GLfloat); stdcall = nil; + glCombinerParameteriNV: procedure(pname: GLenum; param: GLint); stdcall = nil; + glCombinerInputNV: procedure(stage: GLenum; portion: GLenum; variable: GLenum; input: GLenum; mapping: GLenum; componentUsage: GLenum); stdcall = nil; + glCombinerOutputNV: procedure(stage: GLenum; portion: GLenum; abOutput: GLenum; cdOutput: GLenum; sumOutput: GLenum; scale: GLenum; bias: GLenum; abDotProduct: GLboolean; cdDotProduct: GLboolean; muxSum: GLboolean); stdcall = nil; + glFinalCombinerInputNV: procedure(variable: GLenum; input: GLenum; mapping: GLenum; componentUsage: GLenum); stdcall = nil; + glGetCombinerInputParameterfvNV: procedure(stage: GLenum; portion: GLenum; variable: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetCombinerInputParameterivNV: procedure(stage: GLenum; portion: GLenum; variable: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetCombinerOutputParameterfvNV: procedure(stage: GLenum; portion: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetCombinerOutputParameterivNV: procedure(stage: GLenum; portion: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetFinalCombinerInputParameterfvNV: procedure(variable: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetFinalCombinerInputParameterivNV: procedure(variable: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + +function Load_GL_NV_register_combiners: Boolean; + +//***** GL_NV_register_combiners2 *****// +const + GL_PER_STAGE_CONSTANTS_NV = $8535; +var + glCombinerStageParameterfvNV: procedure(stage: GLenum; pname: GLenum; const params: PGLfloat); stdcall = nil; + glGetCombinerStageParameterfvNV: procedure(stage: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + +function Load_GL_NV_register_combiners2: Boolean; + +//***** GL_NV_texgen_emboss *****// +const + GL_EMBOSS_MAP_NV = $855F; + GL_EMBOSS_LIGHT_NV = $855D; + GL_EMBOSS_CONSTANT_NV = $855E; + +function Load_GL_NV_texgen_emboss: Boolean; + +//***** GL_NV_texgen_reflection *****// +const + GL_NORMAL_MAP_NV = $8511; + GL_REFLECTION_MAP_NV = $8512; + +function Load_GL_NV_texgen_reflection: Boolean; + +//***** GL_NV_texture_compression_vtc *****// + // GL_COMPRESSED_RGB_S3TC_DXT1_EXT { already defined } + // GL_COMPRESSED_RGBA_S3TC_DXT1_EXT { already defined } + // GL_COMPRESSED_RGBA_S3TC_DXT3_EXT { already defined } + // GL_COMPRESSED_RGBA_S3TC_DXT5_EXT { already defined } + +function Load_GL_NV_texture_compression_vtc: Boolean; + +//***** GL_NV_texture_env_combine4 *****// +const + GL_COMBINE4_NV = $8503; + GL_SOURCE3_RGB_NV = $8583; + GL_SOURCE3_ALPHA_NV = $858B; + GL_OPERAND3_RGB_NV = $8593; + GL_OPERAND3_ALPHA_NV = $859B; + +function Load_GL_NV_texture_env_combine4: Boolean; + +//***** GL_NV_texture_rectangle *****// +const + GL_TEXTURE_RECTANGLE_NV = $84F5; + GL_TEXTURE_BINDING_RECTANGLE_NV = $84F6; + GL_PROXY_TEXTURE_RECTANGLE_NV = $84F7; + GL_MAX_RECTANGLE_TEXTURE_SIZE_NV = $84F8; + +function Load_GL_NV_texture_rectangle: Boolean; + +//***** GL_NV_texture_shader *****// +const + GL_TEXTURE_SHADER_NV = $86DE; + GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = $86D9; + GL_SHADER_OPERATION_NV = $86DF; + GL_CULL_MODES_NV = $86E0; + GL_OFFSET_TEXTURE_MATRIX_NV = $86E1; + GL_OFFSET_TEXTURE_SCALE_NV = $86E2; + GL_OFFSET_TEXTURE_BIAS_NV = $86E3; + GL_PREVIOUS_TEXTURE_INPUT_NV = $86E4; + GL_CONST_EYE_NV = $86E5; + GL_SHADER_CONSISTENT_NV = $86DD; + GL_PASS_THROUGH_NV = $86E6; + GL_CULL_FRAGMENT_NV = $86E7; + GL_OFFSET_TEXTURE_2D_NV = $86E8; + GL_OFFSET_TEXTURE_RECTANGLE_NV = $864C; + GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV = $864D; + GL_DEPENDENT_AR_TEXTURE_2D_NV = $86E9; + GL_DEPENDENT_GB_TEXTURE_2D_NV = $86EA; + GL_DOT_PRODUCT_NV = $86EC; + GL_DOT_PRODUCT_DEPTH_REPLACE_NV = $86ED; + GL_DOT_PRODUCT_TEXTURE_2D_NV = $86EE; + GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = $864E; + GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = $86F0; + GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = $86F1; + GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV = $86F2; + GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = $86F3; + GL_HILO_NV = $86F4; + GL_DSDT_NV = $86F5; + GL_DSDT_MAG_NV = $86F6; + GL_DSDT_MAG_VIB_NV = $86F7; + GL_UNSIGNED_INT_S8_S8_8_8_NV = $86DA; + GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = $86DB; + GL_SIGNED_RGBA_NV = $86FB; + GL_SIGNED_RGBA8_NV = $86FC; + GL_SIGNED_RGB_NV = $86FE; + GL_SIGNED_RGB8_NV = $86FF; + GL_SIGNED_LUMINANCE_NV = $8701; + GL_SIGNED_LUMINANCE8_NV = $8702; + GL_SIGNED_LUMINANCE_ALPHA_NV = $8703; + GL_SIGNED_LUMINANCE8_ALPHA8_NV = $8704; + GL_SIGNED_ALPHA_NV = $8705; + GL_SIGNED_ALPHA8_NV = $8706; + GL_SIGNED_INTENSITY_NV = $8707; + GL_SIGNED_INTENSITY8_NV = $8708; + GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = $870C; + GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = $870D; + GL_HILO16_NV = $86F8; + GL_SIGNED_HILO_NV = $86F9; + GL_SIGNED_HILO16_NV = $86FA; + GL_DSDT8_NV = $8709; + GL_DSDT8_MAG8_NV = $870A; + GL_DSDT_MAG_INTENSITY_NV = $86DC; + GL_DSDT8_MAG8_INTENSITY8_NV = $870B; + GL_HI_SCALE_NV = $870E; + GL_LO_SCALE_NV = $870F; + GL_DS_SCALE_NV = $8710; + GL_DT_SCALE_NV = $8711; + GL_MAGNITUDE_SCALE_NV = $8712; + GL_VIBRANCE_SCALE_NV = $8713; + GL_HI_BIAS_NV = $8714; + GL_LO_BIAS_NV = $8715; + GL_DS_BIAS_NV = $8716; + GL_DT_BIAS_NV = $8717; + GL_MAGNITUDE_BIAS_NV = $8718; + GL_VIBRANCE_BIAS_NV = $8719; + GL_TEXTURE_BORDER_VALUES_NV = $871A; + GL_TEXTURE_HI_SIZE_NV = $871B; + GL_TEXTURE_LO_SIZE_NV = $871C; + GL_TEXTURE_DS_SIZE_NV = $871D; + GL_TEXTURE_DT_SIZE_NV = $871E; + GL_TEXTURE_MAG_SIZE_NV = $871F; + +function Load_GL_NV_texture_shader: Boolean; + +//***** GL_NV_texture_shader2 *****// +const + GL_DOT_PRODUCT_TEXTURE_3D_NV = $86EF; + // GL_HILO_NV { already defined } + // GL_DSDT_NV { already defined } + // GL_DSDT_MAG_NV { already defined } + // GL_DSDT_MAG_VIB_NV { already defined } + // GL_UNSIGNED_INT_S8_S8_8_8_NV { already defined } + // GL_UNSIGNED_INT_8_8_S8_S8_REV_NV { already defined } + // GL_SIGNED_RGBA_NV { already defined } + // GL_SIGNED_RGBA8_NV { already defined } + // GL_SIGNED_RGB_NV { already defined } + // GL_SIGNED_RGB8_NV { already defined } + // GL_SIGNED_LUMINANCE_NV { already defined } + // GL_SIGNED_LUMINANCE8_NV { already defined } + // GL_SIGNED_LUMINANCE_ALPHA_NV { already defined } + // GL_SIGNED_LUMINANCE8_ALPHA8_NV { already defined } + // GL_SIGNED_ALPHA_NV { already defined } + // GL_SIGNED_ALPHA8_NV { already defined } + // GL_SIGNED_INTENSITY_NV { already defined } + // GL_SIGNED_INTENSITY8_NV { already defined } + // GL_SIGNED_RGB_UNSIGNED_ALPHA_NV { already defined } + // GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV { already defined } + // GL_HILO16_NV { already defined } + // GL_SIGNED_HILO_NV { already defined } + // GL_SIGNED_HILO16_NV { already defined } + // GL_DSDT8_NV { already defined } + // GL_DSDT8_MAG8_NV { already defined } + // GL_DSDT_MAG_INTENSITY_NV { already defined } + // GL_DSDT8_MAG8_INTENSITY8_NV { already defined } + +function Load_GL_NV_texture_shader2: Boolean; + +//***** GL_NV_texture_shader3 *****// +const + GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = $8850; + GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = $8851; + GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = $8852; + GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = $8853; + GL_OFFSET_HILO_TEXTURE_2D_NV = $8854; + GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV = $8855; + GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = $8856; + GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = $8857; + GL_DEPENDENT_HILO_TEXTURE_2D_NV = $8858; + GL_DEPENDENT_RGB_TEXTURE_3D_NV = $8859; + GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = $885A; + GL_DOT_PRODUCT_PASS_THROUGH_NV = $885B; + GL_DOT_PRODUCT_TEXTURE_1D_NV = $885C; + GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = $885D; + GL_HILO8_NV = $885E; + GL_SIGNED_HILO8_NV = $885F; + GL_FORCE_BLUE_TO_ONE_NV = $8860; + +function Load_GL_NV_texture_shader3: Boolean; + +//***** GL_NV_vertex_array_range *****// +const + GL_VERTEX_ARRAY_RANGE_NV = $851D; + GL_VERTEX_ARRAY_RANGE_LENGTH_NV = $851E; + GL_VERTEX_ARRAY_RANGE_VALID_NV = $851F; + GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = $8520; + GL_VERTEX_ARRAY_RANGE_POINTER_NV = $8521; +var + glVertexArrayRangeNV: procedure(length: GLsizei; pointer: PGLvoid); stdcall = nil; + glFlushVertexArrayRangeNV: procedure(); stdcall = nil; + wglAllocateMemoryNV: function(size: GLsizei; readFrequency: GLfloat; writeFrequency: GLfloat; priority: GLfloat): PGLvoid; stdcall = nil; + wglFreeMemoryNV: procedure(pointer: PGLvoid); stdcall = nil; + +function Load_GL_NV_vertex_array_range: Boolean; + +//***** GL_NV_vertex_array_range2 *****// +const + GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = $8533; + +function Load_GL_NV_vertex_array_range2: Boolean; + +//***** GL_NV_vertex_program *****// +const + GL_VERTEX_PROGRAM_NV = $8620; + GL_VERTEX_PROGRAM_POINT_SIZE_NV = $8642; + GL_VERTEX_PROGRAM_TWO_SIDE_NV = $8643; + GL_VERTEX_STATE_PROGRAM_NV = $8621; + GL_ATTRIB_ARRAY_SIZE_NV = $8623; + GL_ATTRIB_ARRAY_STRIDE_NV = $8624; + GL_ATTRIB_ARRAY_TYPE_NV = $8625; + GL_CURRENT_ATTRIB_NV = $8626; + GL_PROGRAM_PARAMETER_NV = $8644; + GL_ATTRIB_ARRAY_POINTER_NV = $8645; + GL_PROGRAM_TARGET_NV = $8646; + GL_PROGRAM_LENGTH_NV = $8627; + GL_PROGRAM_RESIDENT_NV = $8647; + GL_PROGRAM_STRING_NV = $8628; + GL_TRACK_MATRIX_NV = $8648; + GL_TRACK_MATRIX_TRANSFORM_NV = $8649; + GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV = $862E; + GL_MAX_TRACK_MATRICES_NV = $862F; + GL_CURRENT_MATRIX_STACK_DEPTH_NV = $8640; + GL_CURRENT_MATRIX_NV = $8641; + GL_VERTEX_PROGRAM_BINDING_NV = $864A; + GL_PROGRAM_ERROR_POSITION_NV = $864B; + GL_MODELVIEW_PROJECTION_NV = $8629; + GL_MATRIX0_NV = $8630; + GL_MATRIX1_NV = $8631; + GL_MATRIX2_NV = $8632; + GL_MATRIX3_NV = $8633; + GL_MATRIX4_NV = $8634; + GL_MATRIX5_NV = $8635; + GL_MATRIX6_NV = $8636; + GL_MATRIX7_NV = $8637; + GL_IDENTITY_NV = $862A; + GL_INVERSE_NV = $862B; + GL_TRANSPOSE_NV = $862C; + GL_INVERSE_TRANSPOSE_NV = $862D; + GL_VERTEX_ATTRIB_ARRAY0_NV = $8650; + GL_VERTEX_ATTRIB_ARRAY1_NV = $8651; + GL_VERTEX_ATTRIB_ARRAY2_NV = $8652; + GL_VERTEX_ATTRIB_ARRAY3_NV = $8653; + GL_VERTEX_ATTRIB_ARRAY4_NV = $8654; + GL_VERTEX_ATTRIB_ARRAY5_NV = $8655; + GL_VERTEX_ATTRIB_ARRAY6_NV = $8656; + GL_VERTEX_ATTRIB_ARRAY7_NV = $8657; + GL_VERTEX_ATTRIB_ARRAY8_NV = $8658; + GL_VERTEX_ATTRIB_ARRAY9_NV = $8659; + GL_VERTEX_ATTRIB_ARRAY10_NV = $865A; + GL_VERTEX_ATTRIB_ARRAY11_NV = $865B; + GL_VERTEX_ATTRIB_ARRAY12_NV = $865C; + GL_VERTEX_ATTRIB_ARRAY13_NV = $865D; + GL_VERTEX_ATTRIB_ARRAY14_NV = $865E; + GL_VERTEX_ATTRIB_ARRAY15_NV = $865F; + GL_MAP1_VERTEX_ATTRIB0_4_NV = $8660; + GL_MAP1_VERTEX_ATTRIB1_4_NV = $8661; + GL_MAP1_VERTEX_ATTRIB2_4_NV = $8662; + GL_MAP1_VERTEX_ATTRIB3_4_NV = $8663; + GL_MAP1_VERTEX_ATTRIB4_4_NV = $8664; + GL_MAP1_VERTEX_ATTRIB5_4_NV = $8665; + GL_MAP1_VERTEX_ATTRIB6_4_NV = $8666; + GL_MAP1_VERTEX_ATTRIB7_4_NV = $8667; + GL_MAP1_VERTEX_ATTRIB8_4_NV = $8668; + GL_MAP1_VERTEX_ATTRIB9_4_NV = $8669; + GL_MAP1_VERTEX_ATTRIB10_4_NV = $866A; + GL_MAP1_VERTEX_ATTRIB11_4_NV = $866B; + GL_MAP1_VERTEX_ATTRIB12_4_NV = $866C; + GL_MAP1_VERTEX_ATTRIB13_4_NV = $866D; + GL_MAP1_VERTEX_ATTRIB14_4_NV = $866E; + GL_MAP1_VERTEX_ATTRIB15_4_NV = $866F; + GL_MAP2_VERTEX_ATTRIB0_4_NV = $8670; + GL_MAP2_VERTEX_ATTRIB1_4_NV = $8671; + GL_MAP2_VERTEX_ATTRIB2_4_NV = $8672; + GL_MAP2_VERTEX_ATTRIB3_4_NV = $8673; + GL_MAP2_VERTEX_ATTRIB4_4_NV = $8674; + GL_MAP2_VERTEX_ATTRIB5_4_NV = $8675; + GL_MAP2_VERTEX_ATTRIB6_4_NV = $8676; + GL_MAP2_VERTEX_ATTRIB7_4_NV = $8677; + GL_MAP2_VERTEX_ATTRIB8_4_NV = $8678; + GL_MAP2_VERTEX_ATTRIB9_4_NV = $8679; + GL_MAP2_VERTEX_ATTRIB10_4_NV = $867A; + GL_MAP2_VERTEX_ATTRIB11_4_NV = $867B; + GL_MAP2_VERTEX_ATTRIB12_4_NV = $867C; + GL_MAP2_VERTEX_ATTRIB13_4_NV = $867D; + GL_MAP2_VERTEX_ATTRIB14_4_NV = $867E; + GL_MAP2_VERTEX_ATTRIB15_4_NV = $867F; +var + glBindProgramNV: procedure(target: GLenum; id: GLuint); stdcall = nil; + glDeleteProgramsNV: procedure(n: GLsizei; const ids: PGLuint); stdcall = nil; + glExecuteProgramNV: procedure(target: GLenum; id: GLuint; const params: PGLfloat); stdcall = nil; + glGenProgramsNV: procedure(n: GLsizei; ids: PGLuint); stdcall = nil; + glAreProgramsResidentNV: function(n: GLsizei; const ids: PGLuint; residences: PGLboolean): GLboolean; stdcall = nil; + glRequestResidentProgramsNV: procedure(n: GLsizei; ids: PGLuint); stdcall = nil; + glGetProgramParameterfvNV: procedure(target: GLenum; index: GLuint; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetProgramParameterdvNV: procedure(target: GLenum; index: GLuint; pname: GLenum; params: PGLdouble); stdcall = nil; + glGetProgramivNV: procedure(id: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetProgramStringNV: procedure(id: GLuint; pname: GLenum; _program: PGLubyte); stdcall = nil; + glGetTrackMatrixivNV: procedure(target: GLenum; address: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetVertexAttribdvNV: procedure(index: GLuint; pname: GLenum; params: PGLdouble); stdcall = nil; + glGetVertexAttribfvNV: procedure(index: GLuint; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetVertexAttribivNV: procedure(index: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetVertexAttribPointervNV: procedure(index: GLuint; pname: GLenum; pointer: PGLvoid); stdcall = nil; + glIsProgramNV: function(id: GLuint): GLboolean; stdcall = nil; + glLoadProgramNV: procedure(target: GLenum; id: GLuint; len: GLsizei; const _program: PGLubyte); stdcall = nil; + glProgramParameter4fNV: procedure(target: GLenum; index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); stdcall = nil; + glProgramParameter4fvNV: procedure(target: GLenum; index: GLuint; const params: PGLfloat); stdcall = nil; + glProgramParameters4dvNV: procedure(target: GLenum; index: GLuint; num: GLuint; const params: PGLdouble); stdcall = nil; + glProgramParameters4fvNV: procedure(target: GLenum; index: GLuint; num: GLuint; const params: PGLfloat); stdcall = nil; + glTrackMatrixNV: procedure(target: GLenum; address: GLuint; matrix: GLenum; transform: GLenum); stdcall = nil; + glVertexAttribPointerNV: procedure(index: GLuint; size: GLint; _type: GLenum; stride: GLsizei; const pointer: PGLvoid); stdcall = nil; + glVertexAttrib1sNV: procedure(index: GLuint; x: GLshort); stdcall = nil; + glVertexAttrib1fNV: procedure(index: GLuint; x: GLfloat); stdcall = nil; + glVertexAttrib1dNV: procedure(index: GLuint; x: GLdouble); stdcall = nil; + glVertexAttrib2sNV: procedure(index: GLuint; x: GLshort; y: GLshort); stdcall = nil; + glVertexAttrib2fNV: procedure(index: GLuint; x: GLfloat; y: GLfloat); stdcall = nil; + glVertexAttrib2dNV: procedure(index: GLuint; x: GLdouble; y: GLdouble); stdcall = nil; + glVertexAttrib3sNV: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort); stdcall = nil; + glVertexAttrib3fNV: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glVertexAttrib3dNV: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble); stdcall = nil; + glVertexAttrib4sNV: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort; w: GLshort); stdcall = nil; + glVertexAttrib4fNV: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); stdcall = nil; + glVertexAttrib4dNV: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); stdcall = nil; + glVertexAttrib4ubNV: procedure(index: GLuint; x: GLubyte; y: GLubyte; z: GLubyte; w: GLubyte); stdcall = nil; + glVertexAttrib1svNV: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib1fvNV: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib1dvNV: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib2svNV: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib2fvNV: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib2dvNV: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib3svNV: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib3fvNV: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib3dvNV: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib4svNV: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib4fvNV: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib4dvNV: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib4ubvNV: procedure(index: GLuint; const v: PGLubyte); stdcall = nil; + glVertexAttribs1svNV: procedure(index: GLuint; n: GLsizei; const v: PGLshort); stdcall = nil; + glVertexAttribs1fvNV: procedure(index: GLuint; n: GLsizei; const v: PGLfloat); stdcall = nil; + glVertexAttribs1dvNV: procedure(index: GLuint; n: GLsizei; const v: PGLdouble); stdcall = nil; + glVertexAttribs2svNV: procedure(index: GLuint; n: GLsizei; const v: PGLshort); stdcall = nil; + glVertexAttribs2fvNV: procedure(index: GLuint; n: GLsizei; const v: PGLfloat); stdcall = nil; + glVertexAttribs2dvNV: procedure(index: GLuint; n: GLsizei; const v: PGLdouble); stdcall = nil; + glVertexAttribs3svNV: procedure(index: GLuint; n: GLsizei; const v: PGLshort); stdcall = nil; + glVertexAttribs3fvNV: procedure(index: GLuint; n: GLsizei; const v: PGLfloat); stdcall = nil; + glVertexAttribs3dvNV: procedure(index: GLuint; n: GLsizei; const v: PGLdouble); stdcall = nil; + glVertexAttribs4svNV: procedure(index: GLuint; n: GLsizei; const v: PGLshort); stdcall = nil; + glVertexAttribs4fvNV: procedure(index: GLuint; n: GLsizei; const v: PGLfloat); stdcall = nil; + glVertexAttribs4dvNV: procedure(index: GLuint; n: GLsizei; const v: PGLdouble); stdcall = nil; + glVertexAttribs4ubvNV: procedure(index: GLuint; n: GLsizei; const v: PGLubyte); stdcall = nil; + +function Load_GL_NV_vertex_program: Boolean; + +//***** GL_NV_vertex_program1_1 *****// + +function Load_GL_NV_vertex_program1_1: Boolean; + +//***** GL_ATI_element_array *****// +const + GL_ELEMENT_ARRAY_ATI = $8768; + GL_ELEMENT_ARRAY_TYPE_ATI = $8769; + GL_ELEMENT_ARRAY_POINTER_ATI = $876A; +var + glElementPointerATI: procedure(_type: GLenum; const pointer: PGLvoid); stdcall = nil; + glDrawElementArrayATI: procedure(mode: GLenum; count: GLsizei); stdcall = nil; + glDrawRangeElementArrayATI: procedure(mode: GLenum; start: GLuint; _end: GLuint; count: GLsizei); stdcall = nil; + +function Load_GL_ATI_element_array: Boolean; + +//***** GL_ATI_envmap_bumpmap *****// +const + GL_BUMP_ROT_MATRIX_ATI = $8775; + GL_BUMP_ROT_MATRIX_SIZE_ATI = $8776; + GL_BUMP_NUM_TEX_UNITS_ATI = $8777; + GL_BUMP_TEX_UNITS_ATI = $8778; + GL_DUDV_ATI = $8779; + GL_DU8DV8_ATI = $877A; + GL_BUMP_ENVMAP_ATI = $877B; + GL_BUMP_TARGET_ATI = $877C; +var + glTexBumpParameterivATI: procedure(pname: GLenum; param: PGLint); stdcall = nil; + glTexBumpParameterfvATI: procedure(pname: GLenum; param: PGLfloat); stdcall = nil; + glGetTexBumpParameterivATI: procedure(pname: GLenum; param: PGLint); stdcall = nil; + glGetTexBumpParameterfvATI: procedure(pname: GLenum; param: PGLfloat); stdcall = nil; + +function Load_GL_ATI_envmap_bumpmap: Boolean; + +//***** GL_ATI_fragment_shader *****// +const + GL_FRAGMENT_SHADER_ATI = $8920; + GL_REG_0_ATI = $8921; + GL_REG_1_ATI = $8922; + GL_REG_2_ATI = $8923; + GL_REG_3_ATI = $8924; + GL_REG_4_ATI = $8925; + GL_REG_5_ATI = $8926; + GL_CON_0_ATI = $8941; + GL_CON_1_ATI = $8942; + GL_CON_2_ATI = $8943; + GL_CON_3_ATI = $8944; + GL_CON_4_ATI = $8945; + GL_CON_5_ATI = $8946; + GL_CON_6_ATI = $8947; + GL_CON_7_ATI = $8948; + GL_MOV_ATI = $8961; + GL_ADD_ATI = $8963; + GL_MUL_ATI = $8964; + GL_SUB_ATI = $8965; + GL_DOT3_ATI = $8966; + GL_DOT4_ATI = $8967; + GL_MAD_ATI = $8968; + GL_LERP_ATI = $8969; + GL_CND_ATI = $896A; + GL_CND0_ATI = $896B; + GL_DOT2_ADD_ATI = $896C; + GL_SECONDARY_INTERPOLATOR_ATI = $896D; + GL_SWIZZLE_STR_ATI = $8976; + GL_SWIZZLE_STQ_ATI = $8977; + GL_SWIZZLE_STR_DR_ATI = $8978; + GL_SWIZZLE_STQ_DQ_ATI = $8979; + GL_RED_BIT_ATI = $0001; + GL_GREEN_BIT_ATI = $0002; + GL_BLUE_BIT_ATI = $0004; + GL_2X_BIT_ATI = $0001; + GL_4X_BIT_ATI = $0002; + GL_8X_BIT_ATI = $0004; + GL_HALF_BIT_ATI = $0008; + GL_QUARTER_BIT_ATI = $0010; + GL_EIGHTH_BIT_ATI = $0020; + GL_SATURATE_BIT_ATI = $0040; + // GL_2X_BIT_ATI { already defined } + GL_COMP_BIT_ATI = $0002; + GL_NEGATE_BIT_ATI = $0004; + GL_BIAS_BIT_ATI = $0008; +var + glGenFragmentShadersATI: function(range: GLuint): GLuint; stdcall = nil; + glBindFragmentShaderATI: procedure(id: GLuint); stdcall = nil; + glDeleteFragmentShaderATI: procedure(id: GLuint); stdcall = nil; + glBeginFragmentShaderATI: procedure(); stdcall = nil; + glEndFragmentShaderATI: procedure(); stdcall = nil; + glPassTexCoordATI: procedure(dst: GLuint; coord: GLuint; swizzle: GLenum); stdcall = nil; + glSampleMapATI: procedure(dst: GLuint; interp: GLuint; swizzle: GLenum); stdcall = nil; + glColorFragmentOp1ATI: procedure(op: GLenum; dst: GLuint; dstMask: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint); stdcall = nil; + glColorFragmentOp2ATI: procedure(op: GLenum; dst: GLuint; dstMask: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint; arg2: GLuint; arg2Rep: GLuint; arg2Mod: GLuint); stdcall = nil; + glColorFragmentOp3ATI: procedure(op: GLenum; dst: GLuint; dstMask: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint; arg2: GLuint; arg2Rep: GLuint; arg2Mod: GLuint; arg3: GLuint; arg3Rep: GLuint; arg3Mod: GLuint); stdcall = nil; + glAlphaFragmentOp1ATI: procedure(op: GLenum; dst: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint); stdcall = nil; + glAlphaFragmentOp2ATI: procedure(op: GLenum; dst: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint; arg2: GLuint; arg2Rep: GLuint; arg2Mod: GLuint); stdcall = nil; + glAlphaFragmentOp3ATI: procedure(op: GLenum; dst: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint; arg2: GLuint; arg2Rep: GLuint; arg2Mod: GLuint; arg3: GLuint; arg3Rep: GLuint; arg3Mod: GLuint); stdcall = nil; + glSetFragmentShaderConstantATI: procedure(dst: GLuint; const value: PGLfloat); stdcall = nil; + +function Load_GL_ATI_fragment_shader: Boolean; + +//***** GL_ATI_pn_triangles *****// +const + GL_PN_TRIANGLES_ATI = $87F0; + GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = $87F1; + GL_PN_TRIANGLES_POINT_MODE_ATI = $87F2; + GL_PN_TRIANGLES_NORMAL_MODE_ATI = $87F3; + GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI = $87F4; + GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI = $87F5; + GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI = $87F6; + GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = $87F7; + GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = $87F8; +var + glPNTrianglesiATI: procedure(pname: GLenum; param: GLint); stdcall = nil; + glPNTrianglesfATI: procedure(pname: GLenum; param: GLfloat); stdcall = nil; + +function Load_GL_ATI_pn_triangles: Boolean; + +//***** GL_ATI_texture_mirror_once *****// +const + GL_MIRROR_CLAMP_ATI = $8742; + GL_MIRROR_CLAMP_TO_EDGE_ATI = $8743; + +function Load_GL_ATI_texture_mirror_once: Boolean; + +//***** GL_ATI_vertex_array_object *****// +const + GL_STATIC_ATI = $8760; + GL_DYNAMIC_ATI = $8761; + GL_PRESERVE_ATI = $8762; + GL_DISCARD_ATI = $8763; + GL_OBJECT_BUFFER_SIZE_ATI = $8764; + GL_OBJECT_BUFFER_USAGE_ATI = $8765; + GL_ARRAY_OBJECT_BUFFER_ATI = $8766; + GL_ARRAY_OBJECT_OFFSET_ATI = $8767; +var + glNewObjectBufferATI: function(size: GLsizei; const pointer: PGLvoid; usage: GLenum): GLuint; stdcall = nil; + glIsObjectBufferATI: function(buffer: GLuint): GLboolean; stdcall = nil; + glUpdateObjectBufferATI: procedure(buffer: GLuint; offset: GLuint; size: GLsizei; const pointer: PGLvoid; preserve: GLenum); stdcall = nil; + glGetObjectBufferfvATI: procedure(buffer: GLuint; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetObjectBufferivATI: procedure(buffer: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glDeleteObjectBufferATI: procedure(buffer: GLuint); stdcall = nil; + glArrayObjectATI: procedure(_array: GLenum; size: GLint; _type: GLenum; stride: GLsizei; buffer: GLuint; offset: GLuint); stdcall = nil; + glGetArrayObjectfvATI: procedure(_array: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetArrayObjectivATI: procedure(_array: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glVariantArrayObjectATI: procedure(id: GLuint; _type: GLenum; stride: GLsizei; buffer: GLuint; offset: GLuint); stdcall = nil; + glGetVariantArrayObjectfvATI: procedure(id: GLuint; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetVariantArrayObjectivATI: procedure(id: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + +function Load_GL_ATI_vertex_array_object: Boolean; + +//***** GL_ATI_vertex_streams *****// +const + GL_MAX_VERTEX_STREAMS_ATI = $876B; + GL_VERTEX_STREAM0_ATI = $876C; + GL_VERTEX_STREAM1_ATI = $876D; + GL_VERTEX_STREAM2_ATI = $876E; + GL_VERTEX_STREAM3_ATI = $876F; + GL_VERTEX_STREAM4_ATI = $8770; + GL_VERTEX_STREAM5_ATI = $8771; + GL_VERTEX_STREAM6_ATI = $8772; + GL_VERTEX_STREAM7_ATI = $8773; + GL_VERTEX_SOURCE_ATI = $8774; +var + glVertexStream1s: procedure(stream: GLenum; coords: GLshort); stdcall = nil; + glVertexStream1i: procedure(stream: GLenum; coords: GLint); stdcall = nil; + glVertexStream1f: procedure(stream: GLenum; coords: GLfloat); stdcall = nil; + glVertexStream1d: procedure(stream: GLenum; coords: GLdouble); stdcall = nil; + glVertexStream1sv: procedure(stream: GLenum; coords: GLshort); stdcall = nil; + glVertexStream1iv: procedure(stream: GLenum; coords: GLint); stdcall = nil; + glVertexStream1fv: procedure(stream: GLenum; coords: GLfloat); stdcall = nil; + glVertexStream1dv: procedure(stream: GLenum; coords: GLdouble); stdcall = nil; + glVertexStream2s: procedure(stream: GLenum; coords: GLshort); stdcall = nil; + glVertexStream2i: procedure(stream: GLenum; coords: GLint); stdcall = nil; + glVertexStream2f: procedure(stream: GLenum; coords: GLfloat); stdcall = nil; + glVertexStream2d: procedure(stream: GLenum; coords: GLdouble); stdcall = nil; + glVertexStream2sv: procedure(stream: GLenum; coords: GLshort); stdcall = nil; + glVertexStream2iv: procedure(stream: GLenum; coords: GLint); stdcall = nil; + glVertexStream2fv: procedure(stream: GLenum; coords: GLfloat); stdcall = nil; + glVertexStream2dv: procedure(stream: GLenum; coords: GLdouble); stdcall = nil; + glVertexStream3s: procedure(stream: GLenum; coords: GLshort); stdcall = nil; + glVertexStream3i: procedure(stream: GLenum; coords: GLint); stdcall = nil; + glVertexStream3f: procedure(stream: GLenum; coords: GLfloat); stdcall = nil; + glVertexStream3d: procedure(stream: GLenum; coords: GLdouble); stdcall = nil; + glVertexStream3sv: procedure(stream: GLenum; coords: GLshort); stdcall = nil; + glVertexStream3iv: procedure(stream: GLenum; coords: GLint); stdcall = nil; + glVertexStream3fv: procedure(stream: GLenum; coords: GLfloat); stdcall = nil; + glVertexStream3dv: procedure(stream: GLenum; coords: GLdouble); stdcall = nil; + glVertexStream4s: procedure(stream: GLenum; coords: GLshort); stdcall = nil; + glVertexStream4i: procedure(stream: GLenum; coords: GLint); stdcall = nil; + glVertexStream4f: procedure(stream: GLenum; coords: GLfloat); stdcall = nil; + glVertexStream4d: procedure(stream: GLenum; coords: GLdouble); stdcall = nil; + glVertexStream4sv: procedure(stream: GLenum; coords: GLshort); stdcall = nil; + glVertexStream4iv: procedure(stream: GLenum; coords: GLint); stdcall = nil; + glVertexStream4fv: procedure(stream: GLenum; coords: GLfloat); stdcall = nil; + glVertexStream4dv: procedure(stream: GLenum; coords: GLdouble); stdcall = nil; + glNormalStream3b: procedure(stream: GLenum; coords: GLbyte); stdcall = nil; + glNormalStream3s: procedure(stream: GLenum; coords: GLshort); stdcall = nil; + glNormalStream3i: procedure(stream: GLenum; coords: GLint); stdcall = nil; + glNormalStream3f: procedure(stream: GLenum; coords: GLfloat); stdcall = nil; + glNormalStream3d: procedure(stream: GLenum; coords: GLdouble); stdcall = nil; + glNormalStream3bv: procedure(stream: GLenum; coords: GLbyte); stdcall = nil; + glNormalStream3sv: procedure(stream: GLenum; coords: GLshort); stdcall = nil; + glNormalStream3iv: procedure(stream: GLenum; coords: GLint); stdcall = nil; + glNormalStream3fv: procedure(stream: GLenum; coords: GLfloat); stdcall = nil; + glNormalStream3dv: procedure(stream: GLenum; coords: GLdouble); stdcall = nil; + glClientActiveVertexStream: procedure(stream: GLenum); stdcall = nil; + glVertexBlendEnvi: procedure(pname: GLenum; param: GLint); stdcall = nil; + glVertexBlendEnvf: procedure(pname: GLenum; param: GLfloat); stdcall = nil; + +function Load_GL_ATI_vertex_streams: Boolean; + +//***** WGL_I3D_image_buffer *****// +const + WGL_IMAGE_BUFFER_MIN_ACCESS_I3D = $0001; + WGL_IMAGE_BUFFER_LOCK_I3D = $0002; +var + wglCreateImageBufferI3D: function(hDC: HDC; dwSize: DWORD; uFlags: UINT): PGLvoid; stdcall = nil; + wglDestroyImageBufferI3D: function(hDC: HDC; pAddress: PGLvoid): BOOL; stdcall = nil; + wglAssociateImageBufferEventsI3D: function(hdc: HDC; pEvent: PHandle; pAddress: PGLvoid; pSize: PDWORD; count: UINT): BOOL; stdcall = nil; + wglReleaseImageBufferEventsI3D: function(hdc: HDC; pAddress: PGLvoid; count: UINT): BOOL; stdcall = nil; + +function Load_WGL_I3D_image_buffer: Boolean; + +//***** WGL_I3D_swap_frame_lock *****// +var + wglEnableFrameLockI3D: function(): BOOL; stdcall = nil; + wglDisableFrameLockI3D: function(): BOOL; stdcall = nil; + wglIsEnabledFrameLockI3D: function(pFlag: PBOOL): BOOL; stdcall = nil; + wglQueryFrameLockMasterI3D: function(pFlag: PBOOL): BOOL; stdcall = nil; + +function Load_WGL_I3D_swap_frame_lock: Boolean; + +//***** WGL_I3D_swap_frame_usage *****// +var + wglGetFrameUsageI3D: function(pUsage: PGLfloat): BOOL; stdcall = nil; + wglBeginFrameTrackingI3D: function(): BOOL; stdcall = nil; + wglEndFrameTrackingI3D: function(): BOOL; stdcall = nil; + wglQueryFrameTrackingI3D: function(pFrameCount: PDWORD; pMissedFrames: PDWORD; pLastMissedUsage: PGLfloat): BOOL; stdcall = nil; + +function Load_WGL_I3D_swap_frame_usage: Boolean; + +//***** GL_3DFX_texture_compression_FXT1 *****// +const + GL_COMPRESSED_RGB_FXT1_3DFX = $86B0; + GL_COMPRESSED_RGBA_FXT1_3DFX = $86B1; + +function Load_GL_3DFX_texture_compression_FXT1: Boolean; + +//***** GL_IBM_cull_vertex *****// +const + GL_CULL_VERTEX_IBM = $1928A; + +function Load_GL_IBM_cull_vertex: Boolean; + +//***** GL_IBM_multimode_draw_arrays *****// +var + glMultiModeDrawArraysIBM: procedure(mode: PGLenum; first: PGLint; count: PGLsizei; primcount: GLsizei; modestride: GLint); stdcall = nil; + glMultiModeDrawElementsIBM: procedure(mode: PGLenum; count: PGLsizei; _type: GLenum; const indices: PGLvoid; primcount: GLsizei; modestride: GLint); stdcall = nil; + +function Load_GL_IBM_multimode_draw_arrays: Boolean; + +//***** GL_IBM_raster_pos_clip *****// +const + GL_RASTER_POSITION_UNCLIPPED_IBM = $19262; + +function Load_GL_IBM_raster_pos_clip: Boolean; + +//***** GL_IBM_texture_mirrored_repeat *****// +const + GL_MIRRORED_REPEAT_IBM = $8370; + +function Load_GL_IBM_texture_mirrored_repeat: Boolean; + +//***** GL_IBM_vertex_array_lists *****// +const + GL_VERTEX_ARRAY_LIST_IBM = $1929E; + GL_NORMAL_ARRAY_LIST_IBM = $1929F; + GL_COLOR_ARRAY_LIST_IBM = $192A0; + GL_INDEX_ARRAY_LIST_IBM = $192A1; + GL_TEXTURE_COORD_ARRAY_LIST_IBM = $192A2; + GL_EDGE_FLAG_ARRAY_LIST_IBM = $192A3; + GL_FOG_COORDINATE_ARRAY_LIST_IBM = $192A4; + GL_SECONDARY_COLOR_ARRAY_LIST_IBM = $192A5; + GL_VERTEX_ARRAY_LIST_STRIDE_IBM = $192A8; + GL_NORMAL_ARRAY_LIST_STRIDE_IBM = $192A9; + GL_COLOR_ARRAY_LIST_STRIDE_IBM = $192AA; + GL_INDEX_ARRAY_LIST_STRIDE_IBM = $192AB; + GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM = $192AC; + GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM = $192AD; + GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM = $192AE; + GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM = $192AF; +var + glColorPointerListIBM: procedure(size: GLint; _type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); stdcall = nil; + glSecondaryColorPointerListIBM: procedure(size: GLint; _type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); stdcall = nil; + glEdgeFlagPointerListIBM: procedure(stride: GLint; const pointer: PGLboolean; ptrstride: GLint); stdcall = nil; + glFogCoordPointerListIBM: procedure(_type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); stdcall = nil; + glNormalPointerListIBM: procedure(_type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); stdcall = nil; + glTexCoordPointerListIBM: procedure(size: GLint; _type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); stdcall = nil; + glVertexPointerListIBM: procedure(size: GLint; _type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); stdcall = nil; + +function Load_GL_IBM_vertex_array_lists: Boolean; + +//***** GL_MESA_resize_buffers *****// +var + glResizeBuffersMESA: procedure(); stdcall = nil; + +function Load_GL_MESA_resize_buffers: Boolean; + +//***** GL_MESA_window_pos *****// +var + glWindowPos2dMESA: procedure(x: GLdouble; y: GLdouble); stdcall = nil; + glWindowPos2fMESA: procedure(x: GLfloat; y: GLfloat); stdcall = nil; + glWindowPos2iMESA: procedure(x: GLint; y: GLint); stdcall = nil; + glWindowPos2sMESA: procedure(x: GLshort; y: GLshort); stdcall = nil; + glWindowPos2ivMESA: procedure(const p: PGLint); stdcall = nil; + glWindowPos2svMESA: procedure(const p: PGLshort); stdcall = nil; + glWindowPos2fvMESA: procedure(const p: PGLfloat); stdcall = nil; + glWindowPos2dvMESA: procedure(const p: PGLdouble); stdcall = nil; + glWindowPos3iMESA: procedure(x: GLint; y: GLint; z: GLint); stdcall = nil; + glWindowPos3sMESA: procedure(x: GLshort; y: GLshort; z: GLshort); stdcall = nil; + glWindowPos3fMESA: procedure(x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glWindowPos3dMESA: procedure(x: GLdouble; y: GLdouble; z: GLdouble); stdcall = nil; + glWindowPos3ivMESA: procedure(const p: PGLint); stdcall = nil; + glWindowPos3svMESA: procedure(const p: PGLshort); stdcall = nil; + glWindowPos3fvMESA: procedure(const p: PGLfloat); stdcall = nil; + glWindowPos3dvMESA: procedure(const p: PGLdouble); stdcall = nil; + glWindowPos4iMESA: procedure(x: GLint; y: GLint; z: GLint; w: GLint); stdcall = nil; + glWindowPos4sMESA: procedure(x: GLshort; y: GLshort; z: GLshort; w: GLshort); stdcall = nil; + glWindowPos4fMESA: procedure(x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); stdcall = nil; + glWindowPos4dMESA: procedure(x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); stdcall = nil; + glWindowPos4ivMESA: procedure(const p: PGLint); stdcall = nil; + glWindowPos4svMESA: procedure(const p: PGLshort); stdcall = nil; + glWindowPos4fvMESA: procedure(const p: PGLfloat); stdcall = nil; + glWindowPos4dvMESA: procedure(const p: PGLdouble); stdcall = nil; + +function Load_GL_MESA_window_pos: Boolean; + +//***** GL_OML_interlace *****// +const + GL_INTERLACE_OML = $8980; + GL_INTERLACE_READ_OML = $8981; + +function Load_GL_OML_interlace: Boolean; + +//***** GL_OML_resample *****// +const + GL_PACK_RESAMPLE_OML = $8984; + GL_UNPACK_RESAMPLE_OML = $8985; + GL_RESAMPLE_REPLICATE_OML = $8986; + GL_RESAMPLE_ZERO_FILL_OML = $8987; + GL_RESAMPLE_AVERAGE_OML = $8988; + GL_RESAMPLE_DECIMATE_OML = $8989; + // GL_RESAMPLE_AVERAGE_OML { already defined } + +function Load_GL_OML_resample: Boolean; + +//***** GL_OML_subsample *****// +const + GL_FORMAT_SUBSAMPLE_24_24_OML = $8982; + GL_FORMAT_SUBSAMPLE_244_244_OML = $8983; + +function Load_GL_OML_subsample: Boolean; + +//***** GL_SGIS_generate_mipmap *****// +const + GL_GENERATE_MIPMAP_SGIS = $8191; + GL_GENERATE_MIPMAP_HINT_SGIS = $8192; + +function Load_GL_SGIS_generate_mipmap: Boolean; + +//***** GL_SGIS_multisample *****// +const + GLX_SAMPLE_BUFFERS_SGIS = $186A0; + GLX_SAMPLES_SGIS = $186A1; + GL_MULTISAMPLE_SGIS = $809D; + GL_SAMPLE_ALPHA_TO_MASK_SGIS = $809E; + GL_SAMPLE_ALPHA_TO_ONE_SGIS = $809F; + GL_SAMPLE_MASK_SGIS = $80A0; + GL_MULTISAMPLE_BIT_EXT = $20000000; + GL_1PASS_SGIS = $80A1; + GL_2PASS_0_SGIS = $80A2; + GL_2PASS_1_SGIS = $80A3; + GL_4PASS_0_SGIS = $80A4; + GL_4PASS_1_SGIS = $80A5; + GL_4PASS_2_SGIS = $80A6; + GL_4PASS_3_SGIS = $80A7; + GL_SAMPLE_BUFFERS_SGIS = $80A8; + GL_SAMPLES_SGIS = $80A9; + GL_SAMPLE_MASK_VALUE_SGIS = $80AA; + GL_SAMPLE_MASK_INVERT_SGIS = $80AB; + GL_SAMPLE_PATTERN_SGIS = $80AC; +var + glSampleMaskSGIS: procedure(value: GLclampf; invert: GLboolean); stdcall = nil; + glSamplePatternSGIS: procedure(pattern: GLenum); stdcall = nil; + +function Load_GL_SGIS_multisample: Boolean; + +//***** GL_SGIS_pixel_texture *****// +const + GL_PIXEL_TEXTURE_SGIS = $8353; + GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS = $8354; + GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS = $8355; + GL_PIXEL_GROUP_COLOR_SGIS = $8356; +var + glPixelTexGenParameteriSGIS: procedure(pname: GLenum; param: GLint); stdcall = nil; + glPixelTexGenParameterfSGIS: procedure(pname: GLenum; param: GLfloat); stdcall = nil; + glGetPixelTexGenParameterivSGIS: procedure(pname: GLenum; params: GLint); stdcall = nil; + glGetPixelTexGenParameterfvSGIS: procedure(pname: GLenum; params: GLfloat); stdcall = nil; + +function Load_GL_SGIS_pixel_texture: Boolean; + +//***** GL_SGIS_texture_border_clamp *****// + // GL_CLAMP_TO_BORDER_SGIS { already defined } + +function Load_GL_SGIS_texture_border_clamp: Boolean; + +//***** GL_SGIS_texture_color_mask *****// +const + GL_TEXTURE_COLOR_WRITEMASK_SGIS = $81EF; +var + glTextureColorMaskSGIS: procedure(r: GLboolean; g: GLboolean; b: GLboolean; a: GLboolean); stdcall = nil; + +function Load_GL_SGIS_texture_color_mask: Boolean; + +//***** GL_SGIS_texture_edge_clamp *****// +const + GL_CLAMP_TO_EDGE_SGIS = $812F; + +function Load_GL_SGIS_texture_edge_clamp: Boolean; + +//***** GL_SGIS_texture_lod *****// +const + GL_TEXTURE_MIN_LOD_SGIS = $813A; + GL_TEXTURE_MAX_LOD_SGIS = $813B; + GL_TEXTURE_BASE_LEVEL_SGIS = $813C; + GL_TEXTURE_MAX_LEVEL_SGIS = $813D; + +function Load_GL_SGIS_texture_lod: Boolean; + +//***** GL_SGIS_depth_texture *****// +const + GL_DEPTH_COMPONENT16_SGIX = $81A5; + GL_DEPTH_COMPONENT24_SGIX = $81A6; + GL_DEPTH_COMPONENT32_SGIX = $81A7; + +function Load_GL_SGIS_depth_texture: Boolean; + +//***** GL_SGIX_fog_offset *****// +const + GL_FOG_OFFSET_SGIX = $8198; + GL_FOG_OFFSET_VALUE_SGIX = $8199; + +function Load_GL_SGIX_fog_offset: Boolean; + +//***** GL_SGIX_interlace *****// +const + GL_INTERLACE_SGIX = $8094; + +function Load_GL_SGIX_interlace: Boolean; + +//***** GL_SGIX_shadow_ambient *****// +const + GL_SHADOW_AMBIENT_SGIX = $80BF; + +function Load_GL_SGIX_shadow_ambient: Boolean; + +//***** GL_SGI_color_matrix *****// +const + GL_COLOR_MATRIX_SGI = $80B1; + GL_COLOR_MATRIX_STACK_DEPTH_SGI = $80B2; + GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI = $80B3; + GL_POST_COLOR_MATRIX_RED_SCALE_SGI = $80B4; + GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI = $80B5; + GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI = $80B6; + GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI = $80B7; + GL_POST_COLOR_MATRIX_RED_BIAS_SGI = $80B8; + GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI = $80B9; + GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI = $80BA; + GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI = $80BB; + +function Load_GL_SGI_color_matrix: Boolean; + +//***** GL_SGI_color_table *****// +const + GL_COLOR_TABLE_SGI = $80D0; + GL_POST_CONVOLUTION_COLOR_TABLE_SGI = $80D1; + GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI = $80D2; + GL_PROXY_COLOR_TABLE_SGI = $80D3; + GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI = $80D4; + GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI = $80D5; + GL_COLOR_TABLE_SCALE_SGI = $80D6; + GL_COLOR_TABLE_BIAS_SGI = $80D7; + GL_COLOR_TABLE_FORMAT_SGI = $80D8; + GL_COLOR_TABLE_WIDTH_SGI = $80D9; + GL_COLOR_TABLE_RED_SIZE_SGI = $80DA; + GL_COLOR_TABLE_GREEN_SIZE_SGI = $80DB; + GL_COLOR_TABLE_BLUE_SIZE_SGI = $80DC; + GL_COLOR_TABLE_ALPHA_SIZE_SGI = $80DD; + GL_COLOR_TABLE_LUMINANCE_SIZE_SGI = $80DE; + GL_COLOR_TABLE_INTENSITY_SIZE_SGI = $80DF; +var + glColorTableSGI: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; format: GLenum; _type: GLenum; const table: PGLvoid); stdcall = nil; + glCopyColorTableSGI: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei); stdcall = nil; + glColorTableParameterivSGI: procedure(target: GLenum; pname: GLenum; const params: PGLint); stdcall = nil; + glColorTableParameterfvSGI: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); stdcall = nil; + glGetColorTableSGI: procedure(target: GLenum; format: GLenum; _type: GLenum; table: PGLvoid); stdcall = nil; + glGetColorTableParameterivSGI: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetColorTableParameterfvSGI: procedure(target: GLenum; pname: GLenum; params: PGLfloat); stdcall = nil; + +function Load_GL_SGI_color_table: Boolean; + +//***** GL_SGI_texture_color_table *****// +const + GL_TEXTURE_COLOR_TABLE_SGI = $80BC; + GL_PROXY_TEXTURE_COLOR_TABLE_SGI = $80BD; + +function Load_GL_SGI_texture_color_table: Boolean; + +//***** GL_SUN_vertex *****// +var + glColor4ubVertex2fSUN: procedure(r: GLubyte; g: GLubyte; b: GLubyte; a: GLubyte; x: GLfloat; y: GLfloat); stdcall = nil; + glColor4ubVertex2fvSUN: procedure(const c: PGLubyte; const v: PGLfloat); stdcall = nil; + glColor4ubVertex3fSUN: procedure(r: GLubyte; g: GLubyte; b: GLubyte; a: GLubyte; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glColor4ubVertex3fvSUN: procedure(const c: PGLubyte; const v: PGLfloat); stdcall = nil; + glColor3fVertex3fSUN: procedure(r: GLfloat; g: GLfloat; b: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glColor3fVertex3fvSUN: procedure(const c: PGLfloat; const v: PGLfloat); stdcall = nil; + glNormal3fVertex3fSUN: procedure(nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glNormal3fVertex3fvSUN: procedure(const n: PGLfloat; const v: PGLfloat); stdcall = nil; + glColor4fNormal3fVertex3fSUN: procedure(r: GLfloat; g: GLfloat; b: GLfloat; a: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glColor4fNormal3fVertex3fvSUN: procedure(const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); stdcall = nil; + glTexCoord2fVertex3fSUN: procedure(s: GLfloat; t: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glTexCoord2fVertex3fvSUN: procedure(const tc: PGLfloat; const v: PGLfloat); stdcall = nil; + glTexCoord4fVertex4fSUN: procedure(s: GLfloat; t: GLfloat; p: GLfloat; q: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); stdcall = nil; + glTexCoord4fVertex4fvSUN: procedure(const tc: PGLfloat; const v: PGLfloat); stdcall = nil; + glTexCoord2fColor4ubVertex3fSUN: procedure(s: GLfloat; t: GLfloat; r: GLubyte; g: GLubyte; b: GLubyte; a: GLubyte; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glTexCoord2fColor4ubVertex3fvSUN: procedure(const tc: PGLfloat; const c: PGLubyte; const v: PGLfloat); stdcall = nil; + glTexCoord2fColor3fVertex3fSUN: procedure(s: GLfloat; t: GLfloat; r: GLfloat; g: GLfloat; b: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glTexCoord2fColor3fVertex3fvSUN: procedure(const tc: PGLfloat; const c: PGLfloat; const v: PGLfloat); stdcall = nil; + glTexCoord2fNormal3fVertex3fSUN: procedure(s: GLfloat; t: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glTexCoord2fNormal3fVertex3fvSUN: procedure(const tc: PGLfloat; const n: PGLfloat; const v: PGLfloat); stdcall = nil; + glTexCoord2fColor4fNormal3fVertex3fSUN: procedure(s: GLfloat; t: GLfloat; r: GLfloat; g: GLfloat; b: GLfloat; a: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glTexCoord2fColor4fNormal3fVertex3fvSUN: procedure(const tc: PGLfloat; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); stdcall = nil; + glTexCoord4fColor4fNormal3fVertex4fSUN: procedure(s: GLfloat; t: GLfloat; p: GLfloat; q: GLfloat; r: GLfloat; g: GLfloat; b: GLfloat; a: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); stdcall = nil; + glTexCoord4fColor4fNormal3fVertex4fvSUN: procedure(const tc: PGLfloat; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); stdcall = nil; + glReplacementCodeuiVertex3fSUN: procedure(rc: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glReplacementCodeuiVertex3fvSUN: procedure(const rc: PGLuint; const v: PGLfloat); stdcall = nil; + glReplacementCodeuiColor4ubVertex3fSUN: procedure(rc: GLuint; r: GLubyte; g: GLubyte; b: GLubyte; a: GLubyte; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glReplacementCodeuiColor4ubVertex3fvSUN: procedure(const rc: PGLuint; const c: PGLubyte; const v: PGLfloat); stdcall = nil; + glReplacementCodeuiColor3fVertex3fSUN: procedure(rc: GLuint; r: GLfloat; g: GLfloat; b: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glReplacementCodeuiColor3fVertex3fvSUN: procedure(const rc: PGLuint; const c: PGLfloat; const v: PGLfloat); stdcall = nil; + glReplacementCodeuiNormal3fVertex3fSUN: procedure(rc: GLuint; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glReplacementCodeuiNormal3fVertex3fvSUN: procedure(const rc: PGLuint; const n: PGLfloat; const v: PGLfloat); stdcall = nil; + glReplacementCodeuiColor4fNormal3fVertex3fSUN: procedure(rc: GLuint; r: GLfloat; g: GLfloat; b: GLfloat; a: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glReplacementCodeuiColor4fNormal3fVertex3fvSUN: procedure(const rc: PGLuint; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); stdcall = nil; + glReplacementCodeuiTexCoord2fVertex3fSUN: procedure(rc: GLuint; s: GLfloat; t: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glReplacementCodeuiTexCoord2fVertex3fvSUN: procedure(const rc: PGLuint; const tc: PGLfloat; const v: PGLfloat); stdcall = nil; + glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN: procedure(rc: GLuint; s: GLfloat; t: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN: procedure(const rc: PGLuint; const tc: PGLfloat; const n: PGLfloat; const v: PGLfloat); stdcall = nil; + glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN: procedure(rc: GLuint; s: GLfloat; t: GLfloat; r: GLfloat; g: GLfloat; b: GLfloat; a: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN: procedure(const rc: PGLuint; const tc: PGLfloat; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); stdcall = nil; + +function Load_GL_SUN_vertex: Boolean; + +//***** GL_ARB_fragment_program *****// +const + GL_FRAGMENT_PROGRAM_ARB = $8804; + // GL_PROGRAM_FORMAT_ASCII_ARB { already defined } + // GL_PROGRAM_LENGTH_ARB { already defined } + // GL_PROGRAM_FORMAT_ARB { already defined } + // GL_PROGRAM_BINDING_ARB { already defined } + // GL_PROGRAM_INSTRUCTIONS_ARB { already defined } + // GL_MAX_PROGRAM_INSTRUCTIONS_ARB { already defined } + // GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB { already defined } + // GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB { already defined } + // GL_PROGRAM_TEMPORARIES_ARB { already defined } + // GL_MAX_PROGRAM_TEMPORARIES_ARB { already defined } + // GL_PROGRAM_NATIVE_TEMPORARIES_ARB { already defined } + // GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB { already defined } + // GL_PROGRAM_PARAMETERS_ARB { already defined } + // GL_MAX_PROGRAM_PARAMETERS_ARB { already defined } + // GL_PROGRAM_NATIVE_PARAMETERS_ARB { already defined } + // GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB { already defined } + // GL_PROGRAM_ATTRIBS_ARB { already defined } + // GL_MAX_PROGRAM_ATTRIBS_ARB { already defined } + // GL_PROGRAM_NATIVE_ATTRIBS_ARB { already defined } + // GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB { already defined } + // GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB { already defined } + // GL_MAX_PROGRAM_ENV_PARAMETERS_ARB { already defined } + // GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB { already defined } + GL_PROGRAM_ALU_INSTRUCTIONS_ARB = $8805; + GL_PROGRAM_TEX_INSTRUCTIONS_ARB = $8806; + GL_PROGRAM_TEX_INDIRECTIONS_ARB = $8807; + GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = $8808; + GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = $8809; + GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = $880A; + GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = $880B; + GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = $880C; + GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = $880D; + GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = $880E; + GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = $880F; + GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = $8810; + // GL_PROGRAM_STRING_ARB { already defined } + // GL_PROGRAM_ERROR_POSITION_ARB { already defined } + // GL_CURRENT_MATRIX_ARB { already defined } + // GL_TRANSPOSE_CURRENT_MATRIX_ARB { already defined } + // GL_CURRENT_MATRIX_STACK_DEPTH_ARB { already defined } + // GL_MAX_PROGRAM_MATRICES_ARB { already defined } + // GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB { already defined } + GL_MAX_TEXTURE_COORDS_ARB = $8871; + GL_MAX_TEXTURE_IMAGE_UNITS_ARB = $8872; + // GL_PROGRAM_ERROR_STRING_ARB { already defined } + // GL_MATRIX0_ARB { already defined } + // GL_MATRIX1_ARB { already defined } + // GL_MATRIX2_ARB { already defined } + // GL_MATRIX3_ARB { already defined } + // GL_MATRIX4_ARB { already defined } + // GL_MATRIX5_ARB { already defined } + // GL_MATRIX6_ARB { already defined } + // GL_MATRIX7_ARB { already defined } + // GL_MATRIX8_ARB { already defined } + // GL_MATRIX9_ARB { already defined } + // GL_MATRIX10_ARB { already defined } + // GL_MATRIX11_ARB { already defined } + // GL_MATRIX12_ARB { already defined } + // GL_MATRIX13_ARB { already defined } + // GL_MATRIX14_ARB { already defined } + // GL_MATRIX15_ARB { already defined } + // GL_MATRIX16_ARB { already defined } + // GL_MATRIX17_ARB { already defined } + // GL_MATRIX18_ARB { already defined } + // GL_MATRIX19_ARB { already defined } + // GL_MATRIX20_ARB { already defined } + // GL_MATRIX21_ARB { already defined } + // GL_MATRIX22_ARB { already defined } + // GL_MATRIX23_ARB { already defined } + // GL_MATRIX24_ARB { already defined } + // GL_MATRIX25_ARB { already defined } + // GL_MATRIX26_ARB { already defined } + // GL_MATRIX27_ARB { already defined } + // GL_MATRIX28_ARB { already defined } + // GL_MATRIX29_ARB { already defined } + // GL_MATRIX30_ARB { already defined } + // GL_MATRIX31_ARB { already defined } + // glProgramStringARB { already defined } + // glBindProgramARB { already defined } + // glDeleteProgramsARB { already defined } + // glGenProgramsARB { already defined } + // glProgramEnvParameter4dARB { already defined } + // glProgramEnvParameter4dvARB { already defined } + // glProgramEnvParameter4fARB { already defined } + // glProgramEnvParameter4fvARB { already defined } + // glProgramLocalParameter4dARB { already defined } + // glProgramLocalParameter4dvARB { already defined } + // glProgramLocalParameter4fARB { already defined } + // glProgramLocalParameter4fvARB { already defined } + // glGetProgramEnvParameterdvARB { already defined } + // glGetProgramEnvParameterfvARB { already defined } + // glGetProgramLocalParameterdvARB { already defined } + // glGetProgramLocalParameterfvARB { already defined } + // glGetProgramivARB { already defined } + // glGetProgramStringARB { already defined } + // glIsProgramARB { already defined } + +function Load_GL_ARB_fragment_program: Boolean; + +//***** GL_ATI_text_fragment_shader *****// +const + GL_TEXT_FRAGMENT_SHADER_ATI = $8200; + +function Load_GL_ATI_text_fragment_shader: Boolean; + +//***** GL_APPLE_client_storage *****// +const + GL_UNPACK_CLIENT_STORAGE_APPLE = $85B2; + +function Load_GL_APPLE_client_storage: Boolean; + +//***** GL_APPLE_element_array *****// +const + GL_ELEMENT_ARRAY_APPLE = $8768; + GL_ELEMENT_ARRAY_TYPE_APPLE = $8769; + GL_ELEMENT_ARRAY_POINTER_APPLE = $876A; +var + glElementPointerAPPLE: procedure(_type: GLenum; const pointer: PGLvoid); stdcall = nil; + glDrawElementArrayAPPLE: procedure(mode: GLenum; first: GLint; count: GLsizei); stdcall = nil; + glDrawRangeElementArrayAPPLE: procedure(mode: GLenum; start: GLuint; _end: GLuint; first: GLint; count: GLsizei); stdcall = nil; + glMultiDrawElementArrayAPPLE: procedure(mode: GLenum; const first: PGLint; const count: PGLsizei; primcount: GLsizei); stdcall = nil; + glMultiDrawRangeElementArrayAPPLE: procedure(mode: GLenum; start: GLuint; _end: GLuint; const first: PGLint; const count: PGLsizei; primcount: GLsizei); stdcall = nil; + +function Load_GL_APPLE_element_array: Boolean; + +//***** GL_APPLE_fence *****// +const + GL_DRAW_PIXELS_APPLE = $8A0A; + GL_FENCE_APPLE = $8A0B; +var + glGenFencesAPPLE: procedure(n: GLsizei; fences: PGLuint); stdcall = nil; + glDeleteFencesAPPLE: procedure(n: GLsizei; const fences: PGLuint); stdcall = nil; + glSetFenceAPPLE: procedure(fence: GLuint); stdcall = nil; + glIsFenceAPPLE: function(fence: GLuint): GLboolean; stdcall = nil; + glTestFenceAPPLE: function(fence: GLuint): GLboolean; stdcall = nil; + glFinishFenceAPPLE: procedure(fence: GLuint); stdcall = nil; + glTestObjectAPPLE: function(_object: GLenum; name: GLuint): GLboolean; stdcall = nil; + glFinishObjectAPPLE: procedure(_object: GLenum; name: GLint); stdcall = nil; + +function Load_GL_APPLE_fence: Boolean; + +//***** GL_APPLE_vertex_array_object *****// +const + GL_VERTEX_ARRAY_BINDING_APPLE = $85B5; +var + glBindVertexArrayAPPLE: procedure(_array: GLuint); stdcall = nil; + glDeleteVertexArraysAPPLE: procedure(n: GLsizei; const arrays: PGLuint); stdcall = nil; + glGenVertexArraysAPPLE: procedure(n: GLsizei; const arrays: PGLuint); stdcall = nil; + glIsVertexArrayAPPLE: function(_array: GLuint): GLboolean; stdcall = nil; + +function Load_GL_APPLE_vertex_array_object: Boolean; + +//***** GL_APPLE_vertex_array_range *****// +const + GL_VERTEX_ARRAY_RANGE_APPLE = $851D; + GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE = $851E; + GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE = $8520; + GL_VERTEX_ARRAY_RANGE_POINTER_APPLE = $8521; + GL_VERTEX_ARRAY_STORAGE_HINT_APPLE = $851F; + GL_STORAGE_CACHED_APPLE = $85BE; + GL_STORAGE_SHARED_APPLE = $85BF; +var + glVertexArrayRangeAPPLE: procedure(length: GLsizei; pointer: PGLvoid); stdcall = nil; + glFlushVertexArrayRangeAPPLE: procedure(length: GLsizei; pointer: PGLvoid); stdcall = nil; + glVertexArrayParameteriAPPLE: procedure(pname: GLenum; param: GLint); stdcall = nil; + +function Load_GL_APPLE_vertex_array_range: Boolean; + +//***** WGL_ARB_pixel_format *****// +const + WGL_NUMBER_PIXEL_FORMATS_ARB = $2000; + WGL_DRAW_TO_WINDOW_ARB = $2001; + WGL_DRAW_TO_BITMAP_ARB = $2002; + WGL_ACCELERATION_ARB = $2003; + WGL_NEED_PALETTE_ARB = $2004; + WGL_NEED_SYSTEM_PALETTE_ARB = $2005; + WGL_SWAP_LAYER_BUFFERS_ARB = $2006; + WGL_SWAP_METHOD_ARB = $2007; + WGL_NUMBER_OVERLAYS_ARB = $2008; + WGL_NUMBER_UNDERLAYS_ARB = $2009; + WGL_TRANSPARENT_ARB = $200A; + WGL_TRANSPARENT_RED_VALUE_ARB = $2037; + WGL_TRANSPARENT_GREEN_VALUE_ARB = $2038; + WGL_TRANSPARENT_BLUE_VALUE_ARB = $2039; + WGL_TRANSPARENT_ALPHA_VALUE_ARB = $203A; + WGL_TRANSPARENT_INDEX_VALUE_ARB = $203B; + WGL_SHARE_DEPTH_ARB = $200C; + WGL_SHARE_STENCIL_ARB = $200D; + WGL_SHARE_ACCUM_ARB = $200E; + WGL_SUPPORT_GDI_ARB = $200F; + WGL_SUPPORT_OPENGL_ARB = $2010; + WGL_DOUBLE_BUFFER_ARB = $2011; + WGL_STEREO_ARB = $2012; + WGL_PIXEL_TYPE_ARB = $2013; + WGL_COLOR_BITS_ARB = $2014; + WGL_RED_BITS_ARB = $2015; + WGL_RED_SHIFT_ARB = $2016; + WGL_GREEN_BITS_ARB = $2017; + WGL_GREEN_SHIFT_ARB = $2018; + WGL_BLUE_BITS_ARB = $2019; + WGL_BLUE_SHIFT_ARB = $201A; + WGL_ALPHA_BITS_ARB = $201B; + WGL_ALPHA_SHIFT_ARB = $201C; + WGL_ACCUM_BITS_ARB = $201D; + WGL_ACCUM_RED_BITS_ARB = $201E; + WGL_ACCUM_GREEN_BITS_ARB = $201F; + WGL_ACCUM_BLUE_BITS_ARB = $2020; + WGL_ACCUM_ALPHA_BITS_ARB = $2021; + WGL_DEPTH_BITS_ARB = $2022; + WGL_STENCIL_BITS_ARB = $2023; + WGL_AUX_BUFFERS_ARB = $2024; + WGL_NO_ACCELERATION_ARB = $2025; + WGL_GENERIC_ACCELERATION_ARB = $2026; + WGL_FULL_ACCELERATION_ARB = $2027; + WGL_SWAP_EXCHANGE_ARB = $2028; + WGL_SWAP_COPY_ARB = $2029; + WGL_SWAP_UNDEFINED_ARB = $202A; + WGL_TYPE_RGBA_ARB = $202B; + WGL_TYPE_COLORINDEX_ARB = $202C; +var + wglGetPixelFormatAttribivARB: function(hdc: HDC; iPixelFormat: GLint; iLayerPlane: GLint; nAttributes: GLuint; const piAttributes: PGLint; piValues: PGLint): BOOL; stdcall = nil; + wglGetPixelFormatAttribfvARB: function(hdc: HDC; iPixelFormat: GLint; iLayerPlane: GLint; nAttributes: GLuint; const piAttributes: PGLint; pfValues: PGLfloat): BOOL; stdcall = nil; + wglChoosePixelFormatARB: function(hdc: HDC; const piAttribIList: PGLint; const pfAttribFList: PGLfloat; nMaxFormats: GLuint; piFormats: PGLint; nNumFormats: PGLuint): BOOL; stdcall = nil; + +function Load_WGL_ARB_pixel_format: Boolean; + +//***** WGL_ARB_make_current_read *****// +const + WGL_ERROR_INVALID_PIXEL_TYPE_ARB = $2043; + WGL_ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB = $2054; +var + wglMakeContextCurrentARB: function(hDrawDC: HDC; hReadDC: HDC; hglrc: HGLRC): BOOL; stdcall = nil; + wglGetCurrentReadDCARB: function(): HDC; stdcall = nil; + +function Load_WGL_ARB_make_current_read: Boolean; + +//***** WGL_ARB_pbuffer *****// +const + WGL_DRAW_TO_PBUFFER_ARB = $202D; + // WGL_DRAW_TO_PBUFFER_ARB { already defined } + WGL_MAX_PBUFFER_PIXELS_ARB = $202E; + WGL_MAX_PBUFFER_WIDTH_ARB = $202F; + WGL_MAX_PBUFFER_HEIGHT_ARB = $2030; + WGL_PBUFFER_LARGEST_ARB = $2033; + WGL_PBUFFER_WIDTH_ARB = $2034; + WGL_PBUFFER_HEIGHT_ARB = $2035; + WGL_PBUFFER_LOST_ARB = $2036; +var + wglCreatePbufferARB: function(hDC: HDC; iPixelFormat: GLint; iWidth: GLint; iHeight: GLint; const piAttribList: PGLint): THandle; stdcall = nil; + wglGetPbufferDCARB: function(hPbuffer: THandle): HDC; stdcall = nil; + wglReleasePbufferDCARB: function(hPbuffer: THandle; hDC: HDC): GLint; stdcall = nil; + wglDestroyPbufferARB: function(hPbuffer: THandle): BOOL; stdcall = nil; + wglQueryPbufferARB: function(hPbuffer: THandle; iAttribute: GLint; piValue: PGLint): BOOL; stdcall = nil; + +function Load_WGL_ARB_pbuffer: Boolean; + +//***** WGL_EXT_swap_control *****// +var + wglSwapIntervalEXT: function(interval: GLint): BOOL; stdcall = nil; + wglGetSwapIntervalEXT: function(): GLint; stdcall = nil; + +function Load_WGL_EXT_swap_control: Boolean; + +//***** WGL_ARB_render_texture *****// +const + WGL_BIND_TO_TEXTURE_RGB_ARB = $2070; + WGL_BIND_TO_TEXTURE_RGBA_ARB = $2071; + WGL_TEXTURE_FORMAT_ARB = $2072; + WGL_TEXTURE_TARGET_ARB = $2073; + WGL_MIPMAP_TEXTURE_ARB = $2074; + WGL_TEXTURE_RGB_ARB = $2075; + WGL_TEXTURE_RGBA_ARB = $2076; + WGL_NO_TEXTURE_ARB = $2077; + WGL_TEXTURE_CUBE_MAP_ARB = $2078; + WGL_TEXTURE_1D_ARB = $2079; + WGL_TEXTURE_2D_ARB = $207A; + // WGL_NO_TEXTURE_ARB { already defined } + WGL_MIPMAP_LEVEL_ARB = $207B; + WGL_CUBE_MAP_FACE_ARB = $207C; + WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = $207D; + WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = $207E; + WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = $207F; + WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = $2080; + WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = $2081; + WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = $2082; + WGL_FRONT_LEFT_ARB = $2083; + WGL_FRONT_RIGHT_ARB = $2084; + WGL_BACK_LEFT_ARB = $2085; + WGL_BACK_RIGHT_ARB = $2086; + WGL_AUX0_ARB = $2087; + WGL_AUX1_ARB = $2088; + WGL_AUX2_ARB = $2089; + WGL_AUX3_ARB = $208A; + WGL_AUX4_ARB = $208B; + WGL_AUX5_ARB = $208C; + WGL_AUX6_ARB = $208D; + WGL_AUX7_ARB = $208E; + WGL_AUX8_ARB = $208F; + WGL_AUX9_ARB = $2090; +var + wglBindTexImageARB: function(hPbuffer: THandle; iBuffer: GLint): BOOL; stdcall = nil; + wglReleaseTexImageARB: function(hPbuffer: THandle; iBuffer: GLint): BOOL; stdcall = nil; + wglSetPbufferAttribARB: function(hPbuffer: THandle; const piAttribList: PGLint): BOOL; stdcall = nil; + +function Load_WGL_ARB_render_texture: Boolean; + +//***** WGL_EXT_extensions_string *****// +var + wglGetExtensionsStringEXT: function(): Pchar; stdcall = nil; + +function Load_WGL_EXT_extensions_string: Boolean; + +//***** WGL_EXT_make_current_read *****// +var + wglMakeContextCurrentEXT: function(hDrawDC: HDC; hReadDC: HDC; hglrc: HGLRC): BOOL; stdcall = nil; + wglGetCurrentReadDCEXT: function(): HDC; stdcall = nil; + +function Load_WGL_EXT_make_current_read: Boolean; + +//***** WGL_EXT_pbuffer *****// +const + WGL_DRAW_TO_PBUFFER_EXT = $202D; + WGL_MAX_PBUFFER_PIXELS_EXT = $202E; + WGL_MAX_PBUFFER_WIDTH_EXT = $202F; + WGL_MAX_PBUFFER_HEIGHT_EXT = $2030; + WGL_OPTIMAL_PBUFFER_WIDTH_EXT = $2031; + WGL_OPTIMAL_PBUFFER_HEIGHT_EXT = $2032; + WGL_PBUFFER_LARGEST_EXT = $2033; + WGL_PBUFFER_WIDTH_EXT = $2034; + WGL_PBUFFER_HEIGHT_EXT = $2035; +var + wglCreatePbufferEXT: function(hDC: HDC; iPixelFormat: GLint; iWidth: GLint; iHeight: GLint; const piAttribList: PGLint): THandle; stdcall = nil; + wglGetPbufferDCEXT: function(hPbuffer: THandle): HDC; stdcall = nil; + wglReleasePbufferDCEXT: function(hPbuffer: THandle; hDC: HDC): GLint; stdcall = nil; + wglDestroyPbufferEXT: function(hPbuffer: THandle): BOOL; stdcall = nil; + wglQueryPbufferEXT: function(hPbuffer: THandle; iAttribute: GLint; piValue: PGLint): BOOL; stdcall = nil; + +function Load_WGL_EXT_pbuffer: Boolean; + +//***** WGL_EXT_pixel_format *****// +const + WGL_NUMBER_PIXEL_FORMATS_EXT = $2000; + WGL_DRAW_TO_WINDOW_EXT = $2001; + WGL_DRAW_TO_BITMAP_EXT = $2002; + WGL_ACCELERATION_EXT = $2003; + WGL_NEED_PALETTE_EXT = $2004; + WGL_NEED_SYSTEM_PALETTE_EXT = $2005; + WGL_SWAP_LAYER_BUFFERS_EXT = $2006; + WGL_SWAP_METHOD_EXT = $2007; + WGL_NUMBER_OVERLAYS_EXT = $2008; + WGL_NUMBER_UNDERLAYS_EXT = $2009; + WGL_TRANSPARENT_EXT = $200A; + WGL_TRANSPARENT_VALUE_EXT = $200B; + WGL_SHARE_DEPTH_EXT = $200C; + WGL_SHARE_STENCIL_EXT = $200D; + WGL_SHARE_ACCUM_EXT = $200E; + WGL_SUPPORT_GDI_EXT = $200F; + WGL_SUPPORT_OPENGL_EXT = $2010; + WGL_DOUBLE_BUFFER_EXT = $2011; + WGL_STEREO_EXT = $2012; + WGL_PIXEL_TYPE_EXT = $2013; + WGL_COLOR_BITS_EXT = $2014; + WGL_RED_BITS_EXT = $2015; + WGL_RED_SHIFT_EXT = $2016; + WGL_GREEN_BITS_EXT = $2017; + WGL_GREEN_SHIFT_EXT = $2018; + WGL_BLUE_BITS_EXT = $2019; + WGL_BLUE_SHIFT_EXT = $201A; + WGL_ALPHA_BITS_EXT = $201B; + WGL_ALPHA_SHIFT_EXT = $201C; + WGL_ACCUM_BITS_EXT = $201D; + WGL_ACCUM_RED_BITS_EXT = $201E; + WGL_ACCUM_GREEN_BITS_EXT = $201F; + WGL_ACCUM_BLUE_BITS_EXT = $2020; + WGL_ACCUM_ALPHA_BITS_EXT = $2021; + WGL_DEPTH_BITS_EXT = $2022; + WGL_STENCIL_BITS_EXT = $2023; + WGL_AUX_BUFFERS_EXT = $2024; + WGL_NO_ACCELERATION_EXT = $2025; + WGL_GENERIC_ACCELERATION_EXT = $2026; + WGL_FULL_ACCELERATION_EXT = $2027; + WGL_SWAP_EXCHANGE_EXT = $2028; + WGL_SWAP_COPY_EXT = $2029; + WGL_SWAP_UNDEFINED_EXT = $202A; + WGL_TYPE_RGBA_EXT = $202B; + WGL_TYPE_COLORINDEX_EXT = $202C; +var + wglGetPixelFormatAttribivEXT: function(hdc: HDC; iPixelFormat: GLint; iLayerPlane: GLint; nAttributes: GLuint; piAttributes: PGLint; piValues: PGLint): BOOL; stdcall = nil; + wglGetPixelFormatAttribfvEXT: function(hdc: HDC; iPixelFormat: GLint; iLayerPlane: GLint; nAttributes: GLuint; piAttributes: PGLint; pfValues: PGLfloat): BOOL; stdcall = nil; + wglChoosePixelFormatEXT: function(hdc: HDC; const piAttribIList: PGLint; const pfAttribFList: PGLfloat; nMaxFormats: GLuint; piFormats: PGLint; nNumFormats: PGLuint): BOOL; stdcall = nil; + +function Load_WGL_EXT_pixel_format: Boolean; + +//***** WGL_I3D_digital_video_control *****// +const + WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D = $2050; + WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D = $2051; + WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D = $2052; + WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D = $2053; +var + wglGetDigitalVideoParametersI3D: function(hDC: HDC; iAttribute: GLint; piValue: PGLint): BOOL; stdcall = nil; + wglSetDigitalVideoParametersI3D: function(hDC: HDC; iAttribute: GLint; const piValue: PGLint): BOOL; stdcall = nil; + +function Load_WGL_I3D_digital_video_control: Boolean; + +//***** WGL_I3D_gamma *****// +const + WGL_GAMMA_TABLE_SIZE_I3D = $204E; + WGL_GAMMA_EXCLUDE_DESKTOP_I3D = $204F; + // WGL_GAMMA_EXCLUDE_DESKTOP_I3D { already defined } +var + wglGetGammaTableParametersI3D: function(hDC: HDC; iAttribute: GLint; piValue: PGLint): BOOL; stdcall = nil; + wglSetGammaTableParametersI3D: function(hDC: HDC; iAttribute: GLint; const piValue: PGLint): BOOL; stdcall = nil; + wglGetGammaTableI3D: function(hDC: HDC; iEntries: GLint; puRed: PGLUSHORT; puGreen: PGLUSHORT; puBlue: PGLUSHORT): BOOL; stdcall = nil; + wglSetGammaTableI3D: function(hDC: HDC; iEntries: GLint; const puRed: PGLUSHORT; const puGreen: PGLUSHORT; const puBlue: PGLUSHORT): BOOL; stdcall = nil; + +function Load_WGL_I3D_gamma: Boolean; + +//***** WGL_I3D_genlock *****// +const + WGL_GENLOCK_SOURCE_MULTIVIEW_I3D = $2044; + WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D = $2045; + WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D = $2046; + WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D = $2047; + WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D = $2048; + WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D = $2049; + WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D = $204A; + WGL_GENLOCK_SOURCE_EDGE_RISING_I3D = $204B; + WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D = $204C; +var + wglEnableGenlockI3D: function(hDC: HDC): BOOL; stdcall = nil; + wglDisableGenlockI3D: function(hDC: HDC): BOOL; stdcall = nil; + wglIsEnabledGenlockI3D: function(hDC: HDC; pFlag: PBOOL): BOOL; stdcall = nil; + wglGenlockSourceI3D: function(hDC: HDC; uSource: GLUINT): BOOL; stdcall = nil; + wglGetGenlockSourceI3D: function(hDC: HDC; uSource: PGLUINT): BOOL; stdcall = nil; + wglGenlockSourceEdgeI3D: function(hDC: HDC; uEdge: GLUINT): BOOL; stdcall = nil; + wglGetGenlockSourceEdgeI3D: function(hDC: HDC; uEdge: PGLUINT): BOOL; stdcall = nil; + wglGenlockSampleRateI3D: function(hDC: HDC; uRate: GLUINT): BOOL; stdcall = nil; + wglGetGenlockSampleRateI3D: function(hDC: HDC; uRate: PGLUINT): BOOL; stdcall = nil; + wglGenlockSourceDelayI3D: function(hDC: HDC; uDelay: GLUINT): BOOL; stdcall = nil; + wglGetGenlockSourceDelayI3D: function(hDC: HDC; uDelay: PGLUINT): BOOL; stdcall = nil; + wglQueryGenlockMaxSourceDelayI3D: function(hDC: HDC; uMaxLineDelay: PGLUINT; uMaxPixelDelay: PGLUINT): BOOL; stdcall = nil; + +function Load_WGL_I3D_genlock: Boolean; + +//***** GL_ARB_matrix_palette *****// +const + GL_MATRIX_PALETTE_ARB = $8840; + GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = $8841; + GL_MAX_PALETTE_MATRICES_ARB = $8842; + GL_CURRENT_PALETTE_MATRIX_ARB = $8843; + GL_MATRIX_INDEX_ARRAY_ARB = $8844; + GL_CURRENT_MATRIX_INDEX_ARB = $8845; + GL_MATRIX_INDEX_ARRAY_SIZE_ARB = $8846; + GL_MATRIX_INDEX_ARRAY_TYPE_ARB = $8847; + GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = $8848; + GL_MATRIX_INDEX_ARRAY_POINTER_ARB = $8849; +var + glCurrentPaletteMatrixARB: procedure(index: GLint); stdcall = nil; + glMatrixIndexubvARB: procedure(size: GLint; indices: PGLubyte); stdcall = nil; + glMatrixIndexusvARB: procedure(size: GLint; indices: PGLushort); stdcall = nil; + glMatrixIndexuivARB: procedure(size: GLint; indices: PGLuint); stdcall = nil; + glMatrixIndexPointerARB: procedure(size: GLint; _type: GLenum; stride: GLsizei; pointer: PGLvoid); stdcall = nil; + +function Load_GL_ARB_matrix_palette: Boolean; + +//***** GL_NV_element_array *****// +const + GL_ELEMENT_ARRAY_TYPE_NV = $8769; + GL_ELEMENT_ARRAY_POINTER_NV = $876A; +var + glElementPointerNV: procedure(_type: GLenum; const pointer: PGLvoid); stdcall = nil; + glDrawElementArrayNV: procedure(mode: GLenum; first: GLint; count: GLsizei); stdcall = nil; + glDrawRangeElementArrayNV: procedure(mode: GLenum; start: GLuint; _end: GLuint; first: GLint; count: GLsizei); stdcall = nil; + glMultiDrawElementArrayNV: procedure(mode: GLenum; const first: PGLint; const count: PGLsizei; primcount: GLsizei); stdcall = nil; + glMultiDrawRangeElementArrayNV: procedure(mode: GLenum; start: GLuint; _end: GLuint; const first: PGLint; const count: PGLsizei; primcount: GLsizei); stdcall = nil; + +function Load_GL_NV_element_array: Boolean; + +//***** GL_NV_float_buffer *****// +const + GL_FLOAT_R_NV = $8880; + GL_FLOAT_RG_NV = $8881; + GL_FLOAT_RGB_NV = $8882; + GL_FLOAT_RGBA_NV = $8883; + GL_FLOAT_R16_NV = $8884; + GL_FLOAT_R32_NV = $8885; + GL_FLOAT_RG16_NV = $8886; + GL_FLOAT_RG32_NV = $8887; + GL_FLOAT_RGB16_NV = $8888; + GL_FLOAT_RGB32_NV = $8889; + GL_FLOAT_RGBA16_NV = $888A; + GL_FLOAT_RGBA32_NV = $888B; + GL_TEXTURE_FLOAT_COMPONENTS_NV = $888C; + GL_FLOAT_CLEAR_COLOR_VALUE_NV = $888D; + GL_FLOAT_RGBA_MODE_NV = $888E; + WGL_FLOAT_COMPONENTS_NV = $20B0; + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV = $20B1; + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV = $20B2; + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV = $20B3; + WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV = $20B4; + WGL_TEXTURE_FLOAT_R_NV = $20B5; + WGL_TEXTURE_FLOAT_RG_NV = $20B6; + WGL_TEXTURE_FLOAT_RGB_NV = $20B7; + WGL_TEXTURE_FLOAT_RGBA_NV = $20B8; + +function Load_GL_NV_float_buffer: Boolean; + +//***** GL_NV_fragment_program *****// +const + GL_FRAGMENT_PROGRAM_NV = $8870; + GL_MAX_TEXTURE_COORDS_NV = $8871; + GL_MAX_TEXTURE_IMAGE_UNITS_NV = $8872; + GL_FRAGMENT_PROGRAM_BINDING_NV = $8873; + GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = $8868; + GL_PROGRAM_ERROR_STRING_NV = $8874; +var + glProgramNamedParameter4fNV: procedure(id: GLuint; len: GLsizei; const name: PGLubyte; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); stdcall = nil; + glProgramNamedParameter4dNV: procedure(id: GLuint; len: GLsizei; const name: PGLubyte; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); stdcall = nil; + glGetProgramNamedParameterfvNV: procedure(id: GLuint; len: GLsizei; const name: PGLubyte; params: PGLfloat); stdcall = nil; + glGetProgramNamedParameterdvNV: procedure(id: GLuint; len: GLsizei; const name: PGLubyte; params: PGLdouble); stdcall = nil; + // glProgramLocalParameter4dARB { already defined } + // glProgramLocalParameter4dvARB { already defined } + // glProgramLocalParameter4fARB { already defined } + // glProgramLocalParameter4fvARB { already defined } + // glGetProgramLocalParameterdvARB { already defined } + // glGetProgramLocalParameterfvARB { already defined } + +function Load_GL_NV_fragment_program: Boolean; + +//***** GL_NV_primitive_restart *****// +const + GL_PRIMITIVE_RESTART_NV = $8558; + GL_PRIMITIVE_RESTART_INDEX_NV = $8559; +var + glPrimitiveRestartNV: procedure(); stdcall = nil; + glPrimitiveRestartIndexNV: procedure(index: GLuint); stdcall = nil; + +function Load_GL_NV_primitive_restart: Boolean; + +//***** GL_NV_vertex_program2 *****// + +function Load_GL_NV_vertex_program2: Boolean; + +//***** WGL_NV_render_texture_rectangle *****// +const + WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV = $20A0; + WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV = $20A1; + WGL_TEXTURE_RECTANGLE_NV = $20A2; + +function Load_WGL_NV_render_texture_rectangle: Boolean; + +//***** GL_NV_pixel_data_range *****// +const + GL_WRITE_PIXEL_DATA_RANGE_NV = $8878; + GL_READ_PIXEL_DATA_RANGE_NV = $8879; + GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV = $887A; + GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = $887B; + GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = $887C; + GL_READ_PIXEL_DATA_RANGE_POINTER_NV = $887D; +var + glPixelDataRangeNV: procedure(target: GLenum; length: GLsizei; pointer: PGLvoid); stdcall = nil; + glFlushPixelDataRangeNV: procedure(target: GLenum); stdcall = nil; + // wglAllocateMemoryNV { already defined } + // wglFreeMemoryNV { already defined } + +function Load_GL_NV_pixel_data_range: Boolean; + +//***** GL_EXT_texture_rectangle *****// +const + GL_TEXTURE_RECTANGLE_EXT = $84F5; + GL_TEXTURE_BINDING_RECTANGLE_EXT = $84F6; + GL_PROXY_TEXTURE_RECTANGLE_EXT = $84F7; + GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT = $84F8; + +function Load_GL_EXT_texture_rectangle: Boolean; + +//***** GL_S3_s3tc *****// +const + GL_RGB_S3TC = $83A0; + GL_RGB4_S3TC = $83A1; + GL_RGBA_S3TC = $83A2; + GL_RGBA4_S3TC = $83A3; + +function Load_GL_S3_s3tc: Boolean; + +//***** GL_ATI_draw_buffers *****// +const + GL_MAX_DRAW_BUFFERS_ATI = $8824; + GL_DRAW_BUFFER0_ATI = $8825; + GL_DRAW_BUFFER1_ATI = $8826; + GL_DRAW_BUFFER2_ATI = $8827; + GL_DRAW_BUFFER3_ATI = $8828; + GL_DRAW_BUFFER4_ATI = $8829; + GL_DRAW_BUFFER5_ATI = $882A; + GL_DRAW_BUFFER6_ATI = $882B; + GL_DRAW_BUFFER7_ATI = $882C; + GL_DRAW_BUFFER8_ATI = $882D; + GL_DRAW_BUFFER9_ATI = $882E; + GL_DRAW_BUFFER10_ATI = $882F; + GL_DRAW_BUFFER11_ATI = $8830; + GL_DRAW_BUFFER12_ATI = $8831; + GL_DRAW_BUFFER13_ATI = $8832; + GL_DRAW_BUFFER14_ATI = $8833; + GL_DRAW_BUFFER15_ATI = $8834; +var + glDrawBuffersATI: procedure(n: GLsizei; const bufs: PGLenum); stdcall = nil; + +function Load_GL_ATI_draw_buffers: Boolean; + +//***** WGL_ATI_pixel_format_float *****// +const + WGL_RGBA_FLOAT_MODE_ATI = $8820; + WGL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI = $8835; + WGL_TYPE_RGBA_FLOAT_ATI = $21A0; + +function Load_WGL_ATI_pixel_format_float: Boolean; + +//***** GL_ATI_texture_env_combine3 *****// +const + GL_MODULATE_ADD_ATI = $8744; + GL_MODULATE_SIGNED_ADD_ATI = $8745; + GL_MODULATE_SUBTRACT_ATI = $8746; + +function Load_GL_ATI_texture_env_combine3: Boolean; + +//***** GL_ATI_texture_float *****// +const + GL_RGBA_FLOAT32_ATI = $8814; + GL_RGB_FLOAT32_ATI = $8815; + GL_ALPHA_FLOAT32_ATI = $8816; + GL_INTENSITY_FLOAT32_ATI = $8817; + GL_LUMINANCE_FLOAT32_ATI = $8818; + GL_LUMINANCE_ALPHA_FLOAT32_ATI = $8819; + GL_RGBA_FLOAT16_ATI = $881A; + GL_RGB_FLOAT16_ATI = $881B; + GL_ALPHA_FLOAT16_ATI = $881C; + GL_INTENSITY_FLOAT16_ATI = $881D; + GL_LUMINANCE_FLOAT16_ATI = $881E; + GL_LUMINANCE_ALPHA_FLOAT16_ATI = $881F; + +function Load_GL_ATI_texture_float: Boolean; + +//***** GL_NV_texture_expand_normal *****// +const + GL_TEXTURE_UNSIGNED_REMAP_MODE_NV = $888F; + +function Load_GL_NV_texture_expand_normal: Boolean; + +//***** GL_NV_half_float *****// +const + GL_HALF_FLOAT_NV = $140B; +var + glVertex2hNV: procedure(x: GLushort; y: GLushort); stdcall = nil; + glVertex2hvNV: procedure(const v: PGLushort); stdcall = nil; + glVertex3hNV: procedure(x: GLushort; y: GLushort; z: GLushort); stdcall = nil; + glVertex3hvNV: procedure(const v: PGLushort); stdcall = nil; + glVertex4hNV: procedure(x: GLushort; y: GLushort; z: GLushort; w: GLushort); stdcall = nil; + glVertex4hvNV: procedure(const v: PGLushort); stdcall = nil; + glNormal3hNV: procedure(nx: GLushort; ny: GLushort; nz: GLushort); stdcall = nil; + glNormal3hvNV: procedure(const v: PGLushort); stdcall = nil; + glColor3hNV: procedure(red: GLushort; green: GLushort; blue: GLushort); stdcall = nil; + glColor3hvNV: procedure(const v: PGLushort); stdcall = nil; + glColor4hNV: procedure(red: GLushort; green: GLushort; blue: GLushort; alpha: GLushort); stdcall = nil; + glColor4hvNV: procedure(const v: PGLushort); stdcall = nil; + glTexCoord1hNV: procedure(s: GLushort); stdcall = nil; + glTexCoord1hvNV: procedure(const v: PGLushort); stdcall = nil; + glTexCoord2hNV: procedure(s: GLushort; t: GLushort); stdcall = nil; + glTexCoord2hvNV: procedure(const v: PGLushort); stdcall = nil; + glTexCoord3hNV: procedure(s: GLushort; t: GLushort; r: GLushort); stdcall = nil; + glTexCoord3hvNV: procedure(const v: PGLushort); stdcall = nil; + glTexCoord4hNV: procedure(s: GLushort; t: GLushort; r: GLushort; q: GLushort); stdcall = nil; + glTexCoord4hvNV: procedure(const v: PGLushort); stdcall = nil; + glMultiTexCoord1hNV: procedure(target: GLenum; s: GLushort); stdcall = nil; + glMultiTexCoord1hvNV: procedure(target: GLenum; const v: PGLushort); stdcall = nil; + glMultiTexCoord2hNV: procedure(target: GLenum; s: GLushort; t: GLushort); stdcall = nil; + glMultiTexCoord2hvNV: procedure(target: GLenum; const v: PGLushort); stdcall = nil; + glMultiTexCoord3hNV: procedure(target: GLenum; s: GLushort; t: GLushort; r: GLushort); stdcall = nil; + glMultiTexCoord3hvNV: procedure(target: GLenum; const v: PGLushort); stdcall = nil; + glMultiTexCoord4hNV: procedure(target: GLenum; s: GLushort; t: GLushort; r: GLushort; q: GLushort); stdcall = nil; + glMultiTexCoord4hvNV: procedure(target: GLenum; const v: PGLushort); stdcall = nil; + glFogCoordhNV: procedure(fog: GLushort); stdcall = nil; + glFogCoordhvNV: procedure(const fog: PGLushort); stdcall = nil; + glSecondaryColor3hNV: procedure(red: GLushort; green: GLushort; blue: GLushort); stdcall = nil; + glSecondaryColor3hvNV: procedure(const v: PGLushort); stdcall = nil; + glVertexWeighthNV: procedure(weight: GLushort); stdcall = nil; + glVertexWeighthvNV: procedure(const weight: PGLushort); stdcall = nil; + glVertexAttrib1hNV: procedure(index: GLuint; x: GLushort); stdcall = nil; + glVertexAttrib1hvNV: procedure(index: GLuint; const v: PGLushort); stdcall = nil; + glVertexAttrib2hNV: procedure(index: GLuint; x: GLushort; y: GLushort); stdcall = nil; + glVertexAttrib2hvNV: procedure(index: GLuint; const v: PGLushort); stdcall = nil; + glVertexAttrib3hNV: procedure(index: GLuint; x: GLushort; y: GLushort; z: GLushort); stdcall = nil; + glVertexAttrib3hvNV: procedure(index: GLuint; const v: PGLushort); stdcall = nil; + glVertexAttrib4hNV: procedure(index: GLuint; x: GLushort; y: GLushort; z: GLushort; w: GLushort); stdcall = nil; + glVertexAttrib4hvNV: procedure(index: GLuint; const v: PGLushort); stdcall = nil; + glVertexAttribs1hvNV: procedure(index: GLuint; n: GLsizei; const v: PGLushort); stdcall = nil; + glVertexAttribs2hvNV: procedure(index: GLuint; n: GLsizei; const v: PGLushort); stdcall = nil; + glVertexAttribs3hvNV: procedure(index: GLuint; n: GLsizei; const v: PGLushort); stdcall = nil; + glVertexAttribs4hvNV: procedure(index: GLuint; n: GLsizei; const v: PGLushort); stdcall = nil; + +function Load_GL_NV_half_float: Boolean; + +//***** GL_ATI_map_object_buffer *****// +var + glMapObjectBufferATI: function(buffer: GLuint): PGLvoid; stdcall = nil; + glUnmapObjectBufferATI: procedure(buffer: GLuint); stdcall = nil; + +function Load_GL_ATI_map_object_buffer: Boolean; + +//***** GL_ATI_separate_stencil *****// +const + GL_KEEP = $1E00; + GL_ZERO = $0000; + GL_REPLACE = $1E01; + GL_INCR = $1E02; + GL_DECR = $1E03; + GL_INVERT = $150A; + GL_NEVER = $0200; + GL_LESS = $0201; + GL_LEQUAL = $0203; + GL_GREATER = $0204; + GL_GEQUAL = $0206; + GL_EQUAL = $0202; + GL_NOTEQUAL = $0205; + GL_ALWAYS = $0207; + GL_FRONT = $0404; + GL_BACK = $0405; + GL_FRONT_AND_BACK = $0408; + GL_STENCIL_BACK_FUNC_ATI = $8800; + GL_STENCIL_BACK_FAIL_ATI = $8801; + GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = $8802; + GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI = $8803; +var + glStencilOpSeparateATI: procedure(face: GLenum; sfail: GLenum; dpfail: GLenum; dppass: GLenum); stdcall = nil; + glStencilFuncSeparateATI: procedure(frontfunc: GLenum; backfunc: GLenum; ref: GLint; mask: GLuint); stdcall = nil; + +function Load_GL_ATI_separate_stencil: Boolean; + +//***** GL_ATI_vertex_attrib_array_object *****// +var + glVertexAttribArrayObjectATI: procedure(index: GLuint; size: GLint; _type: GLenum; normalized: GLboolean; stride: GLsizei; buffer: GLuint; offset: GLuint); stdcall = nil; + glGetVertexAttribArrayObjectfvATI: procedure(index: GLuint; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetVertexAttribArrayObjectivATI: procedure(index: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + +function Load_GL_ATI_vertex_attrib_array_object: Boolean; + +//***** GL_ARB_vertex_buffer_object *****// +const + GL_ARRAY_BUFFER_ARB = $8892; + GL_ELEMENT_ARRAY_BUFFER_ARB = $8893; + GL_ARRAY_BUFFER_BINDING_ARB = $8894; + GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = $8895; + GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = $8896; + GL_NORMAL_ARRAY_BUFFER_BINDING_ARB = $8897; + GL_COLOR_ARRAY_BUFFER_BINDING_ARB = $8898; + GL_INDEX_ARRAY_BUFFER_BINDING_ARB = $8899; + GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = $889A; + GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = $889B; + GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = $889C; + GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = $889D; + GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = $889E; + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = $889F; + GL_STREAM_DRAW_ARB = $88E0; + GL_STREAM_READ_ARB = $88E1; + GL_STREAM_COPY_ARB = $88E2; + GL_STATIC_DRAW_ARB = $88E4; + GL_STATIC_READ_ARB = $88E5; + GL_STATIC_COPY_ARB = $88E6; + GL_DYNAMIC_DRAW_ARB = $88E8; + GL_DYNAMIC_READ_ARB = $88E9; + GL_DYNAMIC_COPY_ARB = $88EA; + GL_READ_ONLY_ARB = $88B8; + GL_WRITE_ONLY_ARB = $88B9; + GL_READ_WRITE_ARB = $88BA; + GL_BUFFER_SIZE_ARB = $8764; + GL_BUFFER_USAGE_ARB = $8765; + GL_BUFFER_ACCESS_ARB = $88BB; + GL_BUFFER_MAPPED_ARB = $88BC; + GL_BUFFER_MAP_POINTER_ARB = $88BD; +var + glBindBufferARB: procedure(target: GLenum; buffer: GLuint); stdcall = nil; + glDeleteBuffersARB: procedure(n: GLsizei; const buffers: PGLuint); stdcall = nil; + glGenBuffersARB: procedure(n: GLsizei; buffers: PGLuint); stdcall = nil; + glIsBufferARB: function(buffer: GLuint): GLboolean; stdcall = nil; + glBufferDataARB: procedure(target: GLenum; size: GLsizeiptrARB; const data: PGLvoid; usage: GLenum); stdcall = nil; + glBufferSubDataARB: procedure(target: GLenum; offset: GLintptrARB; size: GLsizeiptrARB; const data: PGLvoid); stdcall = nil; + glGetBufferSubDataARB: procedure(target: GLenum; offset: GLintptrARB; size: GLsizeiptrARB; data: PGLvoid); stdcall = nil; + glMapBufferARB: function(target: GLenum; access: GLenum): PGLvoid; stdcall = nil; + glUnmapBufferARB: function(target: GLenum): GLboolean; stdcall = nil; + glGetBufferParameterivARB: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetBufferPointervARB: procedure(target: GLenum; pname: GLenum; params: PGLvoid); stdcall = nil; + +function Load_GL_ARB_vertex_buffer_object: Boolean; + +//***** GL_ARB_occlusion_query *****// +const + GL_SAMPLES_PASSED_ARB = $8914; + GL_QUERY_COUNTER_BITS_ARB = $8864; + GL_CURRENT_QUERY_ARB = $8865; + GL_QUERY_RESULT_ARB = $8866; + GL_QUERY_RESULT_AVAILABLE_ARB = $8867; +var + glGenQueriesARB: procedure(n: GLsizei; ids: PGLuint); stdcall = nil; + glDeleteQueriesARB: procedure(n: GLsizei; const ids: PGLuint); stdcall = nil; + glIsQueryARB: function(id: GLuint): GLboolean; stdcall = nil; + glBeginQueryARB: procedure(target: GLenum; id: GLuint); stdcall = nil; + glEndQueryARB: procedure(target: GLenum); stdcall = nil; + glGetQueryivARB: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetQueryObjectivARB: procedure(id: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetQueryObjectuivARB: procedure(id: GLuint; pname: GLenum; params: PGLuint); stdcall = nil; + +function Load_GL_ARB_occlusion_query: Boolean; + +//***** GL_ARB_shader_objects *****// +const + GL_PROGRAM_OBJECT_ARB = $8B40; + GL_OBJECT_TYPE_ARB = $8B4E; + GL_OBJECT_SUBTYPE_ARB = $8B4F; + GL_OBJECT_DELETE_STATUS_ARB = $8B80; + GL_OBJECT_COMPILE_STATUS_ARB = $8B81; + GL_OBJECT_LINK_STATUS_ARB = $8B82; + GL_OBJECT_VALIDATE_STATUS_ARB = $8B83; + GL_OBJECT_INFO_LOG_LENGTH_ARB = $8B84; + GL_OBJECT_ATTACHED_OBJECTS_ARB = $8B85; + GL_OBJECT_ACTIVE_UNIFORMS_ARB = $8B86; + GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = $8B87; + GL_OBJECT_SHADER_SOURCE_LENGTH_ARB = $8B88; + GL_SHADER_OBJECT_ARB = $8B48; + GL_FLOAT = $1406; + GL_FLOAT_VEC2_ARB = $8B50; + GL_FLOAT_VEC3_ARB = $8B51; + GL_FLOAT_VEC4_ARB = $8B52; + GL_INT = $1404; + GL_INT_VEC2_ARB = $8B53; + GL_INT_VEC3_ARB = $8B54; + GL_INT_VEC4_ARB = $8B55; + GL_BOOL_ARB = $8B56; + GL_BOOL_VEC2_ARB = $8B57; + GL_BOOL_VEC3_ARB = $8B58; + GL_BOOL_VEC4_ARB = $8B59; + GL_FLOAT_MAT2_ARB = $8B5A; + GL_FLOAT_MAT3_ARB = $8B5B; + GL_FLOAT_MAT4_ARB = $8B5C; +var + glDeleteObjectARB: procedure(obj: GLhandleARB); stdcall = nil; + glGetHandleARB: function(pname: GLenum): GLhandleARB; stdcall = nil; + glDetachObjectARB: procedure(containerObj: GLhandleARB; attachedObj: GLhandleARB); stdcall = nil; + glCreateShaderObjectARB: function(shaderType: GLenum): GLhandleARB; stdcall = nil; + glShaderSourceARB: procedure(shaderObj: GLhandleARB; count: GLsizei; const _string: PGLvoid; const length: PGLint); stdcall = nil; + glCompileShaderARB: procedure(shaderObj: GLhandleARB); stdcall = nil; + glCreateProgramObjectARB: function(): GLhandleARB; stdcall = nil; + glAttachObjectARB: procedure(containerObj: GLhandleARB; obj: GLhandleARB); stdcall = nil; + glLinkProgramARB: procedure(programObj: GLhandleARB); stdcall = nil; + glUseProgramObjectARB: procedure(programObj: GLhandleARB); stdcall = nil; + glValidateProgramARB: procedure(programObj: GLhandleARB); stdcall = nil; + glUniform1fARB: procedure(location: GLint; v0: GLfloat); stdcall = nil; + glUniform2fARB: procedure(location: GLint; v0: GLfloat; v1: GLfloat); stdcall = nil; + glUniform3fARB: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat); stdcall = nil; + glUniform4fARB: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat; v3: GLfloat); stdcall = nil; + glUniform1iARB: procedure(location: GLint; v0: GLint); stdcall = nil; + glUniform2iARB: procedure(location: GLint; v0: GLint; v1: GLint); stdcall = nil; + glUniform3iARB: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint); stdcall = nil; + glUniform4iARB: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint; v3: GLint); stdcall = nil; + glUniform1fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); stdcall = nil; + glUniform2fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); stdcall = nil; + glUniform3fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); stdcall = nil; + glUniform4fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); stdcall = nil; + glUniform1ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); stdcall = nil; + glUniform2ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); stdcall = nil; + glUniform3ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); stdcall = nil; + glUniform4ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); stdcall = nil; + glUniformMatrix2fvARB: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); stdcall = nil; + glUniformMatrix3fvARB: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); stdcall = nil; + glUniformMatrix4fvARB: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); stdcall = nil; + glGetObjectParameterfvARB: procedure(obj: GLhandleARB; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetObjectParameterivARB: procedure(obj: GLhandleARB; pname: GLenum; params: PGLint); stdcall = nil; + glGetInfoLogARB: procedure(obj: GLhandleARB; maxLength: GLsizei; length: PGLsizei; infoLog: PGLcharARB); stdcall = nil; + glGetAttachedObjectsARB: procedure(containerObj: GLhandleARB; maxCount: GLsizei; count: PGLsizei; obj: PGLhandleARB); stdcall = nil; + glGetUniformLocationARB: function(programObj: GLhandleARB; const name: PGLcharARB): GLint; stdcall = nil; + glGetActiveUniformARB: procedure(programObj: GLhandleARB; index: GLuint; maxLength: GLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLcharARB); stdcall = nil; + glGetUniformfvARB: procedure(programObj: GLhandleARB; location: GLint; params: PGLfloat); stdcall = nil; + glGetUniformivARB: procedure(programObj: GLhandleARB; location: GLint; params: PGLint); stdcall = nil; + glGetShaderSourceARB: procedure(obj: GLhandleARB; maxLength: GLsizei; length: PGLsizei; source: PGLcharARB); stdcall = nil; + +function Load_GL_ARB_shader_objects: Boolean; + +//***** GL_ARB_vertex_shader *****// +const + GL_VERTEX_SHADER_ARB = $8B31; + GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = $8B4A; + GL_MAX_VARYING_FLOATS_ARB = $8B4B; + // GL_MAX_VERTEX_ATTRIBS_ARB { already defined } + // GL_MAX_TEXTURE_IMAGE_UNITS_ARB { already defined } + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = $8B4C; + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = $8B4D; + // GL_MAX_TEXTURE_COORDS_ARB { already defined } + // GL_VERTEX_PROGRAM_POINT_SIZE_ARB { already defined } + // GL_VERTEX_PROGRAM_TWO_SIDE_ARB { already defined } + // GL_OBJECT_TYPE_ARB { already defined } + // GL_OBJECT_SUBTYPE_ARB { already defined } + GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = $8B89; + GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = $8B8A; + // GL_SHADER_OBJECT_ARB { already defined } + // GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB { already defined } + // GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB { already defined } + // GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB { already defined } + // GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB { already defined } + // GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB { already defined } + // GL_CURRENT_VERTEX_ATTRIB_ARB { already defined } + // GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB { already defined } + // GL_FLOAT { already defined } + // GL_FLOAT_VEC2_ARB { already defined } + // GL_FLOAT_VEC3_ARB { already defined } + // GL_FLOAT_VEC4_ARB { already defined } + // GL_FLOAT_MAT2_ARB { already defined } + // GL_FLOAT_MAT3_ARB { already defined } + // GL_FLOAT_MAT4_ARB { already defined } + // glVertexAttrib1fARB { already defined } + // glVertexAttrib1sARB { already defined } + // glVertexAttrib1dARB { already defined } + // glVertexAttrib2fARB { already defined } + // glVertexAttrib2sARB { already defined } + // glVertexAttrib2dARB { already defined } + // glVertexAttrib3fARB { already defined } + // glVertexAttrib3sARB { already defined } + // glVertexAttrib3dARB { already defined } + // glVertexAttrib4fARB { already defined } + // glVertexAttrib4sARB { already defined } + // glVertexAttrib4dARB { already defined } + // glVertexAttrib4NubARB { already defined } + // glVertexAttrib1fvARB { already defined } + // glVertexAttrib1svARB { already defined } + // glVertexAttrib1dvARB { already defined } + // glVertexAttrib2fvARB { already defined } + // glVertexAttrib2svARB { already defined } + // glVertexAttrib2dvARB { already defined } + // glVertexAttrib3fvARB { already defined } + // glVertexAttrib3svARB { already defined } + // glVertexAttrib3dvARB { already defined } + // glVertexAttrib4fvARB { already defined } + // glVertexAttrib4svARB { already defined } + // glVertexAttrib4dvARB { already defined } + // glVertexAttrib4ivARB { already defined } + // glVertexAttrib4bvARB { already defined } + // glVertexAttrib4ubvARB { already defined } + // glVertexAttrib4usvARB { already defined } + // glVertexAttrib4uivARB { already defined } + // glVertexAttrib4NbvARB { already defined } + // glVertexAttrib4NsvARB { already defined } + // glVertexAttrib4NivARB { already defined } + // glVertexAttrib4NubvARB { already defined } + // glVertexAttrib4NusvARB { already defined } + // glVertexAttrib4NuivARB { already defined } + // glVertexAttribPointerARB { already defined } + // glEnableVertexAttribArrayARB { already defined } + // glDisableVertexAttribArrayARB { already defined } +var + glBindAttribLocationARB: procedure(programObj: GLhandleARB; index: GLuint; const name: PGLcharARB); stdcall = nil; + glGetActiveAttribARB: procedure(programObj: GLhandleARB; index: GLuint; maxLength: GLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLcharARB); stdcall = nil; + glGetAttribLocationARB: function(programObj: GLhandleARB; const name: PGLcharARB): GLint; stdcall = nil; + // glGetVertexAttribdvARB { already defined } + // glGetVertexAttribfvARB { already defined } + // glGetVertexAttribivARB { already defined } + // glGetVertexAttribPointervARB { already defined } + +function Load_GL_ARB_vertex_shader: Boolean; + +//***** GL_ARB_fragment_shader *****// +const + GL_FRAGMENT_SHADER_ARB = $8B30; + GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = $8B49; + // GL_MAX_TEXTURE_COORDS_ARB { already defined } + // GL_MAX_TEXTURE_IMAGE_UNITS_ARB { already defined } + // GL_OBJECT_TYPE_ARB { already defined } + // GL_OBJECT_SUBTYPE_ARB { already defined } + // GL_SHADER_OBJECT_ARB { already defined } + +function Load_GL_ARB_fragment_shader: Boolean; + +//***** GL_ARB_shading_language_100 *****// +const + GL_SHADING_LANGUAGE_VERSION_ARB = $8B8C; + +function Load_GL_ARB_shading_language_100: Boolean; + +//***** GL_ARB_texture_non_power_of_two *****// + +function Load_GL_ARB_texture_non_power_of_two: Boolean; + +//***** GL_ARB_point_sprite *****// +const + GL_POINT_SPRITE_ARB = $8861; + GL_COORD_REPLACE_ARB = $8862; + +function Load_GL_ARB_point_sprite: Boolean; + +//***** GL_EXT_depth_bounds_test *****// +const + GL_DEPTH_BOUNDS_TEST_EXT = $8890; + GL_DEPTH_BOUNDS_EXT = $8891; +var + glDepthBoundsEXT: procedure(zmin: GLclampd; zmax: GLclampd); stdcall = nil; + +function Load_GL_EXT_depth_bounds_test: Boolean; + +//***** GL_EXT_secondary_color *****// +const + GL_COLOR_SUM_EXT = $8458; + GL_CURRENT_SECONDARY_COLOR_EXT = $8459; + GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = $845A; + GL_SECONDARY_COLOR_ARRAY_TYPE_EXT = $845B; + GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT = $845C; + GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = $845D; + GL_SECONDARY_COLOR_ARRAY_EXT = $845E; +var + glSecondaryColor3bEXT: procedure(r: GLbyte; g: GLbyte; b: GLbyte); stdcall = nil; + glSecondaryColor3sEXT: procedure(r: GLshort; g: GLshort; b: GLshort); stdcall = nil; + glSecondaryColor3iEXT: procedure(r: GLint; g: GLint; b: GLint); stdcall = nil; + glSecondaryColor3fEXT: procedure(r: GLfloat; g: GLfloat; b: GLfloat); stdcall = nil; + glSecondaryColor3dEXT: procedure(r: GLdouble; g: GLdouble; b: GLdouble); stdcall = nil; + glSecondaryColor3ubEXT: procedure(r: GLubyte; g: GLubyte; b: GLubyte); stdcall = nil; + glSecondaryColor3usEXT: procedure(r: GLushort; g: GLushort; b: GLushort); stdcall = nil; + glSecondaryColor3uiEXT: procedure(r: GLuint; g: GLuint; b: GLuint); stdcall = nil; + glSecondaryColor3bvEXT: procedure(components: PGLbyte); stdcall = nil; + glSecondaryColor3svEXT: procedure(components: PGLshort); stdcall = nil; + glSecondaryColor3ivEXT: procedure(components: PGLint); stdcall = nil; + glSecondaryColor3fvEXT: procedure(components: PGLfloat); stdcall = nil; + glSecondaryColor3dvEXT: procedure(components: PGLdouble); stdcall = nil; + glSecondaryColor3ubvEXT: procedure(components: PGLubyte); stdcall = nil; + glSecondaryColor3usvEXT: procedure(components: PGLushort); stdcall = nil; + glSecondaryColor3uivEXT: procedure(components: PGLuint); stdcall = nil; + glSecondaryColorPointerEXT: procedure(size: GLint; _type: GLenum; stride: GLsizei; pointer: PGLvoid); stdcall = nil; + +function Load_GL_EXT_secondary_color: Boolean; + +//***** GL_EXT_texture_mirror_clamp *****// +const + GL_MIRROR_CLAMP_EXT = $8742; + GL_MIRROR_CLAMP_TO_EDGE_EXT = $8743; + GL_MIRROR_CLAMP_TO_BORDER_EXT = $8912; + +function Load_GL_EXT_texture_mirror_clamp: Boolean; + +//***** GL_EXT_blend_equation_separate *****// +const + GL_BLEND_EQUATION_RGB_EXT = $8009; + GL_BLEND_EQUATION_ALPHA_EXT = $883D; +var + glBlendEquationSeparateEXT: procedure(modeRGB: GLenum; modeAlpha: GLenum); stdcall = nil; + +function Load_GL_EXT_blend_equation_separate: Boolean; + +//***** GL_MESA_pack_invert *****// +const + GL_PACK_INVERT_MESA = $8758; + +function Load_GL_MESA_pack_invert: Boolean; + +//***** GL_MESA_ycbcr_texture *****// +const + GL_YCBCR_MESA = $8757; + GL_UNSIGNED_SHORT_8_8_MESA = $85BA; + GL_UNSIGNED_SHORT_8_8_REV_MESA = $85BB; + +function Load_GL_MESA_ycbcr_texture: Boolean; + +//***** GL_ARB_fragment_program_shadow *****// + +function Load_GL_ARB_fragment_program_shadow: Boolean; + +//***** GL_EXT_fog_coord *****// +const + GL_FOG_COORDINATE_SOURCE_EXT = $8450; + GL_FOG_COORDINATE_EXT = $8451; + GL_FRAGMENT_DEPTH_EXT = $8452; + GL_CURRENT_FOG_COORDINATE_EXT = $8453; + GL_FOG_COORDINATE_ARRAY_TYPE_EXT = $8454; + GL_FOG_COORDINATE_ARRAY_STRIDE_EXT = $8455; + GL_FOG_COORDINATE_ARRAY_POINTER_EXT = $8456; + GL_FOG_COORDINATE_ARRAY_EXT = $8457; +var + glFogCoordfEXT: procedure(coord: GLfloat); stdcall = nil; + glFogCoorddEXT: procedure(coord: GLdouble); stdcall = nil; + glFogCoordfvEXT: procedure(coord: PGLfloat); stdcall = nil; + glFogCoorddvEXT: procedure(coord: PGLdouble); stdcall = nil; + glFogCoordPointerEXT: procedure(_type: GLenum; stride: GLsizei; pointer: PGLvoid); stdcall = nil; + +function Load_GL_EXT_fog_coord: Boolean; + +//***** GL_NV_fragment_program_option *****// + +function Load_GL_NV_fragment_program_option: Boolean; + +//***** GL_EXT_pixel_buffer_object *****// +const + GL_PIXEL_PACK_BUFFER_EXT = $88EB; + GL_PIXEL_UNPACK_BUFFER_EXT = $88EC; + GL_PIXEL_PACK_BUFFER_BINDING_EXT = $88ED; + GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = $88EF; + +function Load_GL_EXT_pixel_buffer_object: Boolean; + +//***** GL_NV_fragment_program2 *****// +const + GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = $88F4; + GL_MAX_PROGRAM_CALL_DEPTH_NV = $88F5; + GL_MAX_PROGRAM_IF_DEPTH_NV = $88F6; + GL_MAX_PROGRAM_LOOP_DEPTH_NV = $88F7; + GL_MAX_PROGRAM_LOOP_COUNT_NV = $88F8; + +function Load_GL_NV_fragment_program2: Boolean; + +//***** GL_NV_vertex_program2_option *****// + // GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV { already defined } + // GL_MAX_PROGRAM_CALL_DEPTH_NV { already defined } + +function Load_GL_NV_vertex_program2_option: Boolean; + +//***** GL_NV_vertex_program3 *****// + // GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB { already defined } + +function Load_GL_NV_vertex_program3: Boolean; + +//***** GL_ARB_draw_buffers *****// +const + GL_MAX_DRAW_BUFFERS_ARB = $8824; + GL_DRAW_BUFFER0_ARB = $8825; + GL_DRAW_BUFFER1_ARB = $8826; + GL_DRAW_BUFFER2_ARB = $8827; + GL_DRAW_BUFFER3_ARB = $8828; + GL_DRAW_BUFFER4_ARB = $8829; + GL_DRAW_BUFFER5_ARB = $882A; + GL_DRAW_BUFFER6_ARB = $882B; + GL_DRAW_BUFFER7_ARB = $882C; + GL_DRAW_BUFFER8_ARB = $882D; + GL_DRAW_BUFFER9_ARB = $882E; + GL_DRAW_BUFFER10_ARB = $882F; + GL_DRAW_BUFFER11_ARB = $8830; + GL_DRAW_BUFFER12_ARB = $8831; + GL_DRAW_BUFFER13_ARB = $8832; + GL_DRAW_BUFFER14_ARB = $8833; + GL_DRAW_BUFFER15_ARB = $8834; +var + glDrawBuffersARB: procedure(n: GLsizei; const bufs: PGLenum); stdcall = nil; + +function Load_GL_ARB_draw_buffers: Boolean; + +//***** GL_ARB_texture_rectangle *****// +const + GL_TEXTURE_RECTANGLE_ARB = $84F5; + GL_TEXTURE_BINDING_RECTANGLE_ARB = $84F6; + GL_PROXY_TEXTURE_RECTANGLE_ARB = $84F7; + GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = $84F8; + +function Load_GL_ARB_texture_rectangle: Boolean; + +//***** GL_ARB_color_buffer_float *****// +const + GL_RGBA_FLOAT_MODE_ARB = $8820; + GL_CLAMP_VERTEX_COLOR_ARB = $891A; + GL_CLAMP_FRAGMENT_COLOR_ARB = $891B; + GL_CLAMP_READ_COLOR_ARB = $891C; + GL_FIXED_ONLY_ARB = $891D; + WGL_TYPE_RGBA_FLOAT_ARB = $21A0; +var + glClampColorARB: procedure(target: GLenum; clamp: GLenum); stdcall = nil; + +function Load_GL_ARB_color_buffer_float: Boolean; + +//***** GL_ARB_half_float_pixel *****// +const + GL_HALF_FLOAT_ARB = $140B; + +function Load_GL_ARB_half_float_pixel: Boolean; + +//***** GL_ARB_texture_float *****// +const + GL_TEXTURE_RED_TYPE_ARB = $8C10; + GL_TEXTURE_GREEN_TYPE_ARB = $8C11; + GL_TEXTURE_BLUE_TYPE_ARB = $8C12; + GL_TEXTURE_ALPHA_TYPE_ARB = $8C13; + GL_TEXTURE_LUMINANCE_TYPE_ARB = $8C14; + GL_TEXTURE_INTENSITY_TYPE_ARB = $8C15; + GL_TEXTURE_DEPTH_TYPE_ARB = $8C16; + GL_UNSIGNED_NORMALIZED_ARB = $8C17; + GL_RGBA32F_ARB = $8814; + GL_RGB32F_ARB = $8815; + GL_ALPHA32F_ARB = $8816; + GL_INTENSITY32F_ARB = $8817; + GL_LUMINANCE32F_ARB = $8818; + GL_LUMINANCE_ALPHA32F_ARB = $8819; + GL_RGBA16F_ARB = $881A; + GL_RGB16F_ARB = $881B; + GL_ALPHA16F_ARB = $881C; + GL_INTENSITY16F_ARB = $881D; + GL_LUMINANCE16F_ARB = $881E; + GL_LUMINANCE_ALPHA16F_ARB = $881F; + +function Load_GL_ARB_texture_float: Boolean; + +//***** GL_EXT_texture_compression_dxt1 *****// + // GL_COMPRESSED_RGB_S3TC_DXT1_EXT { already defined } + // GL_COMPRESSED_RGBA_S3TC_DXT1_EXT { already defined } + +function Load_GL_EXT_texture_compression_dxt1: Boolean; + +//***** GL_ARB_pixel_buffer_object *****// +const + GL_PIXEL_PACK_BUFFER_ARB = $88EB; + GL_PIXEL_UNPACK_BUFFER_ARB = $88EC; + GL_PIXEL_PACK_BUFFER_BINDING_ARB = $88ED; + GL_PIXEL_UNPACK_BUFFER_BINDING_ARB = $88EF; + +function Load_GL_ARB_pixel_buffer_object: Boolean; + +//***** GL_EXT_framebuffer_object *****// +const + GL_FRAMEBUFFER_EXT = $8D40; + GL_RENDERBUFFER_EXT = $8D41; + GL_STENCIL_INDEX_EXT = $8D45; + GL_STENCIL_INDEX1_EXT = $8D46; + GL_STENCIL_INDEX4_EXT = $8D47; + GL_STENCIL_INDEX8_EXT = $8D48; + GL_STENCIL_INDEX16_EXT = $8D49; + GL_RENDERBUFFER_WIDTH_EXT = $8D42; + GL_RENDERBUFFER_HEIGHT_EXT = $8D43; + GL_RENDERBUFFER_INTERNAL_FORMAT_EXT = $8D44; + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = $8CD0; + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = $8CD1; + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = $8CD2; + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = $8CD3; + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = $8CD4; + GL_COLOR_ATTACHMENT0_EXT = $8CE0; + GL_COLOR_ATTACHMENT1_EXT = $8CE1; + GL_COLOR_ATTACHMENT2_EXT = $8CE2; + GL_COLOR_ATTACHMENT3_EXT = $8CE3; + GL_COLOR_ATTACHMENT4_EXT = $8CE4; + GL_COLOR_ATTACHMENT5_EXT = $8CE5; + GL_COLOR_ATTACHMENT6_EXT = $8CE6; + GL_COLOR_ATTACHMENT7_EXT = $8CE7; + GL_COLOR_ATTACHMENT8_EXT = $8CE8; + GL_COLOR_ATTACHMENT9_EXT = $8CE9; + GL_COLOR_ATTACHMENT10_EXT = $8CEA; + GL_COLOR_ATTACHMENT11_EXT = $8CEB; + GL_COLOR_ATTACHMENT12_EXT = $8CEC; + GL_COLOR_ATTACHMENT13_EXT = $8CED; + GL_COLOR_ATTACHMENT14_EXT = $8CEE; + GL_COLOR_ATTACHMENT15_EXT = $8CEF; + GL_DEPTH_ATTACHMENT_EXT = $8D00; + GL_STENCIL_ATTACHMENT_EXT = $8D20; + GL_FRAMEBUFFER_COMPLETE_EXT = $8CD5; + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = $8CD6; + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = $8CD7; + GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT = $8CD8; + GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = $8CD9; + GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = $8CDA; + GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = $8CDB; + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = $8CDC; + GL_FRAMEBUFFER_UNSUPPORTED_EXT = $8CDD; + GL_FRAMEBUFFER_STATUS_ERROR_EXT = $8CDE; + GL_FRAMEBUFFER_BINDING_EXT = $8CA6; + GL_RENDERBUFFER_BINDING_EXT = $8CA7; + GL_MAX_COLOR_ATTACHMENTS_EXT = $8CDF; + GL_MAX_RENDERBUFFER_SIZE_EXT = $84E8; + GL_INVALID_FRAMEBUFFER_OPERATION_EXT = $0506; +var + glIsRenderbufferEXT: function(renderbuffer: GLuint): GLboolean; stdcall = nil; + glBindRenderbufferEXT: procedure(target: GLenum; renderbuffer: GLuint); stdcall = nil; + glDeleteRenderbuffersEXT: procedure(n: GLsizei; const renderbuffers: PGLuint); stdcall = nil; + glGenRenderbuffersEXT: procedure(n: GLsizei; renderbuffers: PGLuint); stdcall = nil; + glRenderbufferStorageEXT: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei); stdcall = nil; + glGetRenderbufferParameterivEXT: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glIsFramebufferEXT: function(framebuffer: GLuint): GLboolean; stdcall = nil; + glBindFramebufferEXT: procedure(target: GLenum; framebuffer: GLuint); stdcall = nil; + glDeleteFramebuffersEXT: procedure(n: GLsizei; const framebuffers: PGLuint); stdcall = nil; + glGenFramebuffersEXT: procedure(n: GLsizei; framebuffers: PGLuint); stdcall = nil; + glCheckFramebufferStatusEXT: function(target: GLenum): GLenum; stdcall = nil; + glFramebufferTexture1DEXT: procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); stdcall = nil; + glFramebufferTexture2DEXT: procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); stdcall = nil; + glFramebufferTexture3DEXT: procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint; zoffset: GLint); stdcall = nil; + glFramebufferRenderbufferEXT: procedure(target: GLenum; attachment: GLenum; renderbuffertarget: GLenum; renderbuffer: GLuint); stdcall = nil; + glGetFramebufferAttachmentParameterivEXT: procedure(target: GLenum; attachment: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGenerateMipmapEXT: procedure(target: GLenum); stdcall = nil; + +function Load_GL_EXT_framebuffer_object: Boolean; + +//***** GL_version_1_4 *****// +const + GL_BLEND_DST_RGB = $80C8; + GL_BLEND_SRC_RGB = $80C9; + GL_BLEND_DST_ALPHA = $80CA; + GL_BLEND_SRC_ALPHA = $80CB; + GL_POINT_SIZE_MIN = $8126; + GL_POINT_SIZE_MAX = $8127; + GL_POINT_FADE_THRESHOLD_SIZE = $8128; + GL_POINT_DISTANCE_ATTENUATION = $8129; + GL_GENERATE_MIPMAP = $8191; + GL_GENERATE_MIPMAP_HINT = $8192; + GL_DEPTH_COMPONENT16 = $81A5; + GL_DEPTH_COMPONENT24 = $81A6; + GL_DEPTH_COMPONENT32 = $81A7; + GL_MIRRORED_REPEAT = $8370; + GL_FOG_COORDINATE_SOURCE = $8450; + GL_FOG_COORDINATE = $8451; + GL_FRAGMENT_DEPTH = $8452; + GL_CURRENT_FOG_COORDINATE = $8453; + GL_FOG_COORDINATE_ARRAY_TYPE = $8454; + GL_FOG_COORDINATE_ARRAY_STRIDE = $8455; + GL_FOG_COORDINATE_ARRAY_POINTER = $8456; + GL_FOG_COORDINATE_ARRAY = $8457; + GL_COLOR_SUM = $8458; + GL_CURRENT_SECONDARY_COLOR = $8459; + GL_SECONDARY_COLOR_ARRAY_SIZE = $845A; + GL_SECONDARY_COLOR_ARRAY_TYPE = $845B; + GL_SECONDARY_COLOR_ARRAY_STRIDE = $845C; + GL_SECONDARY_COLOR_ARRAY_POINTER = $845D; + GL_SECONDARY_COLOR_ARRAY = $845E; + GL_MAX_TEXTURE_LOD_BIAS = $84FD; + GL_TEXTURE_FILTER_CONTROL = $8500; + GL_TEXTURE_LOD_BIAS = $8501; + GL_INCR_WRAP = $8507; + GL_DECR_WRAP = $8508; + GL_TEXTURE_DEPTH_SIZE = $884A; + GL_DEPTH_TEXTURE_MODE = $884B; + GL_TEXTURE_COMPARE_MODE = $884C; + GL_TEXTURE_COMPARE_FUNC = $884D; + GL_COMPARE_R_TO_TEXTURE = $884E; +var + glBlendFuncSeparate: procedure(sfactorRGB: GLenum; dfactorRGB: GLenum; sfactorAlpha: GLenum; dfactorAlpha: GLenum); stdcall = nil; + glFogCoordf: procedure(coord: GLfloat); stdcall = nil; + glFogCoordfv: procedure(const coord: PGLfloat); stdcall = nil; + glFogCoordd: procedure(coord: GLdouble); stdcall = nil; + glFogCoorddv: procedure(const coord: PGLdouble); stdcall = nil; + glFogCoordPointer: procedure(_type: GLenum; stride: GLsizei; const pointer: PGLvoid); stdcall = nil; + glMultiDrawArrays: procedure(mode: GLenum; first: PGLint; count: PGLsizei; primcount: GLsizei); stdcall = nil; + glMultiDrawElements: procedure(mode: GLenum; const count: PGLsizei; _type: GLenum; const indices: PGLvoid; primcount: GLsizei); stdcall = nil; + glPointParameterf: procedure(pname: GLenum; param: GLfloat); stdcall = nil; + glPointParameterfv: procedure(pname: GLenum; const params: PGLfloat); stdcall = nil; + glPointParameteri: procedure(pname: GLenum; param: GLint); stdcall = nil; + glPointParameteriv: procedure(pname: GLenum; const params: PGLint); stdcall = nil; + glSecondaryColor3b: procedure(red: GLbyte; green: GLbyte; blue: GLbyte); stdcall = nil; + glSecondaryColor3bv: procedure(const v: PGLbyte); stdcall = nil; + glSecondaryColor3d: procedure(red: GLdouble; green: GLdouble; blue: GLdouble); stdcall = nil; + glSecondaryColor3dv: procedure(const v: PGLdouble); stdcall = nil; + glSecondaryColor3f: procedure(red: GLfloat; green: GLfloat; blue: GLfloat); stdcall = nil; + glSecondaryColor3fv: procedure(const v: PGLfloat); stdcall = nil; + glSecondaryColor3i: procedure(red: GLint; green: GLint; blue: GLint); stdcall = nil; + glSecondaryColor3iv: procedure(const v: PGLint); stdcall = nil; + glSecondaryColor3s: procedure(red: GLshort; green: GLshort; blue: GLshort); stdcall = nil; + glSecondaryColor3sv: procedure(const v: PGLshort); stdcall = nil; + glSecondaryColor3ub: procedure(red: GLubyte; green: GLubyte; blue: GLubyte); stdcall = nil; + glSecondaryColor3ubv: procedure(const v: PGLubyte); stdcall = nil; + glSecondaryColor3ui: procedure(red: GLuint; green: GLuint; blue: GLuint); stdcall = nil; + glSecondaryColor3uiv: procedure(const v: PGLuint); stdcall = nil; + glSecondaryColor3us: procedure(red: GLushort; green: GLushort; blue: GLushort); stdcall = nil; + glSecondaryColor3usv: procedure(const v: PGLushort); stdcall = nil; + glSecondaryColorPointer: procedure(size: GLint; _type: GLenum; stride: GLsizei; const pointer: PGLvoid); stdcall = nil; + glWindowPos2d: procedure(x: GLdouble; y: GLdouble); stdcall = nil; + glWindowPos2dv: procedure(const v: PGLdouble); stdcall = nil; + glWindowPos2f: procedure(x: GLfloat; y: GLfloat); stdcall = nil; + glWindowPos2fv: procedure(const v: PGLfloat); stdcall = nil; + glWindowPos2i: procedure(x: GLint; y: GLint); stdcall = nil; + glWindowPos2iv: procedure(const v: PGLint); stdcall = nil; + glWindowPos2s: procedure(x: GLshort; y: GLshort); stdcall = nil; + glWindowPos2sv: procedure(const v: PGLshort); stdcall = nil; + glWindowPos3d: procedure(x: GLdouble; y: GLdouble; z: GLdouble); stdcall = nil; + glWindowPos3dv: procedure(const v: PGLdouble); stdcall = nil; + glWindowPos3f: procedure(x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glWindowPos3fv: procedure(const v: PGLfloat); stdcall = nil; + glWindowPos3i: procedure(x: GLint; y: GLint; z: GLint); stdcall = nil; + glWindowPos3iv: procedure(const v: PGLint); stdcall = nil; + glWindowPos3s: procedure(x: GLshort; y: GLshort; z: GLshort); stdcall = nil; + glWindowPos3sv: procedure(const v: PGLshort); stdcall = nil; + +function Load_GL_version_1_4: Boolean; + +//***** GL_version_1_5 *****// +const + GL_BUFFER_SIZE = $8764; + GL_BUFFER_USAGE = $8765; + GL_QUERY_COUNTER_BITS = $8864; + GL_CURRENT_QUERY = $8865; + GL_QUERY_RESULT = $8866; + GL_QUERY_RESULT_AVAILABLE = $8867; + GL_ARRAY_BUFFER = $8892; + GL_ELEMENT_ARRAY_BUFFER = $8893; + GL_ARRAY_BUFFER_BINDING = $8894; + GL_ELEMENT_ARRAY_BUFFER_BINDING = $8895; + GL_VERTEX_ARRAY_BUFFER_BINDING = $8896; + GL_NORMAL_ARRAY_BUFFER_BINDING = $8897; + GL_COLOR_ARRAY_BUFFER_BINDING = $8898; + GL_INDEX_ARRAY_BUFFER_BINDING = $8899; + GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = $889A; + GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = $889B; + GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = $889C; + GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = $889D; + GL_WEIGHT_ARRAY_BUFFER_BINDING = $889E; + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = $889F; + GL_READ_ONLY = $88B8; + GL_WRITE_ONLY = $88B9; + GL_READ_WRITE = $88BA; + GL_BUFFER_ACCESS = $88BB; + GL_BUFFER_MAPPED = $88BC; + GL_BUFFER_MAP_POINTER = $88BD; + GL_STREAM_DRAW = $88E0; + GL_STREAM_READ = $88E1; + GL_STREAM_COPY = $88E2; + GL_STATIC_DRAW = $88E4; + GL_STATIC_READ = $88E5; + GL_STATIC_COPY = $88E6; + GL_DYNAMIC_DRAW = $88E8; + GL_DYNAMIC_READ = $88E9; + GL_DYNAMIC_COPY = $88EA; + GL_SAMPLES_PASSED = $8914; + GL_FOG_COORD_SRC = $8450; + GL_FOG_COORD = $8451; + GL_CURRENT_FOG_COORD = $8453; + GL_FOG_COORD_ARRAY_TYPE = $8454; + GL_FOG_COORD_ARRAY_STRIDE = $8455; + GL_FOG_COORD_ARRAY_POINTER = $8456; + GL_FOG_COORD_ARRAY = $8457; + GL_FOG_COORD_ARRAY_BUFFER_BINDING = $889D; + GL_SRC0_RGB = $8580; + GL_SRC1_RGB = $8581; + GL_SRC2_RGB = $8582; + GL_SRC0_ALPHA = $8588; + GL_SRC1_ALPHA = $8589; + GL_SRC2_ALPHA = $858A; +var + glGenQueries: procedure(n: GLsizei; ids: PGLuint); stdcall = nil; + glDeleteQueries: procedure(n: GLsizei; const ids: PGLuint); stdcall = nil; + glIsQuery: function(id: GLuint): GLboolean; stdcall = nil; + glBeginQuery: procedure(target: GLenum; id: GLuint); stdcall = nil; + glEndQuery: procedure(target: GLenum); stdcall = nil; + glGetQueryiv: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetQueryObjectiv: procedure(id: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetQueryObjectuiv: procedure(id: GLuint; pname: GLenum; params: PGLuint); stdcall = nil; + glBindBuffer: procedure(target: GLenum; buffer: GLuint); stdcall = nil; + glDeleteBuffers: procedure(n: GLsizei; const buffers: PGLuint); stdcall = nil; + glGenBuffers: procedure(n: GLsizei; buffers: PGLuint); stdcall = nil; + glIsBuffer: function(buffer: GLuint): GLboolean; stdcall = nil; + glBufferData: procedure(target: GLenum; size: GLsizeiptr; const data: PGLvoid; usage: GLenum); stdcall = nil; + glBufferSubData: procedure(target: GLenum; offset: GLintptr; size: GLsizeiptr; const data: PGLvoid); stdcall = nil; + glGetBufferSubData: procedure(target: GLenum; offset: GLintptr; size: GLsizeiptr; data: PGLvoid); stdcall = nil; + glMapBuffer: function(target: GLenum; access: GLenum): PGLvoid; stdcall = nil; + glUnmapBuffer: function(target: GLenum): GLboolean; stdcall = nil; + glGetBufferParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); stdcall = nil; + glGetBufferPointerv: procedure(target: GLenum; pname: GLenum; params: PGLvoid); stdcall = nil; + +function Load_GL_version_1_5: Boolean; + +//***** GL_version_2_0 *****// +const + GL_BLEND_EQUATION_RGB = $8009; + GL_VERTEX_ATTRIB_ARRAY_ENABLED = $8622; + GL_VERTEX_ATTRIB_ARRAY_SIZE = $8623; + GL_VERTEX_ATTRIB_ARRAY_STRIDE = $8624; + GL_VERTEX_ATTRIB_ARRAY_TYPE = $8625; + GL_CURRENT_VERTEX_ATTRIB = $8626; + GL_VERTEX_PROGRAM_POINT_SIZE = $8642; + GL_VERTEX_PROGRAM_TWO_SIDE = $8643; + GL_VERTEX_ATTRIB_ARRAY_POINTER = $8645; + GL_STENCIL_BACK_FUNC = $8800; + GL_STENCIL_BACK_FAIL = $8801; + GL_STENCIL_BACK_PASS_DEPTH_FAIL = $8802; + GL_STENCIL_BACK_PASS_DEPTH_PASS = $8803; + GL_MAX_DRAW_BUFFERS = $8824; + GL_DRAW_BUFFER0 = $8825; + GL_DRAW_BUFFER1 = $8826; + GL_DRAW_BUFFER2 = $8827; + GL_DRAW_BUFFER3 = $8828; + GL_DRAW_BUFFER4 = $8829; + GL_DRAW_BUFFER5 = $882A; + GL_DRAW_BUFFER6 = $882B; + GL_DRAW_BUFFER7 = $882C; + GL_DRAW_BUFFER8 = $882D; + GL_DRAW_BUFFER9 = $882E; + GL_DRAW_BUFFER10 = $882F; + GL_DRAW_BUFFER11 = $8830; + GL_DRAW_BUFFER12 = $8831; + GL_DRAW_BUFFER13 = $8832; + GL_DRAW_BUFFER14 = $8833; + GL_DRAW_BUFFER15 = $8834; + GL_BLEND_EQUATION_ALPHA = $883D; + GL_POINT_SPRITE = $8861; + GL_COORD_REPLACE = $8862; + GL_MAX_VERTEX_ATTRIBS = $8869; + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = $886A; + GL_MAX_TEXTURE_COORDS = $8871; + GL_MAX_TEXTURE_IMAGE_UNITS = $8872; + GL_FRAGMENT_SHADER = $8B30; + GL_VERTEX_SHADER = $8B31; + GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = $8B49; + GL_MAX_VERTEX_UNIFORM_COMPONENTS = $8B4A; + GL_MAX_VARYING_FLOATS = $8B4B; + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = $8B4C; + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = $8B4D; + GL_SHADER_TYPE = $8B4F; + GL_FLOAT_VEC2 = $8B50; + GL_FLOAT_VEC3 = $8B51; + GL_FLOAT_VEC4 = $8B52; + GL_INT_VEC2 = $8B53; + GL_INT_VEC3 = $8B54; + GL_INT_VEC4 = $8B55; + GL_BOOL = $8B56; + GL_BOOL_VEC2 = $8B57; + GL_BOOL_VEC3 = $8B58; + GL_BOOL_VEC4 = $8B59; + GL_FLOAT_MAT2 = $8B5A; + GL_FLOAT_MAT3 = $8B5B; + GL_FLOAT_MAT4 = $8B5C; + GL_SAMPLER_1D = $8B5D; + GL_SAMPLER_2D = $8B5E; + GL_SAMPLER_3D = $8B5F; + GL_SAMPLER_CUBE = $8B60; + GL_SAMPLER_1D_SHADOW = $8B61; + GL_SAMPLER_2D_SHADOW = $8B62; + GL_DELETE_STATUS = $8B80; + GL_COMPILE_STATUS = $8B81; + GL_LINK_STATUS = $8B82; + GL_VALIDATE_STATUS = $8B83; + GL_INFO_LOG_LENGTH = $8B84; + GL_ATTACHED_SHADERS = $8B85; + GL_ACTIVE_UNIFORMS = $8B86; + GL_ACTIVE_UNIFORM_MAX_LENGTH = $8B87; + GL_SHADER_SOURCE_LENGTH = $8B88; + GL_ACTIVE_ATTRIBUTES = $8B89; + GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = $8B8A; + GL_FRAGMENT_SHADER_DERIVATIVE_HINT = $8B8B; + GL_SHADING_LANGUAGE_VERSION = $8B8C; + GL_CURRENT_PROGRAM = $8B8D; + GL_POINT_SPRITE_COORD_ORIGIN = $8CA0; + GL_LOWER_LEFT = $8CA1; + GL_UPPER_LEFT = $8CA2; + GL_STENCIL_BACK_REF = $8CA3; + GL_STENCIL_BACK_VALUE_MASK = $8CA4; + GL_STENCIL_BACK_WRITEMASK = $8CA5; +var + glBlendEquationSeparate: procedure(modeRGB: GLenum; modeAlpha: GLenum); stdcall = nil; + glDrawBuffers: procedure(n: GLsizei; const bufs: PGLenum); stdcall = nil; + glStencilOpSeparate: procedure(face: GLenum; sfail: GLenum; dpfail: GLenum; dppass: GLenum); stdcall = nil; + glStencilFuncSeparate: procedure(frontfunc: GLenum; backfunc: GLenum; ref: GLint; mask: GLuint); stdcall = nil; + glStencilMaskSeparate: procedure(face: GLenum; mask: GLuint); stdcall = nil; + glAttachShader: procedure(_program: GLuint; shader: GLuint); stdcall = nil; + glBindAttribLocation: procedure(_program: GLuint; index: GLuint; const name: PGLchar); stdcall = nil; + glCompileShader: procedure(shader: GLuint); stdcall = nil; + glCreateProgram: function(): GLuint; stdcall = nil; + glCreateShader: function(_type: GLenum): GLuint; stdcall = nil; + glDeleteProgram: procedure(_program: GLuint); stdcall = nil; + glDeleteShader: procedure(shader: GLuint); stdcall = nil; + glDetachShader: procedure(_program: GLuint; shader: GLuint); stdcall = nil; + glDisableVertexAttribArray: procedure(index: GLuint); stdcall = nil; + glEnableVertexAttribArray: procedure(index: GLuint); stdcall = nil; + glGetActiveAttrib: procedure(_program: GLuint; index: GLuint; bufSize: GLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLchar); stdcall = nil; + glGetActiveUniform: procedure(_program: GLuint; index: GLuint; bufSize: GLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLchar); stdcall = nil; + glGetAttachedShaders: procedure(_program: GLuint; maxCount: GLsizei; count: PGLsizei; obj: PGLuint); stdcall = nil; + glGetAttribLocation: function(_program: GLuint; const name: PGLchar): GLint; stdcall = nil; + glGetProgramiv: procedure(_program: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetProgramInfoLog: procedure(_program: GLuint; bufSize: GLsizei; length: PGLsizei; infoLog: PGLchar); stdcall = nil; + glGetShaderiv: procedure(shader: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetShaderInfoLog: procedure(shader: GLuint; bufSize: GLsizei; length: PGLsizei; infoLog: PGLchar); stdcall = nil; + glGetShaderSource: procedure(shader: GLuint; bufSize: GLsizei; length: PGLsizei; source: PGLchar); stdcall = nil; + glGetUniformLocation: function(_program: GLuint; const name: PGLchar): GLint; stdcall = nil; + glGetUniformfv: procedure(_program: GLuint; location: GLint; params: PGLfloat); stdcall = nil; + glGetUniformiv: procedure(_program: GLuint; location: GLint; params: PGLint); stdcall = nil; + glGetVertexAttribdv: procedure(index: GLuint; pname: GLenum; params: PGLdouble); stdcall = nil; + glGetVertexAttribfv: procedure(index: GLuint; pname: GLenum; params: PGLfloat); stdcall = nil; + glGetVertexAttribiv: procedure(index: GLuint; pname: GLenum; params: PGLint); stdcall = nil; + glGetVertexAttribPointerv: procedure(index: GLuint; pname: GLenum; pointer: PGLvoid); stdcall = nil; + glIsProgram: function(_program: GLuint): GLboolean; stdcall = nil; + glIsShader: function(shader: GLuint): GLboolean; stdcall = nil; + glLinkProgram: procedure(_program: GLuint); stdcall = nil; + glShaderSource: procedure(shader: GLuint; count: GLsizei; const _string: PGLchar; const length: PGLint); stdcall = nil; + glUseProgram: procedure(_program: GLuint); stdcall = nil; + glUniform1f: procedure(location: GLint; v0: GLfloat); stdcall = nil; + glUniform2f: procedure(location: GLint; v0: GLfloat; v1: GLfloat); stdcall = nil; + glUniform3f: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat); stdcall = nil; + glUniform4f: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat; v3: GLfloat); stdcall = nil; + glUniform1i: procedure(location: GLint; v0: GLint); stdcall = nil; + glUniform2i: procedure(location: GLint; v0: GLint; v1: GLint); stdcall = nil; + glUniform3i: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint); stdcall = nil; + glUniform4i: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint; v3: GLint); stdcall = nil; + glUniform1fv: procedure(location: GLint; count: GLsizei; const value: PGLfloat); stdcall = nil; + glUniform2fv: procedure(location: GLint; count: GLsizei; const value: PGLfloat); stdcall = nil; + glUniform3fv: procedure(location: GLint; count: GLsizei; const value: PGLfloat); stdcall = nil; + glUniform4fv: procedure(location: GLint; count: GLsizei; const value: PGLfloat); stdcall = nil; + glUniform1iv: procedure(location: GLint; count: GLsizei; const value: PGLint); stdcall = nil; + glUniform2iv: procedure(location: GLint; count: GLsizei; const value: PGLint); stdcall = nil; + glUniform3iv: procedure(location: GLint; count: GLsizei; const value: PGLint); stdcall = nil; + glUniform4iv: procedure(location: GLint; count: GLsizei; const value: PGLint); stdcall = nil; + glUniformMatrix2fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); stdcall = nil; + glUniformMatrix3fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); stdcall = nil; + glUniformMatrix4fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); stdcall = nil; + glValidateProgram: procedure(_program: GLuint); stdcall = nil; + glVertexAttrib1d: procedure(index: GLuint; x: GLdouble); stdcall = nil; + glVertexAttrib1dv: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib1f: procedure(index: GLuint; x: GLfloat); stdcall = nil; + glVertexAttrib1fv: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib1s: procedure(index: GLuint; x: GLshort); stdcall = nil; + glVertexAttrib1sv: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib2d: procedure(index: GLuint; x: GLdouble; y: GLdouble); stdcall = nil; + glVertexAttrib2dv: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib2f: procedure(index: GLuint; x: GLfloat; y: GLfloat); stdcall = nil; + glVertexAttrib2fv: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib2s: procedure(index: GLuint; x: GLshort; y: GLshort); stdcall = nil; + glVertexAttrib2sv: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib3d: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble); stdcall = nil; + glVertexAttrib3dv: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib3f: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); stdcall = nil; + glVertexAttrib3fv: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib3s: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort); stdcall = nil; + glVertexAttrib3sv: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib4Nbv: procedure(index: GLuint; const v: PGLbyte); stdcall = nil; + glVertexAttrib4Niv: procedure(index: GLuint; const v: PGLint); stdcall = nil; + glVertexAttrib4Nsv: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib4Nub: procedure(index: GLuint; x: GLubyte; y: GLubyte; z: GLubyte; w: GLubyte); stdcall = nil; + glVertexAttrib4Nubv: procedure(index: GLuint; const v: PGLubyte); stdcall = nil; + glVertexAttrib4Nuiv: procedure(index: GLuint; const v: PGLuint); stdcall = nil; + glVertexAttrib4Nusv: procedure(index: GLuint; const v: PGLushort); stdcall = nil; + glVertexAttrib4bv: procedure(index: GLuint; const v: PGLbyte); stdcall = nil; + glVertexAttrib4d: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); stdcall = nil; + glVertexAttrib4dv: procedure(index: GLuint; const v: PGLdouble); stdcall = nil; + glVertexAttrib4f: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); stdcall = nil; + glVertexAttrib4fv: procedure(index: GLuint; const v: PGLfloat); stdcall = nil; + glVertexAttrib4iv: procedure(index: GLuint; const v: PGLint); stdcall = nil; + glVertexAttrib4s: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort; w: GLshort); stdcall = nil; + glVertexAttrib4sv: procedure(index: GLuint; const v: PGLshort); stdcall = nil; + glVertexAttrib4ubv: procedure(index: GLuint; const v: PGLubyte); stdcall = nil; + glVertexAttrib4uiv: procedure(index: GLuint; const v: PGLuint); stdcall = nil; + glVertexAttrib4usv: procedure(index: GLuint; const v: PGLushort); stdcall = nil; + glVertexAttribPointer: procedure(index: GLuint; size: GLint; _type: GLenum; normalized: GLboolean; stride: GLsizei; const pointer: PGLvoid); stdcall = nil; + +function Load_GL_version_2_0: Boolean; + +implementation + +function glext_ExtensionSupported(const extension: String; const searchIn: String): Boolean; +var + extensions: PChar; + start: PChar; + where, terminator: PChar; +begin + + if (Pos(' ', extension) <> 0) or (extension = '') then + begin + Result := FALSE; + Exit; + end; + + if searchIn = '' then extensions := PChar(glGetString(GL_EXTENSIONS)) + else extensions := PChar(searchIn); + start := extensions; + while TRUE do + begin + where := StrPos(start, PChar(extension)); + if where = nil then Break; + terminator := Pointer(Integer(where) + Length(extension)); + if (where = start) or (PChar(Integer(where) - 1)^ = ' ') then + begin + if (terminator^ = ' ') or (terminator^ = #0) then + begin + Result := TRUE; + Exit; + end; + end; + start := terminator; + end; + Result := FALSE; + +end; + +function Load_GL_version_1_2: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + glDrawRangeElements := wglGetProcAddress('glDrawRangeElements'); + if not Assigned(glDrawRangeElements) then Exit; + glTexImage3D := wglGetProcAddress('glTexImage3D'); + if not Assigned(glTexImage3D) then Exit; + glTexSubImage3D := wglGetProcAddress('glTexSubImage3D'); + if not Assigned(glTexSubImage3D) then Exit; + glCopyTexSubImage3D := wglGetProcAddress('glCopyTexSubImage3D'); + if not Assigned(glCopyTexSubImage3D) then Exit; + Result := TRUE; + +end; + +function Load_GL_ARB_imaging: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_imaging', extstring) then + begin + glColorTable := wglGetProcAddress('glColorTable'); + if not Assigned(glColorTable) then Exit; + glColorTableParameterfv := wglGetProcAddress('glColorTableParameterfv'); + if not Assigned(glColorTableParameterfv) then Exit; + glColorTableParameteriv := wglGetProcAddress('glColorTableParameteriv'); + if not Assigned(glColorTableParameteriv) then Exit; + glCopyColorTable := wglGetProcAddress('glCopyColorTable'); + if not Assigned(glCopyColorTable) then Exit; + glGetColorTable := wglGetProcAddress('glGetColorTable'); + if not Assigned(glGetColorTable) then Exit; + glGetColorTableParameterfv := wglGetProcAddress('glGetColorTableParameterfv'); + if not Assigned(glGetColorTableParameterfv) then Exit; + glGetColorTableParameteriv := wglGetProcAddress('glGetColorTableParameteriv'); + if not Assigned(glGetColorTableParameteriv) then Exit; + glColorSubTable := wglGetProcAddress('glColorSubTable'); + if not Assigned(glColorSubTable) then Exit; + glCopyColorSubTable := wglGetProcAddress('glCopyColorSubTable'); + if not Assigned(glCopyColorSubTable) then Exit; + glConvolutionFilter1D := wglGetProcAddress('glConvolutionFilter1D'); + if not Assigned(glConvolutionFilter1D) then Exit; + glConvolutionFilter2D := wglGetProcAddress('glConvolutionFilter2D'); + if not Assigned(glConvolutionFilter2D) then Exit; + glConvolutionParameterf := wglGetProcAddress('glConvolutionParameterf'); + if not Assigned(glConvolutionParameterf) then Exit; + glConvolutionParameterfv := wglGetProcAddress('glConvolutionParameterfv'); + if not Assigned(glConvolutionParameterfv) then Exit; + glConvolutionParameteri := wglGetProcAddress('glConvolutionParameteri'); + if not Assigned(glConvolutionParameteri) then Exit; + glConvolutionParameteriv := wglGetProcAddress('glConvolutionParameteriv'); + if not Assigned(glConvolutionParameteriv) then Exit; + glCopyConvolutionFilter1D := wglGetProcAddress('glCopyConvolutionFilter1D'); + if not Assigned(glCopyConvolutionFilter1D) then Exit; + glCopyConvolutionFilter2D := wglGetProcAddress('glCopyConvolutionFilter2D'); + if not Assigned(glCopyConvolutionFilter2D) then Exit; + glGetConvolutionFilter := wglGetProcAddress('glGetConvolutionFilter'); + if not Assigned(glGetConvolutionFilter) then Exit; + glGetConvolutionParameterfv := wglGetProcAddress('glGetConvolutionParameterfv'); + if not Assigned(glGetConvolutionParameterfv) then Exit; + glGetConvolutionParameteriv := wglGetProcAddress('glGetConvolutionParameteriv'); + if not Assigned(glGetConvolutionParameteriv) then Exit; + glGetSeparableFilter := wglGetProcAddress('glGetSeparableFilter'); + if not Assigned(glGetSeparableFilter) then Exit; + glSeparableFilter2D := wglGetProcAddress('glSeparableFilter2D'); + if not Assigned(glSeparableFilter2D) then Exit; + glGetHistogram := wglGetProcAddress('glGetHistogram'); + if not Assigned(glGetHistogram) then Exit; + glGetHistogramParameterfv := wglGetProcAddress('glGetHistogramParameterfv'); + if not Assigned(glGetHistogramParameterfv) then Exit; + glGetHistogramParameteriv := wglGetProcAddress('glGetHistogramParameteriv'); + if not Assigned(glGetHistogramParameteriv) then Exit; + glGetMinmax := wglGetProcAddress('glGetMinmax'); + if not Assigned(glGetMinmax) then Exit; + glGetMinmaxParameterfv := wglGetProcAddress('glGetMinmaxParameterfv'); + if not Assigned(glGetMinmaxParameterfv) then Exit; + glGetMinmaxParameteriv := wglGetProcAddress('glGetMinmaxParameteriv'); + if not Assigned(glGetMinmaxParameteriv) then Exit; + glHistogram := wglGetProcAddress('glHistogram'); + if not Assigned(glHistogram) then Exit; + glMinmax := wglGetProcAddress('glMinmax'); + if not Assigned(glMinmax) then Exit; + glResetHistogram := wglGetProcAddress('glResetHistogram'); + if not Assigned(glResetHistogram) then Exit; + glResetMinmax := wglGetProcAddress('glResetMinmax'); + if not Assigned(glResetMinmax) then Exit; + glBlendEquation := wglGetProcAddress('glBlendEquation'); + if not Assigned(glBlendEquation) then Exit; + glBlendColor := wglGetProcAddress('glBlendColor'); + if not Assigned(glBlendColor) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_version_1_3: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + glActiveTexture := wglGetProcAddress('glActiveTexture'); + if not Assigned(glActiveTexture) then Exit; + glClientActiveTexture := wglGetProcAddress('glClientActiveTexture'); + if not Assigned(glClientActiveTexture) then Exit; + glMultiTexCoord1d := wglGetProcAddress('glMultiTexCoord1d'); + if not Assigned(glMultiTexCoord1d) then Exit; + glMultiTexCoord1dv := wglGetProcAddress('glMultiTexCoord1dv'); + if not Assigned(glMultiTexCoord1dv) then Exit; + glMultiTexCoord1f := wglGetProcAddress('glMultiTexCoord1f'); + if not Assigned(glMultiTexCoord1f) then Exit; + glMultiTexCoord1fv := wglGetProcAddress('glMultiTexCoord1fv'); + if not Assigned(glMultiTexCoord1fv) then Exit; + glMultiTexCoord1i := wglGetProcAddress('glMultiTexCoord1i'); + if not Assigned(glMultiTexCoord1i) then Exit; + glMultiTexCoord1iv := wglGetProcAddress('glMultiTexCoord1iv'); + if not Assigned(glMultiTexCoord1iv) then Exit; + glMultiTexCoord1s := wglGetProcAddress('glMultiTexCoord1s'); + if not Assigned(glMultiTexCoord1s) then Exit; + glMultiTexCoord1sv := wglGetProcAddress('glMultiTexCoord1sv'); + if not Assigned(glMultiTexCoord1sv) then Exit; + glMultiTexCoord2d := wglGetProcAddress('glMultiTexCoord2d'); + if not Assigned(glMultiTexCoord2d) then Exit; + glMultiTexCoord2dv := wglGetProcAddress('glMultiTexCoord2dv'); + if not Assigned(glMultiTexCoord2dv) then Exit; + glMultiTexCoord2f := wglGetProcAddress('glMultiTexCoord2f'); + if not Assigned(glMultiTexCoord2f) then Exit; + glMultiTexCoord2fv := wglGetProcAddress('glMultiTexCoord2fv'); + if not Assigned(glMultiTexCoord2fv) then Exit; + glMultiTexCoord2i := wglGetProcAddress('glMultiTexCoord2i'); + if not Assigned(glMultiTexCoord2i) then Exit; + glMultiTexCoord2iv := wglGetProcAddress('glMultiTexCoord2iv'); + if not Assigned(glMultiTexCoord2iv) then Exit; + glMultiTexCoord2s := wglGetProcAddress('glMultiTexCoord2s'); + if not Assigned(glMultiTexCoord2s) then Exit; + glMultiTexCoord2sv := wglGetProcAddress('glMultiTexCoord2sv'); + if not Assigned(glMultiTexCoord2sv) then Exit; + glMultiTexCoord3d := wglGetProcAddress('glMultiTexCoord3d'); + if not Assigned(glMultiTexCoord3d) then Exit; + glMultiTexCoord3dv := wglGetProcAddress('glMultiTexCoord3dv'); + if not Assigned(glMultiTexCoord3dv) then Exit; + glMultiTexCoord3f := wglGetProcAddress('glMultiTexCoord3f'); + if not Assigned(glMultiTexCoord3f) then Exit; + glMultiTexCoord3fv := wglGetProcAddress('glMultiTexCoord3fv'); + if not Assigned(glMultiTexCoord3fv) then Exit; + glMultiTexCoord3i := wglGetProcAddress('glMultiTexCoord3i'); + if not Assigned(glMultiTexCoord3i) then Exit; + glMultiTexCoord3iv := wglGetProcAddress('glMultiTexCoord3iv'); + if not Assigned(glMultiTexCoord3iv) then Exit; + glMultiTexCoord3s := wglGetProcAddress('glMultiTexCoord3s'); + if not Assigned(glMultiTexCoord3s) then Exit; + glMultiTexCoord3sv := wglGetProcAddress('glMultiTexCoord3sv'); + if not Assigned(glMultiTexCoord3sv) then Exit; + glMultiTexCoord4d := wglGetProcAddress('glMultiTexCoord4d'); + if not Assigned(glMultiTexCoord4d) then Exit; + glMultiTexCoord4dv := wglGetProcAddress('glMultiTexCoord4dv'); + if not Assigned(glMultiTexCoord4dv) then Exit; + glMultiTexCoord4f := wglGetProcAddress('glMultiTexCoord4f'); + if not Assigned(glMultiTexCoord4f) then Exit; + glMultiTexCoord4fv := wglGetProcAddress('glMultiTexCoord4fv'); + if not Assigned(glMultiTexCoord4fv) then Exit; + glMultiTexCoord4i := wglGetProcAddress('glMultiTexCoord4i'); + if not Assigned(glMultiTexCoord4i) then Exit; + glMultiTexCoord4iv := wglGetProcAddress('glMultiTexCoord4iv'); + if not Assigned(glMultiTexCoord4iv) then Exit; + glMultiTexCoord4s := wglGetProcAddress('glMultiTexCoord4s'); + if not Assigned(glMultiTexCoord4s) then Exit; + glMultiTexCoord4sv := wglGetProcAddress('glMultiTexCoord4sv'); + if not Assigned(glMultiTexCoord4sv) then Exit; + glLoadTransposeMatrixf := wglGetProcAddress('glLoadTransposeMatrixf'); + if not Assigned(glLoadTransposeMatrixf) then Exit; + glLoadTransposeMatrixd := wglGetProcAddress('glLoadTransposeMatrixd'); + if not Assigned(glLoadTransposeMatrixd) then Exit; + glMultTransposeMatrixf := wglGetProcAddress('glMultTransposeMatrixf'); + if not Assigned(glMultTransposeMatrixf) then Exit; + glMultTransposeMatrixd := wglGetProcAddress('glMultTransposeMatrixd'); + if not Assigned(glMultTransposeMatrixd) then Exit; + glSampleCoverage := wglGetProcAddress('glSampleCoverage'); + if not Assigned(glSampleCoverage) then Exit; + glCompressedTexImage3D := wglGetProcAddress('glCompressedTexImage3D'); + if not Assigned(glCompressedTexImage3D) then Exit; + glCompressedTexImage2D := wglGetProcAddress('glCompressedTexImage2D'); + if not Assigned(glCompressedTexImage2D) then Exit; + glCompressedTexImage1D := wglGetProcAddress('glCompressedTexImage1D'); + if not Assigned(glCompressedTexImage1D) then Exit; + glCompressedTexSubImage3D := wglGetProcAddress('glCompressedTexSubImage3D'); + if not Assigned(glCompressedTexSubImage3D) then Exit; + glCompressedTexSubImage2D := wglGetProcAddress('glCompressedTexSubImage2D'); + if not Assigned(glCompressedTexSubImage2D) then Exit; + glCompressedTexSubImage1D := wglGetProcAddress('glCompressedTexSubImage1D'); + if not Assigned(glCompressedTexSubImage1D) then Exit; + glGetCompressedTexImage := wglGetProcAddress('glGetCompressedTexImage'); + if not Assigned(glGetCompressedTexImage) then Exit; + Result := TRUE; + +end; + +function Load_GL_ARB_multitexture: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_multitexture', extstring) then + begin + glActiveTextureARB := wglGetProcAddress('glActiveTextureARB'); + if not Assigned(glActiveTextureARB) then Exit; + glClientActiveTextureARB := wglGetProcAddress('glClientActiveTextureARB'); + if not Assigned(glClientActiveTextureARB) then Exit; + glMultiTexCoord1dARB := wglGetProcAddress('glMultiTexCoord1dARB'); + if not Assigned(glMultiTexCoord1dARB) then Exit; + glMultiTexCoord1dvARB := wglGetProcAddress('glMultiTexCoord1dvARB'); + if not Assigned(glMultiTexCoord1dvARB) then Exit; + glMultiTexCoord1fARB := wglGetProcAddress('glMultiTexCoord1fARB'); + if not Assigned(glMultiTexCoord1fARB) then Exit; + glMultiTexCoord1fvARB := wglGetProcAddress('glMultiTexCoord1fvARB'); + if not Assigned(glMultiTexCoord1fvARB) then Exit; + glMultiTexCoord1iARB := wglGetProcAddress('glMultiTexCoord1iARB'); + if not Assigned(glMultiTexCoord1iARB) then Exit; + glMultiTexCoord1ivARB := wglGetProcAddress('glMultiTexCoord1ivARB'); + if not Assigned(glMultiTexCoord1ivARB) then Exit; + glMultiTexCoord1sARB := wglGetProcAddress('glMultiTexCoord1sARB'); + if not Assigned(glMultiTexCoord1sARB) then Exit; + glMultiTexCoord1svARB := wglGetProcAddress('glMultiTexCoord1svARB'); + if not Assigned(glMultiTexCoord1svARB) then Exit; + glMultiTexCoord2dARB := wglGetProcAddress('glMultiTexCoord2dARB'); + if not Assigned(glMultiTexCoord2dARB) then Exit; + glMultiTexCoord2dvARB := wglGetProcAddress('glMultiTexCoord2dvARB'); + if not Assigned(glMultiTexCoord2dvARB) then Exit; + glMultiTexCoord2fARB := wglGetProcAddress('glMultiTexCoord2fARB'); + if not Assigned(glMultiTexCoord2fARB) then Exit; + glMultiTexCoord2fvARB := wglGetProcAddress('glMultiTexCoord2fvARB'); + if not Assigned(glMultiTexCoord2fvARB) then Exit; + glMultiTexCoord2iARB := wglGetProcAddress('glMultiTexCoord2iARB'); + if not Assigned(glMultiTexCoord2iARB) then Exit; + glMultiTexCoord2ivARB := wglGetProcAddress('glMultiTexCoord2ivARB'); + if not Assigned(glMultiTexCoord2ivARB) then Exit; + glMultiTexCoord2sARB := wglGetProcAddress('glMultiTexCoord2sARB'); + if not Assigned(glMultiTexCoord2sARB) then Exit; + glMultiTexCoord2svARB := wglGetProcAddress('glMultiTexCoord2svARB'); + if not Assigned(glMultiTexCoord2svARB) then Exit; + glMultiTexCoord3dARB := wglGetProcAddress('glMultiTexCoord3dARB'); + if not Assigned(glMultiTexCoord3dARB) then Exit; + glMultiTexCoord3dvARB := wglGetProcAddress('glMultiTexCoord3dvARB'); + if not Assigned(glMultiTexCoord3dvARB) then Exit; + glMultiTexCoord3fARB := wglGetProcAddress('glMultiTexCoord3fARB'); + if not Assigned(glMultiTexCoord3fARB) then Exit; + glMultiTexCoord3fvARB := wglGetProcAddress('glMultiTexCoord3fvARB'); + if not Assigned(glMultiTexCoord3fvARB) then Exit; + glMultiTexCoord3iARB := wglGetProcAddress('glMultiTexCoord3iARB'); + if not Assigned(glMultiTexCoord3iARB) then Exit; + glMultiTexCoord3ivARB := wglGetProcAddress('glMultiTexCoord3ivARB'); + if not Assigned(glMultiTexCoord3ivARB) then Exit; + glMultiTexCoord3sARB := wglGetProcAddress('glMultiTexCoord3sARB'); + if not Assigned(glMultiTexCoord3sARB) then Exit; + glMultiTexCoord3svARB := wglGetProcAddress('glMultiTexCoord3svARB'); + if not Assigned(glMultiTexCoord3svARB) then Exit; + glMultiTexCoord4dARB := wglGetProcAddress('glMultiTexCoord4dARB'); + if not Assigned(glMultiTexCoord4dARB) then Exit; + glMultiTexCoord4dvARB := wglGetProcAddress('glMultiTexCoord4dvARB'); + if not Assigned(glMultiTexCoord4dvARB) then Exit; + glMultiTexCoord4fARB := wglGetProcAddress('glMultiTexCoord4fARB'); + if not Assigned(glMultiTexCoord4fARB) then Exit; + glMultiTexCoord4fvARB := wglGetProcAddress('glMultiTexCoord4fvARB'); + if not Assigned(glMultiTexCoord4fvARB) then Exit; + glMultiTexCoord4iARB := wglGetProcAddress('glMultiTexCoord4iARB'); + if not Assigned(glMultiTexCoord4iARB) then Exit; + glMultiTexCoord4ivARB := wglGetProcAddress('glMultiTexCoord4ivARB'); + if not Assigned(glMultiTexCoord4ivARB) then Exit; + glMultiTexCoord4sARB := wglGetProcAddress('glMultiTexCoord4sARB'); + if not Assigned(glMultiTexCoord4sARB) then Exit; + glMultiTexCoord4svARB := wglGetProcAddress('glMultiTexCoord4svARB'); + if not Assigned(glMultiTexCoord4svARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_transpose_matrix: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_transpose_matrix', extstring) then + begin + glLoadTransposeMatrixfARB := wglGetProcAddress('glLoadTransposeMatrixfARB'); + if not Assigned(glLoadTransposeMatrixfARB) then Exit; + glLoadTransposeMatrixdARB := wglGetProcAddress('glLoadTransposeMatrixdARB'); + if not Assigned(glLoadTransposeMatrixdARB) then Exit; + glMultTransposeMatrixfARB := wglGetProcAddress('glMultTransposeMatrixfARB'); + if not Assigned(glMultTransposeMatrixfARB) then Exit; + glMultTransposeMatrixdARB := wglGetProcAddress('glMultTransposeMatrixdARB'); + if not Assigned(glMultTransposeMatrixdARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_multisample: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_multisample', extstring) then + begin + glSampleCoverageARB := wglGetProcAddress('glSampleCoverageARB'); + if not Assigned(glSampleCoverageARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_env_add: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_env_add', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_WGL_ARB_extensions_string: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_ARB_extensions_string', extstring) then + begin + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_ARB_buffer_region: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_ARB_buffer_region', extstring) then + begin + wglCreateBufferRegionARB := wglGetProcAddress('wglCreateBufferRegionARB'); + if not Assigned(wglCreateBufferRegionARB) then Exit; + wglDeleteBufferRegionARB := wglGetProcAddress('wglDeleteBufferRegionARB'); + if not Assigned(wglDeleteBufferRegionARB) then Exit; + wglSaveBufferRegionARB := wglGetProcAddress('wglSaveBufferRegionARB'); + if not Assigned(wglSaveBufferRegionARB) then Exit; + wglRestoreBufferRegionARB := wglGetProcAddress('wglRestoreBufferRegionARB'); + if not Assigned(wglRestoreBufferRegionARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_cube_map: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_cube_map', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_depth_texture: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_depth_texture', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_point_parameters: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_point_parameters', extstring) then + begin + glPointParameterfARB := wglGetProcAddress('glPointParameterfARB'); + if not Assigned(glPointParameterfARB) then Exit; + glPointParameterfvARB := wglGetProcAddress('glPointParameterfvARB'); + if not Assigned(glPointParameterfvARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_shadow: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_shadow', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_shadow_ambient: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_shadow_ambient', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_border_clamp: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_border_clamp', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_compression: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_compression', extstring) then + begin + glCompressedTexImage3DARB := wglGetProcAddress('glCompressedTexImage3DARB'); + if not Assigned(glCompressedTexImage3DARB) then Exit; + glCompressedTexImage2DARB := wglGetProcAddress('glCompressedTexImage2DARB'); + if not Assigned(glCompressedTexImage2DARB) then Exit; + glCompressedTexImage1DARB := wglGetProcAddress('glCompressedTexImage1DARB'); + if not Assigned(glCompressedTexImage1DARB) then Exit; + glCompressedTexSubImage3DARB := wglGetProcAddress('glCompressedTexSubImage3DARB'); + if not Assigned(glCompressedTexSubImage3DARB) then Exit; + glCompressedTexSubImage2DARB := wglGetProcAddress('glCompressedTexSubImage2DARB'); + if not Assigned(glCompressedTexSubImage2DARB) then Exit; + glCompressedTexSubImage1DARB := wglGetProcAddress('glCompressedTexSubImage1DARB'); + if not Assigned(glCompressedTexSubImage1DARB) then Exit; + glGetCompressedTexImageARB := wglGetProcAddress('glGetCompressedTexImageARB'); + if not Assigned(glGetCompressedTexImageARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_env_combine: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_env_combine', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_env_crossbar: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_env_crossbar', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_env_dot3: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_env_dot3', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_mirrored_repeat: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_mirrored_repeat', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_vertex_blend: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_vertex_blend', extstring) then + begin + glWeightbvARB := wglGetProcAddress('glWeightbvARB'); + if not Assigned(glWeightbvARB) then Exit; + glWeightsvARB := wglGetProcAddress('glWeightsvARB'); + if not Assigned(glWeightsvARB) then Exit; + glWeightivARB := wglGetProcAddress('glWeightivARB'); + if not Assigned(glWeightivARB) then Exit; + glWeightfvARB := wglGetProcAddress('glWeightfvARB'); + if not Assigned(glWeightfvARB) then Exit; + glWeightdvARB := wglGetProcAddress('glWeightdvARB'); + if not Assigned(glWeightdvARB) then Exit; + glWeightvARB := wglGetProcAddress('glWeightvARB'); + if not Assigned(glWeightvARB) then Exit; + glWeightubvARB := wglGetProcAddress('glWeightubvARB'); + if not Assigned(glWeightubvARB) then Exit; + glWeightusvARB := wglGetProcAddress('glWeightusvARB'); + if not Assigned(glWeightusvARB) then Exit; + glWeightuivARB := wglGetProcAddress('glWeightuivARB'); + if not Assigned(glWeightuivARB) then Exit; + glWeightPointerARB := wglGetProcAddress('glWeightPointerARB'); + if not Assigned(glWeightPointerARB) then Exit; + glVertexBlendARB := wglGetProcAddress('glVertexBlendARB'); + if not Assigned(glVertexBlendARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_vertex_program: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_vertex_program', extstring) then + begin + glVertexAttrib1sARB := wglGetProcAddress('glVertexAttrib1sARB'); + if not Assigned(glVertexAttrib1sARB) then Exit; + glVertexAttrib1fARB := wglGetProcAddress('glVertexAttrib1fARB'); + if not Assigned(glVertexAttrib1fARB) then Exit; + glVertexAttrib1dARB := wglGetProcAddress('glVertexAttrib1dARB'); + if not Assigned(glVertexAttrib1dARB) then Exit; + glVertexAttrib2sARB := wglGetProcAddress('glVertexAttrib2sARB'); + if not Assigned(glVertexAttrib2sARB) then Exit; + glVertexAttrib2fARB := wglGetProcAddress('glVertexAttrib2fARB'); + if not Assigned(glVertexAttrib2fARB) then Exit; + glVertexAttrib2dARB := wglGetProcAddress('glVertexAttrib2dARB'); + if not Assigned(glVertexAttrib2dARB) then Exit; + glVertexAttrib3sARB := wglGetProcAddress('glVertexAttrib3sARB'); + if not Assigned(glVertexAttrib3sARB) then Exit; + glVertexAttrib3fARB := wglGetProcAddress('glVertexAttrib3fARB'); + if not Assigned(glVertexAttrib3fARB) then Exit; + glVertexAttrib3dARB := wglGetProcAddress('glVertexAttrib3dARB'); + if not Assigned(glVertexAttrib3dARB) then Exit; + glVertexAttrib4sARB := wglGetProcAddress('glVertexAttrib4sARB'); + if not Assigned(glVertexAttrib4sARB) then Exit; + glVertexAttrib4fARB := wglGetProcAddress('glVertexAttrib4fARB'); + if not Assigned(glVertexAttrib4fARB) then Exit; + glVertexAttrib4dARB := wglGetProcAddress('glVertexAttrib4dARB'); + if not Assigned(glVertexAttrib4dARB) then Exit; + glVertexAttrib4NubARB := wglGetProcAddress('glVertexAttrib4NubARB'); + if not Assigned(glVertexAttrib4NubARB) then Exit; + glVertexAttrib1svARB := wglGetProcAddress('glVertexAttrib1svARB'); + if not Assigned(glVertexAttrib1svARB) then Exit; + glVertexAttrib1fvARB := wglGetProcAddress('glVertexAttrib1fvARB'); + if not Assigned(glVertexAttrib1fvARB) then Exit; + glVertexAttrib1dvARB := wglGetProcAddress('glVertexAttrib1dvARB'); + if not Assigned(glVertexAttrib1dvARB) then Exit; + glVertexAttrib2svARB := wglGetProcAddress('glVertexAttrib2svARB'); + if not Assigned(glVertexAttrib2svARB) then Exit; + glVertexAttrib2fvARB := wglGetProcAddress('glVertexAttrib2fvARB'); + if not Assigned(glVertexAttrib2fvARB) then Exit; + glVertexAttrib2dvARB := wglGetProcAddress('glVertexAttrib2dvARB'); + if not Assigned(glVertexAttrib2dvARB) then Exit; + glVertexAttrib3svARB := wglGetProcAddress('glVertexAttrib3svARB'); + if not Assigned(glVertexAttrib3svARB) then Exit; + glVertexAttrib3fvARB := wglGetProcAddress('glVertexAttrib3fvARB'); + if not Assigned(glVertexAttrib3fvARB) then Exit; + glVertexAttrib3dvARB := wglGetProcAddress('glVertexAttrib3dvARB'); + if not Assigned(glVertexAttrib3dvARB) then Exit; + glVertexAttrib4bvARB := wglGetProcAddress('glVertexAttrib4bvARB'); + if not Assigned(glVertexAttrib4bvARB) then Exit; + glVertexAttrib4svARB := wglGetProcAddress('glVertexAttrib4svARB'); + if not Assigned(glVertexAttrib4svARB) then Exit; + glVertexAttrib4ivARB := wglGetProcAddress('glVertexAttrib4ivARB'); + if not Assigned(glVertexAttrib4ivARB) then Exit; + glVertexAttrib4ubvARB := wglGetProcAddress('glVertexAttrib4ubvARB'); + if not Assigned(glVertexAttrib4ubvARB) then Exit; + glVertexAttrib4usvARB := wglGetProcAddress('glVertexAttrib4usvARB'); + if not Assigned(glVertexAttrib4usvARB) then Exit; + glVertexAttrib4uivARB := wglGetProcAddress('glVertexAttrib4uivARB'); + if not Assigned(glVertexAttrib4uivARB) then Exit; + glVertexAttrib4fvARB := wglGetProcAddress('glVertexAttrib4fvARB'); + if not Assigned(glVertexAttrib4fvARB) then Exit; + glVertexAttrib4dvARB := wglGetProcAddress('glVertexAttrib4dvARB'); + if not Assigned(glVertexAttrib4dvARB) then Exit; + glVertexAttrib4NbvARB := wglGetProcAddress('glVertexAttrib4NbvARB'); + if not Assigned(glVertexAttrib4NbvARB) then Exit; + glVertexAttrib4NsvARB := wglGetProcAddress('glVertexAttrib4NsvARB'); + if not Assigned(glVertexAttrib4NsvARB) then Exit; + glVertexAttrib4NivARB := wglGetProcAddress('glVertexAttrib4NivARB'); + if not Assigned(glVertexAttrib4NivARB) then Exit; + glVertexAttrib4NubvARB := wglGetProcAddress('glVertexAttrib4NubvARB'); + if not Assigned(glVertexAttrib4NubvARB) then Exit; + glVertexAttrib4NusvARB := wglGetProcAddress('glVertexAttrib4NusvARB'); + if not Assigned(glVertexAttrib4NusvARB) then Exit; + glVertexAttrib4NuivARB := wglGetProcAddress('glVertexAttrib4NuivARB'); + if not Assigned(glVertexAttrib4NuivARB) then Exit; + glVertexAttribPointerARB := wglGetProcAddress('glVertexAttribPointerARB'); + if not Assigned(glVertexAttribPointerARB) then Exit; + glEnableVertexAttribArrayARB := wglGetProcAddress('glEnableVertexAttribArrayARB'); + if not Assigned(glEnableVertexAttribArrayARB) then Exit; + glDisableVertexAttribArrayARB := wglGetProcAddress('glDisableVertexAttribArrayARB'); + if not Assigned(glDisableVertexAttribArrayARB) then Exit; + glProgramStringARB := wglGetProcAddress('glProgramStringARB'); + if not Assigned(glProgramStringARB) then Exit; + glBindProgramARB := wglGetProcAddress('glBindProgramARB'); + if not Assigned(glBindProgramARB) then Exit; + glDeleteProgramsARB := wglGetProcAddress('glDeleteProgramsARB'); + if not Assigned(glDeleteProgramsARB) then Exit; + glGenProgramsARB := wglGetProcAddress('glGenProgramsARB'); + if not Assigned(glGenProgramsARB) then Exit; + glProgramEnvParameter4dARB := wglGetProcAddress('glProgramEnvParameter4dARB'); + if not Assigned(glProgramEnvParameter4dARB) then Exit; + glProgramEnvParameter4dvARB := wglGetProcAddress('glProgramEnvParameter4dvARB'); + if not Assigned(glProgramEnvParameter4dvARB) then Exit; + glProgramEnvParameter4fARB := wglGetProcAddress('glProgramEnvParameter4fARB'); + if not Assigned(glProgramEnvParameter4fARB) then Exit; + glProgramEnvParameter4fvARB := wglGetProcAddress('glProgramEnvParameter4fvARB'); + if not Assigned(glProgramEnvParameter4fvARB) then Exit; + glProgramLocalParameter4dARB := wglGetProcAddress('glProgramLocalParameter4dARB'); + if not Assigned(glProgramLocalParameter4dARB) then Exit; + glProgramLocalParameter4dvARB := wglGetProcAddress('glProgramLocalParameter4dvARB'); + if not Assigned(glProgramLocalParameter4dvARB) then Exit; + glProgramLocalParameter4fARB := wglGetProcAddress('glProgramLocalParameter4fARB'); + if not Assigned(glProgramLocalParameter4fARB) then Exit; + glProgramLocalParameter4fvARB := wglGetProcAddress('glProgramLocalParameter4fvARB'); + if not Assigned(glProgramLocalParameter4fvARB) then Exit; + glGetProgramEnvParameterdvARB := wglGetProcAddress('glGetProgramEnvParameterdvARB'); + if not Assigned(glGetProgramEnvParameterdvARB) then Exit; + glGetProgramEnvParameterfvARB := wglGetProcAddress('glGetProgramEnvParameterfvARB'); + if not Assigned(glGetProgramEnvParameterfvARB) then Exit; + glGetProgramLocalParameterdvARB := wglGetProcAddress('glGetProgramLocalParameterdvARB'); + if not Assigned(glGetProgramLocalParameterdvARB) then Exit; + glGetProgramLocalParameterfvARB := wglGetProcAddress('glGetProgramLocalParameterfvARB'); + if not Assigned(glGetProgramLocalParameterfvARB) then Exit; + glGetProgramivARB := wglGetProcAddress('glGetProgramivARB'); + if not Assigned(glGetProgramivARB) then Exit; + glGetProgramStringARB := wglGetProcAddress('glGetProgramStringARB'); + if not Assigned(glGetProgramStringARB) then Exit; + glGetVertexAttribdvARB := wglGetProcAddress('glGetVertexAttribdvARB'); + if not Assigned(glGetVertexAttribdvARB) then Exit; + glGetVertexAttribfvARB := wglGetProcAddress('glGetVertexAttribfvARB'); + if not Assigned(glGetVertexAttribfvARB) then Exit; + glGetVertexAttribivARB := wglGetProcAddress('glGetVertexAttribivARB'); + if not Assigned(glGetVertexAttribivARB) then Exit; + glGetVertexAttribPointervARB := wglGetProcAddress('glGetVertexAttribPointervARB'); + if not Assigned(glGetVertexAttribPointervARB) then Exit; + glIsProgramARB := wglGetProcAddress('glIsProgramARB'); + if not Assigned(glIsProgramARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_window_pos: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_window_pos', extstring) then + begin + glWindowPos2dARB := wglGetProcAddress('glWindowPos2dARB'); + if not Assigned(glWindowPos2dARB) then Exit; + glWindowPos2fARB := wglGetProcAddress('glWindowPos2fARB'); + if not Assigned(glWindowPos2fARB) then Exit; + glWindowPos2iARB := wglGetProcAddress('glWindowPos2iARB'); + if not Assigned(glWindowPos2iARB) then Exit; + glWindowPos2sARB := wglGetProcAddress('glWindowPos2sARB'); + if not Assigned(glWindowPos2sARB) then Exit; + glWindowPos2dvARB := wglGetProcAddress('glWindowPos2dvARB'); + if not Assigned(glWindowPos2dvARB) then Exit; + glWindowPos2fvARB := wglGetProcAddress('glWindowPos2fvARB'); + if not Assigned(glWindowPos2fvARB) then Exit; + glWindowPos2ivARB := wglGetProcAddress('glWindowPos2ivARB'); + if not Assigned(glWindowPos2ivARB) then Exit; + glWindowPos2svARB := wglGetProcAddress('glWindowPos2svARB'); + if not Assigned(glWindowPos2svARB) then Exit; + glWindowPos3dARB := wglGetProcAddress('glWindowPos3dARB'); + if not Assigned(glWindowPos3dARB) then Exit; + glWindowPos3fARB := wglGetProcAddress('glWindowPos3fARB'); + if not Assigned(glWindowPos3fARB) then Exit; + glWindowPos3iARB := wglGetProcAddress('glWindowPos3iARB'); + if not Assigned(glWindowPos3iARB) then Exit; + glWindowPos3sARB := wglGetProcAddress('glWindowPos3sARB'); + if not Assigned(glWindowPos3sARB) then Exit; + glWindowPos3dvARB := wglGetProcAddress('glWindowPos3dvARB'); + if not Assigned(glWindowPos3dvARB) then Exit; + glWindowPos3fvARB := wglGetProcAddress('glWindowPos3fvARB'); + if not Assigned(glWindowPos3fvARB) then Exit; + glWindowPos3ivARB := wglGetProcAddress('glWindowPos3ivARB'); + if not Assigned(glWindowPos3ivARB) then Exit; + glWindowPos3svARB := wglGetProcAddress('glWindowPos3svARB'); + if not Assigned(glWindowPos3svARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_422_pixels: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_422_pixels', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_abgr: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_abgr', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_bgra: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_bgra', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_blend_color: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_blend_color', extstring) then + begin + glBlendColorEXT := wglGetProcAddress('glBlendColorEXT'); + if not Assigned(glBlendColorEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_blend_func_separate: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_blend_func_separate', extstring) then + begin + glBlendFuncSeparateEXT := wglGetProcAddress('glBlendFuncSeparateEXT'); + if not Assigned(glBlendFuncSeparateEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_blend_logic_op: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_blend_logic_op', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_blend_minmax: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_blend_minmax', extstring) then + begin + glBlendEquationEXT := wglGetProcAddress('glBlendEquationEXT'); + if not Assigned(glBlendEquationEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_blend_subtract: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_blend_subtract', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_clip_volume_hint: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_clip_volume_hint', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_color_subtable: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_color_subtable', extstring) then + begin + glColorSubTableEXT := wglGetProcAddress('glColorSubTableEXT'); + if not Assigned(glColorSubTableEXT) then Exit; + glCopyColorSubTableEXT := wglGetProcAddress('glCopyColorSubTableEXT'); + if not Assigned(glCopyColorSubTableEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_compiled_vertex_array: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_compiled_vertex_array', extstring) then + begin + glLockArraysEXT := wglGetProcAddress('glLockArraysEXT'); + if not Assigned(glLockArraysEXT) then Exit; + glUnlockArraysEXT := wglGetProcAddress('glUnlockArraysEXT'); + if not Assigned(glUnlockArraysEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_convolution: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_convolution', extstring) then + begin + glConvolutionFilter1DEXT := wglGetProcAddress('glConvolutionFilter1DEXT'); + if not Assigned(glConvolutionFilter1DEXT) then Exit; + glConvolutionFilter2DEXT := wglGetProcAddress('glConvolutionFilter2DEXT'); + if not Assigned(glConvolutionFilter2DEXT) then Exit; + glCopyConvolutionFilter1DEXT := wglGetProcAddress('glCopyConvolutionFilter1DEXT'); + if not Assigned(glCopyConvolutionFilter1DEXT) then Exit; + glCopyConvolutionFilter2DEXT := wglGetProcAddress('glCopyConvolutionFilter2DEXT'); + if not Assigned(glCopyConvolutionFilter2DEXT) then Exit; + glGetConvolutionFilterEXT := wglGetProcAddress('glGetConvolutionFilterEXT'); + if not Assigned(glGetConvolutionFilterEXT) then Exit; + glSeparableFilter2DEXT := wglGetProcAddress('glSeparableFilter2DEXT'); + if not Assigned(glSeparableFilter2DEXT) then Exit; + glGetSeparableFilterEXT := wglGetProcAddress('glGetSeparableFilterEXT'); + if not Assigned(glGetSeparableFilterEXT) then Exit; + glConvolutionParameteriEXT := wglGetProcAddress('glConvolutionParameteriEXT'); + if not Assigned(glConvolutionParameteriEXT) then Exit; + glConvolutionParameterivEXT := wglGetProcAddress('glConvolutionParameterivEXT'); + if not Assigned(glConvolutionParameterivEXT) then Exit; + glConvolutionParameterfEXT := wglGetProcAddress('glConvolutionParameterfEXT'); + if not Assigned(glConvolutionParameterfEXT) then Exit; + glConvolutionParameterfvEXT := wglGetProcAddress('glConvolutionParameterfvEXT'); + if not Assigned(glConvolutionParameterfvEXT) then Exit; + glGetConvolutionParameterivEXT := wglGetProcAddress('glGetConvolutionParameterivEXT'); + if not Assigned(glGetConvolutionParameterivEXT) then Exit; + glGetConvolutionParameterfvEXT := wglGetProcAddress('glGetConvolutionParameterfvEXT'); + if not Assigned(glGetConvolutionParameterfvEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_histogram: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_histogram', extstring) then + begin + glHistogramEXT := wglGetProcAddress('glHistogramEXT'); + if not Assigned(glHistogramEXT) then Exit; + glResetHistogramEXT := wglGetProcAddress('glResetHistogramEXT'); + if not Assigned(glResetHistogramEXT) then Exit; + glGetHistogramEXT := wglGetProcAddress('glGetHistogramEXT'); + if not Assigned(glGetHistogramEXT) then Exit; + glGetHistogramParameterivEXT := wglGetProcAddress('glGetHistogramParameterivEXT'); + if not Assigned(glGetHistogramParameterivEXT) then Exit; + glGetHistogramParameterfvEXT := wglGetProcAddress('glGetHistogramParameterfvEXT'); + if not Assigned(glGetHistogramParameterfvEXT) then Exit; + glMinmaxEXT := wglGetProcAddress('glMinmaxEXT'); + if not Assigned(glMinmaxEXT) then Exit; + glResetMinmaxEXT := wglGetProcAddress('glResetMinmaxEXT'); + if not Assigned(glResetMinmaxEXT) then Exit; + glGetMinmaxEXT := wglGetProcAddress('glGetMinmaxEXT'); + if not Assigned(glGetMinmaxEXT) then Exit; + glGetMinmaxParameterivEXT := wglGetProcAddress('glGetMinmaxParameterivEXT'); + if not Assigned(glGetMinmaxParameterivEXT) then Exit; + glGetMinmaxParameterfvEXT := wglGetProcAddress('glGetMinmaxParameterfvEXT'); + if not Assigned(glGetMinmaxParameterfvEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_multi_draw_arrays: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_multi_draw_arrays', extstring) then + begin + glMultiDrawArraysEXT := wglGetProcAddress('glMultiDrawArraysEXT'); + if not Assigned(glMultiDrawArraysEXT) then Exit; + glMultiDrawElementsEXT := wglGetProcAddress('glMultiDrawElementsEXT'); + if not Assigned(glMultiDrawElementsEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_packed_pixels: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_packed_pixels', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_paletted_texture: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_paletted_texture', extstring) then + begin + glColorTableEXT := wglGetProcAddress('glColorTableEXT'); + if not Assigned(glColorTableEXT) then Exit; + glColorSubTableEXT := wglGetProcAddress('glColorSubTableEXT'); + if not Assigned(glColorSubTableEXT) then Exit; + glGetColorTableEXT := wglGetProcAddress('glGetColorTableEXT'); + if not Assigned(glGetColorTableEXT) then Exit; + glGetColorTableParameterivEXT := wglGetProcAddress('glGetColorTableParameterivEXT'); + if not Assigned(glGetColorTableParameterivEXT) then Exit; + glGetColorTableParameterfvEXT := wglGetProcAddress('glGetColorTableParameterfvEXT'); + if not Assigned(glGetColorTableParameterfvEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_point_parameters: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_point_parameters', extstring) then + begin + glPointParameterfEXT := wglGetProcAddress('glPointParameterfEXT'); + if not Assigned(glPointParameterfEXT) then Exit; + glPointParameterfvEXT := wglGetProcAddress('glPointParameterfvEXT'); + if not Assigned(glPointParameterfvEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_polygon_offset: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_polygon_offset', extstring) then + begin + glPolygonOffsetEXT := wglGetProcAddress('glPolygonOffsetEXT'); + if not Assigned(glPolygonOffsetEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_separate_specular_color: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_separate_specular_color', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_shadow_funcs: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_shadow_funcs', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_shared_texture_palette: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_shared_texture_palette', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_stencil_two_side: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_stencil_two_side', extstring) then + begin + glActiveStencilFaceEXT := wglGetProcAddress('glActiveStencilFaceEXT'); + if not Assigned(glActiveStencilFaceEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_stencil_wrap: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_stencil_wrap', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_subtexture: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_subtexture', extstring) then + begin + glTexSubImage1DEXT := wglGetProcAddress('glTexSubImage1DEXT'); + if not Assigned(glTexSubImage1DEXT) then Exit; + glTexSubImage2DEXT := wglGetProcAddress('glTexSubImage2DEXT'); + if not Assigned(glTexSubImage2DEXT) then Exit; + glTexSubImage3DEXT := wglGetProcAddress('glTexSubImage3DEXT'); + if not Assigned(glTexSubImage3DEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture3D: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture3D', extstring) then + begin + glTexImage3DEXT := wglGetProcAddress('glTexImage3DEXT'); + if not Assigned(glTexImage3DEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture_compression_s3tc: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture_compression_s3tc', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture_env_add: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture_env_add', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture_env_combine: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture_env_combine', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture_env_dot3: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture_env_dot3', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture_filter_anisotropic: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture_filter_anisotropic', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture_lod_bias: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture_lod_bias', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture_object: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture_object', extstring) then + begin + glGenTexturesEXT := wglGetProcAddress('glGenTexturesEXT'); + if not Assigned(glGenTexturesEXT) then Exit; + glDeleteTexturesEXT := wglGetProcAddress('glDeleteTexturesEXT'); + if not Assigned(glDeleteTexturesEXT) then Exit; + glBindTextureEXT := wglGetProcAddress('glBindTextureEXT'); + if not Assigned(glBindTextureEXT) then Exit; + glPrioritizeTexturesEXT := wglGetProcAddress('glPrioritizeTexturesEXT'); + if not Assigned(glPrioritizeTexturesEXT) then Exit; + glAreTexturesResidentEXT := wglGetProcAddress('glAreTexturesResidentEXT'); + if not Assigned(glAreTexturesResidentEXT) then Exit; + glIsTextureEXT := wglGetProcAddress('glIsTextureEXT'); + if not Assigned(glIsTextureEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_vertex_array: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_vertex_array', extstring) then + begin + glArrayElementEXT := wglGetProcAddress('glArrayElementEXT'); + if not Assigned(glArrayElementEXT) then Exit; + glDrawArraysEXT := wglGetProcAddress('glDrawArraysEXT'); + if not Assigned(glDrawArraysEXT) then Exit; + glVertexPointerEXT := wglGetProcAddress('glVertexPointerEXT'); + if not Assigned(glVertexPointerEXT) then Exit; + glNormalPointerEXT := wglGetProcAddress('glNormalPointerEXT'); + if not Assigned(glNormalPointerEXT) then Exit; + glColorPointerEXT := wglGetProcAddress('glColorPointerEXT'); + if not Assigned(glColorPointerEXT) then Exit; + glIndexPointerEXT := wglGetProcAddress('glIndexPointerEXT'); + if not Assigned(glIndexPointerEXT) then Exit; + glTexCoordPointerEXT := wglGetProcAddress('glTexCoordPointerEXT'); + if not Assigned(glTexCoordPointerEXT) then Exit; + glEdgeFlagPointerEXT := wglGetProcAddress('glEdgeFlagPointerEXT'); + if not Assigned(glEdgeFlagPointerEXT) then Exit; + glGetPointervEXT := wglGetProcAddress('glGetPointervEXT'); + if not Assigned(glGetPointervEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_vertex_shader: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_vertex_shader', extstring) then + begin + glBeginVertexShaderEXT := wglGetProcAddress('glBeginVertexShaderEXT'); + if not Assigned(glBeginVertexShaderEXT) then Exit; + glEndVertexShaderEXT := wglGetProcAddress('glEndVertexShaderEXT'); + if not Assigned(glEndVertexShaderEXT) then Exit; + glBindVertexShaderEXT := wglGetProcAddress('glBindVertexShaderEXT'); + if not Assigned(glBindVertexShaderEXT) then Exit; + glGenVertexShadersEXT := wglGetProcAddress('glGenVertexShadersEXT'); + if not Assigned(glGenVertexShadersEXT) then Exit; + glDeleteVertexShaderEXT := wglGetProcAddress('glDeleteVertexShaderEXT'); + if not Assigned(glDeleteVertexShaderEXT) then Exit; + glShaderOp1EXT := wglGetProcAddress('glShaderOp1EXT'); + if not Assigned(glShaderOp1EXT) then Exit; + glShaderOp2EXT := wglGetProcAddress('glShaderOp2EXT'); + if not Assigned(glShaderOp2EXT) then Exit; + glShaderOp3EXT := wglGetProcAddress('glShaderOp3EXT'); + if not Assigned(glShaderOp3EXT) then Exit; + glSwizzleEXT := wglGetProcAddress('glSwizzleEXT'); + if not Assigned(glSwizzleEXT) then Exit; + glWriteMaskEXT := wglGetProcAddress('glWriteMaskEXT'); + if not Assigned(glWriteMaskEXT) then Exit; + glInsertComponentEXT := wglGetProcAddress('glInsertComponentEXT'); + if not Assigned(glInsertComponentEXT) then Exit; + glExtractComponentEXT := wglGetProcAddress('glExtractComponentEXT'); + if not Assigned(glExtractComponentEXT) then Exit; + glGenSymbolsEXT := wglGetProcAddress('glGenSymbolsEXT'); + if not Assigned(glGenSymbolsEXT) then Exit; + glSetInvariantEXT := wglGetProcAddress('glSetInvariantEXT'); + if not Assigned(glSetInvariantEXT) then Exit; + glSetLocalConstantEXT := wglGetProcAddress('glSetLocalConstantEXT'); + if not Assigned(glSetLocalConstantEXT) then Exit; + glVariantbvEXT := wglGetProcAddress('glVariantbvEXT'); + if not Assigned(glVariantbvEXT) then Exit; + glVariantsvEXT := wglGetProcAddress('glVariantsvEXT'); + if not Assigned(glVariantsvEXT) then Exit; + glVariantivEXT := wglGetProcAddress('glVariantivEXT'); + if not Assigned(glVariantivEXT) then Exit; + glVariantfvEXT := wglGetProcAddress('glVariantfvEXT'); + if not Assigned(glVariantfvEXT) then Exit; + glVariantdvEXT := wglGetProcAddress('glVariantdvEXT'); + if not Assigned(glVariantdvEXT) then Exit; + glVariantubvEXT := wglGetProcAddress('glVariantubvEXT'); + if not Assigned(glVariantubvEXT) then Exit; + glVariantusvEXT := wglGetProcAddress('glVariantusvEXT'); + if not Assigned(glVariantusvEXT) then Exit; + glVariantuivEXT := wglGetProcAddress('glVariantuivEXT'); + if not Assigned(glVariantuivEXT) then Exit; + glVariantPointerEXT := wglGetProcAddress('glVariantPointerEXT'); + if not Assigned(glVariantPointerEXT) then Exit; + glEnableVariantClientStateEXT := wglGetProcAddress('glEnableVariantClientStateEXT'); + if not Assigned(glEnableVariantClientStateEXT) then Exit; + glDisableVariantClientStateEXT := wglGetProcAddress('glDisableVariantClientStateEXT'); + if not Assigned(glDisableVariantClientStateEXT) then Exit; + glBindLightParameterEXT := wglGetProcAddress('glBindLightParameterEXT'); + if not Assigned(glBindLightParameterEXT) then Exit; + glBindMaterialParameterEXT := wglGetProcAddress('glBindMaterialParameterEXT'); + if not Assigned(glBindMaterialParameterEXT) then Exit; + glBindTexGenParameterEXT := wglGetProcAddress('glBindTexGenParameterEXT'); + if not Assigned(glBindTexGenParameterEXT) then Exit; + glBindTextureUnitParameterEXT := wglGetProcAddress('glBindTextureUnitParameterEXT'); + if not Assigned(glBindTextureUnitParameterEXT) then Exit; + glBindParameterEXT := wglGetProcAddress('glBindParameterEXT'); + if not Assigned(glBindParameterEXT) then Exit; + glIsVariantEnabledEXT := wglGetProcAddress('glIsVariantEnabledEXT'); + if not Assigned(glIsVariantEnabledEXT) then Exit; + glGetVariantBooleanvEXT := wglGetProcAddress('glGetVariantBooleanvEXT'); + if not Assigned(glGetVariantBooleanvEXT) then Exit; + glGetVariantIntegervEXT := wglGetProcAddress('glGetVariantIntegervEXT'); + if not Assigned(glGetVariantIntegervEXT) then Exit; + glGetVariantFloatvEXT := wglGetProcAddress('glGetVariantFloatvEXT'); + if not Assigned(glGetVariantFloatvEXT) then Exit; + glGetVariantPointervEXT := wglGetProcAddress('glGetVariantPointervEXT'); + if not Assigned(glGetVariantPointervEXT) then Exit; + glGetInvariantBooleanvEXT := wglGetProcAddress('glGetInvariantBooleanvEXT'); + if not Assigned(glGetInvariantBooleanvEXT) then Exit; + glGetInvariantIntegervEXT := wglGetProcAddress('glGetInvariantIntegervEXT'); + if not Assigned(glGetInvariantIntegervEXT) then Exit; + glGetInvariantFloatvEXT := wglGetProcAddress('glGetInvariantFloatvEXT'); + if not Assigned(glGetInvariantFloatvEXT) then Exit; + glGetLocalConstantBooleanvEXT := wglGetProcAddress('glGetLocalConstantBooleanvEXT'); + if not Assigned(glGetLocalConstantBooleanvEXT) then Exit; + glGetLocalConstantIntegervEXT := wglGetProcAddress('glGetLocalConstantIntegervEXT'); + if not Assigned(glGetLocalConstantIntegervEXT) then Exit; + glGetLocalConstantFloatvEXT := wglGetProcAddress('glGetLocalConstantFloatvEXT'); + if not Assigned(glGetLocalConstantFloatvEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_vertex_weighting: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_vertex_weighting', extstring) then + begin + glVertexWeightfEXT := wglGetProcAddress('glVertexWeightfEXT'); + if not Assigned(glVertexWeightfEXT) then Exit; + glVertexWeightfvEXT := wglGetProcAddress('glVertexWeightfvEXT'); + if not Assigned(glVertexWeightfvEXT) then Exit; + glVertexWeightPointerEXT := wglGetProcAddress('glVertexWeightPointerEXT'); + if not Assigned(glVertexWeightPointerEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_HP_occlusion_test: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_HP_occlusion_test', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_blend_square: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_blend_square', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_copy_depth_to_color: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_copy_depth_to_color', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_depth_clamp: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_depth_clamp', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_evaluators: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_evaluators', extstring) then + begin + glMapControlPointsNV := wglGetProcAddress('glMapControlPointsNV'); + if not Assigned(glMapControlPointsNV) then Exit; + glMapParameterivNV := wglGetProcAddress('glMapParameterivNV'); + if not Assigned(glMapParameterivNV) then Exit; + glMapParameterfvNV := wglGetProcAddress('glMapParameterfvNV'); + if not Assigned(glMapParameterfvNV) then Exit; + glGetMapControlPointsNV := wglGetProcAddress('glGetMapControlPointsNV'); + if not Assigned(glGetMapControlPointsNV) then Exit; + glGetMapParameterivNV := wglGetProcAddress('glGetMapParameterivNV'); + if not Assigned(glGetMapParameterivNV) then Exit; + glGetMapParameterfvNV := wglGetProcAddress('glGetMapParameterfvNV'); + if not Assigned(glGetMapParameterfvNV) then Exit; + glGetMapAttribParameterivNV := wglGetProcAddress('glGetMapAttribParameterivNV'); + if not Assigned(glGetMapAttribParameterivNV) then Exit; + glGetMapAttribParameterfvNV := wglGetProcAddress('glGetMapAttribParameterfvNV'); + if not Assigned(glGetMapAttribParameterfvNV) then Exit; + glEvalMapsNV := wglGetProcAddress('glEvalMapsNV'); + if not Assigned(glEvalMapsNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_fence: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_fence', extstring) then + begin + glGenFencesNV := wglGetProcAddress('glGenFencesNV'); + if not Assigned(glGenFencesNV) then Exit; + glDeleteFencesNV := wglGetProcAddress('glDeleteFencesNV'); + if not Assigned(glDeleteFencesNV) then Exit; + glSetFenceNV := wglGetProcAddress('glSetFenceNV'); + if not Assigned(glSetFenceNV) then Exit; + glTestFenceNV := wglGetProcAddress('glTestFenceNV'); + if not Assigned(glTestFenceNV) then Exit; + glFinishFenceNV := wglGetProcAddress('glFinishFenceNV'); + if not Assigned(glFinishFenceNV) then Exit; + glIsFenceNV := wglGetProcAddress('glIsFenceNV'); + if not Assigned(glIsFenceNV) then Exit; + glGetFenceivNV := wglGetProcAddress('glGetFenceivNV'); + if not Assigned(glGetFenceivNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_fog_distance: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_fog_distance', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_light_max_exponent: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_light_max_exponent', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_multisample_filter_hint: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_multisample_filter_hint', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_occlusion_query: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_occlusion_query', extstring) then + begin + glGenOcclusionQueriesNV := wglGetProcAddress('glGenOcclusionQueriesNV'); + if not Assigned(glGenOcclusionQueriesNV) then Exit; + glDeleteOcclusionQueriesNV := wglGetProcAddress('glDeleteOcclusionQueriesNV'); + if not Assigned(glDeleteOcclusionQueriesNV) then Exit; + glIsOcclusionQueryNV := wglGetProcAddress('glIsOcclusionQueryNV'); + if not Assigned(glIsOcclusionQueryNV) then Exit; + glBeginOcclusionQueryNV := wglGetProcAddress('glBeginOcclusionQueryNV'); + if not Assigned(glBeginOcclusionQueryNV) then Exit; + glEndOcclusionQueryNV := wglGetProcAddress('glEndOcclusionQueryNV'); + if not Assigned(glEndOcclusionQueryNV) then Exit; + glGetOcclusionQueryivNV := wglGetProcAddress('glGetOcclusionQueryivNV'); + if not Assigned(glGetOcclusionQueryivNV) then Exit; + glGetOcclusionQueryuivNV := wglGetProcAddress('glGetOcclusionQueryuivNV'); + if not Assigned(glGetOcclusionQueryuivNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_packed_depth_stencil: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_packed_depth_stencil', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_point_sprite: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_point_sprite', extstring) then + begin + glPointParameteriNV := wglGetProcAddress('glPointParameteriNV'); + if not Assigned(glPointParameteriNV) then Exit; + glPointParameterivNV := wglGetProcAddress('glPointParameterivNV'); + if not Assigned(glPointParameterivNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_register_combiners: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_register_combiners', extstring) then + begin + glCombinerParameterfvNV := wglGetProcAddress('glCombinerParameterfvNV'); + if not Assigned(glCombinerParameterfvNV) then Exit; + glCombinerParameterivNV := wglGetProcAddress('glCombinerParameterivNV'); + if not Assigned(glCombinerParameterivNV) then Exit; + glCombinerParameterfNV := wglGetProcAddress('glCombinerParameterfNV'); + if not Assigned(glCombinerParameterfNV) then Exit; + glCombinerParameteriNV := wglGetProcAddress('glCombinerParameteriNV'); + if not Assigned(glCombinerParameteriNV) then Exit; + glCombinerInputNV := wglGetProcAddress('glCombinerInputNV'); + if not Assigned(glCombinerInputNV) then Exit; + glCombinerOutputNV := wglGetProcAddress('glCombinerOutputNV'); + if not Assigned(glCombinerOutputNV) then Exit; + glFinalCombinerInputNV := wglGetProcAddress('glFinalCombinerInputNV'); + if not Assigned(glFinalCombinerInputNV) then Exit; + glGetCombinerInputParameterfvNV := wglGetProcAddress('glGetCombinerInputParameterfvNV'); + if not Assigned(glGetCombinerInputParameterfvNV) then Exit; + glGetCombinerInputParameterivNV := wglGetProcAddress('glGetCombinerInputParameterivNV'); + if not Assigned(glGetCombinerInputParameterivNV) then Exit; + glGetCombinerOutputParameterfvNV := wglGetProcAddress('glGetCombinerOutputParameterfvNV'); + if not Assigned(glGetCombinerOutputParameterfvNV) then Exit; + glGetCombinerOutputParameterivNV := wglGetProcAddress('glGetCombinerOutputParameterivNV'); + if not Assigned(glGetCombinerOutputParameterivNV) then Exit; + glGetFinalCombinerInputParameterfvNV := wglGetProcAddress('glGetFinalCombinerInputParameterfvNV'); + if not Assigned(glGetFinalCombinerInputParameterfvNV) then Exit; + glGetFinalCombinerInputParameterivNV := wglGetProcAddress('glGetFinalCombinerInputParameterivNV'); + if not Assigned(glGetFinalCombinerInputParameterivNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_register_combiners2: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_register_combiners2', extstring) then + begin + glCombinerStageParameterfvNV := wglGetProcAddress('glCombinerStageParameterfvNV'); + if not Assigned(glCombinerStageParameterfvNV) then Exit; + glGetCombinerStageParameterfvNV := wglGetProcAddress('glGetCombinerStageParameterfvNV'); + if not Assigned(glGetCombinerStageParameterfvNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_texgen_emboss: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_texgen_emboss', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_texgen_reflection: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_texgen_reflection', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_texture_compression_vtc: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_texture_compression_vtc', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_texture_env_combine4: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_texture_env_combine4', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_texture_rectangle: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_texture_rectangle', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_texture_shader: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_texture_shader', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_texture_shader2: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_texture_shader2', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_texture_shader3: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_texture_shader3', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_vertex_array_range: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_vertex_array_range', extstring) then + begin + glVertexArrayRangeNV := wglGetProcAddress('glVertexArrayRangeNV'); + if not Assigned(glVertexArrayRangeNV) then Exit; + glFlushVertexArrayRangeNV := wglGetProcAddress('glFlushVertexArrayRangeNV'); + if not Assigned(glFlushVertexArrayRangeNV) then Exit; + wglAllocateMemoryNV := wglGetProcAddress('wglAllocateMemoryNV'); + if not Assigned(wglAllocateMemoryNV) then Exit; + wglFreeMemoryNV := wglGetProcAddress('wglFreeMemoryNV'); + if not Assigned(wglFreeMemoryNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_vertex_array_range2: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_vertex_array_range2', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_vertex_program: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_vertex_program', extstring) then + begin + glBindProgramNV := wglGetProcAddress('glBindProgramNV'); + if not Assigned(glBindProgramNV) then Exit; + glDeleteProgramsNV := wglGetProcAddress('glDeleteProgramsNV'); + if not Assigned(glDeleteProgramsNV) then Exit; + glExecuteProgramNV := wglGetProcAddress('glExecuteProgramNV'); + if not Assigned(glExecuteProgramNV) then Exit; + glGenProgramsNV := wglGetProcAddress('glGenProgramsNV'); + if not Assigned(glGenProgramsNV) then Exit; + glAreProgramsResidentNV := wglGetProcAddress('glAreProgramsResidentNV'); + if not Assigned(glAreProgramsResidentNV) then Exit; + glRequestResidentProgramsNV := wglGetProcAddress('glRequestResidentProgramsNV'); + if not Assigned(glRequestResidentProgramsNV) then Exit; + glGetProgramParameterfvNV := wglGetProcAddress('glGetProgramParameterfvNV'); + if not Assigned(glGetProgramParameterfvNV) then Exit; + glGetProgramParameterdvNV := wglGetProcAddress('glGetProgramParameterdvNV'); + if not Assigned(glGetProgramParameterdvNV) then Exit; + glGetProgramivNV := wglGetProcAddress('glGetProgramivNV'); + if not Assigned(glGetProgramivNV) then Exit; + glGetProgramStringNV := wglGetProcAddress('glGetProgramStringNV'); + if not Assigned(glGetProgramStringNV) then Exit; + glGetTrackMatrixivNV := wglGetProcAddress('glGetTrackMatrixivNV'); + if not Assigned(glGetTrackMatrixivNV) then Exit; + glGetVertexAttribdvNV := wglGetProcAddress('glGetVertexAttribdvNV'); + if not Assigned(glGetVertexAttribdvNV) then Exit; + glGetVertexAttribfvNV := wglGetProcAddress('glGetVertexAttribfvNV'); + if not Assigned(glGetVertexAttribfvNV) then Exit; + glGetVertexAttribivNV := wglGetProcAddress('glGetVertexAttribivNV'); + if not Assigned(glGetVertexAttribivNV) then Exit; + glGetVertexAttribPointervNV := wglGetProcAddress('glGetVertexAttribPointervNV'); + if not Assigned(glGetVertexAttribPointervNV) then Exit; + glIsProgramNV := wglGetProcAddress('glIsProgramNV'); + if not Assigned(glIsProgramNV) then Exit; + glLoadProgramNV := wglGetProcAddress('glLoadProgramNV'); + if not Assigned(glLoadProgramNV) then Exit; + glProgramParameter4fNV := wglGetProcAddress('glProgramParameter4fNV'); + if not Assigned(glProgramParameter4fNV) then Exit; + glProgramParameter4fvNV := wglGetProcAddress('glProgramParameter4fvNV'); + if not Assigned(glProgramParameter4fvNV) then Exit; + glProgramParameters4dvNV := wglGetProcAddress('glProgramParameters4dvNV'); + if not Assigned(glProgramParameters4dvNV) then Exit; + glProgramParameters4fvNV := wglGetProcAddress('glProgramParameters4fvNV'); + if not Assigned(glProgramParameters4fvNV) then Exit; + glTrackMatrixNV := wglGetProcAddress('glTrackMatrixNV'); + if not Assigned(glTrackMatrixNV) then Exit; + glVertexAttribPointerNV := wglGetProcAddress('glVertexAttribPointerNV'); + if not Assigned(glVertexAttribPointerNV) then Exit; + glVertexAttrib1sNV := wglGetProcAddress('glVertexAttrib1sNV'); + if not Assigned(glVertexAttrib1sNV) then Exit; + glVertexAttrib1fNV := wglGetProcAddress('glVertexAttrib1fNV'); + if not Assigned(glVertexAttrib1fNV) then Exit; + glVertexAttrib1dNV := wglGetProcAddress('glVertexAttrib1dNV'); + if not Assigned(glVertexAttrib1dNV) then Exit; + glVertexAttrib2sNV := wglGetProcAddress('glVertexAttrib2sNV'); + if not Assigned(glVertexAttrib2sNV) then Exit; + glVertexAttrib2fNV := wglGetProcAddress('glVertexAttrib2fNV'); + if not Assigned(glVertexAttrib2fNV) then Exit; + glVertexAttrib2dNV := wglGetProcAddress('glVertexAttrib2dNV'); + if not Assigned(glVertexAttrib2dNV) then Exit; + glVertexAttrib3sNV := wglGetProcAddress('glVertexAttrib3sNV'); + if not Assigned(glVertexAttrib3sNV) then Exit; + glVertexAttrib3fNV := wglGetProcAddress('glVertexAttrib3fNV'); + if not Assigned(glVertexAttrib3fNV) then Exit; + glVertexAttrib3dNV := wglGetProcAddress('glVertexAttrib3dNV'); + if not Assigned(glVertexAttrib3dNV) then Exit; + glVertexAttrib4sNV := wglGetProcAddress('glVertexAttrib4sNV'); + if not Assigned(glVertexAttrib4sNV) then Exit; + glVertexAttrib4fNV := wglGetProcAddress('glVertexAttrib4fNV'); + if not Assigned(glVertexAttrib4fNV) then Exit; + glVertexAttrib4dNV := wglGetProcAddress('glVertexAttrib4dNV'); + if not Assigned(glVertexAttrib4dNV) then Exit; + glVertexAttrib4ubNV := wglGetProcAddress('glVertexAttrib4ubNV'); + if not Assigned(glVertexAttrib4ubNV) then Exit; + glVertexAttrib1svNV := wglGetProcAddress('glVertexAttrib1svNV'); + if not Assigned(glVertexAttrib1svNV) then Exit; + glVertexAttrib1fvNV := wglGetProcAddress('glVertexAttrib1fvNV'); + if not Assigned(glVertexAttrib1fvNV) then Exit; + glVertexAttrib1dvNV := wglGetProcAddress('glVertexAttrib1dvNV'); + if not Assigned(glVertexAttrib1dvNV) then Exit; + glVertexAttrib2svNV := wglGetProcAddress('glVertexAttrib2svNV'); + if not Assigned(glVertexAttrib2svNV) then Exit; + glVertexAttrib2fvNV := wglGetProcAddress('glVertexAttrib2fvNV'); + if not Assigned(glVertexAttrib2fvNV) then Exit; + glVertexAttrib2dvNV := wglGetProcAddress('glVertexAttrib2dvNV'); + if not Assigned(glVertexAttrib2dvNV) then Exit; + glVertexAttrib3svNV := wglGetProcAddress('glVertexAttrib3svNV'); + if not Assigned(glVertexAttrib3svNV) then Exit; + glVertexAttrib3fvNV := wglGetProcAddress('glVertexAttrib3fvNV'); + if not Assigned(glVertexAttrib3fvNV) then Exit; + glVertexAttrib3dvNV := wglGetProcAddress('glVertexAttrib3dvNV'); + if not Assigned(glVertexAttrib3dvNV) then Exit; + glVertexAttrib4svNV := wglGetProcAddress('glVertexAttrib4svNV'); + if not Assigned(glVertexAttrib4svNV) then Exit; + glVertexAttrib4fvNV := wglGetProcAddress('glVertexAttrib4fvNV'); + if not Assigned(glVertexAttrib4fvNV) then Exit; + glVertexAttrib4dvNV := wglGetProcAddress('glVertexAttrib4dvNV'); + if not Assigned(glVertexAttrib4dvNV) then Exit; + glVertexAttrib4ubvNV := wglGetProcAddress('glVertexAttrib4ubvNV'); + if not Assigned(glVertexAttrib4ubvNV) then Exit; + glVertexAttribs1svNV := wglGetProcAddress('glVertexAttribs1svNV'); + if not Assigned(glVertexAttribs1svNV) then Exit; + glVertexAttribs1fvNV := wglGetProcAddress('glVertexAttribs1fvNV'); + if not Assigned(glVertexAttribs1fvNV) then Exit; + glVertexAttribs1dvNV := wglGetProcAddress('glVertexAttribs1dvNV'); + if not Assigned(glVertexAttribs1dvNV) then Exit; + glVertexAttribs2svNV := wglGetProcAddress('glVertexAttribs2svNV'); + if not Assigned(glVertexAttribs2svNV) then Exit; + glVertexAttribs2fvNV := wglGetProcAddress('glVertexAttribs2fvNV'); + if not Assigned(glVertexAttribs2fvNV) then Exit; + glVertexAttribs2dvNV := wglGetProcAddress('glVertexAttribs2dvNV'); + if not Assigned(glVertexAttribs2dvNV) then Exit; + glVertexAttribs3svNV := wglGetProcAddress('glVertexAttribs3svNV'); + if not Assigned(glVertexAttribs3svNV) then Exit; + glVertexAttribs3fvNV := wglGetProcAddress('glVertexAttribs3fvNV'); + if not Assigned(glVertexAttribs3fvNV) then Exit; + glVertexAttribs3dvNV := wglGetProcAddress('glVertexAttribs3dvNV'); + if not Assigned(glVertexAttribs3dvNV) then Exit; + glVertexAttribs4svNV := wglGetProcAddress('glVertexAttribs4svNV'); + if not Assigned(glVertexAttribs4svNV) then Exit; + glVertexAttribs4fvNV := wglGetProcAddress('glVertexAttribs4fvNV'); + if not Assigned(glVertexAttribs4fvNV) then Exit; + glVertexAttribs4dvNV := wglGetProcAddress('glVertexAttribs4dvNV'); + if not Assigned(glVertexAttribs4dvNV) then Exit; + glVertexAttribs4ubvNV := wglGetProcAddress('glVertexAttribs4ubvNV'); + if not Assigned(glVertexAttribs4ubvNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_vertex_program1_1: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_vertex_program1_1', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ATI_element_array: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_element_array', extstring) then + begin + glElementPointerATI := wglGetProcAddress('glElementPointerATI'); + if not Assigned(glElementPointerATI) then Exit; + glDrawElementArrayATI := wglGetProcAddress('glDrawElementArrayATI'); + if not Assigned(glDrawElementArrayATI) then Exit; + glDrawRangeElementArrayATI := wglGetProcAddress('glDrawRangeElementArrayATI'); + if not Assigned(glDrawRangeElementArrayATI) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ATI_envmap_bumpmap: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_envmap_bumpmap', extstring) then + begin + glTexBumpParameterivATI := wglGetProcAddress('glTexBumpParameterivATI'); + if not Assigned(glTexBumpParameterivATI) then Exit; + glTexBumpParameterfvATI := wglGetProcAddress('glTexBumpParameterfvATI'); + if not Assigned(glTexBumpParameterfvATI) then Exit; + glGetTexBumpParameterivATI := wglGetProcAddress('glGetTexBumpParameterivATI'); + if not Assigned(glGetTexBumpParameterivATI) then Exit; + glGetTexBumpParameterfvATI := wglGetProcAddress('glGetTexBumpParameterfvATI'); + if not Assigned(glGetTexBumpParameterfvATI) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ATI_fragment_shader: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_fragment_shader', extstring) then + begin + glGenFragmentShadersATI := wglGetProcAddress('glGenFragmentShadersATI'); + if not Assigned(glGenFragmentShadersATI) then Exit; + glBindFragmentShaderATI := wglGetProcAddress('glBindFragmentShaderATI'); + if not Assigned(glBindFragmentShaderATI) then Exit; + glDeleteFragmentShaderATI := wglGetProcAddress('glDeleteFragmentShaderATI'); + if not Assigned(glDeleteFragmentShaderATI) then Exit; + glBeginFragmentShaderATI := wglGetProcAddress('glBeginFragmentShaderATI'); + if not Assigned(glBeginFragmentShaderATI) then Exit; + glEndFragmentShaderATI := wglGetProcAddress('glEndFragmentShaderATI'); + if not Assigned(glEndFragmentShaderATI) then Exit; + glPassTexCoordATI := wglGetProcAddress('glPassTexCoordATI'); + if not Assigned(glPassTexCoordATI) then Exit; + glSampleMapATI := wglGetProcAddress('glSampleMapATI'); + if not Assigned(glSampleMapATI) then Exit; + glColorFragmentOp1ATI := wglGetProcAddress('glColorFragmentOp1ATI'); + if not Assigned(glColorFragmentOp1ATI) then Exit; + glColorFragmentOp2ATI := wglGetProcAddress('glColorFragmentOp2ATI'); + if not Assigned(glColorFragmentOp2ATI) then Exit; + glColorFragmentOp3ATI := wglGetProcAddress('glColorFragmentOp3ATI'); + if not Assigned(glColorFragmentOp3ATI) then Exit; + glAlphaFragmentOp1ATI := wglGetProcAddress('glAlphaFragmentOp1ATI'); + if not Assigned(glAlphaFragmentOp1ATI) then Exit; + glAlphaFragmentOp2ATI := wglGetProcAddress('glAlphaFragmentOp2ATI'); + if not Assigned(glAlphaFragmentOp2ATI) then Exit; + glAlphaFragmentOp3ATI := wglGetProcAddress('glAlphaFragmentOp3ATI'); + if not Assigned(glAlphaFragmentOp3ATI) then Exit; + glSetFragmentShaderConstantATI := wglGetProcAddress('glSetFragmentShaderConstantATI'); + if not Assigned(glSetFragmentShaderConstantATI) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ATI_pn_triangles: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_pn_triangles', extstring) then + begin + glPNTrianglesiATI := wglGetProcAddress('glPNTrianglesiATI'); + if not Assigned(glPNTrianglesiATI) then Exit; + glPNTrianglesfATI := wglGetProcAddress('glPNTrianglesfATI'); + if not Assigned(glPNTrianglesfATI) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ATI_texture_mirror_once: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_texture_mirror_once', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ATI_vertex_array_object: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_vertex_array_object', extstring) then + begin + glNewObjectBufferATI := wglGetProcAddress('glNewObjectBufferATI'); + if not Assigned(glNewObjectBufferATI) then Exit; + glIsObjectBufferATI := wglGetProcAddress('glIsObjectBufferATI'); + if not Assigned(glIsObjectBufferATI) then Exit; + glUpdateObjectBufferATI := wglGetProcAddress('glUpdateObjectBufferATI'); + if not Assigned(glUpdateObjectBufferATI) then Exit; + glGetObjectBufferfvATI := wglGetProcAddress('glGetObjectBufferfvATI'); + if not Assigned(glGetObjectBufferfvATI) then Exit; + glGetObjectBufferivATI := wglGetProcAddress('glGetObjectBufferivATI'); + if not Assigned(glGetObjectBufferivATI) then Exit; + glDeleteObjectBufferATI := wglGetProcAddress('glDeleteObjectBufferATI'); + if not Assigned(glDeleteObjectBufferATI) then Exit; + glArrayObjectATI := wglGetProcAddress('glArrayObjectATI'); + if not Assigned(glArrayObjectATI) then Exit; + glGetArrayObjectfvATI := wglGetProcAddress('glGetArrayObjectfvATI'); + if not Assigned(glGetArrayObjectfvATI) then Exit; + glGetArrayObjectivATI := wglGetProcAddress('glGetArrayObjectivATI'); + if not Assigned(glGetArrayObjectivATI) then Exit; + glVariantArrayObjectATI := wglGetProcAddress('glVariantArrayObjectATI'); + if not Assigned(glVariantArrayObjectATI) then Exit; + glGetVariantArrayObjectfvATI := wglGetProcAddress('glGetVariantArrayObjectfvATI'); + if not Assigned(glGetVariantArrayObjectfvATI) then Exit; + glGetVariantArrayObjectivATI := wglGetProcAddress('glGetVariantArrayObjectivATI'); + if not Assigned(glGetVariantArrayObjectivATI) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ATI_vertex_streams: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_vertex_streams', extstring) then + begin + glVertexStream1s := wglGetProcAddress('glVertexStream1s'); + if not Assigned(glVertexStream1s) then Exit; + glVertexStream1i := wglGetProcAddress('glVertexStream1i'); + if not Assigned(glVertexStream1i) then Exit; + glVertexStream1f := wglGetProcAddress('glVertexStream1f'); + if not Assigned(glVertexStream1f) then Exit; + glVertexStream1d := wglGetProcAddress('glVertexStream1d'); + if not Assigned(glVertexStream1d) then Exit; + glVertexStream1sv := wglGetProcAddress('glVertexStream1sv'); + if not Assigned(glVertexStream1sv) then Exit; + glVertexStream1iv := wglGetProcAddress('glVertexStream1iv'); + if not Assigned(glVertexStream1iv) then Exit; + glVertexStream1fv := wglGetProcAddress('glVertexStream1fv'); + if not Assigned(glVertexStream1fv) then Exit; + glVertexStream1dv := wglGetProcAddress('glVertexStream1dv'); + if not Assigned(glVertexStream1dv) then Exit; + glVertexStream2s := wglGetProcAddress('glVertexStream2s'); + if not Assigned(glVertexStream2s) then Exit; + glVertexStream2i := wglGetProcAddress('glVertexStream2i'); + if not Assigned(glVertexStream2i) then Exit; + glVertexStream2f := wglGetProcAddress('glVertexStream2f'); + if not Assigned(glVertexStream2f) then Exit; + glVertexStream2d := wglGetProcAddress('glVertexStream2d'); + if not Assigned(glVertexStream2d) then Exit; + glVertexStream2sv := wglGetProcAddress('glVertexStream2sv'); + if not Assigned(glVertexStream2sv) then Exit; + glVertexStream2iv := wglGetProcAddress('glVertexStream2iv'); + if not Assigned(glVertexStream2iv) then Exit; + glVertexStream2fv := wglGetProcAddress('glVertexStream2fv'); + if not Assigned(glVertexStream2fv) then Exit; + glVertexStream2dv := wglGetProcAddress('glVertexStream2dv'); + if not Assigned(glVertexStream2dv) then Exit; + glVertexStream3s := wglGetProcAddress('glVertexStream3s'); + if not Assigned(glVertexStream3s) then Exit; + glVertexStream3i := wglGetProcAddress('glVertexStream3i'); + if not Assigned(glVertexStream3i) then Exit; + glVertexStream3f := wglGetProcAddress('glVertexStream3f'); + if not Assigned(glVertexStream3f) then Exit; + glVertexStream3d := wglGetProcAddress('glVertexStream3d'); + if not Assigned(glVertexStream3d) then Exit; + glVertexStream3sv := wglGetProcAddress('glVertexStream3sv'); + if not Assigned(glVertexStream3sv) then Exit; + glVertexStream3iv := wglGetProcAddress('glVertexStream3iv'); + if not Assigned(glVertexStream3iv) then Exit; + glVertexStream3fv := wglGetProcAddress('glVertexStream3fv'); + if not Assigned(glVertexStream3fv) then Exit; + glVertexStream3dv := wglGetProcAddress('glVertexStream3dv'); + if not Assigned(glVertexStream3dv) then Exit; + glVertexStream4s := wglGetProcAddress('glVertexStream4s'); + if not Assigned(glVertexStream4s) then Exit; + glVertexStream4i := wglGetProcAddress('glVertexStream4i'); + if not Assigned(glVertexStream4i) then Exit; + glVertexStream4f := wglGetProcAddress('glVertexStream4f'); + if not Assigned(glVertexStream4f) then Exit; + glVertexStream4d := wglGetProcAddress('glVertexStream4d'); + if not Assigned(glVertexStream4d) then Exit; + glVertexStream4sv := wglGetProcAddress('glVertexStream4sv'); + if not Assigned(glVertexStream4sv) then Exit; + glVertexStream4iv := wglGetProcAddress('glVertexStream4iv'); + if not Assigned(glVertexStream4iv) then Exit; + glVertexStream4fv := wglGetProcAddress('glVertexStream4fv'); + if not Assigned(glVertexStream4fv) then Exit; + glVertexStream4dv := wglGetProcAddress('glVertexStream4dv'); + if not Assigned(glVertexStream4dv) then Exit; + glNormalStream3b := wglGetProcAddress('glNormalStream3b'); + if not Assigned(glNormalStream3b) then Exit; + glNormalStream3s := wglGetProcAddress('glNormalStream3s'); + if not Assigned(glNormalStream3s) then Exit; + glNormalStream3i := wglGetProcAddress('glNormalStream3i'); + if not Assigned(glNormalStream3i) then Exit; + glNormalStream3f := wglGetProcAddress('glNormalStream3f'); + if not Assigned(glNormalStream3f) then Exit; + glNormalStream3d := wglGetProcAddress('glNormalStream3d'); + if not Assigned(glNormalStream3d) then Exit; + glNormalStream3bv := wglGetProcAddress('glNormalStream3bv'); + if not Assigned(glNormalStream3bv) then Exit; + glNormalStream3sv := wglGetProcAddress('glNormalStream3sv'); + if not Assigned(glNormalStream3sv) then Exit; + glNormalStream3iv := wglGetProcAddress('glNormalStream3iv'); + if not Assigned(glNormalStream3iv) then Exit; + glNormalStream3fv := wglGetProcAddress('glNormalStream3fv'); + if not Assigned(glNormalStream3fv) then Exit; + glNormalStream3dv := wglGetProcAddress('glNormalStream3dv'); + if not Assigned(glNormalStream3dv) then Exit; + glClientActiveVertexStream := wglGetProcAddress('glClientActiveVertexStream'); + if not Assigned(glClientActiveVertexStream) then Exit; + glVertexBlendEnvi := wglGetProcAddress('glVertexBlendEnvi'); + if not Assigned(glVertexBlendEnvi) then Exit; + glVertexBlendEnvf := wglGetProcAddress('glVertexBlendEnvf'); + if not Assigned(glVertexBlendEnvf) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_I3D_image_buffer: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_I3D_image_buffer', extstring) then + begin + wglCreateImageBufferI3D := wglGetProcAddress('wglCreateImageBufferI3D'); + if not Assigned(wglCreateImageBufferI3D) then Exit; + wglDestroyImageBufferI3D := wglGetProcAddress('wglDestroyImageBufferI3D'); + if not Assigned(wglDestroyImageBufferI3D) then Exit; + wglAssociateImageBufferEventsI3D := wglGetProcAddress('wglAssociateImageBufferEventsI3D'); + if not Assigned(wglAssociateImageBufferEventsI3D) then Exit; + wglReleaseImageBufferEventsI3D := wglGetProcAddress('wglReleaseImageBufferEventsI3D'); + if not Assigned(wglReleaseImageBufferEventsI3D) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_I3D_swap_frame_lock: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_I3D_swap_frame_lock', extstring) then + begin + wglEnableFrameLockI3D := wglGetProcAddress('wglEnableFrameLockI3D'); + if not Assigned(wglEnableFrameLockI3D) then Exit; + wglDisableFrameLockI3D := wglGetProcAddress('wglDisableFrameLockI3D'); + if not Assigned(wglDisableFrameLockI3D) then Exit; + wglIsEnabledFrameLockI3D := wglGetProcAddress('wglIsEnabledFrameLockI3D'); + if not Assigned(wglIsEnabledFrameLockI3D) then Exit; + wglQueryFrameLockMasterI3D := wglGetProcAddress('wglQueryFrameLockMasterI3D'); + if not Assigned(wglQueryFrameLockMasterI3D) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_I3D_swap_frame_usage: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_I3D_swap_frame_usage', extstring) then + begin + wglGetFrameUsageI3D := wglGetProcAddress('wglGetFrameUsageI3D'); + if not Assigned(wglGetFrameUsageI3D) then Exit; + wglBeginFrameTrackingI3D := wglGetProcAddress('wglBeginFrameTrackingI3D'); + if not Assigned(wglBeginFrameTrackingI3D) then Exit; + wglEndFrameTrackingI3D := wglGetProcAddress('wglEndFrameTrackingI3D'); + if not Assigned(wglEndFrameTrackingI3D) then Exit; + wglQueryFrameTrackingI3D := wglGetProcAddress('wglQueryFrameTrackingI3D'); + if not Assigned(wglQueryFrameTrackingI3D) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_3DFX_texture_compression_FXT1: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_3DFX_texture_compression_FXT1', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_IBM_cull_vertex: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_IBM_cull_vertex', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_IBM_multimode_draw_arrays: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_IBM_multimode_draw_arrays', extstring) then + begin + glMultiModeDrawArraysIBM := wglGetProcAddress('glMultiModeDrawArraysIBM'); + if not Assigned(glMultiModeDrawArraysIBM) then Exit; + glMultiModeDrawElementsIBM := wglGetProcAddress('glMultiModeDrawElementsIBM'); + if not Assigned(glMultiModeDrawElementsIBM) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_IBM_raster_pos_clip: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_IBM_raster_pos_clip', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_IBM_texture_mirrored_repeat: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_IBM_texture_mirrored_repeat', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_IBM_vertex_array_lists: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_IBM_vertex_array_lists', extstring) then + begin + glColorPointerListIBM := wglGetProcAddress('glColorPointerListIBM'); + if not Assigned(glColorPointerListIBM) then Exit; + glSecondaryColorPointerListIBM := wglGetProcAddress('glSecondaryColorPointerListIBM'); + if not Assigned(glSecondaryColorPointerListIBM) then Exit; + glEdgeFlagPointerListIBM := wglGetProcAddress('glEdgeFlagPointerListIBM'); + if not Assigned(glEdgeFlagPointerListIBM) then Exit; + glFogCoordPointerListIBM := wglGetProcAddress('glFogCoordPointerListIBM'); + if not Assigned(glFogCoordPointerListIBM) then Exit; + glNormalPointerListIBM := wglGetProcAddress('glNormalPointerListIBM'); + if not Assigned(glNormalPointerListIBM) then Exit; + glTexCoordPointerListIBM := wglGetProcAddress('glTexCoordPointerListIBM'); + if not Assigned(glTexCoordPointerListIBM) then Exit; + glVertexPointerListIBM := wglGetProcAddress('glVertexPointerListIBM'); + if not Assigned(glVertexPointerListIBM) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_MESA_resize_buffers: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_MESA_resize_buffers', extstring) then + begin + glResizeBuffersMESA := wglGetProcAddress('glResizeBuffersMESA'); + if not Assigned(glResizeBuffersMESA) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_MESA_window_pos: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_MESA_window_pos', extstring) then + begin + glWindowPos2dMESA := wglGetProcAddress('glWindowPos2dMESA'); + if not Assigned(glWindowPos2dMESA) then Exit; + glWindowPos2fMESA := wglGetProcAddress('glWindowPos2fMESA'); + if not Assigned(glWindowPos2fMESA) then Exit; + glWindowPos2iMESA := wglGetProcAddress('glWindowPos2iMESA'); + if not Assigned(glWindowPos2iMESA) then Exit; + glWindowPos2sMESA := wglGetProcAddress('glWindowPos2sMESA'); + if not Assigned(glWindowPos2sMESA) then Exit; + glWindowPos2ivMESA := wglGetProcAddress('glWindowPos2ivMESA'); + if not Assigned(glWindowPos2ivMESA) then Exit; + glWindowPos2svMESA := wglGetProcAddress('glWindowPos2svMESA'); + if not Assigned(glWindowPos2svMESA) then Exit; + glWindowPos2fvMESA := wglGetProcAddress('glWindowPos2fvMESA'); + if not Assigned(glWindowPos2fvMESA) then Exit; + glWindowPos2dvMESA := wglGetProcAddress('glWindowPos2dvMESA'); + if not Assigned(glWindowPos2dvMESA) then Exit; + glWindowPos3iMESA := wglGetProcAddress('glWindowPos3iMESA'); + if not Assigned(glWindowPos3iMESA) then Exit; + glWindowPos3sMESA := wglGetProcAddress('glWindowPos3sMESA'); + if not Assigned(glWindowPos3sMESA) then Exit; + glWindowPos3fMESA := wglGetProcAddress('glWindowPos3fMESA'); + if not Assigned(glWindowPos3fMESA) then Exit; + glWindowPos3dMESA := wglGetProcAddress('glWindowPos3dMESA'); + if not Assigned(glWindowPos3dMESA) then Exit; + glWindowPos3ivMESA := wglGetProcAddress('glWindowPos3ivMESA'); + if not Assigned(glWindowPos3ivMESA) then Exit; + glWindowPos3svMESA := wglGetProcAddress('glWindowPos3svMESA'); + if not Assigned(glWindowPos3svMESA) then Exit; + glWindowPos3fvMESA := wglGetProcAddress('glWindowPos3fvMESA'); + if not Assigned(glWindowPos3fvMESA) then Exit; + glWindowPos3dvMESA := wglGetProcAddress('glWindowPos3dvMESA'); + if not Assigned(glWindowPos3dvMESA) then Exit; + glWindowPos4iMESA := wglGetProcAddress('glWindowPos4iMESA'); + if not Assigned(glWindowPos4iMESA) then Exit; + glWindowPos4sMESA := wglGetProcAddress('glWindowPos4sMESA'); + if not Assigned(glWindowPos4sMESA) then Exit; + glWindowPos4fMESA := wglGetProcAddress('glWindowPos4fMESA'); + if not Assigned(glWindowPos4fMESA) then Exit; + glWindowPos4dMESA := wglGetProcAddress('glWindowPos4dMESA'); + if not Assigned(glWindowPos4dMESA) then Exit; + glWindowPos4ivMESA := wglGetProcAddress('glWindowPos4ivMESA'); + if not Assigned(glWindowPos4ivMESA) then Exit; + glWindowPos4svMESA := wglGetProcAddress('glWindowPos4svMESA'); + if not Assigned(glWindowPos4svMESA) then Exit; + glWindowPos4fvMESA := wglGetProcAddress('glWindowPos4fvMESA'); + if not Assigned(glWindowPos4fvMESA) then Exit; + glWindowPos4dvMESA := wglGetProcAddress('glWindowPos4dvMESA'); + if not Assigned(glWindowPos4dvMESA) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_OML_interlace: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_OML_interlace', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_OML_resample: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_OML_resample', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_OML_subsample: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_OML_subsample', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SGIS_generate_mipmap: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIS_generate_mipmap', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SGIS_multisample: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIS_multisample', extstring) then + begin + glSampleMaskSGIS := wglGetProcAddress('glSampleMaskSGIS'); + if not Assigned(glSampleMaskSGIS) then Exit; + glSamplePatternSGIS := wglGetProcAddress('glSamplePatternSGIS'); + if not Assigned(glSamplePatternSGIS) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_SGIS_pixel_texture: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIS_pixel_texture', extstring) then + begin + glPixelTexGenParameteriSGIS := wglGetProcAddress('glPixelTexGenParameteriSGIS'); + if not Assigned(glPixelTexGenParameteriSGIS) then Exit; + glPixelTexGenParameterfSGIS := wglGetProcAddress('glPixelTexGenParameterfSGIS'); + if not Assigned(glPixelTexGenParameterfSGIS) then Exit; + glGetPixelTexGenParameterivSGIS := wglGetProcAddress('glGetPixelTexGenParameterivSGIS'); + if not Assigned(glGetPixelTexGenParameterivSGIS) then Exit; + glGetPixelTexGenParameterfvSGIS := wglGetProcAddress('glGetPixelTexGenParameterfvSGIS'); + if not Assigned(glGetPixelTexGenParameterfvSGIS) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_SGIS_texture_border_clamp: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIS_texture_border_clamp', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SGIS_texture_color_mask: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIS_texture_color_mask', extstring) then + begin + glTextureColorMaskSGIS := wglGetProcAddress('glTextureColorMaskSGIS'); + if not Assigned(glTextureColorMaskSGIS) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_SGIS_texture_edge_clamp: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIS_texture_edge_clamp', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SGIS_texture_lod: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIS_texture_lod', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SGIS_depth_texture: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIS_depth_texture', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SGIX_fog_offset: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIX_fog_offset', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SGIX_interlace: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIX_interlace', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SGIX_shadow_ambient: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGIX_shadow_ambient', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SGI_color_matrix: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGI_color_matrix', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SGI_color_table: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGI_color_table', extstring) then + begin + glColorTableSGI := wglGetProcAddress('glColorTableSGI'); + if not Assigned(glColorTableSGI) then Exit; + glCopyColorTableSGI := wglGetProcAddress('glCopyColorTableSGI'); + if not Assigned(glCopyColorTableSGI) then Exit; + glColorTableParameterivSGI := wglGetProcAddress('glColorTableParameterivSGI'); + if not Assigned(glColorTableParameterivSGI) then Exit; + glColorTableParameterfvSGI := wglGetProcAddress('glColorTableParameterfvSGI'); + if not Assigned(glColorTableParameterfvSGI) then Exit; + glGetColorTableSGI := wglGetProcAddress('glGetColorTableSGI'); + if not Assigned(glGetColorTableSGI) then Exit; + glGetColorTableParameterivSGI := wglGetProcAddress('glGetColorTableParameterivSGI'); + if not Assigned(glGetColorTableParameterivSGI) then Exit; + glGetColorTableParameterfvSGI := wglGetProcAddress('glGetColorTableParameterfvSGI'); + if not Assigned(glGetColorTableParameterfvSGI) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_SGI_texture_color_table: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SGI_texture_color_table', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_SUN_vertex: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_SUN_vertex', extstring) then + begin + glColor4ubVertex2fSUN := wglGetProcAddress('glColor4ubVertex2fSUN'); + if not Assigned(glColor4ubVertex2fSUN) then Exit; + glColor4ubVertex2fvSUN := wglGetProcAddress('glColor4ubVertex2fvSUN'); + if not Assigned(glColor4ubVertex2fvSUN) then Exit; + glColor4ubVertex3fSUN := wglGetProcAddress('glColor4ubVertex3fSUN'); + if not Assigned(glColor4ubVertex3fSUN) then Exit; + glColor4ubVertex3fvSUN := wglGetProcAddress('glColor4ubVertex3fvSUN'); + if not Assigned(glColor4ubVertex3fvSUN) then Exit; + glColor3fVertex3fSUN := wglGetProcAddress('glColor3fVertex3fSUN'); + if not Assigned(glColor3fVertex3fSUN) then Exit; + glColor3fVertex3fvSUN := wglGetProcAddress('glColor3fVertex3fvSUN'); + if not Assigned(glColor3fVertex3fvSUN) then Exit; + glNormal3fVertex3fSUN := wglGetProcAddress('glNormal3fVertex3fSUN'); + if not Assigned(glNormal3fVertex3fSUN) then Exit; + glNormal3fVertex3fvSUN := wglGetProcAddress('glNormal3fVertex3fvSUN'); + if not Assigned(glNormal3fVertex3fvSUN) then Exit; + glColor4fNormal3fVertex3fSUN := wglGetProcAddress('glColor4fNormal3fVertex3fSUN'); + if not Assigned(glColor4fNormal3fVertex3fSUN) then Exit; + glColor4fNormal3fVertex3fvSUN := wglGetProcAddress('glColor4fNormal3fVertex3fvSUN'); + if not Assigned(glColor4fNormal3fVertex3fvSUN) then Exit; + glTexCoord2fVertex3fSUN := wglGetProcAddress('glTexCoord2fVertex3fSUN'); + if not Assigned(glTexCoord2fVertex3fSUN) then Exit; + glTexCoord2fVertex3fvSUN := wglGetProcAddress('glTexCoord2fVertex3fvSUN'); + if not Assigned(glTexCoord2fVertex3fvSUN) then Exit; + glTexCoord4fVertex4fSUN := wglGetProcAddress('glTexCoord4fVertex4fSUN'); + if not Assigned(glTexCoord4fVertex4fSUN) then Exit; + glTexCoord4fVertex4fvSUN := wglGetProcAddress('glTexCoord4fVertex4fvSUN'); + if not Assigned(glTexCoord4fVertex4fvSUN) then Exit; + glTexCoord2fColor4ubVertex3fSUN := wglGetProcAddress('glTexCoord2fColor4ubVertex3fSUN'); + if not Assigned(glTexCoord2fColor4ubVertex3fSUN) then Exit; + glTexCoord2fColor4ubVertex3fvSUN := wglGetProcAddress('glTexCoord2fColor4ubVertex3fvSUN'); + if not Assigned(glTexCoord2fColor4ubVertex3fvSUN) then Exit; + glTexCoord2fColor3fVertex3fSUN := wglGetProcAddress('glTexCoord2fColor3fVertex3fSUN'); + if not Assigned(glTexCoord2fColor3fVertex3fSUN) then Exit; + glTexCoord2fColor3fVertex3fvSUN := wglGetProcAddress('glTexCoord2fColor3fVertex3fvSUN'); + if not Assigned(glTexCoord2fColor3fVertex3fvSUN) then Exit; + glTexCoord2fNormal3fVertex3fSUN := wglGetProcAddress('glTexCoord2fNormal3fVertex3fSUN'); + if not Assigned(glTexCoord2fNormal3fVertex3fSUN) then Exit; + glTexCoord2fNormal3fVertex3fvSUN := wglGetProcAddress('glTexCoord2fNormal3fVertex3fvSUN'); + if not Assigned(glTexCoord2fNormal3fVertex3fvSUN) then Exit; + glTexCoord2fColor4fNormal3fVertex3fSUN := wglGetProcAddress('glTexCoord2fColor4fNormal3fVertex3fSUN'); + if not Assigned(glTexCoord2fColor4fNormal3fVertex3fSUN) then Exit; + glTexCoord2fColor4fNormal3fVertex3fvSUN := wglGetProcAddress('glTexCoord2fColor4fNormal3fVertex3fvSUN'); + if not Assigned(glTexCoord2fColor4fNormal3fVertex3fvSUN) then Exit; + glTexCoord4fColor4fNormal3fVertex4fSUN := wglGetProcAddress('glTexCoord4fColor4fNormal3fVertex4fSUN'); + if not Assigned(glTexCoord4fColor4fNormal3fVertex4fSUN) then Exit; + glTexCoord4fColor4fNormal3fVertex4fvSUN := wglGetProcAddress('glTexCoord4fColor4fNormal3fVertex4fvSUN'); + if not Assigned(glTexCoord4fColor4fNormal3fVertex4fvSUN) then Exit; + glReplacementCodeuiVertex3fSUN := wglGetProcAddress('glReplacementCodeuiVertex3fSUN'); + if not Assigned(glReplacementCodeuiVertex3fSUN) then Exit; + glReplacementCodeuiVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiVertex3fvSUN'); + if not Assigned(glReplacementCodeuiVertex3fvSUN) then Exit; + glReplacementCodeuiColor4ubVertex3fSUN := wglGetProcAddress('glReplacementCodeuiColor4ubVertex3fSUN'); + if not Assigned(glReplacementCodeuiColor4ubVertex3fSUN) then Exit; + glReplacementCodeuiColor4ubVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiColor4ubVertex3fvSUN'); + if not Assigned(glReplacementCodeuiColor4ubVertex3fvSUN) then Exit; + glReplacementCodeuiColor3fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiColor3fVertex3fSUN'); + if not Assigned(glReplacementCodeuiColor3fVertex3fSUN) then Exit; + glReplacementCodeuiColor3fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiColor3fVertex3fvSUN'); + if not Assigned(glReplacementCodeuiColor3fVertex3fvSUN) then Exit; + glReplacementCodeuiNormal3fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiNormal3fVertex3fSUN'); + if not Assigned(glReplacementCodeuiNormal3fVertex3fSUN) then Exit; + glReplacementCodeuiNormal3fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiNormal3fVertex3fvSUN'); + if not Assigned(glReplacementCodeuiNormal3fVertex3fvSUN) then Exit; + glReplacementCodeuiColor4fNormal3fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiColor4fNormal3fVertex3fSUN'); + if not Assigned(glReplacementCodeuiColor4fNormal3fVertex3fSUN) then Exit; + glReplacementCodeuiColor4fNormal3fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiColor4fNormal3fVertex3fvSUN'); + if not Assigned(glReplacementCodeuiColor4fNormal3fVertex3fvSUN) then Exit; + glReplacementCodeuiTexCoord2fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fVertex3fSUN'); + if not Assigned(glReplacementCodeuiTexCoord2fVertex3fSUN) then Exit; + glReplacementCodeuiTexCoord2fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fVertex3fvSUN'); + if not Assigned(glReplacementCodeuiTexCoord2fVertex3fvSUN) then Exit; + glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN'); + if not Assigned(glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN) then Exit; + glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN'); + if not Assigned(glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN) then Exit; + glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN'); + if not Assigned(glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN) then Exit; + glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN'); + if not Assigned(glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_fragment_program: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_fragment_program', extstring) then + begin + glProgramStringARB := wglGetProcAddress('glProgramStringARB'); + if not Assigned(glProgramStringARB) then Exit; + glBindProgramARB := wglGetProcAddress('glBindProgramARB'); + if not Assigned(glBindProgramARB) then Exit; + glDeleteProgramsARB := wglGetProcAddress('glDeleteProgramsARB'); + if not Assigned(glDeleteProgramsARB) then Exit; + glGenProgramsARB := wglGetProcAddress('glGenProgramsARB'); + if not Assigned(glGenProgramsARB) then Exit; + glProgramEnvParameter4dARB := wglGetProcAddress('glProgramEnvParameter4dARB'); + if not Assigned(glProgramEnvParameter4dARB) then Exit; + glProgramEnvParameter4dvARB := wglGetProcAddress('glProgramEnvParameter4dvARB'); + if not Assigned(glProgramEnvParameter4dvARB) then Exit; + glProgramEnvParameter4fARB := wglGetProcAddress('glProgramEnvParameter4fARB'); + if not Assigned(glProgramEnvParameter4fARB) then Exit; + glProgramEnvParameter4fvARB := wglGetProcAddress('glProgramEnvParameter4fvARB'); + if not Assigned(glProgramEnvParameter4fvARB) then Exit; + glProgramLocalParameter4dARB := wglGetProcAddress('glProgramLocalParameter4dARB'); + if not Assigned(glProgramLocalParameter4dARB) then Exit; + glProgramLocalParameter4dvARB := wglGetProcAddress('glProgramLocalParameter4dvARB'); + if not Assigned(glProgramLocalParameter4dvARB) then Exit; + glProgramLocalParameter4fARB := wglGetProcAddress('glProgramLocalParameter4fARB'); + if not Assigned(glProgramLocalParameter4fARB) then Exit; + glProgramLocalParameter4fvARB := wglGetProcAddress('glProgramLocalParameter4fvARB'); + if not Assigned(glProgramLocalParameter4fvARB) then Exit; + glGetProgramEnvParameterdvARB := wglGetProcAddress('glGetProgramEnvParameterdvARB'); + if not Assigned(glGetProgramEnvParameterdvARB) then Exit; + glGetProgramEnvParameterfvARB := wglGetProcAddress('glGetProgramEnvParameterfvARB'); + if not Assigned(glGetProgramEnvParameterfvARB) then Exit; + glGetProgramLocalParameterdvARB := wglGetProcAddress('glGetProgramLocalParameterdvARB'); + if not Assigned(glGetProgramLocalParameterdvARB) then Exit; + glGetProgramLocalParameterfvARB := wglGetProcAddress('glGetProgramLocalParameterfvARB'); + if not Assigned(glGetProgramLocalParameterfvARB) then Exit; + glGetProgramivARB := wglGetProcAddress('glGetProgramivARB'); + if not Assigned(glGetProgramivARB) then Exit; + glGetProgramStringARB := wglGetProcAddress('glGetProgramStringARB'); + if not Assigned(glGetProgramStringARB) then Exit; + glIsProgramARB := wglGetProcAddress('glIsProgramARB'); + if not Assigned(glIsProgramARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ATI_text_fragment_shader: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_text_fragment_shader', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_APPLE_client_storage: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_APPLE_client_storage', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_APPLE_element_array: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_APPLE_element_array', extstring) then + begin + glElementPointerAPPLE := wglGetProcAddress('glElementPointerAPPLE'); + if not Assigned(glElementPointerAPPLE) then Exit; + glDrawElementArrayAPPLE := wglGetProcAddress('glDrawElementArrayAPPLE'); + if not Assigned(glDrawElementArrayAPPLE) then Exit; + glDrawRangeElementArrayAPPLE := wglGetProcAddress('glDrawRangeElementArrayAPPLE'); + if not Assigned(glDrawRangeElementArrayAPPLE) then Exit; + glMultiDrawElementArrayAPPLE := wglGetProcAddress('glMultiDrawElementArrayAPPLE'); + if not Assigned(glMultiDrawElementArrayAPPLE) then Exit; + glMultiDrawRangeElementArrayAPPLE := wglGetProcAddress('glMultiDrawRangeElementArrayAPPLE'); + if not Assigned(glMultiDrawRangeElementArrayAPPLE) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_APPLE_fence: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_APPLE_fence', extstring) then + begin + glGenFencesAPPLE := wglGetProcAddress('glGenFencesAPPLE'); + if not Assigned(glGenFencesAPPLE) then Exit; + glDeleteFencesAPPLE := wglGetProcAddress('glDeleteFencesAPPLE'); + if not Assigned(glDeleteFencesAPPLE) then Exit; + glSetFenceAPPLE := wglGetProcAddress('glSetFenceAPPLE'); + if not Assigned(glSetFenceAPPLE) then Exit; + glIsFenceAPPLE := wglGetProcAddress('glIsFenceAPPLE'); + if not Assigned(glIsFenceAPPLE) then Exit; + glTestFenceAPPLE := wglGetProcAddress('glTestFenceAPPLE'); + if not Assigned(glTestFenceAPPLE) then Exit; + glFinishFenceAPPLE := wglGetProcAddress('glFinishFenceAPPLE'); + if not Assigned(glFinishFenceAPPLE) then Exit; + glTestObjectAPPLE := wglGetProcAddress('glTestObjectAPPLE'); + if not Assigned(glTestObjectAPPLE) then Exit; + glFinishObjectAPPLE := wglGetProcAddress('glFinishObjectAPPLE'); + if not Assigned(glFinishObjectAPPLE) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_APPLE_vertex_array_object: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_APPLE_vertex_array_object', extstring) then + begin + glBindVertexArrayAPPLE := wglGetProcAddress('glBindVertexArrayAPPLE'); + if not Assigned(glBindVertexArrayAPPLE) then Exit; + glDeleteVertexArraysAPPLE := wglGetProcAddress('glDeleteVertexArraysAPPLE'); + if not Assigned(glDeleteVertexArraysAPPLE) then Exit; + glGenVertexArraysAPPLE := wglGetProcAddress('glGenVertexArraysAPPLE'); + if not Assigned(glGenVertexArraysAPPLE) then Exit; + glIsVertexArrayAPPLE := wglGetProcAddress('glIsVertexArrayAPPLE'); + if not Assigned(glIsVertexArrayAPPLE) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_APPLE_vertex_array_range: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_APPLE_vertex_array_range', extstring) then + begin + glVertexArrayRangeAPPLE := wglGetProcAddress('glVertexArrayRangeAPPLE'); + if not Assigned(glVertexArrayRangeAPPLE) then Exit; + glFlushVertexArrayRangeAPPLE := wglGetProcAddress('glFlushVertexArrayRangeAPPLE'); + if not Assigned(glFlushVertexArrayRangeAPPLE) then Exit; + glVertexArrayParameteriAPPLE := wglGetProcAddress('glVertexArrayParameteriAPPLE'); + if not Assigned(glVertexArrayParameteriAPPLE) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_ARB_pixel_format: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_ARB_pixel_format', extstring) then + begin + wglGetPixelFormatAttribivARB := wglGetProcAddress('wglGetPixelFormatAttribivARB'); + if not Assigned(wglGetPixelFormatAttribivARB) then Exit; + wglGetPixelFormatAttribfvARB := wglGetProcAddress('wglGetPixelFormatAttribfvARB'); + if not Assigned(wglGetPixelFormatAttribfvARB) then Exit; + wglChoosePixelFormatARB := wglGetProcAddress('wglChoosePixelFormatARB'); + if not Assigned(wglChoosePixelFormatARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_ARB_make_current_read: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_ARB_make_current_read', extstring) then + begin + wglMakeContextCurrentARB := wglGetProcAddress('wglMakeContextCurrentARB'); + if not Assigned(wglMakeContextCurrentARB) then Exit; + wglGetCurrentReadDCARB := wglGetProcAddress('wglGetCurrentReadDCARB'); + if not Assigned(wglGetCurrentReadDCARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_ARB_pbuffer: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_ARB_pbuffer', extstring) then + begin + wglCreatePbufferARB := wglGetProcAddress('wglCreatePbufferARB'); + if not Assigned(wglCreatePbufferARB) then Exit; + wglGetPbufferDCARB := wglGetProcAddress('wglGetPbufferDCARB'); + if not Assigned(wglGetPbufferDCARB) then Exit; + wglReleasePbufferDCARB := wglGetProcAddress('wglReleasePbufferDCARB'); + if not Assigned(wglReleasePbufferDCARB) then Exit; + wglDestroyPbufferARB := wglGetProcAddress('wglDestroyPbufferARB'); + if not Assigned(wglDestroyPbufferARB) then Exit; + wglQueryPbufferARB := wglGetProcAddress('wglQueryPbufferARB'); + if not Assigned(wglQueryPbufferARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_EXT_swap_control: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_EXT_swap_control', extstring) then + begin + wglSwapIntervalEXT := wglGetProcAddress('wglSwapIntervalEXT'); + if not Assigned(wglSwapIntervalEXT) then Exit; + wglGetSwapIntervalEXT := wglGetProcAddress('wglGetSwapIntervalEXT'); + if not Assigned(wglGetSwapIntervalEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_ARB_render_texture: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_ARB_render_texture', extstring) then + begin + wglBindTexImageARB := wglGetProcAddress('wglBindTexImageARB'); + if not Assigned(wglBindTexImageARB) then Exit; + wglReleaseTexImageARB := wglGetProcAddress('wglReleaseTexImageARB'); + if not Assigned(wglReleaseTexImageARB) then Exit; + wglSetPbufferAttribARB := wglGetProcAddress('wglSetPbufferAttribARB'); + if not Assigned(wglSetPbufferAttribARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_EXT_extensions_string: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_EXT_extensions_string', extstring) then + begin + wglGetExtensionsStringEXT := wglGetProcAddress('wglGetExtensionsStringEXT'); + if not Assigned(wglGetExtensionsStringEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_EXT_make_current_read: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_EXT_make_current_read', extstring) then + begin + wglMakeContextCurrentEXT := wglGetProcAddress('wglMakeContextCurrentEXT'); + if not Assigned(wglMakeContextCurrentEXT) then Exit; + wglGetCurrentReadDCEXT := wglGetProcAddress('wglGetCurrentReadDCEXT'); + if not Assigned(wglGetCurrentReadDCEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_EXT_pbuffer: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_EXT_pbuffer', extstring) then + begin + wglCreatePbufferEXT := wglGetProcAddress('wglCreatePbufferEXT'); + if not Assigned(wglCreatePbufferEXT) then Exit; + wglGetPbufferDCEXT := wglGetProcAddress('wglGetPbufferDCEXT'); + if not Assigned(wglGetPbufferDCEXT) then Exit; + wglReleasePbufferDCEXT := wglGetProcAddress('wglReleasePbufferDCEXT'); + if not Assigned(wglReleasePbufferDCEXT) then Exit; + wglDestroyPbufferEXT := wglGetProcAddress('wglDestroyPbufferEXT'); + if not Assigned(wglDestroyPbufferEXT) then Exit; + wglQueryPbufferEXT := wglGetProcAddress('wglQueryPbufferEXT'); + if not Assigned(wglQueryPbufferEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_EXT_pixel_format: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_EXT_pixel_format', extstring) then + begin + wglGetPixelFormatAttribivEXT := wglGetProcAddress('wglGetPixelFormatAttribivEXT'); + if not Assigned(wglGetPixelFormatAttribivEXT) then Exit; + wglGetPixelFormatAttribfvEXT := wglGetProcAddress('wglGetPixelFormatAttribfvEXT'); + if not Assigned(wglGetPixelFormatAttribfvEXT) then Exit; + wglChoosePixelFormatEXT := wglGetProcAddress('wglChoosePixelFormatEXT'); + if not Assigned(wglChoosePixelFormatEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_I3D_digital_video_control: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_I3D_digital_video_control', extstring) then + begin + wglGetDigitalVideoParametersI3D := wglGetProcAddress('wglGetDigitalVideoParametersI3D'); + if not Assigned(wglGetDigitalVideoParametersI3D) then Exit; + wglSetDigitalVideoParametersI3D := wglGetProcAddress('wglSetDigitalVideoParametersI3D'); + if not Assigned(wglSetDigitalVideoParametersI3D) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_I3D_gamma: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_I3D_gamma', extstring) then + begin + wglGetGammaTableParametersI3D := wglGetProcAddress('wglGetGammaTableParametersI3D'); + if not Assigned(wglGetGammaTableParametersI3D) then Exit; + wglSetGammaTableParametersI3D := wglGetProcAddress('wglSetGammaTableParametersI3D'); + if not Assigned(wglSetGammaTableParametersI3D) then Exit; + wglGetGammaTableI3D := wglGetProcAddress('wglGetGammaTableI3D'); + if not Assigned(wglGetGammaTableI3D) then Exit; + wglSetGammaTableI3D := wglGetProcAddress('wglSetGammaTableI3D'); + if not Assigned(wglSetGammaTableI3D) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_I3D_genlock: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_I3D_genlock', extstring) then + begin + wglEnableGenlockI3D := wglGetProcAddress('wglEnableGenlockI3D'); + if not Assigned(wglEnableGenlockI3D) then Exit; + wglDisableGenlockI3D := wglGetProcAddress('wglDisableGenlockI3D'); + if not Assigned(wglDisableGenlockI3D) then Exit; + wglIsEnabledGenlockI3D := wglGetProcAddress('wglIsEnabledGenlockI3D'); + if not Assigned(wglIsEnabledGenlockI3D) then Exit; + wglGenlockSourceI3D := wglGetProcAddress('wglGenlockSourceI3D'); + if not Assigned(wglGenlockSourceI3D) then Exit; + wglGetGenlockSourceI3D := wglGetProcAddress('wglGetGenlockSourceI3D'); + if not Assigned(wglGetGenlockSourceI3D) then Exit; + wglGenlockSourceEdgeI3D := wglGetProcAddress('wglGenlockSourceEdgeI3D'); + if not Assigned(wglGenlockSourceEdgeI3D) then Exit; + wglGetGenlockSourceEdgeI3D := wglGetProcAddress('wglGetGenlockSourceEdgeI3D'); + if not Assigned(wglGetGenlockSourceEdgeI3D) then Exit; + wglGenlockSampleRateI3D := wglGetProcAddress('wglGenlockSampleRateI3D'); + if not Assigned(wglGenlockSampleRateI3D) then Exit; + wglGetGenlockSampleRateI3D := wglGetProcAddress('wglGetGenlockSampleRateI3D'); + if not Assigned(wglGetGenlockSampleRateI3D) then Exit; + wglGenlockSourceDelayI3D := wglGetProcAddress('wglGenlockSourceDelayI3D'); + if not Assigned(wglGenlockSourceDelayI3D) then Exit; + wglGetGenlockSourceDelayI3D := wglGetProcAddress('wglGetGenlockSourceDelayI3D'); + if not Assigned(wglGetGenlockSourceDelayI3D) then Exit; + wglQueryGenlockMaxSourceDelayI3D := wglGetProcAddress('wglQueryGenlockMaxSourceDelayI3D'); + if not Assigned(wglQueryGenlockMaxSourceDelayI3D) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_matrix_palette: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_matrix_palette', extstring) then + begin + glCurrentPaletteMatrixARB := wglGetProcAddress('glCurrentPaletteMatrixARB'); + if not Assigned(glCurrentPaletteMatrixARB) then Exit; + glMatrixIndexubvARB := wglGetProcAddress('glMatrixIndexubvARB'); + if not Assigned(glMatrixIndexubvARB) then Exit; + glMatrixIndexusvARB := wglGetProcAddress('glMatrixIndexusvARB'); + if not Assigned(glMatrixIndexusvARB) then Exit; + glMatrixIndexuivARB := wglGetProcAddress('glMatrixIndexuivARB'); + if not Assigned(glMatrixIndexuivARB) then Exit; + glMatrixIndexPointerARB := wglGetProcAddress('glMatrixIndexPointerARB'); + if not Assigned(glMatrixIndexPointerARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_element_array: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_element_array', extstring) then + begin + glElementPointerNV := wglGetProcAddress('glElementPointerNV'); + if not Assigned(glElementPointerNV) then Exit; + glDrawElementArrayNV := wglGetProcAddress('glDrawElementArrayNV'); + if not Assigned(glDrawElementArrayNV) then Exit; + glDrawRangeElementArrayNV := wglGetProcAddress('glDrawRangeElementArrayNV'); + if not Assigned(glDrawRangeElementArrayNV) then Exit; + glMultiDrawElementArrayNV := wglGetProcAddress('glMultiDrawElementArrayNV'); + if not Assigned(glMultiDrawElementArrayNV) then Exit; + glMultiDrawRangeElementArrayNV := wglGetProcAddress('glMultiDrawRangeElementArrayNV'); + if not Assigned(glMultiDrawRangeElementArrayNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_float_buffer: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_float_buffer', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_fragment_program: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_fragment_program', extstring) then + begin + glProgramNamedParameter4fNV := wglGetProcAddress('glProgramNamedParameter4fNV'); + if not Assigned(glProgramNamedParameter4fNV) then Exit; + glProgramNamedParameter4dNV := wglGetProcAddress('glProgramNamedParameter4dNV'); + if not Assigned(glProgramNamedParameter4dNV) then Exit; + glGetProgramNamedParameterfvNV := wglGetProcAddress('glGetProgramNamedParameterfvNV'); + if not Assigned(glGetProgramNamedParameterfvNV) then Exit; + glGetProgramNamedParameterdvNV := wglGetProcAddress('glGetProgramNamedParameterdvNV'); + if not Assigned(glGetProgramNamedParameterdvNV) then Exit; + glProgramLocalParameter4dARB := wglGetProcAddress('glProgramLocalParameter4dARB'); + if not Assigned(glProgramLocalParameter4dARB) then Exit; + glProgramLocalParameter4dvARB := wglGetProcAddress('glProgramLocalParameter4dvARB'); + if not Assigned(glProgramLocalParameter4dvARB) then Exit; + glProgramLocalParameter4fARB := wglGetProcAddress('glProgramLocalParameter4fARB'); + if not Assigned(glProgramLocalParameter4fARB) then Exit; + glProgramLocalParameter4fvARB := wglGetProcAddress('glProgramLocalParameter4fvARB'); + if not Assigned(glProgramLocalParameter4fvARB) then Exit; + glGetProgramLocalParameterdvARB := wglGetProcAddress('glGetProgramLocalParameterdvARB'); + if not Assigned(glGetProgramLocalParameterdvARB) then Exit; + glGetProgramLocalParameterfvARB := wglGetProcAddress('glGetProgramLocalParameterfvARB'); + if not Assigned(glGetProgramLocalParameterfvARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_primitive_restart: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_primitive_restart', extstring) then + begin + glPrimitiveRestartNV := wglGetProcAddress('glPrimitiveRestartNV'); + if not Assigned(glPrimitiveRestartNV) then Exit; + glPrimitiveRestartIndexNV := wglGetProcAddress('glPrimitiveRestartIndexNV'); + if not Assigned(glPrimitiveRestartIndexNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_vertex_program2: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_vertex_program2', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_WGL_NV_render_texture_rectangle: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_NV_render_texture_rectangle', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_pixel_data_range: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_pixel_data_range', extstring) then + begin + glPixelDataRangeNV := wglGetProcAddress('glPixelDataRangeNV'); + if not Assigned(glPixelDataRangeNV) then Exit; + glFlushPixelDataRangeNV := wglGetProcAddress('glFlushPixelDataRangeNV'); + if not Assigned(glFlushPixelDataRangeNV) then Exit; + wglAllocateMemoryNV := wglGetProcAddress('wglAllocateMemoryNV'); + if not Assigned(wglAllocateMemoryNV) then Exit; + wglFreeMemoryNV := wglGetProcAddress('wglFreeMemoryNV'); + if not Assigned(wglFreeMemoryNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture_rectangle: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture_rectangle', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_S3_s3tc: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_S3_s3tc', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ATI_draw_buffers: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_draw_buffers', extstring) then + begin + glDrawBuffersATI := wglGetProcAddress('glDrawBuffersATI'); + if not Assigned(glDrawBuffersATI) then Exit; + Result := TRUE; + end; + +end; + +function Load_WGL_ATI_pixel_format_float: Boolean; +var + extstring: String; +begin + + Result := FALSE; + wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB'); + if not Assigned(wglGetExtensionsStringARB) then Exit; + extstring := String(PChar(wglGetExtensionsStringARB(wglGetCurrentDC))); + + if glext_ExtensionSupported('WGL_ATI_pixel_format_float', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ATI_texture_env_combine3: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_texture_env_combine3', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ATI_texture_float: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_texture_float', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_texture_expand_normal: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_texture_expand_normal', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_half_float: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_half_float', extstring) then + begin + glVertex2hNV := wglGetProcAddress('glVertex2hNV'); + if not Assigned(glVertex2hNV) then Exit; + glVertex2hvNV := wglGetProcAddress('glVertex2hvNV'); + if not Assigned(glVertex2hvNV) then Exit; + glVertex3hNV := wglGetProcAddress('glVertex3hNV'); + if not Assigned(glVertex3hNV) then Exit; + glVertex3hvNV := wglGetProcAddress('glVertex3hvNV'); + if not Assigned(glVertex3hvNV) then Exit; + glVertex4hNV := wglGetProcAddress('glVertex4hNV'); + if not Assigned(glVertex4hNV) then Exit; + glVertex4hvNV := wglGetProcAddress('glVertex4hvNV'); + if not Assigned(glVertex4hvNV) then Exit; + glNormal3hNV := wglGetProcAddress('glNormal3hNV'); + if not Assigned(glNormal3hNV) then Exit; + glNormal3hvNV := wglGetProcAddress('glNormal3hvNV'); + if not Assigned(glNormal3hvNV) then Exit; + glColor3hNV := wglGetProcAddress('glColor3hNV'); + if not Assigned(glColor3hNV) then Exit; + glColor3hvNV := wglGetProcAddress('glColor3hvNV'); + if not Assigned(glColor3hvNV) then Exit; + glColor4hNV := wglGetProcAddress('glColor4hNV'); + if not Assigned(glColor4hNV) then Exit; + glColor4hvNV := wglGetProcAddress('glColor4hvNV'); + if not Assigned(glColor4hvNV) then Exit; + glTexCoord1hNV := wglGetProcAddress('glTexCoord1hNV'); + if not Assigned(glTexCoord1hNV) then Exit; + glTexCoord1hvNV := wglGetProcAddress('glTexCoord1hvNV'); + if not Assigned(glTexCoord1hvNV) then Exit; + glTexCoord2hNV := wglGetProcAddress('glTexCoord2hNV'); + if not Assigned(glTexCoord2hNV) then Exit; + glTexCoord2hvNV := wglGetProcAddress('glTexCoord2hvNV'); + if not Assigned(glTexCoord2hvNV) then Exit; + glTexCoord3hNV := wglGetProcAddress('glTexCoord3hNV'); + if not Assigned(glTexCoord3hNV) then Exit; + glTexCoord3hvNV := wglGetProcAddress('glTexCoord3hvNV'); + if not Assigned(glTexCoord3hvNV) then Exit; + glTexCoord4hNV := wglGetProcAddress('glTexCoord4hNV'); + if not Assigned(glTexCoord4hNV) then Exit; + glTexCoord4hvNV := wglGetProcAddress('glTexCoord4hvNV'); + if not Assigned(glTexCoord4hvNV) then Exit; + glMultiTexCoord1hNV := wglGetProcAddress('glMultiTexCoord1hNV'); + if not Assigned(glMultiTexCoord1hNV) then Exit; + glMultiTexCoord1hvNV := wglGetProcAddress('glMultiTexCoord1hvNV'); + if not Assigned(glMultiTexCoord1hvNV) then Exit; + glMultiTexCoord2hNV := wglGetProcAddress('glMultiTexCoord2hNV'); + if not Assigned(glMultiTexCoord2hNV) then Exit; + glMultiTexCoord2hvNV := wglGetProcAddress('glMultiTexCoord2hvNV'); + if not Assigned(glMultiTexCoord2hvNV) then Exit; + glMultiTexCoord3hNV := wglGetProcAddress('glMultiTexCoord3hNV'); + if not Assigned(glMultiTexCoord3hNV) then Exit; + glMultiTexCoord3hvNV := wglGetProcAddress('glMultiTexCoord3hvNV'); + if not Assigned(glMultiTexCoord3hvNV) then Exit; + glMultiTexCoord4hNV := wglGetProcAddress('glMultiTexCoord4hNV'); + if not Assigned(glMultiTexCoord4hNV) then Exit; + glMultiTexCoord4hvNV := wglGetProcAddress('glMultiTexCoord4hvNV'); + if not Assigned(glMultiTexCoord4hvNV) then Exit; + glFogCoordhNV := wglGetProcAddress('glFogCoordhNV'); + if not Assigned(glFogCoordhNV) then Exit; + glFogCoordhvNV := wglGetProcAddress('glFogCoordhvNV'); + if not Assigned(glFogCoordhvNV) then Exit; + glSecondaryColor3hNV := wglGetProcAddress('glSecondaryColor3hNV'); + if not Assigned(glSecondaryColor3hNV) then Exit; + glSecondaryColor3hvNV := wglGetProcAddress('glSecondaryColor3hvNV'); + if not Assigned(glSecondaryColor3hvNV) then Exit; + glVertexWeighthNV := wglGetProcAddress('glVertexWeighthNV'); + if not Assigned(glVertexWeighthNV) then Exit; + glVertexWeighthvNV := wglGetProcAddress('glVertexWeighthvNV'); + if not Assigned(glVertexWeighthvNV) then Exit; + glVertexAttrib1hNV := wglGetProcAddress('glVertexAttrib1hNV'); + if not Assigned(glVertexAttrib1hNV) then Exit; + glVertexAttrib1hvNV := wglGetProcAddress('glVertexAttrib1hvNV'); + if not Assigned(glVertexAttrib1hvNV) then Exit; + glVertexAttrib2hNV := wglGetProcAddress('glVertexAttrib2hNV'); + if not Assigned(glVertexAttrib2hNV) then Exit; + glVertexAttrib2hvNV := wglGetProcAddress('glVertexAttrib2hvNV'); + if not Assigned(glVertexAttrib2hvNV) then Exit; + glVertexAttrib3hNV := wglGetProcAddress('glVertexAttrib3hNV'); + if not Assigned(glVertexAttrib3hNV) then Exit; + glVertexAttrib3hvNV := wglGetProcAddress('glVertexAttrib3hvNV'); + if not Assigned(glVertexAttrib3hvNV) then Exit; + glVertexAttrib4hNV := wglGetProcAddress('glVertexAttrib4hNV'); + if not Assigned(glVertexAttrib4hNV) then Exit; + glVertexAttrib4hvNV := wglGetProcAddress('glVertexAttrib4hvNV'); + if not Assigned(glVertexAttrib4hvNV) then Exit; + glVertexAttribs1hvNV := wglGetProcAddress('glVertexAttribs1hvNV'); + if not Assigned(glVertexAttribs1hvNV) then Exit; + glVertexAttribs2hvNV := wglGetProcAddress('glVertexAttribs2hvNV'); + if not Assigned(glVertexAttribs2hvNV) then Exit; + glVertexAttribs3hvNV := wglGetProcAddress('glVertexAttribs3hvNV'); + if not Assigned(glVertexAttribs3hvNV) then Exit; + glVertexAttribs4hvNV := wglGetProcAddress('glVertexAttribs4hvNV'); + if not Assigned(glVertexAttribs4hvNV) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ATI_map_object_buffer: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_map_object_buffer', extstring) then + begin + glMapObjectBufferATI := wglGetProcAddress('glMapObjectBufferATI'); + if not Assigned(glMapObjectBufferATI) then Exit; + glUnmapObjectBufferATI := wglGetProcAddress('glUnmapObjectBufferATI'); + if not Assigned(glUnmapObjectBufferATI) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ATI_separate_stencil: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_separate_stencil', extstring) then + begin + glStencilOpSeparateATI := wglGetProcAddress('glStencilOpSeparateATI'); + if not Assigned(glStencilOpSeparateATI) then Exit; + glStencilFuncSeparateATI := wglGetProcAddress('glStencilFuncSeparateATI'); + if not Assigned(glStencilFuncSeparateATI) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ATI_vertex_attrib_array_object: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ATI_vertex_attrib_array_object', extstring) then + begin + glVertexAttribArrayObjectATI := wglGetProcAddress('glVertexAttribArrayObjectATI'); + if not Assigned(glVertexAttribArrayObjectATI) then Exit; + glGetVertexAttribArrayObjectfvATI := wglGetProcAddress('glGetVertexAttribArrayObjectfvATI'); + if not Assigned(glGetVertexAttribArrayObjectfvATI) then Exit; + glGetVertexAttribArrayObjectivATI := wglGetProcAddress('glGetVertexAttribArrayObjectivATI'); + if not Assigned(glGetVertexAttribArrayObjectivATI) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_vertex_buffer_object: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_vertex_buffer_object', extstring) then + begin + glBindBufferARB := wglGetProcAddress('glBindBufferARB'); + if not Assigned(glBindBufferARB) then Exit; + glDeleteBuffersARB := wglGetProcAddress('glDeleteBuffersARB'); + if not Assigned(glDeleteBuffersARB) then Exit; + glGenBuffersARB := wglGetProcAddress('glGenBuffersARB'); + if not Assigned(glGenBuffersARB) then Exit; + glIsBufferARB := wglGetProcAddress('glIsBufferARB'); + if not Assigned(glIsBufferARB) then Exit; + glBufferDataARB := wglGetProcAddress('glBufferDataARB'); + if not Assigned(glBufferDataARB) then Exit; + glBufferSubDataARB := wglGetProcAddress('glBufferSubDataARB'); + if not Assigned(glBufferSubDataARB) then Exit; + glGetBufferSubDataARB := wglGetProcAddress('glGetBufferSubDataARB'); + if not Assigned(glGetBufferSubDataARB) then Exit; + glMapBufferARB := wglGetProcAddress('glMapBufferARB'); + if not Assigned(glMapBufferARB) then Exit; + glUnmapBufferARB := wglGetProcAddress('glUnmapBufferARB'); + if not Assigned(glUnmapBufferARB) then Exit; + glGetBufferParameterivARB := wglGetProcAddress('glGetBufferParameterivARB'); + if not Assigned(glGetBufferParameterivARB) then Exit; + glGetBufferPointervARB := wglGetProcAddress('glGetBufferPointervARB'); + if not Assigned(glGetBufferPointervARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_occlusion_query: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_occlusion_query', extstring) then + begin + glGenQueriesARB := wglGetProcAddress('glGenQueriesARB'); + if not Assigned(glGenQueriesARB) then Exit; + glDeleteQueriesARB := wglGetProcAddress('glDeleteQueriesARB'); + if not Assigned(glDeleteQueriesARB) then Exit; + glIsQueryARB := wglGetProcAddress('glIsQueryARB'); + if not Assigned(glIsQueryARB) then Exit; + glBeginQueryARB := wglGetProcAddress('glBeginQueryARB'); + if not Assigned(glBeginQueryARB) then Exit; + glEndQueryARB := wglGetProcAddress('glEndQueryARB'); + if not Assigned(glEndQueryARB) then Exit; + glGetQueryivARB := wglGetProcAddress('glGetQueryivARB'); + if not Assigned(glGetQueryivARB) then Exit; + glGetQueryObjectivARB := wglGetProcAddress('glGetQueryObjectivARB'); + if not Assigned(glGetQueryObjectivARB) then Exit; + glGetQueryObjectuivARB := wglGetProcAddress('glGetQueryObjectuivARB'); + if not Assigned(glGetQueryObjectuivARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_shader_objects: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_shader_objects', extstring) then + begin + glDeleteObjectARB := wglGetProcAddress('glDeleteObjectARB'); + if not Assigned(glDeleteObjectARB) then Exit; + glGetHandleARB := wglGetProcAddress('glGetHandleARB'); + if not Assigned(glGetHandleARB) then Exit; + glDetachObjectARB := wglGetProcAddress('glDetachObjectARB'); + if not Assigned(glDetachObjectARB) then Exit; + glCreateShaderObjectARB := wglGetProcAddress('glCreateShaderObjectARB'); + if not Assigned(glCreateShaderObjectARB) then Exit; + glShaderSourceARB := wglGetProcAddress('glShaderSourceARB'); + if not Assigned(glShaderSourceARB) then Exit; + glCompileShaderARB := wglGetProcAddress('glCompileShaderARB'); + if not Assigned(glCompileShaderARB) then Exit; + glCreateProgramObjectARB := wglGetProcAddress('glCreateProgramObjectARB'); + if not Assigned(glCreateProgramObjectARB) then Exit; + glAttachObjectARB := wglGetProcAddress('glAttachObjectARB'); + if not Assigned(glAttachObjectARB) then Exit; + glLinkProgramARB := wglGetProcAddress('glLinkProgramARB'); + if not Assigned(glLinkProgramARB) then Exit; + glUseProgramObjectARB := wglGetProcAddress('glUseProgramObjectARB'); + if not Assigned(glUseProgramObjectARB) then Exit; + glValidateProgramARB := wglGetProcAddress('glValidateProgramARB'); + if not Assigned(glValidateProgramARB) then Exit; + glUniform1fARB := wglGetProcAddress('glUniform1fARB'); + if not Assigned(glUniform1fARB) then Exit; + glUniform2fARB := wglGetProcAddress('glUniform2fARB'); + if not Assigned(glUniform2fARB) then Exit; + glUniform3fARB := wglGetProcAddress('glUniform3fARB'); + if not Assigned(glUniform3fARB) then Exit; + glUniform4fARB := wglGetProcAddress('glUniform4fARB'); + if not Assigned(glUniform4fARB) then Exit; + glUniform1iARB := wglGetProcAddress('glUniform1iARB'); + if not Assigned(glUniform1iARB) then Exit; + glUniform2iARB := wglGetProcAddress('glUniform2iARB'); + if not Assigned(glUniform2iARB) then Exit; + glUniform3iARB := wglGetProcAddress('glUniform3iARB'); + if not Assigned(glUniform3iARB) then Exit; + glUniform4iARB := wglGetProcAddress('glUniform4iARB'); + if not Assigned(glUniform4iARB) then Exit; + glUniform1fvARB := wglGetProcAddress('glUniform1fvARB'); + if not Assigned(glUniform1fvARB) then Exit; + glUniform2fvARB := wglGetProcAddress('glUniform2fvARB'); + if not Assigned(glUniform2fvARB) then Exit; + glUniform3fvARB := wglGetProcAddress('glUniform3fvARB'); + if not Assigned(glUniform3fvARB) then Exit; + glUniform4fvARB := wglGetProcAddress('glUniform4fvARB'); + if not Assigned(glUniform4fvARB) then Exit; + glUniform1ivARB := wglGetProcAddress('glUniform1ivARB'); + if not Assigned(glUniform1ivARB) then Exit; + glUniform2ivARB := wglGetProcAddress('glUniform2ivARB'); + if not Assigned(glUniform2ivARB) then Exit; + glUniform3ivARB := wglGetProcAddress('glUniform3ivARB'); + if not Assigned(glUniform3ivARB) then Exit; + glUniform4ivARB := wglGetProcAddress('glUniform4ivARB'); + if not Assigned(glUniform4ivARB) then Exit; + glUniformMatrix2fvARB := wglGetProcAddress('glUniformMatrix2fvARB'); + if not Assigned(glUniformMatrix2fvARB) then Exit; + glUniformMatrix3fvARB := wglGetProcAddress('glUniformMatrix3fvARB'); + if not Assigned(glUniformMatrix3fvARB) then Exit; + glUniformMatrix4fvARB := wglGetProcAddress('glUniformMatrix4fvARB'); + if not Assigned(glUniformMatrix4fvARB) then Exit; + glGetObjectParameterfvARB := wglGetProcAddress('glGetObjectParameterfvARB'); + if not Assigned(glGetObjectParameterfvARB) then Exit; + glGetObjectParameterivARB := wglGetProcAddress('glGetObjectParameterivARB'); + if not Assigned(glGetObjectParameterivARB) then Exit; + glGetInfoLogARB := wglGetProcAddress('glGetInfoLogARB'); + if not Assigned(glGetInfoLogARB) then Exit; + glGetAttachedObjectsARB := wglGetProcAddress('glGetAttachedObjectsARB'); + if not Assigned(glGetAttachedObjectsARB) then Exit; + glGetUniformLocationARB := wglGetProcAddress('glGetUniformLocationARB'); + if not Assigned(glGetUniformLocationARB) then Exit; + glGetActiveUniformARB := wglGetProcAddress('glGetActiveUniformARB'); + if not Assigned(glGetActiveUniformARB) then Exit; + glGetUniformfvARB := wglGetProcAddress('glGetUniformfvARB'); + if not Assigned(glGetUniformfvARB) then Exit; + glGetUniformivARB := wglGetProcAddress('glGetUniformivARB'); + if not Assigned(glGetUniformivARB) then Exit; + glGetShaderSourceARB := wglGetProcAddress('glGetShaderSourceARB'); + if not Assigned(glGetShaderSourceARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_vertex_shader: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_vertex_shader', extstring) then + begin + glVertexAttrib1fARB := wglGetProcAddress('glVertexAttrib1fARB'); + if not Assigned(glVertexAttrib1fARB) then Exit; + glVertexAttrib1sARB := wglGetProcAddress('glVertexAttrib1sARB'); + if not Assigned(glVertexAttrib1sARB) then Exit; + glVertexAttrib1dARB := wglGetProcAddress('glVertexAttrib1dARB'); + if not Assigned(glVertexAttrib1dARB) then Exit; + glVertexAttrib2fARB := wglGetProcAddress('glVertexAttrib2fARB'); + if not Assigned(glVertexAttrib2fARB) then Exit; + glVertexAttrib2sARB := wglGetProcAddress('glVertexAttrib2sARB'); + if not Assigned(glVertexAttrib2sARB) then Exit; + glVertexAttrib2dARB := wglGetProcAddress('glVertexAttrib2dARB'); + if not Assigned(glVertexAttrib2dARB) then Exit; + glVertexAttrib3fARB := wglGetProcAddress('glVertexAttrib3fARB'); + if not Assigned(glVertexAttrib3fARB) then Exit; + glVertexAttrib3sARB := wglGetProcAddress('glVertexAttrib3sARB'); + if not Assigned(glVertexAttrib3sARB) then Exit; + glVertexAttrib3dARB := wglGetProcAddress('glVertexAttrib3dARB'); + if not Assigned(glVertexAttrib3dARB) then Exit; + glVertexAttrib4fARB := wglGetProcAddress('glVertexAttrib4fARB'); + if not Assigned(glVertexAttrib4fARB) then Exit; + glVertexAttrib4sARB := wglGetProcAddress('glVertexAttrib4sARB'); + if not Assigned(glVertexAttrib4sARB) then Exit; + glVertexAttrib4dARB := wglGetProcAddress('glVertexAttrib4dARB'); + if not Assigned(glVertexAttrib4dARB) then Exit; + glVertexAttrib4NubARB := wglGetProcAddress('glVertexAttrib4NubARB'); + if not Assigned(glVertexAttrib4NubARB) then Exit; + glVertexAttrib1fvARB := wglGetProcAddress('glVertexAttrib1fvARB'); + if not Assigned(glVertexAttrib1fvARB) then Exit; + glVertexAttrib1svARB := wglGetProcAddress('glVertexAttrib1svARB'); + if not Assigned(glVertexAttrib1svARB) then Exit; + glVertexAttrib1dvARB := wglGetProcAddress('glVertexAttrib1dvARB'); + if not Assigned(glVertexAttrib1dvARB) then Exit; + glVertexAttrib2fvARB := wglGetProcAddress('glVertexAttrib2fvARB'); + if not Assigned(glVertexAttrib2fvARB) then Exit; + glVertexAttrib2svARB := wglGetProcAddress('glVertexAttrib2svARB'); + if not Assigned(glVertexAttrib2svARB) then Exit; + glVertexAttrib2dvARB := wglGetProcAddress('glVertexAttrib2dvARB'); + if not Assigned(glVertexAttrib2dvARB) then Exit; + glVertexAttrib3fvARB := wglGetProcAddress('glVertexAttrib3fvARB'); + if not Assigned(glVertexAttrib3fvARB) then Exit; + glVertexAttrib3svARB := wglGetProcAddress('glVertexAttrib3svARB'); + if not Assigned(glVertexAttrib3svARB) then Exit; + glVertexAttrib3dvARB := wglGetProcAddress('glVertexAttrib3dvARB'); + if not Assigned(glVertexAttrib3dvARB) then Exit; + glVertexAttrib4fvARB := wglGetProcAddress('glVertexAttrib4fvARB'); + if not Assigned(glVertexAttrib4fvARB) then Exit; + glVertexAttrib4svARB := wglGetProcAddress('glVertexAttrib4svARB'); + if not Assigned(glVertexAttrib4svARB) then Exit; + glVertexAttrib4dvARB := wglGetProcAddress('glVertexAttrib4dvARB'); + if not Assigned(glVertexAttrib4dvARB) then Exit; + glVertexAttrib4ivARB := wglGetProcAddress('glVertexAttrib4ivARB'); + if not Assigned(glVertexAttrib4ivARB) then Exit; + glVertexAttrib4bvARB := wglGetProcAddress('glVertexAttrib4bvARB'); + if not Assigned(glVertexAttrib4bvARB) then Exit; + glVertexAttrib4ubvARB := wglGetProcAddress('glVertexAttrib4ubvARB'); + if not Assigned(glVertexAttrib4ubvARB) then Exit; + glVertexAttrib4usvARB := wglGetProcAddress('glVertexAttrib4usvARB'); + if not Assigned(glVertexAttrib4usvARB) then Exit; + glVertexAttrib4uivARB := wglGetProcAddress('glVertexAttrib4uivARB'); + if not Assigned(glVertexAttrib4uivARB) then Exit; + glVertexAttrib4NbvARB := wglGetProcAddress('glVertexAttrib4NbvARB'); + if not Assigned(glVertexAttrib4NbvARB) then Exit; + glVertexAttrib4NsvARB := wglGetProcAddress('glVertexAttrib4NsvARB'); + if not Assigned(glVertexAttrib4NsvARB) then Exit; + glVertexAttrib4NivARB := wglGetProcAddress('glVertexAttrib4NivARB'); + if not Assigned(glVertexAttrib4NivARB) then Exit; + glVertexAttrib4NubvARB := wglGetProcAddress('glVertexAttrib4NubvARB'); + if not Assigned(glVertexAttrib4NubvARB) then Exit; + glVertexAttrib4NusvARB := wglGetProcAddress('glVertexAttrib4NusvARB'); + if not Assigned(glVertexAttrib4NusvARB) then Exit; + glVertexAttrib4NuivARB := wglGetProcAddress('glVertexAttrib4NuivARB'); + if not Assigned(glVertexAttrib4NuivARB) then Exit; + glVertexAttribPointerARB := wglGetProcAddress('glVertexAttribPointerARB'); + if not Assigned(glVertexAttribPointerARB) then Exit; + glEnableVertexAttribArrayARB := wglGetProcAddress('glEnableVertexAttribArrayARB'); + if not Assigned(glEnableVertexAttribArrayARB) then Exit; + glDisableVertexAttribArrayARB := wglGetProcAddress('glDisableVertexAttribArrayARB'); + if not Assigned(glDisableVertexAttribArrayARB) then Exit; + glBindAttribLocationARB := wglGetProcAddress('glBindAttribLocationARB'); + if not Assigned(glBindAttribLocationARB) then Exit; + glGetActiveAttribARB := wglGetProcAddress('glGetActiveAttribARB'); + if not Assigned(glGetActiveAttribARB) then Exit; + glGetAttribLocationARB := wglGetProcAddress('glGetAttribLocationARB'); + if not Assigned(glGetAttribLocationARB) then Exit; + glGetVertexAttribdvARB := wglGetProcAddress('glGetVertexAttribdvARB'); + if not Assigned(glGetVertexAttribdvARB) then Exit; + glGetVertexAttribfvARB := wglGetProcAddress('glGetVertexAttribfvARB'); + if not Assigned(glGetVertexAttribfvARB) then Exit; + glGetVertexAttribivARB := wglGetProcAddress('glGetVertexAttribivARB'); + if not Assigned(glGetVertexAttribivARB) then Exit; + glGetVertexAttribPointervARB := wglGetProcAddress('glGetVertexAttribPointervARB'); + if not Assigned(glGetVertexAttribPointervARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_fragment_shader: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_fragment_shader', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_shading_language_100: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_shading_language_100', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_non_power_of_two: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_non_power_of_two', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_point_sprite: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_point_sprite', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_depth_bounds_test: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_depth_bounds_test', extstring) then + begin + glDepthBoundsEXT := wglGetProcAddress('glDepthBoundsEXT'); + if not Assigned(glDepthBoundsEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_secondary_color: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_secondary_color', extstring) then + begin + glSecondaryColor3bEXT := wglGetProcAddress('glSecondaryColor3bEXT'); + if not Assigned(glSecondaryColor3bEXT) then Exit; + glSecondaryColor3sEXT := wglGetProcAddress('glSecondaryColor3sEXT'); + if not Assigned(glSecondaryColor3sEXT) then Exit; + glSecondaryColor3iEXT := wglGetProcAddress('glSecondaryColor3iEXT'); + if not Assigned(glSecondaryColor3iEXT) then Exit; + glSecondaryColor3fEXT := wglGetProcAddress('glSecondaryColor3fEXT'); + if not Assigned(glSecondaryColor3fEXT) then Exit; + glSecondaryColor3dEXT := wglGetProcAddress('glSecondaryColor3dEXT'); + if not Assigned(glSecondaryColor3dEXT) then Exit; + glSecondaryColor3ubEXT := wglGetProcAddress('glSecondaryColor3ubEXT'); + if not Assigned(glSecondaryColor3ubEXT) then Exit; + glSecondaryColor3usEXT := wglGetProcAddress('glSecondaryColor3usEXT'); + if not Assigned(glSecondaryColor3usEXT) then Exit; + glSecondaryColor3uiEXT := wglGetProcAddress('glSecondaryColor3uiEXT'); + if not Assigned(glSecondaryColor3uiEXT) then Exit; + glSecondaryColor3bvEXT := wglGetProcAddress('glSecondaryColor3bvEXT'); + if not Assigned(glSecondaryColor3bvEXT) then Exit; + glSecondaryColor3svEXT := wglGetProcAddress('glSecondaryColor3svEXT'); + if not Assigned(glSecondaryColor3svEXT) then Exit; + glSecondaryColor3ivEXT := wglGetProcAddress('glSecondaryColor3ivEXT'); + if not Assigned(glSecondaryColor3ivEXT) then Exit; + glSecondaryColor3fvEXT := wglGetProcAddress('glSecondaryColor3fvEXT'); + if not Assigned(glSecondaryColor3fvEXT) then Exit; + glSecondaryColor3dvEXT := wglGetProcAddress('glSecondaryColor3dvEXT'); + if not Assigned(glSecondaryColor3dvEXT) then Exit; + glSecondaryColor3ubvEXT := wglGetProcAddress('glSecondaryColor3ubvEXT'); + if not Assigned(glSecondaryColor3ubvEXT) then Exit; + glSecondaryColor3usvEXT := wglGetProcAddress('glSecondaryColor3usvEXT'); + if not Assigned(glSecondaryColor3usvEXT) then Exit; + glSecondaryColor3uivEXT := wglGetProcAddress('glSecondaryColor3uivEXT'); + if not Assigned(glSecondaryColor3uivEXT) then Exit; + glSecondaryColorPointerEXT := wglGetProcAddress('glSecondaryColorPointerEXT'); + if not Assigned(glSecondaryColorPointerEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture_mirror_clamp: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture_mirror_clamp', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_blend_equation_separate: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_blend_equation_separate', extstring) then + begin + glBlendEquationSeparateEXT := wglGetProcAddress('glBlendEquationSeparateEXT'); + if not Assigned(glBlendEquationSeparateEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_MESA_pack_invert: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_MESA_pack_invert', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_MESA_ycbcr_texture: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_MESA_ycbcr_texture', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_fragment_program_shadow: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_fragment_program_shadow', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_fog_coord: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_fog_coord', extstring) then + begin + glFogCoordfEXT := wglGetProcAddress('glFogCoordfEXT'); + if not Assigned(glFogCoordfEXT) then Exit; + glFogCoorddEXT := wglGetProcAddress('glFogCoorddEXT'); + if not Assigned(glFogCoorddEXT) then Exit; + glFogCoordfvEXT := wglGetProcAddress('glFogCoordfvEXT'); + if not Assigned(glFogCoordfvEXT) then Exit; + glFogCoorddvEXT := wglGetProcAddress('glFogCoorddvEXT'); + if not Assigned(glFogCoorddvEXT) then Exit; + glFogCoordPointerEXT := wglGetProcAddress('glFogCoordPointerEXT'); + if not Assigned(glFogCoordPointerEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_NV_fragment_program_option: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_fragment_program_option', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_pixel_buffer_object: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_pixel_buffer_object', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_fragment_program2: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_fragment_program2', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_vertex_program2_option: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_vertex_program2_option', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_NV_vertex_program3: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_NV_vertex_program3', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_draw_buffers: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_draw_buffers', extstring) then + begin + glDrawBuffersARB := wglGetProcAddress('glDrawBuffersARB'); + if not Assigned(glDrawBuffersARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_rectangle: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_rectangle', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_color_buffer_float: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_color_buffer_float', extstring) then + begin + glClampColorARB := wglGetProcAddress('glClampColorARB'); + if not Assigned(glClampColorARB) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_ARB_half_float_pixel: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_half_float_pixel', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_texture_float: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_texture_float', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_texture_compression_dxt1: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_texture_compression_dxt1', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_ARB_pixel_buffer_object: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_ARB_pixel_buffer_object', extstring) then + begin + Result := TRUE; + end; + +end; + +function Load_GL_EXT_framebuffer_object: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + if glext_ExtensionSupported('GL_EXT_framebuffer_object', extstring) then + begin + glIsRenderbufferEXT := wglGetProcAddress('glIsRenderbufferEXT'); + if not Assigned(glIsRenderbufferEXT) then Exit; + glBindRenderbufferEXT := wglGetProcAddress('glBindRenderbufferEXT'); + if not Assigned(glBindRenderbufferEXT) then Exit; + glDeleteRenderbuffersEXT := wglGetProcAddress('glDeleteRenderbuffersEXT'); + if not Assigned(glDeleteRenderbuffersEXT) then Exit; + glGenRenderbuffersEXT := wglGetProcAddress('glGenRenderbuffersEXT'); + if not Assigned(glGenRenderbuffersEXT) then Exit; + glRenderbufferStorageEXT := wglGetProcAddress('glRenderbufferStorageEXT'); + if not Assigned(glRenderbufferStorageEXT) then Exit; + glGetRenderbufferParameterivEXT := wglGetProcAddress('glGetRenderbufferParameterivEXT'); + if not Assigned(glGetRenderbufferParameterivEXT) then Exit; + glIsFramebufferEXT := wglGetProcAddress('glIsFramebufferEXT'); + if not Assigned(glIsFramebufferEXT) then Exit; + glBindFramebufferEXT := wglGetProcAddress('glBindFramebufferEXT'); + if not Assigned(glBindFramebufferEXT) then Exit; + glDeleteFramebuffersEXT := wglGetProcAddress('glDeleteFramebuffersEXT'); + if not Assigned(glDeleteFramebuffersEXT) then Exit; + glGenFramebuffersEXT := wglGetProcAddress('glGenFramebuffersEXT'); + if not Assigned(glGenFramebuffersEXT) then Exit; + glCheckFramebufferStatusEXT := wglGetProcAddress('glCheckFramebufferStatusEXT'); + if not Assigned(glCheckFramebufferStatusEXT) then Exit; + glFramebufferTexture1DEXT := wglGetProcAddress('glFramebufferTexture1DEXT'); + if not Assigned(glFramebufferTexture1DEXT) then Exit; + glFramebufferTexture2DEXT := wglGetProcAddress('glFramebufferTexture2DEXT'); + if not Assigned(glFramebufferTexture2DEXT) then Exit; + glFramebufferTexture3DEXT := wglGetProcAddress('glFramebufferTexture3DEXT'); + if not Assigned(glFramebufferTexture3DEXT) then Exit; + glFramebufferRenderbufferEXT := wglGetProcAddress('glFramebufferRenderbufferEXT'); + if not Assigned(glFramebufferRenderbufferEXT) then Exit; + glGetFramebufferAttachmentParameterivEXT := wglGetProcAddress('glGetFramebufferAttachmentParameterivEXT'); + if not Assigned(glGetFramebufferAttachmentParameterivEXT) then Exit; + glGenerateMipmapEXT := wglGetProcAddress('glGenerateMipmapEXT'); + if not Assigned(glGenerateMipmapEXT) then Exit; + Result := TRUE; + end; + +end; + +function Load_GL_version_1_4: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + glBlendFuncSeparate := wglGetProcAddress('glBlendFuncSeparate'); + if not Assigned(glBlendFuncSeparate) then Exit; + glFogCoordf := wglGetProcAddress('glFogCoordf'); + if not Assigned(glFogCoordf) then Exit; + glFogCoordfv := wglGetProcAddress('glFogCoordfv'); + if not Assigned(glFogCoordfv) then Exit; + glFogCoordd := wglGetProcAddress('glFogCoordd'); + if not Assigned(glFogCoordd) then Exit; + glFogCoorddv := wglGetProcAddress('glFogCoorddv'); + if not Assigned(glFogCoorddv) then Exit; + glFogCoordPointer := wglGetProcAddress('glFogCoordPointer'); + if not Assigned(glFogCoordPointer) then Exit; + glMultiDrawArrays := wglGetProcAddress('glMultiDrawArrays'); + if not Assigned(glMultiDrawArrays) then Exit; + glMultiDrawElements := wglGetProcAddress('glMultiDrawElements'); + if not Assigned(glMultiDrawElements) then Exit; + glPointParameterf := wglGetProcAddress('glPointParameterf'); + if not Assigned(glPointParameterf) then Exit; + glPointParameterfv := wglGetProcAddress('glPointParameterfv'); + if not Assigned(glPointParameterfv) then Exit; + glPointParameteri := wglGetProcAddress('glPointParameteri'); + if not Assigned(glPointParameteri) then Exit; + glPointParameteriv := wglGetProcAddress('glPointParameteriv'); + if not Assigned(glPointParameteriv) then Exit; + glSecondaryColor3b := wglGetProcAddress('glSecondaryColor3b'); + if not Assigned(glSecondaryColor3b) then Exit; + glSecondaryColor3bv := wglGetProcAddress('glSecondaryColor3bv'); + if not Assigned(glSecondaryColor3bv) then Exit; + glSecondaryColor3d := wglGetProcAddress('glSecondaryColor3d'); + if not Assigned(glSecondaryColor3d) then Exit; + glSecondaryColor3dv := wglGetProcAddress('glSecondaryColor3dv'); + if not Assigned(glSecondaryColor3dv) then Exit; + glSecondaryColor3f := wglGetProcAddress('glSecondaryColor3f'); + if not Assigned(glSecondaryColor3f) then Exit; + glSecondaryColor3fv := wglGetProcAddress('glSecondaryColor3fv'); + if not Assigned(glSecondaryColor3fv) then Exit; + glSecondaryColor3i := wglGetProcAddress('glSecondaryColor3i'); + if not Assigned(glSecondaryColor3i) then Exit; + glSecondaryColor3iv := wglGetProcAddress('glSecondaryColor3iv'); + if not Assigned(glSecondaryColor3iv) then Exit; + glSecondaryColor3s := wglGetProcAddress('glSecondaryColor3s'); + if not Assigned(glSecondaryColor3s) then Exit; + glSecondaryColor3sv := wglGetProcAddress('glSecondaryColor3sv'); + if not Assigned(glSecondaryColor3sv) then Exit; + glSecondaryColor3ub := wglGetProcAddress('glSecondaryColor3ub'); + if not Assigned(glSecondaryColor3ub) then Exit; + glSecondaryColor3ubv := wglGetProcAddress('glSecondaryColor3ubv'); + if not Assigned(glSecondaryColor3ubv) then Exit; + glSecondaryColor3ui := wglGetProcAddress('glSecondaryColor3ui'); + if not Assigned(glSecondaryColor3ui) then Exit; + glSecondaryColor3uiv := wglGetProcAddress('glSecondaryColor3uiv'); + if not Assigned(glSecondaryColor3uiv) then Exit; + glSecondaryColor3us := wglGetProcAddress('glSecondaryColor3us'); + if not Assigned(glSecondaryColor3us) then Exit; + glSecondaryColor3usv := wglGetProcAddress('glSecondaryColor3usv'); + if not Assigned(glSecondaryColor3usv) then Exit; + glSecondaryColorPointer := wglGetProcAddress('glSecondaryColorPointer'); + if not Assigned(glSecondaryColorPointer) then Exit; + glWindowPos2d := wglGetProcAddress('glWindowPos2d'); + if not Assigned(glWindowPos2d) then Exit; + glWindowPos2dv := wglGetProcAddress('glWindowPos2dv'); + if not Assigned(glWindowPos2dv) then Exit; + glWindowPos2f := wglGetProcAddress('glWindowPos2f'); + if not Assigned(glWindowPos2f) then Exit; + glWindowPos2fv := wglGetProcAddress('glWindowPos2fv'); + if not Assigned(glWindowPos2fv) then Exit; + glWindowPos2i := wglGetProcAddress('glWindowPos2i'); + if not Assigned(glWindowPos2i) then Exit; + glWindowPos2iv := wglGetProcAddress('glWindowPos2iv'); + if not Assigned(glWindowPos2iv) then Exit; + glWindowPos2s := wglGetProcAddress('glWindowPos2s'); + if not Assigned(glWindowPos2s) then Exit; + glWindowPos2sv := wglGetProcAddress('glWindowPos2sv'); + if not Assigned(glWindowPos2sv) then Exit; + glWindowPos3d := wglGetProcAddress('glWindowPos3d'); + if not Assigned(glWindowPos3d) then Exit; + glWindowPos3dv := wglGetProcAddress('glWindowPos3dv'); + if not Assigned(glWindowPos3dv) then Exit; + glWindowPos3f := wglGetProcAddress('glWindowPos3f'); + if not Assigned(glWindowPos3f) then Exit; + glWindowPos3fv := wglGetProcAddress('glWindowPos3fv'); + if not Assigned(glWindowPos3fv) then Exit; + glWindowPos3i := wglGetProcAddress('glWindowPos3i'); + if not Assigned(glWindowPos3i) then Exit; + glWindowPos3iv := wglGetProcAddress('glWindowPos3iv'); + if not Assigned(glWindowPos3iv) then Exit; + glWindowPos3s := wglGetProcAddress('glWindowPos3s'); + if not Assigned(glWindowPos3s) then Exit; + glWindowPos3sv := wglGetProcAddress('glWindowPos3sv'); + if not Assigned(glWindowPos3sv) then Exit; + Result := TRUE; + +end; + +function Load_GL_version_1_5: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + glGenQueries := wglGetProcAddress('glGenQueries'); + if not Assigned(glGenQueries) then Exit; + glDeleteQueries := wglGetProcAddress('glDeleteQueries'); + if not Assigned(glDeleteQueries) then Exit; + glIsQuery := wglGetProcAddress('glIsQuery'); + if not Assigned(glIsQuery) then Exit; + glBeginQuery := wglGetProcAddress('glBeginQuery'); + if not Assigned(glBeginQuery) then Exit; + glEndQuery := wglGetProcAddress('glEndQuery'); + if not Assigned(glEndQuery) then Exit; + glGetQueryiv := wglGetProcAddress('glGetQueryiv'); + if not Assigned(glGetQueryiv) then Exit; + glGetQueryObjectiv := wglGetProcAddress('glGetQueryObjectiv'); + if not Assigned(glGetQueryObjectiv) then Exit; + glGetQueryObjectuiv := wglGetProcAddress('glGetQueryObjectuiv'); + if not Assigned(glGetQueryObjectuiv) then Exit; + glBindBuffer := wglGetProcAddress('glBindBuffer'); + if not Assigned(glBindBuffer) then Exit; + glDeleteBuffers := wglGetProcAddress('glDeleteBuffers'); + if not Assigned(glDeleteBuffers) then Exit; + glGenBuffers := wglGetProcAddress('glGenBuffers'); + if not Assigned(glGenBuffers) then Exit; + glIsBuffer := wglGetProcAddress('glIsBuffer'); + if not Assigned(glIsBuffer) then Exit; + glBufferData := wglGetProcAddress('glBufferData'); + if not Assigned(glBufferData) then Exit; + glBufferSubData := wglGetProcAddress('glBufferSubData'); + if not Assigned(glBufferSubData) then Exit; + glGetBufferSubData := wglGetProcAddress('glGetBufferSubData'); + if not Assigned(glGetBufferSubData) then Exit; + glMapBuffer := wglGetProcAddress('glMapBuffer'); + if not Assigned(glMapBuffer) then Exit; + glUnmapBuffer := wglGetProcAddress('glUnmapBuffer'); + if not Assigned(glUnmapBuffer) then Exit; + glGetBufferParameteriv := wglGetProcAddress('glGetBufferParameteriv'); + if not Assigned(glGetBufferParameteriv) then Exit; + glGetBufferPointerv := wglGetProcAddress('glGetBufferPointerv'); + if not Assigned(glGetBufferPointerv) then Exit; + Result := TRUE; + +end; + +function Load_GL_version_2_0: Boolean; +var + extstring: String; +begin + + Result := FALSE; + extstring := String(PChar(glGetString(GL_EXTENSIONS))); + + glBlendEquationSeparate := wglGetProcAddress('glBlendEquationSeparate'); + if not Assigned(glBlendEquationSeparate) then Exit; + glDrawBuffers := wglGetProcAddress('glDrawBuffers'); + if not Assigned(glDrawBuffers) then Exit; + glStencilOpSeparate := wglGetProcAddress('glStencilOpSeparate'); + if not Assigned(glStencilOpSeparate) then Exit; + glStencilFuncSeparate := wglGetProcAddress('glStencilFuncSeparate'); + if not Assigned(glStencilFuncSeparate) then Exit; + glStencilMaskSeparate := wglGetProcAddress('glStencilMaskSeparate'); + if not Assigned(glStencilMaskSeparate) then Exit; + glAttachShader := wglGetProcAddress('glAttachShader'); + if not Assigned(glAttachShader) then Exit; + glBindAttribLocation := wglGetProcAddress('glBindAttribLocation'); + if not Assigned(glBindAttribLocation) then Exit; + glCompileShader := wglGetProcAddress('glCompileShader'); + if not Assigned(glCompileShader) then Exit; + glCreateProgram := wglGetProcAddress('glCreateProgram'); + if not Assigned(glCreateProgram) then Exit; + glCreateShader := wglGetProcAddress('glCreateShader'); + if not Assigned(glCreateShader) then Exit; + glDeleteProgram := wglGetProcAddress('glDeleteProgram'); + if not Assigned(glDeleteProgram) then Exit; + glDeleteShader := wglGetProcAddress('glDeleteShader'); + if not Assigned(glDeleteShader) then Exit; + glDetachShader := wglGetProcAddress('glDetachShader'); + if not Assigned(glDetachShader) then Exit; + glDisableVertexAttribArray := wglGetProcAddress('glDisableVertexAttribArray'); + if not Assigned(glDisableVertexAttribArray) then Exit; + glEnableVertexAttribArray := wglGetProcAddress('glEnableVertexAttribArray'); + if not Assigned(glEnableVertexAttribArray) then Exit; + glGetActiveAttrib := wglGetProcAddress('glGetActiveAttrib'); + if not Assigned(glGetActiveAttrib) then Exit; + glGetActiveUniform := wglGetProcAddress('glGetActiveUniform'); + if not Assigned(glGetActiveUniform) then Exit; + glGetAttachedShaders := wglGetProcAddress('glGetAttachedShaders'); + if not Assigned(glGetAttachedShaders) then Exit; + glGetAttribLocation := wglGetProcAddress('glGetAttribLocation'); + if not Assigned(glGetAttribLocation) then Exit; + glGetProgramiv := wglGetProcAddress('glGetProgramiv'); + if not Assigned(glGetProgramiv) then Exit; + glGetProgramInfoLog := wglGetProcAddress('glGetProgramInfoLog'); + if not Assigned(glGetProgramInfoLog) then Exit; + glGetShaderiv := wglGetProcAddress('glGetShaderiv'); + if not Assigned(glGetShaderiv) then Exit; + glGetShaderInfoLog := wglGetProcAddress('glGetShaderInfoLog'); + if not Assigned(glGetShaderInfoLog) then Exit; + glGetShaderSource := wglGetProcAddress('glGetShaderSource'); + if not Assigned(glGetShaderSource) then Exit; + glGetUniformLocation := wglGetProcAddress('glGetUniformLocation'); + if not Assigned(glGetUniformLocation) then Exit; + glGetUniformfv := wglGetProcAddress('glGetUniformfv'); + if not Assigned(glGetUniformfv) then Exit; + glGetUniformiv := wglGetProcAddress('glGetUniformiv'); + if not Assigned(glGetUniformiv) then Exit; + glGetVertexAttribdv := wglGetProcAddress('glGetVertexAttribdv'); + if not Assigned(glGetVertexAttribdv) then Exit; + glGetVertexAttribfv := wglGetProcAddress('glGetVertexAttribfv'); + if not Assigned(glGetVertexAttribfv) then Exit; + glGetVertexAttribiv := wglGetProcAddress('glGetVertexAttribiv'); + if not Assigned(glGetVertexAttribiv) then Exit; + glGetVertexAttribPointerv := wglGetProcAddress('glGetVertexAttribPointerv'); + if not Assigned(glGetVertexAttribPointerv) then Exit; + glIsProgram := wglGetProcAddress('glIsProgram'); + if not Assigned(glIsProgram) then Exit; + glIsShader := wglGetProcAddress('glIsShader'); + if not Assigned(glIsShader) then Exit; + glLinkProgram := wglGetProcAddress('glLinkProgram'); + if not Assigned(glLinkProgram) then Exit; + glShaderSource := wglGetProcAddress('glShaderSource'); + if not Assigned(glShaderSource) then Exit; + glUseProgram := wglGetProcAddress('glUseProgram'); + if not Assigned(glUseProgram) then Exit; + glUniform1f := wglGetProcAddress('glUniform1f'); + if not Assigned(glUniform1f) then Exit; + glUniform2f := wglGetProcAddress('glUniform2f'); + if not Assigned(glUniform2f) then Exit; + glUniform3f := wglGetProcAddress('glUniform3f'); + if not Assigned(glUniform3f) then Exit; + glUniform4f := wglGetProcAddress('glUniform4f'); + if not Assigned(glUniform4f) then Exit; + glUniform1i := wglGetProcAddress('glUniform1i'); + if not Assigned(glUniform1i) then Exit; + glUniform2i := wglGetProcAddress('glUniform2i'); + if not Assigned(glUniform2i) then Exit; + glUniform3i := wglGetProcAddress('glUniform3i'); + if not Assigned(glUniform3i) then Exit; + glUniform4i := wglGetProcAddress('glUniform4i'); + if not Assigned(glUniform4i) then Exit; + glUniform1fv := wglGetProcAddress('glUniform1fv'); + if not Assigned(glUniform1fv) then Exit; + glUniform2fv := wglGetProcAddress('glUniform2fv'); + if not Assigned(glUniform2fv) then Exit; + glUniform3fv := wglGetProcAddress('glUniform3fv'); + if not Assigned(glUniform3fv) then Exit; + glUniform4fv := wglGetProcAddress('glUniform4fv'); + if not Assigned(glUniform4fv) then Exit; + glUniform1iv := wglGetProcAddress('glUniform1iv'); + if not Assigned(glUniform1iv) then Exit; + glUniform2iv := wglGetProcAddress('glUniform2iv'); + if not Assigned(glUniform2iv) then Exit; + glUniform3iv := wglGetProcAddress('glUniform3iv'); + if not Assigned(glUniform3iv) then Exit; + glUniform4iv := wglGetProcAddress('glUniform4iv'); + if not Assigned(glUniform4iv) then Exit; + glUniformMatrix2fv := wglGetProcAddress('glUniformMatrix2fv'); + if not Assigned(glUniformMatrix2fv) then Exit; + glUniformMatrix3fv := wglGetProcAddress('glUniformMatrix3fv'); + if not Assigned(glUniformMatrix3fv) then Exit; + glUniformMatrix4fv := wglGetProcAddress('glUniformMatrix4fv'); + if not Assigned(glUniformMatrix4fv) then Exit; + glValidateProgram := wglGetProcAddress('glValidateProgram'); + if not Assigned(glValidateProgram) then Exit; + glVertexAttrib1d := wglGetProcAddress('glVertexAttrib1d'); + if not Assigned(glVertexAttrib1d) then Exit; + glVertexAttrib1dv := wglGetProcAddress('glVertexAttrib1dv'); + if not Assigned(glVertexAttrib1dv) then Exit; + glVertexAttrib1f := wglGetProcAddress('glVertexAttrib1f'); + if not Assigned(glVertexAttrib1f) then Exit; + glVertexAttrib1fv := wglGetProcAddress('glVertexAttrib1fv'); + if not Assigned(glVertexAttrib1fv) then Exit; + glVertexAttrib1s := wglGetProcAddress('glVertexAttrib1s'); + if not Assigned(glVertexAttrib1s) then Exit; + glVertexAttrib1sv := wglGetProcAddress('glVertexAttrib1sv'); + if not Assigned(glVertexAttrib1sv) then Exit; + glVertexAttrib2d := wglGetProcAddress('glVertexAttrib2d'); + if not Assigned(glVertexAttrib2d) then Exit; + glVertexAttrib2dv := wglGetProcAddress('glVertexAttrib2dv'); + if not Assigned(glVertexAttrib2dv) then Exit; + glVertexAttrib2f := wglGetProcAddress('glVertexAttrib2f'); + if not Assigned(glVertexAttrib2f) then Exit; + glVertexAttrib2fv := wglGetProcAddress('glVertexAttrib2fv'); + if not Assigned(glVertexAttrib2fv) then Exit; + glVertexAttrib2s := wglGetProcAddress('glVertexAttrib2s'); + if not Assigned(glVertexAttrib2s) then Exit; + glVertexAttrib2sv := wglGetProcAddress('glVertexAttrib2sv'); + if not Assigned(glVertexAttrib2sv) then Exit; + glVertexAttrib3d := wglGetProcAddress('glVertexAttrib3d'); + if not Assigned(glVertexAttrib3d) then Exit; + glVertexAttrib3dv := wglGetProcAddress('glVertexAttrib3dv'); + if not Assigned(glVertexAttrib3dv) then Exit; + glVertexAttrib3f := wglGetProcAddress('glVertexAttrib3f'); + if not Assigned(glVertexAttrib3f) then Exit; + glVertexAttrib3fv := wglGetProcAddress('glVertexAttrib3fv'); + if not Assigned(glVertexAttrib3fv) then Exit; + glVertexAttrib3s := wglGetProcAddress('glVertexAttrib3s'); + if not Assigned(glVertexAttrib3s) then Exit; + glVertexAttrib3sv := wglGetProcAddress('glVertexAttrib3sv'); + if not Assigned(glVertexAttrib3sv) then Exit; + glVertexAttrib4Nbv := wglGetProcAddress('glVertexAttrib4Nbv'); + if not Assigned(glVertexAttrib4Nbv) then Exit; + glVertexAttrib4Niv := wglGetProcAddress('glVertexAttrib4Niv'); + if not Assigned(glVertexAttrib4Niv) then Exit; + glVertexAttrib4Nsv := wglGetProcAddress('glVertexAttrib4Nsv'); + if not Assigned(glVertexAttrib4Nsv) then Exit; + glVertexAttrib4Nub := wglGetProcAddress('glVertexAttrib4Nub'); + if not Assigned(glVertexAttrib4Nub) then Exit; + glVertexAttrib4Nubv := wglGetProcAddress('glVertexAttrib4Nubv'); + if not Assigned(glVertexAttrib4Nubv) then Exit; + glVertexAttrib4Nuiv := wglGetProcAddress('glVertexAttrib4Nuiv'); + if not Assigned(glVertexAttrib4Nuiv) then Exit; + glVertexAttrib4Nusv := wglGetProcAddress('glVertexAttrib4Nusv'); + if not Assigned(glVertexAttrib4Nusv) then Exit; + glVertexAttrib4bv := wglGetProcAddress('glVertexAttrib4bv'); + if not Assigned(glVertexAttrib4bv) then Exit; + glVertexAttrib4d := wglGetProcAddress('glVertexAttrib4d'); + if not Assigned(glVertexAttrib4d) then Exit; + glVertexAttrib4dv := wglGetProcAddress('glVertexAttrib4dv'); + if not Assigned(glVertexAttrib4dv) then Exit; + glVertexAttrib4f := wglGetProcAddress('glVertexAttrib4f'); + if not Assigned(glVertexAttrib4f) then Exit; + glVertexAttrib4fv := wglGetProcAddress('glVertexAttrib4fv'); + if not Assigned(glVertexAttrib4fv) then Exit; + glVertexAttrib4iv := wglGetProcAddress('glVertexAttrib4iv'); + if not Assigned(glVertexAttrib4iv) then Exit; + glVertexAttrib4s := wglGetProcAddress('glVertexAttrib4s'); + if not Assigned(glVertexAttrib4s) then Exit; + glVertexAttrib4sv := wglGetProcAddress('glVertexAttrib4sv'); + if not Assigned(glVertexAttrib4sv) then Exit; + glVertexAttrib4ubv := wglGetProcAddress('glVertexAttrib4ubv'); + if not Assigned(glVertexAttrib4ubv) then Exit; + glVertexAttrib4uiv := wglGetProcAddress('glVertexAttrib4uiv'); + if not Assigned(glVertexAttrib4uiv) then Exit; + glVertexAttrib4usv := wglGetProcAddress('glVertexAttrib4usv'); + if not Assigned(glVertexAttrib4usv) then Exit; + glVertexAttribPointer := wglGetProcAddress('glVertexAttribPointer'); + if not Assigned(glVertexAttribPointer) then Exit; + Result := TRUE; + +end; + +function glext_LoadExtension(ext: String): Boolean; +begin + + Result := FALSE; + + if ext = 'GL_version_1_2' then Result := Load_GL_version_1_2 + else if ext = 'GL_ARB_imaging' then Result := Load_GL_ARB_imaging + else if ext = 'GL_version_1_3' then Result := Load_GL_version_1_3 + else if ext = 'GL_ARB_multitexture' then Result := Load_GL_ARB_multitexture + else if ext = 'GL_ARB_transpose_matrix' then Result := Load_GL_ARB_transpose_matrix + else if ext = 'GL_ARB_multisample' then Result := Load_GL_ARB_multisample + else if ext = 'GL_ARB_texture_env_add' then Result := Load_GL_ARB_texture_env_add + else if ext = 'WGL_ARB_extensions_string' then Result := Load_WGL_ARB_extensions_string + else if ext = 'WGL_ARB_buffer_region' then Result := Load_WGL_ARB_buffer_region + else if ext = 'GL_ARB_texture_cube_map' then Result := Load_GL_ARB_texture_cube_map + else if ext = 'GL_ARB_depth_texture' then Result := Load_GL_ARB_depth_texture + else if ext = 'GL_ARB_point_parameters' then Result := Load_GL_ARB_point_parameters + else if ext = 'GL_ARB_shadow' then Result := Load_GL_ARB_shadow + else if ext = 'GL_ARB_shadow_ambient' then Result := Load_GL_ARB_shadow_ambient + else if ext = 'GL_ARB_texture_border_clamp' then Result := Load_GL_ARB_texture_border_clamp + else if ext = 'GL_ARB_texture_compression' then Result := Load_GL_ARB_texture_compression + else if ext = 'GL_ARB_texture_env_combine' then Result := Load_GL_ARB_texture_env_combine + else if ext = 'GL_ARB_texture_env_crossbar' then Result := Load_GL_ARB_texture_env_crossbar + else if ext = 'GL_ARB_texture_env_dot3' then Result := Load_GL_ARB_texture_env_dot3 + else if ext = 'GL_ARB_texture_mirrored_repeat' then Result := Load_GL_ARB_texture_mirrored_repeat + else if ext = 'GL_ARB_vertex_blend' then Result := Load_GL_ARB_vertex_blend + else if ext = 'GL_ARB_vertex_program' then Result := Load_GL_ARB_vertex_program + else if ext = 'GL_ARB_window_pos' then Result := Load_GL_ARB_window_pos + else if ext = 'GL_EXT_422_pixels' then Result := Load_GL_EXT_422_pixels + else if ext = 'GL_EXT_abgr' then Result := Load_GL_EXT_abgr + else if ext = 'GL_EXT_bgra' then Result := Load_GL_EXT_bgra + else if ext = 'GL_EXT_blend_color' then Result := Load_GL_EXT_blend_color + else if ext = 'GL_EXT_blend_func_separate' then Result := Load_GL_EXT_blend_func_separate + else if ext = 'GL_EXT_blend_logic_op' then Result := Load_GL_EXT_blend_logic_op + else if ext = 'GL_EXT_blend_minmax' then Result := Load_GL_EXT_blend_minmax + else if ext = 'GL_EXT_blend_subtract' then Result := Load_GL_EXT_blend_subtract + else if ext = 'GL_EXT_clip_volume_hint' then Result := Load_GL_EXT_clip_volume_hint + else if ext = 'GL_EXT_color_subtable' then Result := Load_GL_EXT_color_subtable + else if ext = 'GL_EXT_compiled_vertex_array' then Result := Load_GL_EXT_compiled_vertex_array + else if ext = 'GL_EXT_convolution' then Result := Load_GL_EXT_convolution + else if ext = 'GL_EXT_histogram' then Result := Load_GL_EXT_histogram + else if ext = 'GL_EXT_multi_draw_arrays' then Result := Load_GL_EXT_multi_draw_arrays + else if ext = 'GL_EXT_packed_pixels' then Result := Load_GL_EXT_packed_pixels + else if ext = 'GL_EXT_paletted_texture' then Result := Load_GL_EXT_paletted_texture + else if ext = 'GL_EXT_point_parameters' then Result := Load_GL_EXT_point_parameters + else if ext = 'GL_EXT_polygon_offset' then Result := Load_GL_EXT_polygon_offset + else if ext = 'GL_EXT_separate_specular_color' then Result := Load_GL_EXT_separate_specular_color + else if ext = 'GL_EXT_shadow_funcs' then Result := Load_GL_EXT_shadow_funcs + else if ext = 'GL_EXT_shared_texture_palette' then Result := Load_GL_EXT_shared_texture_palette + else if ext = 'GL_EXT_stencil_two_side' then Result := Load_GL_EXT_stencil_two_side + else if ext = 'GL_EXT_stencil_wrap' then Result := Load_GL_EXT_stencil_wrap + else if ext = 'GL_EXT_subtexture' then Result := Load_GL_EXT_subtexture + else if ext = 'GL_EXT_texture3D' then Result := Load_GL_EXT_texture3D + else if ext = 'GL_EXT_texture_compression_s3tc' then Result := Load_GL_EXT_texture_compression_s3tc + else if ext = 'GL_EXT_texture_env_add' then Result := Load_GL_EXT_texture_env_add + else if ext = 'GL_EXT_texture_env_combine' then Result := Load_GL_EXT_texture_env_combine + else if ext = 'GL_EXT_texture_env_dot3' then Result := Load_GL_EXT_texture_env_dot3 + else if ext = 'GL_EXT_texture_filter_anisotropic' then Result := Load_GL_EXT_texture_filter_anisotropic + else if ext = 'GL_EXT_texture_lod_bias' then Result := Load_GL_EXT_texture_lod_bias + else if ext = 'GL_EXT_texture_object' then Result := Load_GL_EXT_texture_object + else if ext = 'GL_EXT_vertex_array' then Result := Load_GL_EXT_vertex_array + else if ext = 'GL_EXT_vertex_shader' then Result := Load_GL_EXT_vertex_shader + else if ext = 'GL_EXT_vertex_weighting' then Result := Load_GL_EXT_vertex_weighting + else if ext = 'GL_HP_occlusion_test' then Result := Load_GL_HP_occlusion_test + else if ext = 'GL_NV_blend_square' then Result := Load_GL_NV_blend_square + else if ext = 'GL_NV_copy_depth_to_color' then Result := Load_GL_NV_copy_depth_to_color + else if ext = 'GL_NV_depth_clamp' then Result := Load_GL_NV_depth_clamp + else if ext = 'GL_NV_evaluators' then Result := Load_GL_NV_evaluators + else if ext = 'GL_NV_fence' then Result := Load_GL_NV_fence + else if ext = 'GL_NV_fog_distance' then Result := Load_GL_NV_fog_distance + else if ext = 'GL_NV_light_max_exponent' then Result := Load_GL_NV_light_max_exponent + else if ext = 'GL_NV_multisample_filter_hint' then Result := Load_GL_NV_multisample_filter_hint + else if ext = 'GL_NV_occlusion_query' then Result := Load_GL_NV_occlusion_query + else if ext = 'GL_NV_packed_depth_stencil' then Result := Load_GL_NV_packed_depth_stencil + else if ext = 'GL_NV_point_sprite' then Result := Load_GL_NV_point_sprite + else if ext = 'GL_NV_register_combiners' then Result := Load_GL_NV_register_combiners + else if ext = 'GL_NV_register_combiners2' then Result := Load_GL_NV_register_combiners2 + else if ext = 'GL_NV_texgen_emboss' then Result := Load_GL_NV_texgen_emboss + else if ext = 'GL_NV_texgen_reflection' then Result := Load_GL_NV_texgen_reflection + else if ext = 'GL_NV_texture_compression_vtc' then Result := Load_GL_NV_texture_compression_vtc + else if ext = 'GL_NV_texture_env_combine4' then Result := Load_GL_NV_texture_env_combine4 + else if ext = 'GL_NV_texture_rectangle' then Result := Load_GL_NV_texture_rectangle + else if ext = 'GL_NV_texture_shader' then Result := Load_GL_NV_texture_shader + else if ext = 'GL_NV_texture_shader2' then Result := Load_GL_NV_texture_shader2 + else if ext = 'GL_NV_texture_shader3' then Result := Load_GL_NV_texture_shader3 + else if ext = 'GL_NV_vertex_array_range' then Result := Load_GL_NV_vertex_array_range + else if ext = 'GL_NV_vertex_array_range2' then Result := Load_GL_NV_vertex_array_range2 + else if ext = 'GL_NV_vertex_program' then Result := Load_GL_NV_vertex_program + else if ext = 'GL_NV_vertex_program1_1' then Result := Load_GL_NV_vertex_program1_1 + else if ext = 'GL_ATI_element_array' then Result := Load_GL_ATI_element_array + else if ext = 'GL_ATI_envmap_bumpmap' then Result := Load_GL_ATI_envmap_bumpmap + else if ext = 'GL_ATI_fragment_shader' then Result := Load_GL_ATI_fragment_shader + else if ext = 'GL_ATI_pn_triangles' then Result := Load_GL_ATI_pn_triangles + else if ext = 'GL_ATI_texture_mirror_once' then Result := Load_GL_ATI_texture_mirror_once + else if ext = 'GL_ATI_vertex_array_object' then Result := Load_GL_ATI_vertex_array_object + else if ext = 'GL_ATI_vertex_streams' then Result := Load_GL_ATI_vertex_streams + else if ext = 'WGL_I3D_image_buffer' then Result := Load_WGL_I3D_image_buffer + else if ext = 'WGL_I3D_swap_frame_lock' then Result := Load_WGL_I3D_swap_frame_lock + else if ext = 'WGL_I3D_swap_frame_usage' then Result := Load_WGL_I3D_swap_frame_usage + else if ext = 'GL_3DFX_texture_compression_FXT1' then Result := Load_GL_3DFX_texture_compression_FXT1 + else if ext = 'GL_IBM_cull_vertex' then Result := Load_GL_IBM_cull_vertex + else if ext = 'GL_IBM_multimode_draw_arrays' then Result := Load_GL_IBM_multimode_draw_arrays + else if ext = 'GL_IBM_raster_pos_clip' then Result := Load_GL_IBM_raster_pos_clip + else if ext = 'GL_IBM_texture_mirrored_repeat' then Result := Load_GL_IBM_texture_mirrored_repeat + else if ext = 'GL_IBM_vertex_array_lists' then Result := Load_GL_IBM_vertex_array_lists + else if ext = 'GL_MESA_resize_buffers' then Result := Load_GL_MESA_resize_buffers + else if ext = 'GL_MESA_window_pos' then Result := Load_GL_MESA_window_pos + else if ext = 'GL_OML_interlace' then Result := Load_GL_OML_interlace + else if ext = 'GL_OML_resample' then Result := Load_GL_OML_resample + else if ext = 'GL_OML_subsample' then Result := Load_GL_OML_subsample + else if ext = 'GL_SGIS_generate_mipmap' then Result := Load_GL_SGIS_generate_mipmap + else if ext = 'GL_SGIS_multisample' then Result := Load_GL_SGIS_multisample + else if ext = 'GL_SGIS_pixel_texture' then Result := Load_GL_SGIS_pixel_texture + else if ext = 'GL_SGIS_texture_border_clamp' then Result := Load_GL_SGIS_texture_border_clamp + else if ext = 'GL_SGIS_texture_color_mask' then Result := Load_GL_SGIS_texture_color_mask + else if ext = 'GL_SGIS_texture_edge_clamp' then Result := Load_GL_SGIS_texture_edge_clamp + else if ext = 'GL_SGIS_texture_lod' then Result := Load_GL_SGIS_texture_lod + else if ext = 'GL_SGIS_depth_texture' then Result := Load_GL_SGIS_depth_texture + else if ext = 'GL_SGIX_fog_offset' then Result := Load_GL_SGIX_fog_offset + else if ext = 'GL_SGIX_interlace' then Result := Load_GL_SGIX_interlace + else if ext = 'GL_SGIX_shadow_ambient' then Result := Load_GL_SGIX_shadow_ambient + else if ext = 'GL_SGI_color_matrix' then Result := Load_GL_SGI_color_matrix + else if ext = 'GL_SGI_color_table' then Result := Load_GL_SGI_color_table + else if ext = 'GL_SGI_texture_color_table' then Result := Load_GL_SGI_texture_color_table + else if ext = 'GL_SUN_vertex' then Result := Load_GL_SUN_vertex + else if ext = 'GL_ARB_fragment_program' then Result := Load_GL_ARB_fragment_program + else if ext = 'GL_ATI_text_fragment_shader' then Result := Load_GL_ATI_text_fragment_shader + else if ext = 'GL_APPLE_client_storage' then Result := Load_GL_APPLE_client_storage + else if ext = 'GL_APPLE_element_array' then Result := Load_GL_APPLE_element_array + else if ext = 'GL_APPLE_fence' then Result := Load_GL_APPLE_fence + else if ext = 'GL_APPLE_vertex_array_object' then Result := Load_GL_APPLE_vertex_array_object + else if ext = 'GL_APPLE_vertex_array_range' then Result := Load_GL_APPLE_vertex_array_range + else if ext = 'WGL_ARB_pixel_format' then Result := Load_WGL_ARB_pixel_format + else if ext = 'WGL_ARB_make_current_read' then Result := Load_WGL_ARB_make_current_read + else if ext = 'WGL_ARB_pbuffer' then Result := Load_WGL_ARB_pbuffer + else if ext = 'WGL_EXT_swap_control' then Result := Load_WGL_EXT_swap_control + else if ext = 'WGL_ARB_render_texture' then Result := Load_WGL_ARB_render_texture + else if ext = 'WGL_EXT_extensions_string' then Result := Load_WGL_EXT_extensions_string + else if ext = 'WGL_EXT_make_current_read' then Result := Load_WGL_EXT_make_current_read + else if ext = 'WGL_EXT_pbuffer' then Result := Load_WGL_EXT_pbuffer + else if ext = 'WGL_EXT_pixel_format' then Result := Load_WGL_EXT_pixel_format + else if ext = 'WGL_I3D_digital_video_control' then Result := Load_WGL_I3D_digital_video_control + else if ext = 'WGL_I3D_gamma' then Result := Load_WGL_I3D_gamma + else if ext = 'WGL_I3D_genlock' then Result := Load_WGL_I3D_genlock + else if ext = 'GL_ARB_matrix_palette' then Result := Load_GL_ARB_matrix_palette + else if ext = 'GL_NV_element_array' then Result := Load_GL_NV_element_array + else if ext = 'GL_NV_float_buffer' then Result := Load_GL_NV_float_buffer + else if ext = 'GL_NV_fragment_program' then Result := Load_GL_NV_fragment_program + else if ext = 'GL_NV_primitive_restart' then Result := Load_GL_NV_primitive_restart + else if ext = 'GL_NV_vertex_program2' then Result := Load_GL_NV_vertex_program2 + else if ext = 'WGL_NV_render_texture_rectangle' then Result := Load_WGL_NV_render_texture_rectangle + else if ext = 'GL_NV_pixel_data_range' then Result := Load_GL_NV_pixel_data_range + else if ext = 'GL_EXT_texture_rectangle' then Result := Load_GL_EXT_texture_rectangle + else if ext = 'GL_S3_s3tc' then Result := Load_GL_S3_s3tc + else if ext = 'GL_ATI_draw_buffers' then Result := Load_GL_ATI_draw_buffers + else if ext = 'WGL_ATI_pixel_format_float' then Result := Load_WGL_ATI_pixel_format_float + else if ext = 'GL_ATI_texture_env_combine3' then Result := Load_GL_ATI_texture_env_combine3 + else if ext = 'GL_ATI_texture_float' then Result := Load_GL_ATI_texture_float + else if ext = 'GL_NV_texture_expand_normal' then Result := Load_GL_NV_texture_expand_normal + else if ext = 'GL_NV_half_float' then Result := Load_GL_NV_half_float + else if ext = 'GL_ATI_map_object_buffer' then Result := Load_GL_ATI_map_object_buffer + else if ext = 'GL_ATI_separate_stencil' then Result := Load_GL_ATI_separate_stencil + else if ext = 'GL_ATI_vertex_attrib_array_object' then Result := Load_GL_ATI_vertex_attrib_array_object + else if ext = 'GL_ARB_vertex_buffer_object' then Result := Load_GL_ARB_vertex_buffer_object + else if ext = 'GL_ARB_occlusion_query' then Result := Load_GL_ARB_occlusion_query + else if ext = 'GL_ARB_shader_objects' then Result := Load_GL_ARB_shader_objects + else if ext = 'GL_ARB_vertex_shader' then Result := Load_GL_ARB_vertex_shader + else if ext = 'GL_ARB_fragment_shader' then Result := Load_GL_ARB_fragment_shader + else if ext = 'GL_ARB_shading_language_100' then Result := Load_GL_ARB_shading_language_100 + else if ext = 'GL_ARB_texture_non_power_of_two' then Result := Load_GL_ARB_texture_non_power_of_two + else if ext = 'GL_ARB_point_sprite' then Result := Load_GL_ARB_point_sprite + else if ext = 'GL_EXT_depth_bounds_test' then Result := Load_GL_EXT_depth_bounds_test + else if ext = 'GL_EXT_secondary_color' then Result := Load_GL_EXT_secondary_color + else if ext = 'GL_EXT_texture_mirror_clamp' then Result := Load_GL_EXT_texture_mirror_clamp + else if ext = 'GL_EXT_blend_equation_separate' then Result := Load_GL_EXT_blend_equation_separate + else if ext = 'GL_MESA_pack_invert' then Result := Load_GL_MESA_pack_invert + else if ext = 'GL_MESA_ycbcr_texture' then Result := Load_GL_MESA_ycbcr_texture + else if ext = 'GL_ARB_fragment_program_shadow' then Result := Load_GL_ARB_fragment_program_shadow + else if ext = 'GL_EXT_fog_coord' then Result := Load_GL_EXT_fog_coord + else if ext = 'GL_NV_fragment_program_option' then Result := Load_GL_NV_fragment_program_option + else if ext = 'GL_EXT_pixel_buffer_object' then Result := Load_GL_EXT_pixel_buffer_object + else if ext = 'GL_NV_fragment_program2' then Result := Load_GL_NV_fragment_program2 + else if ext = 'GL_NV_vertex_program2_option' then Result := Load_GL_NV_vertex_program2_option + else if ext = 'GL_NV_vertex_program3' then Result := Load_GL_NV_vertex_program3 + else if ext = 'GL_ARB_draw_buffers' then Result := Load_GL_ARB_draw_buffers + else if ext = 'GL_ARB_texture_rectangle' then Result := Load_GL_ARB_texture_rectangle + else if ext = 'GL_ARB_color_buffer_float' then Result := Load_GL_ARB_color_buffer_float + else if ext = 'GL_ARB_half_float_pixel' then Result := Load_GL_ARB_half_float_pixel + else if ext = 'GL_ARB_texture_float' then Result := Load_GL_ARB_texture_float + else if ext = 'GL_EXT_texture_compression_dxt1' then Result := Load_GL_EXT_texture_compression_dxt1 + else if ext = 'GL_ARB_pixel_buffer_object' then Result := Load_GL_ARB_pixel_buffer_object + else if ext = 'GL_EXT_framebuffer_object' then Result := Load_GL_EXT_framebuffer_object + else if ext = 'GL_version_1_4' then Result := Load_GL_version_1_4 + else if ext = 'GL_version_1_5' then Result := Load_GL_version_1_5 + else if ext = 'GL_version_2_0' then Result := Load_GL_version_2_0 + +end; + +end. diff --git a/src/lib/fmod/fmod.inc b/src/lib/fmod/fmod.inc new file mode 100644 index 0000000..b0421d7 --- /dev/null +++ b/src/lib/fmod/fmod.inc @@ -0,0 +1,23 @@ +{$IFDEF WIN32} +{$DEFINE MSWINDOWS} +{$ENDIF} + +{$IFDEF FPC} + {$MODE DELPHI} + {$PACKRECORDS C} +{$ENDIF} + +{$IFDEF VER110} + {$DEFINE DELPHI_5_OR_LOWER} +{$ELSE} + {$IFDEF VER120} + {$DEFINE DELPHI_5_OR_LOWER} + {$ELSE} + {$IFDEF VER130} + {$DEFINE DELPHI_5_OR_LOWER} + {$ENDIF} + {$ENDIF} +{$ENDIF} + +(* Force four-byte enums *) +{$Z4} diff --git a/src/lib/fmod/fmod.pas b/src/lib/fmod/fmod.pas new file mode 100644 index 0000000..038ecad --- /dev/null +++ b/src/lib/fmod/fmod.pas @@ -0,0 +1,1004 @@ +(* ============================================================================================= *) +(* FMOD Ex - Main Pascal header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2008. *) +(* *) +(* This header is for statically linking to the FMOD library. *) +(* *) +(* ============================================================================================= *) + +unit fmod; + +{$I fmod.inc} + +interface + +uses + fmodtypes; + +(* ========================================================================================== *) +(* FUNCTION PROTOTYPES *) +(* ========================================================================================== *) + +(* + FMOD System memory functions (optional). +*) + +function FMOD_Memory_Initialize (poolmem: Pointer; poollen: Integer; useralloc: FMOD_MEMORY_ALLOCCALLBACK; userrealloc: FMOD_MEMORY_REALLOCCALLBACK; userfree: FMOD_MEMORY_FREECALLBACK): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Memory_GetStats (var currentalloced: Integer; var maxalloced: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + FMOD System factory functions. Use this to create an FMOD System Instance. below you will see FMOD_System_Init/Close to get started. +*) + +function FMOD_System_Create (var system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_Release (system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + 'System' API +*) + +(* + Pre-init functions. +*) + +function FMOD_System_SetOutput (system: FMOD_SYSTEM; output: FMOD_OUTPUTTYPE): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetOutput (system: FMOD_SYSTEM; var output: FMOD_OUTPUTTYPE): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetNumDrivers (system: FMOD_SYSTEM; var numdrivers: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_System_GetDriverName (system: FMOD_SYSTEM; id: Integer; name: PChar; namelen: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetDriverCaps (system: FMOD_SYSTEM; id: Integer; var caps: Cardinal; var minfrequency, maxfrequency: Integer; var controlpanelspeakermode: FMOD_SPEAKERMODE): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetDriver (system: FMOD_SYSTEM; driver: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetDriver (system: FMOD_SYSTEM; var driver: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetHardwareChannels (system: FMOD_SYSTEM; min2d: Integer; max2d: Integer; min3d: Integer; max3d: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetHardwareChannels (system: FMOD_SYSTEM; var numhw2d: Integer; var numhw3d: Integer; var total: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetSoftwareChannels (system: FMOD_SYSTEM; numsoftwarechannels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetSoftwareChannels (system: FMOD_SYSTEM; var numsoftwarechannels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetSoftwareFormat (system: FMOD_SYSTEM; samplerate: Integer; format: FMOD_SOUND_FORMAT; numoutputchannels: Integer; maxinputchannels: Integer; resamplemethod: FMOD_DSP_RESAMPLER): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetSoftwareFormat (system: FMOD_SYSTEM; var samplerate: Integer; var format: FMOD_SOUND_FORMAT; var numoutputchannels: Integer; var maxinputchannels: Integer; var bits: Integer; var resamplemethod: FMOD_DSP_RESAMPLER): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetDSPBufferSize (system: FMOD_SYSTEM; bufferlength: Cardinal; numbuffers: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetDSPBufferSize (system: FMOD_SYSTEM; var bufferlength: Cardinal; var numbuffers: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetFileSystem (system: FMOD_SYSTEM; useropen: FMOD_FILE_OPENCALLBACK; userclose: FMOD_FILE_CLOSECALLBACK; userread: FMOD_FILE_READCALLBACK; userseek: FMOD_FILE_SEEKCALLBACK): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_AttachFileSystem (system: FMOD_SYSTEM; useropen: FMOD_FILE_OPENCALLBACK; userclose: FMOD_FILE_CLOSECALLBACK; userread: FMOD_FILE_READCALLBACK; userseek: FMOD_FILE_SEEKCALLBACK): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetAdvancedSettings (system: FMOD_SYSTEM; var settings:FMOD_ADVANCEDSETTINGS): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetAdvancedSettings (system: FMOD_SYSTEM; var settings:FMOD_ADVANCEDSETTINGS): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetSpeakerMode (system: FMOD_SYSTEM; speakermode: FMOD_SPEAKERMODE): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetSpeakerMode (system: FMOD_SYSTEM; var speakermode: FMOD_SPEAKERMODE): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Plug-in support +*) + +function FMOD_System_SetPluginPath (system: FMOD_SYSTEM; const path: PChar): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_LoadPlugin (system: FMOD_SYSTEM; const filename: PChar; var plugintype: FMOD_PLUGINTYPE; var index: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetNumPlugins (system: FMOD_SYSTEM; plugintype: FMOD_PLUGINTYPE; var numplugins: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetPluginInfo (system: FMOD_SYSTEM; plugintype: FMOD_PLUGINTYPE; index: Integer; name: PChar; namelen: Integer; version: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_UnloadPlugin (system: FMOD_SYSTEM; plugintype: FMOD_PLUGINTYPE; index: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetOutputByPlugin (system: FMOD_SYSTEM; index: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetOutputByPlugin (system: FMOD_SYSTEM; var index: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_System_CreateCodec (system: FMOD_SYSTEM; description:FMOD_CODEC_DESCRIPTION): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Init/Close +*) + +function FMOD_System_Init (system: FMOD_SYSTEM; maxchannels: Integer; flags: Cardinal; const extradriverdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_Close (system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + General post-init system functions +*) + +function FMOD_System_Update (system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_System_UpdateFinished (system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +function FMOD_System_Set3DSettings (system: FMOD_SYSTEM; dopplerscale, distancefactor, rolloffscale: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_Get3DSettings (system: FMOD_SYSTEM; var dopplerscale: Single; var distancefactor: Single; var rolloffscale: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_Set3DNumListeners (system: FMOD_SYSTEM; numlisteners: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_Get3DNumListeners (system: FMOD_SYSTEM; var numlisteners: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_Set3DListenerAttributes(system: FMOD_SYSTEM; listener: Integer; const pos: FMOD_VECTOR; const vel: FMOD_VECTOR; const forward_: FMOD_VECTOR; const up: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_Get3DListenerAttributes(system: FMOD_SYSTEM; listener: Integer; var pos: FMOD_VECTOR; var vel: FMOD_VECTOR; var forward_: FMOD_VECTOR; var up: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +// function FMOD_System_SetSpeakerPosition (system: FMOD_SYSTEM; speaker: FMOD_SPEAKER; x:Single; y:Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_System_GetSpeakerPosition (system: FMOD_SYSTEM; speaker: FMOD_SPEAKER; var x:Single; var y:Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetStreamBufferSize (system: FMOD_SYSTEM; filebuffersize: Cardinal; filebuffersizetype: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetStreamBufferSize (system: FMOD_SYSTEM; var filebuffersize: Cardinal; filebuffersizetype: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + System information functions. +*) + +function FMOD_System_GetVersion (system: FMOD_SYSTEM; var version: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetOutputHandle (system: FMOD_SYSTEM; var handle: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetChannelsPlaying (system: FMOD_SYSTEM; var channels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetCPUUsage (system: FMOD_SYSTEM; var dsp, stream, update, total: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetSoundRAM (system: FMOD_SYSTEM; var currentalloced: Integer; var maxalloced: Integer; var total: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetNumCDROMDrives (system: FMOD_SYSTEM; var num: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetCDROMDriveName (system: FMOD_SYSTEM; drivenum: Integer; name: PChar; namelen: Integer; scsiaddr: PChar; scsiaddrlen: Integer; devicename: PChar; devicenamelen: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetSpectrum (system: FMOD_SYSTEM; var spectrumarray: Single; numvalues: Integer; channeloffset: Integer; windowtype: FMOD_DSP_FFT_WINDOW): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetWaveData (system: FMOD_SYSTEM; var wavearray: Single; numvalues: Integer; channeloffset: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Sound/DSP/Channel/FX creation and retrieval. +*) + +function FMOD_System_CreateSound (system: FMOD_SYSTEM; const name_or_data: PChar; mode: Cardinal; exinfo: PFMOD_CREATESOUNDEXINFO; var sound: FMOD_SOUND): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_CreateStream (system: FMOD_SYSTEM; const name_or_data: PChar; mode: Cardinal; exinfo: PFMOD_CREATESOUNDEXINFO; var sound: FMOD_SOUND): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_CreateDSP (system: FMOD_SYSTEM; const description: FMOD_DSP_DESCRIPTION; var dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_CreateDSPByType (system: FMOD_SYSTEM; type_: FMOD_DSP_TYPE; var dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_System_CreateDSPByIndex (system: FMOD_SYSTEM; index: Integer; var dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_CreateChannelGroup (system: FMOD_SYSTEM; const name: PChar; var channelgroup: FMOD_CHANNELGROUP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +function FMOD_System_PlaySound (system: FMOD_SYSTEM; channelid: Integer; sound: FMOD_SOUND; paused: FMOD_BOOL; var channel: FMOD_CHANNEL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_PlayDSP (system: FMOD_SYSTEM; channelid: Integer; dsp: FMOD_DSP; paused: FMOD_BOOL; var channel: FMOD_CHANNEL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetChannel (system: FMOD_SYSTEM; channelid: Integer; var channel: FMOD_CHANNEL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetMasterChannelGroup (system: FMOD_SYSTEM; var channelgroup: FMOD_CHANNELGROUP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Reverb API +*) + +function FMOD_System_SetReverbProperties (system: FMOD_SYSTEM; const prop: FMOD_REVERB_PROPERTIES): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetReverbProperties (system: FMOD_SYSTEM; var prop: FMOD_REVERB_PROPERTIES): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +Function FMOD_System_SetReverbAmbientProperties(system:FMOD_SYSTEM; var prop:FMOD_REVERB_PROPERTIES):FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + System level DSP access. +*) + +function FMOD_System_GetDSPHead (system: FMOD_SYSTEM; var dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_AddDSP (system: FMOD_SYSTEM; dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_LockDSP (system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_UnlockDSP (system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Recording API +*) + +// function FMOD_System_SetRecordDriver (system: FMOD_SYSTEM; driver: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_System_GetRecordDriver (system: FMOD_SYSTEM; var driver: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetRecordNumDrivers (system: FMOD_SYSTEM; var numdrivers: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_System_GetRecordDriverName (system: FMOD_SYSTEM; id: Integer; name: PChar; namelen: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetRecordPosition (system: FMOD_SYSTEM; var position: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +function FMOD_System_RecordStart (system: FMOD_SYSTEM; sound: FMOD_SOUND; loop: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_RecordStop (system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_IsRecording (system: FMOD_SYSTEM; var recording: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Geometry API. +*) + +function FMOD_System_CreateGeometry (system: FMOD_SYSTEM; maxPolygons: Integer; maxVertices: Integer; var geometry: FMOD_GEOMETRY): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetGeometrySettings (system: FMOD_SYSTEM; maxWorldSize: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetGeometrySettings (system: FMOD_SYSTEM; var maxWorldSize: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_LoadGeometry (system: FMOD_SYSTEM; data: Pointer; dataSize: Integer; var geometry: FMOD_GEOMETRY): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Network functions. +*) + +function FMOD_System_SetNetworkProxy (system: FMOD_SYSTEM; const proxy: PChar): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetNetworkProxy (system: FMOD_SYSTEM; proxy: PChar; proxylen: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_SetNetworkTimeout (system: FMOD_SYSTEM; timeout: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetNetworkTimeout (system: FMOD_SYSTEM; var timeout: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Userdata set/get. +*) + +function FMOD_System_SetUserData (system: FMOD_SYSTEM; userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_System_GetUserData (system: FMOD_SYSTEM; var userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + 'Sound' API +*) + +function FMOD_Sound_Release (sound: FMOD_SOUND): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetSystemObject (sound: FMOD_SOUND; var system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Standard sound manipulation functions. +*) + +function FMOD_Sound_Lock (sound: FMOD_SOUND; offset, length: Cardinal; var ptr1: Pointer; var ptr2: Pointer; var len1: Cardinal; var len2: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_Unlock (sound: FMOD_SOUND; ptr1, ptr2: Pointer; len1, len2: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_SetDefaults (sound: FMOD_SOUND; frequency, volume, pan: Single; const levels: Single; priority: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetDefaults (sound: FMOD_SOUND; var frequency: Single; var volume: Single; var pan: Single; var priority: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_SetVariations (sound: FMOD_SOUND; frequency, volume, pan: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetVariations (sound: FMOD_SOUND; var frequency: Single; var volume: Single; var pan: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_Set3DMinMaxDistance (sound: FMOD_SOUND; min, max: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_Get3DMinMaxDistance (sound: FMOD_SOUND; var min: Single; var max: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_Set3DConeSettings (sound: FMOD_SOUND; insideconeangle: Single; outsideconeangle: Single; outsidevolume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_Get3DConeSettings (sound: FMOD_SOUND; var insideconeangle: Single; var outsideconeangle: Single; var outsidevolume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_Set3DCustomRolloff (sound: FMOD_SOUND; points: FMOD_VECTOR; numpoints: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_Get3DCustomRolloff (sound: FMOD_SOUND; var points: FMOD_VECTOR; var numpoints: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_SetSubSound (sound: FMOD_SOUND; index: Integer; subsound: FMOD_SOUND): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetSubSound (sound: FMOD_SOUND; index: Integer; var subsound: FMOD_SOUND): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_SetSubSoundSentence (sound: FMOD_SOUND; var subsoundlist: Integer; numsubsounds: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetName (sound: FMOD_SOUND; name: PChar; namelen: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetLength (sound: FMOD_SOUND; var length: Cardinal; lengthtype: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetFormat (sound: FMOD_SOUND; var type_: FMOD_SOUND_TYPE; var format: FMOD_SOUND_FORMAT; var channels: Integer; var bits: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetNumSubSounds (sound: FMOD_SOUND; var numsubsounds: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetNumTags (sound: FMOD_SOUND; var numtags: Integer; var numtagsupdated: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetTag (sound: FMOD_SOUND; const name: PChar; index: Integer; var tag: FMOD_TAG): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetOpenState (sound: FMOD_SOUND; var openstate: FMOD_OPENSTATE; var percentbuffered: Cardinal; var starving: Boolean): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_ReadData (sound: FMOD_SOUND; buffer: Pointer; lenbytes: Cardinal; var read: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_SeekData (sound: FMOD_SOUND; pcm: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Synchronization point API. These points can come from markers embedded in wav files, and can also generate channel callbacks. +*) + +function FMOD_Sound_GetNumSyncPoints (sound: FMOD_SOUND; var numsyncpoints: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetSyncPoint (sound: FMOD_SOUND; index: Integer; var point: FMOD_SYNCPOINT): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetSyncPointInfo (sound: FMOD_SOUND; point: FMOD_SYNCPOINT; name: PChar; namelen: Integer; offset: Cardinal; offsettype: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_AddSyncPoint (sound: FMOD_SOUND; offset: Cardinal; offsettype: Cardinal; name: PChar; var point: FMOD_SYNCPOINT): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_DeleteSyncPoint (sound: FMOD_SOUND; point: FMOD_SYNCPOINT): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Functions also in Channel class but here they are the 'default' to save having to change it in Channel all the time. +*) + +function FMOD_Sound_SetMode (sound: FMOD_SOUND; mode: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetMode (sound: FMOD_SOUND; var mode: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_SetLoopCount (sound: FMOD_SOUND; loopcount: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetLoopCount (sound: FMOD_SOUND; var loopcount: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_SetLoopPoints (sound: FMOD_SOUND; loopstart: Cardinal; loopstarttype: Cardinal; loopend: Cardinal; loopendtype: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetLoopPoints (sound: FMOD_SOUND; var loopstart: Cardinal; loopstarttype: Cardinal; var loopend: Cardinal; loopendtype: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Userdata set/get. +*) + +function FMOD_Sound_SetUserData (sound: FMOD_SOUND; userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Sound_GetUserData (sound: FMOD_SOUND; var userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + 'Channel' API +*) + +function FMOD_Channel_GetSystemObject (channel: FMOD_CHANNEL; var system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +function FMOD_Channel_Stop (channel: FMOD_CHANNEL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetPaused (channel: FMOD_CHANNEL; paused: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetPaused (channel: FMOD_CHANNEL; var paused: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetVolume (channel: FMOD_CHANNEL; volume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetVolume (channel: FMOD_CHANNEL; var volume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetFrequency (channel: FMOD_CHANNEL; frequency: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetFrequency (channel: FMOD_CHANNEL; var frequency: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetPan (channel: FMOD_CHANNEL; pan: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetPan (channel: FMOD_CHANNEL; var pan: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetDelay (channel: FMOD_CHANNEL; startdelay: Cardinal; enddelay: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetDelay (channel: FMOD_CHANNEL; var startdelay: Cardinal; var enddelay: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetSpeakerMix (channel: FMOD_CHANNEL; frontleft, frontright, center, lfe, backleft, backright, sideleft, sideright: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetSpeakerMix (channel: FMOD_CHANNEL; var frontleft: Single; var frontright: Single; var center: Single; var lfe: Single; var backleft: Single; var backright: Single; var sideleft: Single; var sideright: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetSpeakerLevels (channel: FMOD_CHANNEL; speaker: FMOD_SPEAKER; const levels: Single; numlevels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetSpeakerLevels (channel: FMOD_CHANNEL; speaker: FMOD_SPEAKER; var levels: Single; var numlevels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetMute (channel: FMOD_CHANNEL; mute: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetMute (channel: FMOD_CHANNEL; var mute: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetPriority (channel: FMOD_CHANNEL; priority: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetPriority (channel: FMOD_CHANNEL; var priority: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetPosition (channel: FMOD_CHANNEL; position: Cardinal; postype: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetPosition (channel: FMOD_CHANNEL; var position: Cardinal; postype: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetReverbProperties (channel: FMOD_CHANNEL; const prop: FMOD_REVERB_CHANNELPROPERTIES): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetReverbProperties (channel: FMOD_CHANNEL; var prop: FMOD_REVERB_CHANNELPROPERTIES): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetChannelGroup (channel: FMOD_CHANNEL; channelgroup: FMOD_CHANNELGROUP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetChannelGroup (channel: FMOD_CHANNEL; var channelgroup: FMOD_CHANNELGROUP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetCallback (channel: FMOD_CHANNEL; callback: FMOD_CHANNEL_CALLBACK): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + 3D functionality. +*) + +function FMOD_Channel_Set3DAttributes (channel: FMOD_CHANNEL; const pos: FMOD_VECTOR; const vel: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Get3DAttributes (channel: FMOD_CHANNEL; var pos: FMOD_VECTOR; var vel: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Set3DMinMaxDistance (channel: FMOD_CHANNEL; mindistance, maxdistance: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Get3DMinMaxDistance (channel: FMOD_CHANNEL; var mindistance: Single; var maxdistance: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Set3DConeSettings (channel: FMOD_CHANNEL; insideconeangle: Single; outsideconeangle: Single; outsidevolume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Get3DConeSettings (channel: FMOD_CHANNEL; var insideconeangle: Single; var outsideconeangle: Single; var outsidevolume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Set3DConeOrientation (channel: FMOD_CHANNEL; var orientation: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Get3DConeOrientation (channel: FMOD_CHANNEL; var orientation: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Set3DCustomRolloff (channel: FMOD_CHANNEL; points: FMOD_VECTOR; numpoints: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Get3DCustomRolloff (channel: FMOD_CHANNEL; var points: FMOD_VECTOR; var numpoints: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Set3DOcclusion (channel: FMOD_CHANNEL; directOcclusion: Single; reverbOcclusion: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Get3DOcclusion (channel: FMOD_CHANNEL; var directOcclusion: Single; var reverbOcclusion: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Set3DSpread (channel: FMOD_CHANNEL; angle: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Get3DSpread (channel: FMOD_CHANNEL; var angle: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Set3DPanLevel (channel: FMOD_CHANNEL; level: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_Get3DPanLevel (channel: FMOD_CHANNEL; var level: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + DSP functionality only for channels playing sounds created with FMOD_SOFTWARE. +*) + +function FMOD_Channel_GetDSPHead (channel: FMOD_CHANNEL; var dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_AddDSP (channel: FMOD_CHANNEL; dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Information only functions. +*) + +function FMOD_Channel_IsPlaying (channel: FMOD_CHANNEL; var isplaying: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_IsVirtual (channel: FMOD_CHANNEL; var isvirtual: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetAudibility (channel: FMOD_CHANNEL; var audibility: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetCurrentSound (channel: FMOD_CHANNEL; var sound: FMOD_SOUND): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetSpectrum (channel: FMOD_CHANNEL; spectrumarray: PSingle; numvalues: Integer; channeloffset: Integer; windowtype: FMOD_DSP_FFT_WINDOW): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetWaveData (channel: FMOD_CHANNEL; var wavearray: Single; numvalues: Integer; channeloffset: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetIndex (channel: FMOD_CHANNEL; var index: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Functions also found in Sound class but here they can be set per channel. +*) + +function FMOD_Channel_SetMode (channel: FMOD_CHANNEL; mode: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetMode (channel: FMOD_CHANNEL; var mode: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetLoopCount (channel: FMOD_CHANNEL; loopcount: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetLoopCount (channel: FMOD_CHANNEL; var loopcount: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_SetLoopPoints (channel: FMOD_CHANNEL; loopstart: Cardinal; loopstarttype: Cardinal; loopend: Cardinal; loopendtype: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetLoopPoints (channel: FMOD_CHANNEL; var loopstart: Cardinal; loopstarttype: Cardinal; var loopend: Cardinal; loopendtype: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Userdata set/get. +*) + +function FMOD_Channel_SetUserData (channel: FMOD_CHANNEL; userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Channel_GetUserData (channel: FMOD_CHANNEL; var userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + 'ChannelGroup' API +*) + +function FMOD_ChannelGroup_Release (channelgroup: FMOD_CHANNELGROUP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_GetSystemObject (channelgroup: FMOD_CHANNELGROUP; var system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Channelgroup scale values. (scales the current volume or pitch of all channels and channel groups, DOESN'T overwrite) +*) + +function FMOD_ChannelGroup_SetVolume (channelgroup: FMOD_CHANNELGROUP; volume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_GetVolume (channelgroup: FMOD_CHANNELGROUP; var volume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_SetPitch (channelgroup: FMOD_CHANNELGROUP; pitch: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_GetPitch (channelgroup: FMOD_CHANNELGROUP; var pitch: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Channelgroup override values. (recursively overwrites whatever settings the channels had) +*) + +function FMOD_ChannelGroup_Stop (channelgroup: FMOD_CHANNELGROUP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_ChannelGroup_OverridePaused (channelgroup: FMOD_CHANNELGROUP; paused: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_OverrideVolume (channelgroup: FMOD_CHANNELGROUP; volume : Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_OverrideFrequency (channelgroup: FMOD_CHANNELGROUP; frequency: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_OverridePan (channelgroup: FMOD_CHANNELGROUP; pan: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_ChannelGroup_OverrideMute (channelgroup: FMOD_CHANNELGROUP; mute: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_OverrideReverbProperties(channelgroup: FMOD_CHANNELGROUP; const prop: FMOD_REVERB_CHANNELPROPERTIES): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_Override3DAttributes (channelgroup: FMOD_CHANNELGROUP; const pos: FMOD_VECTOR; const vel: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_OverrideSpeakerMix (channelgroup: FMOD_CHANNELGROUP; frontleft, frontright, center, lfe, backleft, backright, sideleft, sideright: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Nested channel groups. +*) + +function FMOD_ChannelGroup_AddGroup (channelgroup: FMOD_CHANNELGROUP; group: FMOD_CHANNELGROUP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_GetNumGroups (channelgroup: FMOD_CHANNELGROUP; var numgroups: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_GetGroup (channelgroup: FMOD_CHANNELGROUP; index: Integer; var group: FMOD_CHANNELGROUP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + DSP functionality only for channel groups playing sounds created with FMOD_SOFTWARE. +*) + +function FMOD_ChannelGroup_GetDSPHead (channelgroup: FMOD_CHANNELGROUP; var dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_AddDSP (channelgroup: FMOD_CHANNELGROUP; dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Information only functions. +*) + +function FMOD_ChannelGroup_GetName (channelgroup: FMOD_CHANNELGROUP; name: PChar; namelen: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_GetNumChannels (channelgroup: FMOD_CHANNELGROUP; var numchannels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_GetChannel (channelgroup: FMOD_CHANNELGROUP; index: Integer; var channel: FMOD_CHANNEL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_GetSpectrum (channelgroup: FMOD_CHANNELGROUP; var spectrumarray: Single; numvalues: Integer; channeloffset: Integer; windowtype: FMOD_DSP_FFT_WINDOW ): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_GetWaveData (channelgroup: FMOD_CHANNELGROUP; var wavearray: Single; numvalues: Integer; channeloffset: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Userdata set/get. +*) + +function FMOD_ChannelGroup_SetUserData (channelgroup: FMOD_CHANNELGROUP; userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_ChannelGroup_GetUserData (channelgroup: FMOD_CHANNELGROUP; var userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + 'DSP' API +*) + +function FMOD_DSP_Release (dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetSystemObject (dsp: FMOD_DSP; var system: FMOD_SYSTEM): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Connection / disconnection / input and output enumeration. +*) + +function FMOD_DSP_AddInput (dsp, target: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_DisconnectFrom (dsp, target: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_Remove (dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetNumInputs (dsp: FMOD_DSP; var numinputs: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetNumOutputs (dsp: FMOD_DSP; var numoutputs: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetInput (dsp: FMOD_DSP; index: Integer; var input: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetOutput (dsp: FMOD_DSP; index: Integer; var output: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_DSP_SetInputMix (dsp: FMOD_DSP; index: Integer; volume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_DSP_GetInputMix (dsp: FMOD_DSP; index: Integer; var volume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_DSP_SetInputLevels (dsp: FMOD_DSP; index: Integer; speaker: FMOD_SPEAKER; const levels: Single; numlevels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_DSP_GetInputLevels (dsp: FMOD_DSP; index: Integer; speaker: FMOD_SPEAKER; const levels: Single; numlevels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_DSP_SetOutputMix (dsp: FMOD_DSP; index: Integer; volume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_DSP_GetOutputMix (dsp: FMOD_DSP; index: Integer; var volume: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_DSP_SetOutputLevels (dsp: FMOD_DSP; index: Integer; speaker: FMOD_SPEAKER; const levels: Single; numlevels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +// function FMOD_DSP_GetOutputLevels (dsp: FMOD_DSP; index: Integer; speaker: FMOD_SPEAKER; const levels: Single; numlevels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + DSP unit control +*) + +function FMOD_DSP_SetActive (dsp: FMOD_DSP; active: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetActive (dsp: FMOD_DSP; var active: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_SetBypass (dsp: FMOD_DSP; bypass: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetBypass (dsp: FMOD_DSP; var bypass: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_Reset (dsp: FMOD_DSP): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + DSP parameter control +*) + +function FMOD_DSP_SetParameter (dsp: FMOD_DSP; index: Integer; value: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetParameter (dsp: FMOD_DSP; index: Integer; var value: Single; valuestr: PChar; valuestrlen: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetNumParameters (dsp: FMOD_DSP; var numparams: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetParameterInfo (dsp: FMOD_DSP; index: Integer; name: PChar; plabel: PChar; description: PChar; descriptionlen: Integer; var min: Single; var max: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_ShowConfigDialog (dsp: FMOD_DSP; hwnd: Pointer; show: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + DSP attributes. +*) + +function FMOD_DSP_GetInfo (dsp: FMOD_DSP; name:PChar; var version: cardinal; var channels:integer; var configwidth:integer; var configheight:integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_SetDefaults (dsp: FMOD_DSP; frequency: Single; volume: Single; pan: Single; var levels: Single; priority: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetDefaults (dsp: FMOD_DSP; var frequency: Single; var volume: Single; var pan: Single; var priority: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Userdata set/get. +*) + +function FMOD_DSP_SetUserData (dsp: FMOD_DSP; userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_DSP_GetUserData (dsp: FMOD_DSP; var userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + 'Geometry' API +*) + +function FMOD_Geometry_Release (geometry: FMOD_GEOMETRY): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +function FMOD_Geometry_AddPolygon (geometry: FMOD_GEOMETRY; directOcclusion: Single; reverbOcclusion: Single; doubleSided: FMOD_BOOL; numVertices: Integer; vertices: PFMOD_VECTOR; var polygonIndex: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_GetNumPolygons (geometry: FMOD_GEOMETRY; var numPolygons: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_GetMaxPolygons (geometry: FMOD_GEOMETRY; var maxPolygons: Integer; maxVertices: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_GetPolygonNumVertices(geometry: FMOD_GEOMETRY; polygonIndex: Integer; var numVertices: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_SetPolygonVertex (geometry: FMOD_GEOMETRY; polygonIndex: Integer; vertexIndex: Integer; var vertex: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_GetPolygonVertex (geometry: FMOD_GEOMETRY; polygonIndex: Integer; vertexIndex: Integer; var vertex: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_SetPolygonAttributes (geometry: FMOD_GEOMETRY; polygonIndex: Integer; directOcclusion: Single; reverbOcclusion: Single; doubleSided: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_GetPolygonAttributes (geometry: FMOD_GEOMETRY; polygonIndex: Integer; var directOcclusion: Single; var reverbOcclusion: Single; var doubleSided: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +function FMOD_Geometry_SetActive (geometry: FMOD_GEOMETRY; active: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_GetActive (geometry: FMOD_GEOMETRY; var active: FMOD_BOOL): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_SetRotation (geometry: FMOD_GEOMETRY; var forward: FMOD_VECTOR; var up: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_GetRotation (geometry: FMOD_GEOMETRY; var forward: FMOD_VECTOR; var up: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_SetPosition (geometry: FMOD_GEOMETRY; var position: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_GetPosition (geometry: FMOD_GEOMETRY; var position: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_SetScale (geometry: FMOD_GEOMETRY; var scale: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_GetScale (geometry: FMOD_GEOMETRY; var scale: FMOD_VECTOR): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_Save (geometry: FMOD_GEOMETRY; data: Pointer; var datasize: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* + Userdata set/get. +*) + +function FMOD_Geometry_SetUserData (geometry: FMOD_GEOMETRY; userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Geometry_GetUserData (geometry: FMOD_GEOMETRY; var userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +function FMOD_Load (const libname: PChar): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} +function FMOD_Unload (): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +implementation + +const +{$IFDEF MSWINDOWS} + FMOD_DLL = 'fmodex.dll'; +{$ELSE} +{$IFDEF LINUX} + FMOD_DLL = 'libfmodex.so'; +{$ENDIF} +{$ENDIF} + +function FMOD_Load(const libname: PChar): FMOD_RESULT; +begin + FMOD_Load := FMOD_OK; +end; + +function FMOD_Unload(): FMOD_RESULT; +begin + FMOD_Unload := FMOD_OK; +end; + +(* + FMOD System memory functions (optional). +*) + +function FMOD_Memory_Initialize ; external FMOD_DLL; +function FMOD_Memory_GetStats ; external FMOD_DLL; + +(* + FMOD System factory functions. Use this to create an FMOD System Instance. below you will see FMOD_System_Init/Close to get started. +*) + +function FMOD_System_Create ; external FMOD_DLL; +function FMOD_System_Release ; external FMOD_DLL; + +(* + 'System' API +*) + +(* + Pre-init functions. +*) + +function FMOD_System_SetOutput ; external FMOD_DLL; +function FMOD_System_GetOutput ; external FMOD_DLL; +function FMOD_System_GetNumDrivers ; external FMOD_DLL; +// function FMOD_System_GetDriverName ; external FMOD_DLL; +function FMOD_System_GetDriverCaps ; external FMOD_DLL; +function FMOD_System_SetDriver ; external FMOD_DLL; +function FMOD_System_GetDriver ; external FMOD_DLL; +function FMOD_System_SetHardwareChannels ; external FMOD_DLL; +function FMOD_System_GetHardwareChannels ; external FMOD_DLL; +function FMOD_System_SetSoftwareChannels ; external FMOD_DLL; +function FMOD_System_GetSoftwareChannels ; external FMOD_DLL; +function FMOD_System_SetSoftwareFormat ; external FMOD_DLL; +function FMOD_System_GetSoftwareFormat ; external FMOD_DLL; +function FMOD_System_SetDSPBufferSize ; external FMOD_DLL; +function FMOD_System_GetDSPBufferSize ; external FMOD_DLL; +function FMOD_System_SetFileSystem ; external FMOD_DLL; +function FMOD_System_AttachFileSystem ; external FMOD_DLL; +function FMOD_System_SetAdvancedSettings ; external FMOD_DLL; +function FMOD_System_GetAdvancedSettings ; external FMOD_DLL; +function FMOD_System_SetSpeakerMode ; external FMOD_DLL; +function FMOD_System_GetSpeakerMode ; external FMOD_DLL; + +(* + Plug-in support +*) + +function FMOD_System_SetPluginPath ; external FMOD_DLL; +function FMOD_System_LoadPlugin ; external FMOD_DLL; +function FMOD_System_GetNumPlugins ; external FMOD_DLL; +function FMOD_System_GetPluginInfo ; external FMOD_DLL; +function FMOD_System_UnloadPlugin ; external FMOD_DLL; +function FMOD_System_SetOutputByPlugin ; external FMOD_DLL; +function FMOD_System_GetOutputByPlugin ; external FMOD_DLL; +// function FMOD_System_CreateCodec ; external FMOD_DLL; + +(* + Init/Close +*) + +function FMOD_System_Init ; external FMOD_DLL; +function FMOD_System_Close ; external FMOD_DLL; + +(* + General post-init system functions +*) + +function FMOD_System_Update ; external FMOD_DLL; +// function FMOD_System_UpdateFinished ; external FMOD_DLL; + +function FMOD_System_Set3DSettings ; external FMOD_DLL; +function FMOD_System_Get3DSettings ; external FMOD_DLL; +function FMOD_System_Set3DNumListeners ; external FMOD_DLL; +function FMOD_System_Get3DNumListeners ; external FMOD_DLL; +function FMOD_System_Set3DListenerAttributes; external FMOD_DLL; +function FMOD_System_Get3DListenerAttributes; external FMOD_DLL; + +// function FMOD_System_SetSpeakerPosition ; external FMOD_DLL; +// function FMOD_System_GetSpeakerPosition ; external FMOD_DLL; +function FMOD_System_SetStreamBufferSize ; external FMOD_DLL; +function FMOD_System_GetStreamBufferSize ; external FMOD_DLL; + +(* + System information functions. +*) + +function FMOD_System_GetVersion ; external FMOD_DLL; +function FMOD_System_GetOutputHandle ; external FMOD_DLL; +function FMOD_System_GetChannelsPlaying ; external FMOD_DLL; +function FMOD_System_GetCPUUsage ; external FMOD_DLL; +function FMOD_System_GetSoundRAM ; external FMOD_DLL; +function FMOD_System_GetNumCDROMDrives ; external FMOD_DLL; +function FMOD_System_GetCDROMDriveName ; external FMOD_DLL; +function FMOD_System_GetSpectrum ; external FMOD_DLL; +function FMOD_System_GetWaveData ; external FMOD_DLL; + +(* + Sound/DSP/Channel/FX creation and retrieval. +*) + +function FMOD_System_CreateSound ; external FMOD_DLL; +function FMOD_System_CreateStream ; external FMOD_DLL; +function FMOD_System_CreateDSP ; external FMOD_DLL; +function FMOD_System_CreateDSPByType ; external FMOD_DLL; +// function FMOD_System_CreateDSPByIndex ; external FMOD_DLL; +function FMOD_System_CreateChannelGroup ; external FMOD_DLL; + +function FMOD_System_PlaySound ; external FMOD_DLL; +function FMOD_System_PlayDSP ; external FMOD_DLL; +function FMOD_System_GetChannel ; external FMOD_DLL; +function FMOD_System_GetMasterChannelGroup ; external FMOD_DLL; + +(* + Reverb API +*) + +function FMOD_System_SetReverbProperties ; external FMOD_DLL; +function FMOD_System_GetReverbProperties ; external FMOD_DLL; +Function FMOD_System_SetReverbAmbientProperties; external fmod_dll; +(* + System level DSP access. +*) + +function FMOD_System_GetDSPHead ; external FMOD_DLL; +function FMOD_System_AddDSP ; external FMOD_DLL; +function FMOD_System_LockDSP ; external FMOD_DLL; +function FMOD_System_UnlockDSP ; external FMOD_DLL; + +(* + Recording API +*) + +// function FMOD_System_SetRecordDriver ; external FMOD_DLL; +// function FMOD_System_GetRecordDriver ; external FMOD_DLL; +function FMOD_System_GetRecordNumDrivers ; external FMOD_DLL; +// function FMOD_System_GetRecordDriverName ; external FMOD_DLL; +function FMOD_System_GetRecordPosition ; external FMOD_DLL; + +function FMOD_System_RecordStart ; external FMOD_DLL; +function FMOD_System_RecordStop ; external FMOD_DLL; +function FMOD_System_IsRecording ; external FMOD_DLL; + +(* + Geometry API. +*) + +function FMOD_System_CreateGeometry ; external FMOD_DLL; +function FMOD_System_SetGeometrySettings ; external FMOD_DLL; +function FMOD_System_GetGeometrySettings ; external FMOD_DLL; +function FMOD_System_LoadGeometry ; external FMOD_DLL; + +(* + Network functions +*) + +function FMOD_System_SetNetworkProxy ; external FMOD_DLL; +function FMOD_System_GetNetworkProxy ; external FMOD_DLL; +function FMOD_System_SetNetworkTimeout ; external FMOD_DLL; +function FMOD_System_GetNetworkTimeout ; external FMOD_DLL; + +(* + Userdata set/get +*) + +function FMOD_System_SetUserData ; external FMOD_DLL; +function FMOD_System_GetUserData ; external FMOD_DLL; + +(* + 'Sound' API +*) + +function FMOD_Sound_Release ; external FMOD_DLL; +function FMOD_Sound_GetSystemObject ; external FMOD_DLL; + +(* + Standard sound manipulation functions. +*) + +function FMOD_Sound_Lock ; external FMOD_DLL; +function FMOD_Sound_Unlock ; external FMOD_DLL; +function FMOD_Sound_SetDefaults ; external FMOD_DLL; +function FMOD_Sound_GetDefaults ; external FMOD_DLL; +function FMOD_Sound_SetVariations ; external FMOD_DLL; +function FMOD_Sound_GetVariations ; external FMOD_DLL; +function FMOD_Sound_Set3DMinMaxDistance ; external FMOD_DLL; +function FMOD_Sound_Get3DMinMaxDistance ; external FMOD_DLL; +function FMOD_Sound_Set3DConeSettings ; external FMOD_DLL; +function FMOD_Sound_Get3DConeSettings ; external FMOD_DLL; +function FMOD_Sound_Set3DCustomRolloff ; external FMOD_DLL; +function FMOD_Sound_Get3DCustomRolloff ; external FMOD_DLL; +function FMOD_Sound_SetSubSound ; external FMOD_DLL; +function FMOD_Sound_GetSubSound ; external FMOD_DLL; +function FMOD_Sound_SetSubSoundSentence ; external FMOD_DLL; +function FMOD_Sound_GetName ; external FMOD_DLL; +function FMOD_Sound_GetLength ; external FMOD_DLL; +function FMOD_Sound_GetFormat ; external FMOD_DLL; +function FMOD_Sound_GetNumSubSounds ; external FMOD_DLL; +function FMOD_Sound_GetNumTags ; external FMOD_DLL; +function FMOD_Sound_GetTag ; external FMOD_DLL; +function FMOD_Sound_GetOpenState ; external FMOD_DLL; +function FMOD_Sound_ReadData ; external FMOD_DLL; +function FMOD_Sound_SeekData ; external FMOD_DLL; + +(* + Synchronization point API. These points can come from markers embedded in wav files, and can also generate channel callbacks. +*) + +function FMOD_Sound_GetNumSyncPoints ; external FMOD_DLL; +function FMOD_Sound_GetSyncPoint ; external FMOD_DLL; +function FMOD_Sound_GetSyncPointInfo ; external FMOD_DLL; +function FMOD_Sound_AddSyncPoint ; external FMOD_DLL; +function FMOD_Sound_DeleteSyncPoint ; external FMOD_DLL; + +(* + Functions also in Channel class but here they are the 'default' to save having to change it in Channel all the time. +*) + +function FMOD_Sound_SetMode ; external FMOD_DLL; +function FMOD_Sound_GetMode ; external FMOD_DLL; +function FMOD_Sound_SetLoopCount ; external FMOD_DLL; +function FMOD_Sound_GetLoopCount ; external FMOD_DLL; +function FMOD_Sound_SetLoopPoints ; external FMOD_DLL; +function FMOD_Sound_GetLoopPoints ; external FMOD_DLL; + +(* + Userdata set/get. +*) + +function FMOD_Sound_SetUserData ; external FMOD_DLL; +function FMOD_Sound_GetUserData ; external FMOD_DLL; + +(* + 'Channel' API +*) + +function FMOD_Channel_GetSystemObject ; external FMOD_DLL; + +function FMOD_Channel_Stop ; external FMOD_DLL; +function FMOD_Channel_SetPaused ; external FMOD_DLL; +function FMOD_Channel_GetPaused ; external FMOD_DLL; +function FMOD_Channel_SetVolume ; external FMOD_DLL; +function FMOD_Channel_GetVolume ; external FMOD_DLL; +function FMOD_Channel_SetFrequency ; external FMOD_DLL; +function FMOD_Channel_GetFrequency ; external FMOD_DLL; +function FMOD_Channel_SetPan ; external FMOD_DLL; +function FMOD_Channel_GetPan ; external FMOD_DLL; +function FMOD_Channel_SetDelay ; external FMOD_DLL; +function FMOD_Channel_GetDelay ; external FMOD_DLL; +function FMOD_Channel_SetSpeakerMix ; external FMOD_DLL; +function FMOD_Channel_GetSpeakerMix ; external FMOD_DLL; +function FMOD_Channel_SetSpeakerLevels ; external FMOD_DLL; +function FMOD_Channel_GetSpeakerLevels ; external FMOD_DLL; +function FMOD_Channel_SetMute ; external FMOD_DLL; +function FMOD_Channel_GetMute ; external FMOD_DLL; +function FMOD_Channel_SetPriority ; external FMOD_DLL; +function FMOD_Channel_GetPriority ; external FMOD_DLL; +function FMOD_Channel_SetPosition ; external FMOD_DLL; +function FMOD_Channel_GetPosition ; external FMOD_DLL; +function FMOD_Channel_SetReverbProperties ; external FMOD_DLL; +function FMOD_Channel_GetReverbProperties ; external FMOD_DLL; +function FMOD_Channel_SetChannelGroup ; external FMOD_DLL; +function FMOD_Channel_GetChannelGroup ; external FMOD_DLL; +function FMOD_Channel_SetCallback ; external FMOD_DLL; + +(* + 3D functionality. +*) + +function FMOD_Channel_Set3DAttributes ; external FMOD_DLL; +function FMOD_Channel_Get3DAttributes ; external FMOD_DLL; +function FMOD_Channel_Set3DMinMaxDistance ; external FMOD_DLL; +function FMOD_Channel_Get3DMinMaxDistance ; external FMOD_DLL; +function FMOD_Channel_Set3DConeSettings ; external FMOD_DLL; +function FMOD_Channel_Get3DConeSettings ; external FMOD_DLL; +function FMOD_Channel_Set3DConeOrientation ; external FMOD_DLL; +function FMOD_Channel_Get3DConeOrientation ; external FMOD_DLL; +function FMOD_Channel_Set3DCustomRolloff ; external FMOD_DLL; +function FMOD_Channel_Get3DCustomRolloff ; external FMOD_DLL; +function FMOD_Channel_Set3DOcclusion ; external FMOD_DLL; +function FMOD_Channel_Get3DOcclusion ; external FMOD_DLL; +function FMOD_Channel_Set3DSpread ; external FMOD_DLL; +function FMOD_Channel_Get3DSpread ; external FMOD_DLL; +function FMOD_Channel_Set3DPanLevel ; external FMOD_DLL; +function FMOD_Channel_Get3DPanLevel ; external FMOD_DLL; + +(* + DSP functionality only for channels playing sounds created with FMOD_SOFTWARE. +*) + +function FMOD_Channel_GetDSPHead ; external FMOD_DLL; +function FMOD_Channel_AddDSP ; external FMOD_DLL; + +(* + Information only functions. +*) + +function FMOD_Channel_IsPlaying ; external FMOD_DLL; +function FMOD_Channel_IsVirtual ; external FMOD_DLL; +function FMOD_Channel_GetAudibility ; external FMOD_DLL; +function FMOD_Channel_GetCurrentSound ; external FMOD_DLL; +function FMOD_Channel_GetSpectrum ; external FMOD_DLL; +function FMOD_Channel_GetWaveData ; external FMOD_DLL; +function FMOD_Channel_GetIndex ; external FMOD_DLL; + +(* + Functions also found in Sound class but here they can be set per channel. +*) + +function FMOD_Channel_SetMode ; external FMOD_DLL; +function FMOD_Channel_GetMode ; external FMOD_DLL; +function FMOD_Channel_SetLoopCount ; external FMOD_DLL; +function FMOD_Channel_GetLoopCount ; external FMOD_DLL; +function FMOD_Channel_SetLoopPoints ; external FMOD_DLL; +function FMOD_Channel_GetLoopPoints ; external FMOD_DLL; + +(* + Userdata set/get. +*) + +function FMOD_Channel_SetUserData ; external FMOD_DLL; +function FMOD_Channel_GetUserData ; external FMOD_DLL; + +(* + 'ChannelGroup' API +*) + +function FMOD_ChannelGroup_Release ; external FMOD_DLL; +function FMOD_ChannelGroup_GetSystemObject ; external FMOD_DLL; + +(* + Channelgroup scale values. (scales the current volume or pitch of all channels and channel groups, DOESN'T overwrite) +*) + +function FMOD_ChannelGroup_SetVolume ; external FMOD_DLL; +function FMOD_ChannelGroup_GetVolume ; external FMOD_DLL; +function FMOD_ChannelGroup_SetPitch ; external FMOD_DLL; +function FMOD_ChannelGroup_GetPitch ; external FMOD_DLL; + +(* + Channelgroup override values. (recursively overwrites whatever settings the channels had) +*) + +function FMOD_ChannelGroup_Stop ; external FMOD_DLL; +// function FMOD_ChannelGroup_OverridePaused ; external FMOD_DLL; +function FMOD_ChannelGroup_OverrideVolume ; external FMOD_DLL; +function FMOD_ChannelGroup_OverrideFrequency ; external FMOD_DLL; +function FMOD_ChannelGroup_OverridePan ; external FMOD_DLL; +// function FMOD_ChannelGroup_OverrideMute ; external FMOD_DLL; +function FMOD_ChannelGroup_OverrideReverbProperties; external FMOD_DLL; +function FMOD_ChannelGroup_Override3DAttributes ; external FMOD_DLL; +function FMOD_ChannelGroup_OverrideSpeakerMix ; external FMOD_DLL; + +(* + Nested channel groups. +*) + +function FMOD_ChannelGroup_AddGroup ; external FMOD_DLL; +function FMOD_ChannelGroup_GetNumGroups ; external FMOD_DLL; +function FMOD_ChannelGroup_GetGroup ; external FMOD_DLL; + +(* + DSP functionality only for channel groups playing sounds created with FMOD_SOFTWARE. +*) + +function FMOD_ChannelGroup_GetDSPHead ; external FMOD_DLL; +function FMOD_ChannelGroup_AddDSP ; external FMOD_DLL; + +(* + Information only functions. +*) + +function FMOD_ChannelGroup_GetName ; external FMOD_DLL; +function FMOD_ChannelGroup_GetNumChannels ; external FMOD_DLL; +function FMOD_ChannelGroup_GetChannel ; external FMOD_DLL; +function FMOD_ChannelGroup_GetSpectrum ; external FMOD_DLL; +function FMOD_ChannelGroup_GetWaveData ; external FMOD_DLL; + +(* + Userdata set/get. +*) + +function FMOD_ChannelGroup_SetUserData ; external FMOD_DLL; +function FMOD_ChannelGroup_GetUserData ; external FMOD_DLL; + +(* + 'DSP' API +*) + +function FMOD_DSP_Release ; external FMOD_DLL; +function FMOD_DSP_GetSystemObject ; external FMOD_DLL; + +(* + Connection / disconnection / input and output enumeration. +*) + +function FMOD_DSP_AddInput ; external FMOD_DLL; +function FMOD_DSP_DisconnectFrom ; external FMOD_DLL; +function FMOD_DSP_Remove ; external FMOD_DLL; +function FMOD_DSP_GetNumInputs ; external FMOD_DLL; +function FMOD_DSP_GetNumOutputs ; external FMOD_DLL; +function FMOD_DSP_GetInput ; external FMOD_DLL; +function FMOD_DSP_GetOutput ; external FMOD_DLL; +// function FMOD_DSP_SetInputMix ; external FMOD_DLL; +// function FMOD_DSP_GetInputMix ; external FMOD_DLL; +// function FMOD_DSP_SetInputLevels ; external FMOD_DLL; +// function FMOD_DSP_GetInputLevels ; external FMOD_DLL; +// function FMOD_DSP_SetOutputMix ; external FMOD_DLL; +// function FMOD_DSP_GetOutputMix ; external FMOD_DLL; +// function FMOD_DSP_SetOutputLevels ; external FMOD_DLL; +// function FMOD_DSP_GetOutputLevels ; external FMOD_DLL; + +(* + DSP unit control +*) + +function FMOD_DSP_SetActive ; external FMOD_DLL; +function FMOD_DSP_GetActive ; external FMOD_DLL; +function FMOD_DSP_SetBypass ; external FMOD_DLL; +function FMOD_DSP_GetBypass ; external FMOD_DLL; +function FMOD_DSP_Reset ; external FMOD_DLL; + +(* + DSP parameter control +*) + +function FMOD_DSP_SetParameter ; external FMOD_DLL; +function FMOD_DSP_GetParameter ; external FMOD_DLL; +function FMOD_DSP_GetNumParameters ; external FMOD_DLL; +function FMOD_DSP_GetParameterInfo ; external FMOD_DLL; +function FMOD_DSP_ShowConfigDialog ; external FMOD_DLL; + +(* + DSP attributes. +*) + +function FMOD_DSP_GetInfo ; external FMOD_DLL; +function FMOD_DSP_SetDefaults ; external FMOD_DLL; +function FMOD_DSP_GetDefaults ; external FMOD_DLL; + +(* + Userdata set/get. +*) + +function FMOD_DSP_SetUserData ; external FMOD_DLL; +function FMOD_DSP_GetUserData ; external FMOD_DLL; + +(* + 'Geometry' API +*) + +function FMOD_Geometry_Release ; external FMOD_DLL; + +function FMOD_Geometry_AddPolygon ; external FMOD_DLL; +function FMOD_Geometry_GetNumPolygons ; external FMOD_DLL; +function FMOD_Geometry_GetMaxPolygons ; external FMOD_DLL; +function FMOD_Geometry_GetPolygonNumVertices; external FMOD_DLL; +function FMOD_Geometry_SetPolygonVertex ; external FMOD_DLL; +function FMOD_Geometry_GetPolygonVertex ; external FMOD_DLL; +function FMOD_Geometry_SetPolygonAttributes ; external FMOD_DLL; +function FMOD_Geometry_GetPolygonAttributes ; external FMOD_DLL; + +function FMOD_Geometry_SetActive ; external FMOD_DLL; +function FMOD_Geometry_GetActive ; external FMOD_DLL; +function FMOD_Geometry_SetRotation ; external FMOD_DLL; +function FMOD_Geometry_GetRotation ; external FMOD_DLL; +function FMOD_Geometry_SetPosition ; external FMOD_DLL; +function FMOD_Geometry_GetPosition ; external FMOD_DLL; +function FMOD_Geometry_SetScale ; external FMOD_DLL; +function FMOD_Geometry_GetScale ; external FMOD_DLL; +function FMOD_Geometry_Save ; external FMOD_DLL; + +(* + Userdata set/get. +*) + +function FMOD_Geometry_SetUserData ; external FMOD_DLL; +function FMOD_Geometry_GetUserData ; external FMOD_DLL; + +end. diff --git a/src/lib/fmod/fmoderrors.pas b/src/lib/fmod/fmoderrors.pas new file mode 100644 index 0000000..2b497bc --- /dev/null +++ b/src/lib/fmod/fmoderrors.pas @@ -0,0 +1,125 @@ +(* ============================================================================================== *) +(* FMOD Ex - Error string header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2008. *) +(* *) +(* Use this header if you want to store or display a string version / english explanation of *) +(* the FMOD error codes. *) +(* *) +(* ============================================================================================== *) + +unit fmoderrors; + +{$I fmod.inc} + +interface + +uses + fmodtypes; + +function FMOD_ErrorString(errcode: FMOD_RESULT): PChar; + +implementation + +function FMOD_ErrorString(errcode: FMOD_RESULT): PChar; +begin + case errcode of + FMOD_ERR_ALREADYLOCKED: Result := 'Tried to call lock a second time before unlock was called. '; + FMOD_ERR_BADCOMMAND: Result := 'Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound). '; + FMOD_ERR_CDDA_DRIVERS: Result := 'Neither NTSCSI nor ASPI could be initialised. '; + FMOD_ERR_CDDA_INIT: Result := 'An error occurred while initialising the CDDA subsystem. '; + FMOD_ERR_CDDA_INVALID_DEVICE: Result := 'Couldnt find the specified device. '; + FMOD_ERR_CDDA_NOAUDIO: Result := 'No audio tracks on the specified disc. '; + FMOD_ERR_CDDA_NODEVICES: Result := 'No CD/DVD devices were found. '; + FMOD_ERR_CDDA_NODISC: Result := 'No disc present in the specified drive. '; + FMOD_ERR_CDDA_READ: Result := 'A CDDA read error occurred. '; + FMOD_ERR_CHANNEL_ALLOC: Result := 'Error trying to allocate a channel. '; + FMOD_ERR_CHANNEL_STOLEN: Result := 'The specified channel has been reused to play another sound. '; + FMOD_ERR_COM: Result := 'A Win32 COM related error occured. COM failed to initialize or a QueryInterface failed meaning a Windows codec or driver was not installed properly. '; + FMOD_ERR_DMA: Result := 'DMA Failure. See debug output for more information. '; + FMOD_ERR_DSP_CONNECTION: Result := 'DSP connection error. Connection possibly caused a cyclic dependancy. Or tried to connect a tree too many units deep (more than 128). '; + FMOD_ERR_DSP_FORMAT: Result := 'DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format. '; + FMOD_ERR_DSP_NOTFOUND: Result := 'DSP connection error. Couldnt find the DSP unit specified. '; + FMOD_ERR_DSP_RUNNING: Result := 'DSP error. Cannot perform this operation while the network is in the middle of running. This will most likely happen if a connection or disconnection is attempted in a DSP callback. '; + FMOD_ERR_DSP_TOOMANYCONNECTIONS: Result := 'DSP connection error. The unit being connected to or disconnected should only have 1 input or output. '; + FMOD_ERR_EVENT_ALREADY_LOADED: Result := 'The specified project has already been loaded. Having multiple copies of the same project loaded simultaneously is forbidden. '; + FMOD_ERR_EVENT_FAILED: Result := 'An Event failed to be retrieved, most likely due to just fail being specified as the max playbacks behavior. '; + FMOD_ERR_EVENT_GUIDCONFLICT: Result := 'An event with the same GUID already exists. '; + FMOD_ERR_EVENT_INFOONLY: Result := 'Cant execute this command on an EVENT_INFOONLY event. '; + FMOD_ERR_EVENT_INTERNAL: Result := 'An error occured that wasnt supposed to. See debug log for reason. '; + FMOD_ERR_EVENT_MAXSTREAMS: Result := 'Event failed because Max streams was hit when FMOD_EVENT_INIT_FAIL_ON_MAXSTREAMS was specified. '; + FMOD_ERR_EVENT_MISMATCH: Result := 'FSB mismatches the FEV it was compiled with, the stream/sample mode it was meant to be created with was different, or the FEV was built for a different platform. '; + FMOD_ERR_EVENT_NAMECONFLICT: Result := 'A category with the same name already exists. '; + FMOD_ERR_EVENT_NEEDSSIMPLE: Result := 'Tried to call a function on a complex event thats only supported by simple events. '; + FMOD_ERR_EVENT_NOTFOUND: Result := 'The requested event, event group, event category or event property could not be found. '; + FMOD_ERR_FILE_BAD: Result := 'Error loading file. '; + FMOD_ERR_FILE_COULDNOTSEEK: Result := 'Couldnt perform seek operation. This is a limitation of the medium (ie netstreams) or the file format. '; + FMOD_ERR_FILE_DISKEJECTED: Result := 'Media was ejected while reading. '; + FMOD_ERR_FILE_EOF: Result := 'End of file unexpectedly reached while trying to read essential data (truncated data?). '; + FMOD_ERR_FILE_NOTFOUND: Result := 'File not found. '; + FMOD_ERR_FILE_UNWANTED: Result := 'Unwanted file access occured. '; + FMOD_ERR_FORMAT: Result := 'Unsupported file or audio format. '; + FMOD_ERR_HTTP: Result := 'A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere. '; + FMOD_ERR_HTTP_ACCESS: Result := 'The specified resource requires authentication or is forbidden. '; + FMOD_ERR_HTTP_PROXY_AUTH: Result := 'Proxy authentication is required to access the specified resource. '; + FMOD_ERR_HTTP_SERVER_ERROR: Result := 'A HTTP server error occurred. '; + FMOD_ERR_HTTP_TIMEOUT: Result := 'The HTTP request timed out. '; + FMOD_ERR_INITIALIZATION: Result := 'FMOD was not initialized correctly to support this function. '; + FMOD_ERR_INITIALIZED: Result := 'Cannot call this command after System::init. '; + FMOD_ERR_INTERNAL: Result := 'An error occured that wasnt supposed to. Contact support. '; + FMOD_ERR_INVALID_ADDRESS: Result := 'On Xbox 360, this memory address passed to FMOD must be physical, (ie allocated with XPhysicalAlloc.) '; + FMOD_ERR_INVALID_FLOAT: Result := 'Value passed in was a NaN, Inf or denormalized float. '; + FMOD_ERR_INVALID_HANDLE: Result := 'An invalid object handle was used. '; + FMOD_ERR_INVALID_PARAM: Result := 'An invalid parameter was passed to this function. '; + FMOD_ERR_INVALID_POSITION: Result := 'An invalid seek position was passed to this function. '; + FMOD_ERR_INVALID_SPEAKER: Result := 'An invalid speaker was passed to this function based on the current speaker mode. '; + FMOD_ERR_INVALID_SYNCPOINT: Result := 'The syncpoint did not come from this sound handle. '; + FMOD_ERR_INVALID_VECTOR: Result := 'The vectors passed in are not unit length, or perpendicular. '; + FMOD_ERR_IRX: Result := 'PS2 only. fmodex.irx failed to initialize. This is most likely because you forgot to load it. '; + FMOD_ERR_MAXAUDIBLE: Result := 'Reached maximum audible playback count for this sounds soundgroup. '; + FMOD_ERR_MEMORY: Result := 'Not enough memory or resources. '; + FMOD_ERR_MEMORY_CANTPOINT: Result := 'Cant use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used. '; + FMOD_ERR_MEMORY_IOP: Result := 'PS2 only. Not enough memory or resources on PlayStation 2 IOP ram. '; + FMOD_ERR_MEMORY_SRAM: Result := 'Not enough memory or resources on console sound ram. '; + FMOD_ERR_MUSIC_UNINITIALIZED: Result := 'Music system is not initialized probably because no music data is loaded. '; + FMOD_ERR_NEEDS2D: Result := 'Tried to call a command on a 3d sound when the command was meant for 2d sound. '; + FMOD_ERR_NEEDS3D: Result := 'Tried to call a command on a 2d sound when the command was meant for 3d sound. '; + FMOD_ERR_NEEDSHARDWARE: Result := 'Tried to use a feature that requires hardware support. (ie trying to play a VAG compressed sound in software on PS2). '; + FMOD_ERR_NEEDSSOFTWARE: Result := 'Tried to use a feature that requires the software engine. Software engine has either been turned off, or command was executed on a hardware channel which does not support this feature. '; + FMOD_ERR_NET_CONNECT: Result := 'Couldnt connect to the specified host. '; + FMOD_ERR_NET_SOCKET_ERROR: Result := 'A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere. '; + FMOD_ERR_NET_URL: Result := 'The specified URL couldnt be resolved. '; + FMOD_ERR_NET_WOULD_BLOCK: Result := 'Operation on a non-blocking socket could not complete immediately. '; + FMOD_ERR_NOTREADY: Result := 'Operation could not be performed because specified sound/DSP connection is not ready. '; + FMOD_ERR_OUTPUT_ALLOCATED: Result := 'Error initializing output device, but more specifically, the output device is already in use and cannot be reused. '; + FMOD_ERR_OUTPUT_CREATEBUFFER: Result := 'Error creating hardware sound buffer. '; + FMOD_ERR_OUTPUT_DRIVERCALL: Result := 'A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted. '; + FMOD_ERR_OUTPUT_ENUMERATION: Result := 'Error enumerating the available driver list. List may be inconsistent due to a recent device addition or removal. '; + FMOD_ERR_OUTPUT_FORMAT: Result := 'Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output). '; + FMOD_ERR_OUTPUT_INIT: Result := 'Error initializing output device. '; + FMOD_ERR_OUTPUT_NOHARDWARE: Result := 'FMOD_HARDWARE was specified but the sound card does not have the resources necessary to play it. '; + FMOD_ERR_OUTPUT_NOSOFTWARE: Result := 'Attempted to create a software sound but no software channels were specified in System::init. '; + FMOD_ERR_PAN: Result := 'Panning only works with mono or stereo sound sources. '; + FMOD_ERR_PLUGIN: Result := 'An unspecified error has been returned from a 3rd party plugin. '; + FMOD_ERR_PLUGIN_INSTANCES: Result := 'The number of allowed instances of a plugin has been exceeded. '; + FMOD_ERR_PLUGIN_MISSING: Result := 'A requested output, dsp unit type or codec was not available. '; + FMOD_ERR_PLUGIN_RESOURCE: Result := 'A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback) '; + FMOD_ERR_PRELOADED: Result := 'The specified sound is still in use by the event system, call EventSystem::unloadFSB before trying to release it. '; + FMOD_ERR_RECORD: Result := 'An error occured trying to initialize the recording device. '; + FMOD_ERR_REVERB_INSTANCE: Result := 'Specified Instance in FMOD_REVERB_PROPERTIES couldnt be set. Most likely because it is an invalid instance number, or another application has locked the EAX4 FX slot. '; + FMOD_ERR_SUBSOUNDS: Result := 'The error occured because the sound referenced contains subsounds. The operation cannot be performed on a parent sound, or a parent sound was played without setting up a sentence first. '; + FMOD_ERR_SUBSOUND_ALLOCATED: Result := 'This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parents entry first. '; + FMOD_ERR_SUBSOUND_CANTMOVE: Result := 'Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file. '; + FMOD_ERR_SUBSOUND_MODE: Result := 'The subsounds mode bits do not match with the parent sounds mode bits. See documentation for function that it was called with. '; + FMOD_ERR_TAGNOTFOUND: Result := 'The specified tag could not be found or there are no tags. '; + FMOD_ERR_TOOMANYCHANNELS: Result := 'The sound created exceeds the allowable input channel count. This can be increased using the maxinputchannels parameter in System::setSoftwareFormat. '; + FMOD_ERR_UNIMPLEMENTED: Result := 'Something in FMOD hasnt been implemented when it should be! contact support! '; + FMOD_ERR_UNINITIALIZED: Result := 'This command failed because System::init or System::setDriver was not called. '; + FMOD_ERR_UNSUPPORTED: Result := 'A command issued was not supported by this object. Possibly a plugin without certain callbacks specified. '; + FMOD_ERR_UPDATE: Result := 'An error caused by System::update occured. '; + FMOD_ERR_VERSION: Result := 'The version number of this file format is not supported. '; + FMOD_OK: Result := 'No errors.'; + else + Result := 'Unknown error.'; + end; +end; + +end. diff --git a/src/lib/fmod/fmodpresets.pas b/src/lib/fmod/fmodpresets.pas new file mode 100644 index 0000000..26905b2 --- /dev/null +++ b/src/lib/fmod/fmodpresets.pas @@ -0,0 +1,81 @@ +(* ========================================================================================== *) +(* FMOD Ex - Presets header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2008. *) +(* *) +(* A set of predefined environment PARAMETERS, created by Creative Labs. *) +(* These are used to initialize an FMOD_REVERB_PROPERTIES structure statically. *) +(* *) +(* ========================================================================================== *) + +unit fmodpresets; + +{$I fmod.inc} + +interface + +uses + fmodtypes; + +(* +[DEFINE] +[ + [NAME] + FMOD_REVERB_PRESETS + + [DESCRIPTION] + A set of predefined environment PARAMETERS, created by Creative Labs + These are used to initialize an FMOD_REVERB_PROPERTIES structure statically. + ie + FMOD_REVERB_PROPERTIES prop = FMOD_PRESET_GENERIC; + + [PLATFORMS] + Win32, Win64, Linux, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable + + [SEE_ALSO] + FMOD_System_SetReverbProperties +] +*) + +{$IFDEF COMPILER6_UP}{$J+}{$ENDIF} +(* Instance Env Size Diffuse Room RoomHF RmLF DecTm DecHF DecLF Refl RefDel RefPan Revb RevDel ReverbPan EchoTm EchDp ModTm ModDp AirAbs HFRef LFRef RRlOff Diffus Densty FLAGS *) +const + FSOUND_PRESET_OFF: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 0; EnvSize: 7.5; EnvDiffusion: 1.00; Room: -10000; RoomHF: -10000; RoomLF: 0; DecayTime: 1.00; DecayHFRatio: 1.00; DecayLFRatio: 1.0; Reflections: -2602; ReflectionsDelay: 0.007; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 200; ReverbDelay: 0.011; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 0.0; Density: 0.0; Flags: $3f); + FSOUND_PRESET_GENERIC: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 0; EnvSize: 7.5; EnvDiffusion: 1.00; Room: -1000; RoomHF: -100; RoomLF: 0; DecayTime: 1.49; DecayHFRatio: 0.83; DecayLFRatio: 1.0; Reflections: -2602; ReflectionsDelay: 0.007; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 200; ReverbDelay: 0.011; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_PADDEDCELL: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 1; EnvSize: 1.4; EnvDiffusion: 1.00; Room: -1000; RoomHF: -6000; RoomLF: 0; DecayTime: 0.17; DecayHFRatio: 0.10; DecayLFRatio: 1.0; Reflections: -1204; ReflectionsDelay: 0.001; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 207; ReverbDelay: 0.002; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_ROOM: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 2; EnvSize: 1.9; EnvDiffusion: 1.00; Room: -1000; RoomHF: -454; RoomLF: 0; DecayTime: 0.40; DecayHFRatio: 0.83; DecayLFRatio: 1.0; Reflections: -1646; ReflectionsDelay: 0.002; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 53; ReverbDelay: 0.003; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_BATHROOM: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 3; EnvSize: 1.4; EnvDiffusion: 1.00; Room: -1000; RoomHF: -1200; RoomLF: 0; DecayTime: 1.49; DecayHFRatio: 0.54; DecayLFRatio: 1.0; Reflections: -370; ReflectionsDelay: 0.007; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 1030; ReverbDelay: 0.011; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 60.0; Flags: $3f); + FSOUND_PRESET_LIVINGROOM: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 4; EnvSize: 2.5; EnvDiffusion: 1.00; Room: -1000; RoomHF: -6000; RoomLF: 0; DecayTime: 0.50; DecayHFRatio: 0.10; DecayLFRatio: 1.0; Reflections: -1376; ReflectionsDelay: 0.003; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-1104; ReverbDelay: 0.004; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_STONEROOM: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 5; EnvSize: 11.6; EnvDiffusion: 1.00; Room: -1000; RoomHF: -300; RoomLF: 0; DecayTime: 2.31; DecayHFRatio: 0.64; DecayLFRatio: 1.0; Reflections: -711; ReflectionsDelay: 0.012; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 83; ReverbDelay: 0.017; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_AUDITORIUM: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 6; EnvSize: 21.6; EnvDiffusion: 1.00; Room: -1000; RoomHF: -476; RoomLF: 0; DecayTime: 4.32; DecayHFRatio: 0.59; DecayLFRatio: 1.0; Reflections: -789; ReflectionsDelay: 0.020; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-289; ReverbDelay: 0.030; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_CONCERTHALL: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 7; EnvSize: 19.6; EnvDiffusion: 1.00; Room: -1000; RoomHF: -500; RoomLF: 0; DecayTime: 3.92; DecayHFRatio: 0.70; DecayLFRatio: 1.0; Reflections: -1230; ReflectionsDelay: 0.020; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-2; ReverbDelay: 0.029; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_CAVE: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 8; EnvSize: 14.6; EnvDiffusion: 1.00; Room: -1000; RoomHF: 0; RoomLF: 0; DecayTime: 2.91; DecayHFRatio: 1.30; DecayLFRatio: 1.0; Reflections: -602; ReflectionsDelay: 0.015; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-302; ReverbDelay: 0.022; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $1f); + FSOUND_PRESET_ARENA: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 9; EnvSize: 36.2; EnvDiffusion: 1.00; Room: -1000; RoomHF: -698; RoomLF: 0; DecayTime: 7.24; DecayHFRatio: 0.33; DecayLFRatio: 1.0; Reflections: -1166; ReflectionsDelay: 0.020; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 16; ReverbDelay: 0.030; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_HANGAR: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 10; EnvSize: 50.3; EnvDiffusion: 1.00; Room: -1000; RoomHF: -1000; RoomLF: 0; DecayTime: 10.05; DecayHFRatio: 0.23; DecayLFRatio: 1.0; Reflections: -602; ReflectionsDelay: 0.020; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 198; ReverbDelay: 0.030; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_CARPETTEDHALLWAY: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 11; EnvSize: 1.9; EnvDiffusion: 1.00; Room: -1000; RoomHF: -4000; RoomLF: 0; DecayTime: 0.30; DecayHFRatio: 0.10; DecayLFRatio: 1.0; Reflections: -1831; ReflectionsDelay: 0.002; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-1630; ReverbDelay: 0.030; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_HALLWAY: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 12; EnvSize: 1.8; EnvDiffusion: 1.00; Room: -1000; RoomHF: -300; RoomLF: 0; DecayTime: 1.49; DecayHFRatio: 0.59; DecayLFRatio: 1.0; Reflections: -1219; ReflectionsDelay: 0.007; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 441; ReverbDelay: 0.011; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_STONECORRIDOR: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 13; EnvSize: 13.5; EnvDiffusion: 1.00; Room: -1000; RoomHF: -237; RoomLF: 0; DecayTime: 2.70; DecayHFRatio: 0.79; DecayLFRatio: 1.0; Reflections: -1214; ReflectionsDelay: 0.013; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 395; ReverbDelay: 0.020; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_ALLEY: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 14; EnvSize: 7.5; EnvDiffusion: 0.30; Room: -1000; RoomHF: -270; RoomLF: 0; DecayTime: 1.49; DecayHFRatio: 0.86; DecayLFRatio: 1.0; Reflections: -1204; ReflectionsDelay: 0.007; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-4; ReverbDelay: 0.011; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.125; EchoDepth: 0.95; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_FOREST: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 15; EnvSize: 38.0; EnvDiffusion: 0.30; Room: -1000; RoomHF: -3300; RoomLF: 0; DecayTime: 1.49; DecayHFRatio: 0.54; DecayLFRatio: 1.0; Reflections: -2560; ReflectionsDelay: 0.162; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-229; ReverbDelay: 0.088; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.125; EchoDepth: 1.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 79.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_CITY: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 16; EnvSize: 7.5; EnvDiffusion: 0.50; Room: -1000; RoomHF: -800; RoomLF: 0; DecayTime: 1.49; DecayHFRatio: 0.67; DecayLFRatio: 1.0; Reflections: -2273; ReflectionsDelay: 0.007; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-1691; ReverbDelay: 0.011; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 50.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_MOUNTAINS: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 17; EnvSize: 100.0; EnvDiffusion: 0.27; Room: -1000; RoomHF: -2500; RoomLF: 0; DecayTime: 1.49; DecayHFRatio: 0.21; DecayLFRatio: 1.0; Reflections: -2780; ReflectionsDelay: 0.300; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-1434; ReverbDelay: 0.100; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 1.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 27.0; Density: 100.0; Flags: $1f); + FSOUND_PRESET_QUARRY: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 18; EnvSize: 17.5; EnvDiffusion: 1.00; Room: -1000; RoomHF: -1000; RoomLF: 0; DecayTime: 1.49; DecayHFRatio: 0.83; DecayLFRatio: 1.0; Reflections: -10000;ReflectionsDelay: 0.061; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 500; ReverbDelay: 0.025; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.125; EchoDepth: 0.70; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_PLAIN: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 19; EnvSize: 42.5; EnvDiffusion: 0.21; Room: -1000; RoomHF: -2000; RoomLF: 0; DecayTime: 1.49; DecayHFRatio: 0.50; DecayLFRatio: 1.0; Reflections: -2466; ReflectionsDelay: 0.179; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-1926; ReverbDelay: 0.100; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 1.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 21.0; Density: 100.0; Flags: $3f); + FSOUND_PRESET_PARKINGLOT: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 20; EnvSize: 8.3; EnvDiffusion: 1.00; Room: -1000; RoomHF: 0; RoomLF: 0; DecayTime: 1.65; DecayHFRatio: 1.50; DecayLFRatio: 1.0; Reflections: -1363; ReflectionsDelay: 0.008; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-1153; ReverbDelay: 0.012; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $1f); + FSOUND_PRESET_SEWERPIPE: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 21; EnvSize: 1.7; EnvDiffusion: 0.80; Room: -1000; RoomHF: -1000; RoomLF: 0; DecayTime: 2.81; DecayHFRatio: 0.14; DecayLFRatio: 1.0; Reflections: 429; ReflectionsDelay: 0.014; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 1023; ReverbDelay: 0.021; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 0.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 80.0; Density: 60.0; Flags: $3f); + FSOUND_PRESET_UNDERWATER: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 22; EnvSize: 1.8; EnvDiffusion: 1.00; Room: -1000; RoomHF: -4000; RoomLF: 0; DecayTime: 1.49; DecayHFRatio: 0.10; DecayLFRatio: 1.0; Reflections: -449; ReflectionsDelay: 0.007; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 1700; ReverbDelay: 0.011; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 1.18; ModulationDepth: 0.348; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $3f); + +(* Non I3DL2 presets *) + + FSOUND_PRESET_DRUGGED: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 23; EnvSize: 1.9; EnvDiffusion: 0.50; Room: -1000; RoomHF: 0; RoomLF: 0; DecayTime: 8.39; DecayHFRatio: 1.39; DecayLFRatio: 1.0; Reflections: -115; ReflectionsDelay: 0.002; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 985; ReverbDelay: 0.030; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 0.25; ModulationDepth: 1.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $1f); + FSOUND_PRESET_DIZZY: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 24; EnvSize: 1.8; EnvDiffusion: 0.60; Room: -1000; RoomHF: -400; RoomLF: 0; DecayTime: 17.23; DecayHFRatio: 0.56; DecayLFRatio: 1.0; Reflections: -1713; ReflectionsDelay: 0.020; ReflectionsPan: (0.0, 0.0, 0.0); Reverb:-613; ReverbDelay: 0.030; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 1.00; ModulationTime: 0.81; ModulationDepth: 0.310; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $1f); + FSOUND_PRESET_PSYCHOTIC: FMOD_REVERB_PROPERTIES = (Instance: 0; Environment: 25; EnvSize: 1.0; EnvDiffusion: 0.50; Room: -1000; RoomHF: -151; RoomLF: 0; DecayTime: 7.56; DecayHFRatio: 0.91; DecayLFRatio: 1.0; Reflections: -626; ReflectionsDelay: 0.020; ReflectionsPan: (0.0, 0.0, 0.0); Reverb: 774; ReverbDelay: 0.030; ReverbPan: (0.0, 0.0, 0.0); EchoTime: 0.250; EchoDepth: 0.00; ModulationTime: 4.00; ModulationDepth: 1.000; AirAbsorptionHF: -5.0; HFReference: 5000.0; LFReference: 250.0; RoomRolloffFactor: 0.0; Diffusion: 100.0; Density: 100.0; Flags: $1f); + +(* PlayStation 2 Only presets *) +(* Delphi/Kylix cannot create PlayStation 2 executables, so there is no need to + convert the PlayStation 2 presets. *) +{$IFDEF COMPILER6_UP}{$J-}{$ENDIF} + +(* [DEFINE_END] *) + +implementation + +end. diff --git a/src/lib/fmod/fmodtypes.pas b/src/lib/fmod/fmodtypes.pas new file mode 100644 index 0000000..bdd5942 --- /dev/null +++ b/src/lib/fmod/fmodtypes.pas @@ -0,0 +1,2181 @@ +(* ============================================================================================= *) +(* FMOD Ex - Main C/C++ header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2008. *) +(* *) +(* This header is the base header for all other FMOD headers. If you are programming in C *) +(* use this exclusively, or if you are programming C++ use this in conjunction with FMOD.HPP *) +(* *) +(* ============================================================================================= *) + +unit fmodtypes; + +{$I fmod.inc} + +interface + +(* + FMOD version number. Check this against FMOD_System_GetVersion +*) + +const + FMOD_VERSION = $00041500; + +(* + FMOD types. +*) + +type + FMOD_SYSTEM = Pointer; + FMOD_SOUND = Pointer; + FMOD_CHANNEL = Pointer; + FMOD_CHANNELGROUP = Pointer; + FMOD_DSP = Pointer; + FMOD_BOOL = LongBool; + FMOD_POLYGON = Pointer; + FMOD_GEOMETRY = Pointer; + FMOD_SYNCPOINT = Pointer; + FMOD_TIMEUNIT = Cardinal; + fmod_mode=cardinal; + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + Structure describing a point in 3D space. + + [REMARKS] + FMOD uses a left handed co-ordinate system by default. + To use a right handed co-ordinate system specify FMOD_INIT_3D_RIGHTHANDED from FMOD_INITFLAGS in FMOD_System_Init. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_Set3DListenerAttributes + FMOD_System_Get3DListenerAttributes + FMOD_Channel_Set3DAttributes + FMOD_Channel_Get3DAttributes + FMOD_Geometry_AddPolygon + FMOD_Geometry_SetPolygonVertex + FMOD_Geometry_GetPolygonVertex + FMOD_Geometry_SetRotation + FMOD_Geometry_GetRotation + FMOD_Geometry_SetPosition + FMOD_Geometry_GetPosition + FMOD_Geometry_SetScale + FMOD_Geometry_GetScale + FMOD_INITFLAGS +] +*) +type PFMOD_VECTOR = ^FMOD_VECTOR; + FMOD_VECTOR = record + x, y, z: Single; + end; + + +(* +[ENUM] +[ + [DESCRIPTION] + error codes. Returned from every function. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] +] +*) +type + FMOD_RESULT = + ( + FMOD_OK, { No errors. } + FMOD_ERR_ALREADYLOCKED, { Tried to call lock a second time before unlock was called. } + FMOD_ERR_BADCOMMAND, { Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound). } + FMOD_ERR_CDDA_DRIVERS, { Neither NTSCSI nor ASPI could be initialised. } + FMOD_ERR_CDDA_INIT, { An error occurred while initialising the CDDA subsystem. } + FMOD_ERR_CDDA_INVALID_DEVICE, { Couldn't find the specified device. } + FMOD_ERR_CDDA_NOAUDIO, { No audio tracks on the specified disc. } + FMOD_ERR_CDDA_NODEVICES, { No CD/DVD devices were found. } + FMOD_ERR_CDDA_NODISC, { No disc present in the specified drive. } + FMOD_ERR_CDDA_READ, { A CDDA read error occurred. } + FMOD_ERR_CHANNEL_ALLOC, { Error trying to allocate a channel. } + FMOD_ERR_CHANNEL_STOLEN, { The specified channel has been reused to play another sound. } + FMOD_ERR_COM, { A Win32 COM related error occured. COM failed to initialize or a QueryInterface failed meaning a Windows codec or driver was not installed properly. } + FMOD_ERR_DMA, { DMA Failure. See debug output for more information. } + FMOD_ERR_DSP_CONNECTION, { DSP connection error. Connection possibly caused a cyclic dependancy. Or tried to connect a tree too many units deep (more than 128). } + FMOD_ERR_DSP_FORMAT, { DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format. } + FMOD_ERR_DSP_NOTFOUND, { DSP connection error. Couldn't find the DSP unit specified. } + FMOD_ERR_DSP_RUNNING, { DSP error. Cannot perform this operation while the network is in the middle of running. This will most likely happen if a connection or disconnection is attempted in a DSP callback. } + FMOD_ERR_DSP_TOOMANYCONNECTIONS,{ DSP connection error. The unit being connected to or disconnected should only have 1 input or output. } + FMOD_ERR_FILE_BAD, { Error loading file. } + FMOD_ERR_FILE_COULDNOTSEEK, { Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format. } + FMOD_ERR_FILE_DISKEJECTED, { Media was ejected while reading. } + FMOD_ERR_FILE_EOF, { End of file unexpectedly reached while trying to read essential data (truncated data?). } + FMOD_ERR_FILE_NOTFOUND, { File not found. } + FMOD_ERR_FILE_UNWANTED, { Unwanted file access occured. } + FMOD_ERR_FORMAT, { Unsupported file or audio format. } + FMOD_ERR_HTTP, { A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere. } + FMOD_ERR_HTTP_ACCESS, { The specified resource requires authentication or is forbidden. } + FMOD_ERR_HTTP_PROXY_AUTH, { Proxy authentication is required to access the specified resource. } + FMOD_ERR_HTTP_SERVER_ERROR, { A HTTP server error occurred. } + FMOD_ERR_HTTP_TIMEOUT, { The HTTP request timed out. } + FMOD_ERR_INITIALIZATION, { FMOD was not initialized correctly to support this function. } + FMOD_ERR_INITIALIZED, { Cannot call this command after System::init. } + FMOD_ERR_INTERNAL, { An error occured that wasn't supposed to. Contact support. } + FMOD_ERR_INVALID_ADDRESS, { On Xbox 360, this memory address passed to FMOD must be physical, (ie allocated with XPhysicalAlloc.) } + FMOD_ERR_INVALID_FLOAT, { Value passed in was a NaN, Inf or denormalized float. } + FMOD_ERR_INVALID_HANDLE, { An invalid object handle was used. } + FMOD_ERR_INVALID_PARAM, { An invalid parameter was passed to this function. } + FMOD_ERR_INVALID_POSITION, { An invalid seek position was passed to this function. } + FMOD_ERR_INVALID_SPEAKER, { An invalid speaker was passed to this function based on the current speaker mode. } + FMOD_ERR_INVALID_SYNCPOINT, { The syncpoint did not come from this sound handle. } + FMOD_ERR_INVALID_VECTOR, { The vectors passed in are not unit length, or perpendicular. } + FMOD_ERR_IRX, { PS2 only. fmodex.irx failed to initialize. This is most likely because you forgot to load it. } + FMOD_ERR_MAXAUDIBLE, { Reached maximum audible playback count for this sound's soundgroup. } + FMOD_ERR_MEMORY, { Not enough memory or resources. } + FMOD_ERR_MEMORY_CANTPOINT, { Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used. } + FMOD_ERR_MEMORY_IOP, { PS2 only. Not enough memory or resources on PlayStation 2 IOP ram. } + FMOD_ERR_MEMORY_SRAM, { Not enough memory or resources on console sound ram. } + FMOD_ERR_NEEDS2D, { Tried to call a command on a 3d sound when the command was meant for 2d sound. } + FMOD_ERR_NEEDS3D, { Tried to call a command on a 2d sound when the command was meant for 3d sound. } + FMOD_ERR_NEEDSHARDWARE, { Tried to use a feature that requires hardware support. (ie trying to play a VAG compressed sound in software on PS2). } + FMOD_ERR_NEEDSSOFTWARE, { Tried to use a feature that requires the software engine. Software engine has either been turned off, or command was executed on a hardware channel which does not support this feature. } + FMOD_ERR_NET_CONNECT, { Couldn't connect to the specified host. } + FMOD_ERR_NET_SOCKET_ERROR, { A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere. } + FMOD_ERR_NET_URL, { The specified URL couldn't be resolved. } + FMOD_ERR_NET_WOULD_BLOCK, { Operation on a non-blocking socket could not complete immediately. } + FMOD_ERR_NOTREADY, { Operation could not be performed because specified sound/DSP connection is not ready. } + FMOD_ERR_OUTPUT_ALLOCATED, { Error initializing output device, but more specifically, the output device is already in use and cannot be reused. } + FMOD_ERR_OUTPUT_CREATEBUFFER, { Error creating hardware sound buffer. } + FMOD_ERR_OUTPUT_DRIVERCALL, { A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted. } + FMOD_ERR_OUTPUT_ENUMERATION, { Error enumerating the available driver list. List may be inconsistent due to a recent device addition or removal. } + FMOD_ERR_OUTPUT_FORMAT, { Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output). } + FMOD_ERR_OUTPUT_INIT, { Error initializing output device. } + FMOD_ERR_OUTPUT_NOHARDWARE, { FMOD_HARDWARE was specified but the sound card does not have the resources necessary to play it. } + FMOD_ERR_OUTPUT_NOSOFTWARE, { Attempted to create a software sound but no software channels were specified in System::init. } + FMOD_ERR_PAN, { Panning only works with mono or stereo sound sources. } + FMOD_ERR_PLUGIN, { An unspecified error has been returned from a 3rd party plugin. } + FMOD_ERR_PLUGIN_INSTANCES, { The number of allowed instances of a plugin has been exceeded. } + FMOD_ERR_PLUGIN_MISSING, { A requested output, dsp unit type or codec was not available. } + FMOD_ERR_PLUGIN_RESOURCE, { A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback) } + FMOD_ERR_RECORD, { An error occured trying to initialize the recording device. } + FMOD_ERR_REVERB_INSTANCE, { Specified Instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number, or another application has locked the EAX4 FX slot. } + FMOD_ERR_SUBSOUND_ALLOCATED, { This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first. } + FMOD_ERR_SUBSOUND_CANTMOVE, { Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file. } + FMOD_ERR_SUBSOUND_MODE, { The subsound's mode bits do not match with the parent sound's mode bits. See documentation for function that it was called with. } + FMOD_ERR_SUBSOUNDS, { The error occured because the sound referenced contains subsounds. The operation cannot be performed on a parent sound, or a parent sound was played without setting up a sentence first. } + FMOD_ERR_TAGNOTFOUND, { The specified tag could not be found or there are no tags. } + FMOD_ERR_TOOMANYCHANNELS, { The sound created exceeds the allowable input channel count. This can be increased using the maxinputchannels parameter in System::setSoftwareFormat. } + FMOD_ERR_UNIMPLEMENTED, { Something in FMOD hasn't been implemented when it should be! contact support! } + FMOD_ERR_UNINITIALIZED, { This command failed because System::init or System::setDriver was not called. } + FMOD_ERR_UNSUPPORTED, { A command issued was not supported by this object. Possibly a plugin without certain callbacks specified. } + FMOD_ERR_UPDATE, { An error caused by System::update occured. } + FMOD_ERR_VERSION, { The version number of this file format is not supported. } + FMOD_ERR_PRELOADED, { The specified sound is still in use by the event system, call EventSystem::unloadFSB before trying to release it. } + + FMOD_ERR_EVENT_FAILED, { An Event failed to be retrieved, most likely due to 'just fail' being specified as the max playbacks behavior. } + FMOD_ERR_EVENT_INFOONLY, { Can't execute this command on an EVENT_INFOONLY event. } + FMOD_ERR_EVENT_INTERNAL, { An error occured that wasn't supposed to. See debug log for reason. } + FMOD_ERR_EVENT_MAXSTREAMS, { Event failed because 'Max streams' was hit when FMOD_EVENT_INIT_FAIL_ON_MAXSTREAMS was specified. } + FMOD_ERR_EVENT_MISMATCH, { FSB mismatches the FEV it was compiled with, the stream/sample mode it was meant to be created with was different, or the FEV was built for a different platform. } + FMOD_ERR_EVENT_NAMECONFLICT, { A category with the same name already exists. } + FMOD_ERR_EVENT_NOTFOUND, { The requested event, event group, event category or event property could not be found. } + FMOD_ERR_EVENT_NEEDSSIMPLE, { Tried to call a function on a complex event that's only supported by simple events. } + FMOD_ERR_EVENT_GUIDCONFLICT, { An event with the same GUID already exists. } + FMOD_ERR_EVENT_ALREADY_LOADED, { The specified project has already been loaded. Having multiple copies of the same project loaded simultaneously is forbidden. } + + FMOD_ERR_MUSIC_UNINITIALIZED, { Music system is not initialized probably because no music data is loaded. } + + FMOD_RESULT_FORCEINT = 65536 { Makes sure this enum is signed 32bit. } + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + These output types are used with FMOD_System_SetOutput/FMOD_System_GetOutput, to choose which output method to use. + + [REMARKS] + To pass information to the driver when initializing fmod use the extradriverdata parameter in System::init for the following reasons. + - FMOD_OUTPUTTYPE_WAVWRITER - extradriverdata is a pointer to a char * filename that the wav writer will output to. + - FMOD_OUTPUTTYPE_WAVWRITER_NRT - extradriverdata is a pointer to a char * filename that the wav writer will output to. + - FMOD_OUTPUTTYPE_DSOUND - extradriverdata is a pointer to a HWND so that FMOD can set the focus on the audio for a particular window. + - FMOD_OUTPUTTYPE_GC - extradriverdata is a pointer to a FMOD_ARAMBLOCK_INFO struct. This can be found in fmodgc.h. + - FMOD_OUTPUTTYPE_ALSA - extradriverdata is a pointer to a char * argument if required by the chosen ALSA driver. + Currently these are the only FMOD drivers that take extra information. Other unknown plugins may have different requirements. + + Note! If FMOD_OUTPUTTYPE_NOSOUND_NRT or FMOD_OUTPUTTYPE_NOSOUND_NRT are used, and if the System::update function is being called + very quickly (ie for a non realtime decode) it may be being called too quickly for the FMOD streamer thread to respond to. + The result will be a skipping/stuttering output in the captured audio. + To remedy this, disable the FMOD Ex streamer thread, and use FMOD_INIT_STREAM_FROM_UPDATE can be used to avoid skipping in + the output stream, as it will lock the mixer and the streamer together in the same thread. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_SetOutput + FMOD_System_GetOutput + FMOD_System_SetSoftwareFormat + FMOD_System_GetSoftwareFormat + FMOD_System_Init + FMOD_System_Update + FMOD_INITFLAGS +] +*) +type + FMOD_OUTPUTTYPE = + ( + FMOD_OUTPUTTYPE_AUTODETECT, (* Picks the best output mode for the platform. This is the default. *) + + FMOD_OUTPUTTYPE_UNKNOWN, (* All - 3rd party plugin, unknown. This is for use with System::getOutput only. *) + FMOD_OUTPUTTYPE_NOSOUND, (* All - All calls in this mode succeed but make no sound. *) + FMOD_OUTPUTTYPE_WAVWRITER, (* All - Writes output to fmodoutput.wav by default. Use the 'extradriverdata' parameter in System::init, by simply passing the filename as a string, to set the wav filename. *) + FMOD_OUTPUTTYPE_NOSOUND_NRT, (* All - Non-realtime version of FMOD_OUTPUTTYPE_NOSOUND. User can drive mixer with System::update at whatever rate they want. *) + FMOD_OUTPUTTYPE_WAVWRITER_NRT, (* All - Non-realtime version of FMOD_OUTPUTTYPE_WAVWRITER. User can drive mixer with System::update at whatever rate they want. *) + + FMOD_OUTPUTTYPE_DSOUND, (* Win32/Win64 - DirectSound output. Use this to get hardware accelerated 3d audio and EAX Reverb support. (Default on Windows) *) + FMOD_OUTPUTTYPE_WINMM, (* Win32/Win64 - Windows Multimedia output. *) + FMOD_OUTPUTTYPE_OPENAL, (* Win32/Win64 - OpenAL 1.1 output. Use this for lower CPU overhead than FMOD_OUTPUTTYPE_DSOUND, and also Vista H/W support with Creative Labs cards. *) + FMOD_OUTPUTTYPE_WASAPI, (* Win32 - Windows Audio Session API. (Default on Windows Vista) *) + FMOD_OUTPUTTYPE_ASIO, (* Win32 - Low latency ASIO driver. *) + FMOD_OUTPUTTYPE_OSS, (* Linux - Open Sound System output. (Default on Linux) *) + FMOD_OUTPUTTYPE_ALSA, (* Linux - Advanced Linux Sound Architecture output. *) + FMOD_OUTPUTTYPE_ESD, (* Linux - Enlightment Sound Daemon output. *) + FMOD_OUTPUTTYPE_SOUNDMANAGER, (* Mac - Macintosh SoundManager output. (Default on Mac carbon library)*) + FMOD_OUTPUTTYPE_COREAUDIO, (* Mac - Macintosh CoreAudio output. (Default on Mac OSX library) *) + FMOD_OUTPUTTYPE_XBOX, (* Xbox - Native hardware output. (Default on Xbox) *) + FMOD_OUTPUTTYPE_PS2, (* PS2 - Native hardware output. (Default on PS2) *) + FMOD_OUTPUTTYPE_PS3, (* PS3 - Native hardware output. (Default on PS3) *) + FMOD_OUTPUTTYPE_GC, (* GameCube - Native hardware output. (Default on GameCube) *) + FMOD_OUTPUTTYPE_XBOX360, (* Xbox 360 - Native hardware output. (Default on Xbox 360) *) + FMOD_OUTPUTTYPE_PSP, (* PSP - Native hardware output. (Default on PSP) *) + FMOD_OUTPUTTYPE_WII, (* Wii - Native hardware output. (Default on Wii) *) + + FMOD_OUTPUTTYPE_MAX (* Maximum number of output types supported. *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Bit fields to use with FMOD_System_GetDriverCaps to determine the capabilities of a card / output device. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_GetDriverCaps +] +*) +const + FMOD_CAPS_NONE = $00000000; (* Device has no special capabilities *) + FMOD_CAPS_HARDWARE = $00000001; (* Device supports hardware mixing. *) + FMOD_CAPS_HARDWARE_EMULATED = $00000002; (* User has device set to 'Hardware acceleration = off' in control panel, and now extra 200ms latency is incurred.*) + FMOD_CAPS_OUTPUT_MULTICHANNEL = $00000004; (* Device can do multichannel output, ie greater than 2 channels *) + FMOD_CAPS_OUTPUT_FORMAT_PCM8 = $00000008; (* Device can output to 8bit integer PCM *) + FMOD_CAPS_OUTPUT_FORMAT_PCM16 = $00000010; (* Device can output to 16bit integer PCM *) + FMOD_CAPS_OUTPUT_FORMAT_PCM24 = $00000020; (* Device can output to 24bit integer PCM *) + FMOD_CAPS_OUTPUT_FORMAT_PCM32 = $00000040; (* Device can output to 32bit integer PCM *) + FMOD_CAPS_OUTPUT_FORMAT_PCMFLOAT = $00000080; (* Device can output to 32bit floating point PCM *) + FMOD_CAPS_REVERB_EAX2 = $00000100; (* Device supports EAX2 reverb. *) + FMOD_CAPS_REVERB_EAX3 = $00000200; (* Device supports EAX3 reverb. *) + FMOD_CAPS_REVERB_EAX4 = $00000400; (* Device supports EAX4 reverb *) + FMOD_CAPS_REVERB_EAX5 = $00000800; (* Device supports EAX5 reverb *) + FMOD_CAPS_REVERB_I3DL2 = $00001000; (* Device supports I3DL2 reverb. *) + FMOD_CAPS_REVERB_LIMITED = $00002000; (* Device supports some form of limited hardware reverb, maybe parameterless and only selectable by environment. *) + + +(* +[ENUM] +[ + [DESCRIPTION] + These are speaker types defined for use with the FMOD_System_SetSpeakerMode or FMOD_System_GetSpeakerMode command. + + [REMARKS] + These are important notes on speaker modes in regards to sounds created with FMOD_SOFTWARE. + Note below the phrase 'sound channels' is used. These are the subchannels inside a sound, they are not related and + have nothing to do with the FMOD class "FMOD_CHANNEL". + For example a mono sound has 1 sound channel, a stereo sound has 2 sound channels, and an AC3 or 6 channel wav file have 6 "sound channels". + + FMOD_SPEAKERMODE_NONE + --------------------- + This mode is for output devices that are not specifically mono/stereo/quad/surround/5.1 or 7.1, but are multichannel. + Sound channels map to speakers sequentially, so a mono sound maps to output speaker 0, stereo sound maps to output speaker 0 & 1. + The user assumes knowledge of the speaker order. FMOD_SPEAKER enumerations may not apply, so raw channel indicies should be used. + Multichannel sounds map input channels to output channels 1:1. + Channel::setPan and Channel::setSpeakerMix do not work. + Speaker levels must be manually set with Channel::setSpeakerLevels. + + FMOD_SPEAKERMODE_MONO + --------------------- + This mode is for a 1 speaker arrangement. + Panning does not work in this speaker mode. + Mono, stereo and multichannel sounds have each sound channel played on the one speaker unity. + Mix behaviour for multichannel sounds can be set with Channel::setSpeakerLevels. + Channel::setSpeakerMix does not work. + + FMOD_SPEAKERMODE_STEREO + ----------------------- + This mode is for 2 speaker arrangements that have a left and right speaker. + - Mono sounds default to an even distribution between left and right. They can be panned with Channel::setPan. + - Stereo sounds default to the middle, or full left in the left speaker and full right in the right speaker. + - They can be cross faded with Channel::setPan. + - Multichannel sounds have each sound channel played on each speaker at unity. + - Mix behaviour for multichannel sounds can be set with Channel::setSpeakerLevels. + - Channel::setSpeakerMix works but only front left and right parameters are used, the rest are ignored. + + FMOD_SPEAKERMODE_QUAD + ------------------------ + This mode is for 4 speaker arrangements that have a front left, front right, rear left and a rear right speaker. + - Mono sounds default to an even distribution between front left and front right. They can be panned with Channel::setPan. + - Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right. + - They can be cross faded with Channel::setPan. + - Multichannel sounds default to all of their sound channels being played on each speaker in order of input. + - Mix behaviour for multichannel sounds can be set with Channel::setSpeakerLevels. + - Channel::setSpeakerMix works but side left, side right, center and lfe are ignored. + + FMOD_SPEAKERMODE_SURROUND + ------------------------ + This mode is for 4 speaker arrangements that have a front left, front right, front center and a rear center. + - Mono sounds default to the center speaker. They can be panned with Channel::setPan. + - Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right. + - They can be cross faded with Channel::setPan. + - Multichannel sounds default to all of their sound channels being played on each speaker in order of input. + - Mix behaviour for multichannel sounds can be set with Channel::setSpeakerLevels. + - Channel::setSpeakerMix works but side left, side right and lfe are ignored, and rear left / rear right are averaged into the rear speaker. + + FMOD_SPEAKERMODE_5POINT1 + ------------------------ + This mode is for 5.1 speaker arrangements that have a left/right/center/rear left/rear right and a subwoofer speaker. + - Mono sounds default to the center speaker. They can be panned with Channel::setPan. + - Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right. + - They can be cross faded with Channel::setPan. + - Multichannel sounds default to all of their sound channels being played on each speaker in order of input. + - Mix behaviour for multichannel sounds can be set with Channel::setSpeakerLevels. + - Channel::setSpeakerMix works but side left / side right are ignored. + + FMOD_SPEAKERMODE_7POINT1 + ------------------------ + This mode is for 7.1 speaker arrangements that have a left/right/center/rear left/rear right/side left/side right + and a subwoofer speaker. + - Mono sounds default to the center speaker. They can be panned with Channel::setPan. + - Stereo sounds default to the left sound channel played on the front left, and the right sound channel played on the front right. + - They can be cross faded with Channel::setPan. + - Multichannel sounds default to all of their sound channels being played on each speaker in order of input. + - Mix behaviour for multichannel sounds can be set with Channel::setSpeakerLevels. + - Channel::setSpeakerMix works and every parameter is used to set the balance of a sound in any speaker. + + FMOD_SPEAKERMODE_PROLOGIC + ------------------------------------------------------ + This mode is for mono, stereo, 5.1 and 7.1 speaker arrangements, as it is backwards and forwards compatible with stereo, + but to get a surround effect a Dolby Prologic or Prologic 2 hardware decoder / amplifier is needed. + Pan behaviour is the same as FMOD_SPEAKERMODE_5POINT1. + + If this function is called the numoutputchannels setting in System::setSoftwareFormat is overwritten. + + For 3D sounds, panning is determined at runtime by the 3D subsystem based on the speaker mode to determine which speaker the + sound should be placed in. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_SetSpeakerMode + FMOD_System_GetSpeakerMode + FMOD_System_GetDriverCaps + FMOD_Channel_SetSpeakerLevels +] +*) +type + FMOD_SPEAKERMODE = + ( + FMOD_SPEAKERMODE_RAW, (* There is no specific speakermode. Sound channels are mapped in order of input to output. See remarks for more information. *) + FMOD_SPEAKERMODE_MONO, (* The speakers are monaural. *) + FMOD_SPEAKERMODE_STEREO, (* The speakers are stereo (DEFAULT). *) + FMOD_SPEAKERMODE_QUAD, (* 4 speaker setup. This includes front left, front right, rear left, rear right. *) + FMOD_SPEAKERMODE_SURROUND, (* 4 speaker setup. This includes front left, front right, center, rear center (rear left/rear right are averaged). *) + FMOD_SPEAKERMODE_5POINT1, (* 5.1 speaker setup. This includes front left, front right, center, rear left, rear right and a subwoofer. *) + FMOD_SPEAKERMODE_7POINT1, (* 7.1 speaker setup. This includes front left, front right, center, rear left, rear right, side left, side right and a subwoofer. *) + FMOD_SPEAKERMODE_PROLOGIC (* Stereo output, but data is encoded in a way that is picked up by a Prologic/Prologic2 decoder and split into a 5.1 speaker setup. *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + These are speaker types defined for use with the FMOD_Channel_SetSpeakerLevels command. + It can also be used for speaker placement in the FMOD_System_Set3DSpeakerPosition command. + + [REMARKS] + If you are using FMOD_SPEAKERMODE_NONE and speaker assignments are meaningless, just cast a raw integer value to this type. + For example (FMOD_SPEAKER)7 would use the 7th speaker (also the same as FMOD_SPEAKER_SIDE_RIGHT). + Values higher than this can be used if an output system has more than 8 speaker types / output channels. 15 is the current maximum. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_SPEAKERMODE + FMOD_Channel_SetSpeakerLevels + FMOD_Channel_GetSpeakerLevels + FMOD_System_Set3DSpeakerPosition + FMOD_System_Get3DSpeakerPosition +] +*) +type + FMOD_SPEAKER = + ( + FMOD_SPEAKER_FRONT_LEFT, + FMOD_SPEAKER_FRONT_RIGHT, + FMOD_SPEAKER_FRONT_CENTER, + FMOD_SPEAKER_LOW_FREQUENCY, + FMOD_SPEAKER_BACK_LEFT, + FMOD_SPEAKER_BACK_RIGHT, + FMOD_SPEAKER_SIDE_LEFT, + FMOD_SPEAKER_SIDE_RIGHT, + FMOD_SPEAKER_MAX + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + These are plugin types defined for use with the FMOD_System_GetNumPlugins, + FMOD_System_GetPluginInfo and FMOD_System_UnloadPlugin functions. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_GetNumPlugins + FMOD_System_GetPluginInfo + FMOD_System_UnloadPlugin +] +*) +type + FMOD_PLUGINTYPE = + ( + FMOD_PLUGINTYPE_OUTPUT, (* The plugin type is an output module. FMOD mixed audio will play through one of these devices *) + FMOD_PLUGINTYPE_CODEC, (* The plugin type is a file format codec. FMOD will use these codecs to load file formats for playback. *) + FMOD_PLUGINTYPE_DSP (* The plugin type is a DSP unit. FMOD will use these plugins as part of its DSP network to apply effects to output or generate sound in realtime. *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Initialization flags. Use them with FMOD_System_Init in the flags parameter to change various behaviour. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_Init +] +*) +const + FMOD_INIT_NORMAL = $00000000; (* All platforms - Initialize normally *) + FMOD_INIT_STREAM_FROM_UPDATE = $00000001; (* All platforms - No stream thread is created internally. Streams are driven from System::update. Mainly used with non-realtime outputs. *) + FMOD_INIT_3D_RIGHTHANDED = $00000002; (* All platforms - FMOD will treat +X as left, +Y as up and +Z as forwards. *) + FMOD_INIT_SOFTWARE_DISABLE = $00000004; (* All platforms - Disable software mixer to save memory. Anything created with FMOD_SOFTWARE will fail and DSP will not work. *) + FMOD_INIT_SOFTWARE_OCCLUSION = $00000008; (* All platforms - All FMOD_SOFTWARE with FMOD_3D based voices will add a software lowpass filter effect into the DSP chain which is automatically used when Channel::set3DOcclusion is used or the geometry API. *) + FMOD_INIT_SOFTWARE_HRTF = $00000010; (* All platforms - All FMOD_SOFTWARE with FMOD_3D based voices will add a software lowpass filter effect into the DSP chain which causes sounds to sound duller when the sound goes behind the listener. *) + FMOD_INIT_VOL0_BECOMES_VIRTUAL = $00000080; (* All platforms - Any sounds that are 0 volume will go virtual and not be processed except for having their positions updated virtually. Use System::setAdvancedSettings to adjust what volume besides zero to switch to virtual at. *) + FMOD_INIT_WASAPI_EXCLUSIVE = $00000100; (* Win32 Vista only - for WASAPI output - Enable exclusive access to hardware, lower latency at the expense of excluding other applications from accessing the audio hardware. *) + FMOD_INIT_DSOUND_HRTFNONE = $00000200; (* Win32 only - for DirectSound output - FMOD_HARDWARE | FMOD_3D buffers use simple stereo panning/doppler/attenuation when 3D hardware acceleration is not present. *) + FMOD_INIT_DSOUND_HRTFLIGHT = $00000400; (* Win32 only - for DirectSound output - FMOD_HARDWARE | FMOD_3D buffers use a slightly higher quality algorithm when 3D hardware acceleration is not present. *) + FMOD_INIT_DSOUND_HRTFFULL = $00000800; (* Win32 only - for DirectSound output - FMOD_HARDWARE | FMOD_3D buffers use full quality 3D playback when 3d hardware acceleration is not present. *) + FMOD_INIT_PS2_DISABLECORE0REVERB = $00010000; (* PS2 only - Disable reverb on CORE 0 to regain SRAM. *) + FMOD_INIT_PS2_DISABLECORE1REVERB = $00020000; (* PS2 only - Disable reverb on CORE 1 to regain SRAM. *) + FMOD_INIT_PS2_DONTUSESCRATCHPAD = $00040000; (* PS2 only - FMOD's usage of the scratchpad between System::update and System::updateFinished. *) + FMOD_INIT_PS2_SWAPDMACHANNELS = $00080000; (* PS2 only - Changes FMOD from using SPU DMA channel 0 for software mixing, and 1 for sound data upload/file streaming, to 1 and 0 respectively. *) + FMOD_INIT_XBOX_REMOVEHEADROOM = $00100000; (* Xbox only - By default DirectSound attenuates all sound by 6db to avoid clipping/distortion. CAUTION. If you use this flag you are responsible for the final mix to make sure clipping / distortion doesn't happen. *) + FMOD_INIT_360_MUSICMUTENOTPAUSE = $00200000; (* Xbox 360 only - The "music" channelgroup which by default pauses when custom 360 dashboard music is played, can be changed to mute (therefore continues playing) instead of pausing, by using this flag. *) + + + +(* +[ENUM] +[ + [DESCRIPTION] + These definitions describe the type of song being played. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_Sound_GetFormat +] +*) +type + FMOD_SOUND_TYPE = + ( + FMOD_SOUND_TYPE_UNKNOWN, { 3rd party / unknown plugin format. } + FMOD_SOUND_TYPE_AAC, { AAC. Currently unsupported. } + FMOD_SOUND_TYPE_AIFF, { AIFF. } + FMOD_SOUND_TYPE_ASF, { Microsoft Advanced Systems Format (ie WMA/ASF/WMV). } + FMOD_SOUND_TYPE_AT3, { Sony ATRAC 3 format } + FMOD_SOUND_TYPE_CDDA, { Digital CD audio. } + FMOD_SOUND_TYPE_DLS, { Sound font / downloadable sound bank. } + FMOD_SOUND_TYPE_FLAC, { FLAC lossless codec. } + FMOD_SOUND_TYPE_FSB, { FMOD Sample Bank. } + FMOD_SOUND_TYPE_GCADPCM, { GameCube ADPCM } + FMOD_SOUND_TYPE_IT, { Impulse Tracker. } + FMOD_SOUND_TYPE_MIDI, { MIDI. } + FMOD_SOUND_TYPE_MOD, { Protracker / Fasttracker MOD. } + FMOD_SOUND_TYPE_MPEG, { MP2/MP3 MPEG. } + FMOD_SOUND_TYPE_OGGVORBIS, { Ogg vorbis. } + FMOD_SOUND_TYPE_PLAYLIST, { Information only from ASX/PLS/M3U/WAX playlists } + FMOD_SOUND_TYPE_RAW, { Raw PCM data. } + FMOD_SOUND_TYPE_S3M, { ScreamTracker 3. } + FMOD_SOUND_TYPE_SF2, { Sound font 2 format. } + FMOD_SOUND_TYPE_USER, { User created sound. } + FMOD_SOUND_TYPE_WAV, { Microsoft WAV. } + FMOD_SOUND_TYPE_XM, { FastTracker 2 XM. } + FMOD_SOUND_TYPE_XMA, { Xbox360 XMA } + FMOD_SOUND_TYPE_VAG, { PlayStation 2 / PlayStation Portable adpcm VAG format. } + + FMOD_SOUND_TYPE_MAX, { Maximum number of sound types supported. } + FMOD_SOUND_TYPE_FORCEINT = 65536 { Makes sure this enum is signed 32bit. } + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + These definitions describe the native format of the hardware or software buffer that will be used. + + [REMARKS] + This is the format the native hardware or software buffer will be or is created in. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_CreateSound + FMOD_Sound_GetFormat +] +*) +type + FMOD_SOUND_FORMAT = + ( + FMOD_SOUND_FORMAT_NONE, { Unitialized / unknown. } + FMOD_SOUND_FORMAT_PCM8, { 8bit integer PCM data. } + FMOD_SOUND_FORMAT_PCM16, { 16bit integer PCM data. } + FMOD_SOUND_FORMAT_PCM24, { 24bit integer PCM data. } + FMOD_SOUND_FORMAT_PCM32, { 32bit integer PCM data. } + FMOD_SOUND_FORMAT_PCMFLOAT, { 32bit floating point PCM data. } + FMOD_SOUND_FORMAT_GCADPCM, { Compressed GameCube DSP data. } + FMOD_SOUND_FORMAT_IMAADPCM, { Compressed IMA ADPCM / Xbox ADPCM data. } + FMOD_SOUND_FORMAT_VAG, { Compressed PlayStation 2 / PlayStation Portable ADPCM data. } + FMOD_SOUND_FORMAT_XMA, { Compressed Xbox360 data. } + FMOD_SOUND_FORMAT_MPEG, { Compressed MPEG layer 2 or 3 data. } + + FMOD_SOUND_FORMAT_MAX, { Maximum number of sound formats supported. } + FMOD_SOUND_FORMAT_FORCEINT = 65536 { Makes sure this enum is signed 32bit. } + ); + PFMOD_SOUND_FORMAT = ^FMOD_SOUND_FORMAT; + + +(* +[ENUM] +[ + [DESCRIPTION] + Sound description bitfields, bitwise OR them together for loading and describing sounds. + + [REMARKS] + By default a sound will open as a static sound that is decompressed fully into memory. To have a sound stream instead, use FMOD_CREATESTREAM. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_CreateSound + FMOD_System_CreateStream + FMOD_Sound_GetMode + FMOD_Sound_GetMode + FMOD_Channel_SetMode + FMOD_Channel_GetMode +] +*) +const + FMOD_DEFAULT = $00000000; { FMOD_DEFAULT is a default sound type. Equivalent to all the defaults listed below. FMOD_LOOP_OFF, FMOD_2D, FMOD_HARDWARE. (Note - only Windows with a high spec soundcard, PS2, PSP, and Wii support FMOD_HARDWARE) } + FMOD_LOOP_OFF = $00000001; { For non looping sounds. (DEFAULT). Overrides FMOD_LOOP_NORMAL / FMOD_LOOP_BIDI. } + FMOD_LOOP_NORMAL = $00000002; { For forward looping sounds. } + FMOD_LOOP_BIDI = $00000004; { For bidirectional looping sounds. (only works on software mixed static sounds). } + FMOD_2D = $00000008; { Ignores any 3d processing. (DEFAULT). } + FMOD_3D = $00000010; { Makes the sound positionable in 3D. Overrides FMOD_2D. } + FMOD_HARDWARE = $00000020; { Attempts to make sounds use hardware acceleration. (DEFAULT). Note on platforms that don't support FMOD_HARDWARE (only Windows with a high spec soundcard, PS2, PSP, and Wii support FMOD_HARDWARE), this will be internally treated as FMOD_SOFTWARE. } + FMOD_SOFTWARE = $00000040; { Makes the sound be mixed by the FMOD CPU based software mixer. Overrides FMOD_HARDWARE. Use this for FFT, DSP, compressed sample support, 2D multi-speaker support and other software related features. } + FMOD_CREATESTREAM = $00000080; { Decompress at runtime, streaming from the source provided (ie from disk). Overrides FMOD_CREATESAMPLE and FMOD_CREATECOMPRESSEDSAMPLE. Note a stream can only be played once at a time due to a stream only having 1 stream buffer and file handle. Open multiple streams to have them play concurrently. } + FMOD_CREATESAMPLE = $00000100; { Decompress at loadtime, decompressing or decoding whole file into memory as the target sample format (ie PCM). Fastest for FMOD_SOFTWARE based playback and most flexible. } + FMOD_CREATECOMPRESSEDSAMPLE = $00000200; { Load MP2, MP3, IMAADPCM or XMA into memory and leave it compressed. During playback the FMOD software mixer will decode it in realtime as a 'compressed sample'. Can only be used in combination with FMOD_SOFTWARE. Overrides FMOD_CREATESAMPLE. If the sound data is not ADPCM, MPEG or XMA it will behave as if it was created with FMOD_CREATESAMPLE and decode the sound into PCM. } + FMOD_OPENUSER = $00000400; { Opens a user created static sample or stream. Use FMOD_CREATESOUNDEXINFO to specify format and/or read callbacks. If a user created 'sample' is created with no read callback, the sample will be empty. Use Sound::lock and Sound::unlock to place sound data into the sound if this is the case. } + FMOD_OPENMEMORY = $00000800; { "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. Use FMOD_CREATESOUNDEXINFO to specify length. If used with FMOD_CREATESAMPLE or FMOD_CREATECOMPRESSEDSAMPLE, FMOD duplicates the memory into its own buffers. Your own buffer can be freed after open. If used with FMOD_CREATESTREAM, FMOD will stream out of the buffer whose pointer you passed in. In this case, your own buffer should not be freed until you have finished with and released the stream. } + FMOD_OPENMEMORY_POINT = $10000000; { "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. Use FMOD_CREATESOUNDEXINFO to specify length. This differs to FMOD_OPENMEMORY in that it uses the memory as is, without duplicating the memory into its own buffers. For Wii/PSP FMOD_HARDWARE supports this flag for the GCADPCM/VAG formats. On other platforms FMOD_SOFTWARE must be used, as sound hardware on the other platforms (ie PC) cannot access main ram. Cannot be freed after open, only after Sound::release. Will not work if the data is compressed and FMOD_CREATECOMPRESSEDSAMPLE is not used. } + FMOD_OPENRAW = $00001000; { Will ignore file format and treat as raw pcm. Use FMOD_CREATESOUNDEXINFO to specify format. Requires at least defaultfrequency, numchannels and format to be specified before it will open. Must be little endian data. } + FMOD_OPENONLY = $00002000; { Just open the file, dont prebuffer or read. Good for fast opens for info, or when sound::readData is to be used. } + FMOD_ACCURATETIME = $00004000; { For System::createSound - for accurate Sound::getLength/Channel::setPosition on VBR MP3, and MOD/S3M/XM/IT/MIDI files. Scans file first, so takes longer to open. FMOD_OPENONLY does not affect this. } + FMOD_MPEGSEARCH = $00008000; { For corrupted / bad MP3 files. This will search all the way through the file until it hits a valid MPEG header. Normally only searches for 4k. } + FMOD_NONBLOCKING = $00010000; { For opening sounds and getting streamed subsounds (seeking) asyncronously. Use Sound::getOpenState to poll the state of the sound as it opens or retrieves the subsound in the background. } + FMOD_UNIQUE = $00020000; { Unique sound, can only be played one at a time } + FMOD_3D_HEADRELATIVE = $00040000; { Make the sound's position, velocity and orientation relative to the listener. } + FMOD_3D_WORLDRELATIVE = $00080000; { Make the sound's position, velocity and orientation absolute (relative to the world). (DEFAULT) } + FMOD_3D_LOGROLLOFF = $00100000; { This sound will follow the standard logarithmic rolloff model where mindistance = full volume, maxdistance = where sound stops attenuating, and rolloff is fixed according to the global rolloff factor. (DEFAULT) } + FMOD_3D_LINEARROLLOFF = $00200000; { This sound will follow a linear rolloff model where mindistance = full volume, maxdistance = silence. Rolloffscale is ignored. } + FMOD_3D_CUSTOMROLLOFF = $04000000; { This sound will follow a rolloff model defined by Sound::set3DCustomRolloff / Channel::set3DCustomRolloff. } + FMOD_3D_IGNOREGEOMETRY = $40000000; { Is not affect by geometry occlusion. If not specified in Sound::setMode, or Channel::setMode, the flag is cleared and it is affected by geometry again. } + FMOD_CDDA_FORCEASPI = $00400000; { For CDDA sounds only - use ASPI instead of NTSCSI to access the specified CD/DVD device. } + FMOD_CDDA_JITTERCORRECT = $00800000; { For CDDA sounds only - perform jitter correction. Jitter correction helps produce a more accurate CDDA stream at the cost of more CPU time. } + FMOD_UNICODE = $01000000; { Filename is double-byte unicode. } + FMOD_IGNORETAGS = $02000000; { Skips id3v2/asf/etc tag checks when opening a sound, to reduce seek/read overhead when opening files (helps with CD performance). } + FMOD_LOWMEM = $08000000; { Removes some features from samples to give a lower memory overhead, like Sound::getName. See remarks. } + FMOD_LOADSECONDARYRAM = $20000000; { Load sound into the secondary RAM of supported platform. On PS3, sounds will be loaded into RSX/VRAM. } + FMOD_VIRTUAL_PLAYFROMSTART = $80000000; { For sounds that start virtual (due to being quiet or low importance), instead of swapping back to audible, and playing at the correct offset according to time, this flag makes the sound play from the start. } + +(* +[ENUM] +[ + [DESCRIPTION] + These values describe what state a sound is in after FMOD_NONBLOCKING has been used to open it. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_Sound_GetOpenState + FMOD_MODE +] +*) +type + FMOD_OPENSTATE = + ( + FMOD_OPENSTATE_READY = 0, { Opened and ready to play. } + FMOD_OPENSTATE_LOADING, { Initial load in progress. } + FMOD_OPENSTATE_ERROR, { Failed to open - file not found, out of memory etc. See return value of Sound::getOpenState for what happened. } + FMOD_OPENSTATE_CONNECTING, { Connecting to remote host (internet sounds only). } + FMOD_OPENSTATE_BUFFERING, { Buffering data. } + FMOD_OPENSTATE_SEEKING, { Seeking to subsound and re-flushing stream buffer. } + FMOD_OPENSTATE_STREAMING, { Ready and playing, but not possible to release at this time without stalling the main thread. } + FMOD_OPENSTATE_SETPOSITION, { Seeking within a stream to a different position. } + + FMOD_OPENSTATE_MAX, { Maximum number of open state types. } + FMOD_OPENSTATE_FORCEINT = 65536 { Makes sure this enum is signed 32bit. } + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + These callback types are used with FMOD_Channel_SetCallback. + + [REMARKS] + Each callback has commanddata parameters passed int unique to the type of callback. + See reference to FMOD_CHANNEL_CALLBACK to determine what they might mean for each type of callback. + + Note! Currently the user must call System::update for these callbacks to trigger! + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_Channel_SetCallback + FMOD_CHANNEL_CALLBACK + FMOD_System_Update +] +*) +type + FMOD_CHANNEL_CALLBACKTYPE = + ( + FMOD_CHANNEL_CALLBACKTYPE_END, (* Called when a sound ends. *) + FMOD_CHANNEL_CALLBACKTYPE_VIRTUALVOICE, (* Called when a voice is swapped out or swapped in. *) + FMOD_CHANNEL_CALLBACKTYPE_SYNCPOINT, (* Called when a syncpoint is encountered. Can be from wav file markers. *) + FMOD_CHANNEL_CALLBACKTYPE_OCCLUSION, (* Called when the channel has its geometry occlusion value calculated. Can be used to clamp or change the value. *) + + FMOD_CHANNEL_CALLBACKTYPE_MAX , (* Maximum number of callback types supported. *) + FMOD_CHANNEL_CALLBACKTYPE_FORCEINT = 65536 + ); + + +(* + FMOD Callbacks +*) +type + FMOD_CHANNEL_CALLBACK = function (channel: FMOD_CHANNEL; callbacktype: FMOD_CHANNEL_CALLBACKTYPE; commanddata1: Pointer; commanddata2: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + + FMOD_SOUND_NONBLOCKCALLBACK = function (sound: FMOD_SOUND; result: FMOD_RESULT): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_SOUND_PCMREADCALLBACK = function (sound: FMOD_SOUND; data: Pointer; datalen: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_SOUND_PCMSEEKCALLBACK = function (sound: FMOD_SOUND; subsound: Integer; pcmoffset: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + + FMOD_FILE_OPENCALLBACK = function (const name: PChar; unicode: Integer; filesize: Cardinal; handle: Pointer; var userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_FILE_CLOSECALLBACK = function (handle: Pointer; userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_FILE_READCALLBACK = function (handle, buffer: Pointer; sizebytes: Cardinal; var bytesread: Cardinal; userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_FILE_SEEKCALLBACK = function (handle: Pointer; pos, type_: Integer; userdata: Pointer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + + FMOD_MEMORY_ALLOCCALLBACK = function (size: Cardinal): Pointer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_MEMORY_REALLOCCALLBACK = function (ptr: Pointer; size: Cardinal): Pointer; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_MEMORY_FREECALLBACK = procedure (ptr: Pointer); {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + + +(* +[ENUM] +[ + [DESCRIPTION] + List of windowing methods used in spectrum analysis to reduce leakage / transient signals intefering with the analysis. + This is a problem with analysis of continuous signals that only have a small portion of the signal sample (the fft window size). + Windowing the signal with a curve or triangle tapers the sides of the fft window to help alleviate this problem. + + [REMARKS] + Cyclic signals such as a sine wave that repeat their cycle in a multiple of the window size do not need windowing. + I.e. If the sine wave repeats every 1024, 512, 256 etc samples and the FMOD fft window is 1024, then the signal would not need windowing. + Not windowing is the same as FMOD_DSP_FFT_WINDOW_RECT, which is the default. + If the cycle of the signal (ie the sine wave) is not a multiple of the window size, it will cause frequency abnormalities, so a different windowing method is needed. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_GetSpectrum + FMOD_Channel_GetSpectrum +] +*) +type + FMOD_DSP_FFT_WINDOW = + ( + FMOD_DSP_FFT_WINDOW_RECT, (* w[n] = 1.0 *) + FMOD_DSP_FFT_WINDOW_TRIANGLE, (* w[n] = TRI(2n/N) *) + FMOD_DSP_FFT_WINDOW_HAMMING, (* w[n] = 0.54 - (0.46 * COS(n/N) ) *) + FMOD_DSP_FFT_WINDOW_HANNING, (* w[n] = 0.5 * (1.0 - COS(n/N) ) *) + FMOD_DSP_FFT_WINDOW_BLACKMAN, (* w[n] = 0.42 - (0.5 * COS(n/N) ) + (0.08 * COS(2.0 * n/N) ) *) + FMOD_DSP_FFT_WINDOW_BLACKMANHARRIS, (* w[n] = 0.35875 - (0.48829 * COS(1.0 * n/N)) + (0.14128 * COS(2.0 * n/N)) - (0.01168 * COS(3.0 * n/N)) *) + FMOD_DSP_FFT_WINDOW_MAX + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + List of interpolation types that the FMOD Ex software mixer supports. + + [REMARKS] + The default resampler type is FMOD_DSP_RESAMPLER_LINEAR. + Use System::setSoftwareFormat to tell FMOD the resampling quality you require for FMOD_SOFTWARE based sounds. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + System::setSoftwareFormat + System::getSoftwareFormat +] +*) +type + FMOD_DSP_RESAMPLER = + ( + FMOD_DSP_RESAMPLER_NOINTERP, (* No interpolation. High frequency aliasing hiss will be audible depending on the sample rate of the sound. *) + FMOD_DSP_RESAMPLER_LINEAR, (* Linear interpolation (default method). Fast and good quality, causes very slight lowpass effect on low frequency sounds. *) + FMOD_DSP_RESAMPLER_CUBIC, (* Cubic interoplation. Slower than linear interpolation but better quality. *) + FMOD_DSP_RESAMPLER_SPLINE, (* 5 point spline interoplation. Slowest resampling method but best quality. *) + FMOD_DSP_RESAMPLER_MAX + ); + + + +(* +[ENUM] +[ + [DESCRIPTION] + List of tag types that could be stored within a sound. These include id3 tags, metadata from netstreams and vorbis/asf data. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_Sound_GetTag +] +*) +type + FMOD_TAGTYPE = + ( + FMOD_TAGTYPE_UNKNOWN, + FMOD_TAGTYPE_ID3V1, + FMOD_TAGTYPE_ID3V2, + FMOD_TAGTYPE_VORBISCOMMENT, + FMOD_TAGTYPE_SHOUTCAST, + FMOD_TAGTYPE_ICECAST, + FMOD_TAGTYPE_ASF, + FMOD_TAGTYPE_MIDI, + FMOD_TAGTYPE_PLAYLIST, + FMOD_TAGTYPE_FMOD, + FMOD_TAGTYPE_USER, + FMOD_TAGTYPE_MAX + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + List of data types that can be returned by FMOD_Sound_GetTag + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_Sound_GetTag +] +*) +type + FMOD_TAGDATATYPE = + ( + FMOD_TAGDATATYPE_BINARY, + FMOD_TAGDATATYPE_INT, + FMOD_TAGDATATYPE_FLOAT, + FMOD_TAGDATATYPE_STRING, + FMOD_TAGDATATYPE_STRING_UTF16, + FMOD_TAGDATATYPE_STRING_UTF16BE, + FMOD_TAGDATATYPE_STRING_UTF8, + FMOD_TAGDATATYPE_CDTOC + ); + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + Structure describing a piece of tag data. + + [REMARKS] + Members marked with [in] mean the variable can be written to. The user can set the value. + Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_Sound_GetTag + FMOD_TAGTYPE + FMOD_TAGDATATYPE +] +*) +type + FMOD_TAG = record + tagtype: FMOD_TAGTYPE; (* [out] The type of this tag. *) + datatype: FMOD_TAGDATATYPE; (* [out] The type of data that this tag contains *) + name: PChar; (* [out] The name of this tag i.e. "TITLE", "ARTIST" etc. *) + data: Pointer; (* [out] Pointer to the tag data - its format is determined by the datatype member *) + datalen: Cardinal; (* [out] Length of the data contained in this tag *) + updated: FMOD_BOOL; (* [out] True if this tag has been updated since last being accessed with FMOD_Sound_GetTag *) + end; + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + Structure describing a CD/DVD table of contents + + [REMARKS] + Members marked with [in] mean the variable can be written to. The user can set the value. + Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_Sound_GetTag +] +*) +type + FMOD_CDTOC = record + numtracks: Integer; (* [out] The number of tracks on the CD *) + min: array [0..99] of Integer; (* [out] The start offset of each track in minutes *) + sec: array [0..99] of Integer; (* [out] The start offset of each track in seconds *) + frame: array [0..99] of Integer; (* [out] The start offset of each track in frames *) + end; + + +(* +[ENUM] +[ + [DESCRIPTION] + List of time types that can be returned by FMOD_Sound_GetLength and used with FMOD_Channel_SetPosition or FMOD_Channel_GetPosition. + + [REMARKS] + FMOD_TIMEUNIT_SUBSOUND_MS, FMOD_TIMEUNIT_SUBSOUND_PCM, FMOD_TIMEUNIT_SUBSOUND_PCMBYTES, FMOD_TIMEUNIT_SUBSOUND and FMOD_TIMEUNIT_SUBSOUND_BUFFERED are only supported by Channel::getPosition. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_Sound_GetLength + FMOD_Channel_SetPosition + FMOD_Channel_GetPosition +] +*) +const + FMOD_TIMEUNIT_MS = $00000001; (* Milliseconds. *) + FMOD_TIMEUNIT_PCM = $00000002; (* PCM Samples, related to milliseconds * samplerate / 1000. *) + FMOD_TIMEUNIT_PCMBYTES = $00000004; (* Bytes, related to PCM samples * channels * datawidth (ie 16bit = 2 bytes). *) + FMOD_TIMEUNIT_RAWBYTES = $00000008; (* Raw file bytes of (compressed) sound data (does not include headers). Only used by FMOD_Sound_GetLength and FMOD_Channel_GetPosition. *) + FMOD_TIMEUNIT_MODORDER = $00000100; (* MOD/S3M/XM/IT. Order in a sequenced module format. Use FMOD_Sound_GetFormat to determine the format. *) + FMOD_TIMEUNIT_MODROW = $00000200; (* MOD/S3M/XM/IT. Current row in a sequenced module format. FMOD_Sound_GetLength will return the number if rows in the currently playing or seeked to pattern. *) + FMOD_TIMEUNIT_MODPATTERN = $00000400; (* MOD/S3M/XM/IT. Current pattern in a sequenced module format. Sound::getLength will return the number of patterns in the song and Channel::getPosition will return the currently playing pattern. *) + FMOD_TIMEUNIT_SENTENCE_MS = $00010000; (* Currently playing subsound in a sentence time in milliseconds. *) + FMOD_TIMEUNIT_SENTENCE_PCM = $00020000; (* Currently playing subsound in a sentence time in PCM Samples, related to milliseconds * samplerate / 1000. *) + FMOD_TIMEUNIT_SENTENCE_PCMBYTES = $00040000; (* Currently playing subsound in a sentence time in bytes, related to PCM samples * channels * datawidth (ie 16bit = 2 bytes). *) + FMOD_TIMEUNIT_SENTENCE = $00080000; (* Currently playing subsound in a sentence according to the channel. For display. *) + FMOD_TIMEUNIT_SENTENCE_SUBSOUND = $00100000; (* Currently playing subsound in a sentence according to the buffered ahead of time sound. For sentence processing ahead of time. *) + FMOD_TIMEUNIT_BUFFERED = $10000000; (* Time value as seen by buffered stream. This is always ahead of audible time, and is only used for processing. *) + + +(* +[ENUM] +[ + [DESCRIPTION] + When creating a multichannel sound, FMOD will pan them to their default speaker locations, for example a 6 channel sound will default to one channel per 5.1 output speaker. + Another example is a stereo sound. It will default to left = front left, right = front right. + + This is for sounds that are not 'default'. For example you might have a sound that is 6 channels but actually made up of 3 stereo pairs, that should all be located in front left, front right only. + + [REMARKS] + For full flexibility of speaker assignments, use Channel::setSpeakerLevels. This functionality is cheaper, uses less memory and easier to use. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii + + [SEE_ALSO] + FMOD_CREATESOUNDEXINFO + FMOD_Channel_SetSpeakerLevels +] +*) +type + FMOD_SPEAKERMAPTYPE = + ( + FMOD_SPEAKERMAPTYPE_DEFAULT, (* This is the default, and just means FMOD decides which speakers it puts the source channels. *) + FMOD_SPEAKERMAPTYPE_ALLMONO, (* This means the sound is made up of all mono sounds. All voices will be panned to the front center by default in this case. *) + FMOD_SPEAKERMAPTYPE_ALLSTEREO (* This means the sound is made up of all stereo sounds. All voices will be panned to front left and front right alternating every second channel. *) + ); + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + Use this structure with FMOD_System_CreateSound when more control is needed over loading. + The possible reasons to use this with FMOD_System_CreateSound are: + - Loading a file from memory. + - Loading a file from within another file, giving an offset and length. + - To create a user created / non file based sound. + - To specify a starting subsound to seek to within a multi-sample sounds (ie FSB/DLS/SF2) when created as a stream. + - To specify which subsounds to load for multi-sample sounds (ie FSB/DLS/SF2) so that memory is saved and only a subset is actually loaded/read from disk. + - To specify 'piggyback' read and seek callbacks for capture of sound data as fmod reads and decodes it. Useful for ripping decoded PCM data from sounds as they are loaded / played. + - To specify a MIDI DLS/SF2 sample set file to load when opening a MIDI file. + See below on what members to fill for each of the above types of sound you want to create. + + [REMARKS] + This structure is optional! Specify 0 or NULL in FMOD_System_CreateSound if you don't need it! + + Members marked with [in] mean the variable can be written to. The user can set the value. + Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value. + + Loading a file from memory. + --------------------------- + - Create the sound using the FMOD_OPENMEMORY flag. + - Mandatory. Specify 'length' for the size of the memory block in bytes. + - Other flags are optional. + + Loading a file from within another larger (possibly wad/pak) file, by giving the loader an offset and length. + ------------------------------------------------------------------------------------------------------------- + - Mandatory. Specify 'fileoffset' and 'length'. + - Other flags are optional. + + To create a user created / non file based sound. + ------------------------------------------------ + - Create the sound using the FMOD_OPENUSER flag. + - Mandatory. Specify 'defaultfrequency, 'numchannels' and 'format'. + - Other flags are optional. + + To specify a starting subsound to seek to and flush with, within a multi-sample stream (ie FSB/DLS/SF2). + -------------------------------------------------------------------------------------------------------- + - Mandatory. Specify 'initialsubsound'. + + To specify which subsounds to load for multi-sample sounds (ie FSB/DLS/SF2) so that memory is saved and only a subset is actually loaded/read from disk. + -------------------------------------------------------------------------------------------------------------------------------------------------------- + - Mandatory. Specify 'inclusionlist' and 'inclusionlistnum'. + + To specify 'piggyback' read and seek callbacks for capture of sound data as fmod reads and decodes it. Useful for ripping decoded PCM data from sounds as they are loaded / played. + ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + - Mandatory. Specify 'pcmreadcallback' and 'pcmseekcallback'. + + To specify a MIDI DLS/SF2 sample set file to load when opening a MIDI file. + --------------------------------------------------------------------------- + - Mandatory. Specify 'dlsname'. + + Setting the 'decodebuffersize' is for cpu intensive codecs that may be causing stuttering, not file intensive codecs (ie those from CD or netstreams) which are normally altered with System::setStreamBufferSize. As an example of cpu intensive codecs, an mp3 file will take more cpu to decode than a PCM wav file. + If you have a stuttering effect, then it is using more cpu than the decode buffer playback rate can keep up with. Increasing the decode buffersize will most likely solve this problem. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_CreateSound +] +*) +type + FMOD_CREATESOUNDEXINFO = record + cbsize: Integer; (* [in] Size of this structure. This is used so the structure can be expanded in the future and still work on older versions of FMOD Ex. *) + length: Cardinal; (* [in] Optional. Specify 0 to ignore. Size in bytes of file to load, or sound to create (in this case only if FMOD_OPENUSER is used). Required if loading from memory. If 0 is specified, then it will use the size of the file (unless loading from memory then an error will be returned). *) + fileoffset: Cardinal; (* [in] Optional. Specify 0 to ignore. Offset from start of the file to start loading from. This is useful for loading files from inside big data files. *) + numchannels: Integer; (* [in] Optional. Specify 0 to ignore. Number of channels in a sound specified only if FMOD_OPENUSER is used. *) + defaultfrequency: Integer; (* [in] Optional. Specify 0 to ignore. Default frequency of sound in a sound specified only if FMOD_OPENUSER is used. Other formats use the frequency determined by the file format. *) + format: FMOD_SOUND_FORMAT; (* [in] Optional. Specify 0 or FMOD_SOUND_FORMAT_NONE to ignore. Format of the sound specified only if FMOD_OPENUSER is used. Other formats use the format determined by the file format. *) + decodebuffersize: Integer; (* [in] Optional. Specify 0 to ignore. For streams. This determines the size of the double buffer (in PCM samples) that a stream uses. Use this for user created streams if you want to determine the size of the callback buffer passed to you. Specify 0 to use FMOD's default size which is currently equivalent to 400ms of the sound format created/loaded. *) + initialsubsound: Integer; (* [in] Optional. Specify 0 to ignore. In a multi-sample file format such as .FSB/.DLS/.SF2, specify the initial subsound to seek to, only if FMOD_CREATESTREAM is used. *) + numsubsounds: Integer; (* [in] Optional. Specify 0 to ignore or have no subsounds. In a user created multi-sample sound, specify the number of subsounds within the sound that are accessable with FMOD_SoundGetSubSound. *) + inclusionlist: ^Integer; (* [in] Optional. Specify 0 to ignore. In a multi-sample format such as .FSB/.DLS/.SF2 it may be desirable to specify only a subset of sounds to be loaded out of the whole file. This is an array of subsound indicies to load into memory when created. *) + inclusionlistnum: Integer; (* [in] Optional. Specify 0 to ignore. This is the number of integers contained within the *) + pcmreadcallback: FMOD_SOUND_PCMREADCALLBACK; (* [in] Optional. Specify 0 to ignore. Callback to 'piggyback' on FMOD's read functions and accept or even write PCM data while FMOD is opening the sound. Used for user sounds created with FMOD_OPENUSER or for capturing decoded data as FMOD reads it. *) + pcmseekcallback: FMOD_SOUND_PCMSEEKCALLBACK; (* [in] Optional. Specify 0 to ignore. Callback for when the user calls a seeking function such as FMOD_Channel_SetPosition within a multi-sample sound, and for when it is opened.*) + nonblockcallback: FMOD_SOUND_NONBLOCKCALLBACK; (* [in] Optional. Specify 0 to ignore. Callback for successful completion, or error while loading a sound that used the FMOD_NONBLOCKING flag.*) + dlsname: PChar; (* [in] Optional. Specify 0 to ignore. Filename for a DLS or SF2 sample set when loading a MIDI file. If not specified, on windows it will attempt to open /windows/system32/drivers/gm.dls, otherwise the MIDI will fail to open. *) + encryptionkey: PChar; (* [in] Optional. Specify 0 to ignore. Key for encrypted FSB file. Without this key an encrypted FSB file will not load. *) + maxpolyphony: Integer; (* [in] Optional. Specify 0 to ignore. For sequenced formats with dynamic channel allocation such as .MID and .IT, this specifies the maximum voice count allowed while playing. .IT defaults to 64. .MID defaults to 32. *) + userdata: Pointer; (* [in] Optional. Specify 0 to ignore. This is user data to be attached to the sound during creation. Access via Sound::getUserData. *) + suggestedsoundtype: FMOD_SOUND_TYPE; (* [in] Optional. Specify 0 or FMOD_SOUND_TYPE_UNKNOWN to ignore. Instead of scanning all codec types, use this to speed up loading by making it jump straight to this codec. *) + useropen: FMOD_FILE_OPENCALLBACK; (* [in] Optional. Specify 0 to ignore. Callback for opening this file. *) + userclose: FMOD_FILE_CLOSECALLBACK; (* [in] Optional. Specify 0 to ignore. Callback for closing this file. *) + userread: FMOD_FILE_READCALLBACK; (* [in] Optional. Specify 0 to ignore. Callback for reading from this file. *) + userseek: FMOD_FILE_SEEKCALLBACK; (* [in] Optional. Specify 0 to ignore. Callback for seeking within this file. *) + speakermap: FMOD_SPEAKERMAPTYPE; (* [in] Optional. Specify 0 to ignore. Use this to differ the way fmod maps multichannel sounds to speakers. See FMOD_SPEAKERMAPTYPE for more. *) + initialsoundgroup: Integer; (* [in] Optional. Specify 0 to ignore. Specify a sound group if required, to put sound in as it is created. *) + initialseekposition: Integer; (* [in] Optional. Specify 0 to ignore. For streams. Specify an initial position to seek the stream to. *) + initialseekpostype: FMOD_TIMEUNIT; (* [in] Optional. Specify 0 to ignore. For streams. Specify the time unit for the position set in initialseekposition. *) + ignoresetfilesystem: Integer; (* [in] Optional. Specify 0 to ignore. Set to 1 to use fmod's built in file system. Ignores setFileSystem callbacks and also FMOD_CREATESOUNEXINFO file callbacks. Useful for specific cases where you don't want to use your own file system but want to use fmod's file system (ie net streaming). *) + // myVersion2013: Array [0..27] of Byte; + end; + PFMOD_CREATESOUNDEXINFO = ^FMOD_CREATESOUNDEXINFO; + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + Structure defining a reverb environment. + + For more indepth descriptions of the reverb properties under win32, please see the EAX2 and EAX3 + documentation at http://developer.creative.com/ under the 'downloads' section. + If they do not have the EAX3 documentation, then most information can be attained from + the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of + EAX2. + + [REMARKS] + Note the default reverb properties are the same as the FMOD_PRESET_GENERIC preset. + Note that integer values that typically range from -10,000 to 1000 are represented in + decibels, and are of a logarithmic scale, not linear, wheras float values are always linear. + PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox). + Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then + the reverb should product a similar effect on either platform. + Win32/Win64 - This is only supported with FMOD_OUTPUTTYPE_DSOUND and EAX compatible sound cards. + Macintosh - Currently unsupported. + Linux - Currently unsupported. + Xbox - Only a subset of parameters are supported. + PlayStation 2 - Only the Environment and Flags paramenters are supported. + GameCube - Only a subset of parameters are supported. + + The numerical values listed below are the maximum, minimum and default values for each variable respectively. + + Members marked with [in] mean the variable can be written to. The user can set the value. + Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value. + + [PLATFORMS] + Win32, Win64, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable + + [SEE_ALSO] + FMOD_System_SetReverbProperties + FMOD_System_GetReverbProperties + FMOD_REVERB_PRESETS + FMOD_REVERB_FLAGS +] +*) +type + FMOD_REVERB_PROPERTIES = record (* MIN MAX DEFAULT DESCRIPTION *) + Instance: Integer; (* [in/out] 0 , 2 , 0 , EAX4 only. Environment Instance. 3 seperate reverbs simultaneously are possible. This specifies which one to set. (win32 only) *) + Environment: Cardinal; (* [in/out] 0 , 25 , 0 , sets all listener properties (win32/ps2) *) + EnvSize: Single; (* [in/out] 1.0 , 100.0 , 7.5 , environment size in meters (win32 only) *) + EnvDiffusion: Single; (* [in/out] 0.0 , 1.0 , 1.0 , environment diffusion (win32/xbox) *) + Room: Integer; (* [in/out] -10000, 0 , -1000 , room effect level (at mid frequencies) (win32/xbox) *) + RoomHF: Integer; (* [in/out] -10000, 0 , -100 , relative room effect level at high frequencies (win32/xbox) *) + RoomLF: Integer; (* [in/out] -10000, 0 , 0 , relative room effect level at low frequencies (win32 only) *) + DecayTime: Single; (* [in/out] 0.1 , 20.0 , 1.49 , reverberation decay time at mid frequencies (win32/xbox) *) + DecayHFRatio: Single; (* [in/out] 0.1 , 2.0 , 0.83 , high-frequency to mid-frequency decay time ratio (win32/xbox) *) + DecayLFRatio: Single; (* [in/out] 0.1 , 2.0 , 1.0 , low-frequency to mid-frequency decay time ratio (win32 only) *) + Reflections: Integer; (* [in/out] -10000, 1000 , -2602 , early reflections level relative to room effect (win32/xbox) *) + ReflectionsDelay: Single; (* [in/out] 0.0 , 0.3 , 0.007 , initial reflection delay time (win32/xbox) *) + ReflectionsPan: array [0..2] of Single; (* [in/out] , , [0,0,0], early reflections panning vector (win32 only) *) + Reverb: Integer; (* [in/out] -10000, 2000 , 200 , late reverberation level relative to room effect (win32/xbox) *) + ReverbDelay: Single; (* [in/out] 0.0 , 0.1 , 0.011 , late reverberation delay time relative to initial reflection (win32/xbox) *) + ReverbPan: array [0..2] of Single; (* [in/out] , , [0,0,0], late reverberation panning vector (win32 only) *) + EchoTime: Single; (* [in/out] .075 , 0.25 , 0.25 , echo time (win32 only) *) + EchoDepth: Single; (* [in/out] 0.0 , 1.0 , 0.0 , echo depth (win32 only) *) + ModulationTime: Single; (* [in/out] 0.04 , 4.0 , 0.25 , modulation time (win32 only) *) + ModulationDepth: Single; (* [in/out] 0.0 , 1.0 , 0.0 , modulation depth (win32 only) *) + AirAbsorptionHF: Single; (* [in/out] -100 , 0.0 , -5.0 , change in level per meter at high frequencies (win32 only) *) + HFReference: Single; (* [in/out] 1000.0, 20000 , 5000.0 , reference high frequency (hz) (win32/xbox) *) + LFReference: Single; (* [in/out] 20.0 , 1000.0, 250.0 , reference low frequency (hz) (win32 only) *) + RoomRolloffFactor: Single; (* [in/out] 0.0 , 10.0 , 0.0 , like FMOD_3D_Listener_SetRolloffFactor but for room effect (win32/xbox) *) + Diffusion: Single; (* [in/out] 0.0 , 100.0 , 100.0 , Value that controls the echo density in the late reverberation decay. (xbox only) *) + Density: Single; (* [in/out] 0.0 , 100.0 , 100.0 , Value that controls the modal density in the late reverberation decay (xbox only) *) + Flags: Cardinal; (* [in/out] FMOD_REVERB_FLAGS - modifies the behavior of above properties (win32/ps2) *) + end; + + +(* +[DEFINE] +[ + [NAME] + FMOD_REVERB_FLAGS + + [DESCRIPTION] + Values for the Flags member of the FMOD_REVERB_PROPERTIES structure. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_REVERB_PROPERTIES +] +*) +const + FMOD_REVERB_FLAGS_DECAYTIMESCALE = $00000001; (* 'EnvSize' affects reverberation decay time *) + FMOD_REVERB_FLAGS_REFLECTIONSSCALE = $00000002; (* 'EnvSize' affects reflection level *) + FMOD_REVERB_FLAGS_REFLECTIONSDELAYSCALE = $00000004; (* 'EnvSize' affects initial reflection delay time *) + FMOD_REVERB_FLAGS_REVERBSCALE = $00000008; (* 'EnvSize' affects reflections level *) + FMOD_REVERB_FLAGS_REVERBDELAYSCALE = $00000010; (* 'EnvSize' affects late reverberation delay time *) + FMOD_REVERB_FLAGS_DECAYHFLIMIT = $00000020; (* AirAbsorptionHF affects DecayHFRatio *) + FMOD_REVERB_FLAGS_ECHOTIMESCALE = $00000040; (* 'EnvSize' affects echo time *) + FMOD_REVERB_FLAGS_MODULATIONTIMESCALE = $00000080; (* 'EnvSize' affects modulation time *) + FMOD_REVERB_FLAGS_DEFAULT = (FMOD_REVERB_FLAGS_DECAYTIMESCALE or + FMOD_REVERB_FLAGS_REFLECTIONSSCALE or + FMOD_REVERB_FLAGS_REFLECTIONSDELAYSCALE or + FMOD_REVERB_FLAGS_REVERBSCALE or + FMOD_REVERB_FLAGS_REVERBDELAYSCALE or + FMOD_REVERB_FLAGS_DECAYHFLIMIT); +(* [DEFINE_END] *) + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + Structure defining the properties for a reverb source, related to a FMOD channel. + + For more indepth descriptions of the reverb properties under win32, please see the EAX3 + documentation at http://developer.creative.com/ under the 'downloads' section. + If they do not have the EAX3 documentation, then most information can be attained from + the EAX2 documentation, as EAX3 only adds some more parameters and functionality on top of + EAX2. + + Note the default reverb properties are the same as the FMOD_PRESET_GENERIC preset. + Note that integer values that typically range from -10,000 to 1000 are represented in + decibels, and are of a logarithmic scale, not linear, wheras float values are typically linear. + PORTABILITY: Each member has the platform it supports in braces ie (win32/xbox). + Some reverb parameters are only supported in win32 and some only on xbox. If all parameters are set then + the reverb should product a similar effect on either platform. + Linux and FMODCE do not support the reverb api. + + The numerical values listed below are the maximum, minimum and default values for each variable respectively. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_Channel_SetReverbProperties + FMOD_Channel_GetReverbProperties + FMOD_REVERB_CHANNELFLAGS +] +*) +type + FMOD_REVERB_CHANNELPROPERTIES = record (* MIN MAX DEFAULT *) + Direct: Integer; (* -10000, 1000, 0, direct path level (at low and mid frequencies) (win32/xbox) *) + DirectHF: Integer; (* -10000, 0, 0, relative direct path level at high frequencies (win32/xbox) *) + Room: Integer; (* -10000, 1000, 0, room effect level (at low and mid frequencies) (win32/xbox) *) + RoomHF: Integer; (* -10000, 0, 0, relative room effect level at high frequencies (win32/xbox) *) + Obstruction: Integer; (* -10000, 0, 0, main obstruction control (attenuation at high frequencies) (win32/xbox) *) + ObstructionLFRatio: Single; (* 0.0, 1.0, 0.0, obstruction low-frequency level re. main control (win32/xbox) *) + Occlusion: Integer; (* -10000, 0, 0, main occlusion control (attenuation at high frequencies) (win32/xbox) *) + OcclusionLFRatio: Single; (* 0.0, 1.0, 0.25, occlusion low-frequency level re. main control (win32/xbox) *) + OcclusionRoomRatio: Single; (* 0.0, 10.0, 1.5, relative occlusion control for room effect (win32) *) + OcclusionDirectRatio: Single; (* 0.0, 10.0, 1.0, relative occlusion control for direct path (win32) *) + Exclusion: Integer; (* -10000, 0, 0, main exlusion control (attenuation at high frequencies) (win32) *) + ExclusionLFRatio: Single; (* 0.0, 1.0, 1.0, exclusion low-frequency level re. main control (win32) *) + OutsideVolumeHF: Integer; (* -10000, 0, 0, outside sound cone level at high frequencies (win32) *) + DopplerFactor: Single; (* 0.0, 10.0, 0.0, like DS3D flDopplerFactor but per source (win32) *) + RolloffFactor: Single; (* 0.0, 10.0, 0.0, like DS3D flRolloffFactor but per source (win32) *) + RoomRolloffFactor: Single; (* 0.0, 10.0, 0.0, like DS3D flRolloffFactor but for room effect (win32/xbox) *) + AirAbsorptionFactor: Single; (* 0.0, 10.0, 1.0, multiplies AirAbsorptionHF member of FMOD_REVERB_PROPERTIES (win32) *) + Flags: Integer; (* FMOD_REVERB_CHANNELFLAGS - modifies the behavior of properties (win32) *) + end; + + +(* +[DEFINE] +[ + [NAME] + FMOD_REVERB_CHANNELFLAGS + + [DESCRIPTION] + Values for the Flags member of the FMOD_REVERB_CHANNELPROPERTIES structure. + + [REMARKS] + For EAX4 support with multiple reverb environments, set FMOD_REVERB_CHANNELFLAGS_ENVIRONMENT0, + FMOD_REVERB_CHANNELFLAGS_ENVIRONMENT1 or/and FMOD_REVERB_CHANNELFLAGS_ENVIRONMENT2 in the flags member + of FMOD_REVERB_CHANNELPROPERTIES to specify which environment instance(s) to target. + Only up to 2 environments to target can be specified at once. Specifying three will result in an error. + If the sound card does not support EAX4, the environment flag is ignored. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_REVERB_CHANNELPROPERTIES +] +*) +const + FMOD_REVERB_CHANNELFLAGS_DIRECTHFAUTO = $00000001; (* Automatic setting of 'Direct' due to distance from listener *) + FMOD_REVERB_CHANNELFLAGS_ROOMAUTO = $00000002; (* Automatic setting of 'Room' due to distance from listener *) + FMOD_REVERB_CHANNELFLAGS_ROOMHFAUTO = $00000004; (* Automatic setting of 'RoomHF' due to distance from listener *) + FMOD_REVERB_CHANNELFLAGS_ENVIRONMENT0 = $00000008; (* EAX4 only. Specify channel to target reverb instance 0. *) + FMOD_REVERB_CHANNELFLAGS_ENVIRONMENT1 = $00000010; (* EAX4 only. Specify channel to target reverb instance 1. *) + FMOD_REVERB_CHANNELFLAGS_ENVIRONMENT2 = $00000020; (* EAX4 only. Specify channel to target reverb instance 2. *) + FMOD_REVERB_CHANNELFLAGS_DEFAULT = (FMOD_REVERB_CHANNELFLAGS_DIRECTHFAUTO or + FMOD_REVERB_CHANNELFLAGS_ROOMAUTO or + FMOD_REVERB_CHANNELFLAGS_ROOMHFAUTO or + FMOD_REVERB_CHANNELFLAGS_ENVIRONMENT0); +(* [DEFINE_END] *) + + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + Settings for advanced features like configuring memory and cpu usage for the FMOD_CREATECOMPRESSEDSAMPLE feature. + + [REMARKS] + maxMPEGcodecs / maxADPCMcodecs / maxXMAcodecs will determine the maximum cpu usage of playing realtime samples. Use this to lower potential excess cpu usage and also control memory usage.<br> + + Memory will be allocated for codecs 'up front' (during System::init) if these values are specified as non zero. If any are zero, it allocates memory for the codec whenever a file of the type in question is loaded. So if maxMPEGcodecs is 0 for example, it will allocate memory for the mpeg codecs the first time an mp3 is loaded or an mp3 based .FSB file is loaded. + + Due to inefficient encoding techniques on certain .wav based ADPCM files, FMOD can can need an extra 29720 bytes per codec. This means for lowest memory consumption. Use FSB as it uses an optimal/small ADPCM block size. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_SetAdvancedSettings + FMOD_System_GetAdvancedSettings + FMOD_System_Init + FMOD_MODE +] +*) +type + FMOD_ADVANCEDSETTINGS = record + cbsize: Integer; (* Size of structure. Use sizeof(FMOD_ADVANCEDSETTINGS) *) + maxMPEGcodecs: Integer; (* For use with FMOD_CREATECOMPRESSEDSAMPLE only. Mpeg codecs consume 29.076 bytes per instance and this number will determine how many mpeg channels can be played simultaneously. Default = 16. *) + maxADPCMcodecs: Integer; (* For use with FMOD_CREATECOMPRESSEDSAMPLE only. ADPCM codecs consume ?? bytes per instance and this number will determine how many ADPCM channels can be played simultaneously. Default = 32. *) + maxXMAcodecs: Integer; (* For use with FMOD_CREATECOMPRESSEDSAMPLE only. XMA codecs consume ?? bytes per instance and this number will determine how many XMA channels can be played simultaneously. Default = 32. *) + ASIONumChannels: Integer; (* [in/out] *) + ASIOChannelList: Pointer; (* [in/out] *) + max3DReverbDSPs: Integer; (* [in/out] The max number of 3d reverb DSP's in the system. *) + HRTFMinAngle: Single; (* [in/out] For use with FMOD_INIT_SOFTWARE_HRTF. The angle (0-360) of a 3D sound from the listener's forward vector at which the HRTF function begins to have an effect. Default = 180.0. *) + HRTFMaxAngle: Single; (* [in/out] For use with FMOD_INIT_SOFTWARE_HRTF. The angle (0-360) of a 3D sound from the listener's forward vector at which the HRTF function begins to have maximum effect. Default = 360.0. *) + HRTFFreq: Single; (* [in/out] For use with FMOD_INIT_SOFTWARE_HRTF. The cutoff frequency of the HRTF's lowpass filter function when at maximum effect. (i.e. at HRTFMaxAngle). Default = 4000.0. *) + end; + + +(* +[ENUM] +[ + [DESCRIPTION] + Special channel index values for FMOD functions. + + [REMARKS] + To get 'all' of the channels, use System::getChannelGroup. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + System::playSound + System::playDSP + System::getChannel +] +*) +const + FMOD_CHANNEL_FREE = -1; (* Value to play on any free channel. *) + FMOD_CHANNEL_REUSE = -2; (* For a channel index, re-use the channel handle that was passed in. *) + + +(* =============================================================================================== *) +(* FMOD Ex - codec development header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004. *) +(* *) +(* Use this header if you are wanting to develop your own file format plugin to use with *) +(* FMOD's codec system. With this header you can make your own fileformat plugin that FMOD *) +(* can register and use. See the documentation and examples on how to make a working plugin. *) +(* *) +(* =============================================================================================== *) + +type + FMOD_CODEC_STATE = ^tagFMOD_CODEC_STATE; + + +(* + Codec callbacks +*) +(* type- Cannot use the type keyword here because the declaration of FMOD_CODEC_STATE requires tagFMOD_CODEC_STATE in the same type block *) + FMOD_CODEC_OPENCALLBACK = function (codec: FMOD_CODEC_STATE; usermode: Cardinal; userfrequency: Integer; userformat: FMOD_SOUND_FORMAT): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} {$ENDIF} + FMOD_CODEC_CLOSECALLBACK = function (codec: FMOD_CODEC_STATE): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_CODEC_READCALLBACK = function (codec: FMOD_CODEC_STATE; buffer: Pointer; sizebytes: Cardinal; var bytesread: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_CODEC_GETLENGTHCALLBACK = function (codec: FMOD_CODEC_STATE; length: Cardinal; lengthtype: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_CODEC_SETPOSITIONCALLBACK = function (codec: FMOD_CODEC_STATE; subsound: Integer; pcm: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_CODEC_GETPOSITIONCALLBACK = function (codec: FMOD_CODEC_STATE; var subsound: Integer; var position: Cardinal; postype: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_CODEC_SOUNDCREATECALLBACK = function (codec: FMOD_CODEC_STATE; subsound: Integer; sound: FMOD_SOUND): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_CODEC_METADATACALLBACK = function (codec: FMOD_CODEC_STATE; tagtype: FMOD_TAGTYPE; name: PChar; data: Pointer; datalen: Cardinal; datatype: FMOD_TAGDATATYPE; unique: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + When creating a codec, declare one of these and provide the relevant callbacks and name for FMOD to use when it opens and reads a file. + + [REMARKS] + Members marked with [in] mean the variable can be written to. The user can set the value. + Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] +] +*) +(* type- Cannot use the type keyword here because the declaration of FMOD_CODEC_STATE requires tagFMOD_CODEC_STATE in the same type block *) + FMOD_CODEC_DESCRIPTION = record + name: PChar; (* [in] Name of the codec. *) + version: Cardinal; (* [in] Plugin writer's version number. *) + timeunits: Integer; (* [in] When setposition codec is called, only these time formats will be passed to the codec. Use bitwise OR to accumulate different types. *) + open: FMOD_CODEC_OPENCALLBACK; (* [in] Open callback for the codec for when FMOD tries to open a sound using this codec. *) + close: FMOD_CODEC_CLOSECALLBACK; (* [in] Close callback for the codec for when FMOD tries to close a sound using this codec. *) + read: FMOD_CODEC_READCALLBACK; (* [in] Read callback for the codec for when FMOD tries to read some data from the file to the destination format (specified in the open callback). *) + getlength: FMOD_CODEC_GETLENGTHCALLBACK; (* [in] Callback to return the length of the song in whatever format required when Sound::getLength is called. *) + setposition: FMOD_CODEC_SETPOSITIONCALLBACK; (* [in] Seek callback for the codec for when FMOD tries to seek within the file with Sound::setTime or Sound::setPosition. *) + getposition: FMOD_CODEC_GETPOSITIONCALLBACK; (* [in] Tell callback for the codec for when FMOD tries to get the current position within the with Sound::getTime or Sound::getPosition. *) + soundcreate: FMOD_CODEC_SOUNDCREATECALLBACK; (* [in] Sound creation callback for the codec when FMOD finishes creating the sound. (So the codec can set more parameters for the related created sound, ie loop points/mode or 3D attributes etc). *) + end; + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + Set these values marked 'in' to tell fmod what sort of sound to create. + The format, channels and frequency tell FMOD what sort of hardware buffer to create when you initialize your code. So if you wrote an MP3 codec that decoded to stereo 16bit integer PCM, you would specify FMOD_SOUND_FORMAT_PCM16, and channels would be equal to 2. + Members marked as 'out' are set by fmod. Do not modify these. Simply specify 0 for these values when declaring the structure, FMOD will fill in the values for you after creation with the correct function pointers. + + [REMARKS] + Members marked with [in] mean the variable can be written to. The user can set the value. + Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value. + + An FMOD file might be from disk, memory or network, however the file may be opened by the user. + + 'numsubsounds' should be 0 if the file is a normal single sound stream or sound. Examples of this would be .WAV, .WMA, .MP3, .AIFF. + 'numsubsounds' should be 1+ if the file is a container format, and does not contain wav data itself. Examples of these types would be CDDA (multiple CD tracks), FSB (contains multiple sounds), MIDI/MOD/S3M/XM/IT (contain instruments). + The arrays of format, channel, frequency, length and blockalign should point to arrays of information based on how many subsounds are in the format. If the number of subsounds is 0 then it should point to 1 of each attribute, the same as if the number of subsounds was 1. If subsounds was 100 for example, each pointer should point to an array of 100 of each attribute. + When a sound has 1 or more subsounds, you must play the individual sounds specified by first obtaining the subsound with FMOD_Sound_GetSubSound. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_SOUND_FORMAT + FMOD_FILE_READCALLBACK + FMOD_FILE_SEEKCALLBACK + FMOD_CODEC_METADATACALLBACK + FMOD_Sound_GetSubSound + FMOD_Sound_GetNumSubSounds +] +*) +(* type- Cannot use the type keyword here because the declaration of FMOD_CODEC_STATE requires tagFMOD_CODEC_STATE in the same type block *) + FMOD_CODEC_WAVEFORMAT = record + name: array [0..255] of Char; (* [in] Name of sound. *) + format: FMOD_SOUND_FORMAT; (* [in] format for codec output, ie FMOD_SOUND_FORMAT_PCM8, FMOD_SOUND_FORMAT_PCM16.*) + channels: Integer; (* [in] number of channels used by codec, ie mono = 1, stereo = 2. *) + frequency: Integer; (* [in] default frequency in hz of the codec, ie 44100. *) + lengthpcm: Cardinal; (* [in] length in decompressed, PCM samples of the file, ie length in seconds * frequency. *) + blockalign: Integer; (* [in] blockalign in decompressed, PCM samples of the optimal decode chunk size for this format. The codec read callback will be called in multiples of this value. *) + loopstart: Integer; (* [in] loopstart in decompressed, PCM samples of file. *) + loopend: Integer; (* [in] loopend in decompressed, PCM samples of file. *) + mode: Cardinal; (* [in] mode to determine whether the sound should by default load as looping, non looping, 2d or 3d. *) + channelmask: Cardinal; (* [in] Microsoft speaker channel mask, as defined for WAVEFORMATEXTENSIBLE and is found in ksmedia.h. Leave at 0 to play in natural speaker order. *) + end; + PFMOD_CODEC_WAVEFORMAT = ^FMOD_CODEC_WAVEFORMAT; + +(* +[STRUCTURE] +[ + [DESCRIPTION] + Codec plugin structure that is passed into each callback. + + Set these numsubsounds and waveformat members when called in FMOD_CODEC_OPENCALLBACK to tell fmod what sort of sound to create. + + The format, channels and frequency tell FMOD what sort of hardware buffer to create when you initialize your code. So if you wrote an MP3 codec that decoded to stereo 16bit integer PCM, you would specify FMOD_SOUND_FORMAT_PCM16, and channels would be equal to 2. + + [REMARKS] + Members marked with [in] mean the variable can be written to. The user can set the value. + Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value. + + + An FMOD file might be from disk, memory or network, however the file may be opened by the user. + + 'numsubsounds' should be 0 if the file is a normal single sound stream or sound. Examples of this would be .WAV, .WMA, .MP3, .AIFF. + 'numsubsounds' should be 1+ if the file is a container format, and does not contain wav data itself. Examples of these types would be CDDA (multiple CD tracks), FSB (contains multiple sounds), MIDI/MOD/S3M/XM/IT (contain instruments). + The arrays of format, channel, frequency, length and blockalign should point to arrays of information based on how many subsounds are in the format. If the number of subsounds is 0 then it should point to 1 of each attribute, the same as if the number of subsounds was 1. If subsounds was 100 for example, each pointer should point to an array of 100 of each attribute. + When a sound has 1 or more subsounds, you must play the individual sounds specified by first obtaining the subsound with FMOD_Sound_GetSubSound. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_SOUND_FORMAT + FMOD_FILE_READCALLBACK + FMOD_FILE_SEEKCALLBACK + FMOD_CODEC_METADATACALLBACK + FMOD_Sound_GetSubSound + FMOD_Sound_GetNumSubSounds +] +*) +(* type- Cannot use the type keyword here because the declaration of FMOD_CODEC_STATE requires tagFMOD_CODEC_STATE in the same type block *) + tagFMOD_CODEC_STATE = record + numsubsounds: Integer; (* [in] Number of 'subsounds' in this sound. Anything other than 0 makes it a 'container' format (ie CDDA/FSB/MIDI/MOD/etc which contain 1 or more subsounds). For most normal, single sound codec such as WAV/AIFF/MP3, this should be 0 as they are not a container for subsounds, they are the sound itself. *) + waveformat: PFMOD_CODEC_WAVEFORMAT; (* [in] Pointer to an array of format structures containing information about each sample. The number of entries here must equal the number of subsounds defined in the subsound parameter. If numsubsounds = 0 then there should be 1 instance of this structure. *) + plugindata: Pointer; (* [in/out] User created data the codec plugin writer wants to attach to this object. *) + + filehandle: Pointer; (* [out] - Do not modify. This will return an internal FMOD file handle to use with the callbacks provided. *) + filesize: Cardinal; (* [out] - Do not modify. This will return an internal FMOD file handle to use with the callbacks provided. *) + fileread: FMOD_FILE_READCALLBACK; (* [out] - Do not modify. This will return a callable FMOD file function to use from codec. *) + fileseek: FMOD_FILE_SEEKCALLBACK; (* [out] - Do not modify. This will return a callable FMOD file function to use from codec. *) + metadata: FMOD_CODEC_METADATACALLBACK; (* [out] - Do not modify. This will return a callable FMOD metadata function to use from codec. *) + end; + + +(* ========================================================================================== *) +(* FMOD Ex - DSP header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2005. *) +(* *) +(* Use this header if you are interested in delving deeper into the FMOD software mixing / *) +(* DSP engine. In this header you can find parameter structures for FMOD system reigstered *) +(* DSP effects and generators. *) +(* Also use this header if you are wanting to develop your own DSP plugin to use with FMOD's *) +(* dsp system. With this header you can make your own DSP plugin that FMOD can *) +(* register and use. See the documentation and examples on how to make a working plugin. *) +(* *) +(* ========================================================================================== *) + +(* +[STRUCTURE] +[ + [DESCRIPTION] + DSP plugin structure that is passed into each callback. + + [REMARKS] + Members marked with [in] mean the variable can be written to. The user can set the value. + Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable + + [SEE_ALSO] + FMOD_DSP_DESCRIPTION +] +*) + tagFMOD_DSP_STATE = record + instance: FMOD_DSP; (* [out] Handle to the DSP hand the user created. Not to be modified. C++ users cast to FMOD::DSP to use. *) + plugindata: Pointer; (* [in] Plugin writer created data the output author wants to attach to this object. *) + end; + +type + FMOD_DSP_STATE = ^tagFMOD_DSP_STATE; + +(* + DSP callbacks +*) +(* type- Cannot use the type keyword here because the declaration of FMOD_CODEC_STATE requires tagFMOD_CODEC_STATE in the same type block *) + FMOD_DSP_CREATECALLBACK = function (dsp: FMOD_DSP_STATE): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_DSP_RELEASECALLBACK = function (dsp: FMOD_DSP_STATE): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_DSP_RESETCALLBACK = function (dsp: FMOD_DSP_STATE): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_DSP_READCALLBACK = function (dsp: FMOD_DSP_STATE; var inbuffer: Single; var outbuffer: Single; length: Cardinal; inchannels: Integer; outchannels: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_DSP_SETPOSITIONCALLBACK = function (dsp: FMOD_DSP_STATE; position: Cardinal): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_DSP_SETPARAMCALLBACK = function (dsp: FMOD_DSP_STATE; index: Integer; value: Single): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_DSP_GETPARAMCALLBACK = function (dsp: FMOD_DSP_STATE; index: Integer; var value: Single; valuestr: PString): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + FMOD_DSP_DIALOGCALLBACK = function (dsp: FMOD_DSP_STATE; hwnd: Pointer; show: Integer): FMOD_RESULT; {$IFDEF WIN32} stdcall; {$ELSE} cdecl; {$ENDIF} + +(* +[ENUM] +[ + [DESCRIPTION] + These definitions can be used for creating FMOD defined special effects or DSP units. + + [REMARKS] + To get them to be active, first create the unit, then add it somewhere into the DSP network, either at the front of the network near the soundcard unit to affect the global output (by using FMOD_System_GetDSPHead, or on a single channel (using FMOD_Channel_GetDSPHead). + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_CreateDSPByType +] +*) +type + FMOD_DSP_TYPE = + ( + FMOD_DSP_TYPE_UNKNOWN, (* This unit was created via a non FMOD plugin so has an unknown purpose. *) + FMOD_DSP_TYPE_MIXER, (* This unit does nothing but take inputs and mix them together then feed the result to the soundcard unit *) + FMOD_DSP_TYPE_OSCILLATOR, (* This unit generates sine/square/saw/triangle or noise tones. *) + FMOD_DSP_TYPE_LOWPASS, (* This unit filters sound using a high quality, resonant lowpass filter algorithm but consumes more CPU time. *) + FMOD_DSP_TYPE_ITLOWPASS, (* This unit filters sound using a resonant lowpass filter algorithm that is used in Impulse Tracker. *) + FMOD_DSP_TYPE_HIGHPASS, (* This unit filters sound using a resonant highpass filter algorithm. *) + FMOD_DSP_TYPE_ECHO, (* This unit produces an echo on the sound and fades out at the desired rate. *) + FMOD_DSP_TYPE_FLANGE, (* This unit produces a flange effect on the sound. *) + FMOD_DSP_TYPE_DISTORTION, (* This unit distorts the sound. *) + FMOD_DSP_TYPE_NORMALIZE, (* This unit normalizes or amplifies the sound to a certain level. *) + FMOD_DSP_TYPE_PARAMEQ, (* This unit attenuates or amplifies a selected frequency range. *) + FMOD_DSP_TYPE_PITCHSHIFT, (* This unit bends the pitch of a sound without changing the speed of playback. *) + FMOD_DSP_TYPE_CHORUS, (* This unit produces a chorus effect on the sound. *) + FMOD_DSP_TYPE_REVERB, (* This unit produces a reverb effect on the sound. *) + FMOD_DSP_TYPE_VSTPLUGIN, (* This unit allows the use of Steinberg VST plugins *) + FMOD_DSP_TYPE_WINAMPPLUGIN, (* This unit allows the use of Nullsoft Winamp plugins *) + FMOD_DSP_TYPE_ITECHO, (* This unit produces an echo on the sound and fades out at the desired rate as is used in Impulse Tracker. *) + FMOD_DSP_TYPE_COMPRESSOR, (* This unit implements dynamic compression (linked multichannel, wideband) *) + FMOD_DSP_TYPE_SFXREVERB, (* This unit implements SFX reverb *) + FMOD_DSP_TYPE_LOWPASS_SIMPLE (* This unit filters sound using a simple lowpass with no resonance, but has flexible cutoff and is fast. *) + ); + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + + [REMARKS] + Members marked with [in] mean the variable can be written to. The user can set the value. + Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value. + + The step parameter tells the gui or application that the parameter has a certain granularity. + For example in the example of cutoff frequency with a range from 100.0 to 22050.0 you might only want the selection to be in 10hz increments. For this you would simply use 10.0 as the step value. + For a boolean, you can use min = 0.0, max = 1.0, step = 1.0. This way the only possible values are 0.0 and 1.0. + Some applications may detect min = 0.0, max = 1.0, step = 1.0 and replace a graphical slider bar with a checkbox instead. + A step value of 1.0 would simulate integer values only. + A step value of 0.0 would mean the full floating point range is accessable. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_CreateDSP + FMOD_DSP_SetParameter +] +*) +type + FMOD_DSP_PARAMETERDESC = record + min: Single; (* [in] Minimum value of the parameter (ie 100.0). *) + max: Single; (* [in] Maximum value of the parameter (ie 22050.0). *) + defaultval: Single; (* [in] Default value of parameter. *) + name: array [0..15] of Char; (* [in] Name of the parameter to be displayed (ie "Cutoff frequency"). *) + plabel: array [0..15] of Char; (* [in] Short string to be put next to value to denote the unit type (ie "hz"). *) + description: PChar; (* [in] Description of the parameter to be displayed as a help item / tooltip for this parameter. *) + end; + PFMOD_DSP_PARAMETERDESC = ^FMOD_DSP_PARAMETERDESC; + + +(* +[STRUCTURE] +[ + [DESCRIPTION] + Strcture to define the parameters for a DSP unit. + + [REMARKS] + Members marked with [in] mean the variable can be written to. The user can set the value. + Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value. + + There are 2 different ways to change a parameter in this architecture. + One is to use FMOD_DSP_SetParameter / FMOD_DSP_GetParameter. This is platform independant and is dynamic, so new unknown plugins can have their parameters enumerated and used. + The other is to use FMOD_DSP_ShowConfigDialog. This is platform specific and requires a GUI, and will display a dialog box to configure the plugin. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_System_CreateDSP + FMOD_System_GetDSP +] +*) +type + FMOD_DSP_DESCRIPTION = record + name: array [0..31] of Char; (* [in] Name of the unit to be displayed in the network. *) + version: Cardinal; (* [in] Plugin writer's version number. *) + channels: Integer; (* [in] Number of channels. Use 0 to process whatever number of channels is currently in the network. >0 would be mostly used if the unit is a fixed format generator and not a filter. *) + create: FMOD_DSP_CREATECALLBACK; (* [in] Create callback. This is called when DSP unit is created. Can be null. *) + release: FMOD_DSP_RELEASECALLBACK; (* [in] Release callback. This is called just before the unit is freed so the user can do any cleanup needed for the unit. Can be null. *) + reset: FMOD_DSP_RESETCALLBACK; (* [in] Reset callback. This is called by the user to reset any history buffers that may need resetting for a filter, when it is to be used or re-used for the first time to its initial clean state. Use to avoid clicks or artifacts. *) + read: FMOD_DSP_READCALLBACK; (* [in] Read callback. Processing is done here. Can be null. *) + setposition: FMOD_DSP_SETPOSITIONCALLBACK; (* [in] Set position callback. This is called if the unit wants to update its position info but not process data, or reset a cursor position internally if it is reading data from a certain source. Can be null. *) + numparameters: Integer; (* [in] Number of parameters used in this filter. The user finds this with FMOD_DSP_GetNumParameters *) + paramdesc: PFMOD_DSP_PARAMETERDESC; (* [in] Variable number of parameter structures. *) + setparameter: FMOD_DSP_SETPARAMCALLBACK; (* [in] This is called when the user calls FMOD_DSP_SetParameter. Can be null. *) + getparameter: FMOD_DSP_GETPARAMCALLBACK; (* [in] This is called when the user calls FMOD_DSP_GetParameter. Can be null. *) + config: FMOD_DSP_DIALOGCALLBACK; (* [in] This is called when the user calls FMOD_DSP_ShowConfigDialog. Can be used to display a dialog to configure the filter. Can be null. *) + configwidth: Integer; (* [in] Width of config dialog graphic if there is one. 0 otherwise. *) + configheight: Integer; (* [in] Height of config dialog graphic if there is one. 0 otherwise. *) + end; + + +(* + ============================================================================================================== + + FMOD built in effect parameters. + Use FMOD_DSP_SetParameter with these enums for the 'index' parameter. + + ============================================================================================================== +*) + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_OSCILLATOR filter. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_OSCILLATOR = + ( + FMOD_DSP_OSCILLATOR_TYPE, (* Waveform type. 0 = sine. 1 = square. 2 = sawup. 3 = sawdown. 4 = triangle. 5 = noise. *) + FMOD_DSP_OSCILLATOR_RATE (* Frequency of the sinewave in hz. 1.0 to 22000.0. Default = 220.0. *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_LOWPASS filter. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_LOWPASS = + ( + FMOD_DSP_LOWPASS_CUTOFF, (* Lowpass cutoff frequency in hz. 1.0 to 22000.0. Default = 5000.0. *) + FMOD_DSP_LOWPASS_RESONANCE (* Lowpass resonance Q value. 1.0 to 10.0. Default = 1.0. *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_LOWPASS2 filter. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_LOWPASS2 = + ( + FMOD_DSP_LOWPASS2_CUTOFF, (* Lowpass cutoff frequency in hz. 1.0 to 22000.0. Default = 5000.0/ *) + FMOD_DSP_LOWPASS2_RESONANCE (* Lowpass resonance Q value. 0.0 to 127.0. Default = 1.0. *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_HIGHPASS filter. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_HIGHPASS = + ( + FMOD_DSP_HIGHPASS_CUTOFF, (* Highpass cutoff frequency in hz. 10.0 to output 22000.0. Default = 5000.0. *) + FMOD_DSP_HIGHPASS_RESONANCE (* Highpass resonance Q value. 1.0 to 10.0. Default = 1.0. *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_ECHO filter. + + [REMARKS] + Note. Every time the delay is changed, the plugin re-allocates the echo buffer. This means the echo will dissapear at that time while it refills its new buffer. + Larger echo delays result in larger amounts of memory allocated. + + '<i>maxchannels</i>' also dictates the amount of memory allocated. By default, the maxchannels value is 0. If FMOD is set to stereo, the echo unit will allocate enough memory for 2 channels. If it is 5.1, it will allocate enough memory for a 6 channel echo, etc. + If the echo effect is only ever applied to the global mix (ie it was added with FMOD_System_AddDSP), then 0 is the value to set as it will be enough to handle all speaker modes. + When the echo is added to a channel (ie FMOD_Channel_AddDSP) then the channel count that comes in could be anything from 1 to 8 possibly. It is only in this case where you might want to increase the channel count above the output's channel count. + If a channel echo is set to a lower number than the sound's channel count that is coming in, it will not echo the sound. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_ECHO = + ( + FMOD_DSP_ECHO_DELAY, (* Echo delay in ms. 10 to 5000. Default = 500. *) + FMOD_DSP_ECHO_DECAYRATIO, (* Echo decay per delay. 0 to 1. 1.0 = No decay, 0.0 = total decay. Default = 0.5. *) + FMOD_DSP_ECHO_FEEDBACK, (* 0 = Unit is a simple 1 line delay. 1 = Unit echos what has already been processed by echo. Default = 1. *) + FMOD_DSP_ECHO_MAXCHANNELS (* Maximum channels supported. 0 to 16. 0 = same as fmod's default output polyphony, 1 = mono, 2 = stereo etc. See remarks for more. Default = 0. It is suggested to leave at 0! *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_FLANGE filter. + + [REMARKS] + Flange is an effect where the signal is played twice at the same time, and one copy slides back and forth creating a whooshing or flanging effect. + As there are 2 copies of the same signal, by default each signal is given 50% mix, so that the total is not louder than the original unaffected signal. + + Flange depth is a percentage of a 10ms shift from the original signal. Anything above 10ms is not considered flange because to the ear it begins to 'echo' so 10ms is the highest value possible. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_FLANGE = + ( + FMOD_DSP_FLANGE_DRYMIX, (* Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.45. *) + FMOD_DSP_FLANGE_WETMIX, (* Volume of flange signal to pass to output. 0.0 to 1.0. Default = 0.55. *) + FMOD_DSP_FLANGE_DEPTH, (* Flange depth. 0.01 to 1.0. Default = 1.0. *) + FMOD_DSP_FLANGE_RATE (* Flange speed in hz. 0.0 to 20.0. Default = 0.1. *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_DISTORTION filter. + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_DISTORTION = + ( + FMOD_DSP_DISTORTION_LEVEL (* Distortion value. 0.0 to 1.0. Default = 0.5. *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_NORMALIZE filter. + + [REMARKS] + Normalize amplifies the sound based on the maximum peaks within the signal. + For example if the maximum peaks in the signal were 50% of the bandwidth, it would scale the whole sound by 2. + The lower threshold value makes the normalizer ignores peaks below a certain point, to avoid over-amplification if a loud signal suddenly came in, and also to avoid amplifying to maximum things like background hiss. + + Because FMOD is a realtime audio processor, it doesn't have the luxury of knowing the peak for the whole sound (ie it can't see into the future), so it has to process data as it comes in. + To avoid very sudden changes in volume level based on small samples of new data, fmod fades towards the desired amplification which makes for smooth gain control. The fadetime parameter can control this. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_NORMALIZE = + ( + FMOD_DSP_NORMALIZE_FADETIME, (* Time to ramp the silence to full in ms. 0.0 to 20000.0. Default = 5000.0. *) + FMOD_DSP_NORMALIZE_THRESHHOLD, (* Lower volume range threshold to ignore. 0.0 to 1.0. Default = 0.1. Raise higher to stop amplification of very quiet signals. *) + FMOD_DSP_NORMALIZE_MAXAMP (* Maximum amplification allowed. 1.0 to 100000.0. Default = 20.0. 1.0 = no amplifaction, higher values allow more boost. *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_PARAMEQ filter. + + [REMARKS] + Parametric EQ is a bandpass filter that attenuates or amplifies a selected frequency and its neighbouring frequencies. + + To create a multi-band EQ create multiple FMOD_DSP_TYPE_PARAMEQ units and set each unit to different frequencies, for example 1000hz, 2000hz, 4000hz, 8000hz, 16000hz with a range of 1 octave each. + + When a frequency has its gain set to 1.0, the sound will be unaffected and represents the original signal exactly. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_PARAMEQ = + ( + FMOD_DSP_PARAMEQ_CENTER, (* Frequency center. 20.0 to 22000.0. Default = 8000.0. *) + FMOD_DSP_PARAMEQ_BANDWIDTH, (* Octave range around the center frequency to filter. 0.2 to 5.0. Default = 1.0. *) + FMOD_DSP_PARAMEQ_GAIN (* Frequency Gain. 0.05 to 3.0. Default = 1.0. *) + ); + + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_PITCHSHIFT filter. + + [REMARKS] + This pitch shifting unit can be used to change the pitch of a sound without speeding it up or slowing it down. + It can also be used for time stretching or scaling, for example if the pitch was doubled, and the frequency of the sound was halved, the pitch of the sound would sound correct but it would be twice as slow. + + <b>Warning!</b> This filter is very computationally expensive! Similar to a vocoder, it requires several overlapping FFT and IFFT's to produce smooth output, and can require around 440mhz for 1 stereo 48khz signal using the default settings. + Reducing the signal to mono will half the cpu usage, as will the overlap count. + Reducing this will lower audio quality, but what settings to use are largely dependant on the sound being played. A noisy polyphonic signal will need higher overlap and fft size compared to a speaking voice for example. + + This pitch shifter is based on the pitch shifter code at http://www.dspdimension.com, written by Stephan M. Bernsee. + The original code is COPYRIGHT 1999-2003 Stephan M. Bernsee <smb@dspdimension.com>. + + '<i>maxchannels</i>' dictates the amount of memory allocated. By default, the maxchannels value is 0. If FMOD is set to stereo, the pitch shift unit will allocate enough memory for 2 channels. If it is 5.1, it will allocate enough memory for a 6 channel pitch shift, etc. + If the pitch shift effect is only ever applied to the global mix (ie it was added with FMOD_System_AddDSP), then 0 is the value to set as it will be enough to handle all speaker modes. + When the pitch shift is added to a channel (ie FMOD_Channel_AddDSP) then the channel count that comes in could be anything from 1 to 8 possibly. It is only in this case where you might want to increase the channel count above the output's channel count. + If a channel pitch shift is set to a lower number than the sound's channel count that is coming in, it will not pitch shift the sound. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_PITCHSHIFT = + ( + FMOD_DSP_PITCHSHIFT_PITCH, (* Pitch value. 0.5 to 2.0. Default = 1.0. 0.5 = one octave down, 2.0 = one octave up. 1.0 does not change the pitch. *) + FMOD_DSP_PITCHSHIFT_FFTSIZE, (* FFT window size. 256, 512, 1024, 2048, 4096. Default = 1024. Increase this to reduce 'smearing'. This effect is a warbling sound similar to when an mp3 is encoded at very low bitrates. *) + FMOD_DSP_PITCHSHIFT_OVERLAP, (* Window overlap. 1 to 32. Default = 4. Increase this to reduce 'tremolo' effect. Increasing it by a factor of 2 doubles the CPU usage. *) + FMOD_DSP_PITCHSHIFT_MAXCHANNELS (* Maximum channels supported. 0 to 16. 0 = same as fmod's default output polyphony, 1 = mono, 2 = stereo etc. See remarks for more. Default = 0. It is suggested to leave at 0! *) + ); + + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_CHORUS filter. + + [REMARKS] + Chrous is an effect where the sound is more 'spacious' due to 1 to 3 versions of the sound being played along side the original signal but with the pitch of each copy modulating on a sine wave. + This is a highly configurable chorus unit. It supports 3 taps, small and large delay times and also feedback. + This unit also could be used to do a simple echo, or a flange effect. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_CHORUS = + ( + FMOD_DSP_CHORUS_DRYMIX, (* Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.5. *) + FMOD_DSP_CHORUS_WETMIX1, (* Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5. *) + FMOD_DSP_CHORUS_WETMIX2, (* Volume of 2nd chorus tap. This tap is 90 degrees out of phase of the first tap. 0.0 to 1.0. Default = 0.5. *) + FMOD_DSP_CHORUS_WETMIX3, (* Volume of 3rd chorus tap. This tap is 90 degrees out of phase of the second tap. 0.0 to 1.0. Default = 0.5. *) + FMOD_DSP_CHORUS_DELAY, (* Chorus delay in ms. 0.1 to 100.0. Default = 40.0 ms. *) + FMOD_DSP_CHORUS_RATE, (* Chorus modulation rate in hz. 0.0 to 20.0. Default = 0.8 hz. *) + FMOD_DSP_CHORUS_DEPTH, (* Chorus modulation depth. 0.0 to 1.0. Default = 0.03. *) + FMOD_DSP_CHORUS_FEEDBACK (* Chorus feedback. Controls how much of the wet signal gets fed back into the chorus buffer. 0.0 to 1.0. Default = 0.0. *) + ); + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_REVERB filter. + + [REMARKS] + Based on freeverb by Jezar at Dreampoint - http://www.dreampoint.co.uk. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_REVERB = + ( + FMOD_DSP_REVERB_ROOMSIZE, (* Roomsize. 0.0 to 1.0. Default = 0.5 *) + FMOD_DSP_REVERB_DAMP, (* Damp. 0.0 to 1.0. Default = 0.5 *) + FMOD_DSP_REVERB_WETMIX, (* Wet mix. 0.0 to 1.0. Default = 0.33 *) + FMOD_DSP_REVERB_DRYMIX, (* Dry mix. 0.0 to 1.0. Default = 0.66 *) + FMOD_DSP_REVERB_WIDTH, (* Width. 0.0 to 1.0. Default = 1.0 *) + FMOD_DSP_REVERB_MODE (* Mode. 0 (normal), 1 (freeze). Default = 0 *) + ); + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_ITECHO filter. + This is effectively a software based echo filter that emulates the DirectX DMO echo effect. Impulse tracker files can support this, and FMOD will produce the effect on ANY platform, not just those that support DirectX effects! + + [REMARKS] + Note. Every time the delay is changed, the plugin re-allocates the echo buffer. This means the echo will dissapear at that time while it refills its new buffer. + Larger echo delays result in larger amounts of memory allocated. + + As this is a stereo filter made mainly for IT playback, it is targeted for stereo signals. + With mono signals only the FMOD_DSP_ITECHO_LEFTDELAY is used. + For multichannel signals (>2) there will be no echo on those channels. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3 + + [SEE_ALSO] + FMOD_DSP_SetParameter + FMOD_DSP_GetParameter + FMOD_DSP_TYPE + FMOD_System_AddDSP +] +*) +type + FMOD_DSP_ITECHO = + ( + FMOD_DSP_ITECHO_WETDRYMIX, (* Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from 0.0 through 100.0 (all wet). The default value is 50. *) + FMOD_DSP_ITECHO_FEEDBACK, (* Percentage of output fed back into input, in the range from 0.0 through 100.0. The default value is 50. *) + FMOD_DSP_ITECHO_LEFTDELAY, (* Delay for left channel, in milliseconds, in the range from 1.0 through 2000.0. The default value is 500 ms. *) + FMOD_DSP_ITECHO_RIGHTDELAY, (* Delay for right channel, in milliseconds, in the range from 1.0 through 2000.0. The default value is 500 ms. *) + FMOD_DSP_ITECHO_PANDELAY (* Value that specifies whether to swap left and right delays with each successive echo. The default value is zero, meaning no swap. Possible values are defined as 0.0 (equivalent to FALSE) and 1.0 (equivalent to TRUE). CURRENTLY NOT SUPPORTED. *) + ); + + + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_COMPRESSOR unit. + This is a simple linked multichannel software limiter that is uniform across the whole spectrum.<br> + + [REMARKS] + The limiter is not guaranteed to catch every peak above the threshold level, + because it cannot apply gain reduction instantaneously - the time delay is + determined by the attack time. However setting the attack time too short will + distort the sound, so it is a compromise. High level peaks can be avoided by + using a short attack time - but not too short, and setting the threshold a few + decibels below the critical level. + <br> + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii + + [SEE_ALSO] + DSP::SetParameter + DSP::GetParameter + FMOD_DSP_TYPE + System::addDSP +] +*) +type + FMOD_DSP_COMPRESSOR = + ( + FMOD_DSP_COMPRESSOR_THRESHOLD, (* Threshold level (dB) in the range from -60 through 0. The default value is 0. *) + FMOD_DSP_COMPRESSOR_ATTACK, (* Gain reduction attack time (milliseconds), in the range from 10 through 200. The default value is 50. *) + FMOD_DSP_COMPRESSOR_RELEASE, (* Gain reduction release time (milliseconds), in the range from 20 through 1000. The default value is 50. *) + FMOD_DSP_COMPRESSOR_GAINMAKEUP (* Make-up gain (dB) applied after limiting, in the range from 0 through 30. The default value is 0. *) + ); + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_SFXREVERB unit.<br> + + [REMARKS] + This is a high quality I3DL2 based reverb which improves greatly on FMOD_DSP_REVERB.<br> + On top of the I3DL2 property set, "Dry Level" is also included to allow the dry mix to be changed.<br> + <br> + Currently FMOD_DSP_SFXREVERB_REFLECTIONSLEVEL, FMOD_DSP_SFXREVERB_REFLECTIONSDELAY and FMOD_DSP_SFXREVERB_REVERBDELAY are not enabled but will come in future versions.<br> + <br> + These properties can be set with presets in FMOD_REVERB_PRESETS. + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii + + [SEE_ALSO] + DSP::SetParameter + DSP::GetParameter + FMOD_DSP_TYPE + System::addDSP + FMOD_REVERB_PRESETS +] +*) +type + FMOD_DSP_SFXREVERB = + ( + FMOD_DSP_SFXREVERB_DRYLEVEL, (* Dry Level : Mix level of dry signal in output in mB. Ranges from -10000.0 to 0.0. Default is 0. *) + FMOD_DSP_SFXREVERB_ROOM, (* Room : Room effect level at low frequencies in mB. Ranges from -10000.0 to 0.0. Default is 0.0. *) + FMOD_DSP_SFXREVERB_ROOMHF, (* Room HF : Room effect high-frequency level re. low frequency level in mB. Ranges from -10000.0 to 0.0. Default is 0.0. *) + FMOD_DSP_SFXREVERB_ROOMROLLOFFFACTOR, (* Room Rolloff : Like DS3D flRolloffFactor but for room effect. Ranges from 0.0 to 10.0. Default is 10.0 *) + FMOD_DSP_SFXREVERB_DECAYTIME, (* Decay Time : Reverberation decay time at low-frequencies in seconds. Ranges from 0.1 to 20.0. Default is 1.0. *) + FMOD_DSP_SFXREVERB_DECAYHFRATIO, (* Decay HF Ratio : High-frequency to low-frequency decay time ratio. Ranges from 0.1 to 2.0. Default is 0.5. *) + FMOD_DSP_SFXREVERB_REFLECTIONSLEVEL, (* Reflections : Early reflections level relative to room effect in mB. Ranges from -10000.0 to 1000.0. Default is -10000.0. *) + FMOD_DSP_SFXREVERB_REFLECTIONSDELAY, (* Reflect Delay : Delay time of first reflection in seconds. Ranges from 0.0 to 0.3. Default is 0.02. *) + FMOD_DSP_SFXREVERB_REVERBLEVEL, (* Reverb : Late reverberation level relative to room effect in mB. Ranges from -10000.0 to 2000.0. Default is 0.0. *) + FMOD_DSP_SFXREVERB_REVERBDELAY, (* Reverb Delay : Late reverberation delay time relative to first reflection in seconds. Ranges from 0.0 to 0.1. Default is 0.04. *) + FMOD_DSP_SFXREVERB_DIFFUSION, (* Diffusion : Reverberation diffusion (echo density) in percent. Ranges from 0.0 to 100.0. Default is 100.0. *) + FMOD_DSP_SFXREVERB_DENSITY, (* Density : Reverberation density (modal density) in percent. Ranges from 0.0 to 100.0. Default is 100.0. *) + FMOD_DSP_SFXREVERB_HFREFERENCE (* HF Reference : Reference high frequency in Hz. Ranges from 20.0 to 20000.0. Default is 5000.0. *) + ); + +(* +[ENUM] +[ + [DESCRIPTION] + Parameter types for the FMOD_DSP_TYPE_LOWPASS_SIMPLE filter.<br> + This is a very simple low pass filter, based on two single-pole RC time-constant modules. + The emphasis is on speed rather than accuracy, so this should not be used for task requiring critical filtering.<br> + + [REMARKS] + + [PLATFORMS] + Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii + + [SEE_ALSO] + DSP::setParameter + DSP::getParameter + FMOD_DSP_TYPE +] +*) +type + FMOD_DSP_LOWPASS_SIMPLE = + ( + FMOD_DSP_LOWPASS_SIMPLE_CUTOFF (* Lowpass cutoff frequency in hz. 10.0 to 22000.0. Default = 5000.0 *) + ); + + + + +implementation + +end. diff --git a/src/shared/BinEditor.pas b/src/shared/BinEditor.pas new file mode 100644 index 0000000..f59d4f3 --- /dev/null +++ b/src/shared/BinEditor.pas @@ -0,0 +1,664 @@ +Unit BinEditor; + +Interface + +Uses + SysUtils; + +Type + EBinSizeError = Class (Exception); + + TBinMemoryWriter = Class (TObject) + Private + FSize: Cardinal; + FData: Pointer; + FPosition: Cardinal; + + Procedure WriteVar(Var x; varSize: Cardinal); + Procedure ExtendMemory(addLen: Cardinal); + + Public + Constructor Create(aSize: Cardinal); + Destructor Destroy(); Override; + Procedure WriteByte(Var x: Byte); + Procedure WriteWord(Var x: Word); + Procedure WriteDWORD(Var x: DWORD); + Procedure WriteShortInt(Var x: ShortInt); + Procedure WriteSmallInt(Var x: SmallInt); + Procedure WriteInt(Var x: Integer); + Procedure WriteSingle(Var x: Single); + Procedure WriteBoolean(Var x: Boolean); + Procedure WriteString(Var x: String; aMaxLen: Byte = 255); + Procedure WriteMemory(Var x: Pointer; memSize: Cardinal); + Procedure Fill(aLen: Cardinal; aFillSym: Byte); + Procedure SaveToFile(Var aFile: File); + Procedure SaveToMemory(Var aMem: TBinMemoryWriter); + End; + + TBinMemoryReader = Class (TObject) + Private + FSize: Cardinal; + FData: Pointer; + FPosition: Cardinal; + + Procedure ReadVar(Var x; varSize: Cardinal); + + Public + Constructor Create(); + Destructor Destroy(); Override; + Procedure ReadByte(Var x: Byte); + Procedure ReadWord(Var x: Word); + Procedure ReadDWORD(Var x: DWORD); + Procedure ReadShortInt(Var x: ShortInt); + Procedure ReadSmallInt(Var x: SmallInt); + Procedure ReadInt(Var x: Integer); + Procedure ReadSingle(Var x: Single); + Procedure ReadBoolean(Var x: Boolean); + Procedure ReadString(Var x: String); + Procedure ReadMemory(Var x: Pointer; Var memSize: Cardinal); + Procedure Skip(aLen: Cardinal); + Procedure LoadFromFile(Var aFile: File); + Procedure LoadFromMemory(Var aMem: TBinMemoryReader); + End; + + TBinFileWriter = Class (TObject) + Private + FHandle: File; + FOpened: Boolean; + + Public + Constructor Create(); + Destructor Destroy(); Override; + Procedure OpenFile(Const aFileName: String; + aFileSig: Cardinal; + aFileVer: Byte; + aOverWrite: Boolean = True); + Procedure Close(); + Procedure WriteMemory(Var aMemory: TBinMemoryWriter); + End; + + TBinFileReader = Class (TObject) + Private + FHandle: File; + FOpened: Boolean; + + Public + Constructor Create(); + Destructor Destroy(); Override; + Function OpenFile(Const aFileName: String; + aFileSig: Cardinal; + aFileVer: Byte): Boolean; + Procedure Close(); + Procedure ReadMemory(Var aMemory: TBinMemoryReader); + End; + +procedure FillMemory(Dest: Pointer; Len: Cardinal; Ch: Byte); +procedure CopyMemory(Dest: Pointer; Src: Pointer; Len: Cardinal); +procedure ZeroMemory(Dest: Pointer; Len: Cardinal); + +Implementation + +Uses + Math, e_log; + +Const + MAX_BIN_SIZE = 4 * 1024 * 1024; // 4 MB + +procedure CopyMemory(Dest: Pointer; Src: Pointer; Len: Cardinal); +begin + Move(Src^, Dest^, Len); +end; + +procedure FillMemory(Dest: Pointer; Len: Cardinal; Ch: Byte); +begin + FillChar(Dest^, Len, Ch); +end; + +procedure ZeroMemory(Dest: Pointer; Len: Cardinal); +begin + FillChar(Dest^, Len, 0); +end; + +{ T B i n M e m o r y W r i t e r : } + +Constructor TBinMemoryWriter.Create(aSize: Cardinal); +begin + if aSize <= 0 then + FSize := 1 + else + FSize := aSize; + if FSize > MAX_BIN_SIZE then + FSize := MAX_BIN_SIZE; + + GetMem(FData, FSize); + FPosition := 0; +end; + +Destructor TBinMemoryWriter.Destroy(); +begin + if FData <> nil then + begin + FreeMem(FData); + FData := nil; + end; + + Inherited; +end; + +Procedure TBinMemoryWriter.WriteVar(Var x; varSize: Cardinal); +begin + if (FPosition + varSize) > FSize then + ExtendMemory(varSize); + + CopyMemory(Pointer(Cardinal(FData) + FPosition), + @x, varSize); + FPosition := FPosition + varSize; +end; + +Procedure TBinMemoryWriter.ExtendMemory(addLen: Cardinal); +var + tmp: Pointer; + +begin + while ((FPosition + addLen) > FSize) and + (FSize <= MAX_BIN_SIZE) do + FSize := FSize * 2; + + if FSize > MAX_BIN_SIZE then + begin + raise EBinSizeError.Create('TBinMemoryWriter.ExtendMemory: Tried to allocete more than 4 MB'); + Exit; + end; + + GetMem(tmp, FSize); + + if FPosition > 0 then + CopyMemory(tmp, FData, FPosition); + + FreeMem(FData); + FData := tmp; + + e_WriteLog('Save Memory Extended: '+IntToStr(FSize), MSG_NOTIFY); +end; + +Procedure TBinMemoryWriter.WriteByte(Var x: Byte); +begin + WriteVar(x, SizeOf(Byte)); +end; + +Procedure TBinMemoryWriter.WriteWord(Var x: Word); +begin + WriteVar(x, SizeOf(Word)); +end; + +Procedure TBinMemoryWriter.WriteDWORD(Var x: DWORD); +begin + WriteVar(x, SizeOf(DWORD)); +end; + +Procedure TBinMemoryWriter.WriteShortInt(Var x: ShortInt); +begin + WriteVar(x, SizeOf(ShortInt)); +end; + +Procedure TBinMemoryWriter.WriteSmallInt(Var x: SmallInt); +begin + WriteVar(x, SizeOf(SmallInt)); +end; + +Procedure TBinMemoryWriter.WriteInt(Var x: Integer); +begin + WriteVar(x, SizeOf(Integer)); +end; + +Procedure TBinMemoryWriter.WriteSingle(Var x: Single); +begin + WriteVar(x, SizeOf(Single)); +end; + +Procedure TBinMemoryWriter.WriteBoolean(Var x: Boolean); +var + y: Byte; + +begin + if x then + y := 1 + else + y := 0; + + WriteVar(y, SizeOf(Byte)); +end; + +Procedure TBinMemoryWriter.WriteString(Var x: String; aMaxLen: Byte = 255); +var + len: Byte; + +begin + len := Min(Length(x), aMaxLen); + + if (FPosition + SizeOf(Byte) + len) > FSize then + ExtendMemory(SizeOf(Byte) + len); + +// Äëèíà ñòðîêè: + CopyMemory(Pointer(Cardinal(FData) + FPosition), + @len, SizeOf(Byte)); + FPosition := FPosition + SizeOf(Byte); +// Ñòðîêà: + if len > 0 then + begin + CopyMemory(Pointer(Cardinal(FData) + FPosition), + @x[1], len); + FPosition := FPosition + len; + end; +end; + +Procedure TBinMemoryWriter.WriteMemory(Var x: Pointer; memSize: Cardinal); +begin + if (FPosition + SizeOf(Cardinal) + memSize) > FSize then + ExtendMemory(SizeOf(Cardinal) + memSize); + +// Äëèíà áëîêà ïàìÿòè: + CopyMemory(Pointer(Cardinal(FData) + FPosition), + @memSize, SizeOf(Cardinal)); + FPosition := FPosition + SizeOf(Cardinal); +// Áëîê ïàìÿòè: + if memSize > 0 then + begin + CopyMemory(Pointer(Cardinal(FData) + FPosition), + x, memSize); + FPosition := FPosition + memSize; + end; +end; + +Procedure TBinMemoryWriter.Fill(aLen: Cardinal; aFillSym: Byte); +begin + if (FPosition + aLen) > FSize then + ExtendMemory(aLen); + + if aLen > 0 then + begin + FillMemory(Pointer(Cardinal(FData) + FPosition), + aLen, aFillSym); + FPosition := FPosition + aLen; + end; +end; + +Procedure TBinMemoryWriter.SaveToFile(Var aFile: File); +var + nw: Cardinal; + +begin +// Ðàçìåð áëîêà: + BlockWrite(aFile, FPosition, SizeOf(Cardinal), nw); + if nw <> SizeOf(Cardinal) then + begin + raise EInOutError.Create('TBinMemoryWriter.SaveToFile: Writing Length'); + end + else + begin + // Äàííûå áëîêà: + BlockWrite(aFile, FData^, FPosition, nw); + if nw <> FPosition then + begin + raise EInOutError.Create('TBinMemoryWriter.SaveToFile: Writing Data'); + end + end; +end; + +Procedure TBinMemoryWriter.SaveToMemory(Var aMem: TBinMemoryWriter); +begin + if aMem <> nil then + begin + aMem.WriteMemory(FData, FPosition); + end; +end; + +{ T B i n M e m o r y R e a d e r : } + +Constructor TBinMemoryReader.Create(); +begin + FSize := 0; + FData := nil; + FPosition := 1; +end; + +Destructor TBinMemoryReader.Destroy(); +begin + if FData <> nil then + begin + FreeMem(FData); + FData := nil; + end; + + Inherited; +end; + +Procedure TBinMemoryReader.ReadVar(Var x; varSize: Cardinal); +begin + if (FPosition + varSize) <= FSize then + begin + CopyMemory(@x, + Pointer(Cardinal(FData) + FPosition), + varSize); + FPosition := FPosition + varSize; + end + else + raise EBinSizeError.Create('TBinMemoryReader.ReadVar: End of Memory'); +end; + +Procedure TBinMemoryReader.ReadByte(Var x: Byte); +begin + ReadVar(x, SizeOf(Byte)); +end; + +Procedure TBinMemoryReader.ReadWord(Var x: Word); +begin + ReadVar(x, SizeOf(Word)); +end; + +Procedure TBinMemoryReader.ReadDWORD(Var x: DWORD); +begin + ReadVar(x, SizeOf(DWORD)); +end; + +Procedure TBinMemoryReader.ReadShortInt(Var x: ShortInt); +begin + ReadVar(x, SizeOf(ShortInt)); +end; + +Procedure TBinMemoryReader.ReadSmallInt(Var x: SmallInt); +begin + ReadVar(x, SizeOf(SmallInt)); +end; + +Procedure TBinMemoryReader.ReadInt(Var x: Integer); +begin + ReadVar(x, SizeOf(Integer)); +end; + +Procedure TBinMemoryReader.ReadSingle(Var x: Single); +begin + ReadVar(x, SizeOf(Single)); +end; + +Procedure TBinMemoryReader.ReadBoolean(Var x: Boolean); +var + y: Byte; + +begin + ReadVar(y, SizeOf(Byte)); + + if y > 0 then + x := True + else + x := False; +end; + +Procedure TBinMemoryReader.ReadString(Var x: String); +var + len: Byte; + +begin + if (FPosition + SizeOf(Byte)) <= FSize then + begin + // Äëèíà ñòðîêè: + CopyMemory(@len, + Pointer(Cardinal(FData) + FPosition), + SizeOf(Byte)); + + if (FPosition + SizeOf(Byte) + len) <= FSize then + begin + FPosition := FPosition + SizeOf(Byte); + // Ñòðîêà: + SetLength(x, len); + if len > 0 then + begin + CopyMemory(@x[1], + Pointer(Cardinal(FData) + FPosition), + len); + FPosition := FPosition + len; + end + else + x := ''; + end + else + raise EBinSizeError.Create('TBinMemoryReader.ReadString: Too Long String'); + end + else + raise EBinSizeError.Create('TBinMemoryReader.ReadString: End of Memory'); +end; + +Procedure TBinMemoryReader.ReadMemory(Var x: Pointer; Var memSize: Cardinal); +begin + if (FPosition + SizeOf(Cardinal)) <= FSize then + begin + // Äëèíà áëîêà ïàìÿòè: + CopyMemory(@memSize, + Pointer(Cardinal(FData) + FPosition), + SizeOf(Cardinal)); + + if (FPosition + SizeOf(Cardinal) + memSize) <= FSize then + begin + FPosition := FPosition + SizeOf(Cardinal); + // Áëîê ïàìÿòè: + if memSize > 0 then + begin + GetMem(x, memSize); + CopyMemory(x, + Pointer(Cardinal(FData) + FPosition), + memSize); + FPosition := FPosition + memSize; + end + else + x := nil; + end + else + raise EBinSizeError.Create('TBinMemoryReader.ReadMemory: Too Long Memory'); + end + else + raise EBinSizeError.Create('TBinMemoryReader.ReadMemory: End of Memory'); +end; + +Procedure TBinMemoryReader.Skip(aLen: Cardinal); +begin + if (FPosition + aLen) <= FSize then + begin + FPosition := FPosition + aLen; + end + else + raise EBinSizeError.Create('TBinMemoryReader.Skip: End of Memory'); +end; + +Procedure TBinMemoryReader.LoadFromFile(Var aFile: File); +var + nr: Cardinal; + aSize: Cardinal; + +begin + if FData <> nil then + FreeMem(FData); + +// Ðàçìåð áëîêà: + BlockRead(aFile, aSize, SizeOf(Cardinal), nr); + if nr <> SizeOf(Cardinal) then + begin + raise EInOutError.Create('TBinMemoryReader.LoadFromFile: Reading Length'); + end + else + begin + FSize := aSize; + GetMem(FData, FSize); + FPosition := 0; + // Äàííûå áëîêà: + BlockRead(aFile, FData^, FSize, nr); + if nr <> FSize then + begin + raise EInOutError.Create('TBinMemoryReader.LoadFromFile: Reading Data'); + end + end; +end; + +Procedure TBinMemoryReader.LoadFromMemory(Var aMem: TBinMemoryReader); +begin + if FData <> nil then + FreeMem(FData); + + if aMem <> nil then + begin + aMem.ReadMemory(FData, FSize); + FPosition := 0; + end; +end; + +{ T B i n F i l e W r i t e r : } + +Constructor TBinFileWriter.Create(); +begin + FOpened := False; +end; + +Destructor TBinFileWriter.Destroy(); +begin + Close(); + + Inherited; +end; + +Procedure TBinFileWriter.OpenFile(Const aFileName: String; + aFileSig: Cardinal; + aFileVer: Byte; + aOverWrite: Boolean = True); +var + nw: Integer; + +begin + Close(); + + if (not FileExists(aFileName)) or (aOverWrite) then + begin + AssignFile(FHandle, aFileName); + ReWrite(FHandle, 1); + + // Ñèãíàòóðà: + BlockWrite(FHandle, aFileSig, SizeOf(Cardinal), nw); + if nw <> SizeOf(Cardinal) then + begin + raise EInOutError.Create('TBinFileWriter.OpenFile: Writing File Signature'); + end + else + begin + // Âåðñèÿ: + BlockWrite(FHandle, aFileVer, SizeOf(Byte), nw); + if nw <> SizeOf(Byte) then + begin + raise EInOutError.Create('TBinFileWriter.OpenFile: Writing File Version'); + end + else + begin + FOpened := True; + end; + end; + end; +end; + +Procedure TBinFileWriter.Close(); +begin + if FOpened then + begin + System.Close(FHandle); + FOpened := False; + end; +end; + +Procedure TBinFileWriter.WriteMemory(Var aMemory: TBinMemoryWriter); +begin + if (FOpened) and (aMemory <> nil) then + begin + aMemory.SaveToFile(FHandle); + end; +end; + +{ T B i n F i l e R e a d e r : } + +Constructor TBinFileReader.Create(); +begin + FOpened := False; +end; + +Destructor TBinFileReader.Destroy(); +begin + Close(); + + Inherited; +end; + +Function TBinFileReader.OpenFile(Const aFileName: String; + aFileSig: Cardinal; + aFileVer: Byte): Boolean; +var + nr: Integer; + sig: Cardinal; + ver: Byte; + +begin + Result := False; + + Close(); + + if FileExists(aFileName) then + begin + AssignFile(FHandle, aFileName); + ReSet(FHandle, 1); + + // Ñèãíàòóðà: + BlockRead(FHandle, sig, SizeOf(Cardinal), nr); + if (nr <> SizeOf(Cardinal)) then + begin + raise EInOutError.Create('TBinFileReader.OpenFile: Reading File Signature'); + end + else + if (sig <> aFileSig) then + begin + raise EInOutError.Create('TBinFileReader.OpenFile: Wrong File Signature'); + end + else + begin + // Âåðñèÿ: + BlockRead(FHandle, ver, SizeOf(Byte), nr); + if (nr <> SizeOf(Byte)) then + begin + raise EInOutError.Create('TBinFileReader.OpenFile: Reading File Version'); + end + else + if (ver <> aFileVer) then + begin + raise EInOutError.Create('TBinFileReader.OpenFile: Wrong File Version'); + end + else + begin + FOpened := True; + Result := True; + end; + end; + end; +end; + +Procedure TBinFileReader.Close(); +begin + if FOpened then + begin + System.Close(FHandle); + FOpened := False; + end; +end; + +Procedure TBinFileReader.ReadMemory(Var aMemory: TBinMemoryReader); +begin + if (FOpened) and (aMemory <> nil) then + begin + aMemory.LoadFromFile(FHandle); + end; +end; + + +End. diff --git a/src/shared/CONFIG.pas b/src/shared/CONFIG.pas new file mode 100644 index 0000000..19c7d01 --- /dev/null +++ b/src/shared/CONFIG.pas @@ -0,0 +1,307 @@ +unit CONFIG; + +{$MODE Delphi} + +{ +----------------------------------- +CONFIG.PAS ВЕРСИЯ ОТ 24.09.06 +----------------------------------- +} + +interface + +type + TParam = record + Param: ShortString; + Value: ShortString; + Section: Word; + end; + + TConfig = class(TObject) + private + FParams: array of TParam; + FSections: array of ShortString; + FCurrentSection: Word; + function ReadParam(Section, Param, Default: string): string; + procedure WriteParam(Section, Param, Value: string); + procedure ProcessStr(Str: string); + public + constructor Create(); + constructor CreateFile(FileName: string); + constructor CreateMem(pData: Pointer; _Length: LongWord); + destructor Destroy(); override; + procedure FreeConfig(); + procedure SaveFile(FileName: string); + function ReadInt(Section, Param: string; Default: Integer): Integer; + function ReadStr(Section, Param: string; Default: String): string; + function ReadBool(Section, Param: string; Default: Boolean): Boolean; + function SectionExists(Section: string): Boolean; + procedure WriteInt(Section, Param: string; Value: Integer); + procedure WriteStr(Section, Param, Value: string); + procedure WriteBool(Section, Param: string; Value: Boolean); + end; + +implementation + +uses + SysUtils, BinEditor; + +{ TConfig } + +constructor TConfig.Create(); +begin + inherited Create; + + FreeConfig(); +end; + +constructor TConfig.CreateFile(FileName: string); +var + f: TextFile; + a: string; +begin + FreeConfig(); + + if not FileExists(FileName) then Exit; + + AssignFile(f, FileName); + Reset(f); + while not EOF(f) do + begin + Readln(f, a); + ProcessStr(a); + end; + CloseFile(f); +end; + +constructor TConfig.CreateMem(pData: Pointer; _Length: LongWord); +var + a: Integer; + str: string; +begin + FreeConfig(); + + if _Length = 0 then Exit; + if pData = nil then Exit; + + SetLength(str, _Length); + + CopyMemory(@str[1], pData, _Length); + + while Str <> '' do + begin + for a := 2 to Length(Str) do + if (Str[a-1]+Str[a] = #13#10) or (a = Length(Str)) then + begin + if a <> Length(Str) then ProcessStr(Copy(Str, 1, a-2)) else ProcessStr(Str); + Delete(Str, 1, a); + Str := Trim(Str); + Break; + end; + end; +end; + +destructor TConfig.Destroy(); +begin + FParams := nil; + FSections := nil; + + inherited; +end; + +procedure TConfig.FreeConfig(); +begin + FParams := nil; + FSections := nil; + + SetLength(FSections, 1); + FSections[0] := ''; + FCurrentSection := 0; +end; + +procedure TConfig.ProcessStr(Str: string); +var + a, l: Integer; +begin + Str := Trim(Str); + + if (Str <> '') and (Length(Str) > 2) and (Str[1] <> ';') then + begin + l := Length(Str); + + if Pos('=', Str) > 0 then + begin + SetLength(FParams, Length(FParams)+1); + + with FParams[High(FParams)] do + begin + a := Pos('=', Str); + Param := Trim(Copy(Str, 1, a-1)); + Value := Trim(Copy(Str, a+1, l)); + Section := FCurrentSection; + end; + end + else if (Str[1] = '[') and (Str[l] = ']') then + begin + SetLength(FSections, Length(FSections)+1); + FCurrentSection := High(FSections); + FSections[FCurrentSection] := Trim(Copy(Str, 2, l-2)); + end; + end; +end; + +function TConfig.ReadBool(Section, Param: string; Default: Boolean): Boolean; +var + a: Integer; +begin + if Default then a := 1 else a := 0; + + Result := StrToIntDef(ReadParam(Section, Param, IntToStr(a)), a) <> 0; +end; + +function TConfig.ReadInt(Section, Param: string; Default: Integer): Integer; +begin + Result := StrToIntDef(ReadParam(Section, Param, IntToStr(Default)), Default); +end; + +function TConfig.ReadParam(Section, Param, Default: string): string; +var + a: Integer; + s: Word; + ok: Boolean; + p: string; +begin + Result := default; + + if FParams = nil then Exit; + if FSections = nil then Exit; + + ok := False; + s := 0; + for a := 0 to High(FSections) do + if LowerCase(FSections[a]) = LowerCase(Section) then + begin + s := a; + ok := True; + end; + + if not ok then Exit; + + p := LowerCase(Param); + + for a := 0 to High(FParams) do + if (FParams[a].Section = s) and (LowerCase(FParams[a].Param) = p) then + begin + Result := FParams[a].Value; + Break; + end; +end; + +function TConfig.ReadStr(Section, Param, Default: string): string; +begin + Result := ReadParam(Section, Param, Default); +end; + +procedure TConfig.SaveFile(FileName: string); +var + f: TextFile; + a: Integer; + b: Integer; +begin + AssignFile(f, FileName); + Rewrite(f); + if (FSections <> nil) or (FParams <> nil) then + begin + if FSections <> nil then + for a := 0 to High(FSections) do + begin + if FSections[a] <> '' then Writeln(f, '['+FSections[a]+']'); + + if FParams <> nil then + for b := 0 to High(FParams) do + if FParams[b].Section = a then WriteLn(f, FParams[b].Param+'='+FParams[b].Value); + + if (a <> High(FSections)) and (FSections[a] <> '') then WriteLn(f, ''); + end; + end; + CloseFile(f); +end; + +function TConfig.SectionExists(Section: string): Boolean; +var + a: Integer; +begin + Result := False; + + if FSections = nil then Exit; + + Section := LowerCase(Section); + + for a := 0 to High(FSections) do + if Section = LowerCase(FSections[a]) then + begin + Result := True; + Exit; + end; +end; + +procedure TConfig.WriteBool(Section, Param: string; Value: Boolean); +begin + WriteParam(Section, Param, BoolToStr(Value)); +end; + +procedure TConfig.WriteInt(Section, Param: string; Value: Integer); +begin + WriteParam(Section, Param, IntToStr(Value)); +end; + +procedure TConfig.WriteParam(Section, Param, Value: string); +var + a, b: Integer; + ok: Boolean; +begin + a := 0; + b := 0; + + ok := False; + + if FSections <> nil then + for a := 0 to High(FSections) do + if FSections[a] = Section then + begin + ok := True; + Break; + end; + + if not ok then + begin + SetLength(FSections, Length(FSections)+1); + a := High(FSections); + FSections[a] := Section; + end; + + ok := False; + if FParams <> nil then + for b := 0 to High(FParams) do + if (LowerCase(FParams[b].Param) = LowerCase(Param)) and (FParams[b].Section = a) then + begin + ok := True; + Break; + end; + + if ok then FParams[b].Value := Value + else + begin + SetLength(FParams, Length(FParams)+1); + FParams[High(FParams)].Param := Param; + FParams[High(FParams)].Value := Value; + FParams[High(FParams)].Section := a; + end; +end; + +procedure TConfig.WriteStr(Section, Param, Value: string); +begin + WriteParam(Section, Param, Value); +end; + +end. diff --git a/src/shared/CONFIGSIMPLE.pas b/src/shared/CONFIGSIMPLE.pas new file mode 100644 index 0000000..05960de --- /dev/null +++ b/src/shared/CONFIGSIMPLE.pas @@ -0,0 +1,142 @@ +unit CONFIGSIMPLE; + +interface + +function config_open(FileName: string): Boolean; +function config_read_int(param: string; def: Integer): Integer; +function config_read_str(param: string; def: string): string; +function config_read_bool(param: string; def: Boolean): Boolean; +procedure config_close(); + +implementation + +uses windows; + +var + cfg_data: array of ShortString = nil; + +function tostr(i: Integer): string; +begin + Str(i, Result); +end; + +function toint(s: string; var i: Integer): Boolean; +var + code: Integer; +begin + Val(s, i, code); + + Result := code = 0; +end; + +function readparam(param: string; var s: string): Boolean; +var + a, b, len, d_len: Integer; +begin + Result := False; + + if cfg_data = nil then Exit; + + d_len := Length(cfg_data); + + for a := 0 to d_len do + begin + len := Length(cfg_data[a]); + if len = 0 then Exit; + + for b := 1 to len do + if cfg_data[a][b] = '=' then + if Copy(cfg_data[a], 1, b-1) = param then + begin + s := Copy(cfg_data[a], b+1, len); + Result := True; + Exit; + end; + end; +end; + +function config_open(FileName: string): Boolean; +var + f: TextFile; + str: ShortString; + len, d_len, line: Integer; +begin + Result := False; + + if cfg_data <> nil then config_close(); + + AssignFile(f, FileName); + + {$I-} + Reset(f); + {$I+} + + if IOResult <> 0 then Exit; + + d_len := 32; + SetLength(cfg_data, d_len); + line := 0; + + while not EOF(f) do + begin + Readln(f, str); + + len := Length(str); + if len < 3 then Continue; + if str[1] = ';' then Continue; + + if line >= d_len then + begin + d_len := d_len+32; + SetLength(cfg_data, d_len); + end; + + cfg_data[line] := str; + line := line+1; + end; + + CloseFile(f); + + Result := True; +end; + +function config_read_int(param: string; def: Integer): Integer; +var + s: string; +begin + Result := def; + + if not readparam(param, s) then Exit; + + if not toint(s, Result) then Result := def; +end; + +function config_read_str(param: string; def: string): string; +var + s: string; +begin + Result := def; + + if not readparam(param, s) then Exit; + + Result := s; +end; + +function config_read_bool(param: string; def: Boolean): Boolean; +var + s: string; +begin + Result := def; + + if not readparam(param, s) then Exit; + + Result := s <> '0'; +end; + +procedure config_close(); +begin + if cfg_data <> nil then cfg_data := nil; +end; + + +end. diff --git a/src/shared/MAPDEF.pas b/src/shared/MAPDEF.pas new file mode 100644 index 0000000..8ad2ccd --- /dev/null +++ b/src/shared/MAPDEF.pas @@ -0,0 +1,323 @@ +unit MAPDEF; + +{$MODE Delphi} + +{ +----------------------------------- +MAPDEF.PAS ВЕРСИЯ ОТ 22.03.09 + +Поддержка карт версии 1 +----------------------------------- +} + +interface + +uses + MAPSTRUCT; + +const + PANEL_NONE = 0; + PANEL_WALL = 1; + PANEL_BACK = 2; + PANEL_FORE = 4; + PANEL_WATER = 8; + PANEL_ACID1 = 16; + PANEL_ACID2 = 32; + PANEL_STEP = 64; + PANEL_LIFTUP = 128; + PANEL_LIFTDOWN = 256; + PANEL_OPENDOOR = 512; + PANEL_CLOSEDOOR = 1024; + PANEL_BLOCKMON = 2048; + PANEL_LIFTLEFT = 4096; + PANEL_LIFTRIGHT = 8192; + + PANEL_FLAG_BLENDING = 1; + PANEL_FLAG_HIDE = 2; + PANEL_FLAG_WATERTEXTURES = 4; + + EFFECT_NONE = 0; + EFFECT_TELEPORT = 1; + EFFECT_RESPAWN = 2; + EFFECT_FIRE = 3; + + ITEM_NONE = 0; + ITEM_MEDKIT_SMALL = 1; + ITEM_MEDKIT_LARGE = 2; + ITEM_MEDKIT_BLACK = 3; + ITEM_ARMOR_GREEN = 4; + ITEM_ARMOR_BLUE = 5; + ITEM_SPHERE_BLUE = 6; + ITEM_SPHERE_WHITE = 7; + ITEM_SUIT = 8; + ITEM_OXYGEN = 9; + ITEM_INVUL = 10; + ITEM_WEAPON_SAW = 11; + ITEM_WEAPON_SHOTGUN1 = 12; + ITEM_WEAPON_SHOTGUN2 = 13; + ITEM_WEAPON_CHAINGUN = 14; + ITEM_WEAPON_ROCKETLAUNCHER = 15; + ITEM_WEAPON_PLASMA = 16; + ITEM_WEAPON_BFG = 17; + ITEM_WEAPON_SUPERPULEMET = 18; + ITEM_AMMO_BULLETS = 19; + ITEM_AMMO_BULLETS_BOX = 20; + ITEM_AMMO_SHELLS = 21; + ITEM_AMMO_SHELLS_BOX = 22; + ITEM_AMMO_ROCKET = 23; + ITEM_AMMO_ROCKET_BOX = 24; + ITEM_AMMO_CELL = 25; + ITEM_AMMO_CELL_BIG = 26; + ITEM_AMMO_BACKPACK = 27; + ITEM_KEY_RED = 28; + ITEM_KEY_GREEN = 29; + ITEM_KEY_BLUE = 30; + ITEM_WEAPON_KASTET = 31; + ITEM_WEAPON_PISTOL = 32; + ITEM_BOTTLE = 33; + ITEM_HELMET = 34; + ITEM_JETPACK = 35; + ITEM_INVIS = 36; + + ITEM_MAX = 36; // store the last item's id in here + // use this in for loops + + ITEM_OPTION_ONLYDM = 1; + ITEM_OPTION_FALL = 2; + + AREA_NONE = 0; + AREA_PLAYERPOINT1 = 1; + AREA_PLAYERPOINT2 = 2; + AREA_DMPOINT = 3; + AREA_REDFLAG = 4; + AREA_BLUEFLAG = 5; + AREA_DOMFLAG = 6; + AREA_REDTEAMPOINT = 7; + AREA_BLUETEAMPOINT = 8; + + MONSTER_NONE = 0; + MONSTER_DEMON = 1; + MONSTER_IMP = 2; + MONSTER_ZOMBY = 3; + MONSTER_SERG = 4; + MONSTER_CYBER = 5; + MONSTER_CGUN = 6; + MONSTER_BARON = 7; + MONSTER_KNIGHT = 8; + MONSTER_CACO = 9; + MONSTER_SOUL = 10; + MONSTER_PAIN = 11; + MONSTER_SPIDER = 12; + MONSTER_BSP = 13; + MONSTER_MANCUB = 14; + MONSTER_SKEL = 15; + MONSTER_VILE = 16; + MONSTER_FISH = 17; + MONSTER_BARREL = 18; + MONSTER_ROBO = 19; + MONSTER_MAN = 20; + + TRIGGER_NONE = 0; + TRIGGER_EXIT = 1; + TRIGGER_TELEPORT = 2; + TRIGGER_OPENDOOR = 3; + TRIGGER_CLOSEDOOR = 4; + TRIGGER_DOOR = 5; + TRIGGER_DOOR5 = 6; + TRIGGER_CLOSETRAP = 7; + TRIGGER_TRAP = 8; + TRIGGER_PRESS = 9; + TRIGGER_SECRET = 10; + TRIGGER_LIFTUP = 11; + TRIGGER_LIFTDOWN = 12; + TRIGGER_LIFT = 13; + TRIGGER_TEXTURE = 14; + TRIGGER_ON = 15; + TRIGGER_OFF = 16; + TRIGGER_ONOFF = 17; + TRIGGER_SOUND = 18; + TRIGGER_SPAWNMONSTER = 19; + TRIGGER_SPAWNITEM = 20; + TRIGGER_MUSIC = 21; + TRIGGER_PUSH = 22; + TRIGGER_SCORE = 23; + TRIGGER_MESSAGE = 24; + TRIGGER_DAMAGE = 25; + TRIGGER_HEALTH = 26; + TRIGGER_SHOT = 27; + TRIGGER_EFFECT = 28; + TRIGGER_MAX = 28; + + TRIGGER_SHOT_PISTOL = 0; + TRIGGER_SHOT_BULLET = 1; + TRIGGER_SHOT_SHOTGUN = 2; + TRIGGER_SHOT_SSG = 3; + TRIGGER_SHOT_IMP = 4; + TRIGGER_SHOT_PLASMA = 5; + TRIGGER_SHOT_SPIDER = 6; + TRIGGER_SHOT_CACO = 7; + TRIGGER_SHOT_BARON = 8; + TRIGGER_SHOT_MANCUB = 9; + TRIGGER_SHOT_REV = 10; + TRIGGER_SHOT_ROCKET = 11; + TRIGGER_SHOT_BFG = 12; + TRIGGER_SHOT_EXPL = 13; + TRIGGER_SHOT_BFGEXPL = 14; + TRIGGER_SHOT_MAX = 14; + + TRIGGER_SHOT_TARGET_NONE = 0; + TRIGGER_SHOT_TARGET_MON = 1; + TRIGGER_SHOT_TARGET_PLR = 2; + TRIGGER_SHOT_TARGET_RED = 3; + TRIGGER_SHOT_TARGET_BLUE = 4; + TRIGGER_SHOT_TARGET_MONPLR = 5; + TRIGGER_SHOT_TARGET_PLRMON = 6; + + TRIGGER_EFFECT_PARTICLE = 0; + TRIGGER_EFFECT_ANIMATION = 1; + + TRIGGER_EFFECT_SLIQUID = 0; + TRIGGER_EFFECT_LLIQUID = 1; + TRIGGER_EFFECT_DLIQUID = 2; + TRIGGER_EFFECT_BLOOD = 3; + TRIGGER_EFFECT_SPARK = 4; + TRIGGER_EFFECT_BUBBLE = 5; + TRIGGER_EFFECT_MAX = 5; + + TRIGGER_EFFECT_POS_CENTER = 0; + TRIGGER_EFFECT_POS_AREA = 1; + + ACTIVATE_PLAYERCOLLIDE = 1; + ACTIVATE_MONSTERCOLLIDE = 2; + ACTIVATE_PLAYERPRESS = 4; + ACTIVATE_MONSTERPRESS = 8; + ACTIVATE_SHOT = 16; + ACTIVATE_NOMONSTER = 32; + ACTIVATE_CUSTOM = 255; + + KEY_RED = 1; + KEY_GREEN = 2; + KEY_BLUE = 4; + KEY_REDTEAM = 8; + KEY_BLUETEAM = 16; + + TEXTURE_NAME_WATER = '_water_0'; + TEXTURE_NAME_ACID1 = '_water_1'; + TEXTURE_NAME_ACID2 = '_water_2'; + + TEXTURE_SPECIAL_WATER = DWORD(-1); + TEXTURE_SPECIAL_ACID1 = DWORD(-2); + TEXTURE_SPECIAL_ACID2 = DWORD(-3); + TEXTURE_NONE = DWORD(-4); + +Type + TPoint = packed record + X, Y: LongInt; + end; + + TTriggerData = record + case Byte of + 0: (Default: Byte128); + TRIGGER_EXIT: (MapName: Char16); + TRIGGER_TELEPORT: (TargetPoint: TPoint; + d2d_teleport: Boolean; + silent_teleport: Boolean; + TlpDir: Byte); + TRIGGER_OPENDOOR, + TRIGGER_CLOSEDOOR, + TRIGGER_DOOR, + TRIGGER_DOOR5, + TRIGGER_CLOSETRAP, + TRIGGER_TRAP, + TRIGGER_LIFTUP, + TRIGGER_LIFTDOWN, + TRIGGER_LIFT: (PanelID: Integer; + NoSound: Boolean; + d2d_doors: Boolean); + TRIGGER_PRESS, + TRIGGER_ON, + TRIGGER_OFF, + TRIGGER_ONOFF: (tX, tY: Integer; + tWidth, tHeight: Word; + Wait: Word; + Count: Word; + MonsterID: Integer; + ExtRandom: Boolean); + TRIGGER_SECRET: (); + TRIGGER_TEXTURE: (ActivateOnce: Boolean; + AnimOnce: Boolean); + TRIGGER_SOUND: (SoundName: Char64; + Volume: Byte; + Pan: Byte; + Local: Boolean; + PlayCount: Byte; + SoundSwitch: Boolean); + TRIGGER_SPAWNMONSTER: (MonPos: TPoint; + MonType: Byte; + MonHealth: Integer; + MonDir: Byte; + MonActive: Boolean; + MonCount: Integer; + MonEffect: Byte; + MonMax: Word; + MonDelay: Word; + MonBehav: Byte); + TRIGGER_SPAWNITEM: (ItemPos: TPoint; + ItemType: Byte; + ItemFalls: Boolean; + ItemOnlyDM: Boolean; + ItemCount: Integer; + ItemEffect: Byte; + ItemMax: Word; + ItemDelay: Word); + TRIGGER_MUSIC: (MusicName: Char64; + MusicAction: Byte); + TRIGGER_PUSH: (PushAngle: Word; + PushForce: Byte; + ResetVel: Boolean); + TRIGGER_SCORE: (ScoreAction: Byte; + ScoreCount: Byte; + ScoreTeam: Byte; + ScoreCon, + ScoreMsg: Boolean); + TRIGGER_MESSAGE: (MessageKind: Byte; + MessageSendTo: Byte; + MessageText: Char100; + MessageTime: Word); + TRIGGER_DAMAGE: (DamageValue: Word; + DamageInterval: Word); + TRIGGER_HEALTH: (HealValue: Word; + HealInterval: Word; + HealMax: Boolean; + HealSilent: Boolean); + TRIGGER_SHOT: (ShotType: Byte; + ShotSound: Boolean; + ShotPanelID: Integer; + ShotTarget: Byte; + ShotIntSight: Word; + ShotAllMap: Boolean; + ShotPos: TPoint; + ShotAngle: Word; + ShotWait: Word; + ShotAccuracy: Word; + ShotAmmo: Word; + ShotIntReload: Word); + TRIGGER_EFFECT: (FXCount: Byte; + FXType: Byte; + FXSubType: Byte; + FXColorR: Byte; + FXColorG: Byte; + FXColorB: Byte; + FXPos: Byte; + FXWait: Word; + FXVelX: ShortInt; + FXVelY: ShortInt; + FXSpreadL: Byte; + FXSpreadR: Byte; + FXSpreadU: Byte; + FXSpreadD: Byte); + end; + +implementation + +end. diff --git a/src/shared/MAPREADER.pas b/src/shared/MAPREADER.pas new file mode 100644 index 0000000..736123e --- /dev/null +++ b/src/shared/MAPREADER.pas @@ -0,0 +1,394 @@ +unit MAPREADER; + +{$MODE Delphi} + +{ +----------------------------------- +MAPREADER.PAS ВЕРСИЯ ОТ 13.11.07 + +Поддержка карт версии 1 +----------------------------------- +} + +interface + +uses + MAPSTRUCT; + +type + TDataBlock = packed record + Block: TBlock; + Data: Pointer; + end; + + TDataBlocksArray = packed array of TDataBlock; + + TMapReader = class(TObject) + private + FError: Byte; + FVersion: Byte; + FDataBlocks: TDataBlocksArray; + function GetBlocks(BlocksType: Byte): TDataBlocksArray; + public + constructor Create(); + destructor Destroy(); override; + function LoadMap(Data: Pointer): Boolean; + procedure FreeMap(); + function HandledVersion(): Byte; virtual; + + property GetError: Byte read FError; + property GetVersion: Byte read FVersion; + end; + + TMapReader_1 = class(TMapReader) + private + public + function GetMapHeader(): TMapHeaderRec_1; + function GetTextures(): TTexturesRec1Array; + function GetPanels(): TPanelsRec1Array; + function GetItems(): TItemsRec1Array; + function GetAreas(): TAreasRec1Array; + function GetMonsters(): TMonsterRec1Array; + function GetTriggers(): TTriggersRec1Array; + function HandledVersion(): Byte; override; + end; + +const + MAP_ERROR_NONE = $00; + MAP_ERROR_SIGNATURE = $01; + MAP_ERROR_VERSION = $02; + + NNF_NO_NAME = 0; + NNF_NAME_BEFORE = 1; + NNF_NAME_EQUALS = 2; + NNF_NAME_AFTER = 3; + +function g_Texture_NumNameFindStart(name: String): Boolean; +function g_Texture_NumNameFindNext(var newName: String): Byte; + +implementation + +uses + SysUtils, BinEditor; + +var + NNF_PureName: String; // Имя текстуры без цифр в конце + NNF_FirstNum: Integer; // Число у начальной текстуры + NNF_CurrentNum: Integer; // Следующее число у текстуры + +function g_Texture_NumNameFindStart(name: String): Boolean; +var + i: Integer; + +begin + Result := False; + NNF_PureName := ''; + NNF_FirstNum := -1; + NNF_CurrentNum := -1; + + for i := Length(name) downto 1 do + if (name[i] = '_') then // "_" - символ начала номерного постфикса + begin + if i = Length(name) then + begin // Нет цифр в конце строки + Exit; + end + else + begin + NNF_PureName := Copy(name, 1, i); + Delete(name, 1, i); + Break; + end; + end; + +// Не перевести в число: + if not TryStrToInt(name, NNF_FirstNum) then + Exit; + + NNF_CurrentNum := 0; + + Result := True; +end; + +function g_Texture_NumNameFindNext(var newName: String): Byte; +begin + if (NNF_PureName = '') or (NNF_CurrentNum < 0) then + begin + newName := ''; + Result := NNF_NO_NAME; + Exit; + end; + + newName := NNF_PureName + IntToStr(NNF_CurrentNum); + + if NNF_CurrentNum < NNF_FirstNum then + Result := NNF_NAME_BEFORE + else + if NNF_CurrentNum > NNF_FirstNum then + Result := NNF_NAME_AFTER + else + Result := NNF_NAME_EQUALS; + + Inc(NNF_CurrentNum); +end; + +{ T M a p R e a d e r _ 1 : } + +function TMapReader_1.GetAreas(): TAreasRec1Array; +var + TempDataBlocks: TDataBlocksArray; + a: Integer; + b, Size: LongWord; +begin + Result := nil; + + TempDataBlocks := GetBlocks(BLOCK_AREAS); + + if TempDataBlocks = nil then Exit; + + size := SizeOf(TAreaRec_1); + + for a := 0 to High(TempDataBlocks) do + for b := 0 to (TempDataBlocks[a].Block.BlockSize div size)-1 do + begin + SetLength(Result, Length(Result)+1); + CopyMemory(@Result[High(Result)], Pointer(LongWord(TempDataBlocks[a].Data)+b*size), size); + end; + + TempDataBlocks := nil; +end; + +function TMapReader_1.GetItems(): TItemsRec1Array; +var + TempDataBlocks: TDataBlocksArray; + a: Integer; + b, Size: LongWord; +begin + Result := nil; + + TempDataBlocks := GetBlocks(BLOCK_ITEMS); + + if TempDataBlocks = nil then Exit; + + size := SizeOf(TItemRec_1); + + for a := 0 to High(TempDataBlocks) do + for b := 0 to (TempDataBlocks[a].Block.BlockSize div size)-1 do + begin + SetLength(Result, Length(Result)+1); + CopyMemory(@Result[High(Result)], Pointer(LongWord(TempDataBlocks[a].Data)+b*size), size); + end; + + TempDataBlocks := nil; +end; + +function TMapReader_1.GetMapHeader(): TMapHeaderRec_1; +var + TempDataBlocks: TDataBlocksArray; +begin + ZeroMemory(@Result, SizeOf(TMapHeaderRec_1)); + + TempDataBlocks := GetBlocks(BLOCK_HEADER); + + if TempDataBlocks = nil then Exit; + + CopyMemory(@Result, TempDataBlocks[0].Data, SizeOf(TMapHeaderRec_1)); + + TempDataBlocks := nil; +end; + +function TMapReader_1.GetMonsters(): TMonsterRec1Array; +var + TempDataBlocks: TDataBlocksArray; + a: Integer; + b, Size: LongWord; +begin + Result := nil; + + TempDataBlocks := GetBlocks(BLOCK_MONSTERS); + + if TempDataBlocks = nil then Exit; + + size := SizeOf(TMonsterRec_1); + + for a := 0 to High(TempDataBlocks) do + for b := 0 to (TempDataBlocks[a].Block.BlockSize div size)-1 do + begin + SetLength(Result, Length(Result)+1); + CopyMemory(@Result[High(Result)], Pointer(LongWord(TempDataBlocks[a].Data)+b*size), size); + end; + + TempDataBlocks := nil; +end; + +function TMapReader_1.GetPanels(): TPanelsRec1Array; +var + TempDataBlocks: TDataBlocksArray; + a: Integer; + b, Size: LongWord; +begin + Result := nil; + + TempDataBlocks := GetBlocks(BLOCK_PANELS); + + if TempDataBlocks = nil then Exit; + + size := SizeOf(TPanelRec_1); + + for a := 0 to High(TempDataBlocks) do + for b := 0 to (TempDataBlocks[a].Block.BlockSize div size)-1 do + begin + SetLength(Result, Length(Result)+1); + CopyMemory(@Result[High(Result)], Pointer(LongWord(TempDataBlocks[a].Data)+b*size), size); + end; + + TempDataBlocks := nil; +end; + +function TMapReader_1.GetTextures(): TTexturesRec1Array; +var + TempDataBlocks: TDataBlocksArray; + a: Integer; + b, Size: LongWord; +begin + Result := nil; + + TempDataBlocks := GetBlocks(BLOCK_TEXTURES); + + if TempDataBlocks = nil then Exit; + + size := SizeOf(TTextureRec_1); + + for a := 0 to High(TempDataBlocks) do + for b := 0 to (TempDataBlocks[a].Block.BlockSize div size)-1 do + begin + SetLength(Result, Length(Result)+1); + CopyMemory(@Result[High(Result)], Pointer(LongWord(TempDataBlocks[a].Data)+b*size), size); + end; + + TempDataBlocks := nil; +end; + +function TMapReader_1.GetTriggers(): TTriggersRec1Array; +var + TempDataBlocks: TDataBlocksArray; + a: Integer; + b, Size: LongWord; +begin + Result := nil; + + TempDataBlocks := GetBlocks(BLOCK_TRIGGERS); + + if TempDataBlocks = nil then Exit; + + size := SizeOf(TTriggerRec_1); + + for a := 0 to High(TempDataBlocks) do + for b := 0 to (TempDataBlocks[a].Block.BlockSize div size)-1 do + begin + SetLength(Result, Length(Result)+1); + CopyMemory(@Result[High(Result)], Pointer(LongWord(TempDataBlocks[a].Data)+b*size), size); + end; + + TempDataBlocks := nil; +end; + +function TMapReader_1.HandledVersion: Byte; +begin + Result := $01; +end; + +{ T M a p R e a d e r : } + +constructor TMapReader.Create(); +begin + FDataBlocks := nil; + FError := MAP_ERROR_NONE; + FVersion := $00; +end; + +destructor TMapReader.Destroy(); +begin + FreeMap(); + + inherited; +end; + +procedure TMapReader.FreeMap(); +var + a: Integer; +begin + if FDataBlocks <> nil then + for a := 0 to High(FDataBlocks) do + if FDataBlocks[a].Data <> nil then FreeMem(FDataBlocks[a].Data); + + FDataBlocks := nil; + FVersion := $00; + FError := MAP_ERROR_NONE; +end; + +function TMapReader.GetBlocks(BlocksType: Byte): TDataBlocksArray; +var + a: Integer; +begin + Result := nil; + + if FDataBlocks = nil then Exit; + + for a := 0 to High(FDataBlocks) do + if FDataBlocks[a].Block.BlockType = BlocksType then + begin + SetLength(Result, Length(Result)+1); + Result[High(Result)] := FDataBlocks[a]; + end; +end; + +function TMapReader.HandledVersion(): Byte; +begin + Result := $00; +end; + +function TMapReader.LoadMap(Data: Pointer): Boolean; +var + adr: LongWord; + _id: Integer; + Sign: array[0..2] of Char; + Ver: Byte; +begin + Result := False; + + CopyMemory(@Sign[0], Data, 3); + if Sign <> MAP_SIGNATURE then + begin + FError := MAP_ERROR_SIGNATURE; + Exit; + end; + adr := 3; + + CopyMemory(@Ver, Pointer(LongWord(Data)+adr), 1); + FVersion := Ver; + if Ver > HandledVersion() then + begin + FError := MAP_ERROR_VERSION; + Exit; + end; + adr := adr+1; + + repeat + SetLength(FDataBlocks, Length(FDataBlocks)+1); + _id := High(FDataBlocks); + + CopyMemory(@FDataBlocks[_id].Block, Pointer(LongWord(Data)+adr), SizeOf(TBlock)); + adr := adr+SizeOf(TBlock); + + FDataBlocks[_id].Data := GetMemory(FDataBlocks[_id].Block.BlockSize); + + CopyMemory(FDataBlocks[_id].Data, Pointer(LongWord(Data)+adr), FDataBlocks[_id].Block.BlockSize); + + adr := adr+FDataBlocks[_id].Block.BlockSize; + until FDataBlocks[_id].Block.BlockType = BLOCK_NONE; + + Result := True; +end; + +end. diff --git a/src/shared/MAPSTRUCT.pas b/src/shared/MAPSTRUCT.pas new file mode 100644 index 0000000..0456cf7 --- /dev/null +++ b/src/shared/MAPSTRUCT.pas @@ -0,0 +1,129 @@ +unit MAPSTRUCT; + +{$MODE Delphi} + +{ +----------------------------------- +MAPSTRUCT.PAS ВЕРСИЯ ОТ 13.11.07 + +Поддержка карт версии 1 +----------------------------------- +} + +{ + Карта представляет собою WAD, в котором ресурсы в корне - собственно сами карты + (MAP01, MAP02 и т.д.). + + Блоки заканчиваются нулевым блоком (BlockType=BLOCK_NONE) + + Структура карты (MAP01, MAP02...): + -------------------------------------- + SIGNATURE | Byte[3] | 'MAP' + VERSION | Byte | $01 + BLOCK1 | TBlock | + BLOCK1DATA | RAW | + ... | ...... | + BLOCKN | TBlock | + BLOCKNDATA | RAW | + -------------------------------------- + + Структура блока: + -------------------------------------- + BLOCKTYPE | Byte | (BLOCK_TEXTURES, BLOCK_PANELS,...) + RESERVED | LongWord | $00000000 + BLOCKSIZE | LongWord | Сколько этот блок в размере (байт после record'а) + -------------------------------------- +} + +interface + +const + MAP_SIGNATURE = 'MAP'; + BLOCK_NONE = 0; + BLOCK_TEXTURES = 1; + BLOCK_PANELS = 2; + BLOCK_ITEMS = 3; + BLOCK_AREAS = 4; + BLOCK_MONSTERS = 5; + BLOCK_TRIGGERS = 6; + BLOCK_HEADER = 7; + +type + Char16 = packed array[0..15] of Char; + Char32 = packed array[0..31] of Char; + Char64 = packed array[0..63] of Char; + Char100 = packed array[0..99] of Char; + Char256 = packed array[0..255] of Char; + Byte128 = packed array[0..127] of Byte; + + TMapHeaderRec_1 = packed record + MapName: Char32; + MapAuthor: Char32; + MapDescription: Char256; + MusicName: Char64; + SkyName: Char64; + Width: Word; + Height: Word; + end; + + TTextureRec_1 = packed record + Resource: Char64; + Anim: Byte; + end; + + TPanelRec_1 = packed record + X, Y: Integer; + Width, + Height: Word; + TextureNum: Word; + PanelType: Word; + Alpha: Byte; + Flags: Byte; + end; + + TItemRec_1 = packed record + X, Y: Integer; + ItemType: Byte; + Options: Byte; + end; + + TMonsterRec_1 = packed record + X, Y: Integer; + MonsterType: Byte; + Direction: Byte; + end; + + TAreaRec_1 = packed record + X, Y: Integer; + AreaType: Byte; + Direction: Byte; + end; + + TTriggerRec_1 = packed record + X, Y: Integer; + Width, + Height: Word; + Enabled: Byte; + TexturePanel: Integer; + TriggerType: Byte; + ActivateType: Byte; + Keys: Byte; + DATA: Byte128; + end; + + TBlock = packed record + BlockType: Byte; + Reserved: LongWord; + BlockSize: LongWord; + end; + + TTexturesRec1Array = array of TTextureRec_1; + TPanelsRec1Array = array of TPanelRec_1; + TItemsRec1Array = array of TItemRec_1; + TMonsterRec1Array = array of TMonsterRec_1; + TAreasRec1Array = array of TAreaRec_1; + TTriggersRec1Array = array of TTriggerRec_1; + +implementation + +end. diff --git a/src/shared/MAPWRITER.pas b/src/shared/MAPWRITER.pas new file mode 100644 index 0000000..0759931 --- /dev/null +++ b/src/shared/MAPWRITER.pas @@ -0,0 +1,325 @@ +unit MAPWRITER; + +{$MODE Delphi} + +{ +----------------------------------- +MAPWRITER.PAS ВЕРСИЯ ОТ 24.09.06 + +Поддержка карт версии 1 +----------------------------------- +} + +interface + +uses + MAPSTRUCT; + +type + TDataBlock = packed record + Block: TBlock; + Data: Pointer; + end; + + TDataBlocksArray = packed array of TDataBlock; + + TMapWriter = class(TObject) + private + FDataBlocks: TDataBlocksArray; + public + constructor Create(); + destructor Destroy(); override; + procedure FreeMap(); + function SaveMap(var Data: Pointer): LongWord; + function HandledVersion(): Byte; virtual; + end; + + TMapWriter_1 = class(TMapWriter) + public + function AddTextures(Textures: TTexturesRec1Array): Boolean; + function AddPanels(Panels: TPanelsRec1Array): Boolean; + function AddItems(Items: TItemsRec1Array): Boolean; + function AddMonsters(Monsters: TMonsterRec1Array): Boolean; + function AddAreas(Areas: TAreasRec1Array): Boolean; + function AddTriggers(Triggers: TTriggersRec1Array): Boolean; + function AddHeader(MapHeader: TMapHeaderRec_1): Boolean; + function HandledVersion(): Byte; override; + end; + + +implementation + +uses + BinEditor, SysUtils; + +{ TMapWriter } + +constructor TMapWriter.Create(); +begin + FDataBlocks := nil; +end; + +destructor TMapWriter.Destroy(); +begin + FreeMap(); + + inherited; +end; + +procedure TMapWriter.FreeMap(); +var + a: Integer; +begin + if FDataBlocks <> nil then + for a := 0 to High(FDataBlocks) do + if FDataBlocks[a].Data <> nil then FreeMem(FDataBlocks[a].Data); + + FDataBlocks := nil; +end; + +function TMapWriter.SaveMap(var Data: Pointer): LongWord; +var + a: Integer; + b, c: LongWord; + Sign: array[0..2] of Char; + Ver: Byte; +begin + b := 3+1+SizeOf(TBlock)*(Length(FDataBlocks)+1); + + if FDataBlocks <> nil then + for a := 0 to High(FDataBlocks) do + b := b+FDataBlocks[a].Block.BlockSize; + + Result := b; + + GetMem(Data, b); + + Sign := MAP_SIGNATURE; + CopyMemory(Data, @Sign[0], 3); + c := 3; + + Ver := HandledVersion(); + CopyMemory(Pointer(LongWord(Data)+c), @Ver, 1); + c := c+1; + + if FDataBlocks <> nil then + for a := 0 to High(FDataBlocks) do + begin + CopyMemory(Pointer(LongWord(Data)+c), @FDataBlocks[a].Block, SizeOf(TBlock)); + c := c+SizeOf(TBlock); + CopyMemory(Pointer(LongWord(Data)+c), FDataBlocks[a].Data, FDataBlocks[a].Block.BlockSize); + c := c+FDataBlocks[a].Block.BlockSize; + end; + + ZeroMemory(Pointer(LongWord(Data)+c), SizeOf(TBlock)); +end; + +function TMapWriter.HandledVersion(): Byte; +begin + Result := $00; +end; + +{ TMapWriter_1 } + +function TMapWriter_1.AddAreas(Areas: TAreasRec1Array): Boolean; +var + a, size: LongWord; +begin + if Areas = nil then + begin + Result := True; + Exit; + end; + + SetLength(FDataBlocks, Length(FDataBlocks)+1); + + size := SizeOf(TAreaRec_1); + + with FDataBlocks[High(FDataBlocks)] do + begin + Block.BlockType := BLOCK_AREAS; + Block.Reserved := $00000000; + Block.BlockSize := LongWord(Length(Areas))*size; + + Data := GetMemory(Block.BlockSize); + + for a := 0 to High(Areas) do + CopyMemory(Pointer(LongWord(Data)+a*Size), @Areas[a], size); + end; + + Result := True; +end; + +function TMapWriter_1.AddItems(Items: TItemsRec1Array): Boolean; +var + a, size: LongWord; +begin + if Items = nil then + begin + Result := True; + Exit; + end; + + SetLength(FDataBlocks, Length(FDataBlocks)+1); + + size := SizeOf(TItemRec_1); + + with FDataBlocks[High(FDataBlocks)] do + begin + Block.BlockType := BLOCK_ITEMS; + Block.Reserved := $00000000; + Block.BlockSize := LongWord(Length(Items))*size; + + Data := GetMemory(Block.BlockSize); + + for a := 0 to High(Items) do + CopyMemory(Pointer(LongWord(Data)+a*size), @Items[a], size); + end; + + Result := True; +end; + +function TMapWriter_1.AddMonsters(Monsters: TMonsterRec1Array): Boolean; +var + a, size: LongWord; +begin + if Monsters = nil then + begin + Result := True; + Exit; + end; + + SetLength(FDataBlocks, Length(FDataBlocks)+1); + + size := SizeOf(TMonsterRec_1); + + with FDataBlocks[High(FDataBlocks)] do + begin + Block.BlockType := BLOCK_MONSTERS; + Block.Reserved := $00000000; + Block.BlockSize := LongWord(Length(Monsters))*size; + + Data := GetMemory(Block.BlockSize); + + for a := 0 to High(Monsters) do + CopyMemory(Pointer(LongWord(Data)+a*Size), @Monsters[a], size); + end; + + Result := True; +end; + +function TMapWriter_1.AddPanels(Panels: TPanelsRec1Array): Boolean; +var + a, size: LongWord; +begin + if Panels = nil then + begin + Result := True; + Exit; + end; + + SetLength(FDataBlocks, Length(FDataBlocks)+1); + + size := SizeOf(TPanelRec_1); + + with FDataBlocks[High(FDataBlocks)] do + begin + Block.BlockType := BLOCK_PANELS; + Block.Reserved := $00000000; + Block.BlockSize := LongWord(Length(Panels))*size; + + Data := GetMemory(Block.BlockSize); + + for a := 0 to High(Panels) do + CopyMemory(Pointer(LongWord(Data)+a*size), @Panels[a], size); + end; + + Result := True; +end; + +function TMapWriter_1.AddTextures(Textures: TTexturesRec1Array): Boolean; +var + a, size: LongWord; +begin + if Textures = nil then + begin + Result := True; + Exit; + end; + + SetLength(FDataBlocks, Length(FDataBlocks)+1); + + size := SizeOf(TTextureRec_1); + + with FDataBlocks[High(FDataBlocks)] do + begin + Block.BlockType := BLOCK_TEXTURES; + Block.Reserved := $00000000; + Block.BlockSize := LongWord(Length(Textures))*size; + + Data := GetMemory(Block.BlockSize); + + for a := 0 to High(Textures) do + CopyMemory(Pointer(LongWord(Data)+a*size), @Textures[a], size); + end; + + Result := True; +end; + +function TMapWriter_1.AddTriggers(Triggers: TTriggersRec1Array): Boolean; +var + a, size: LongWord; +begin + if Triggers = nil then + begin + Result := True; + Exit; + end; + + SetLength(FDataBlocks, Length(FDataBlocks)+1); + + size := SizeOf(TTriggerRec_1); + + with FDataBlocks[High(FDataBlocks)] do + begin + Block.BlockType := BLOCK_TRIGGERS; + Block.Reserved := $00000000; + Block.BlockSize := LongWord(Length(Triggers))*size; + + Data := GetMemory(Block.BlockSize); + + for a := 0 to High(Triggers) do + CopyMemory(Pointer(LongWord(Data)+a*size), @Triggers[a], size); + end; + + Result := True; +end; + +function TMapWriter_1.AddHeader(MapHeader: TMapHeaderRec_1): Boolean; +var + size: LongWord; +begin + SetLength(FDataBlocks, Length(FDataBlocks)+1); + + size := SizeOf(TMapHeaderRec_1); + + with FDataBlocks[High(FDataBlocks)] do + begin + Block.BlockType := BLOCK_HEADER; + Block.Reserved := $00000000; + Block.BlockSize := size; + + Data := GetMemory(Block.BlockSize); + + CopyMemory(Pointer(LongWord(Data)), @MapHeader, size); + end; + + Result := True; +end; + +function TMapWriter_1.HandledVersion(): Byte; +begin + Result := $01; +end; + +end. diff --git a/src/shared/WADEDITOR.pas b/src/shared/WADEDITOR.pas new file mode 100644 index 0000000..b533664 --- /dev/null +++ b/src/shared/WADEDITOR.pas @@ -0,0 +1,881 @@ +unit WADEDITOR; + +{$MODE Delphi} + +{ +----------------------------------- +WADEDITOR.PAS ВЕРСИЯ ОТ 26.08.08 + +Поддержка вадов версии 1 +----------------------------------- +} + +interface + +uses WADSTRUCT; + +type + SArray = array of ShortString; + + TWADEditor_1 = class(TObject) + private + FResData: Pointer; + FResTable: packed array of TResourceTableRec_1; + FHeader: TWADHeaderRec_1; + FDataSize: LongWord; + FOffset: LongWord; + FFileName: string; + FWADOpened: Byte; + FLastError: Integer; + FVersion: Byte; + function LastErrorString(): string; + function GetResName(ResName: string): Char16; + public + constructor Create(); + destructor Destroy(); override; + procedure FreeWAD(); + function ReadFile(FileName: string): Boolean; + function ReadMemory(Data: Pointer; Len: LongWord): Boolean; + procedure CreateImage(); + function AddResource(Data: Pointer; Len: LongWord; Name: string; + Section: string): Boolean; overload; + function AddResource(FileName, Name, Section: string): Boolean; overload; + function AddAlias(Res, Alias: string): Boolean; + procedure AddSection(Name: string); + procedure RemoveResource(Section, Resource: string); + procedure SaveTo(FileName: string); + function HaveResource(Section, Resource: string): Boolean; + function HaveSection(Section: string): Boolean; + function GetResource(Section, Resource: string; var pData: Pointer; + var Len: Integer): Boolean; + function GetSectionList(): SArray; + function GetResourcesList(Section: string): SArray; + + property GetLastError: Integer read FLastError; + property GetLastErrorStr: string read LastErrorString; + property GetResourcesCount: Word read FHeader.RecordsCount; + property GetVersion: Byte read FVersion; + end; + +const + DFWAD_NOERROR = 0; + DFWAD_ERROR_WADNOTFOUND = -1; + DFWAD_ERROR_CANTOPENWAD = -2; + DFWAD_ERROR_RESOURCENOTFOUND = -3; + DFWAD_ERROR_FILENOTWAD = -4; + DFWAD_ERROR_WADNOTLOADED = -5; + DFWAD_ERROR_READRESOURCE = -6; + DFWAD_ERROR_READWAD = -7; + DFWAD_ERROR_WRONGVERSION = -8; + + + procedure g_ProcessResourceStr(ResourceStr: String; var FileName, + SectionName, ResourceName: String); overload; + procedure g_ProcessResourceStr(ResourceStr: String; FileName, + SectionName, ResourceName: PString); overload; + +implementation + +uses + SysUtils, BinEditor, ZLib; + +const + DFWAD_OPENED_NONE = 0; + DFWAD_OPENED_FILE = 1; + DFWAD_OPENED_MEMORY = 2; + +procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer; + OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer); +var + strm: TZStreamRec; + P: Pointer; + BufInc: Integer; +begin + FillChar(strm, sizeof(strm), 0); + BufInc := (InBytes + 255) and not 255; + if OutEstimate = 0 then + OutBytes := BufInc + else + OutBytes := OutEstimate; + GetMem(OutBuf, OutBytes); + try + strm.next_in := InBuf; + strm.avail_in := InBytes; + strm.next_out := OutBuf; + strm.avail_out := OutBytes; + inflateInit_(strm, zlib_version, sizeof(strm)); + try + while inflate(strm, Z_FINISH) <> Z_STREAM_END do + begin + P := OutBuf; + Inc(OutBytes, BufInc); + ReallocMem(OutBuf, OutBytes); + strm.next_out := PByteF(PChar(OutBuf) + (PChar(strm.next_out) - PChar(P))); + strm.avail_out := BufInc; + end; + finally + inflateEnd(strm); + end; + ReallocMem(OutBuf, strm.total_out); + OutBytes := strm.total_out; + except + FreeMem(OutBuf); + raise + end; +end; + +procedure g_ProcessResourceStr(ResourceStr: String; var FileName, + SectionName, ResourceName: String); +var + a, i: Integer; + +begin + for i := Length(ResourceStr) downto 1 do + if ResourceStr[i] = ':' then + Break; + + FileName := Copy(ResourceStr, 1, i-1); + + for a := i+1 to Length(ResourceStr) do + if (ResourceStr[a] = '\') or (ResourceStr[a] = '/') then Break; + + ResourceName := Copy(ResourceStr, a+1, Length(ResourceStr)-Abs(a)); + SectionName := Copy(ResourceStr, i+1, Length(ResourceStr)-Length(ResourceName)-Length(FileName)-2); +end; + +procedure g_ProcessResourceStr(ResourceStr: AnsiString; FileName, + SectionName, ResourceName: PAnsiString); +var + a, i, l1, l2: Integer; + +begin + for i := Length(ResourceStr) downto 1 do + if ResourceStr[i] = ':' then + Break; + + if FileName <> nil then + begin + FileName^ := Copy(ResourceStr, 1, i-1); + l1 := Length(FileName^); + end + else + l1 := 0; + + for a := i+1 to Length(ResourceStr) do + if (ResourceStr[a] = '\') or (ResourceStr[a] = '/') then Break; + + if ResourceName <> nil then + begin + ResourceName^ := Copy(ResourceStr, a+1, Length(ResourceStr)-Abs(a)); + l2 := Length(ResourceName^); + end + else + l2 := 0; + + if SectionName <> nil then + SectionName^ := Copy(ResourceStr, i+1, Length(ResourceStr)-l2-l1-2); +end; + +{ TWADEditor_1 } + +function TWADEditor_1.AddResource(Data: Pointer; Len: LongWord; Name: string; + Section: string): Boolean; +var + ResCompressed: Pointer; + ResCompressedSize: Integer; + a, b: Integer; +begin + Result := False; + + SetLength(FResTable, Length(FResTable)+1); + + if Section = '' then + begin + if Length(FResTable) > 1 then + for a := High(FResTable) downto 1 do + FResTable[a] := FResTable[a-1]; + + a := 0; + end + else + begin + Section := AnsiUpperCase(Section); + b := -1; + + for a := 0 to High(FResTable) do + if (FResTable[a].Length = 0) and (FResTable[a].ResourceName = Section) then + begin + for b := High(FResTable) downto a+2 do + FResTable[b] := FResTable[b-1]; + + b := a+1; + Break; + end; + + if b = -1 then + begin + SetLength(FResTable, Length(FResTable)-1); + Exit; + end; + a := b; + end; + + ResCompressed := nil; + ResCompressedSize := 0; + Compress(Data, @Len, ResCompressed, ResCompressedSize); + if ResCompressed = nil then Exit; + + if FResData = nil then FResData := AllocMem(ResCompressedSize) + else ReallocMem(FResData, FDataSize+Cardinal(ResCompressedSize)); + + FDataSize := FDataSize+LongWord(ResCompressedSize); + + CopyMemory(Pointer(PChar(FResData)+FDataSize-PChar(ResCompressedSize)), + ResCompressed, ResCompressedSize); + FreeMemory(ResCompressed); + + Inc(FHeader.RecordsCount); + + with FResTable[a] do + begin + ResourceName := GetResName(Name); + Address := FOffset; + Length := ResCompressedSize; + end; + + FOffset := FOffset+Cardinal(ResCompressedSize); + + Result := True; +end; + +function TWADEditor_1.AddAlias(Res, Alias: string): Boolean; +var + a, b: Integer; + ares: Char16; +begin + Result := False; + + if FResTable = nil then Exit; + + b := -1; + ares := GetResName(Alias); + for a := 0 to High(FResTable) do + if FResTable[a].ResourceName = Res then + begin + b := a; + Break; + end; + + if b = -1 then Exit; + + Inc(FHeader.RecordsCount); + + SetLength(FResTable, Length(FResTable)+1); + + with FResTable[High(FResTable)] do + begin + ResourceName := ares; + Address := FResTable[b].Address; + Length := FResTable[b].Length; + end; + + Result := True; +end; + +function TWADEditor_1.AddResource(FileName, Name, Section: string): Boolean; +var + ResCompressed: Pointer; + ResCompressedSize: Integer; + ResourceFile: File; + TempResource: Pointer; + OriginalSize: Integer; + a, b: Integer; +begin + Result := False; + + AssignFile(ResourceFile, FileName); + + try + Reset(ResourceFile, 1); + except + FLastError := DFWAD_ERROR_CANTOPENWAD; + Exit; + end; + + OriginalSize := FileSize(ResourceFile); + GetMem(TempResource, OriginalSize); + + try + BlockRead(ResourceFile, TempResource^, OriginalSize); + except + FLastError := DFWAD_ERROR_READWAD; + FreeMemory(TempResource); + CloseFile(ResourceFile); + Exit; + end; + + CloseFile(ResourceFile); + + ResCompressed := nil; + ResCompressedSize := 0; + Compress(TempResource, @OriginalSize, ResCompressed, ResCompressedSize); + FreeMemory(TempResource); + if ResCompressed = nil then Exit; + + SetLength(FResTable, Length(FResTable)+1); + + if Section = '' then + begin + if Length(FResTable) > 1 then + for a := High(FResTable) downto 1 do + FResTable[a] := FResTable[a-1]; + + a := 0; + end + else + begin + Section := AnsiUpperCase(Section); + b := -1; + + for a := 0 to High(FResTable) do + if (FResTable[a].Length = 0) and (FResTable[a].ResourceName = Section) then + begin + for b := High(FResTable) downto a+2 do + FResTable[b] := FResTable[b-1]; + + b := a+1; + Break; + end; + + if b = -1 then + begin + FreeMemory(ResCompressed); + SetLength(FResTable, Length(FResTable)-1); + Exit; + end; + + a := b; + end; + + if FResData = nil then FResData := AllocMem(ResCompressedSize) + else ReallocMem(FResData, FDataSize+Cardinal(ResCompressedSize)); + + FDataSize := FDataSize+LongWord(ResCompressedSize); + CopyMemory(Pointer(PChar(FResData)+FDataSize-PChar(ResCompressedSize)), + ResCompressed, ResCompressedSize); + FreeMemory(ResCompressed); + + Inc(FHeader.RecordsCount); + + with FResTable[a] do + begin + ResourceName := GetResName(Name); + Address := FOffset; + Length := ResCompressedSize; + end; + + FOffset := FOffset+Cardinal(ResCompressedSize); + + Result := True; +end; + +procedure TWADEditor_1.AddSection(Name: string); +begin + if Name = '' then Exit; + + Inc(FHeader.RecordsCount); + + SetLength(FResTable, Length(FResTable)+1); + with FResTable[High(FResTable)] do + begin + ResourceName := GetResName(Name); + Address := $00000000; + Length := $00000000; + end; +end; + +constructor TWADEditor_1.Create(); +begin + FResData := nil; + FResTable := nil; + FDataSize := 0; + FOffset := 0; + FHeader.RecordsCount := 0; + FFileName := ''; + FWADOpened := DFWAD_OPENED_NONE; + FLastError := DFWAD_NOERROR; + FVersion := DFWAD_VERSION; +end; + +procedure TWADEditor_1.CreateImage(); +var + WADFile: File; + b: LongWord; +begin + if FWADOpened = DFWAD_OPENED_NONE then + begin + FLastError := DFWAD_ERROR_WADNOTLOADED; + Exit; + end; + + if FWADOpened = DFWAD_OPENED_MEMORY then Exit; + + if FResData <> nil then FreeMem(FResData); + + try + AssignFile(WADFile, FFileName); + Reset(WADFile, 1); + + b := 6+SizeOf(TWADHeaderRec_1)+SizeOf(TResourceTableRec_1)*Length(FResTable); + + FDataSize := LongWord(FileSize(WADFile))-b; + + GetMem(FResData, FDataSize); + + Seek(WADFile, b); + BlockRead(WADFile, FResData^, FDataSize); + + CloseFile(WADFile); + + FOffset := FDataSize; + except + FLastError := DFWAD_ERROR_CANTOPENWAD; + CloseFile(WADFile); + Exit; + end; + + FLastError := DFWAD_NOERROR; +end; + +destructor TWADEditor_1.Destroy(); +begin + FreeWAD(); + + inherited; +end; + +procedure TWADEditor_1.FreeWAD(); +begin + if FResData <> nil then FreeMem(FResData); + FResTable := nil; + FDataSize := 0; + FOffset := 0; + FHeader.RecordsCount := 0; + FFileName := ''; + FWADOpened := DFWAD_OPENED_NONE; + FLastError := DFWAD_NOERROR; + FVersion := DFWAD_VERSION; +end; + +function TWADEditor_1.GetResName(ResName: string): Char16; +begin + ZeroMemory(@Result[0], 16); + if ResName = '' then Exit; + + ResName := Trim(UpperCase(ResName)); + if Length(ResName) > 16 then SetLength(ResName, 16); + + CopyMemory(@Result[0], @ResName[1], Length(ResName)); +end; + +function TWADEditor_1.HaveResource(Section, Resource: string): Boolean; +var + a: Integer; + CurrentSection: string; +begin + Result := False; + + if FResTable = nil then Exit; + + CurrentSection := ''; + Section := AnsiUpperCase(Section); + Resource := AnsiUpperCase(Resource); + + for a := 0 to High(FResTable) do + begin + if FResTable[a].Length = 0 then + begin + CurrentSection := FResTable[a].ResourceName; + Continue; + end; + + if (FResTable[a].ResourceName = Resource) and + (CurrentSection = Section) then + begin + Result := True; + Break; + end; + end; +end; + +function TWADEditor_1.HaveSection(Section: string): Boolean; +var + a: Integer; +begin + Result := False; + + if FResTable = nil then Exit; + if Section = '' then + begin + Result := True; + Exit; + end; + + Section := AnsiUpperCase(Section); + + for a := 0 to High(FResTable) do + if (FResTable[a].Length = 0) and (FResTable[a].ResourceName = Section) then + begin + Result := True; + Exit; + end; +end; + +function TWADEditor_1.GetResource(Section, Resource: string; + var pData: Pointer; var Len: Integer): Boolean; +var + a: LongWord; + i: Integer; + WADFile: File; + CurrentSection: string; + TempData: Pointer; + OutBytes: Integer; +begin + Result := False; + + CurrentSection := ''; + + if FWADOpened = DFWAD_OPENED_NONE then + begin + FLastError := DFWAD_ERROR_WADNOTLOADED; + Exit; + end; + + Section := UpperCase(Section); + Resource := UpperCase(Resource); + + i := -1; + for a := 0 to High(FResTable) do + begin + if FResTable[a].Length = 0 then + begin + CurrentSection := FResTable[a].ResourceName; + Continue; + end; + + if (FResTable[a].ResourceName = Resource) and + (CurrentSection = Section) then + begin + i := a; + Break; + end; + end; + + if i = -1 then + begin + FLastError := DFWAD_ERROR_RESOURCENOTFOUND; + Exit; + end; + + if FWADOpened = DFWAD_OPENED_FILE then + begin + try + AssignFile(WADFile, FFileName); + Reset(WADFile, 1); + + Seek(WADFile, FResTable[i].Address+6+ + LongWord(SizeOf(TWADHeaderRec_1)+SizeOf(TResourceTableRec_1)*Length(FResTable))); + TempData := GetMemory(FResTable[i].Length); + BlockRead(WADFile, TempData^, FResTable[i].Length); + DecompressBuf(TempData, FResTable[i].Length, 0, pData, OutBytes); + FreeMem(TempData); + + Len := OutBytes; + + CloseFile(WADFile); + except + FLastError := DFWAD_ERROR_CANTOPENWAD; + CloseFile(WADFile); + Exit; + end; + end + else + begin + TempData := GetMemory(FResTable[i].Length); + CopyMemory(TempData, Pointer(LongWord(FResData)+FResTable[i].Address+6+ + LongWord(SizeOf(TWADHeaderRec_1)+SizeOf(TResourceTableRec_1)*Length(FResTable))), + FResTable[i].Length); + DecompressBuf(TempData, FResTable[i].Length, 0, pData, OutBytes); + FreeMem(TempData); + + Len := OutBytes; + end; + + FLastError := DFWAD_NOERROR; + Result := True; +end; + +function TWADEditor_1.GetResourcesList(Section: string): SArray; +var + a: Integer; + CurrentSection: Char16; +begin + Result := nil; + + if FResTable = nil then Exit; + if Length(Section) > 16 then Exit; + + CurrentSection := ''; + + for a := 0 to High(FResTable) do + begin + if FResTable[a].Length = 0 then + begin + CurrentSection := FResTable[a].ResourceName; + Continue; + end; + + if CurrentSection = Section then + begin + SetLength(Result, Length(Result)+1); + Result[High(Result)] := FResTable[a].ResourceName; + end; + end; +end; + +function TWADEditor_1.GetSectionList(): SArray; +var + i: DWORD; +begin + Result := nil; + + if FResTable = nil then Exit; + + if FResTable[0].Length <> 0 then + begin + SetLength(Result, 1); + Result[0] := ''; + end; + + for i := 0 to High(FResTable) do + if FResTable[i].Length = 0 then + begin + SetLength(Result, Length(Result)+1); + Result[High(Result)] := FResTable[i].ResourceName; + end; +end; + +function TWADEditor_1.LastErrorString(): string; +begin + case FLastError of + DFWAD_NOERROR: Result := ''; + DFWAD_ERROR_WADNOTFOUND: Result := 'DFWAD file not found'; + DFWAD_ERROR_CANTOPENWAD: Result := 'Can''t open DFWAD file'; + DFWAD_ERROR_RESOURCENOTFOUND: Result := 'Resource not found'; + DFWAD_ERROR_FILENOTWAD: Result := 'File is not DFWAD'; + DFWAD_ERROR_WADNOTLOADED: Result := 'DFWAD file is not loaded'; + DFWAD_ERROR_READRESOURCE: Result := 'Read resource error'; + DFWAD_ERROR_READWAD: Result := 'Read DFWAD error'; + end; +end; + +function TWADEditor_1.ReadFile(FileName: string): Boolean; +var + WADFile: File; + Signature: array[0..4] of Char; + a: Integer; +begin + FreeWAD(); + + Result := False; + + if not FileExists(FileName) then + begin + FLastError := DFWAD_ERROR_WADNOTFOUND; + Exit; + end; + + FFileName := FileName; + + AssignFile(WADFile, FFileName); + + try + Reset(WADFile, 1); + except + FLastError := DFWAD_ERROR_CANTOPENWAD; + Exit; + end; + + try + BlockRead(WADFile, Signature, 5); + if Signature <> DFWAD_SIGNATURE then + begin + FLastError := DFWAD_ERROR_FILENOTWAD; + CloseFile(WADFile); + Exit; + end; + + BlockRead(WADFile, FVersion, 1); + if FVersion <> DFWAD_VERSION then + begin + FLastError := DFWAD_ERROR_WRONGVERSION; + CloseFile(WADFile); + Exit; + end; + + BlockRead(WADFile, FHeader, SizeOf(TWADHeaderRec_1)); + SetLength(FResTable, FHeader.RecordsCount); + if FResTable <> nil then + begin + BlockRead(WADFile, FResTable[0], SizeOf(TResourceTableRec_1)*FHeader.RecordsCount); + + for a := 0 to High(FResTable) do + if FResTable[a].Length <> 0 then + FResTable[a].Address := FResTable[a].Address-6-(LongWord(SizeOf(TWADHeaderRec_1)+ + SizeOf(TResourceTableRec_1)*Length(FResTable))); + end; + + CloseFile(WADFile); + except + FLastError := DFWAD_ERROR_READWAD; + CloseFile(WADFile); + Exit; + end; + + FWADOpened := DFWAD_OPENED_FILE; + FLastError := DFWAD_NOERROR; + Result := True; +end; + +function TWADEditor_1.ReadMemory(Data: Pointer; Len: LongWord): Boolean; +var + Signature: array[0..4] of Char; + a: Integer; +begin + FreeWAD(); + + Result := False; + + CopyMemory(@Signature[0], Data, 5); + if Signature <> DFWAD_SIGNATURE then + begin + FLastError := DFWAD_ERROR_FILENOTWAD; + Exit; + end; + + CopyMemory(@FVersion, Pointer(LongWord(Data)+5), 1); + if FVersion <> DFWAD_VERSION then + begin + FLastError := DFWAD_ERROR_WRONGVERSION; + Exit; + end; + + CopyMemory(@FHeader, Pointer(LongWord(Data)+6), SizeOf(TWADHeaderRec_1)); + + SetLength(FResTable, FHeader.RecordsCount); + if FResTable <> nil then + begin + CopyMemory(@FResTable[0], Pointer(LongWord(Data)+6+SizeOf(TWADHeaderRec_1)), + SizeOf(TResourceTableRec_1)*FHeader.RecordsCount); + + for a := 0 to High(FResTable) do + if FResTable[a].Length <> 0 then + FResTable[a].Address := FResTable[a].Address-6-(LongWord(SizeOf(TWADHeaderRec_1)+ + SizeOf(TResourceTableRec_1)*Length(FResTable))); + end; + + GetMem(FResData, Len); + CopyMemory(FResData, Data, Len); + + FWADOpened := DFWAD_OPENED_MEMORY; + FLastError := DFWAD_NOERROR; + + Result := True; +end; + +procedure TWADEditor_1.RemoveResource(Section, Resource: string); +var + a, i: Integer; + CurrentSection: Char16; + b, c, d: LongWord; +begin + if FResTable = nil then Exit; + + i := -1; + b := 0; + c := 0; + CurrentSection := ''; + + for a := 0 to High(FResTable) do + begin + if FResTable[a].Length = 0 then + begin + CurrentSection := FResTable[a].ResourceName; + Continue; + end; + + if (FResTable[a].ResourceName = Resource) and + (CurrentSection = Section) then + begin + i := a; + b := FResTable[a].Length; + c := FResTable[a].Address; + Break; + end; + end; + + if i = -1 then Exit; + + for a := i to High(FResTable)-1 do + FResTable[a] := FResTable[a+1]; + + SetLength(FResTable, Length(FResTable)-1); + + d := 0; + for a := 0 to High(FResTable) do + if (FResTable[a].Length <> 0) and (FResTable[a].Address > c) then + begin + FResTable[a].Address := FResTable[a].Address-b; + d := d+FResTable[a].Length; + end; + + CopyMemory(Pointer(LongWord(FResData)+c), Pointer(LongWord(FResData)+c+b), d); + + FDataSize := FDataSize-b; + FOffset := FOffset-b; + ReallocMem(FResData, FDataSize); + + FHeader.RecordsCount := FHeader.RecordsCount-1; +end; + +procedure TWADEditor_1.SaveTo(FileName: string); +var + WADFile: File; + sign: string; + ver: Byte; + Header: TWADHeaderRec_1; + i: Integer; +begin + sign := DFWAD_SIGNATURE; + ver := DFWAD_VERSION; + + Header.RecordsCount := Length(FResTable); + + if FResTable <> nil then + for i := 0 to High(FResTable) do + if FResTable[i].Length <> 0 then + FResTable[i].Address := FResTable[i].Address+6+SizeOf(TWADHeaderRec_1)+ + SizeOf(TResourceTableRec_1)*Header.RecordsCount; + + AssignFile(WADFile, FileName); + Rewrite(WADFile, 1); + BlockWrite(WADFile, sign[1], 5); + BlockWrite(WADFile, ver, 1); + BlockWrite(WADFile, Header, SizeOf(TWADHeaderRec_1)); + if FResTable <> nil then BlockWrite(WADFile, FResTable[0], + SizeOf(TResourceTableRec_1)*Header.RecordsCount); + if FResData <> nil then BlockWrite(WADFile, FResData^, FDataSize); + CloseFile(WADFile); +end; + +end. diff --git a/src/shared/WADSTRUCT.pas b/src/shared/WADSTRUCT.pas new file mode 100644 index 0000000..9e2fd06 --- /dev/null +++ b/src/shared/WADSTRUCT.pas @@ -0,0 +1,45 @@ +unit WADSTRUCT; + +{$MODE Delphi} + +{ +----------------------------------- +WADSTRUCT.PAS ВЕРСИЯ ОТ 24.09.06 + +Поддержка вадов версии 1 +----------------------------------- + +Структура DFWAD-файла версии 1: + ------------------------------------------ + SIGNATURE | Byte[5] | 'DFWAD' + VERSION | Byte | $01 + HEADER | TWADHeaderRec_1 | + RESRECORD1 | TResourceTableRec_1 | + ... | ................... | + RESRECORDN | TResourceTableRec_1 | + DATA | RAW | + ------------------------------------------ +} + +interface + +type + Char16 = packed array[0..15] of Char; + + TWADHeaderRec_1 = packed record + RecordsCount: Word; + end; + + TResourceTableRec_1 = packed record + ResourceName: Char16; + Address: LongWord; + Length: LongWord; + end; + +const + DFWAD_SIGNATURE = 'DFWAD'; + DFWAD_VERSION = $01; + +implementation + +end. diff --git a/src/shared/codepage.pas b/src/shared/codepage.pas new file mode 100644 index 0000000..60ea1a7 --- /dev/null +++ b/src/shared/codepage.pas @@ -0,0 +1,32 @@ +unit codepage; + +interface + +implementation + +uses windows; + +function ConOutFunc(var Text: TTextRec): Integer; +var + a: LongWord; + _pos: Integer; +begin + Result := 0; + + _pos := Text.BufPos; + + if _pos <= 0 then Exit; + + Text.BufPos := 0; + CharToOemBuff(Text.BufPtr, Text.BufPtr, _pos); + if not WriteFile(Text.Handle, Text.BufPtr^, _pos, a, nil) then + Result := GetLastError; +end; + +initialization + +Rewrite(Output); +TTextRec(Output).InOutFunc := @ConOutFunc; +TTextRec(Output).FlushFunc := @ConOutFunc; + +end. diff --git a/src/shared/console.pas b/src/shared/console.pas new file mode 100644 index 0000000..e610220 --- /dev/null +++ b/src/shared/console.pas @@ -0,0 +1,60 @@ +unit console; + +interface + +procedure print(Text: string); + +implementation + +uses + windows; + +procedure print(Text: string); +var + a, len: Integer; + attr: Word; + h: LongWord; +begin + h := GetStdHandle(STD_OUTPUT_HANDLE); + + attr := FOREGROUND_RED or FOREGROUND_GREEN or FOREGROUND_BLUE; + SetConsoleTextAttribute(h, attr); + + len := Length(Text); + + for a := 1 to len do + begin + if Text[a] = '^' then Continue; + if Byte(Text[a]) = 7 then Continue; + + if (a = 1) or (Text[a-1] <> '^') then + begin + write(Text[a]); + Continue; + end; + + if a < len then + begin + case Text[a] of + '1': attr := FOREGROUND_RED; + '2': attr := FOREGROUND_GREEN; + '3': attr := FOREGROUND_BLUE; + '4': attr := FOREGROUND_BLUE or FOREGROUND_RED; + '5': attr := FOREGROUND_GREEN or FOREGROUND_RED; + '6': attr := FOREGROUND_BLUE or FOREGROUND_GREEN; + '7': attr := FOREGROUND_BLUE or FOREGROUND_GREEN or FOREGROUND_RED; + else Continue; + end; + + if (a > 2) and (Text[a-2] = '^') then attr := attr or FOREGROUND_INTENSITY; + + SetConsoleTextAttribute(h, attr) + end; + end; + + WriteLn; + + SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED or FOREGROUND_GREEN or FOREGROUND_BLUE); +end; + +end. -- 2.29.2