├── .hgignore ├── .hgtags ├── LICENSE ├── README.md ├── build_static.py ├── demo ├── ImGuiDemo.lpi ├── ImGuiDemo.lpr ├── display.pas ├── glad_gl.pas ├── imgui_extra.pas ├── sdl2-LICENSE ├── sdl2.pas └── testwindow.pas ├── examples └── fpimgui_impl_sdlgl2.pas └── fpimgui.pas /.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | *.exe 3 | *.o 4 | *.ppu 5 | *.a 6 | *.dll 7 | *.compiled 8 | *.lps 9 | *.s 10 | *.res 11 | *.bat 12 | *.bak 13 | *.obj 14 | *.hob 15 | *.hmt 16 | *.HOB 17 | *.HMT 18 | *_HOB 19 | *_HMT 20 | *.text 21 | *.tex 22 | *.pgm 23 | *.png 24 | *.pnm 25 | *.tga 26 | *.raw 27 | *.dat 28 | *.hdr 29 | *.DAT 30 | *.HDR 31 | imgui.ini 32 | .idea -------------------------------------------------------------------------------- /.hgtags: -------------------------------------------------------------------------------- 1 | 641b7038f5ed4fe8a40fd16a92740e7410f1b452 1.50 2 | 89bb57338c4ec9f91d3145f3b3bea042c028c7e9 1.53 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 David Pethes 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # imgui-pas 1.53 2 | Pascal bindings for dear imgui (AKA ImGui) 3 | https://github.com/ocornut/imgui 4 | > ImGui is a bloat-free graphical user interface library for C++. It outputs vertex buffers that you can render in your 3D-pipeline enabled application. It is portable, renderer agnostic and self-contained (no external dependencies). It is based on an "immediate mode" graphical user interface paradigm which enables you to build user interfaces with ease. 5 | 6 | ## Building 7 | Builds with Freepascal 3.0.0 and later, other compilers are untested (it should support 2.6.0 and higher though). 8 | Both 32 and 64bit builds work. 9 | 10 | ## Usage 11 | These bindings wrap the C functions exported from cimgui library, so you need a recent cimgui build to use them. The current version is based on ImGui 1.53. Windows 32/64bit builds of cimgui are included in releases. 12 | 13 | Copy sources and cimgui binary to your project folder. See the examples for how to integrate it with your rendering pipeline and the "getting started" section in imgui.cpp. 14 | There's also a very basic demo program that draws some ImGui windows in a SDL2 window with OpenGL context. 15 | It includes pre-build versions of cimgui, if you don't want to build it on your own. 16 | 17 | ## Issues/Todo 18 | * translate more structs, enums 19 | * translate most of ImGui::ShowTestWindow() function 20 | * re-add default parameter values from imgui.h 21 | * add class wrappers around IO/FontAtlas and such to make it more convenient to use / better match original C++ versions 22 | * function address parameters are ignored for now 23 | * added types for fixed size array parameters - should be replaced with pointers? 24 | * no tests on linux/macOS yet 25 | 26 | Other: 27 | * va_args functions are ignored, use native Format() instead 28 | 29 | ## See Also 30 | 31 | https://github.com/Extrawurst/cimgui 32 | > This is a thin c-api wrapper for the excellent C++ intermediate gui imgui. This library is intended as a intermediate layer to be able to use imgui from other languages that can interface with C . 33 | 34 | https://github.com/mellinoe/ImGui.NET 35 | > An ImGui wrapper for .NET Core. -------------------------------------------------------------------------------- /build_static.py: -------------------------------------------------------------------------------- 1 | # Static ImGui class method declaration/definition generator. 2 | # Uses external function list as input 3 | # for example: function igGetIdStr(str_id: PChar): ImGuiID; cdecl; external ImguiLibName; 4 | f = open('funclist.pas', 'r') 5 | methodDeclList = [] 6 | methodDefList = [] 7 | for line in f: 8 | line = line.rstrip('\n ') 9 | if (len(line) < 10) or (line[:2] == '//') or (line[:1] == '{'): 10 | methodDeclList.append(line) 11 | methodDefList.append(line) 12 | continue 13 | line = line.replace(' cdecl; external ImguiLibName;', '') #remove specs 14 | prefix = 'class ' 15 | isFunction = line.startswith('function') 16 | if isFunction: 17 | line = line.replace('function ig', '') 18 | prefix += 'function' 19 | else: 20 | line = line.replace('procedure ig', '') 21 | prefix += 'procedure' 22 | 23 | newDecl = prefix + ' ' 24 | if isFunction: 25 | newDecl += ' ' #indent by one more space for vertical align 26 | newDecl += line + ' inline;' 27 | newDef = prefix + ' ImGui.' + line 28 | 29 | if '(' in line: 30 | #has params 31 | procname = line.partition('(')[0] 32 | else: 33 | procname = line.partition(';')[0] 34 | if isFunction: 35 | procname = line.partition(':')[0] 36 | 37 | paramlist = line.replace(procname, '') 38 | bodyParamList = '' 39 | if len(paramlist) > 2: 40 | if isFunction: 41 | listend = paramlist.find(')') 42 | paramlist = paramlist[:listend] 43 | if not '(' in paramlist: 44 | listend = paramlist.find(':') 45 | paramlist = paramlist[:listend] 46 | 47 | paramlist = paramlist.rstrip('); ').lstrip('(') 48 | paramDeclList = paramlist.split('; ') #drops return value in functions too 49 | #print(paramDeclList) 50 | for par in paramDeclList: 51 | par = par.split(':')[0]; 52 | if len(bodyParamList) > 0: 53 | bodyParamList += ', ' 54 | bodyParamList += par; 55 | 56 | 57 | #function body 58 | body = ' begin ' 59 | if isFunction: 60 | body += 'result := ' 61 | body += 'ig' + procname 62 | if len(paramlist) > 2: 63 | body += '(' + bodyParamList + ')' 64 | body += ' end;' 65 | 66 | #debug output 67 | #print(line) 68 | #print(newDecl) 69 | #print(newDef) 70 | #print(body) 71 | 72 | methodDeclList.append(newDecl) 73 | methodDefList.append(newDef) 74 | methodDefList.append(body) 75 | 76 | for s in methodDeclList: 77 | print(s) 78 | for s in methodDefList: 79 | print(s) 80 | -------------------------------------------------------------------------------- /demo/ImGuiDemo.lpi: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | <UseAppBundle Value="False"/> 15 | <ResourceType Value="res"/> 16 | </General> 17 | <BuildModes Count="1"> 18 | <Item1 Name="Default" Default="True"/> 19 | </BuildModes> 20 | <PublishOptions> 21 | <Version Value="2"/> 22 | </PublishOptions> 23 | <RunParams> 24 | <local> 25 | <FormatVersion Value="1"/> 26 | </local> 27 | </RunParams> 28 | <Units Count="8"> 29 | <Unit0> 30 | <Filename Value="ImGuiDemo.lpr"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | <Unit1> 34 | <Filename Value="display.pas"/> 35 | <IsPartOfProject Value="True"/> 36 | </Unit1> 37 | <Unit2> 38 | <Filename Value="sdl2.pas"/> 39 | <IsPartOfProject Value="True"/> 40 | <UnitName Value="SDL2"/> 41 | </Unit2> 42 | <Unit3> 43 | <Filename Value="..\fpimgui.pas"/> 44 | <IsPartOfProject Value="True"/> 45 | </Unit3> 46 | <Unit4> 47 | <Filename Value="..\examples\fpimgui_impl_sdlgl2.pas"/> 48 | <IsPartOfProject Value="True"/> 49 | </Unit4> 50 | <Unit5> 51 | <Filename Value="testwindow.pas"/> 52 | <IsPartOfProject Value="True"/> 53 | <UnitName Value="TestWindow"/> 54 | </Unit5> 55 | <Unit6> 56 | <Filename Value="imgui_extra.pas"/> 57 | <IsPartOfProject Value="True"/> 58 | </Unit6> 59 | <Unit7> 60 | <Filename Value="glad_gl.pas"/> 61 | <IsPartOfProject Value="True"/> 62 | </Unit7> 63 | </Units> 64 | </ProjectOptions> 65 | <CompilerOptions> 66 | <Version Value="11"/> 67 | <PathDelim Value="\"/> 68 | <Target> 69 | <Filename Value="ImGuiDemo"/> 70 | </Target> 71 | <SearchPaths> 72 | <IncludeFiles Value="$(ProjOutDir)"/> 73 | <OtherUnitFiles Value="..;..\examples"/> 74 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 75 | </SearchPaths> 76 | </CompilerOptions> 77 | <Debugging> 78 | <Exceptions Count="3"> 79 | <Item1> 80 | <Name Value="EAbort"/> 81 | </Item1> 82 | <Item2> 83 | <Name Value="ECodetoolError"/> 84 | </Item2> 85 | <Item3> 86 | <Name Value="EFOpenError"/> 87 | </Item3> 88 | </Exceptions> 89 | </Debugging> 90 | </CONFIG> 91 | -------------------------------------------------------------------------------- /demo/ImGuiDemo.lpr: -------------------------------------------------------------------------------- 1 | program ImGuiDemo; 2 | 3 | uses 4 | sysutils, 5 | sdl2, display, glad_gl, 6 | fpimgui, fpimgui_impl_sdlgl2, imgui_extra, TestWindow; 7 | 8 | var 9 | disp: TDisplay; 10 | ev: TSDL_Event; 11 | counter: integer; 12 | testwin: TTestWindow; 13 | testwin_open: boolean = true; 14 | 15 | procedure ShowGreetingWindows; 16 | var 17 | draw_list: PImDrawList; 18 | pos: ImVec2; 19 | begin 20 | ImGui.Begin_('Greeting'); 21 | ImGui.SetWindowPos(ImVec2Init(100,100), ord(ImGuiCond_FirstUseEver)); 22 | ImGui.Text('Hello, world %d', [counter]); 23 | if ImGui.Button('OK') then begin 24 | //button was pressed, do something special! 25 | Inc(counter); 26 | end; 27 | if ImGui.IsItemHovered(ord(ImGuiHoveredFlags_RectOnly)) then begin 28 | ImGui.SameLine(); 29 | ImGui.Text('button hovered'); 30 | end; 31 | 32 | ImGui.SameLine(); 33 | pos := ImGui.GetCursorScreenPos(); 34 | draw_list := ImGui.GetWindowDrawList(); 35 | draw_list^.AddRectFilled(pos, ImVec2Init(pos.x + 50, pos.y + 25), $88000055); 36 | 37 | pos := ImVec2Init(pos.x + 50 + 20, pos.y); 38 | ImGui.SetCursorScreenPos(pos); 39 | 40 | draw_list^.AddRectFilled(pos, ImVec2Init(pos.x + ImGui.CalcTextSize(pchar('custom rectangles')).x, pos.y + 25), $88005500); 41 | ImGui.Text('custom rectangles'); 42 | if ImGui.IsWindowHovered() then 43 | ImGui.Text('window hovered') 44 | else if ImGui.IsAnyWindowHovered then 45 | ImGui.Text('some window hovered'); 46 | ImGui.End_; 47 | 48 | //cimgui interface 49 | igBegin('Another greeting'); 50 | igSetWindowPos(ImVec2Init(400,200), ord(ImGuiCond_FirstUseEver)); 51 | igText('Hello, next world %d', [counter]); 52 | if igButton('Not OK!', ImVec2Init(0,0)) then begin 53 | Dec(counter); 54 | end; 55 | igEnd; 56 | end; 57 | 58 | begin 59 | SDL_SetHint(SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, '1'); //prevent SDL from raising a debugger exception to name threads 60 | 61 | //open new SDL window with OpenGL rendering support 62 | SDL_Init(SDL_INIT_VIDEO or SDL_INIT_TIMER); 63 | disp := TDisplay.Create; 64 | disp.InitDisplay(800, 600); 65 | 66 | testwin := TTestWindow.Create; 67 | counter := 0; 68 | 69 | //uncomment to set a different gui theme 70 | //SetupImGuiStyle2(); 71 | Imgui.StyleColorsDark(ImGui.GetStyle()); 72 | 73 | while true do begin 74 | //begin new frame - clear screen etc. 75 | disp.NewFrame; 76 | 77 | //draw your scene and use imgui 78 | //(do some opengl calls...) 79 | 80 | ShowGreetingWindows; //simple windows 81 | ImGui.ShowDemoWindow(); //integrated demo: shows just about everything that it can do. See imgui_demo.cpp 82 | testwin.Show(testwin_open); //partially translated demo 83 | 84 | //(...and do some more opengl calls) 85 | 86 | 87 | //draw imgui's data buffer -> the gui will be on top, if you don't draw any more stuff 88 | ImGui.Render; 89 | 90 | //show frame on display 91 | disp.PresentFrame; 92 | Assert(glGetError() = GL_NO_ERROR); 93 | 94 | //handle input 95 | if SDL_PollEvent(@ev) <> 0 then begin 96 | //pass events to imgui as well, otherwise widgets wouldn't be interactive 97 | ImGui_ImplSdlGL2_ProcessEvent(@ev); 98 | 99 | case ev.type_ of 100 | SDL_QUITEV: 101 | break; 102 | //(other event handling) 103 | end; 104 | end; 105 | end; 106 | testwin.Free; 107 | 108 | //we won't need the SDL window anymore 109 | disp.FreeDisplay; 110 | disp.Free; 111 | SDL_Quit; 112 | end. 113 | 114 | 115 | -------------------------------------------------------------------------------- /demo/display.pas: -------------------------------------------------------------------------------- 1 | (* 2 | display.pas 3 | *) 4 | unit display; 5 | {$mode objfpc}{$H+} 6 | 7 | interface 8 | 9 | uses 10 | sysutils, 11 | sdl2, glad_gl, 12 | fpimgui, fpimgui_impl_sdlgl2; 13 | 14 | type 15 | { TDisplay } 16 | TDisplay = class 17 | public 18 | procedure InitDisplay(const width, height: word; fullscreen: boolean = false); 19 | procedure FreeDisplay; 20 | procedure SetWindowCaption(caption: string); 21 | 22 | procedure NewFrame; 23 | procedure PresentFrame; 24 | 25 | private 26 | window: PSDL_Window; 27 | context: TSDL_GLContext; 28 | w, h: integer; 29 | in_frame: boolean; 30 | 31 | procedure InitGui; 32 | procedure InitRenderingContext(const width, height: integer; fullscreen: boolean); 33 | end; 34 | 35 | 36 | (******************************************************************************* 37 | *******************************************************************************) 38 | implementation 39 | 40 | function GLFuncLoad(proc: Pchar): Pointer; 41 | begin 42 | result := SDL_GL_GetProcAddress(proc); 43 | Assert(result <> nil, 'couldn''t load ' + proc); 44 | end; 45 | 46 | { TDisplay } 47 | 48 | procedure TDisplay.InitDisplay(const width, height: word; fullscreen: boolean); 49 | begin 50 | if (SDL_WasInit(SDL_INIT_VIDEO) and SDL_INIT_VIDEO) = 0 then begin 51 | writeln('SDL video was not init, initializing now'); 52 | SDL_InitSubSystem(SDL_INIT_VIDEO); 53 | end; 54 | InitRenderingContext(width, height, fullscreen); 55 | InitGui(); 56 | end; 57 | 58 | procedure TDisplay.InitRenderingContext(const width, height: integer; fullscreen: boolean); 59 | var 60 | y: integer; 61 | x: integer; 62 | flags: longword; 63 | begin 64 | SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); 65 | SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); 66 | SDL_GL_SetAttribute(SDL_GL_BUFFER_SIZE, 32); 67 | SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); 68 | SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); 69 | SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); 70 | SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8); 71 | SDL_GL_LoadLibrary(nil); 72 | 73 | w := width; 74 | h := height; 75 | x := SDL_WINDOWPOS_CENTERED; 76 | y := SDL_WINDOWPOS_CENTERED; 77 | flags := SDL_WINDOW_SHOWN or SDL_WINDOW_OPENGL; 78 | if fullscreen then 79 | flags := flags or SDL_WINDOW_FULLSCREEN_DESKTOP; 80 | window := SDL_CreateWindow('SDL window', x, y, w, h, flags); 81 | if window = nil then begin 82 | writeln ('SDL_CreateWindow failed. Reason: ' + SDL_GetError()); 83 | halt; 84 | end; 85 | 86 | context := SDL_GL_CreateContext(window); 87 | SDL_GL_SetSwapInterval(1); //enable VSync 88 | if not gladLoadGL(@GLFuncLoad) then 89 | writeln('couldn''t load opengl ext!'); 90 | 91 | glClearColor(0.0, 0.0, 0.0, 0.0); 92 | end; 93 | 94 | procedure TDisplay.InitGui; 95 | var 96 | io: PImGuiIO; 97 | begin 98 | io := ImGui.GetIO(); 99 | io^.DisplaySize.x := w; 100 | io^.DisplaySize.y := h; 101 | ImGui_ImplSdlGL2_Init(); 102 | end; 103 | 104 | procedure TDisplay.FreeDisplay; 105 | begin 106 | ImGui_ImplSdlGL2_Shutdown(); 107 | SDL_GL_DeleteContext(context); 108 | SDL_DestroyWindow(window); 109 | SDL_QuitSubSystem(SDL_INIT_VIDEO); 110 | end; 111 | 112 | procedure TDisplay.SetWindowCaption(caption: string); 113 | begin 114 | SDL_SetWindowTitle(window, pchar(caption)); 115 | end; 116 | 117 | procedure TDisplay.NewFrame; 118 | begin 119 | glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); 120 | ImGui_ImplSdlGL2_NewFrame(window); 121 | in_frame := true; 122 | end; 123 | 124 | procedure TDisplay.PresentFrame; 125 | begin 126 | Assert(in_frame, 'PresentFrame without NewFrame!'); 127 | SDL_GL_SwapWindow(window); 128 | in_frame := false; 129 | end; 130 | 131 | end. 132 | 133 | -------------------------------------------------------------------------------- /demo/glad_gl.pas: -------------------------------------------------------------------------------- 1 | { 2 | 3 | OpenGL loader generated by glad 0.1.18a0 on Mon Apr 2 00:34:36 2018. 4 | 5 | Language/Generator: Pascal 6 | Specification: gl 7 | APIs: gl=2.0 8 | Profile: compatibility 9 | Extensions: 10 | 11 | Loader: True 12 | Local files: False 13 | Omit khrplatform: False 14 | 15 | Commandline: 16 | --profile="compatibility" --api="gl=2.0" --generator="pascal" --spec="gl" --extensions="" 17 | Online: 18 | http://glad.dav1d.de/#profile=compatibility&language=pascal&specification=gl&loader=on&api=gl%3D2.0 19 | } 20 | {$MACRO ON} 21 | {$IFDEF Windows} 22 | {$DEFINE extdecl := stdcall} 23 | {$ELSE} 24 | {$DEFINE extdecl := cdecl} 25 | {$ENDIF} 26 | unit glad_gl; 27 | 28 | interface 29 | 30 | uses 31 | sysutils; 32 | 33 | var 34 | glVersionMajor, glVersionMinor: integer; 35 | 36 | (* Types *) 37 | type 38 | ClContext = pointer; 39 | ClEvent = pointer; 40 | GLbitfield = uint32; 41 | GLboolean = byte; 42 | GLbyte = int8; 43 | GLchar = char; 44 | GLcharARB = byte; 45 | GLclampd = double; 46 | GLclampf = single; 47 | GLclampx = int32; 48 | GLdouble = double; 49 | GLeglImageOES = pointer; 50 | GLenum = uint32; 51 | GLfixed = int32; 52 | GLfloat = single; 53 | GLhalf = uint16; 54 | GLhalfARB = uint16; 55 | GLhalfNV = uint16; 56 | GLhandleARB = uint32; 57 | GLint = int32; 58 | GLint64 = int64; 59 | GLint64EXT = int64; 60 | GLintptr = int32; 61 | GLintptrARB = int32; 62 | GLshort = int16; 63 | GLsizei = int32; 64 | GLsizeiptr = int32; 65 | GLsizeiptrARB = int32; 66 | GLsync = pointer; 67 | GLubyte = uint8; 68 | GLuint = uint32; 69 | GLuint64 = uint64; 70 | GLuint64EXT = uint64; 71 | GLushort = uint16; 72 | GLvdpauSurfaceNV = int32; 73 | GLvoid = pointer; 74 | 75 | PClContext = ^pointer; 76 | PClEvent = ^pointer; 77 | PGLbitfield = ^uint32; 78 | PGLboolean = ^byte; 79 | PGLbyte = ^int8; 80 | PGLchar = ^char; 81 | PGLcharARB = ^byte; 82 | PGLclampd = ^double; 83 | PGLclampf = ^single; 84 | PGLclampx = ^int32; 85 | PGLdouble = ^double; 86 | PGLeglImageOES = ^pointer; 87 | PGLenum = ^uint32; 88 | PGLfixed = ^int32; 89 | PGLfloat = ^single; 90 | PGLhalf = ^uint16; 91 | PGLhalfARB = ^uint16; 92 | PGLhalfNV = ^uint16; 93 | PGLhandleARB = ^uint32; 94 | PGLint = ^int32; 95 | PGLint64 = ^int64; 96 | PGLint64EXT = ^int64; 97 | PGLintptr = ^int32; 98 | PGLintptrARB = ^int32; 99 | PGLshort = ^int16; 100 | PGLsizei = ^int32; 101 | PGLsizeiptr = ^int32; 102 | PGLsizeiptrARB = ^int32; 103 | PGLsync = ^pointer; 104 | PGLubyte = ^uint8; 105 | PGLuint = ^uint32; 106 | PGLuint64 = ^uint64; 107 | PGLuint64EXT = ^uint64; 108 | PGLushort = ^uint16; 109 | PGLvdpauSurfaceNV = ^int32; 110 | PGLvoid = ^pointer; 111 | PPGLchar = ^PGLchar; 112 | 113 | GLdebugProc = procedure ( 114 | source: GLenum; 115 | typ: GLenum; 116 | id: GLuint; 117 | severity: GLenum; 118 | length: GLsizei; 119 | message: PGLchar; 120 | userParam: pointer); stdcall; 121 | GLdebugProcArb = GLdebugProc; 122 | GLdebugProcKhr = GLdebugProc; 123 | 124 | GLdebugProcAmd = procedure ( 125 | id: GLuint; 126 | category: GLenum; 127 | severity: GLenum; 128 | len: GLsizei; 129 | message: PGLchar; 130 | userParam: pointer); stdcall; 131 | 132 | 133 | (* Enums *) 134 | const 135 | GL_FALSE = 0; 136 | GL_INVALID_INDEX = uint32($FFFFFFFF); 137 | GL_NONE = 0; 138 | GL_NONE_OES = 0; 139 | GL_NO_ERROR = 0; 140 | GL_ONE = 1; 141 | GL_TIMEOUT_IGNORED = uint64($FFFFFFFFFFFFFFFF); 142 | GL_TIMEOUT_IGNORED_APPLE = uint64($FFFFFFFFFFFFFFFF); 143 | GL_TRUE = 1; 144 | GL_VERSION_ES_CL_1_0 = 1; 145 | GL_VERSION_ES_CL_1_1 = 1; 146 | GL_VERSION_ES_CM_1_1 = 1; 147 | GL_ZERO = 0; 148 | 149 | GL_DEPTH_BUFFER_BIT = $00000100; 150 | GL_STENCIL_BUFFER_BIT = $00000400; 151 | GL_COLOR_BUFFER_BIT = $00004000; 152 | GL_POINTS = $0000; 153 | GL_LINES = $0001; 154 | GL_LINE_LOOP = $0002; 155 | GL_LINE_STRIP = $0003; 156 | GL_TRIANGLES = $0004; 157 | GL_TRIANGLE_STRIP = $0005; 158 | GL_TRIANGLE_FAN = $0006; 159 | GL_QUADS = $0007; 160 | GL_NEVER = $0200; 161 | GL_LESS = $0201; 162 | GL_EQUAL = $0202; 163 | GL_LEQUAL = $0203; 164 | GL_GREATER = $0204; 165 | GL_NOTEQUAL = $0205; 166 | GL_GEQUAL = $0206; 167 | GL_ALWAYS = $0207; 168 | GL_SRC_COLOR = $0300; 169 | GL_ONE_MINUS_SRC_COLOR = $0301; 170 | GL_SRC_ALPHA = $0302; 171 | GL_ONE_MINUS_SRC_ALPHA = $0303; 172 | GL_DST_ALPHA = $0304; 173 | GL_ONE_MINUS_DST_ALPHA = $0305; 174 | GL_DST_COLOR = $0306; 175 | GL_ONE_MINUS_DST_COLOR = $0307; 176 | GL_SRC_ALPHA_SATURATE = $0308; 177 | GL_FRONT_LEFT = $0400; 178 | GL_FRONT_RIGHT = $0401; 179 | GL_BACK_LEFT = $0402; 180 | GL_BACK_RIGHT = $0403; 181 | GL_FRONT = $0404; 182 | GL_BACK = $0405; 183 | GL_LEFT = $0406; 184 | GL_RIGHT = $0407; 185 | GL_FRONT_AND_BACK = $0408; 186 | GL_INVALID_ENUM = $0500; 187 | GL_INVALID_VALUE = $0501; 188 | GL_INVALID_OPERATION = $0502; 189 | GL_OUT_OF_MEMORY = $0505; 190 | GL_CW = $0900; 191 | GL_CCW = $0901; 192 | GL_POINT_SIZE = $0B11; 193 | GL_POINT_SIZE_RANGE = $0B12; 194 | GL_POINT_SIZE_GRANULARITY = $0B13; 195 | GL_LINE_SMOOTH = $0B20; 196 | GL_LINE_WIDTH = $0B21; 197 | GL_LINE_WIDTH_RANGE = $0B22; 198 | GL_LINE_WIDTH_GRANULARITY = $0B23; 199 | GL_POLYGON_MODE = $0B40; 200 | GL_POLYGON_SMOOTH = $0B41; 201 | GL_CULL_FACE = $0B44; 202 | GL_CULL_FACE_MODE = $0B45; 203 | GL_FRONT_FACE = $0B46; 204 | GL_DEPTH_RANGE = $0B70; 205 | GL_DEPTH_TEST = $0B71; 206 | GL_DEPTH_WRITEMASK = $0B72; 207 | GL_DEPTH_CLEAR_VALUE = $0B73; 208 | GL_DEPTH_FUNC = $0B74; 209 | GL_STENCIL_TEST = $0B90; 210 | GL_STENCIL_CLEAR_VALUE = $0B91; 211 | GL_STENCIL_FUNC = $0B92; 212 | GL_STENCIL_VALUE_MASK = $0B93; 213 | GL_STENCIL_FAIL = $0B94; 214 | GL_STENCIL_PASS_DEPTH_FAIL = $0B95; 215 | GL_STENCIL_PASS_DEPTH_PASS = $0B96; 216 | GL_STENCIL_REF = $0B97; 217 | GL_STENCIL_WRITEMASK = $0B98; 218 | GL_VIEWPORT = $0BA2; 219 | GL_DITHER = $0BD0; 220 | GL_BLEND_DST = $0BE0; 221 | GL_BLEND_SRC = $0BE1; 222 | GL_BLEND = $0BE2; 223 | GL_LOGIC_OP_MODE = $0BF0; 224 | GL_DRAW_BUFFER = $0C01; 225 | GL_READ_BUFFER = $0C02; 226 | GL_SCISSOR_BOX = $0C10; 227 | GL_SCISSOR_TEST = $0C11; 228 | GL_COLOR_CLEAR_VALUE = $0C22; 229 | GL_COLOR_WRITEMASK = $0C23; 230 | GL_DOUBLEBUFFER = $0C32; 231 | GL_STEREO = $0C33; 232 | GL_LINE_SMOOTH_HINT = $0C52; 233 | GL_POLYGON_SMOOTH_HINT = $0C53; 234 | GL_UNPACK_SWAP_BYTES = $0CF0; 235 | GL_UNPACK_LSB_FIRST = $0CF1; 236 | GL_UNPACK_ROW_LENGTH = $0CF2; 237 | GL_UNPACK_SKIP_ROWS = $0CF3; 238 | GL_UNPACK_SKIP_PIXELS = $0CF4; 239 | GL_UNPACK_ALIGNMENT = $0CF5; 240 | GL_PACK_SWAP_BYTES = $0D00; 241 | GL_PACK_LSB_FIRST = $0D01; 242 | GL_PACK_ROW_LENGTH = $0D02; 243 | GL_PACK_SKIP_ROWS = $0D03; 244 | GL_PACK_SKIP_PIXELS = $0D04; 245 | GL_PACK_ALIGNMENT = $0D05; 246 | GL_MAX_TEXTURE_SIZE = $0D33; 247 | GL_MAX_VIEWPORT_DIMS = $0D3A; 248 | GL_SUBPIXEL_BITS = $0D50; 249 | GL_TEXTURE_1D = $0DE0; 250 | GL_TEXTURE_2D = $0DE1; 251 | GL_TEXTURE_WIDTH = $1000; 252 | GL_TEXTURE_HEIGHT = $1001; 253 | GL_TEXTURE_BORDER_COLOR = $1004; 254 | GL_DONT_CARE = $1100; 255 | GL_FASTEST = $1101; 256 | GL_NICEST = $1102; 257 | GL_BYTE = $1400; 258 | GL_UNSIGNED_BYTE = $1401; 259 | GL_SHORT = $1402; 260 | GL_UNSIGNED_SHORT = $1403; 261 | GL_INT = $1404; 262 | GL_UNSIGNED_INT = $1405; 263 | GL_FLOAT = $1406; 264 | GL_STACK_OVERFLOW = $0503; 265 | GL_STACK_UNDERFLOW = $0504; 266 | GL_CLEAR = $1500; 267 | GL_AND = $1501; 268 | GL_AND_REVERSE = $1502; 269 | GL_COPY = $1503; 270 | GL_AND_INVERTED = $1504; 271 | GL_NOOP = $1505; 272 | GL_XOR = $1506; 273 | GL_OR = $1507; 274 | GL_NOR = $1508; 275 | GL_EQUIV = $1509; 276 | GL_INVERT = $150A; 277 | GL_OR_REVERSE = $150B; 278 | GL_COPY_INVERTED = $150C; 279 | GL_OR_INVERTED = $150D; 280 | GL_NAND = $150E; 281 | GL_SET = $150F; 282 | GL_TEXTURE = $1702; 283 | GL_COLOR = $1800; 284 | GL_DEPTH = $1801; 285 | GL_STENCIL = $1802; 286 | GL_STENCIL_INDEX = $1901; 287 | GL_DEPTH_COMPONENT = $1902; 288 | GL_RED = $1903; 289 | GL_GREEN = $1904; 290 | GL_BLUE = $1905; 291 | GL_ALPHA = $1906; 292 | GL_RGB = $1907; 293 | GL_RGBA = $1908; 294 | GL_POINT = $1B00; 295 | GL_LINE = $1B01; 296 | GL_FILL = $1B02; 297 | GL_KEEP = $1E00; 298 | GL_REPLACE = $1E01; 299 | GL_INCR = $1E02; 300 | GL_DECR = $1E03; 301 | GL_VENDOR = $1F00; 302 | GL_RENDERER = $1F01; 303 | GL_VERSION = $1F02; 304 | GL_EXTENSIONS = $1F03; 305 | GL_NEAREST = $2600; 306 | GL_LINEAR = $2601; 307 | GL_NEAREST_MIPMAP_NEAREST = $2700; 308 | GL_LINEAR_MIPMAP_NEAREST = $2701; 309 | GL_NEAREST_MIPMAP_LINEAR = $2702; 310 | GL_LINEAR_MIPMAP_LINEAR = $2703; 311 | GL_TEXTURE_MAG_FILTER = $2800; 312 | GL_TEXTURE_MIN_FILTER = $2801; 313 | GL_TEXTURE_WRAP_S = $2802; 314 | GL_TEXTURE_WRAP_T = $2803; 315 | GL_REPEAT = $2901; 316 | GL_CURRENT_BIT = $00000001; 317 | GL_POINT_BIT = $00000002; 318 | GL_LINE_BIT = $00000004; 319 | GL_POLYGON_BIT = $00000008; 320 | GL_POLYGON_STIPPLE_BIT = $00000010; 321 | GL_PIXEL_MODE_BIT = $00000020; 322 | GL_LIGHTING_BIT = $00000040; 323 | GL_FOG_BIT = $00000080; 324 | GL_ACCUM_BUFFER_BIT = $00000200; 325 | GL_VIEWPORT_BIT = $00000800; 326 | GL_TRANSFORM_BIT = $00001000; 327 | GL_ENABLE_BIT = $00002000; 328 | GL_HINT_BIT = $00008000; 329 | GL_EVAL_BIT = $00010000; 330 | GL_LIST_BIT = $00020000; 331 | GL_TEXTURE_BIT = $00040000; 332 | GL_SCISSOR_BIT = $00080000; 333 | GL_ALL_ATTRIB_BITS = $FFFFFFFF; 334 | GL_QUAD_STRIP = $0008; 335 | GL_POLYGON = $0009; 336 | GL_ACCUM = $0100; 337 | GL_LOAD = $0101; 338 | GL_RETURN = $0102; 339 | GL_MULT = $0103; 340 | GL_ADD = $0104; 341 | GL_AUX0 = $0409; 342 | GL_AUX1 = $040A; 343 | GL_AUX2 = $040B; 344 | GL_AUX3 = $040C; 345 | GL_2D = $0600; 346 | GL_3D = $0601; 347 | GL_3D_COLOR = $0602; 348 | GL_3D_COLOR_TEXTURE = $0603; 349 | GL_4D_COLOR_TEXTURE = $0604; 350 | GL_PASS_THROUGH_TOKEN = $0700; 351 | GL_POINT_TOKEN = $0701; 352 | GL_LINE_TOKEN = $0702; 353 | GL_POLYGON_TOKEN = $0703; 354 | GL_BITMAP_TOKEN = $0704; 355 | GL_DRAW_PIXEL_TOKEN = $0705; 356 | GL_COPY_PIXEL_TOKEN = $0706; 357 | GL_LINE_RESET_TOKEN = $0707; 358 | GL_EXP = $0800; 359 | GL_EXP2 = $0801; 360 | GL_COEFF = $0A00; 361 | GL_ORDER = $0A01; 362 | GL_DOMAIN = $0A02; 363 | GL_PIXEL_MAP_I_TO_I = $0C70; 364 | GL_PIXEL_MAP_S_TO_S = $0C71; 365 | GL_PIXEL_MAP_I_TO_R = $0C72; 366 | GL_PIXEL_MAP_I_TO_G = $0C73; 367 | GL_PIXEL_MAP_I_TO_B = $0C74; 368 | GL_PIXEL_MAP_I_TO_A = $0C75; 369 | GL_PIXEL_MAP_R_TO_R = $0C76; 370 | GL_PIXEL_MAP_G_TO_G = $0C77; 371 | GL_PIXEL_MAP_B_TO_B = $0C78; 372 | GL_PIXEL_MAP_A_TO_A = $0C79; 373 | GL_CURRENT_COLOR = $0B00; 374 | GL_CURRENT_INDEX = $0B01; 375 | GL_CURRENT_NORMAL = $0B02; 376 | GL_CURRENT_TEXTURE_COORDS = $0B03; 377 | GL_CURRENT_RASTER_COLOR = $0B04; 378 | GL_CURRENT_RASTER_INDEX = $0B05; 379 | GL_CURRENT_RASTER_TEXTURE_COORDS = $0B06; 380 | GL_CURRENT_RASTER_POSITION = $0B07; 381 | GL_CURRENT_RASTER_POSITION_VALID = $0B08; 382 | GL_CURRENT_RASTER_DISTANCE = $0B09; 383 | GL_POINT_SMOOTH = $0B10; 384 | GL_LINE_STIPPLE = $0B24; 385 | GL_LINE_STIPPLE_PATTERN = $0B25; 386 | GL_LINE_STIPPLE_REPEAT = $0B26; 387 | GL_LIST_MODE = $0B30; 388 | GL_MAX_LIST_NESTING = $0B31; 389 | GL_LIST_BASE = $0B32; 390 | GL_LIST_INDEX = $0B33; 391 | GL_POLYGON_STIPPLE = $0B42; 392 | GL_EDGE_FLAG = $0B43; 393 | GL_LIGHTING = $0B50; 394 | GL_LIGHT_MODEL_LOCAL_VIEWER = $0B51; 395 | GL_LIGHT_MODEL_TWO_SIDE = $0B52; 396 | GL_LIGHT_MODEL_AMBIENT = $0B53; 397 | GL_SHADE_MODEL = $0B54; 398 | GL_COLOR_MATERIAL_FACE = $0B55; 399 | GL_COLOR_MATERIAL_PARAMETER = $0B56; 400 | GL_COLOR_MATERIAL = $0B57; 401 | GL_FOG = $0B60; 402 | GL_FOG_INDEX = $0B61; 403 | GL_FOG_DENSITY = $0B62; 404 | GL_FOG_START = $0B63; 405 | GL_FOG_END = $0B64; 406 | GL_FOG_MODE = $0B65; 407 | GL_FOG_COLOR = $0B66; 408 | GL_ACCUM_CLEAR_VALUE = $0B80; 409 | GL_MATRIX_MODE = $0BA0; 410 | GL_NORMALIZE = $0BA1; 411 | GL_MODELVIEW_STACK_DEPTH = $0BA3; 412 | GL_PROJECTION_STACK_DEPTH = $0BA4; 413 | GL_TEXTURE_STACK_DEPTH = $0BA5; 414 | GL_MODELVIEW_MATRIX = $0BA6; 415 | GL_PROJECTION_MATRIX = $0BA7; 416 | GL_TEXTURE_MATRIX = $0BA8; 417 | GL_ATTRIB_STACK_DEPTH = $0BB0; 418 | GL_ALPHA_TEST = $0BC0; 419 | GL_ALPHA_TEST_FUNC = $0BC1; 420 | GL_ALPHA_TEST_REF = $0BC2; 421 | GL_LOGIC_OP = $0BF1; 422 | GL_AUX_BUFFERS = $0C00; 423 | GL_INDEX_CLEAR_VALUE = $0C20; 424 | GL_INDEX_WRITEMASK = $0C21; 425 | GL_INDEX_MODE = $0C30; 426 | GL_RGBA_MODE = $0C31; 427 | GL_RENDER_MODE = $0C40; 428 | GL_PERSPECTIVE_CORRECTION_HINT = $0C50; 429 | GL_POINT_SMOOTH_HINT = $0C51; 430 | GL_FOG_HINT = $0C54; 431 | GL_TEXTURE_GEN_S = $0C60; 432 | GL_TEXTURE_GEN_T = $0C61; 433 | GL_TEXTURE_GEN_R = $0C62; 434 | GL_TEXTURE_GEN_Q = $0C63; 435 | GL_PIXEL_MAP_I_TO_I_SIZE = $0CB0; 436 | GL_PIXEL_MAP_S_TO_S_SIZE = $0CB1; 437 | GL_PIXEL_MAP_I_TO_R_SIZE = $0CB2; 438 | GL_PIXEL_MAP_I_TO_G_SIZE = $0CB3; 439 | GL_PIXEL_MAP_I_TO_B_SIZE = $0CB4; 440 | GL_PIXEL_MAP_I_TO_A_SIZE = $0CB5; 441 | GL_PIXEL_MAP_R_TO_R_SIZE = $0CB6; 442 | GL_PIXEL_MAP_G_TO_G_SIZE = $0CB7; 443 | GL_PIXEL_MAP_B_TO_B_SIZE = $0CB8; 444 | GL_PIXEL_MAP_A_TO_A_SIZE = $0CB9; 445 | GL_MAP_COLOR = $0D10; 446 | GL_MAP_STENCIL = $0D11; 447 | GL_INDEX_SHIFT = $0D12; 448 | GL_INDEX_OFFSET = $0D13; 449 | GL_RED_SCALE = $0D14; 450 | GL_RED_BIAS = $0D15; 451 | GL_ZOOM_X = $0D16; 452 | GL_ZOOM_Y = $0D17; 453 | GL_GREEN_SCALE = $0D18; 454 | GL_GREEN_BIAS = $0D19; 455 | GL_BLUE_SCALE = $0D1A; 456 | GL_BLUE_BIAS = $0D1B; 457 | GL_ALPHA_SCALE = $0D1C; 458 | GL_ALPHA_BIAS = $0D1D; 459 | GL_DEPTH_SCALE = $0D1E; 460 | GL_DEPTH_BIAS = $0D1F; 461 | GL_MAX_EVAL_ORDER = $0D30; 462 | GL_MAX_LIGHTS = $0D31; 463 | GL_MAX_CLIP_PLANES = $0D32; 464 | GL_MAX_PIXEL_MAP_TABLE = $0D34; 465 | GL_MAX_ATTRIB_STACK_DEPTH = $0D35; 466 | GL_MAX_MODELVIEW_STACK_DEPTH = $0D36; 467 | GL_MAX_NAME_STACK_DEPTH = $0D37; 468 | GL_MAX_PROJECTION_STACK_DEPTH = $0D38; 469 | GL_MAX_TEXTURE_STACK_DEPTH = $0D39; 470 | GL_INDEX_BITS = $0D51; 471 | GL_RED_BITS = $0D52; 472 | GL_GREEN_BITS = $0D53; 473 | GL_BLUE_BITS = $0D54; 474 | GL_ALPHA_BITS = $0D55; 475 | GL_DEPTH_BITS = $0D56; 476 | GL_STENCIL_BITS = $0D57; 477 | GL_ACCUM_RED_BITS = $0D58; 478 | GL_ACCUM_GREEN_BITS = $0D59; 479 | GL_ACCUM_BLUE_BITS = $0D5A; 480 | GL_ACCUM_ALPHA_BITS = $0D5B; 481 | GL_NAME_STACK_DEPTH = $0D70; 482 | GL_AUTO_NORMAL = $0D80; 483 | GL_MAP1_COLOR_4 = $0D90; 484 | GL_MAP1_INDEX = $0D91; 485 | GL_MAP1_NORMAL = $0D92; 486 | GL_MAP1_TEXTURE_COORD_1 = $0D93; 487 | GL_MAP1_TEXTURE_COORD_2 = $0D94; 488 | GL_MAP1_TEXTURE_COORD_3 = $0D95; 489 | GL_MAP1_TEXTURE_COORD_4 = $0D96; 490 | GL_MAP1_VERTEX_3 = $0D97; 491 | GL_MAP1_VERTEX_4 = $0D98; 492 | GL_MAP2_COLOR_4 = $0DB0; 493 | GL_MAP2_INDEX = $0DB1; 494 | GL_MAP2_NORMAL = $0DB2; 495 | GL_MAP2_TEXTURE_COORD_1 = $0DB3; 496 | GL_MAP2_TEXTURE_COORD_2 = $0DB4; 497 | GL_MAP2_TEXTURE_COORD_3 = $0DB5; 498 | GL_MAP2_TEXTURE_COORD_4 = $0DB6; 499 | GL_MAP2_VERTEX_3 = $0DB7; 500 | GL_MAP2_VERTEX_4 = $0DB8; 501 | GL_MAP1_GRID_DOMAIN = $0DD0; 502 | GL_MAP1_GRID_SEGMENTS = $0DD1; 503 | GL_MAP2_GRID_DOMAIN = $0DD2; 504 | GL_MAP2_GRID_SEGMENTS = $0DD3; 505 | GL_TEXTURE_COMPONENTS = $1003; 506 | GL_TEXTURE_BORDER = $1005; 507 | GL_AMBIENT = $1200; 508 | GL_DIFFUSE = $1201; 509 | GL_SPECULAR = $1202; 510 | GL_POSITION = $1203; 511 | GL_SPOT_DIRECTION = $1204; 512 | GL_SPOT_EXPONENT = $1205; 513 | GL_SPOT_CUTOFF = $1206; 514 | GL_CONSTANT_ATTENUATION = $1207; 515 | GL_LINEAR_ATTENUATION = $1208; 516 | GL_QUADRATIC_ATTENUATION = $1209; 517 | GL_COMPILE = $1300; 518 | GL_COMPILE_AND_EXECUTE = $1301; 519 | GL_2_BYTES = $1407; 520 | GL_3_BYTES = $1408; 521 | GL_4_BYTES = $1409; 522 | GL_EMISSION = $1600; 523 | GL_SHININESS = $1601; 524 | GL_AMBIENT_AND_DIFFUSE = $1602; 525 | GL_COLOR_INDEXES = $1603; 526 | GL_MODELVIEW = $1700; 527 | GL_PROJECTION = $1701; 528 | GL_COLOR_INDEX = $1900; 529 | GL_LUMINANCE = $1909; 530 | GL_LUMINANCE_ALPHA = $190A; 531 | GL_BITMAP = $1A00; 532 | GL_RENDER = $1C00; 533 | GL_FEEDBACK = $1C01; 534 | GL_SELECT = $1C02; 535 | GL_FLAT = $1D00; 536 | GL_SMOOTH = $1D01; 537 | GL_S = $2000; 538 | GL_T = $2001; 539 | GL_R = $2002; 540 | GL_Q = $2003; 541 | GL_MODULATE = $2100; 542 | GL_DECAL = $2101; 543 | GL_TEXTURE_ENV_MODE = $2200; 544 | GL_TEXTURE_ENV_COLOR = $2201; 545 | GL_TEXTURE_ENV = $2300; 546 | GL_EYE_LINEAR = $2400; 547 | GL_OBJECT_LINEAR = $2401; 548 | GL_SPHERE_MAP = $2402; 549 | GL_TEXTURE_GEN_MODE = $2500; 550 | GL_OBJECT_PLANE = $2501; 551 | GL_EYE_PLANE = $2502; 552 | GL_CLAMP = $2900; 553 | GL_CLIP_PLANE0 = $3000; 554 | GL_CLIP_PLANE1 = $3001; 555 | GL_CLIP_PLANE2 = $3002; 556 | GL_CLIP_PLANE3 = $3003; 557 | GL_CLIP_PLANE4 = $3004; 558 | GL_CLIP_PLANE5 = $3005; 559 | GL_LIGHT0 = $4000; 560 | GL_LIGHT1 = $4001; 561 | GL_LIGHT2 = $4002; 562 | GL_LIGHT3 = $4003; 563 | GL_LIGHT4 = $4004; 564 | GL_LIGHT5 = $4005; 565 | GL_LIGHT6 = $4006; 566 | GL_LIGHT7 = $4007; 567 | GL_COLOR_LOGIC_OP = $0BF2; 568 | GL_POLYGON_OFFSET_UNITS = $2A00; 569 | GL_POLYGON_OFFSET_POINT = $2A01; 570 | GL_POLYGON_OFFSET_LINE = $2A02; 571 | GL_POLYGON_OFFSET_FILL = $8037; 572 | GL_POLYGON_OFFSET_FACTOR = $8038; 573 | GL_TEXTURE_BINDING_1D = $8068; 574 | GL_TEXTURE_BINDING_2D = $8069; 575 | GL_TEXTURE_INTERNAL_FORMAT = $1003; 576 | GL_TEXTURE_RED_SIZE = $805C; 577 | GL_TEXTURE_GREEN_SIZE = $805D; 578 | GL_TEXTURE_BLUE_SIZE = $805E; 579 | GL_TEXTURE_ALPHA_SIZE = $805F; 580 | GL_DOUBLE = $140A; 581 | GL_PROXY_TEXTURE_1D = $8063; 582 | GL_PROXY_TEXTURE_2D = $8064; 583 | GL_R3_G3_B2 = $2A10; 584 | GL_RGB4 = $804F; 585 | GL_RGB5 = $8050; 586 | GL_RGB8 = $8051; 587 | GL_RGB10 = $8052; 588 | GL_RGB12 = $8053; 589 | GL_RGB16 = $8054; 590 | GL_RGBA2 = $8055; 591 | GL_RGBA4 = $8056; 592 | GL_RGB5_A1 = $8057; 593 | GL_RGBA8 = $8058; 594 | GL_RGB10_A2 = $8059; 595 | GL_RGBA12 = $805A; 596 | GL_RGBA16 = $805B; 597 | GL_CLIENT_PIXEL_STORE_BIT = $00000001; 598 | GL_CLIENT_VERTEX_ARRAY_BIT = $00000002; 599 | GL_CLIENT_ALL_ATTRIB_BITS = $FFFFFFFF; 600 | GL_VERTEX_ARRAY_POINTER = $808E; 601 | GL_NORMAL_ARRAY_POINTER = $808F; 602 | GL_COLOR_ARRAY_POINTER = $8090; 603 | GL_INDEX_ARRAY_POINTER = $8091; 604 | GL_TEXTURE_COORD_ARRAY_POINTER = $8092; 605 | GL_EDGE_FLAG_ARRAY_POINTER = $8093; 606 | GL_FEEDBACK_BUFFER_POINTER = $0DF0; 607 | GL_SELECTION_BUFFER_POINTER = $0DF3; 608 | GL_CLIENT_ATTRIB_STACK_DEPTH = $0BB1; 609 | GL_INDEX_LOGIC_OP = $0BF1; 610 | GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = $0D3B; 611 | GL_FEEDBACK_BUFFER_SIZE = $0DF1; 612 | GL_FEEDBACK_BUFFER_TYPE = $0DF2; 613 | GL_SELECTION_BUFFER_SIZE = $0DF4; 614 | GL_VERTEX_ARRAY = $8074; 615 | GL_NORMAL_ARRAY = $8075; 616 | GL_COLOR_ARRAY = $8076; 617 | GL_INDEX_ARRAY = $8077; 618 | GL_TEXTURE_COORD_ARRAY = $8078; 619 | GL_EDGE_FLAG_ARRAY = $8079; 620 | GL_VERTEX_ARRAY_SIZE = $807A; 621 | GL_VERTEX_ARRAY_TYPE = $807B; 622 | GL_VERTEX_ARRAY_STRIDE = $807C; 623 | GL_NORMAL_ARRAY_TYPE = $807E; 624 | GL_NORMAL_ARRAY_STRIDE = $807F; 625 | GL_COLOR_ARRAY_SIZE = $8081; 626 | GL_COLOR_ARRAY_TYPE = $8082; 627 | GL_COLOR_ARRAY_STRIDE = $8083; 628 | GL_INDEX_ARRAY_TYPE = $8085; 629 | GL_INDEX_ARRAY_STRIDE = $8086; 630 | GL_TEXTURE_COORD_ARRAY_SIZE = $8088; 631 | GL_TEXTURE_COORD_ARRAY_TYPE = $8089; 632 | GL_TEXTURE_COORD_ARRAY_STRIDE = $808A; 633 | GL_EDGE_FLAG_ARRAY_STRIDE = $808C; 634 | GL_TEXTURE_LUMINANCE_SIZE = $8060; 635 | GL_TEXTURE_INTENSITY_SIZE = $8061; 636 | GL_TEXTURE_PRIORITY = $8066; 637 | GL_TEXTURE_RESIDENT = $8067; 638 | GL_ALPHA4 = $803B; 639 | GL_ALPHA8 = $803C; 640 | GL_ALPHA12 = $803D; 641 | GL_ALPHA16 = $803E; 642 | GL_LUMINANCE4 = $803F; 643 | GL_LUMINANCE8 = $8040; 644 | GL_LUMINANCE12 = $8041; 645 | GL_LUMINANCE16 = $8042; 646 | GL_LUMINANCE4_ALPHA4 = $8043; 647 | GL_LUMINANCE6_ALPHA2 = $8044; 648 | GL_LUMINANCE8_ALPHA8 = $8045; 649 | GL_LUMINANCE12_ALPHA4 = $8046; 650 | GL_LUMINANCE12_ALPHA12 = $8047; 651 | GL_LUMINANCE16_ALPHA16 = $8048; 652 | GL_INTENSITY = $8049; 653 | GL_INTENSITY4 = $804A; 654 | GL_INTENSITY8 = $804B; 655 | GL_INTENSITY12 = $804C; 656 | GL_INTENSITY16 = $804D; 657 | GL_V2F = $2A20; 658 | GL_V3F = $2A21; 659 | GL_C4UB_V2F = $2A22; 660 | GL_C4UB_V3F = $2A23; 661 | GL_C3F_V3F = $2A24; 662 | GL_N3F_V3F = $2A25; 663 | GL_C4F_N3F_V3F = $2A26; 664 | GL_T2F_V3F = $2A27; 665 | GL_T4F_V4F = $2A28; 666 | GL_T2F_C4UB_V3F = $2A29; 667 | GL_T2F_C3F_V3F = $2A2A; 668 | GL_T2F_N3F_V3F = $2A2B; 669 | GL_T2F_C4F_N3F_V3F = $2A2C; 670 | GL_T4F_C4F_N3F_V4F = $2A2D; 671 | GL_UNSIGNED_BYTE_3_3_2 = $8032; 672 | GL_UNSIGNED_SHORT_4_4_4_4 = $8033; 673 | GL_UNSIGNED_SHORT_5_5_5_1 = $8034; 674 | GL_UNSIGNED_INT_8_8_8_8 = $8035; 675 | GL_UNSIGNED_INT_10_10_10_2 = $8036; 676 | GL_TEXTURE_BINDING_3D = $806A; 677 | GL_PACK_SKIP_IMAGES = $806B; 678 | GL_PACK_IMAGE_HEIGHT = $806C; 679 | GL_UNPACK_SKIP_IMAGES = $806D; 680 | GL_UNPACK_IMAGE_HEIGHT = $806E; 681 | GL_TEXTURE_3D = $806F; 682 | GL_PROXY_TEXTURE_3D = $8070; 683 | GL_TEXTURE_DEPTH = $8071; 684 | GL_TEXTURE_WRAP_R = $8072; 685 | GL_MAX_3D_TEXTURE_SIZE = $8073; 686 | GL_UNSIGNED_BYTE_2_3_3_REV = $8362; 687 | GL_UNSIGNED_SHORT_5_6_5 = $8363; 688 | GL_UNSIGNED_SHORT_5_6_5_REV = $8364; 689 | GL_UNSIGNED_SHORT_4_4_4_4_REV = $8365; 690 | GL_UNSIGNED_SHORT_1_5_5_5_REV = $8366; 691 | GL_UNSIGNED_INT_8_8_8_8_REV = $8367; 692 | GL_UNSIGNED_INT_2_10_10_10_REV = $8368; 693 | GL_BGR = $80E0; 694 | GL_BGRA = $80E1; 695 | GL_MAX_ELEMENTS_VERTICES = $80E8; 696 | GL_MAX_ELEMENTS_INDICES = $80E9; 697 | GL_CLAMP_TO_EDGE = $812F; 698 | GL_TEXTURE_MIN_LOD = $813A; 699 | GL_TEXTURE_MAX_LOD = $813B; 700 | GL_TEXTURE_BASE_LEVEL = $813C; 701 | GL_TEXTURE_MAX_LEVEL = $813D; 702 | GL_SMOOTH_POINT_SIZE_RANGE = $0B12; 703 | GL_SMOOTH_POINT_SIZE_GRANULARITY = $0B13; 704 | GL_SMOOTH_LINE_WIDTH_RANGE = $0B22; 705 | GL_SMOOTH_LINE_WIDTH_GRANULARITY = $0B23; 706 | GL_ALIASED_LINE_WIDTH_RANGE = $846E; 707 | GL_RESCALE_NORMAL = $803A; 708 | GL_LIGHT_MODEL_COLOR_CONTROL = $81F8; 709 | GL_SINGLE_COLOR = $81F9; 710 | GL_SEPARATE_SPECULAR_COLOR = $81FA; 711 | GL_ALIASED_POINT_SIZE_RANGE = $846D; 712 | GL_TEXTURE0 = $84C0; 713 | GL_TEXTURE1 = $84C1; 714 | GL_TEXTURE2 = $84C2; 715 | GL_TEXTURE3 = $84C3; 716 | GL_TEXTURE4 = $84C4; 717 | GL_TEXTURE5 = $84C5; 718 | GL_TEXTURE6 = $84C6; 719 | GL_TEXTURE7 = $84C7; 720 | GL_TEXTURE8 = $84C8; 721 | GL_TEXTURE9 = $84C9; 722 | GL_TEXTURE10 = $84CA; 723 | GL_TEXTURE11 = $84CB; 724 | GL_TEXTURE12 = $84CC; 725 | GL_TEXTURE13 = $84CD; 726 | GL_TEXTURE14 = $84CE; 727 | GL_TEXTURE15 = $84CF; 728 | GL_TEXTURE16 = $84D0; 729 | GL_TEXTURE17 = $84D1; 730 | GL_TEXTURE18 = $84D2; 731 | GL_TEXTURE19 = $84D3; 732 | GL_TEXTURE20 = $84D4; 733 | GL_TEXTURE21 = $84D5; 734 | GL_TEXTURE22 = $84D6; 735 | GL_TEXTURE23 = $84D7; 736 | GL_TEXTURE24 = $84D8; 737 | GL_TEXTURE25 = $84D9; 738 | GL_TEXTURE26 = $84DA; 739 | GL_TEXTURE27 = $84DB; 740 | GL_TEXTURE28 = $84DC; 741 | GL_TEXTURE29 = $84DD; 742 | GL_TEXTURE30 = $84DE; 743 | GL_TEXTURE31 = $84DF; 744 | GL_ACTIVE_TEXTURE = $84E0; 745 | GL_MULTISAMPLE = $809D; 746 | GL_SAMPLE_ALPHA_TO_COVERAGE = $809E; 747 | GL_SAMPLE_ALPHA_TO_ONE = $809F; 748 | GL_SAMPLE_COVERAGE = $80A0; 749 | GL_SAMPLE_BUFFERS = $80A8; 750 | GL_SAMPLES = $80A9; 751 | GL_SAMPLE_COVERAGE_VALUE = $80AA; 752 | GL_SAMPLE_COVERAGE_INVERT = $80AB; 753 | GL_TEXTURE_CUBE_MAP = $8513; 754 | GL_TEXTURE_BINDING_CUBE_MAP = $8514; 755 | GL_TEXTURE_CUBE_MAP_POSITIVE_X = $8515; 756 | GL_TEXTURE_CUBE_MAP_NEGATIVE_X = $8516; 757 | GL_TEXTURE_CUBE_MAP_POSITIVE_Y = $8517; 758 | GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = $8518; 759 | GL_TEXTURE_CUBE_MAP_POSITIVE_Z = $8519; 760 | GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = $851A; 761 | GL_PROXY_TEXTURE_CUBE_MAP = $851B; 762 | GL_MAX_CUBE_MAP_TEXTURE_SIZE = $851C; 763 | GL_COMPRESSED_RGB = $84ED; 764 | GL_COMPRESSED_RGBA = $84EE; 765 | GL_TEXTURE_COMPRESSION_HINT = $84EF; 766 | GL_TEXTURE_COMPRESSED_IMAGE_SIZE = $86A0; 767 | GL_TEXTURE_COMPRESSED = $86A1; 768 | GL_NUM_COMPRESSED_TEXTURE_FORMATS = $86A2; 769 | GL_COMPRESSED_TEXTURE_FORMATS = $86A3; 770 | GL_CLAMP_TO_BORDER = $812D; 771 | GL_CLIENT_ACTIVE_TEXTURE = $84E1; 772 | GL_MAX_TEXTURE_UNITS = $84E2; 773 | GL_TRANSPOSE_MODELVIEW_MATRIX = $84E3; 774 | GL_TRANSPOSE_PROJECTION_MATRIX = $84E4; 775 | GL_TRANSPOSE_TEXTURE_MATRIX = $84E5; 776 | GL_TRANSPOSE_COLOR_MATRIX = $84E6; 777 | GL_MULTISAMPLE_BIT = $20000000; 778 | GL_NORMAL_MAP = $8511; 779 | GL_REFLECTION_MAP = $8512; 780 | GL_COMPRESSED_ALPHA = $84E9; 781 | GL_COMPRESSED_LUMINANCE = $84EA; 782 | GL_COMPRESSED_LUMINANCE_ALPHA = $84EB; 783 | GL_COMPRESSED_INTENSITY = $84EC; 784 | GL_COMBINE = $8570; 785 | GL_COMBINE_RGB = $8571; 786 | GL_COMBINE_ALPHA = $8572; 787 | GL_SOURCE0_RGB = $8580; 788 | GL_SOURCE1_RGB = $8581; 789 | GL_SOURCE2_RGB = $8582; 790 | GL_SOURCE0_ALPHA = $8588; 791 | GL_SOURCE1_ALPHA = $8589; 792 | GL_SOURCE2_ALPHA = $858A; 793 | GL_OPERAND0_RGB = $8590; 794 | GL_OPERAND1_RGB = $8591; 795 | GL_OPERAND2_RGB = $8592; 796 | GL_OPERAND0_ALPHA = $8598; 797 | GL_OPERAND1_ALPHA = $8599; 798 | GL_OPERAND2_ALPHA = $859A; 799 | GL_RGB_SCALE = $8573; 800 | GL_ADD_SIGNED = $8574; 801 | GL_INTERPOLATE = $8575; 802 | GL_SUBTRACT = $84E7; 803 | GL_CONSTANT = $8576; 804 | GL_PRIMARY_COLOR = $8577; 805 | GL_PREVIOUS = $8578; 806 | GL_DOT3_RGB = $86AE; 807 | GL_DOT3_RGBA = $86AF; 808 | GL_BLEND_DST_RGB = $80C8; 809 | GL_BLEND_SRC_RGB = $80C9; 810 | GL_BLEND_DST_ALPHA = $80CA; 811 | GL_BLEND_SRC_ALPHA = $80CB; 812 | GL_POINT_FADE_THRESHOLD_SIZE = $8128; 813 | GL_DEPTH_COMPONENT16 = $81A5; 814 | GL_DEPTH_COMPONENT24 = $81A6; 815 | GL_DEPTH_COMPONENT32 = $81A7; 816 | GL_MIRRORED_REPEAT = $8370; 817 | GL_MAX_TEXTURE_LOD_BIAS = $84FD; 818 | GL_TEXTURE_LOD_BIAS = $8501; 819 | GL_INCR_WRAP = $8507; 820 | GL_DECR_WRAP = $8508; 821 | GL_TEXTURE_DEPTH_SIZE = $884A; 822 | GL_TEXTURE_COMPARE_MODE = $884C; 823 | GL_TEXTURE_COMPARE_FUNC = $884D; 824 | GL_POINT_SIZE_MIN = $8126; 825 | GL_POINT_SIZE_MAX = $8127; 826 | GL_POINT_DISTANCE_ATTENUATION = $8129; 827 | GL_GENERATE_MIPMAP = $8191; 828 | GL_GENERATE_MIPMAP_HINT = $8192; 829 | GL_FOG_COORDINATE_SOURCE = $8450; 830 | GL_FOG_COORDINATE = $8451; 831 | GL_FRAGMENT_DEPTH = $8452; 832 | GL_CURRENT_FOG_COORDINATE = $8453; 833 | GL_FOG_COORDINATE_ARRAY_TYPE = $8454; 834 | GL_FOG_COORDINATE_ARRAY_STRIDE = $8455; 835 | GL_FOG_COORDINATE_ARRAY_POINTER = $8456; 836 | GL_FOG_COORDINATE_ARRAY = $8457; 837 | GL_COLOR_SUM = $8458; 838 | GL_CURRENT_SECONDARY_COLOR = $8459; 839 | GL_SECONDARY_COLOR_ARRAY_SIZE = $845A; 840 | GL_SECONDARY_COLOR_ARRAY_TYPE = $845B; 841 | GL_SECONDARY_COLOR_ARRAY_STRIDE = $845C; 842 | GL_SECONDARY_COLOR_ARRAY_POINTER = $845D; 843 | GL_SECONDARY_COLOR_ARRAY = $845E; 844 | GL_TEXTURE_FILTER_CONTROL = $8500; 845 | GL_DEPTH_TEXTURE_MODE = $884B; 846 | GL_COMPARE_R_TO_TEXTURE = $884E; 847 | GL_BLEND_COLOR = $8005; 848 | GL_BLEND_EQUATION = $8009; 849 | GL_CONSTANT_COLOR = $8001; 850 | GL_ONE_MINUS_CONSTANT_COLOR = $8002; 851 | GL_CONSTANT_ALPHA = $8003; 852 | GL_ONE_MINUS_CONSTANT_ALPHA = $8004; 853 | GL_FUNC_ADD = $8006; 854 | GL_FUNC_REVERSE_SUBTRACT = $800B; 855 | GL_FUNC_SUBTRACT = $800A; 856 | GL_MIN = $8007; 857 | GL_MAX = $8008; 858 | GL_BUFFER_SIZE = $8764; 859 | GL_BUFFER_USAGE = $8765; 860 | GL_QUERY_COUNTER_BITS = $8864; 861 | GL_CURRENT_QUERY = $8865; 862 | GL_QUERY_RESULT = $8866; 863 | GL_QUERY_RESULT_AVAILABLE = $8867; 864 | GL_ARRAY_BUFFER = $8892; 865 | GL_ELEMENT_ARRAY_BUFFER = $8893; 866 | GL_ARRAY_BUFFER_BINDING = $8894; 867 | GL_ELEMENT_ARRAY_BUFFER_BINDING = $8895; 868 | GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = $889F; 869 | GL_READ_ONLY = $88B8; 870 | GL_WRITE_ONLY = $88B9; 871 | GL_READ_WRITE = $88BA; 872 | GL_BUFFER_ACCESS = $88BB; 873 | GL_BUFFER_MAPPED = $88BC; 874 | GL_BUFFER_MAP_POINTER = $88BD; 875 | GL_STREAM_DRAW = $88E0; 876 | GL_STREAM_READ = $88E1; 877 | GL_STREAM_COPY = $88E2; 878 | GL_STATIC_DRAW = $88E4; 879 | GL_STATIC_READ = $88E5; 880 | GL_STATIC_COPY = $88E6; 881 | GL_DYNAMIC_DRAW = $88E8; 882 | GL_DYNAMIC_READ = $88E9; 883 | GL_DYNAMIC_COPY = $88EA; 884 | GL_SAMPLES_PASSED = $8914; 885 | GL_SRC1_ALPHA = $8589; 886 | GL_VERTEX_ARRAY_BUFFER_BINDING = $8896; 887 | GL_NORMAL_ARRAY_BUFFER_BINDING = $8897; 888 | GL_COLOR_ARRAY_BUFFER_BINDING = $8898; 889 | GL_INDEX_ARRAY_BUFFER_BINDING = $8899; 890 | GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = $889A; 891 | GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = $889B; 892 | GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = $889C; 893 | GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = $889D; 894 | GL_WEIGHT_ARRAY_BUFFER_BINDING = $889E; 895 | GL_FOG_COORD_SRC = $8450; 896 | GL_FOG_COORD = $8451; 897 | GL_CURRENT_FOG_COORD = $8453; 898 | GL_FOG_COORD_ARRAY_TYPE = $8454; 899 | GL_FOG_COORD_ARRAY_STRIDE = $8455; 900 | GL_FOG_COORD_ARRAY_POINTER = $8456; 901 | GL_FOG_COORD_ARRAY = $8457; 902 | GL_FOG_COORD_ARRAY_BUFFER_BINDING = $889D; 903 | GL_SRC0_RGB = $8580; 904 | GL_SRC1_RGB = $8581; 905 | GL_SRC2_RGB = $8582; 906 | GL_SRC0_ALPHA = $8588; 907 | GL_SRC2_ALPHA = $858A; 908 | GL_BLEND_EQUATION_RGB = $8009; 909 | GL_VERTEX_ATTRIB_ARRAY_ENABLED = $8622; 910 | GL_VERTEX_ATTRIB_ARRAY_SIZE = $8623; 911 | GL_VERTEX_ATTRIB_ARRAY_STRIDE = $8624; 912 | GL_VERTEX_ATTRIB_ARRAY_TYPE = $8625; 913 | GL_CURRENT_VERTEX_ATTRIB = $8626; 914 | GL_VERTEX_PROGRAM_POINT_SIZE = $8642; 915 | GL_VERTEX_ATTRIB_ARRAY_POINTER = $8645; 916 | GL_STENCIL_BACK_FUNC = $8800; 917 | GL_STENCIL_BACK_FAIL = $8801; 918 | GL_STENCIL_BACK_PASS_DEPTH_FAIL = $8802; 919 | GL_STENCIL_BACK_PASS_DEPTH_PASS = $8803; 920 | GL_MAX_DRAW_BUFFERS = $8824; 921 | GL_DRAW_BUFFER0 = $8825; 922 | GL_DRAW_BUFFER1 = $8826; 923 | GL_DRAW_BUFFER2 = $8827; 924 | GL_DRAW_BUFFER3 = $8828; 925 | GL_DRAW_BUFFER4 = $8829; 926 | GL_DRAW_BUFFER5 = $882A; 927 | GL_DRAW_BUFFER6 = $882B; 928 | GL_DRAW_BUFFER7 = $882C; 929 | GL_DRAW_BUFFER8 = $882D; 930 | GL_DRAW_BUFFER9 = $882E; 931 | GL_DRAW_BUFFER10 = $882F; 932 | GL_DRAW_BUFFER11 = $8830; 933 | GL_DRAW_BUFFER12 = $8831; 934 | GL_DRAW_BUFFER13 = $8832; 935 | GL_DRAW_BUFFER14 = $8833; 936 | GL_DRAW_BUFFER15 = $8834; 937 | GL_BLEND_EQUATION_ALPHA = $883D; 938 | GL_MAX_VERTEX_ATTRIBS = $8869; 939 | GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = $886A; 940 | GL_MAX_TEXTURE_IMAGE_UNITS = $8872; 941 | GL_FRAGMENT_SHADER = $8B30; 942 | GL_VERTEX_SHADER = $8B31; 943 | GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = $8B49; 944 | GL_MAX_VERTEX_UNIFORM_COMPONENTS = $8B4A; 945 | GL_MAX_VARYING_FLOATS = $8B4B; 946 | GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = $8B4C; 947 | GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = $8B4D; 948 | GL_SHADER_TYPE = $8B4F; 949 | GL_FLOAT_VEC2 = $8B50; 950 | GL_FLOAT_VEC3 = $8B51; 951 | GL_FLOAT_VEC4 = $8B52; 952 | GL_INT_VEC2 = $8B53; 953 | GL_INT_VEC3 = $8B54; 954 | GL_INT_VEC4 = $8B55; 955 | GL_BOOL = $8B56; 956 | GL_BOOL_VEC2 = $8B57; 957 | GL_BOOL_VEC3 = $8B58; 958 | GL_BOOL_VEC4 = $8B59; 959 | GL_FLOAT_MAT2 = $8B5A; 960 | GL_FLOAT_MAT3 = $8B5B; 961 | GL_FLOAT_MAT4 = $8B5C; 962 | GL_SAMPLER_1D = $8B5D; 963 | GL_SAMPLER_2D = $8B5E; 964 | GL_SAMPLER_3D = $8B5F; 965 | GL_SAMPLER_CUBE = $8B60; 966 | GL_SAMPLER_1D_SHADOW = $8B61; 967 | GL_SAMPLER_2D_SHADOW = $8B62; 968 | GL_DELETE_STATUS = $8B80; 969 | GL_COMPILE_STATUS = $8B81; 970 | GL_LINK_STATUS = $8B82; 971 | GL_VALIDATE_STATUS = $8B83; 972 | GL_INFO_LOG_LENGTH = $8B84; 973 | GL_ATTACHED_SHADERS = $8B85; 974 | GL_ACTIVE_UNIFORMS = $8B86; 975 | GL_ACTIVE_UNIFORM_MAX_LENGTH = $8B87; 976 | GL_SHADER_SOURCE_LENGTH = $8B88; 977 | GL_ACTIVE_ATTRIBUTES = $8B89; 978 | GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = $8B8A; 979 | GL_FRAGMENT_SHADER_DERIVATIVE_HINT = $8B8B; 980 | GL_SHADING_LANGUAGE_VERSION = $8B8C; 981 | GL_CURRENT_PROGRAM = $8B8D; 982 | GL_POINT_SPRITE_COORD_ORIGIN = $8CA0; 983 | GL_LOWER_LEFT = $8CA1; 984 | GL_UPPER_LEFT = $8CA2; 985 | GL_STENCIL_BACK_REF = $8CA3; 986 | GL_STENCIL_BACK_VALUE_MASK = $8CA4; 987 | GL_STENCIL_BACK_WRITEMASK = $8CA5; 988 | GL_VERTEX_PROGRAM_TWO_SIDE = $8643; 989 | GL_POINT_SPRITE = $8861; 990 | GL_COORD_REPLACE = $8862; 991 | GL_MAX_TEXTURE_COORDS = $8871; 992 | 993 | (* Functions *) 994 | var 995 | GLAD_GL_VERSION_1_0: boolean; 996 | GLAD_GL_VERSION_1_1: boolean; 997 | GLAD_GL_VERSION_1_2: boolean; 998 | GLAD_GL_VERSION_1_3: boolean; 999 | GLAD_GL_VERSION_1_4: boolean; 1000 | GLAD_GL_VERSION_1_5: boolean; 1001 | GLAD_GL_VERSION_2_0: boolean; 1002 | 1003 | glCullFace: procedure (mode: GLenum); extdecl; 1004 | glFrontFace: procedure (mode: GLenum); extdecl; 1005 | glHint: procedure (target: GLenum; mode: GLenum); extdecl; 1006 | glLineWidth: procedure (width: GLfloat); extdecl; 1007 | glPointSize: procedure (size: GLfloat); extdecl; 1008 | glPolygonMode: procedure (face: GLenum; mode: GLenum); extdecl; 1009 | glScissor: procedure (x: GLint; y: GLint; width: GLsizei; height: GLsizei); extdecl; 1010 | glTexParameterf: procedure (target: GLenum; pname: GLenum; param: GLfloat); extdecl; 1011 | glTexParameterfv: procedure (target: GLenum; pname: GLenum; params: PGLfloat); extdecl; 1012 | glTexParameteri: procedure (target: GLenum; pname: GLenum; param: GLint); extdecl; 1013 | glTexParameteriv: procedure (target: GLenum; pname: GLenum; params: PGLint); extdecl; 1014 | glTexImage1D: procedure (target: GLenum; level: GLint; internalformat: GLint; width: GLsizei; border: GLint; format: GLenum; type_: GLenum; pixels: Pointer); extdecl; 1015 | glTexImage2D: procedure (target: GLenum; level: GLint; internalformat: GLint; width: GLsizei; height: GLsizei; border: GLint; format: GLenum; type_: GLenum; pixels: Pointer); extdecl; 1016 | glDrawBuffer: procedure (buf: GLenum); extdecl; 1017 | glClear: procedure (mask: GLbitfield); extdecl; 1018 | glClearColor: procedure (red: GLfloat; green: GLfloat; blue: GLfloat; alpha: GLfloat); extdecl; 1019 | glClearStencil: procedure (s: GLint); extdecl; 1020 | glClearDepth: procedure (depth: GLdouble); extdecl; 1021 | glStencilMask: procedure (mask: GLuint); extdecl; 1022 | glColorMask: procedure (red: GLboolean; green: GLboolean; blue: GLboolean; alpha: GLboolean); extdecl; 1023 | glDepthMask: procedure (flag: GLboolean); extdecl; 1024 | glDisable: procedure (cap: GLenum); extdecl; 1025 | glEnable: procedure (cap: GLenum); extdecl; 1026 | glFinish: procedure (); extdecl; 1027 | glFlush: procedure (); extdecl; 1028 | glBlendFunc: procedure (sfactor: GLenum; dfactor: GLenum); extdecl; 1029 | glLogicOp: procedure (opcode: GLenum); extdecl; 1030 | glStencilFunc: procedure (func: GLenum; ref: GLint; mask: GLuint); extdecl; 1031 | glStencilOp: procedure (fail: GLenum; zfail: GLenum; zpass: GLenum); extdecl; 1032 | glDepthFunc: procedure (func: GLenum); extdecl; 1033 | glPixelStoref: procedure (pname: GLenum; param: GLfloat); extdecl; 1034 | glPixelStorei: procedure (pname: GLenum; param: GLint); extdecl; 1035 | glReadBuffer: procedure (src: GLenum); extdecl; 1036 | glReadPixels: procedure (x: GLint; y: GLint; width: GLsizei; height: GLsizei; format: GLenum; type_: GLenum; pixels: Pointer); extdecl; 1037 | glGetBooleanv: procedure (pname: GLenum; data: PGLboolean); extdecl; 1038 | glGetDoublev: procedure (pname: GLenum; data: PGLdouble); extdecl; 1039 | glGetError: function (): GLenum; extdecl; 1040 | glGetFloatv: procedure (pname: GLenum; data: PGLfloat); extdecl; 1041 | glGetIntegerv: procedure (pname: GLenum; data: PGLint); extdecl; 1042 | glGetString: function (name: GLenum): PGLubyte; extdecl; 1043 | glGetTexImage: procedure (target: GLenum; level: GLint; format: GLenum; type_: GLenum; pixels: Pointer); extdecl; 1044 | glGetTexParameterfv: procedure (target: GLenum; pname: GLenum; params: PGLfloat); extdecl; 1045 | glGetTexParameteriv: procedure (target: GLenum; pname: GLenum; params: PGLint); extdecl; 1046 | glGetTexLevelParameterfv: procedure (target: GLenum; level: GLint; pname: GLenum; params: PGLfloat); extdecl; 1047 | glGetTexLevelParameteriv: procedure (target: GLenum; level: GLint; pname: GLenum; params: PGLint); extdecl; 1048 | glIsEnabled: function (cap: GLenum): GLboolean; extdecl; 1049 | glDepthRange: procedure (n: GLdouble; f: GLdouble); extdecl; 1050 | glViewport: procedure (x: GLint; y: GLint; width: GLsizei; height: GLsizei); extdecl; 1051 | glNewList: procedure (list: GLuint; mode: GLenum); extdecl; 1052 | glEndList: procedure (); extdecl; 1053 | glCallList: procedure (list: GLuint); extdecl; 1054 | glCallLists: procedure (n: GLsizei; type_: GLenum; lists: Pointer); extdecl; 1055 | glDeleteLists: procedure (list: GLuint; range: GLsizei); extdecl; 1056 | glGenLists: function (range: GLsizei): GLuint; extdecl; 1057 | glListBase: procedure (base: GLuint); extdecl; 1058 | glBegin: procedure (mode: GLenum); extdecl; 1059 | glBitmap: procedure (width: GLsizei; height: GLsizei; xorig: GLfloat; yorig: GLfloat; xmove: GLfloat; ymove: GLfloat; bitmap: PGLubyte); extdecl; 1060 | glColor3b: procedure (red: GLbyte; green: GLbyte; blue: GLbyte); extdecl; 1061 | glColor3bv: procedure (v: PGLbyte); extdecl; 1062 | glColor3d: procedure (red: GLdouble; green: GLdouble; blue: GLdouble); extdecl; 1063 | glColor3dv: procedure (v: PGLdouble); extdecl; 1064 | glColor3f: procedure (red: GLfloat; green: GLfloat; blue: GLfloat); extdecl; 1065 | glColor3fv: procedure (v: PGLfloat); extdecl; 1066 | glColor3i: procedure (red: GLint; green: GLint; blue: GLint); extdecl; 1067 | glColor3iv: procedure (v: PGLint); extdecl; 1068 | glColor3s: procedure (red: GLshort; green: GLshort; blue: GLshort); extdecl; 1069 | glColor3sv: procedure (v: PGLshort); extdecl; 1070 | glColor3ub: procedure (red: GLubyte; green: GLubyte; blue: GLubyte); extdecl; 1071 | glColor3ubv: procedure (v: PGLubyte); extdecl; 1072 | glColor3ui: procedure (red: GLuint; green: GLuint; blue: GLuint); extdecl; 1073 | glColor3uiv: procedure (v: PGLuint); extdecl; 1074 | glColor3us: procedure (red: GLushort; green: GLushort; blue: GLushort); extdecl; 1075 | glColor3usv: procedure (v: PGLushort); extdecl; 1076 | glColor4b: procedure (red: GLbyte; green: GLbyte; blue: GLbyte; alpha: GLbyte); extdecl; 1077 | glColor4bv: procedure (v: PGLbyte); extdecl; 1078 | glColor4d: procedure (red: GLdouble; green: GLdouble; blue: GLdouble; alpha: GLdouble); extdecl; 1079 | glColor4dv: procedure (v: PGLdouble); extdecl; 1080 | glColor4f: procedure (red: GLfloat; green: GLfloat; blue: GLfloat; alpha: GLfloat); extdecl; 1081 | glColor4fv: procedure (v: PGLfloat); extdecl; 1082 | glColor4i: procedure (red: GLint; green: GLint; blue: GLint; alpha: GLint); extdecl; 1083 | glColor4iv: procedure (v: PGLint); extdecl; 1084 | glColor4s: procedure (red: GLshort; green: GLshort; blue: GLshort; alpha: GLshort); extdecl; 1085 | glColor4sv: procedure (v: PGLshort); extdecl; 1086 | glColor4ub: procedure (red: GLubyte; green: GLubyte; blue: GLubyte; alpha: GLubyte); extdecl; 1087 | glColor4ubv: procedure (v: PGLubyte); extdecl; 1088 | glColor4ui: procedure (red: GLuint; green: GLuint; blue: GLuint; alpha: GLuint); extdecl; 1089 | glColor4uiv: procedure (v: PGLuint); extdecl; 1090 | glColor4us: procedure (red: GLushort; green: GLushort; blue: GLushort; alpha: GLushort); extdecl; 1091 | glColor4usv: procedure (v: PGLushort); extdecl; 1092 | glEdgeFlag: procedure (flag: GLboolean); extdecl; 1093 | glEdgeFlagv: procedure (flag: PGLboolean); extdecl; 1094 | glEnd: procedure (); extdecl; 1095 | glIndexd: procedure (c: GLdouble); extdecl; 1096 | glIndexdv: procedure (c: PGLdouble); extdecl; 1097 | glIndexf: procedure (c: GLfloat); extdecl; 1098 | glIndexfv: procedure (c: PGLfloat); extdecl; 1099 | glIndexi: procedure (c: GLint); extdecl; 1100 | glIndexiv: procedure (c: PGLint); extdecl; 1101 | glIndexs: procedure (c: GLshort); extdecl; 1102 | glIndexsv: procedure (c: PGLshort); extdecl; 1103 | glNormal3b: procedure (nx: GLbyte; ny: GLbyte; nz: GLbyte); extdecl; 1104 | glNormal3bv: procedure (v: PGLbyte); extdecl; 1105 | glNormal3d: procedure (nx: GLdouble; ny: GLdouble; nz: GLdouble); extdecl; 1106 | glNormal3dv: procedure (v: PGLdouble); extdecl; 1107 | glNormal3f: procedure (nx: GLfloat; ny: GLfloat; nz: GLfloat); extdecl; 1108 | glNormal3fv: procedure (v: PGLfloat); extdecl; 1109 | glNormal3i: procedure (nx: GLint; ny: GLint; nz: GLint); extdecl; 1110 | glNormal3iv: procedure (v: PGLint); extdecl; 1111 | glNormal3s: procedure (nx: GLshort; ny: GLshort; nz: GLshort); extdecl; 1112 | glNormal3sv: procedure (v: PGLshort); extdecl; 1113 | glRasterPos2d: procedure (x: GLdouble; y: GLdouble); extdecl; 1114 | glRasterPos2dv: procedure (v: PGLdouble); extdecl; 1115 | glRasterPos2f: procedure (x: GLfloat; y: GLfloat); extdecl; 1116 | glRasterPos2fv: procedure (v: PGLfloat); extdecl; 1117 | glRasterPos2i: procedure (x: GLint; y: GLint); extdecl; 1118 | glRasterPos2iv: procedure (v: PGLint); extdecl; 1119 | glRasterPos2s: procedure (x: GLshort; y: GLshort); extdecl; 1120 | glRasterPos2sv: procedure (v: PGLshort); extdecl; 1121 | glRasterPos3d: procedure (x: GLdouble; y: GLdouble; z: GLdouble); extdecl; 1122 | glRasterPos3dv: procedure (v: PGLdouble); extdecl; 1123 | glRasterPos3f: procedure (x: GLfloat; y: GLfloat; z: GLfloat); extdecl; 1124 | glRasterPos3fv: procedure (v: PGLfloat); extdecl; 1125 | glRasterPos3i: procedure (x: GLint; y: GLint; z: GLint); extdecl; 1126 | glRasterPos3iv: procedure (v: PGLint); extdecl; 1127 | glRasterPos3s: procedure (x: GLshort; y: GLshort; z: GLshort); extdecl; 1128 | glRasterPos3sv: procedure (v: PGLshort); extdecl; 1129 | glRasterPos4d: procedure (x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl; 1130 | glRasterPos4dv: procedure (v: PGLdouble); extdecl; 1131 | glRasterPos4f: procedure (x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl; 1132 | glRasterPos4fv: procedure (v: PGLfloat); extdecl; 1133 | glRasterPos4i: procedure (x: GLint; y: GLint; z: GLint; w: GLint); extdecl; 1134 | glRasterPos4iv: procedure (v: PGLint); extdecl; 1135 | glRasterPos4s: procedure (x: GLshort; y: GLshort; z: GLshort; w: GLshort); extdecl; 1136 | glRasterPos4sv: procedure (v: PGLshort); extdecl; 1137 | glRectd: procedure (x1: GLdouble; y1: GLdouble; x2: GLdouble; y2: GLdouble); extdecl; 1138 | glRectdv: procedure (v1: PGLdouble; v2: PGLdouble); extdecl; 1139 | glRectf: procedure (x1: GLfloat; y1: GLfloat; x2: GLfloat; y2: GLfloat); extdecl; 1140 | glRectfv: procedure (v1: PGLfloat; v2: PGLfloat); extdecl; 1141 | glRecti: procedure (x1: GLint; y1: GLint; x2: GLint; y2: GLint); extdecl; 1142 | glRectiv: procedure (v1: PGLint; v2: PGLint); extdecl; 1143 | glRects: procedure (x1: GLshort; y1: GLshort; x2: GLshort; y2: GLshort); extdecl; 1144 | glRectsv: procedure (v1: PGLshort; v2: PGLshort); extdecl; 1145 | glTexCoord1d: procedure (s: GLdouble); extdecl; 1146 | glTexCoord1dv: procedure (v: PGLdouble); extdecl; 1147 | glTexCoord1f: procedure (s: GLfloat); extdecl; 1148 | glTexCoord1fv: procedure (v: PGLfloat); extdecl; 1149 | glTexCoord1i: procedure (s: GLint); extdecl; 1150 | glTexCoord1iv: procedure (v: PGLint); extdecl; 1151 | glTexCoord1s: procedure (s: GLshort); extdecl; 1152 | glTexCoord1sv: procedure (v: PGLshort); extdecl; 1153 | glTexCoord2d: procedure (s: GLdouble; t: GLdouble); extdecl; 1154 | glTexCoord2dv: procedure (v: PGLdouble); extdecl; 1155 | glTexCoord2f: procedure (s: GLfloat; t: GLfloat); extdecl; 1156 | glTexCoord2fv: procedure (v: PGLfloat); extdecl; 1157 | glTexCoord2i: procedure (s: GLint; t: GLint); extdecl; 1158 | glTexCoord2iv: procedure (v: PGLint); extdecl; 1159 | glTexCoord2s: procedure (s: GLshort; t: GLshort); extdecl; 1160 | glTexCoord2sv: procedure (v: PGLshort); extdecl; 1161 | glTexCoord3d: procedure (s: GLdouble; t: GLdouble; r: GLdouble); extdecl; 1162 | glTexCoord3dv: procedure (v: PGLdouble); extdecl; 1163 | glTexCoord3f: procedure (s: GLfloat; t: GLfloat; r: GLfloat); extdecl; 1164 | glTexCoord3fv: procedure (v: PGLfloat); extdecl; 1165 | glTexCoord3i: procedure (s: GLint; t: GLint; r: GLint); extdecl; 1166 | glTexCoord3iv: procedure (v: PGLint); extdecl; 1167 | glTexCoord3s: procedure (s: GLshort; t: GLshort; r: GLshort); extdecl; 1168 | glTexCoord3sv: procedure (v: PGLshort); extdecl; 1169 | glTexCoord4d: procedure (s: GLdouble; t: GLdouble; r: GLdouble; q: GLdouble); extdecl; 1170 | glTexCoord4dv: procedure (v: PGLdouble); extdecl; 1171 | glTexCoord4f: procedure (s: GLfloat; t: GLfloat; r: GLfloat; q: GLfloat); extdecl; 1172 | glTexCoord4fv: procedure (v: PGLfloat); extdecl; 1173 | glTexCoord4i: procedure (s: GLint; t: GLint; r: GLint; q: GLint); extdecl; 1174 | glTexCoord4iv: procedure (v: PGLint); extdecl; 1175 | glTexCoord4s: procedure (s: GLshort; t: GLshort; r: GLshort; q: GLshort); extdecl; 1176 | glTexCoord4sv: procedure (v: PGLshort); extdecl; 1177 | glVertex2d: procedure (x: GLdouble; y: GLdouble); extdecl; 1178 | glVertex2dv: procedure (v: PGLdouble); extdecl; 1179 | glVertex2f: procedure (x: GLfloat; y: GLfloat); extdecl; 1180 | glVertex2fv: procedure (v: PGLfloat); extdecl; 1181 | glVertex2i: procedure (x: GLint; y: GLint); extdecl; 1182 | glVertex2iv: procedure (v: PGLint); extdecl; 1183 | glVertex2s: procedure (x: GLshort; y: GLshort); extdecl; 1184 | glVertex2sv: procedure (v: PGLshort); extdecl; 1185 | glVertex3d: procedure (x: GLdouble; y: GLdouble; z: GLdouble); extdecl; 1186 | glVertex3dv: procedure (v: PGLdouble); extdecl; 1187 | glVertex3f: procedure (x: GLfloat; y: GLfloat; z: GLfloat); extdecl; 1188 | glVertex3fv: procedure (v: PGLfloat); extdecl; 1189 | glVertex3i: procedure (x: GLint; y: GLint; z: GLint); extdecl; 1190 | glVertex3iv: procedure (v: PGLint); extdecl; 1191 | glVertex3s: procedure (x: GLshort; y: GLshort; z: GLshort); extdecl; 1192 | glVertex3sv: procedure (v: PGLshort); extdecl; 1193 | glVertex4d: procedure (x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl; 1194 | glVertex4dv: procedure (v: PGLdouble); extdecl; 1195 | glVertex4f: procedure (x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl; 1196 | glVertex4fv: procedure (v: PGLfloat); extdecl; 1197 | glVertex4i: procedure (x: GLint; y: GLint; z: GLint; w: GLint); extdecl; 1198 | glVertex4iv: procedure (v: PGLint); extdecl; 1199 | glVertex4s: procedure (x: GLshort; y: GLshort; z: GLshort; w: GLshort); extdecl; 1200 | glVertex4sv: procedure (v: PGLshort); extdecl; 1201 | glClipPlane: procedure (plane: GLenum; equation: PGLdouble); extdecl; 1202 | glColorMaterial: procedure (face: GLenum; mode: GLenum); extdecl; 1203 | glFogf: procedure (pname: GLenum; param: GLfloat); extdecl; 1204 | glFogfv: procedure (pname: GLenum; params: PGLfloat); extdecl; 1205 | glFogi: procedure (pname: GLenum; param: GLint); extdecl; 1206 | glFogiv: procedure (pname: GLenum; params: PGLint); extdecl; 1207 | glLightf: procedure (light: GLenum; pname: GLenum; param: GLfloat); extdecl; 1208 | glLightfv: procedure (light: GLenum; pname: GLenum; params: PGLfloat); extdecl; 1209 | glLighti: procedure (light: GLenum; pname: GLenum; param: GLint); extdecl; 1210 | glLightiv: procedure (light: GLenum; pname: GLenum; params: PGLint); extdecl; 1211 | glLightModelf: procedure (pname: GLenum; param: GLfloat); extdecl; 1212 | glLightModelfv: procedure (pname: GLenum; params: PGLfloat); extdecl; 1213 | glLightModeli: procedure (pname: GLenum; param: GLint); extdecl; 1214 | glLightModeliv: procedure (pname: GLenum; params: PGLint); extdecl; 1215 | glLineStipple: procedure (factor: GLint; pattern: GLushort); extdecl; 1216 | glMaterialf: procedure (face: GLenum; pname: GLenum; param: GLfloat); extdecl; 1217 | glMaterialfv: procedure (face: GLenum; pname: GLenum; params: PGLfloat); extdecl; 1218 | glMateriali: procedure (face: GLenum; pname: GLenum; param: GLint); extdecl; 1219 | glMaterialiv: procedure (face: GLenum; pname: GLenum; params: PGLint); extdecl; 1220 | glPolygonStipple: procedure (mask: PGLubyte); extdecl; 1221 | glShadeModel: procedure (mode: GLenum); extdecl; 1222 | glTexEnvf: procedure (target: GLenum; pname: GLenum; param: GLfloat); extdecl; 1223 | glTexEnvfv: procedure (target: GLenum; pname: GLenum; params: PGLfloat); extdecl; 1224 | glTexEnvi: procedure (target: GLenum; pname: GLenum; param: GLint); extdecl; 1225 | glTexEnviv: procedure (target: GLenum; pname: GLenum; params: PGLint); extdecl; 1226 | glTexGend: procedure (coord: GLenum; pname: GLenum; param: GLdouble); extdecl; 1227 | glTexGendv: procedure (coord: GLenum; pname: GLenum; params: PGLdouble); extdecl; 1228 | glTexGenf: procedure (coord: GLenum; pname: GLenum; param: GLfloat); extdecl; 1229 | glTexGenfv: procedure (coord: GLenum; pname: GLenum; params: PGLfloat); extdecl; 1230 | glTexGeni: procedure (coord: GLenum; pname: GLenum; param: GLint); extdecl; 1231 | glTexGeniv: procedure (coord: GLenum; pname: GLenum; params: PGLint); extdecl; 1232 | glFeedbackBuffer: procedure (size: GLsizei; type_: GLenum; buffer: PGLfloat); extdecl; 1233 | glSelectBuffer: procedure (size: GLsizei; buffer: PGLuint); extdecl; 1234 | glRenderMode: function (mode: GLenum): GLint; extdecl; 1235 | glInitNames: procedure (); extdecl; 1236 | glLoadName: procedure (name: GLuint); extdecl; 1237 | glPassThrough: procedure (token: GLfloat); extdecl; 1238 | glPopName: procedure (); extdecl; 1239 | glPushName: procedure (name: GLuint); extdecl; 1240 | glClearAccum: procedure (red: GLfloat; green: GLfloat; blue: GLfloat; alpha: GLfloat); extdecl; 1241 | glClearIndex: procedure (c: GLfloat); extdecl; 1242 | glIndexMask: procedure (mask: GLuint); extdecl; 1243 | glAccum: procedure (op: GLenum; value: GLfloat); extdecl; 1244 | glPopAttrib: procedure (); extdecl; 1245 | glPushAttrib: procedure (mask: GLbitfield); extdecl; 1246 | glMap1d: procedure (target: GLenum; u1: GLdouble; u2: GLdouble; stride: GLint; order: GLint; points: PGLdouble); extdecl; 1247 | glMap1f: procedure (target: GLenum; u1: GLfloat; u2: GLfloat; stride: GLint; order: GLint; points: PGLfloat); extdecl; 1248 | glMap2d: procedure (target: GLenum; u1: GLdouble; u2: GLdouble; ustride: GLint; uorder: GLint; v1: GLdouble; v2: GLdouble; vstride: GLint; vorder: GLint; points: PGLdouble); extdecl; 1249 | glMap2f: procedure (target: GLenum; u1: GLfloat; u2: GLfloat; ustride: GLint; uorder: GLint; v1: GLfloat; v2: GLfloat; vstride: GLint; vorder: GLint; points: PGLfloat); extdecl; 1250 | glMapGrid1d: procedure (un: GLint; u1: GLdouble; u2: GLdouble); extdecl; 1251 | glMapGrid1f: procedure (un: GLint; u1: GLfloat; u2: GLfloat); extdecl; 1252 | glMapGrid2d: procedure (un: GLint; u1: GLdouble; u2: GLdouble; vn: GLint; v1: GLdouble; v2: GLdouble); extdecl; 1253 | glMapGrid2f: procedure (un: GLint; u1: GLfloat; u2: GLfloat; vn: GLint; v1: GLfloat; v2: GLfloat); extdecl; 1254 | glEvalCoord1d: procedure (u: GLdouble); extdecl; 1255 | glEvalCoord1dv: procedure (u: PGLdouble); extdecl; 1256 | glEvalCoord1f: procedure (u: GLfloat); extdecl; 1257 | glEvalCoord1fv: procedure (u: PGLfloat); extdecl; 1258 | glEvalCoord2d: procedure (u: GLdouble; v: GLdouble); extdecl; 1259 | glEvalCoord2dv: procedure (u: PGLdouble); extdecl; 1260 | glEvalCoord2f: procedure (u: GLfloat; v: GLfloat); extdecl; 1261 | glEvalCoord2fv: procedure (u: PGLfloat); extdecl; 1262 | glEvalMesh1: procedure (mode: GLenum; i1: GLint; i2: GLint); extdecl; 1263 | glEvalPoint1: procedure (i: GLint); extdecl; 1264 | glEvalMesh2: procedure (mode: GLenum; i1: GLint; i2: GLint; j1: GLint; j2: GLint); extdecl; 1265 | glEvalPoint2: procedure (i: GLint; j: GLint); extdecl; 1266 | glAlphaFunc: procedure (func: GLenum; ref: GLfloat); extdecl; 1267 | glPixelZoom: procedure (xfactor: GLfloat; yfactor: GLfloat); extdecl; 1268 | glPixelTransferf: procedure (pname: GLenum; param: GLfloat); extdecl; 1269 | glPixelTransferi: procedure (pname: GLenum; param: GLint); extdecl; 1270 | glPixelMapfv: procedure (map: GLenum; mapsize: GLsizei; values: PGLfloat); extdecl; 1271 | glPixelMapuiv: procedure (map: GLenum; mapsize: GLsizei; values: PGLuint); extdecl; 1272 | glPixelMapusv: procedure (map: GLenum; mapsize: GLsizei; values: PGLushort); extdecl; 1273 | glCopyPixels: procedure (x: GLint; y: GLint; width: GLsizei; height: GLsizei; type_: GLenum); extdecl; 1274 | glDrawPixels: procedure (width: GLsizei; height: GLsizei; format: GLenum; type_: GLenum; pixels: Pointer); extdecl; 1275 | glGetClipPlane: procedure (plane: GLenum; equation: PGLdouble); extdecl; 1276 | glGetLightfv: procedure (light: GLenum; pname: GLenum; params: PGLfloat); extdecl; 1277 | glGetLightiv: procedure (light: GLenum; pname: GLenum; params: PGLint); extdecl; 1278 | glGetMapdv: procedure (target: GLenum; query: GLenum; v: PGLdouble); extdecl; 1279 | glGetMapfv: procedure (target: GLenum; query: GLenum; v: PGLfloat); extdecl; 1280 | glGetMapiv: procedure (target: GLenum; query: GLenum; v: PGLint); extdecl; 1281 | glGetMaterialfv: procedure (face: GLenum; pname: GLenum; params: PGLfloat); extdecl; 1282 | glGetMaterialiv: procedure (face: GLenum; pname: GLenum; params: PGLint); extdecl; 1283 | glGetPixelMapfv: procedure (map: GLenum; values: PGLfloat); extdecl; 1284 | glGetPixelMapuiv: procedure (map: GLenum; values: PGLuint); extdecl; 1285 | glGetPixelMapusv: procedure (map: GLenum; values: PGLushort); extdecl; 1286 | glGetPolygonStipple: procedure (mask: PGLubyte); extdecl; 1287 | glGetTexEnvfv: procedure (target: GLenum; pname: GLenum; params: PGLfloat); extdecl; 1288 | glGetTexEnviv: procedure (target: GLenum; pname: GLenum; params: PGLint); extdecl; 1289 | glGetTexGendv: procedure (coord: GLenum; pname: GLenum; params: PGLdouble); extdecl; 1290 | glGetTexGenfv: procedure (coord: GLenum; pname: GLenum; params: PGLfloat); extdecl; 1291 | glGetTexGeniv: procedure (coord: GLenum; pname: GLenum; params: PGLint); extdecl; 1292 | glIsList: function (list: GLuint): GLboolean; extdecl; 1293 | glFrustum: procedure (left: GLdouble; right: GLdouble; bottom: GLdouble; top: GLdouble; zNear: GLdouble; zFar: GLdouble); extdecl; 1294 | glLoadIdentity: procedure (); extdecl; 1295 | glLoadMatrixf: procedure (m: PGLfloat); extdecl; 1296 | glLoadMatrixd: procedure (m: PGLdouble); extdecl; 1297 | glMatrixMode: procedure (mode: GLenum); extdecl; 1298 | glMultMatrixf: procedure (m: PGLfloat); extdecl; 1299 | glMultMatrixd: procedure (m: PGLdouble); extdecl; 1300 | glOrtho: procedure (left: GLdouble; right: GLdouble; bottom: GLdouble; top: GLdouble; zNear: GLdouble; zFar: GLdouble); extdecl; 1301 | glPopMatrix: procedure (); extdecl; 1302 | glPushMatrix: procedure (); extdecl; 1303 | glRotated: procedure (angle: GLdouble; x: GLdouble; y: GLdouble; z: GLdouble); extdecl; 1304 | glRotatef: procedure (angle: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl; 1305 | glScaled: procedure (x: GLdouble; y: GLdouble; z: GLdouble); extdecl; 1306 | glScalef: procedure (x: GLfloat; y: GLfloat; z: GLfloat); extdecl; 1307 | glTranslated: procedure (x: GLdouble; y: GLdouble; z: GLdouble); extdecl; 1308 | glTranslatef: procedure (x: GLfloat; y: GLfloat; z: GLfloat); extdecl; 1309 | glDrawArrays: procedure (mode: GLenum; first: GLint; count: GLsizei); extdecl; 1310 | glDrawElements: procedure (mode: GLenum; count: GLsizei; type_: GLenum; indices: Pointer); extdecl; 1311 | glGetPointerv: procedure (pname: GLenum; params: PPointer); extdecl; 1312 | glPolygonOffset: procedure (factor: GLfloat; units: GLfloat); extdecl; 1313 | glCopyTexImage1D: procedure (target: GLenum; level: GLint; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; border: GLint); extdecl; 1314 | glCopyTexImage2D: procedure (target: GLenum; level: GLint; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; height: GLsizei; border: GLint); extdecl; 1315 | glCopyTexSubImage1D: procedure (target: GLenum; level: GLint; xoffset: GLint; x: GLint; y: GLint; width: GLsizei); extdecl; 1316 | glCopyTexSubImage2D: procedure (target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei); extdecl; 1317 | glTexSubImage1D: procedure (target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; type_: GLenum; pixels: Pointer); extdecl; 1318 | glTexSubImage2D: procedure (target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; type_: GLenum; pixels: Pointer); extdecl; 1319 | glBindTexture: procedure (target: GLenum; texture: GLuint); extdecl; 1320 | glDeleteTextures: procedure (n: GLsizei; textures: PGLuint); extdecl; 1321 | glGenTextures: procedure (n: GLsizei; textures: PGLuint); extdecl; 1322 | glIsTexture: function (texture: GLuint): GLboolean; extdecl; 1323 | glArrayElement: procedure (i: GLint); extdecl; 1324 | glColorPointer: procedure (size: GLint; type_: GLenum; stride: GLsizei; pointer: Pointer); extdecl; 1325 | glDisableClientState: procedure (array_: GLenum); extdecl; 1326 | glEdgeFlagPointer: procedure (stride: GLsizei; pointer: Pointer); extdecl; 1327 | glEnableClientState: procedure (array_: GLenum); extdecl; 1328 | glIndexPointer: procedure (type_: GLenum; stride: GLsizei; pointer: Pointer); extdecl; 1329 | glInterleavedArrays: procedure (format: GLenum; stride: GLsizei; pointer: Pointer); extdecl; 1330 | glNormalPointer: procedure (type_: GLenum; stride: GLsizei; pointer: Pointer); extdecl; 1331 | glTexCoordPointer: procedure (size: GLint; type_: GLenum; stride: GLsizei; pointer: Pointer); extdecl; 1332 | glVertexPointer: procedure (size: GLint; type_: GLenum; stride: GLsizei; pointer: Pointer); extdecl; 1333 | glAreTexturesResident: function (n: GLsizei; textures: PGLuint; residences: PGLboolean): GLboolean; extdecl; 1334 | glPrioritizeTextures: procedure (n: GLsizei; textures: PGLuint; priorities: PGLfloat); extdecl; 1335 | glIndexub: procedure (c: GLubyte); extdecl; 1336 | glIndexubv: procedure (c: PGLubyte); extdecl; 1337 | glPopClientAttrib: procedure (); extdecl; 1338 | glPushClientAttrib: procedure (mask: GLbitfield); extdecl; 1339 | glDrawRangeElements: procedure (mode: GLenum; start: GLuint; end_: GLuint; count: GLsizei; type_: GLenum; indices: Pointer); extdecl; 1340 | glTexImage3D: procedure (target: GLenum; level: GLint; internalformat: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; format: GLenum; type_: GLenum; pixels: Pointer); extdecl; 1341 | glTexSubImage3D: procedure (target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; type_: GLenum; pixels: Pointer); extdecl; 1342 | glCopyTexSubImage3D: procedure (target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei); extdecl; 1343 | glActiveTexture: procedure (texture: GLenum); extdecl; 1344 | glSampleCoverage: procedure (value: GLfloat; invert: GLboolean); extdecl; 1345 | glCompressedTexImage3D: procedure (target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; imageSize: GLsizei; data: Pointer); extdecl; 1346 | glCompressedTexImage2D: procedure (target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; border: GLint; imageSize: GLsizei; data: Pointer); extdecl; 1347 | glCompressedTexImage1D: procedure (target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; border: GLint; imageSize: GLsizei; data: Pointer); extdecl; 1348 | glCompressedTexSubImage3D: procedure (target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; imageSize: GLsizei; data: Pointer); extdecl; 1349 | glCompressedTexSubImage2D: procedure (target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; imageSize: GLsizei; data: Pointer); extdecl; 1350 | glCompressedTexSubImage1D: procedure (target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; imageSize: GLsizei; data: Pointer); extdecl; 1351 | glGetCompressedTexImage: procedure (target: GLenum; level: GLint; img: Pointer); extdecl; 1352 | glClientActiveTexture: procedure (texture: GLenum); extdecl; 1353 | glMultiTexCoord1d: procedure (target: GLenum; s: GLdouble); extdecl; 1354 | glMultiTexCoord1dv: procedure (target: GLenum; v: PGLdouble); extdecl; 1355 | glMultiTexCoord1f: procedure (target: GLenum; s: GLfloat); extdecl; 1356 | glMultiTexCoord1fv: procedure (target: GLenum; v: PGLfloat); extdecl; 1357 | glMultiTexCoord1i: procedure (target: GLenum; s: GLint); extdecl; 1358 | glMultiTexCoord1iv: procedure (target: GLenum; v: PGLint); extdecl; 1359 | glMultiTexCoord1s: procedure (target: GLenum; s: GLshort); extdecl; 1360 | glMultiTexCoord1sv: procedure (target: GLenum; v: PGLshort); extdecl; 1361 | glMultiTexCoord2d: procedure (target: GLenum; s: GLdouble; t: GLdouble); extdecl; 1362 | glMultiTexCoord2dv: procedure (target: GLenum; v: PGLdouble); extdecl; 1363 | glMultiTexCoord2f: procedure (target: GLenum; s: GLfloat; t: GLfloat); extdecl; 1364 | glMultiTexCoord2fv: procedure (target: GLenum; v: PGLfloat); extdecl; 1365 | glMultiTexCoord2i: procedure (target: GLenum; s: GLint; t: GLint); extdecl; 1366 | glMultiTexCoord2iv: procedure (target: GLenum; v: PGLint); extdecl; 1367 | glMultiTexCoord2s: procedure (target: GLenum; s: GLshort; t: GLshort); extdecl; 1368 | glMultiTexCoord2sv: procedure (target: GLenum; v: PGLshort); extdecl; 1369 | glMultiTexCoord3d: procedure (target: GLenum; s: GLdouble; t: GLdouble; r: GLdouble); extdecl; 1370 | glMultiTexCoord3dv: procedure (target: GLenum; v: PGLdouble); extdecl; 1371 | glMultiTexCoord3f: procedure (target: GLenum; s: GLfloat; t: GLfloat; r: GLfloat); extdecl; 1372 | glMultiTexCoord3fv: procedure (target: GLenum; v: PGLfloat); extdecl; 1373 | glMultiTexCoord3i: procedure (target: GLenum; s: GLint; t: GLint; r: GLint); extdecl; 1374 | glMultiTexCoord3iv: procedure (target: GLenum; v: PGLint); extdecl; 1375 | glMultiTexCoord3s: procedure (target: GLenum; s: GLshort; t: GLshort; r: GLshort); extdecl; 1376 | glMultiTexCoord3sv: procedure (target: GLenum; v: PGLshort); extdecl; 1377 | glMultiTexCoord4d: procedure (target: GLenum; s: GLdouble; t: GLdouble; r: GLdouble; q: GLdouble); extdecl; 1378 | glMultiTexCoord4dv: procedure (target: GLenum; v: PGLdouble); extdecl; 1379 | glMultiTexCoord4f: procedure (target: GLenum; s: GLfloat; t: GLfloat; r: GLfloat; q: GLfloat); extdecl; 1380 | glMultiTexCoord4fv: procedure (target: GLenum; v: PGLfloat); extdecl; 1381 | glMultiTexCoord4i: procedure (target: GLenum; s: GLint; t: GLint; r: GLint; q: GLint); extdecl; 1382 | glMultiTexCoord4iv: procedure (target: GLenum; v: PGLint); extdecl; 1383 | glMultiTexCoord4s: procedure (target: GLenum; s: GLshort; t: GLshort; r: GLshort; q: GLshort); extdecl; 1384 | glMultiTexCoord4sv: procedure (target: GLenum; v: PGLshort); extdecl; 1385 | glLoadTransposeMatrixf: procedure (m: PGLfloat); extdecl; 1386 | glLoadTransposeMatrixd: procedure (m: PGLdouble); extdecl; 1387 | glMultTransposeMatrixf: procedure (m: PGLfloat); extdecl; 1388 | glMultTransposeMatrixd: procedure (m: PGLdouble); extdecl; 1389 | glBlendFuncSeparate: procedure (sfactorRGB: GLenum; dfactorRGB: GLenum; sfactorAlpha: GLenum; dfactorAlpha: GLenum); extdecl; 1390 | glMultiDrawArrays: procedure (mode: GLenum; first: PGLint; count: PGLsizei; drawcount: GLsizei); extdecl; 1391 | glMultiDrawElements: procedure (mode: GLenum; count: PGLsizei; type_: GLenum; indices: PPointer; drawcount: GLsizei); extdecl; 1392 | glPointParameterf: procedure (pname: GLenum; param: GLfloat); extdecl; 1393 | glPointParameterfv: procedure (pname: GLenum; params: PGLfloat); extdecl; 1394 | glPointParameteri: procedure (pname: GLenum; param: GLint); extdecl; 1395 | glPointParameteriv: procedure (pname: GLenum; params: PGLint); extdecl; 1396 | glFogCoordf: procedure (coord: GLfloat); extdecl; 1397 | glFogCoordfv: procedure (coord: PGLfloat); extdecl; 1398 | glFogCoordd: procedure (coord: GLdouble); extdecl; 1399 | glFogCoorddv: procedure (coord: PGLdouble); extdecl; 1400 | glFogCoordPointer: procedure (type_: GLenum; stride: GLsizei; pointer: Pointer); extdecl; 1401 | glSecondaryColor3b: procedure (red: GLbyte; green: GLbyte; blue: GLbyte); extdecl; 1402 | glSecondaryColor3bv: procedure (v: PGLbyte); extdecl; 1403 | glSecondaryColor3d: procedure (red: GLdouble; green: GLdouble; blue: GLdouble); extdecl; 1404 | glSecondaryColor3dv: procedure (v: PGLdouble); extdecl; 1405 | glSecondaryColor3f: procedure (red: GLfloat; green: GLfloat; blue: GLfloat); extdecl; 1406 | glSecondaryColor3fv: procedure (v: PGLfloat); extdecl; 1407 | glSecondaryColor3i: procedure (red: GLint; green: GLint; blue: GLint); extdecl; 1408 | glSecondaryColor3iv: procedure (v: PGLint); extdecl; 1409 | glSecondaryColor3s: procedure (red: GLshort; green: GLshort; blue: GLshort); extdecl; 1410 | glSecondaryColor3sv: procedure (v: PGLshort); extdecl; 1411 | glSecondaryColor3ub: procedure (red: GLubyte; green: GLubyte; blue: GLubyte); extdecl; 1412 | glSecondaryColor3ubv: procedure (v: PGLubyte); extdecl; 1413 | glSecondaryColor3ui: procedure (red: GLuint; green: GLuint; blue: GLuint); extdecl; 1414 | glSecondaryColor3uiv: procedure (v: PGLuint); extdecl; 1415 | glSecondaryColor3us: procedure (red: GLushort; green: GLushort; blue: GLushort); extdecl; 1416 | glSecondaryColor3usv: procedure (v: PGLushort); extdecl; 1417 | glSecondaryColorPointer: procedure (size: GLint; type_: GLenum; stride: GLsizei; pointer: Pointer); extdecl; 1418 | glWindowPos2d: procedure (x: GLdouble; y: GLdouble); extdecl; 1419 | glWindowPos2dv: procedure (v: PGLdouble); extdecl; 1420 | glWindowPos2f: procedure (x: GLfloat; y: GLfloat); extdecl; 1421 | glWindowPos2fv: procedure (v: PGLfloat); extdecl; 1422 | glWindowPos2i: procedure (x: GLint; y: GLint); extdecl; 1423 | glWindowPos2iv: procedure (v: PGLint); extdecl; 1424 | glWindowPos2s: procedure (x: GLshort; y: GLshort); extdecl; 1425 | glWindowPos2sv: procedure (v: PGLshort); extdecl; 1426 | glWindowPos3d: procedure (x: GLdouble; y: GLdouble; z: GLdouble); extdecl; 1427 | glWindowPos3dv: procedure (v: PGLdouble); extdecl; 1428 | glWindowPos3f: procedure (x: GLfloat; y: GLfloat; z: GLfloat); extdecl; 1429 | glWindowPos3fv: procedure (v: PGLfloat); extdecl; 1430 | glWindowPos3i: procedure (x: GLint; y: GLint; z: GLint); extdecl; 1431 | glWindowPos3iv: procedure (v: PGLint); extdecl; 1432 | glWindowPos3s: procedure (x: GLshort; y: GLshort; z: GLshort); extdecl; 1433 | glWindowPos3sv: procedure (v: PGLshort); extdecl; 1434 | glBlendColor: procedure (red: GLfloat; green: GLfloat; blue: GLfloat; alpha: GLfloat); extdecl; 1435 | glBlendEquation: procedure (mode: GLenum); extdecl; 1436 | glGenQueries: procedure (n: GLsizei; ids: PGLuint); extdecl; 1437 | glDeleteQueries: procedure (n: GLsizei; ids: PGLuint); extdecl; 1438 | glIsQuery: function (id: GLuint): GLboolean; extdecl; 1439 | glBeginQuery: procedure (target: GLenum; id: GLuint); extdecl; 1440 | glEndQuery: procedure (target: GLenum); extdecl; 1441 | glGetQueryiv: procedure (target: GLenum; pname: GLenum; params: PGLint); extdecl; 1442 | glGetQueryObjectiv: procedure (id: GLuint; pname: GLenum; params: PGLint); extdecl; 1443 | glGetQueryObjectuiv: procedure (id: GLuint; pname: GLenum; params: PGLuint); extdecl; 1444 | glBindBuffer: procedure (target: GLenum; buffer: GLuint); extdecl; 1445 | glDeleteBuffers: procedure (n: GLsizei; buffers: PGLuint); extdecl; 1446 | glGenBuffers: procedure (n: GLsizei; buffers: PGLuint); extdecl; 1447 | glIsBuffer: function (buffer: GLuint): GLboolean; extdecl; 1448 | glBufferData: procedure (target: GLenum; size: GLsizeiptr; data: Pointer; usage: GLenum); extdecl; 1449 | glBufferSubData: procedure (target: GLenum; offset: GLintptr; size: GLsizeiptr; data: Pointer); extdecl; 1450 | glGetBufferSubData: procedure (target: GLenum; offset: GLintptr; size: GLsizeiptr; data: Pointer); extdecl; 1451 | glMapBuffer: function (target: GLenum; access: GLenum): Pointer; extdecl; 1452 | glUnmapBuffer: function (target: GLenum): GLboolean; extdecl; 1453 | glGetBufferParameteriv: procedure (target: GLenum; pname: GLenum; params: PGLint); extdecl; 1454 | glGetBufferPointerv: procedure (target: GLenum; pname: GLenum; params: PPointer); extdecl; 1455 | glBlendEquationSeparate: procedure (modeRGB: GLenum; modeAlpha: GLenum); extdecl; 1456 | glDrawBuffers: procedure (n: GLsizei; bufs: PGLenum); extdecl; 1457 | glStencilOpSeparate: procedure (face: GLenum; sfail: GLenum; dpfail: GLenum; dppass: GLenum); extdecl; 1458 | glStencilFuncSeparate: procedure (face: GLenum; func: GLenum; ref: GLint; mask: GLuint); extdecl; 1459 | glStencilMaskSeparate: procedure (face: GLenum; mask: GLuint); extdecl; 1460 | glAttachShader: procedure (program_: GLuint; shader: GLuint); extdecl; 1461 | glBindAttribLocation: procedure (program_: GLuint; index: GLuint; name: PGLchar); extdecl; 1462 | glCompileShader: procedure (shader: GLuint); extdecl; 1463 | glCreateProgram: function (): GLuint; extdecl; 1464 | glCreateShader: function (type_: GLenum): GLuint; extdecl; 1465 | glDeleteProgram: procedure (program_: GLuint); extdecl; 1466 | glDeleteShader: procedure (shader: GLuint); extdecl; 1467 | glDetachShader: procedure (program_: GLuint; shader: GLuint); extdecl; 1468 | glDisableVertexAttribArray: procedure (index: GLuint); extdecl; 1469 | glEnableVertexAttribArray: procedure (index: GLuint); extdecl; 1470 | glGetActiveAttrib: procedure (program_: GLuint; index: GLuint; bufSize: GLsizei; length: PGLsizei; size: PGLint; type_: PGLenum; name: PGLchar); extdecl; 1471 | glGetActiveUniform: procedure (program_: GLuint; index: GLuint; bufSize: GLsizei; length: PGLsizei; size: PGLint; type_: PGLenum; name: PGLchar); extdecl; 1472 | glGetAttachedShaders: procedure (program_: GLuint; maxCount: GLsizei; count: PGLsizei; shaders: PGLuint); extdecl; 1473 | glGetAttribLocation: function (program_: GLuint; name: PGLchar): GLint; extdecl; 1474 | glGetProgramiv: procedure (program_: GLuint; pname: GLenum; params: PGLint); extdecl; 1475 | glGetProgramInfoLog: procedure (program_: GLuint; bufSize: GLsizei; length: PGLsizei; infoLog: PGLchar); extdecl; 1476 | glGetShaderiv: procedure (shader: GLuint; pname: GLenum; params: PGLint); extdecl; 1477 | glGetShaderInfoLog: procedure (shader: GLuint; bufSize: GLsizei; length: PGLsizei; infoLog: PGLchar); extdecl; 1478 | glGetShaderSource: procedure (shader: GLuint; bufSize: GLsizei; length: PGLsizei; source: PGLchar); extdecl; 1479 | glGetUniformLocation: function (program_: GLuint; name: PGLchar): GLint; extdecl; 1480 | glGetUniformfv: procedure (program_: GLuint; location: GLint; params: PGLfloat); extdecl; 1481 | glGetUniformiv: procedure (program_: GLuint; location: GLint; params: PGLint); extdecl; 1482 | glGetVertexAttribdv: procedure (index: GLuint; pname: GLenum; params: PGLdouble); extdecl; 1483 | glGetVertexAttribfv: procedure (index: GLuint; pname: GLenum; params: PGLfloat); extdecl; 1484 | glGetVertexAttribiv: procedure (index: GLuint; pname: GLenum; params: PGLint); extdecl; 1485 | glGetVertexAttribPointerv: procedure (index: GLuint; pname: GLenum; pointer: PPointer); extdecl; 1486 | glIsProgram: function (program_: GLuint): GLboolean; extdecl; 1487 | glIsShader: function (shader: GLuint): GLboolean; extdecl; 1488 | glLinkProgram: procedure (program_: GLuint); extdecl; 1489 | glShaderSource: procedure (shader: GLuint; count: GLsizei; string_: PPGLchar; length: PGLint); extdecl; 1490 | glUseProgram: procedure (program_: GLuint); extdecl; 1491 | glUniform1f: procedure (location: GLint; v0: GLfloat); extdecl; 1492 | glUniform2f: procedure (location: GLint; v0: GLfloat; v1: GLfloat); extdecl; 1493 | glUniform3f: procedure (location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat); extdecl; 1494 | glUniform4f: procedure (location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat; v3: GLfloat); extdecl; 1495 | glUniform1i: procedure (location: GLint; v0: GLint); extdecl; 1496 | glUniform2i: procedure (location: GLint; v0: GLint; v1: GLint); extdecl; 1497 | glUniform3i: procedure (location: GLint; v0: GLint; v1: GLint; v2: GLint); extdecl; 1498 | glUniform4i: procedure (location: GLint; v0: GLint; v1: GLint; v2: GLint; v3: GLint); extdecl; 1499 | glUniform1fv: procedure (location: GLint; count: GLsizei; value: PGLfloat); extdecl; 1500 | glUniform2fv: procedure (location: GLint; count: GLsizei; value: PGLfloat); extdecl; 1501 | glUniform3fv: procedure (location: GLint; count: GLsizei; value: PGLfloat); extdecl; 1502 | glUniform4fv: procedure (location: GLint; count: GLsizei; value: PGLfloat); extdecl; 1503 | glUniform1iv: procedure (location: GLint; count: GLsizei; value: PGLint); extdecl; 1504 | glUniform2iv: procedure (location: GLint; count: GLsizei; value: PGLint); extdecl; 1505 | glUniform3iv: procedure (location: GLint; count: GLsizei; value: PGLint); extdecl; 1506 | glUniform4iv: procedure (location: GLint; count: GLsizei; value: PGLint); extdecl; 1507 | glUniformMatrix2fv: procedure (location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); extdecl; 1508 | glUniformMatrix3fv: procedure (location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); extdecl; 1509 | glUniformMatrix4fv: procedure (location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); extdecl; 1510 | glValidateProgram: procedure (program_: GLuint); extdecl; 1511 | glVertexAttrib1d: procedure (index: GLuint; x: GLdouble); extdecl; 1512 | glVertexAttrib1dv: procedure (index: GLuint; v: PGLdouble); extdecl; 1513 | glVertexAttrib1f: procedure (index: GLuint; x: GLfloat); extdecl; 1514 | glVertexAttrib1fv: procedure (index: GLuint; v: PGLfloat); extdecl; 1515 | glVertexAttrib1s: procedure (index: GLuint; x: GLshort); extdecl; 1516 | glVertexAttrib1sv: procedure (index: GLuint; v: PGLshort); extdecl; 1517 | glVertexAttrib2d: procedure (index: GLuint; x: GLdouble; y: GLdouble); extdecl; 1518 | glVertexAttrib2dv: procedure (index: GLuint; v: PGLdouble); extdecl; 1519 | glVertexAttrib2f: procedure (index: GLuint; x: GLfloat; y: GLfloat); extdecl; 1520 | glVertexAttrib2fv: procedure (index: GLuint; v: PGLfloat); extdecl; 1521 | glVertexAttrib2s: procedure (index: GLuint; x: GLshort; y: GLshort); extdecl; 1522 | glVertexAttrib2sv: procedure (index: GLuint; v: PGLshort); extdecl; 1523 | glVertexAttrib3d: procedure (index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble); extdecl; 1524 | glVertexAttrib3dv: procedure (index: GLuint; v: PGLdouble); extdecl; 1525 | glVertexAttrib3f: procedure (index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); extdecl; 1526 | glVertexAttrib3fv: procedure (index: GLuint; v: PGLfloat); extdecl; 1527 | glVertexAttrib3s: procedure (index: GLuint; x: GLshort; y: GLshort; z: GLshort); extdecl; 1528 | glVertexAttrib3sv: procedure (index: GLuint; v: PGLshort); extdecl; 1529 | glVertexAttrib4Nbv: procedure (index: GLuint; v: PGLbyte); extdecl; 1530 | glVertexAttrib4Niv: procedure (index: GLuint; v: PGLint); extdecl; 1531 | glVertexAttrib4Nsv: procedure (index: GLuint; v: PGLshort); extdecl; 1532 | glVertexAttrib4Nub: procedure (index: GLuint; x: GLubyte; y: GLubyte; z: GLubyte; w: GLubyte); extdecl; 1533 | glVertexAttrib4Nubv: procedure (index: GLuint; v: PGLubyte); extdecl; 1534 | glVertexAttrib4Nuiv: procedure (index: GLuint; v: PGLuint); extdecl; 1535 | glVertexAttrib4Nusv: procedure (index: GLuint; v: PGLushort); extdecl; 1536 | glVertexAttrib4bv: procedure (index: GLuint; v: PGLbyte); extdecl; 1537 | glVertexAttrib4d: procedure (index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl; 1538 | glVertexAttrib4dv: procedure (index: GLuint; v: PGLdouble); extdecl; 1539 | glVertexAttrib4f: procedure (index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl; 1540 | glVertexAttrib4fv: procedure (index: GLuint; v: PGLfloat); extdecl; 1541 | glVertexAttrib4iv: procedure (index: GLuint; v: PGLint); extdecl; 1542 | glVertexAttrib4s: procedure (index: GLuint; x: GLshort; y: GLshort; z: GLshort; w: GLshort); extdecl; 1543 | glVertexAttrib4sv: procedure (index: GLuint; v: PGLshort); extdecl; 1544 | glVertexAttrib4ubv: procedure (index: GLuint; v: PGLubyte); extdecl; 1545 | glVertexAttrib4uiv: procedure (index: GLuint; v: PGLuint); extdecl; 1546 | glVertexAttrib4usv: procedure (index: GLuint; v: PGLushort); extdecl; 1547 | glVertexAttribPointer: procedure (index: GLuint; size: GLint; type_: GLenum; normalized: GLboolean; stride: GLsizei; pointer: Pointer); extdecl; 1548 | 1549 | 1550 | (* Extensions *) 1551 | 1552 | 1553 | type 1554 | TLoadProc = function(proc: Pchar): Pointer; 1555 | 1556 | function gladLoadGL(load: TLoadProc): boolean; 1557 | 1558 | 1559 | implementation 1560 | 1561 | function hasExt(const extension: String): Boolean; 1562 | begin 1563 | result := false; 1564 | end; 1565 | 1566 | procedure load_GL_VERSION_1_0(load: TLoadProc); 1567 | begin 1568 | if not GLAD_GL_VERSION_1_0 then exit; 1569 | pointer( glCullFace ) := load('glCullFace'); 1570 | pointer( glFrontFace ) := load('glFrontFace'); 1571 | pointer( glHint ) := load('glHint'); 1572 | pointer( glLineWidth ) := load('glLineWidth'); 1573 | pointer( glPointSize ) := load('glPointSize'); 1574 | pointer( glPolygonMode ) := load('glPolygonMode'); 1575 | pointer( glScissor ) := load('glScissor'); 1576 | pointer( glTexParameterf ) := load('glTexParameterf'); 1577 | pointer( glTexParameterfv ) := load('glTexParameterfv'); 1578 | pointer( glTexParameteri ) := load('glTexParameteri'); 1579 | pointer( glTexParameteriv ) := load('glTexParameteriv'); 1580 | pointer( glTexImage1D ) := load('glTexImage1D'); 1581 | pointer( glTexImage2D ) := load('glTexImage2D'); 1582 | pointer( glDrawBuffer ) := load('glDrawBuffer'); 1583 | pointer( glClear ) := load('glClear'); 1584 | pointer( glClearColor ) := load('glClearColor'); 1585 | pointer( glClearStencil ) := load('glClearStencil'); 1586 | pointer( glClearDepth ) := load('glClearDepth'); 1587 | pointer( glStencilMask ) := load('glStencilMask'); 1588 | pointer( glColorMask ) := load('glColorMask'); 1589 | pointer( glDepthMask ) := load('glDepthMask'); 1590 | pointer( glDisable ) := load('glDisable'); 1591 | pointer( glEnable ) := load('glEnable'); 1592 | pointer( glFinish ) := load('glFinish'); 1593 | pointer( glFlush ) := load('glFlush'); 1594 | pointer( glBlendFunc ) := load('glBlendFunc'); 1595 | pointer( glLogicOp ) := load('glLogicOp'); 1596 | pointer( glStencilFunc ) := load('glStencilFunc'); 1597 | pointer( glStencilOp ) := load('glStencilOp'); 1598 | pointer( glDepthFunc ) := load('glDepthFunc'); 1599 | pointer( glPixelStoref ) := load('glPixelStoref'); 1600 | pointer( glPixelStorei ) := load('glPixelStorei'); 1601 | pointer( glReadBuffer ) := load('glReadBuffer'); 1602 | pointer( glReadPixels ) := load('glReadPixels'); 1603 | pointer( glGetBooleanv ) := load('glGetBooleanv'); 1604 | pointer( glGetDoublev ) := load('glGetDoublev'); 1605 | pointer( glGetError ) := load('glGetError'); 1606 | pointer( glGetFloatv ) := load('glGetFloatv'); 1607 | pointer( glGetIntegerv ) := load('glGetIntegerv'); 1608 | pointer( glGetString ) := load('glGetString'); 1609 | pointer( glGetTexImage ) := load('glGetTexImage'); 1610 | pointer( glGetTexParameterfv ) := load('glGetTexParameterfv'); 1611 | pointer( glGetTexParameteriv ) := load('glGetTexParameteriv'); 1612 | pointer( glGetTexLevelParameterfv ) := load('glGetTexLevelParameterfv'); 1613 | pointer( glGetTexLevelParameteriv ) := load('glGetTexLevelParameteriv'); 1614 | pointer( glIsEnabled ) := load('glIsEnabled'); 1615 | pointer( glDepthRange ) := load('glDepthRange'); 1616 | pointer( glViewport ) := load('glViewport'); 1617 | pointer( glNewList ) := load('glNewList'); 1618 | pointer( glEndList ) := load('glEndList'); 1619 | pointer( glCallList ) := load('glCallList'); 1620 | pointer( glCallLists ) := load('glCallLists'); 1621 | pointer( glDeleteLists ) := load('glDeleteLists'); 1622 | pointer( glGenLists ) := load('glGenLists'); 1623 | pointer( glListBase ) := load('glListBase'); 1624 | pointer( glBegin ) := load('glBegin'); 1625 | pointer( glBitmap ) := load('glBitmap'); 1626 | pointer( glColor3b ) := load('glColor3b'); 1627 | pointer( glColor3bv ) := load('glColor3bv'); 1628 | pointer( glColor3d ) := load('glColor3d'); 1629 | pointer( glColor3dv ) := load('glColor3dv'); 1630 | pointer( glColor3f ) := load('glColor3f'); 1631 | pointer( glColor3fv ) := load('glColor3fv'); 1632 | pointer( glColor3i ) := load('glColor3i'); 1633 | pointer( glColor3iv ) := load('glColor3iv'); 1634 | pointer( glColor3s ) := load('glColor3s'); 1635 | pointer( glColor3sv ) := load('glColor3sv'); 1636 | pointer( glColor3ub ) := load('glColor3ub'); 1637 | pointer( glColor3ubv ) := load('glColor3ubv'); 1638 | pointer( glColor3ui ) := load('glColor3ui'); 1639 | pointer( glColor3uiv ) := load('glColor3uiv'); 1640 | pointer( glColor3us ) := load('glColor3us'); 1641 | pointer( glColor3usv ) := load('glColor3usv'); 1642 | pointer( glColor4b ) := load('glColor4b'); 1643 | pointer( glColor4bv ) := load('glColor4bv'); 1644 | pointer( glColor4d ) := load('glColor4d'); 1645 | pointer( glColor4dv ) := load('glColor4dv'); 1646 | pointer( glColor4f ) := load('glColor4f'); 1647 | pointer( glColor4fv ) := load('glColor4fv'); 1648 | pointer( glColor4i ) := load('glColor4i'); 1649 | pointer( glColor4iv ) := load('glColor4iv'); 1650 | pointer( glColor4s ) := load('glColor4s'); 1651 | pointer( glColor4sv ) := load('glColor4sv'); 1652 | pointer( glColor4ub ) := load('glColor4ub'); 1653 | pointer( glColor4ubv ) := load('glColor4ubv'); 1654 | pointer( glColor4ui ) := load('glColor4ui'); 1655 | pointer( glColor4uiv ) := load('glColor4uiv'); 1656 | pointer( glColor4us ) := load('glColor4us'); 1657 | pointer( glColor4usv ) := load('glColor4usv'); 1658 | pointer( glEdgeFlag ) := load('glEdgeFlag'); 1659 | pointer( glEdgeFlagv ) := load('glEdgeFlagv'); 1660 | pointer( glEnd ) := load('glEnd'); 1661 | pointer( glIndexd ) := load('glIndexd'); 1662 | pointer( glIndexdv ) := load('glIndexdv'); 1663 | pointer( glIndexf ) := load('glIndexf'); 1664 | pointer( glIndexfv ) := load('glIndexfv'); 1665 | pointer( glIndexi ) := load('glIndexi'); 1666 | pointer( glIndexiv ) := load('glIndexiv'); 1667 | pointer( glIndexs ) := load('glIndexs'); 1668 | pointer( glIndexsv ) := load('glIndexsv'); 1669 | pointer( glNormal3b ) := load('glNormal3b'); 1670 | pointer( glNormal3bv ) := load('glNormal3bv'); 1671 | pointer( glNormal3d ) := load('glNormal3d'); 1672 | pointer( glNormal3dv ) := load('glNormal3dv'); 1673 | pointer( glNormal3f ) := load('glNormal3f'); 1674 | pointer( glNormal3fv ) := load('glNormal3fv'); 1675 | pointer( glNormal3i ) := load('glNormal3i'); 1676 | pointer( glNormal3iv ) := load('glNormal3iv'); 1677 | pointer( glNormal3s ) := load('glNormal3s'); 1678 | pointer( glNormal3sv ) := load('glNormal3sv'); 1679 | pointer( glRasterPos2d ) := load('glRasterPos2d'); 1680 | pointer( glRasterPos2dv ) := load('glRasterPos2dv'); 1681 | pointer( glRasterPos2f ) := load('glRasterPos2f'); 1682 | pointer( glRasterPos2fv ) := load('glRasterPos2fv'); 1683 | pointer( glRasterPos2i ) := load('glRasterPos2i'); 1684 | pointer( glRasterPos2iv ) := load('glRasterPos2iv'); 1685 | pointer( glRasterPos2s ) := load('glRasterPos2s'); 1686 | pointer( glRasterPos2sv ) := load('glRasterPos2sv'); 1687 | pointer( glRasterPos3d ) := load('glRasterPos3d'); 1688 | pointer( glRasterPos3dv ) := load('glRasterPos3dv'); 1689 | pointer( glRasterPos3f ) := load('glRasterPos3f'); 1690 | pointer( glRasterPos3fv ) := load('glRasterPos3fv'); 1691 | pointer( glRasterPos3i ) := load('glRasterPos3i'); 1692 | pointer( glRasterPos3iv ) := load('glRasterPos3iv'); 1693 | pointer( glRasterPos3s ) := load('glRasterPos3s'); 1694 | pointer( glRasterPos3sv ) := load('glRasterPos3sv'); 1695 | pointer( glRasterPos4d ) := load('glRasterPos4d'); 1696 | pointer( glRasterPos4dv ) := load('glRasterPos4dv'); 1697 | pointer( glRasterPos4f ) := load('glRasterPos4f'); 1698 | pointer( glRasterPos4fv ) := load('glRasterPos4fv'); 1699 | pointer( glRasterPos4i ) := load('glRasterPos4i'); 1700 | pointer( glRasterPos4iv ) := load('glRasterPos4iv'); 1701 | pointer( glRasterPos4s ) := load('glRasterPos4s'); 1702 | pointer( glRasterPos4sv ) := load('glRasterPos4sv'); 1703 | pointer( glRectd ) := load('glRectd'); 1704 | pointer( glRectdv ) := load('glRectdv'); 1705 | pointer( glRectf ) := load('glRectf'); 1706 | pointer( glRectfv ) := load('glRectfv'); 1707 | pointer( glRecti ) := load('glRecti'); 1708 | pointer( glRectiv ) := load('glRectiv'); 1709 | pointer( glRects ) := load('glRects'); 1710 | pointer( glRectsv ) := load('glRectsv'); 1711 | pointer( glTexCoord1d ) := load('glTexCoord1d'); 1712 | pointer( glTexCoord1dv ) := load('glTexCoord1dv'); 1713 | pointer( glTexCoord1f ) := load('glTexCoord1f'); 1714 | pointer( glTexCoord1fv ) := load('glTexCoord1fv'); 1715 | pointer( glTexCoord1i ) := load('glTexCoord1i'); 1716 | pointer( glTexCoord1iv ) := load('glTexCoord1iv'); 1717 | pointer( glTexCoord1s ) := load('glTexCoord1s'); 1718 | pointer( glTexCoord1sv ) := load('glTexCoord1sv'); 1719 | pointer( glTexCoord2d ) := load('glTexCoord2d'); 1720 | pointer( glTexCoord2dv ) := load('glTexCoord2dv'); 1721 | pointer( glTexCoord2f ) := load('glTexCoord2f'); 1722 | pointer( glTexCoord2fv ) := load('glTexCoord2fv'); 1723 | pointer( glTexCoord2i ) := load('glTexCoord2i'); 1724 | pointer( glTexCoord2iv ) := load('glTexCoord2iv'); 1725 | pointer( glTexCoord2s ) := load('glTexCoord2s'); 1726 | pointer( glTexCoord2sv ) := load('glTexCoord2sv'); 1727 | pointer( glTexCoord3d ) := load('glTexCoord3d'); 1728 | pointer( glTexCoord3dv ) := load('glTexCoord3dv'); 1729 | pointer( glTexCoord3f ) := load('glTexCoord3f'); 1730 | pointer( glTexCoord3fv ) := load('glTexCoord3fv'); 1731 | pointer( glTexCoord3i ) := load('glTexCoord3i'); 1732 | pointer( glTexCoord3iv ) := load('glTexCoord3iv'); 1733 | pointer( glTexCoord3s ) := load('glTexCoord3s'); 1734 | pointer( glTexCoord3sv ) := load('glTexCoord3sv'); 1735 | pointer( glTexCoord4d ) := load('glTexCoord4d'); 1736 | pointer( glTexCoord4dv ) := load('glTexCoord4dv'); 1737 | pointer( glTexCoord4f ) := load('glTexCoord4f'); 1738 | pointer( glTexCoord4fv ) := load('glTexCoord4fv'); 1739 | pointer( glTexCoord4i ) := load('glTexCoord4i'); 1740 | pointer( glTexCoord4iv ) := load('glTexCoord4iv'); 1741 | pointer( glTexCoord4s ) := load('glTexCoord4s'); 1742 | pointer( glTexCoord4sv ) := load('glTexCoord4sv'); 1743 | pointer( glVertex2d ) := load('glVertex2d'); 1744 | pointer( glVertex2dv ) := load('glVertex2dv'); 1745 | pointer( glVertex2f ) := load('glVertex2f'); 1746 | pointer( glVertex2fv ) := load('glVertex2fv'); 1747 | pointer( glVertex2i ) := load('glVertex2i'); 1748 | pointer( glVertex2iv ) := load('glVertex2iv'); 1749 | pointer( glVertex2s ) := load('glVertex2s'); 1750 | pointer( glVertex2sv ) := load('glVertex2sv'); 1751 | pointer( glVertex3d ) := load('glVertex3d'); 1752 | pointer( glVertex3dv ) := load('glVertex3dv'); 1753 | pointer( glVertex3f ) := load('glVertex3f'); 1754 | pointer( glVertex3fv ) := load('glVertex3fv'); 1755 | pointer( glVertex3i ) := load('glVertex3i'); 1756 | pointer( glVertex3iv ) := load('glVertex3iv'); 1757 | pointer( glVertex3s ) := load('glVertex3s'); 1758 | pointer( glVertex3sv ) := load('glVertex3sv'); 1759 | pointer( glVertex4d ) := load('glVertex4d'); 1760 | pointer( glVertex4dv ) := load('glVertex4dv'); 1761 | pointer( glVertex4f ) := load('glVertex4f'); 1762 | pointer( glVertex4fv ) := load('glVertex4fv'); 1763 | pointer( glVertex4i ) := load('glVertex4i'); 1764 | pointer( glVertex4iv ) := load('glVertex4iv'); 1765 | pointer( glVertex4s ) := load('glVertex4s'); 1766 | pointer( glVertex4sv ) := load('glVertex4sv'); 1767 | pointer( glClipPlane ) := load('glClipPlane'); 1768 | pointer( glColorMaterial ) := load('glColorMaterial'); 1769 | pointer( glFogf ) := load('glFogf'); 1770 | pointer( glFogfv ) := load('glFogfv'); 1771 | pointer( glFogi ) := load('glFogi'); 1772 | pointer( glFogiv ) := load('glFogiv'); 1773 | pointer( glLightf ) := load('glLightf'); 1774 | pointer( glLightfv ) := load('glLightfv'); 1775 | pointer( glLighti ) := load('glLighti'); 1776 | pointer( glLightiv ) := load('glLightiv'); 1777 | pointer( glLightModelf ) := load('glLightModelf'); 1778 | pointer( glLightModelfv ) := load('glLightModelfv'); 1779 | pointer( glLightModeli ) := load('glLightModeli'); 1780 | pointer( glLightModeliv ) := load('glLightModeliv'); 1781 | pointer( glLineStipple ) := load('glLineStipple'); 1782 | pointer( glMaterialf ) := load('glMaterialf'); 1783 | pointer( glMaterialfv ) := load('glMaterialfv'); 1784 | pointer( glMateriali ) := load('glMateriali'); 1785 | pointer( glMaterialiv ) := load('glMaterialiv'); 1786 | pointer( glPolygonStipple ) := load('glPolygonStipple'); 1787 | pointer( glShadeModel ) := load('glShadeModel'); 1788 | pointer( glTexEnvf ) := load('glTexEnvf'); 1789 | pointer( glTexEnvfv ) := load('glTexEnvfv'); 1790 | pointer( glTexEnvi ) := load('glTexEnvi'); 1791 | pointer( glTexEnviv ) := load('glTexEnviv'); 1792 | pointer( glTexGend ) := load('glTexGend'); 1793 | pointer( glTexGendv ) := load('glTexGendv'); 1794 | pointer( glTexGenf ) := load('glTexGenf'); 1795 | pointer( glTexGenfv ) := load('glTexGenfv'); 1796 | pointer( glTexGeni ) := load('glTexGeni'); 1797 | pointer( glTexGeniv ) := load('glTexGeniv'); 1798 | pointer( glFeedbackBuffer ) := load('glFeedbackBuffer'); 1799 | pointer( glSelectBuffer ) := load('glSelectBuffer'); 1800 | pointer( glRenderMode ) := load('glRenderMode'); 1801 | pointer( glInitNames ) := load('glInitNames'); 1802 | pointer( glLoadName ) := load('glLoadName'); 1803 | pointer( glPassThrough ) := load('glPassThrough'); 1804 | pointer( glPopName ) := load('glPopName'); 1805 | pointer( glPushName ) := load('glPushName'); 1806 | pointer( glClearAccum ) := load('glClearAccum'); 1807 | pointer( glClearIndex ) := load('glClearIndex'); 1808 | pointer( glIndexMask ) := load('glIndexMask'); 1809 | pointer( glAccum ) := load('glAccum'); 1810 | pointer( glPopAttrib ) := load('glPopAttrib'); 1811 | pointer( glPushAttrib ) := load('glPushAttrib'); 1812 | pointer( glMap1d ) := load('glMap1d'); 1813 | pointer( glMap1f ) := load('glMap1f'); 1814 | pointer( glMap2d ) := load('glMap2d'); 1815 | pointer( glMap2f ) := load('glMap2f'); 1816 | pointer( glMapGrid1d ) := load('glMapGrid1d'); 1817 | pointer( glMapGrid1f ) := load('glMapGrid1f'); 1818 | pointer( glMapGrid2d ) := load('glMapGrid2d'); 1819 | pointer( glMapGrid2f ) := load('glMapGrid2f'); 1820 | pointer( glEvalCoord1d ) := load('glEvalCoord1d'); 1821 | pointer( glEvalCoord1dv ) := load('glEvalCoord1dv'); 1822 | pointer( glEvalCoord1f ) := load('glEvalCoord1f'); 1823 | pointer( glEvalCoord1fv ) := load('glEvalCoord1fv'); 1824 | pointer( glEvalCoord2d ) := load('glEvalCoord2d'); 1825 | pointer( glEvalCoord2dv ) := load('glEvalCoord2dv'); 1826 | pointer( glEvalCoord2f ) := load('glEvalCoord2f'); 1827 | pointer( glEvalCoord2fv ) := load('glEvalCoord2fv'); 1828 | pointer( glEvalMesh1 ) := load('glEvalMesh1'); 1829 | pointer( glEvalPoint1 ) := load('glEvalPoint1'); 1830 | pointer( glEvalMesh2 ) := load('glEvalMesh2'); 1831 | pointer( glEvalPoint2 ) := load('glEvalPoint2'); 1832 | pointer( glAlphaFunc ) := load('glAlphaFunc'); 1833 | pointer( glPixelZoom ) := load('glPixelZoom'); 1834 | pointer( glPixelTransferf ) := load('glPixelTransferf'); 1835 | pointer( glPixelTransferi ) := load('glPixelTransferi'); 1836 | pointer( glPixelMapfv ) := load('glPixelMapfv'); 1837 | pointer( glPixelMapuiv ) := load('glPixelMapuiv'); 1838 | pointer( glPixelMapusv ) := load('glPixelMapusv'); 1839 | pointer( glCopyPixels ) := load('glCopyPixels'); 1840 | pointer( glDrawPixels ) := load('glDrawPixels'); 1841 | pointer( glGetClipPlane ) := load('glGetClipPlane'); 1842 | pointer( glGetLightfv ) := load('glGetLightfv'); 1843 | pointer( glGetLightiv ) := load('glGetLightiv'); 1844 | pointer( glGetMapdv ) := load('glGetMapdv'); 1845 | pointer( glGetMapfv ) := load('glGetMapfv'); 1846 | pointer( glGetMapiv ) := load('glGetMapiv'); 1847 | pointer( glGetMaterialfv ) := load('glGetMaterialfv'); 1848 | pointer( glGetMaterialiv ) := load('glGetMaterialiv'); 1849 | pointer( glGetPixelMapfv ) := load('glGetPixelMapfv'); 1850 | pointer( glGetPixelMapuiv ) := load('glGetPixelMapuiv'); 1851 | pointer( glGetPixelMapusv ) := load('glGetPixelMapusv'); 1852 | pointer( glGetPolygonStipple ) := load('glGetPolygonStipple'); 1853 | pointer( glGetTexEnvfv ) := load('glGetTexEnvfv'); 1854 | pointer( glGetTexEnviv ) := load('glGetTexEnviv'); 1855 | pointer( glGetTexGendv ) := load('glGetTexGendv'); 1856 | pointer( glGetTexGenfv ) := load('glGetTexGenfv'); 1857 | pointer( glGetTexGeniv ) := load('glGetTexGeniv'); 1858 | pointer( glIsList ) := load('glIsList'); 1859 | pointer( glFrustum ) := load('glFrustum'); 1860 | pointer( glLoadIdentity ) := load('glLoadIdentity'); 1861 | pointer( glLoadMatrixf ) := load('glLoadMatrixf'); 1862 | pointer( glLoadMatrixd ) := load('glLoadMatrixd'); 1863 | pointer( glMatrixMode ) := load('glMatrixMode'); 1864 | pointer( glMultMatrixf ) := load('glMultMatrixf'); 1865 | pointer( glMultMatrixd ) := load('glMultMatrixd'); 1866 | pointer( glOrtho ) := load('glOrtho'); 1867 | pointer( glPopMatrix ) := load('glPopMatrix'); 1868 | pointer( glPushMatrix ) := load('glPushMatrix'); 1869 | pointer( glRotated ) := load('glRotated'); 1870 | pointer( glRotatef ) := load('glRotatef'); 1871 | pointer( glScaled ) := load('glScaled'); 1872 | pointer( glScalef ) := load('glScalef'); 1873 | pointer( glTranslated ) := load('glTranslated'); 1874 | pointer( glTranslatef ) := load('glTranslatef'); 1875 | end; 1876 | 1877 | procedure load_GL_VERSION_1_1(load: TLoadProc); 1878 | begin 1879 | if not GLAD_GL_VERSION_1_1 then exit; 1880 | pointer( glDrawArrays ) := load('glDrawArrays'); 1881 | pointer( glDrawElements ) := load('glDrawElements'); 1882 | pointer( glGetPointerv ) := load('glGetPointerv'); 1883 | pointer( glPolygonOffset ) := load('glPolygonOffset'); 1884 | pointer( glCopyTexImage1D ) := load('glCopyTexImage1D'); 1885 | pointer( glCopyTexImage2D ) := load('glCopyTexImage2D'); 1886 | pointer( glCopyTexSubImage1D ) := load('glCopyTexSubImage1D'); 1887 | pointer( glCopyTexSubImage2D ) := load('glCopyTexSubImage2D'); 1888 | pointer( glTexSubImage1D ) := load('glTexSubImage1D'); 1889 | pointer( glTexSubImage2D ) := load('glTexSubImage2D'); 1890 | pointer( glBindTexture ) := load('glBindTexture'); 1891 | pointer( glDeleteTextures ) := load('glDeleteTextures'); 1892 | pointer( glGenTextures ) := load('glGenTextures'); 1893 | pointer( glIsTexture ) := load('glIsTexture'); 1894 | pointer( glArrayElement ) := load('glArrayElement'); 1895 | pointer( glColorPointer ) := load('glColorPointer'); 1896 | pointer( glDisableClientState ) := load('glDisableClientState'); 1897 | pointer( glEdgeFlagPointer ) := load('glEdgeFlagPointer'); 1898 | pointer( glEnableClientState ) := load('glEnableClientState'); 1899 | pointer( glIndexPointer ) := load('glIndexPointer'); 1900 | pointer( glInterleavedArrays ) := load('glInterleavedArrays'); 1901 | pointer( glNormalPointer ) := load('glNormalPointer'); 1902 | pointer( glTexCoordPointer ) := load('glTexCoordPointer'); 1903 | pointer( glVertexPointer ) := load('glVertexPointer'); 1904 | pointer( glAreTexturesResident ) := load('glAreTexturesResident'); 1905 | pointer( glPrioritizeTextures ) := load('glPrioritizeTextures'); 1906 | pointer( glIndexub ) := load('glIndexub'); 1907 | pointer( glIndexubv ) := load('glIndexubv'); 1908 | pointer( glPopClientAttrib ) := load('glPopClientAttrib'); 1909 | pointer( glPushClientAttrib ) := load('glPushClientAttrib'); 1910 | end; 1911 | 1912 | procedure load_GL_VERSION_1_2(load: TLoadProc); 1913 | begin 1914 | if not GLAD_GL_VERSION_1_2 then exit; 1915 | pointer( glDrawRangeElements ) := load('glDrawRangeElements'); 1916 | pointer( glTexImage3D ) := load('glTexImage3D'); 1917 | pointer( glTexSubImage3D ) := load('glTexSubImage3D'); 1918 | pointer( glCopyTexSubImage3D ) := load('glCopyTexSubImage3D'); 1919 | end; 1920 | 1921 | procedure load_GL_VERSION_1_3(load: TLoadProc); 1922 | begin 1923 | if not GLAD_GL_VERSION_1_3 then exit; 1924 | pointer( glActiveTexture ) := load('glActiveTexture'); 1925 | pointer( glSampleCoverage ) := load('glSampleCoverage'); 1926 | pointer( glCompressedTexImage3D ) := load('glCompressedTexImage3D'); 1927 | pointer( glCompressedTexImage2D ) := load('glCompressedTexImage2D'); 1928 | pointer( glCompressedTexImage1D ) := load('glCompressedTexImage1D'); 1929 | pointer( glCompressedTexSubImage3D ) := load('glCompressedTexSubImage3D'); 1930 | pointer( glCompressedTexSubImage2D ) := load('glCompressedTexSubImage2D'); 1931 | pointer( glCompressedTexSubImage1D ) := load('glCompressedTexSubImage1D'); 1932 | pointer( glGetCompressedTexImage ) := load('glGetCompressedTexImage'); 1933 | pointer( glClientActiveTexture ) := load('glClientActiveTexture'); 1934 | pointer( glMultiTexCoord1d ) := load('glMultiTexCoord1d'); 1935 | pointer( glMultiTexCoord1dv ) := load('glMultiTexCoord1dv'); 1936 | pointer( glMultiTexCoord1f ) := load('glMultiTexCoord1f'); 1937 | pointer( glMultiTexCoord1fv ) := load('glMultiTexCoord1fv'); 1938 | pointer( glMultiTexCoord1i ) := load('glMultiTexCoord1i'); 1939 | pointer( glMultiTexCoord1iv ) := load('glMultiTexCoord1iv'); 1940 | pointer( glMultiTexCoord1s ) := load('glMultiTexCoord1s'); 1941 | pointer( glMultiTexCoord1sv ) := load('glMultiTexCoord1sv'); 1942 | pointer( glMultiTexCoord2d ) := load('glMultiTexCoord2d'); 1943 | pointer( glMultiTexCoord2dv ) := load('glMultiTexCoord2dv'); 1944 | pointer( glMultiTexCoord2f ) := load('glMultiTexCoord2f'); 1945 | pointer( glMultiTexCoord2fv ) := load('glMultiTexCoord2fv'); 1946 | pointer( glMultiTexCoord2i ) := load('glMultiTexCoord2i'); 1947 | pointer( glMultiTexCoord2iv ) := load('glMultiTexCoord2iv'); 1948 | pointer( glMultiTexCoord2s ) := load('glMultiTexCoord2s'); 1949 | pointer( glMultiTexCoord2sv ) := load('glMultiTexCoord2sv'); 1950 | pointer( glMultiTexCoord3d ) := load('glMultiTexCoord3d'); 1951 | pointer( glMultiTexCoord3dv ) := load('glMultiTexCoord3dv'); 1952 | pointer( glMultiTexCoord3f ) := load('glMultiTexCoord3f'); 1953 | pointer( glMultiTexCoord3fv ) := load('glMultiTexCoord3fv'); 1954 | pointer( glMultiTexCoord3i ) := load('glMultiTexCoord3i'); 1955 | pointer( glMultiTexCoord3iv ) := load('glMultiTexCoord3iv'); 1956 | pointer( glMultiTexCoord3s ) := load('glMultiTexCoord3s'); 1957 | pointer( glMultiTexCoord3sv ) := load('glMultiTexCoord3sv'); 1958 | pointer( glMultiTexCoord4d ) := load('glMultiTexCoord4d'); 1959 | pointer( glMultiTexCoord4dv ) := load('glMultiTexCoord4dv'); 1960 | pointer( glMultiTexCoord4f ) := load('glMultiTexCoord4f'); 1961 | pointer( glMultiTexCoord4fv ) := load('glMultiTexCoord4fv'); 1962 | pointer( glMultiTexCoord4i ) := load('glMultiTexCoord4i'); 1963 | pointer( glMultiTexCoord4iv ) := load('glMultiTexCoord4iv'); 1964 | pointer( glMultiTexCoord4s ) := load('glMultiTexCoord4s'); 1965 | pointer( glMultiTexCoord4sv ) := load('glMultiTexCoord4sv'); 1966 | pointer( glLoadTransposeMatrixf ) := load('glLoadTransposeMatrixf'); 1967 | pointer( glLoadTransposeMatrixd ) := load('glLoadTransposeMatrixd'); 1968 | pointer( glMultTransposeMatrixf ) := load('glMultTransposeMatrixf'); 1969 | pointer( glMultTransposeMatrixd ) := load('glMultTransposeMatrixd'); 1970 | end; 1971 | 1972 | procedure load_GL_VERSION_1_4(load: TLoadProc); 1973 | begin 1974 | if not GLAD_GL_VERSION_1_4 then exit; 1975 | pointer( glBlendFuncSeparate ) := load('glBlendFuncSeparate'); 1976 | pointer( glMultiDrawArrays ) := load('glMultiDrawArrays'); 1977 | pointer( glMultiDrawElements ) := load('glMultiDrawElements'); 1978 | pointer( glPointParameterf ) := load('glPointParameterf'); 1979 | pointer( glPointParameterfv ) := load('glPointParameterfv'); 1980 | pointer( glPointParameteri ) := load('glPointParameteri'); 1981 | pointer( glPointParameteriv ) := load('glPointParameteriv'); 1982 | pointer( glFogCoordf ) := load('glFogCoordf'); 1983 | pointer( glFogCoordfv ) := load('glFogCoordfv'); 1984 | pointer( glFogCoordd ) := load('glFogCoordd'); 1985 | pointer( glFogCoorddv ) := load('glFogCoorddv'); 1986 | pointer( glFogCoordPointer ) := load('glFogCoordPointer'); 1987 | pointer( glSecondaryColor3b ) := load('glSecondaryColor3b'); 1988 | pointer( glSecondaryColor3bv ) := load('glSecondaryColor3bv'); 1989 | pointer( glSecondaryColor3d ) := load('glSecondaryColor3d'); 1990 | pointer( glSecondaryColor3dv ) := load('glSecondaryColor3dv'); 1991 | pointer( glSecondaryColor3f ) := load('glSecondaryColor3f'); 1992 | pointer( glSecondaryColor3fv ) := load('glSecondaryColor3fv'); 1993 | pointer( glSecondaryColor3i ) := load('glSecondaryColor3i'); 1994 | pointer( glSecondaryColor3iv ) := load('glSecondaryColor3iv'); 1995 | pointer( glSecondaryColor3s ) := load('glSecondaryColor3s'); 1996 | pointer( glSecondaryColor3sv ) := load('glSecondaryColor3sv'); 1997 | pointer( glSecondaryColor3ub ) := load('glSecondaryColor3ub'); 1998 | pointer( glSecondaryColor3ubv ) := load('glSecondaryColor3ubv'); 1999 | pointer( glSecondaryColor3ui ) := load('glSecondaryColor3ui'); 2000 | pointer( glSecondaryColor3uiv ) := load('glSecondaryColor3uiv'); 2001 | pointer( glSecondaryColor3us ) := load('glSecondaryColor3us'); 2002 | pointer( glSecondaryColor3usv ) := load('glSecondaryColor3usv'); 2003 | pointer( glSecondaryColorPointer ) := load('glSecondaryColorPointer'); 2004 | pointer( glWindowPos2d ) := load('glWindowPos2d'); 2005 | pointer( glWindowPos2dv ) := load('glWindowPos2dv'); 2006 | pointer( glWindowPos2f ) := load('glWindowPos2f'); 2007 | pointer( glWindowPos2fv ) := load('glWindowPos2fv'); 2008 | pointer( glWindowPos2i ) := load('glWindowPos2i'); 2009 | pointer( glWindowPos2iv ) := load('glWindowPos2iv'); 2010 | pointer( glWindowPos2s ) := load('glWindowPos2s'); 2011 | pointer( glWindowPos2sv ) := load('glWindowPos2sv'); 2012 | pointer( glWindowPos3d ) := load('glWindowPos3d'); 2013 | pointer( glWindowPos3dv ) := load('glWindowPos3dv'); 2014 | pointer( glWindowPos3f ) := load('glWindowPos3f'); 2015 | pointer( glWindowPos3fv ) := load('glWindowPos3fv'); 2016 | pointer( glWindowPos3i ) := load('glWindowPos3i'); 2017 | pointer( glWindowPos3iv ) := load('glWindowPos3iv'); 2018 | pointer( glWindowPos3s ) := load('glWindowPos3s'); 2019 | pointer( glWindowPos3sv ) := load('glWindowPos3sv'); 2020 | pointer( glBlendColor ) := load('glBlendColor'); 2021 | pointer( glBlendEquation ) := load('glBlendEquation'); 2022 | end; 2023 | 2024 | procedure load_GL_VERSION_1_5(load: TLoadProc); 2025 | begin 2026 | if not GLAD_GL_VERSION_1_5 then exit; 2027 | pointer( glGenQueries ) := load('glGenQueries'); 2028 | pointer( glDeleteQueries ) := load('glDeleteQueries'); 2029 | pointer( glIsQuery ) := load('glIsQuery'); 2030 | pointer( glBeginQuery ) := load('glBeginQuery'); 2031 | pointer( glEndQuery ) := load('glEndQuery'); 2032 | pointer( glGetQueryiv ) := load('glGetQueryiv'); 2033 | pointer( glGetQueryObjectiv ) := load('glGetQueryObjectiv'); 2034 | pointer( glGetQueryObjectuiv ) := load('glGetQueryObjectuiv'); 2035 | pointer( glBindBuffer ) := load('glBindBuffer'); 2036 | pointer( glDeleteBuffers ) := load('glDeleteBuffers'); 2037 | pointer( glGenBuffers ) := load('glGenBuffers'); 2038 | pointer( glIsBuffer ) := load('glIsBuffer'); 2039 | pointer( glBufferData ) := load('glBufferData'); 2040 | pointer( glBufferSubData ) := load('glBufferSubData'); 2041 | pointer( glGetBufferSubData ) := load('glGetBufferSubData'); 2042 | pointer( glMapBuffer ) := load('glMapBuffer'); 2043 | pointer( glUnmapBuffer ) := load('glUnmapBuffer'); 2044 | pointer( glGetBufferParameteriv ) := load('glGetBufferParameteriv'); 2045 | pointer( glGetBufferPointerv ) := load('glGetBufferPointerv'); 2046 | end; 2047 | 2048 | procedure load_GL_VERSION_2_0(load: TLoadProc); 2049 | begin 2050 | if not GLAD_GL_VERSION_2_0 then exit; 2051 | pointer( glBlendEquationSeparate ) := load('glBlendEquationSeparate'); 2052 | pointer( glDrawBuffers ) := load('glDrawBuffers'); 2053 | pointer( glStencilOpSeparate ) := load('glStencilOpSeparate'); 2054 | pointer( glStencilFuncSeparate ) := load('glStencilFuncSeparate'); 2055 | pointer( glStencilMaskSeparate ) := load('glStencilMaskSeparate'); 2056 | pointer( glAttachShader ) := load('glAttachShader'); 2057 | pointer( glBindAttribLocation ) := load('glBindAttribLocation'); 2058 | pointer( glCompileShader ) := load('glCompileShader'); 2059 | pointer( glCreateProgram ) := load('glCreateProgram'); 2060 | pointer( glCreateShader ) := load('glCreateShader'); 2061 | pointer( glDeleteProgram ) := load('glDeleteProgram'); 2062 | pointer( glDeleteShader ) := load('glDeleteShader'); 2063 | pointer( glDetachShader ) := load('glDetachShader'); 2064 | pointer( glDisableVertexAttribArray ) := load('glDisableVertexAttribArray'); 2065 | pointer( glEnableVertexAttribArray ) := load('glEnableVertexAttribArray'); 2066 | pointer( glGetActiveAttrib ) := load('glGetActiveAttrib'); 2067 | pointer( glGetActiveUniform ) := load('glGetActiveUniform'); 2068 | pointer( glGetAttachedShaders ) := load('glGetAttachedShaders'); 2069 | pointer( glGetAttribLocation ) := load('glGetAttribLocation'); 2070 | pointer( glGetProgramiv ) := load('glGetProgramiv'); 2071 | pointer( glGetProgramInfoLog ) := load('glGetProgramInfoLog'); 2072 | pointer( glGetShaderiv ) := load('glGetShaderiv'); 2073 | pointer( glGetShaderInfoLog ) := load('glGetShaderInfoLog'); 2074 | pointer( glGetShaderSource ) := load('glGetShaderSource'); 2075 | pointer( glGetUniformLocation ) := load('glGetUniformLocation'); 2076 | pointer( glGetUniformfv ) := load('glGetUniformfv'); 2077 | pointer( glGetUniformiv ) := load('glGetUniformiv'); 2078 | pointer( glGetVertexAttribdv ) := load('glGetVertexAttribdv'); 2079 | pointer( glGetVertexAttribfv ) := load('glGetVertexAttribfv'); 2080 | pointer( glGetVertexAttribiv ) := load('glGetVertexAttribiv'); 2081 | pointer( glGetVertexAttribPointerv ) := load('glGetVertexAttribPointerv'); 2082 | pointer( glIsProgram ) := load('glIsProgram'); 2083 | pointer( glIsShader ) := load('glIsShader'); 2084 | pointer( glLinkProgram ) := load('glLinkProgram'); 2085 | pointer( glShaderSource ) := load('glShaderSource'); 2086 | pointer( glUseProgram ) := load('glUseProgram'); 2087 | pointer( glUniform1f ) := load('glUniform1f'); 2088 | pointer( glUniform2f ) := load('glUniform2f'); 2089 | pointer( glUniform3f ) := load('glUniform3f'); 2090 | pointer( glUniform4f ) := load('glUniform4f'); 2091 | pointer( glUniform1i ) := load('glUniform1i'); 2092 | pointer( glUniform2i ) := load('glUniform2i'); 2093 | pointer( glUniform3i ) := load('glUniform3i'); 2094 | pointer( glUniform4i ) := load('glUniform4i'); 2095 | pointer( glUniform1fv ) := load('glUniform1fv'); 2096 | pointer( glUniform2fv ) := load('glUniform2fv'); 2097 | pointer( glUniform3fv ) := load('glUniform3fv'); 2098 | pointer( glUniform4fv ) := load('glUniform4fv'); 2099 | pointer( glUniform1iv ) := load('glUniform1iv'); 2100 | pointer( glUniform2iv ) := load('glUniform2iv'); 2101 | pointer( glUniform3iv ) := load('glUniform3iv'); 2102 | pointer( glUniform4iv ) := load('glUniform4iv'); 2103 | pointer( glUniformMatrix2fv ) := load('glUniformMatrix2fv'); 2104 | pointer( glUniformMatrix3fv ) := load('glUniformMatrix3fv'); 2105 | pointer( glUniformMatrix4fv ) := load('glUniformMatrix4fv'); 2106 | pointer( glValidateProgram ) := load('glValidateProgram'); 2107 | pointer( glVertexAttrib1d ) := load('glVertexAttrib1d'); 2108 | pointer( glVertexAttrib1dv ) := load('glVertexAttrib1dv'); 2109 | pointer( glVertexAttrib1f ) := load('glVertexAttrib1f'); 2110 | pointer( glVertexAttrib1fv ) := load('glVertexAttrib1fv'); 2111 | pointer( glVertexAttrib1s ) := load('glVertexAttrib1s'); 2112 | pointer( glVertexAttrib1sv ) := load('glVertexAttrib1sv'); 2113 | pointer( glVertexAttrib2d ) := load('glVertexAttrib2d'); 2114 | pointer( glVertexAttrib2dv ) := load('glVertexAttrib2dv'); 2115 | pointer( glVertexAttrib2f ) := load('glVertexAttrib2f'); 2116 | pointer( glVertexAttrib2fv ) := load('glVertexAttrib2fv'); 2117 | pointer( glVertexAttrib2s ) := load('glVertexAttrib2s'); 2118 | pointer( glVertexAttrib2sv ) := load('glVertexAttrib2sv'); 2119 | pointer( glVertexAttrib3d ) := load('glVertexAttrib3d'); 2120 | pointer( glVertexAttrib3dv ) := load('glVertexAttrib3dv'); 2121 | pointer( glVertexAttrib3f ) := load('glVertexAttrib3f'); 2122 | pointer( glVertexAttrib3fv ) := load('glVertexAttrib3fv'); 2123 | pointer( glVertexAttrib3s ) := load('glVertexAttrib3s'); 2124 | pointer( glVertexAttrib3sv ) := load('glVertexAttrib3sv'); 2125 | pointer( glVertexAttrib4Nbv ) := load('glVertexAttrib4Nbv'); 2126 | pointer( glVertexAttrib4Niv ) := load('glVertexAttrib4Niv'); 2127 | pointer( glVertexAttrib4Nsv ) := load('glVertexAttrib4Nsv'); 2128 | pointer( glVertexAttrib4Nub ) := load('glVertexAttrib4Nub'); 2129 | pointer( glVertexAttrib4Nubv ) := load('glVertexAttrib4Nubv'); 2130 | pointer( glVertexAttrib4Nuiv ) := load('glVertexAttrib4Nuiv'); 2131 | pointer( glVertexAttrib4Nusv ) := load('glVertexAttrib4Nusv'); 2132 | pointer( glVertexAttrib4bv ) := load('glVertexAttrib4bv'); 2133 | pointer( glVertexAttrib4d ) := load('glVertexAttrib4d'); 2134 | pointer( glVertexAttrib4dv ) := load('glVertexAttrib4dv'); 2135 | pointer( glVertexAttrib4f ) := load('glVertexAttrib4f'); 2136 | pointer( glVertexAttrib4fv ) := load('glVertexAttrib4fv'); 2137 | pointer( glVertexAttrib4iv ) := load('glVertexAttrib4iv'); 2138 | pointer( glVertexAttrib4s ) := load('glVertexAttrib4s'); 2139 | pointer( glVertexAttrib4sv ) := load('glVertexAttrib4sv'); 2140 | pointer( glVertexAttrib4ubv ) := load('glVertexAttrib4ubv'); 2141 | pointer( glVertexAttrib4uiv ) := load('glVertexAttrib4uiv'); 2142 | pointer( glVertexAttrib4usv ) := load('glVertexAttrib4usv'); 2143 | pointer( glVertexAttribPointer ) := load('glVertexAttribPointer'); 2144 | end; 2145 | 2146 | procedure findExtensionsGL(); 2147 | begin 2148 | end; 2149 | 2150 | procedure findCoreGL(glVersion: string); 2151 | { Thank you @elmindreda 2152 | https://github.com/elmindreda/greg/blob/master/templates/greg.c.in//L176 2153 | https://github.com/glfw/glfw/blob/master/src/context.c//L36 } 2154 | const 2155 | prefixes: array[0..2] of string = ('OpenGL ES-CM ', 'OpenGL ES-CL ', 'OpenGL ES '); 2156 | var 2157 | version, p: string; 2158 | major, minor: integer; 2159 | begin 2160 | version := glVersion; 2161 | for p in prefixes do 2162 | if LeftStr(version, length(p)) = p then begin 2163 | version := StringReplace(version, p, '', [rfReplaceAll]); 2164 | break; 2165 | end; 2166 | 2167 | major := ord(version[1]) - ord('0'); 2168 | minor := ord(version[3]) - ord('0'); 2169 | 2170 | glVersionMajor := major; 2171 | glVersionMinor := minor; 2172 | 2173 | GLAD_GL_VERSION_1_0 := ((major = 1) and (minor >= 0)) or (major > 1); 2174 | GLAD_GL_VERSION_1_1 := ((major = 1) and (minor >= 1)) or (major > 1); 2175 | GLAD_GL_VERSION_1_2 := ((major = 1) and (minor >= 2)) or (major > 1); 2176 | GLAD_GL_VERSION_1_3 := ((major = 1) and (minor >= 3)) or (major > 1); 2177 | GLAD_GL_VERSION_1_4 := ((major = 1) and (minor >= 4)) or (major > 1); 2178 | GLAD_GL_VERSION_1_5 := ((major = 1) and (minor >= 5)) or (major > 1); 2179 | GLAD_GL_VERSION_2_0 := ((major = 2) and (minor >= 0)) or (major > 2); 2180 | end; 2181 | 2182 | function gladLoadGL(load: TLoadProc): boolean; 2183 | var 2184 | glVersion: pchar; 2185 | begin 2186 | pointer( glGetString ) := load('glGetString'); 2187 | if glGetString = nil then exit(false); 2188 | glVersion := PChar( glGetString(GL_VERSION) ); 2189 | if glVersion = nil then exit(false); 2190 | 2191 | findCoreGL(glVersion); 2192 | load_GL_VERSION_1_0(load); 2193 | load_GL_VERSION_1_1(load); 2194 | load_GL_VERSION_1_2(load); 2195 | load_GL_VERSION_1_3(load); 2196 | load_GL_VERSION_1_4(load); 2197 | load_GL_VERSION_1_5(load); 2198 | load_GL_VERSION_2_0(load); 2199 | 2200 | findExtensionsGL(); 2201 | 2202 | result := (glVersionMajor <> 0) or (glVersionMinor <> 0); 2203 | end; 2204 | 2205 | end. 2206 | -------------------------------------------------------------------------------- /demo/imgui_extra.pas: -------------------------------------------------------------------------------- 1 | { 2 | Additional imgui related code that may come in handy, mostly code samples from various sources 3 | } 4 | unit imgui_extra; 5 | 6 | {$mode objfpc}{$H+} 7 | 8 | interface 9 | 10 | uses 11 | fpimgui; 12 | 13 | type 14 | ImVec3 = record 15 | x, y, z: single; 16 | end; 17 | 18 | function ImVec3Init(x,y,z: single): ImVec3; 19 | 20 | { code from procedural's GpuLib - https://github.com/procedural/gpulib/ 21 | referenced in https://github.com/ocornut/imgui/issues/707 22 | } 23 | procedure imgui_easy_theming(color_for_text, color_for_head, color_for_area, color_for_body, color_for_pops: ImVec3); 24 | procedure SetupImGuiStyle2(); 25 | 26 | implementation 27 | 28 | function ImVec3Init(x,y,z: single): ImVec3; 29 | begin 30 | result.x := x; 31 | result.y := y; 32 | result.z := z; 33 | end; 34 | 35 | procedure imgui_easy_theming(color_for_text, color_for_head, color_for_area, color_for_body, color_for_pops: ImVec3); 36 | var 37 | style: PImGuiStyle; 38 | begin 39 | style := ImGui.GetStyle(); 40 | style^.Colors[ImGuiCol_Text] := ImVec4Init( color_for_text.x, color_for_text.y, color_for_text.z, 1.00 ); 41 | style^.Colors[ImGuiCol_TextDisabled] := ImVec4Init( color_for_text.x, color_for_text.y, color_for_text.z, 0.58 ); 42 | style^.Colors[ImGuiCol_WindowBg] := ImVec4Init( color_for_body.x, color_for_body.y, color_for_body.z, 0.95 ); 43 | style^.Colors[ImGuiCol_ChildBg] := ImVec4Init( color_for_area.x, color_for_area.y, color_for_area.z, 0.58 ); 44 | style^.Colors[ImGuiCol_Border] := ImVec4Init( color_for_body.x, color_for_body.y, color_for_body.z, 0.00 ); 45 | style^.Colors[ImGuiCol_BorderShadow] := ImVec4Init( color_for_body.x, color_for_body.y, color_for_body.z, 0.00 ); 46 | style^.Colors[ImGuiCol_FrameBg] := ImVec4Init( color_for_area.x, color_for_area.y, color_for_area.z, 1.00 ); 47 | style^.Colors[ImGuiCol_FrameBgHovered] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.78 ); 48 | style^.Colors[ImGuiCol_FrameBgActive] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 1.00 ); 49 | style^.Colors[ImGuiCol_TitleBg] := ImVec4Init( color_for_area.x, color_for_area.y, color_for_area.z, 1.00 ); 50 | style^.Colors[ImGuiCol_TitleBgCollapsed] := ImVec4Init( color_for_area.x, color_for_area.y, color_for_area.z, 0.75 ); 51 | style^.Colors[ImGuiCol_TitleBgActive] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 1.00 ); 52 | style^.Colors[ImGuiCol_MenuBarBg] := ImVec4Init( color_for_area.x, color_for_area.y, color_for_area.z, 0.47 ); 53 | style^.Colors[ImGuiCol_ScrollbarBg] := ImVec4Init( color_for_area.x, color_for_area.y, color_for_area.z, 1.00 ); 54 | style^.Colors[ImGuiCol_ScrollbarGrab] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.21 ); 55 | style^.Colors[ImGuiCol_ScrollbarGrabHovered] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.78 ); 56 | style^.Colors[ImGuiCol_ScrollbarGrabActive] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 1.00 ); 57 | style^.Colors[ImGuiCol_CheckMark] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.80 ); 58 | style^.Colors[ImGuiCol_SliderGrab] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.50 ); 59 | style^.Colors[ImGuiCol_SliderGrabActive] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 1.00 ); 60 | style^.Colors[ImGuiCol_Button] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.50 ); 61 | style^.Colors[ImGuiCol_ButtonHovered] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.86 ); 62 | style^.Colors[ImGuiCol_ButtonActive] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 1.00 ); 63 | style^.Colors[ImGuiCol_Header] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.76 ); 64 | style^.Colors[ImGuiCol_HeaderHovered] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.86 ); 65 | style^.Colors[ImGuiCol_HeaderActive] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 1.00 ); 66 | style^.Colors[ImGuiCol_Separator] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.32 ); 67 | style^.Colors[ImGuiCol_SeparatorHovered] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.78 ); 68 | style^.Colors[ImGuiCol_SeparatorActive] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 1.00 ); 69 | style^.Colors[ImGuiCol_ResizeGrip] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.15 ); 70 | style^.Colors[ImGuiCol_ResizeGripHovered] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.78 ); 71 | style^.Colors[ImGuiCol_ResizeGripActive] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 1.00 ); 72 | style^.Colors[ImGuiCol_CloseButton] := ImVec4Init( color_for_text.x, color_for_text.y, color_for_text.z, 0.16 ); 73 | style^.Colors[ImGuiCol_CloseButtonHovered] := ImVec4Init( color_for_text.x, color_for_text.y, color_for_text.z, 0.39 ); 74 | style^.Colors[ImGuiCol_CloseButtonActive] := ImVec4Init( color_for_text.x, color_for_text.y, color_for_text.z, 1.00 ); 75 | style^.Colors[ImGuiCol_PlotLines] := ImVec4Init( color_for_text.x, color_for_text.y, color_for_text.z, 0.63 ); 76 | style^.Colors[ImGuiCol_PlotLinesHovered] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 1.00 ); 77 | style^.Colors[ImGuiCol_PlotHistogram] := ImVec4Init( color_for_text.x, color_for_text.y, color_for_text.z, 0.63 ); 78 | style^.Colors[ImGuiCol_PlotHistogramHovered] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 1.00 ); 79 | style^.Colors[ImGuiCol_TextSelectedBg] := ImVec4Init( color_for_head.x, color_for_head.y, color_for_head.z, 0.43 ); 80 | style^.Colors[ImGuiCol_PopupBg] := ImVec4Init( color_for_pops.x, color_for_pops.y, color_for_pops.z, 0.92 ); 81 | style^.Colors[ImGuiCol_ModalWindowDarkening] := ImVec4Init( color_for_area.x, color_for_area.y, color_for_area.z, 0.73 ); 82 | end; 83 | 84 | 85 | procedure SetupImGuiStyle2(); 86 | var 87 | color_for_text, color_for_head, color_for_area, color_for_body, color_for_pops: ImVec3; 88 | begin 89 | color_for_text := ImVec3Init(236.0 / 255.0, 240.0 / 255.0, 241.0 / 255.0); 90 | color_for_head := ImVec3Init(41.0 / 255.0, 128.0 / 255.0, 185.0 / 255.0); 91 | color_for_area := ImVec3Init(57.0 / 255.0, 79.0 / 255.0, 105.0 / 255.0); 92 | color_for_body := ImVec3Init(44.0 / 255.0, 62.0 / 255.0, 80.0 / 255.0); 93 | color_for_pops := ImVec3Init(33.0 / 255.0, 46.0 / 255.0, 60.0 / 255.0); 94 | imgui_easy_theming(color_for_text, color_for_head, color_for_area, color_for_body, color_for_pops); 95 | end; 96 | 97 | end. 98 | 99 | -------------------------------------------------------------------------------- /demo/sdl2-LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /demo/testwindow.pas: -------------------------------------------------------------------------------- 1 | { Partial translation of imgui demo / ShowTestWindow 2 | While you're probably better off with the original version as it's way more extensive, 3 | this is good as 4 | * a test case for the bindings or 5 | * a quick guide if something isn't translated in a straightforward way 6 | } 7 | unit TestWindow; 8 | {$mode objfpc}{$H+} 9 | 10 | interface 11 | 12 | uses 13 | Classes, SysUtils, fpimgui; 14 | 15 | type 16 | 17 | { TTestWindow } 18 | TTestWindow = class 19 | private 20 | show_app_main_menu_bar: boolean; 21 | show_app_console: boolean; 22 | show_app_log: boolean; 23 | show_app_layout: boolean; 24 | show_app_property_editor: boolean; 25 | show_app_long_text: boolean; 26 | show_app_auto_resize: boolean; 27 | show_app_constrained_resize: boolean; 28 | show_app_fixed_overlay: boolean; 29 | show_app_manipulating_window_title: boolean; 30 | show_app_custom_rendering: boolean; 31 | show_app_style_editor: boolean; 32 | 33 | show_app_metrics: boolean; 34 | show_app_about: boolean; 35 | 36 | no_titlebar: boolean; 37 | no_resize: boolean; 38 | no_move: boolean; 39 | no_scrollbar: boolean; 40 | no_collapse: boolean; 41 | no_menu: boolean; 42 | 43 | procedure Trees; 44 | public 45 | constructor Create; 46 | procedure Show(var p_open: boolean); 47 | end; 48 | 49 | implementation 50 | 51 | procedure ShowHelpMarker(const desc: string); 52 | begin 53 | ImGui.TextDisabled('(?)'); 54 | if (ImGui.IsItemHovered()) then 55 | begin 56 | ImGui.BeginTooltip(); 57 | ImGui.PushTextWrapPos(450.0); 58 | ImGui.TextUnformatted(desc); 59 | ImGui.PopTextWrapPos(); 60 | ImGui.EndTooltip(); 61 | end; 62 | end; 63 | 64 | { TTestWindow } 65 | 66 | procedure TTestWindow.Trees; 67 | const //static vars 68 | align_label_with_current_x_position: boolean = false; 69 | selection_mask: integer = 1 << 2; // Dumb representation of what may be user-side selection state. You may carry selection state inside or outside your objects in whatever format you see fit. 70 | var 71 | node_open: bool; 72 | node_clicked: Integer; 73 | i: Integer; 74 | node_flags: ImGuiTreeNodeFlags; 75 | begin 76 | if (ImGui.TreeNode('Basic trees')) then 77 | begin 78 | for i := 0 to 4 do 79 | if (ImGui.TreeNode(ImIDPtr(i), 'Child %d', [i])) then 80 | begin 81 | ImGui.Text('blah blah'); 82 | ImGui.SameLine(); 83 | if (ImGui.SmallButton('print')) then writeln('Child ',i,' pressed'); 84 | ImGui.TreePop(); 85 | end; 86 | ImGui.TreePop(); 87 | end; 88 | 89 | if (ImGui.TreeNode('Advanced, with Selectable nodes')) then 90 | begin 91 | ShowHelpMarker('This is a more standard looking tree with selectable nodes.' + LineEnding 92 | + 'Click to select, CTRL+Click to toggle, click on arrows or double-click to open.'); 93 | ImGui.Checkbox('Align label with current X position)', @align_label_with_current_x_position); 94 | ImGui.Text('Hello!'); 95 | if (align_label_with_current_x_position) then 96 | ImGui.Unindent(ImGui.GetTreeNodeToLabelSpacing()); 97 | node_clicked := -1; // Temporary storage of what node we have clicked to process selection at the end of the loop. May be a pointer to your own node type, etc. 98 | ImGui.PushStyleVar(ord(ImGuiStyleVar_IndentSpacing), ImGui.GetFontSize() * 3); // Increase spacing to differentiate leaves from expanded contents. 99 | for i := 0 to 5 do 100 | begin 101 | // Disable the default open on single-click behavior and pass in Selected flag according to our selection state. 102 | //ImGuiTreeNodeFlags node_flags := ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_OpenOnDoubleClick | ((selection_mask & (1 << i)) ? ImGuiTreeNodeFlags_Selected : 0); 103 | node_flags := ord(ImGuiTreeNodeFlags_OpenOnArrow) or ord(ImGuiTreeNodeFlags_OpenOnDoubleClick); 104 | if (selection_mask and (1 << i)) > 0 then 105 | node_flags := node_flags or ord (ImGuiTreeNodeFlags_Selected); 106 | if (i < 3) then 107 | begin 108 | // Node 109 | node_open := ImGui.TreeNodeEx(ImIDPtr(i), node_flags, 'Selectable Node %d', [i]); 110 | if (ImGui.IsItemClicked()) then 111 | node_clicked := i; 112 | if (node_open) then 113 | begin 114 | ImGui.Text('Blah blah' + LineEnding + 'Blah Blah'); 115 | ImGui.TreePop(); 116 | end; 117 | end 118 | else 119 | begin 120 | // Leaf: The only reason we have a TreeNode at all is to allow selection of the leaf. Otherwise we can use BulletText() or TreeAdvanceToLabelPos()+Text(). 121 | node_flags := node_flags or ord(ImGuiTreeNodeFlags_Leaf) or ord(ImGuiTreeNodeFlags_NoTreePushOnOpen); 122 | ImGui.TreeNodeEx(ImIDPtr(i), node_flags, 'Selectable Leaf %d', [i]); 123 | if (ImGui.IsItemClicked()) then 124 | node_clicked := i; 125 | end; 126 | end; 127 | if (node_clicked <> - 1) then 128 | begin 129 | // Update selection state. Process outside of tree loop to avoid visual inconsistencies during the clicking-frame. 130 | if (ImGui.GetIO()^.KeyCtrl) then 131 | selection_mask := selection_mask xor (1 << node_clicked) // CTRL+click to toggle 132 | else //if (!(selection_mask & (1 << node_clicked))) // Depending on selection behavior you want, this commented bit preserve selection when clicking on item that is part of the selection 133 | selection_mask := (1 << node_clicked); // Click to single-select 134 | end; 135 | ImGui.PopStyleVar(); 136 | if (align_label_with_current_x_position) then 137 | ImGui.Indent(ImGui.GetTreeNodeToLabelSpacing()); 138 | ImGui.TreePop(); 139 | end; 140 | ImGui.TreePop(); 141 | end; 142 | 143 | constructor TTestWindow.Create; 144 | begin 145 | show_app_main_menu_bar := false; 146 | show_app_console := false; 147 | show_app_log := false; 148 | show_app_layout := false; 149 | show_app_property_editor := false; 150 | show_app_long_text := false; 151 | show_app_auto_resize := false; 152 | show_app_constrained_resize := false; 153 | show_app_fixed_overlay := false; 154 | show_app_manipulating_window_title := false; 155 | show_app_custom_rendering := false; 156 | show_app_style_editor := false; 157 | 158 | show_app_metrics := false; 159 | show_app_about := false; 160 | 161 | no_titlebar := false; 162 | no_resize := false; 163 | no_move := false; 164 | no_scrollbar := false; 165 | no_collapse := false; 166 | no_menu := false; 167 | end; 168 | 169 | procedure TTestWindow.Show(var p_open: boolean); 170 | var 171 | window_flags: ImGuiWindowFlags = 0; 172 | draw_list: PImDrawList; 173 | value_raw, value_with_lock_threshold, mouse_delta: ImVec2; 174 | begin 175 | // Demonstrate the various window flags. Typically you would just use the default. 176 | if (no_titlebar) then window_flags := window_flags or ord(ImGuiWindowFlags_NoTitleBar); 177 | if (no_resize) then window_flags := window_flags or ord(ImGuiWindowFlags_NoResize); 178 | if (no_move) then window_flags := window_flags or ord(ImGuiWindowFlags_NoMove); 179 | if (no_scrollbar) then window_flags := window_flags or ord(ImGuiWindowFlags_NoScrollbar); 180 | if (no_collapse) then window_flags := window_flags or ord(ImGuiWindowFlags_NoCollapse); 181 | if (not no_menu) then window_flags := window_flags or ord(ImGuiWindowFlags_MenuBar); 182 | ImGui.SetNextWindowSize(ImVec2Init(550,680), ord(ImGuiCond_FirstUseEver)); 183 | if not ImGui.Begin_('ImGui Demo (translated version)', @p_open, window_flags) then begin 184 | // Early out if the window is collapsed, as an optimization. 185 | ImGui.End_; 186 | exit; 187 | end; 188 | 189 | //ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.65f); // 2/3 of the space for widget and 1/3 for labels 190 | ImGui.PushItemWidth(-140); // Right align, keep 140 pixels for labels 191 | 192 | ImGui.Text('Dear ImGui says hello.'); 193 | 194 | // Menu 195 | if (ImGui.BeginMenuBar()) then 196 | begin 197 | if (ImGui.BeginMenu('Menu')) then 198 | begin 199 | //ShowExampleMenuFile(); 200 | ImGui.EndMenu(); 201 | end; 202 | if (ImGui.BeginMenu('Examples')) then 203 | begin 204 | ImGui.MenuItem('Main menu bar', nil, @show_app_main_menu_bar); 205 | ImGui.MenuItem('Console', nil, @show_app_console); 206 | ImGui.MenuItem('Log', nil, @show_app_log); 207 | ImGui.MenuItem('Simple layout', nil, @show_app_layout); 208 | ImGui.MenuItem('Property editor', nil, @show_app_property_editor); 209 | ImGui.MenuItem('Long text display', nil, @show_app_long_text); 210 | ImGui.MenuItem('Auto-resizing window', nil, @show_app_auto_resize); 211 | ImGui.MenuItem('Constrained-resizing window', nil, @show_app_constrained_resize); 212 | ImGui.MenuItem('Simple overlay', nil, @show_app_fixed_overlay); 213 | ImGui.MenuItem('Manipulating window title', nil, @show_app_manipulating_window_title); 214 | ImGui.MenuItem('Custom rendering', nil, @show_app_custom_rendering); 215 | ImGui.EndMenu(); 216 | end; 217 | if (ImGui.BeginMenu('Help')) then 218 | begin 219 | ImGui.MenuItem('Metrics', nil, @show_app_metrics); 220 | ImGui.MenuItem('Style Editor', nil, @show_app_style_editor); 221 | ImGui.MenuItem('About ImGui', nil, @show_app_about); 222 | ImGui.EndMenu(); 223 | end; 224 | ImGui.EndMenuBar(); 225 | end; 226 | 227 | ImGui.Spacing(); 228 | if ImGui.CollapsingHeader('Help') then 229 | begin 230 | ImGui.TextWrapped('This window is being created by the ShowTestWindow() function. Please refer to the code for programming reference.' + LineEnding + LineEnding + 'User Guide:'); 231 | ImGui.ShowUserGuide(); 232 | end; 233 | 234 | if ImGui.CollapsingHeader('Window options') then 235 | begin 236 | ImGui.Checkbox('No titlebar', @no_titlebar); ImGui.SameLine(150); 237 | ImGui.Checkbox('No resize', @no_resize); 238 | ImGui.Checkbox('No move', @no_move); ImGui.SameLine(150); 239 | ImGui.Checkbox('No scrollbar', @no_scrollbar); ImGui.SameLine(300); 240 | ImGui.Checkbox('No collapse', @no_collapse); 241 | ImGui.Checkbox('No menu', @no_menu); 242 | 243 | if ImGui.TreeNode('Style') then 244 | begin 245 | ImGui.ShowStyleEditor(Imgui.GetStyle()); //this is useful to have, but doesn't need to be translated as an example 246 | ImGui.TreePop(); 247 | end; 248 | 249 | if ImGui.TreeNode('Logging') then 250 | begin 251 | ImGui.TextWrapped('The logging API redirects all text output so you can easily capture the content of a window or a block. Tree nodes can be automatically expanded. You can also call ImGui.LogText() to output directly to the log without a visual output.'); 252 | ImGui.LogButtons(); 253 | ImGui.TreePop(); 254 | end; 255 | end; 256 | 257 | if ImGui.CollapsingHeader('Widgets') then 258 | begin 259 | if ImGui.TreeNode('Trees') then 260 | Trees; 261 | end; 262 | 263 | if ImGui.CollapsingHeader('Keyboard, Mouse & Focus') then 264 | begin 265 | if ImGui.TreeNode('Dragging') then 266 | begin 267 | ImGui.TextWrapped('You can use ImGui::GetMouseDragDelta(0) to query for the dragged amount on any widget.'); 268 | ImGui.Button('Drag Me'); 269 | if ImGui.IsItemActive() then 270 | begin 271 | // Draw a line between the button and the mouse cursor 272 | draw_list := ImGui.GetWindowDrawList(); 273 | draw_list^.PushClipRectFullScreen; 274 | draw_list^.AddLine(ImGui.CalcItemRectClosestPoint(ImGui.GetIO()^.MousePos, true, -2.0), ImGui.GetIO()^.MousePos, 275 | ImColor(ImGui.GetStyle()^.Colors[ImGuiCol_Button]), 4.0); 276 | draw_list^.PopClipRect; 277 | 278 | value_raw := ImGui.GetMouseDragDelta(0, 0.0); 279 | value_with_lock_threshold := ImGui.GetMouseDragDelta(0); 280 | mouse_delta := ImGui.GetIO()^.MouseDelta; 281 | ImGui.SameLine(); 282 | ImGui.Text('Raw (%.1f, %.1f), WithLockThresold (%.1f, %.1f), MouseDelta (%.1f, %.1f)', 283 | [value_raw.x, value_raw.y, value_with_lock_threshold.x, value_with_lock_threshold.y, mouse_delta.x, mouse_delta.y]); 284 | end; 285 | ImGui.TreePop(); 286 | end; 287 | end; 288 | 289 | ImGui.End_; 290 | end; 291 | 292 | end. 293 | 294 | -------------------------------------------------------------------------------- /examples/fpimgui_impl_sdlgl2.pas: -------------------------------------------------------------------------------- 1 | { 2 | Translation of "ImGui SDL2 binding with OpenGL" example, using SDL2 headers provided by https://github.com/ev1313/Pascal-SDL-2-Headers 3 | 4 | In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp. 5 | 6 | You can copy and use unmodified imgui_impl_* files in your project. 7 | If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), Imgui_ImplSdlGL2_RenderDrawLists() and ImGui_ImplXXXX_Shutdown(). 8 | If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp. 9 | https://github.com/ocornut/imgui 10 | } 11 | 12 | unit fpimgui_impl_sdlgl2; 13 | {$mode objfpc}{$H+} 14 | 15 | interface 16 | 17 | uses 18 | sdl2, glad_gl, 19 | fpimgui; 20 | 21 | procedure ImGui_ImplSdlGL2_Init(); 22 | procedure ImGui_ImplSdlGL2_Shutdown(); 23 | procedure ImGui_ImplSdlGL2_NewFrame(window: PSDL_Window); 24 | procedure Imgui_ImplSdlGL2_RenderDrawLists(draw_data: PImDrawData); cdecl; 25 | function ImGui_ImplSdlGL2_ProcessEvent(event: PSDL_Event): boolean; 26 | 27 | implementation 28 | 29 | // Data 30 | var 31 | g_Time: double = 0.0; 32 | g_MousePressed: array[0..2] of bool = ( false, false, false ); 33 | g_MouseWheel: single = 0.0; 34 | g_FontTexture: GLuint = 0; 35 | 36 | function ImGui_ImplSdlGL2_ProcessEvent(event: PSDL_Event): boolean; 37 | var 38 | key: TSDL_KeyCode; 39 | io: PImGuiIO; 40 | begin 41 | result := false; 42 | io := igGetIO(); 43 | case event^.type_ of 44 | SDL_MOUSEWHEEL: begin 45 | if (event^.wheel.y > 0) then 46 | g_MouseWheel := 1; 47 | if (event^.wheel.y < 0) then 48 | g_MouseWheel := -1; 49 | result := true; 50 | end; 51 | SDL_MOUSEBUTTONDOWN: begin 52 | if (event^.button.button = SDL_BUTTON_LEFT) then g_MousePressed[0] := true; 53 | if (event^.button.button = SDL_BUTTON_RIGHT) then g_MousePressed[1] := true; 54 | if (event^.button.button = SDL_BUTTON_MIDDLE) then g_MousePressed[2] := true; 55 | result := true; 56 | end; 57 | SDL_TEXTINPUT: begin 58 | ImGuiIO_AddInputCharactersUTF8(event^.text.text); 59 | result := true; 60 | end; 61 | SDL_KEYDOWN, SDL_KEYUP: begin 62 | key := event^.key.keysym.sym and (not SDLK_SCANCODE_MASK); 63 | io^.KeysDown[key] := event^.type_ = SDL_KEYDOWN; 64 | io^.KeyShift := (SDL_GetModState() and KMOD_SHIFT) <> 0; 65 | io^.KeyCtrl := (SDL_GetModState() and KMOD_CTRL) <> 0; 66 | io^.KeyAlt := (SDL_GetModState() and KMOD_ALT) <> 0; 67 | io^.KeySuper := (SDL_GetModState() and KMOD_GUI) <> 0; 68 | result := true; 69 | end; 70 | end; 71 | end; 72 | 73 | 74 | procedure ImGui_ImplSdlGL2_CreateDeviceObjects(); 75 | var 76 | io: PImGuiIO; 77 | pixels: pbyte; 78 | width, height: integer; 79 | font_atlas: PImFontAtlas; 80 | last_texture: GLint; 81 | begin 82 | // Build texture atlas 83 | io := igGetIO(); 84 | font_atlas := io^.Fonts; 85 | //ImFontAtlas_AddFontDefault(font_atlas); 86 | ImFontAtlas_GetTexDataAsAlpha8(font_atlas, @pixels, @width, @height); 87 | 88 | // Upload texture to graphics system 89 | glGetIntegerv(GL_TEXTURE_BINDING_2D, @last_texture); 90 | glGenTextures(1, @g_FontTexture); 91 | glBindTexture(GL_TEXTURE_2D, g_FontTexture); 92 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 93 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 94 | glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); 95 | glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, width, height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, pixels); 96 | 97 | // Store our identifier 98 | ImFontAtlas_SetTexID(font_atlas, ImTextureID(g_FontTexture)); 99 | 100 | // Restore state 101 | glBindTexture(GL_TEXTURE_2D, last_texture); 102 | end; 103 | 104 | procedure ImGui_ImplSdlGL2_InvalidateDeviceObjects(); 105 | begin 106 | if (g_FontTexture <> 0) then begin 107 | glDeleteTextures(1, @g_FontTexture); 108 | ImFontAtlas_SetTexID(igGetIO()^.Fonts, nil); 109 | g_FontTexture := 0; 110 | end; 111 | end; 112 | 113 | function ImGui_MemAlloc(sz:size_t): pointer; cdecl; 114 | begin 115 | result := Getmem(sz); 116 | end; 117 | 118 | procedure ImGui_MemFree(ptr:pointer); cdecl; 119 | begin 120 | Freemem(ptr); 121 | end; 122 | 123 | procedure ImGui_ImplSdlGL2_Init(); 124 | var 125 | io: PImGuiIO; 126 | begin 127 | io := igGetIO(); 128 | 129 | // Keyboard mapping. ImGui will use those indices to peek into the io.KeyDown[] array. 130 | io^.KeyMap[ImGuiKey_Tab] := SDLK_TAB; 131 | io^.KeyMap[ImGuiKey_LeftArrow] := SDL_SCANCODE_LEFT; 132 | io^.KeyMap[ImGuiKey_RightArrow] := SDL_SCANCODE_RIGHT; 133 | io^.KeyMap[ImGuiKey_UpArrow] := SDL_SCANCODE_UP; 134 | io^.KeyMap[ImGuiKey_DownArrow] := SDL_SCANCODE_DOWN; 135 | io^.KeyMap[ImGuiKey_PageUp] := SDL_SCANCODE_PAGEUP; 136 | io^.KeyMap[ImGuiKey_PageDown] := SDL_SCANCODE_PAGEDOWN; 137 | io^.KeyMap[ImGuiKey_Home] := SDL_SCANCODE_HOME; 138 | io^.KeyMap[ImGuiKey_End] := SDL_SCANCODE_END; 139 | io^.KeyMap[ImGuiKey_Delete] := SDLK_DELETE; 140 | io^.KeyMap[ImGuiKey_Backspace] := SDLK_BACKSPACE; 141 | io^.KeyMap[ImGuiKey_Enter] := SDLK_RETURN; 142 | io^.KeyMap[ImGuiKey_Escape] := SDLK_ESCAPE; 143 | io^.KeyMap[ImGuiKey_A] := SDLK_a; 144 | io^.KeyMap[ImGuiKey_C] := SDLK_c; 145 | io^.KeyMap[ImGuiKey_V] := SDLK_v; 146 | io^.KeyMap[ImGuiKey_X] := SDLK_x; 147 | io^.KeyMap[ImGuiKey_Y] := SDLK_y; 148 | io^.KeyMap[ImGuiKey_Z] := SDLK_z; 149 | 150 | io^.RenderDrawListsFn := @Imgui_ImplSdlGL2_RenderDrawLists; 151 | io^.SetClipboardTextFn := nil; 152 | io^.GetClipboardTextFn := nil; 153 | io^.ClipboardUserData := nil; 154 | 155 | // Allocate memory through pascal's memory allocator. 156 | // This is optional, for example for seeing the number of memory allocations through HeapTrc 157 | io^.MemAllocFn := @ImGui_MemAlloc; 158 | io^.MemFreeFn := @ImGui_MemFree; 159 | end; 160 | 161 | procedure ImGui_ImplSdlGL2_Shutdown(); 162 | begin 163 | ImGui_ImplSdlGL2_InvalidateDeviceObjects(); 164 | igShutdown(); 165 | end; 166 | 167 | procedure ImGui_ImplSdlGL2_NewFrame(window: PSDL_Window); 168 | var 169 | w, h: integer; 170 | display_w, display_h: integer; 171 | io: PImGuiIO; 172 | time, mouseMask: UInt32; 173 | current_time: double; 174 | mx, my: Integer; 175 | begin 176 | if g_FontTexture = 0 then 177 | ImGui_ImplSdlGL2_CreateDeviceObjects(); 178 | 179 | io := igGetIO(); 180 | 181 | // Setup display size (every frame to accommodate for window resizing) 182 | SDL_GetWindowSize(window, @w, @h); 183 | io^.DisplaySize := ImVec2Init(w, h); 184 | io^.DisplayFramebufferScale := ImVec2Init(1, 1); 185 | 186 | // SDL_GL_GetDrawableSize might be missing in pascal sdl2 headers - remove the next 3 lines in that case 187 | SDL_GL_GetDrawableSize(window, @display_w, @display_h); 188 | if (w <> 0) and (h <> 0) and ((w <> display_w) or (h <> display_h)) then 189 | io^.DisplayFramebufferScale := ImVec2Init(display_w/w, display_h/h); 190 | 191 | // Setup time step 192 | time := SDL_GetTicks(); 193 | current_time := time / 1000.0; 194 | if (g_Time > 0.0) then 195 | io^.DeltaTime := current_time - g_Time 196 | else 197 | io^.DeltaTime := 1.0/60.0; 198 | g_Time := current_time; 199 | 200 | // Setup inputs 201 | // (we already got mouse wheel, keyboard keys & characters from SDL_PollEvent()) 202 | mouseMask := SDL_GetMouseState(@mx, @my); 203 | if ((SDL_GetWindowFlags(window) and SDL_WINDOW_INPUT_FOCUS) <> 0) then 204 | io^.MousePos := ImVec2Init(mx, my) // Mouse position, in pixels (set to -1,-1 if no mouse / on another screen, etc.) 205 | else 206 | io^.MousePos := ImVec2Init(-FLT_MAX, -FLT_MAX); 207 | 208 | // If a mouse press event came, always pass it as "mouse held this frame", so we don't miss click-release events that are shorter than 1 frame. 209 | io^.MouseDown[0] := g_MousePressed[0] or (mouseMask and SDL_BUTTON(SDL_BUTTON_LEFT) <> 0); 210 | io^.MouseDown[1] := g_MousePressed[1] or (mouseMask and SDL_BUTTON(SDL_BUTTON_RIGHT) <> 0); 211 | io^.MouseDown[2] := g_MousePressed[2] or (mouseMask and SDL_BUTTON(SDL_BUTTON_MIDDLE) <> 0); 212 | g_MousePressed[0] := false; 213 | g_MousePressed[1] := false; 214 | g_MousePressed[2] := false; 215 | 216 | io^.MouseWheel := g_MouseWheel; 217 | g_MouseWheel := 0.0; 218 | 219 | // Hide OS mouse cursor if ImGui is drawing it 220 | if io^.MouseDrawCursor then SDL_ShowCursor(SDL_DISABLE) else SDL_ShowCursor(SDL_ENABLE); 221 | 222 | // Start the frame 223 | igNewFrame(); 224 | end; 225 | 226 | procedure Imgui_ImplSdlGL2_RenderDrawLists(draw_data: PImDrawData); cdecl; 227 | var 228 | last_texture: GLint; 229 | last_viewport: array[0..3] of GLint; 230 | last_scissor_box: array[0..3] of GLint; 231 | io: PImGuiIO; 232 | fb_width, fb_height, n, cmd_i: integer; 233 | cmd_list: PImDrawList; 234 | vtx_buffer: PImDrawVert; 235 | idx_buffer: PImDrawIdx; 236 | pcmd: PImDrawCmd; 237 | begin 238 | // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates) 239 | io := igGetIO(); 240 | fb_width := trunc(io^.DisplaySize.x * io^.DisplayFramebufferScale.x); 241 | fb_height := trunc(io^.DisplaySize.y * io^.DisplayFramebufferScale.y); 242 | if (fb_width = 0) or (fb_height = 0) then 243 | exit; 244 | //draw_data->ScaleClipRects(io.DisplayFramebufferScale); 245 | 246 | glGetIntegerv(GL_TEXTURE_BINDING_2D, @last_texture); 247 | glGetIntegerv(GL_VIEWPORT, @last_viewport); 248 | glGetIntegerv(GL_SCISSOR_BOX, @last_scissor_box); 249 | glPushAttrib(GL_ENABLE_BIT or GL_COLOR_BUFFER_BIT or GL_TRANSFORM_BIT); 250 | glEnable(GL_BLEND); 251 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 252 | glDisable(GL_CULL_FACE); 253 | glDisable(GL_DEPTH_TEST); 254 | glEnable(GL_SCISSOR_TEST); 255 | glEnableClientState(GL_VERTEX_ARRAY); 256 | glEnableClientState(GL_TEXTURE_COORD_ARRAY); 257 | glEnableClientState(GL_COLOR_ARRAY); 258 | glEnable(GL_TEXTURE_2D); 259 | //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context 260 | 261 | // Setup viewport, orthographic projection matrix 262 | glViewport(0, 0, fb_width, fb_height); 263 | glMatrixMode(GL_PROJECTION); 264 | glPushMatrix(); 265 | glLoadIdentity(); 266 | glOrtho(0.0, io^.DisplaySize.x, io^.DisplaySize.y, 0.0, -1.0, +1.0); 267 | glMatrixMode(GL_MODELVIEW); 268 | glPushMatrix(); 269 | glLoadIdentity(); 270 | 271 | // Render command lists 272 | Assert(SizeOf(ImDrawIdx) = 2); 273 | 274 | for n := 0 to draw_data^.CmdListsCount - 1 do begin 275 | cmd_list := draw_data^.CmdLists[n]; 276 | vtx_buffer := cmd_list^.VtxBuffer.Data; 277 | idx_buffer := cmd_list^.IdxBuffer.Data; 278 | 279 | //pos/uv/color offsets: 0, 8, 16 280 | glVertexPointer(2, GL_FLOAT, sizeof(ImDrawVert), Pbyte(vtx_buffer) + 0); 281 | glTexCoordPointer(2, GL_FLOAT, sizeof(ImDrawVert), Pbyte(vtx_buffer) + 8); 282 | glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(ImDrawVert), Pbyte(vtx_buffer) + 16); 283 | 284 | for cmd_i := 0 to cmd_list^.CmdBuffer.Size - 1 do begin 285 | pcmd := @(cmd_list^.CmdBuffer.Data[cmd_i]); 286 | if pcmd^.UserCallback <> nil then begin 287 | pcmd^.UserCallback(cmd_list, pcmd); 288 | end else begin 289 | glBindTexture(GL_TEXTURE_2D, GLuint(pcmd^.TextureId)); 290 | glScissor(trunc(pcmd^.ClipRect.x), trunc(fb_height - pcmd^.ClipRect.w), 291 | trunc(pcmd^.ClipRect.z - pcmd^.ClipRect.x), trunc(pcmd^.ClipRect.w - pcmd^.ClipRect.y)); 292 | glDrawElements(GL_TRIANGLES, pcmd^.ElemCount, GL_UNSIGNED_SHORT, idx_buffer); 293 | end; 294 | idx_buffer += pcmd^.ElemCount 295 | end; 296 | end; 297 | 298 | // Restore modified state 299 | glDisableClientState(GL_COLOR_ARRAY); 300 | glDisableClientState(GL_TEXTURE_COORD_ARRAY); 301 | glDisableClientState(GL_VERTEX_ARRAY); 302 | glBindTexture(GL_TEXTURE_2D, last_texture); 303 | glMatrixMode(GL_MODELVIEW); 304 | glPopMatrix(); 305 | glMatrixMode(GL_PROJECTION); 306 | glPopMatrix(); 307 | glPopAttrib(); 308 | glViewport(last_viewport[0], last_viewport[1], GLsizei(last_viewport[2]), GLsizei(last_viewport[3])); 309 | glScissor(last_scissor_box[0], last_scissor_box[1], GLsizei(last_scissor_box[2]), GLsizei(last_scissor_box[3])); 310 | end; 311 | 312 | end. 313 | 314 | --------------------------------------------------------------------------------