From 5161ff1d763757e29cd2203a6e9117bfd446c10c Mon Sep 17 00:00:00 2001 From: ThePlank <75984453+ThePlank@users.noreply.github.com> Date: Sat, 27 Apr 2024 20:28:07 +0200 Subject: [PATCH 01/19] please work --- .gitmodules | 3 +++ haxelib.json | 12 ++++++------ todo.md | 18 ------------------ tools/Main.hx | 32 ++++++++++++++++++++++++++++++++ tools/Util.hx | 27 +++++++++++++++++++++++++++ tools/import.hx | 4 ++++ 6 files changed, 72 insertions(+), 24 deletions(-) create mode 100644 .gitmodules delete mode 100644 todo.md create mode 100644 tools/Main.hx create mode 100644 tools/Util.hx create mode 100644 tools/import.hx diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..188ed0e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "liblemons"] + path = liblemons + url = https://github.com/LemonsFramework/liblemons diff --git a/haxelib.json b/haxelib.json index db4bb48..b7cdb9d 100644 --- a/haxelib.json +++ b/haxelib.json @@ -1,17 +1,17 @@ { "name": "lemons", - "url" : "https://github.com/ThePlank/lemons/", + "url" : "https://github.com/LemonsFramework/lemons", "license": "WTFPL", "tags": ["hl"], - "description": "dumb game framework", + "description": "2d game framework i think", "version": "1.0.0", "classPath": "src/", - "releasenote": "initial release, idk what to say uuggghhh *shakes butt*", + "releasenote": "initial release", "contributors": ["ThePlank"], "dependencies": { "format": "", "hlsdl": "", - "hlopenal": "", - "stb_ogg_sound": "" - } + "hlopenal": "" + }, + "main": "tools.Main" } \ No newline at end of file diff --git a/todo.md b/todo.md deleted file mode 100644 index 0e31361..0000000 --- a/todo.md +++ /dev/null @@ -1,18 +0,0 @@ -## progress - -- sound ❌ 50% - - filters ✅ - - effects ✅ - - formats ❌ 50% - - wave ✅ - - mp3 ❌ - - flac ❌ - - ogg ✅ - - groups ❌ - -- display - - drivers ❌ - - vulkan ❌ - - directx (either 12 or 11) ❌ - - fallback opengl ❌ - - shading language (LSL) ❌ diff --git a/tools/Main.hx b/tools/Main.hx new file mode 100644 index 0000000..5ee725f --- /dev/null +++ b/tools/Main.hx @@ -0,0 +1,32 @@ +package tools; + +class Main { + public function new() { + originalPath = Sys.getCwd(); + Sys.setCwd(libPath); + + var args = Sys.args(); + args.pop(); + + if (args.length == 0) { + Sys.println('\033[0;33mlemons\033[0m - 2d game framework i think'); + Sys.println('run with --help to display a list of all commands'); + return; + } + + var argThing:String = args.shift(); + switch (argThing) { + case '--help': + Sys.println('\033[0;33mlemons\033[0m - 2d game framework i think'); + Sys.println(' --help - displays this message'); + Sys.println(' rebuild - rebuilds the native library for lemons'); + Sys.println(' build - builds the project that you\'re located in'); + default: + Sys.println('\033[1;31merm... error\033[0m invalid command: $argThing'); + + } + + } + + static public function main() new Main(); +} \ No newline at end of file diff --git a/tools/Util.hx b/tools/Util.hx new file mode 100644 index 0000000..4ef574a --- /dev/null +++ b/tools/Util.hx @@ -0,0 +1,27 @@ +package tools; + +import sys.io.Process; + +using StringTools; + +class Util { + public static var libPath:String = ''; + public static var originalPath:String = ''; + + private static function __init__() { + var process = new Process('haxelib', ['path', 'lemons']); + + try { + while (true) { + var line = process.stdout.readLine().trim(); + if (!line.startsWith('-D') && line.contains('lemons')) { + libPath = line.replace('src', '').normalize(); + break; + } + } + } catch(_) {} + + + process.close(); + } +} \ No newline at end of file diff --git a/tools/import.hx b/tools/import.hx new file mode 100644 index 0000000..41ee03a --- /dev/null +++ b/tools/import.hx @@ -0,0 +1,4 @@ +import tools.Util.libPath; +import tools.Util.originalPath; +import sys.io.File; +using haxe.io.Path; From f8553280e9ee2945d7b690ff928f9df2337aca61 Mon Sep 17 00:00:00 2001 From: ThePlank <75984453+ThePlank@users.noreply.github.com> Date: Sat, 27 Apr 2024 20:28:37 +0200 Subject: [PATCH 02/19] thank you github --- README.md | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index f590881..3eccf50 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,12 @@ -> [!CAUTION] -> this repository is VERY old, and a rewrite is going to happen soon. -> -> currently, lemons is using the builtin hashlink extensions for openal, opengl and sdl etc, but they lack a lot of functionality that i want. -> -> oh also the entire redering pipeline sucks and its broken + -# (old logo) +lemons is a game framework that's built on haxe that provides.. well what a game framework should, a framework to build your games on -idk another haxe game framework smh my head +# installing -this only supports hashlink because fuck you !! +go to your bash shell of choice or command prompt and run `haxelib git lemons https://github.com/LemonsFramework/lemons.git`. +you will need to follow the building instructions at the bottom if you're installing it from github -code example: +# building -```haxe -package; - -import sys.io.File; - -import lemons.App; -import lemons.sound.Sound; - -class Main extends App { - override public function init():Void { - var sound:Sound = Sound.createFromBytes(File.getBytes('${Sys.getCwd()}\\res\\testsong.wav')); - sound.volume = 0.75; - sound.loop = true; - sound.play(); - } - - static public function main() - var app = new Main(); -} -``` +again, go to your bash shell of choice or command prompt and run `haxelib run lemons rebuild`. oh, and you'll have to have cmake installed. \ No newline at end of file From aa6be9e92284a12a73d456b3c562cb66b3a7faa1 Mon Sep 17 00:00:00 2001 From: ThePlank <75984453+ThePlank@users.noreply.github.com> Date: Sun, 28 Apr 2024 08:22:27 +0200 Subject: [PATCH 03/19] rebuild command i think --- README.md | 16 +++++++++++++-- tools/Main.hx | 6 ++++-- tools/commands/RebuildCommand.hx | 35 ++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 tools/commands/RebuildCommand.hx diff --git a/README.md b/README.md index 3eccf50..8c854a4 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,21 @@ lemons is a game framework that's built on haxe that provides.. well what a game # installing -go to your bash shell of choice or command prompt and run `haxelib git lemons https://github.com/LemonsFramework/lemons.git`. +there isnt a haxelib version avalible yet so you'll have to follow the installing from github instructions + +## installing from github +go to your bash shell of choice or command prompt and run + +``` +cd +git clone --recurse-submodules https://github.com/LemonsFramework/lemons.git +cd lemons +haxelib dev . +``` +since `haxelib git` doesent recursivley clone submodules, you have to use this janky fix + you will need to follow the building instructions at the bottom if you're installing it from github # building -again, go to your bash shell of choice or command prompt and run `haxelib run lemons rebuild`. oh, and you'll have to have cmake installed. \ No newline at end of file +again, go to your bash shell of choice or command prompt and run `haxelib run lemons rebuild`. oh, and you'll have to have cmake installed. \ No newline at end of file diff --git a/tools/Main.hx b/tools/Main.hx index 5ee725f..7955924 100644 --- a/tools/Main.hx +++ b/tools/Main.hx @@ -10,7 +10,7 @@ class Main { if (args.length == 0) { Sys.println('\033[0;33mlemons\033[0m - 2d game framework i think'); - Sys.println('run with --help to display a list of all commands'); + Sys.println('run with \'help\' to display a list of all commands'); return; } @@ -18,9 +18,11 @@ class Main { switch (argThing) { case '--help': Sys.println('\033[0;33mlemons\033[0m - 2d game framework i think'); - Sys.println(' --help - displays this message'); + Sys.println(' help - displays this message'); Sys.println(' rebuild - rebuilds the native library for lemons'); Sys.println(' build - builds the project that you\'re located in'); + case 'rebuild': + new tools.commands.RebuildCommand(); default: Sys.println('\033[1;31merm... error\033[0m invalid command: $argThing'); diff --git a/tools/commands/RebuildCommand.hx b/tools/commands/RebuildCommand.hx new file mode 100644 index 0000000..b210b9b --- /dev/null +++ b/tools/commands/RebuildCommand.hx @@ -0,0 +1,35 @@ +package tools.commands; + +import sys.io.Process; + +class RebuildCommand { + public function new() { + if (Sys.systemName().toLowerCase() == 'windows') { // whyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy + try { + // the visual studio installer should always be here; if not im gonna have a panic attack + var process = new Process('C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe', ['-latest', '-property', 'installationPath']); + var vsPath = process.stdout.readLine(); + process.close(); + + var whyMicrosoft = new Process('"$vsPath\\Common7\\Tools\\VsDevCmd.bat" -arch=x64 -no_logo && set'); + try { + while (true) { + var line = whyMicrosoft.stdout.readLine(); + var lineSplit = line.split('='); + Sys.putEnv(lineSplit[0], lineSplit[1]); + } + } catch(_) {} + whyMicrosoft.close(); + } catch(e) { + trace('could\'nt setup build enviroment using visual studio, have you installed it?'); + } + } + + + Sys.command('cd $libPath/liblemons'); + Sys.command('mkdir make'); + Sys.command('cd make'); + Sys.command('cmake ..'); + Sys.command('cmake --build .'); + } +} \ No newline at end of file From 82fd03af6345c6adcdc33703b485819bf2676b20 Mon Sep 17 00:00:00 2001 From: ThePlank <75984453+ThePlank@users.noreply.github.com> Date: Sun, 28 Apr 2024 08:23:59 +0200 Subject: [PATCH 04/19] oops :blush: --- tools/Main.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Main.hx b/tools/Main.hx index 7955924..a910a35 100644 --- a/tools/Main.hx +++ b/tools/Main.hx @@ -16,7 +16,7 @@ class Main { var argThing:String = args.shift(); switch (argThing) { - case '--help': + case 'help': Sys.println('\033[0;33mlemons\033[0m - 2d game framework i think'); Sys.println(' help - displays this message'); Sys.println(' rebuild - rebuilds the native library for lemons'); From 7db8f135695f268dfd817896665c0d72cc41b07a Mon Sep 17 00:00:00 2001 From: ThePlank <75984453+ThePlank@users.noreply.github.com> Date: Sun, 28 Apr 2024 16:11:45 +0200 Subject: [PATCH 05/19] update logos, i suppose "i suppose, hey!" --- art/LogoWithText.png | Bin 15138 -> 17952 bytes art/LogoWithText.svg | 149 ++++++++++++++++++++++++++++++++++++---- art/tmpLogo.png | Bin 1991 -> 0 bytes art/tmpLogoWithText.png | Bin 3420 -> 0 bytes 4 files changed, 136 insertions(+), 13 deletions(-) delete mode 100644 art/tmpLogo.png delete mode 100644 art/tmpLogoWithText.png diff --git a/art/LogoWithText.png b/art/LogoWithText.png index 9ce0d0565eb14d7edf8bd47984376cdfc435576f..70f855c09bdf5bb30eacf4842bc44b544ebd0df0 100644 GIT binary patch literal 17952 zcmcFr1y|f`unz7H#flVZad&rjDaE~Lad&8ODDLj=?q1xzXmNLkW$%9Xocj}QPR?$2 zvq|QiOy-@L=a~&xQIbYOCPD@P08Lg#LJa_*A)7!A;(u?j)7L!!Kn}=Ch-!Fbo@cp# zQ`aKy-J%i+i0v~lrinnN3qx_p#~W0wp!nPF*!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&-9z)mtIGG2Nq`lqhe^63w1iK~*3EVVAJKp+>MBpP=RbSe zvuFtDuo}T24N~dqD>zt4ntLeuhu9n$HgXLootQs7b)GMBT0#C~%{%hnUT)5>n}~ek zBS^<$f={Y{pKb;TBS)~LWKr&78;rLws4P!FtzRJr6zhx>I78e8URA1G(QF+#)98XG zY$E?FHZM-?phSVI!uW(UKnu?fhFFw{1qOf2*g_gVH%iqlFyAF`H`{PGxL&~HESZE} zzgzNK!YM*F8bOfF9#}i5P8LuU-Af!cwK!`go7{K-1OsOLRg=OY(xlJ#l9Ap9-XK@hU0FfBxr4Z3Vg93;wImw8W_3!+xeE*qN70<*RY> jL7I=;F&@-!PnZat_Z}~8&MT0;uYj78Hl$9$D(wFNkF-xr diff --git a/art/LogoWithText.svg b/art/LogoWithText.svg index 23198f4..03453a2 100644 --- a/art/LogoWithText.svg +++ b/art/LogoWithText.svg @@ -1,8 +1,125 @@ - + + + - - - @@ -255,6 +372,11 @@ L 467 1554 156 1554 156 0 Z"/> + + + + + @@ -266,7 +388,7 @@ L 467 1554 156 1554 156 0 Z"/> -lemons +lemons @@ -274,7 +396,8 @@ L 467 1554 156 1554 156 0 Z"/> -2d game framework i think +2d game framework i think + diff --git a/art/tmpLogo.png b/art/tmpLogo.png deleted file mode 100644 index 868d5edc3eb80bc4a7f4fbc2a6f45243191935ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1991 zcmV;&2RQhNP)zTLcL7^1;h9J>Kq#eULQr6Ca`NIS!f z^Zmh#s>+av8HN!A<1~ZKplgL8ry1t1momriM+}J=K}d|9;qHoP-8f4eX<);_D`t8P ziHHWsnr1}m&CtW@3vkb9zpdHxi=jnAR|cdGWroJg&%`gnk>g9R*&PxAYMAjBMrdJ) ztHDKw)jnr-NXrZYZxDD(Gg##oXO1hoW(@I~8b(m~TbtqWoi>*}vMeBPWX5lW-&`;% z=Jq}T9ChgU^Qa*PP?KcA*4JW=lmGb8HBIc)i18bITR3zNKR#n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G(V8N#wqc(%EA}ydHRY#T-3N~vC-V#H$nQ`Ch4;M^{ z8N_IYAyoGbP3bm+`05YZ89HwBJmbicO&nk?0jLaIk+MhNKGLgI24X4O9fV-EA=G2g z6e_Xz2bw{^v>}MEb80;K%{sE49Ug$?5Z}8*IcVpri!o|On8OM~2#m8jT*6@@a{?pS z9>*ct84dog$X6U$+|dJkjd>8`_+$Wp6?lMZ;5yTgN*=DXSu0-pxyF+T8I7thfn%i69HARJ@mA6VlXG{)}X zjKrAvqlTD86N3o&5sea9A1`x@s))0u{jt3bLFk4^p`!0FepEx=K|97+x_Cxk>ZM?q z;op3%*deDWg)3-uhZI6NOOXPnAqQIrry-{y2UFl+aLyfa8geiN4hHAkA*Ue+Q{Z55 Z{s6yW6#3+IzzzTa002ovPDHLkV1k*_yHWrE diff --git a/art/tmpLogoWithText.png b/art/tmpLogoWithText.png deleted file mode 100644 index a6a79f7a7549bcef44564d81cd082fd8acc9b541..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3420 zcmbW4i8mBp8^?!XLStV-NG8SDlc?;*mVFyzi7~Q{UCP#C>|-fqi=sx>p&84d?6MRl z*=A%P*^2rhVPtuyf8o97+E|t`FojCaA*;6EKc(yX2V}$a2+Ih?B6)Tu6e$0JgQB;t zzbUywCwRl+I5zfh)qOSgIL1cPe8l(>7 z)x%ESxdiC<5_yDFXi*!sl>ZmyQy=N}ho}1Y?oK{d3L{W^Er~|}llLnUMDdpVw@$*t z?%IIdY(B8x-G1!3a&-Q4!V*)IIAb@d!sibMBW{sWmQ+Ie9rgL3vT(P|E>gCR=<-Y? zxG(7|2N;$Rn5da$paXO~O<{TcLrJ1&RRu6|J=kgx`<74s1>zBa%-W$( zlq!d|cD($#nYXBxd~r%^m8T~D>hG3pCyXF3^d?Op?#Z7bTWXY* zCUmMGP6Q)e=m`1fx0XG>>!+e}3e?%T0=~@whgGB~8dgi%7U~$AoCCXd>*gX2dv5YV zt9VfnpDZD4!Wxg_z+FE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JjYTP~wczv~vPuXsA`1T5P*2%?-soVnQKz#B+Be zWJW6jO6Y`k)fX*!K0STE`$ZXd;{cXmN_DSVIAyfqo(R4>ZVjMf6*d~Y{t5JDuyYpU zwVYAbl+Vy1QW=Qnpjf&vhtB#nJz1xK)7$SD*9Wy7nMi;)dUgBQPvc0`B8ZDJQ2|(T zsXFkq@gk$l+UN(cpgXh-`j88?U|pg_%O4rB|JQj4gyVPn+hr8X7=I%!FNCSLg#`f0 Xu-O>>UmLZ1_HQyZw1mCYM`Hd5q32^+ From fd6577fe02dd35a64649019ec4cb13d2108e15a1 Mon Sep 17 00:00:00 2001 From: plank <75984453+ThePlank@users.noreply.github.com> Date: Sun, 28 Apr 2024 16:27:05 +0200 Subject: [PATCH 06/19] switch to gplv2 --- LICENSE | 342 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 334 insertions(+), 8 deletions(-) diff --git a/LICENSE b/LICENSE index f0fdee5..d159169 100644 --- a/LICENSE +++ b/LICENSE @@ -1,13 +1,339 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 2004 Sam Hocevar + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. + Preamble - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. You just DO WHAT THE FUCK YOU WANT TO. \ No newline at end of file + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. From bb33a4e4c7eb245240a0a59382e2220a7deb8939 Mon Sep 17 00:00:00 2001 From: ThePlank <75984453+ThePlank@users.noreply.github.com> Date: Thu, 2 May 2024 11:23:41 +0200 Subject: [PATCH 07/19] project stuff --- extraParams.hxml | 2 -- haxelib.json | 4 +-- tools/Main.hx | 8 +++-- tools/commands/BuildCommand.hx | 24 +++++++++++++ tools/commands/CreateCommand.hx | 9 +++++ tools/commands/DisplayCommand.hx | 24 +++++++++++++ tools/project/Ini.hx | 50 ++++++++++++++++++++++++++ tools/project/Project.hx | 61 ++++++++++++++++++++++++++++++++ 8 files changed, 175 insertions(+), 7 deletions(-) create mode 100644 tools/commands/BuildCommand.hx create mode 100644 tools/commands/CreateCommand.hx create mode 100644 tools/commands/DisplayCommand.hx create mode 100644 tools/project/Ini.hx create mode 100644 tools/project/Project.hx diff --git a/extraParams.hxml b/extraParams.hxml index db80b49..e930b6e 100644 --- a/extraParams.hxml +++ b/extraParams.hxml @@ -1,3 +1 @@ --lib hlsdl --lib hlopenal -lib format \ No newline at end of file diff --git a/haxelib.json b/haxelib.json index b7cdb9d..b917114 100644 --- a/haxelib.json +++ b/haxelib.json @@ -9,9 +9,7 @@ "releasenote": "initial release", "contributors": ["ThePlank"], "dependencies": { - "format": "", - "hlsdl": "", - "hlopenal": "" + "format": "" }, "main": "tools.Main" } \ No newline at end of file diff --git a/tools/Main.hx b/tools/Main.hx index a910a35..843600e 100644 --- a/tools/Main.hx +++ b/tools/Main.hx @@ -2,11 +2,10 @@ package tools; class Main { public function new() { - originalPath = Sys.getCwd(); Sys.setCwd(libPath); var args = Sys.args(); - args.pop(); + originalPath = args.pop(); if (args.length == 0) { Sys.println('\033[0;33mlemons\033[0m - 2d game framework i think'); @@ -21,6 +20,11 @@ class Main { Sys.println(' help - displays this message'); Sys.println(' rebuild - rebuilds the native library for lemons'); Sys.println(' build - builds the project that you\'re located in'); + Sys.println(' create - creates a project'); + case 'build': + new tools.commands.BuildCommand(); + case 'display': + new tools.commands.DisplayCommand(); case 'rebuild': new tools.commands.RebuildCommand(); default: diff --git a/tools/commands/BuildCommand.hx b/tools/commands/BuildCommand.hx new file mode 100644 index 0000000..28f43aa --- /dev/null +++ b/tools/commands/BuildCommand.hx @@ -0,0 +1,24 @@ +package tools.commands; + +import sys.io.Process; +import tools.project.Project; +import tools.project.Ini; + +class BuildCommand { + public function new() { + Sys.setCwd(originalPath); + + var project:String = null; + + try { + project = File.getContent('project.ini'); + } catch(e) { + Sys.println('\033[1;31merm... error\033[0m working directory does not have a project.ini, are you located in your project directory?'); + return; + } + + var parsedProject:Project = new Project(new Ini(project)); + + Sys.command('haxe ' + parsedProject.toArgList().join(' ')); + } +} \ No newline at end of file diff --git a/tools/commands/CreateCommand.hx b/tools/commands/CreateCommand.hx new file mode 100644 index 0000000..e419820 --- /dev/null +++ b/tools/commands/CreateCommand.hx @@ -0,0 +1,9 @@ +package tools.commands; + +import sys.io.Process; + +class CreateCommand { + public function new() { + + } +} \ No newline at end of file diff --git a/tools/commands/DisplayCommand.hx b/tools/commands/DisplayCommand.hx new file mode 100644 index 0000000..f598410 --- /dev/null +++ b/tools/commands/DisplayCommand.hx @@ -0,0 +1,24 @@ +package tools.commands; + +import sys.io.Process; +import tools.project.Project; +import tools.project.Ini; + +class DisplayCommand { + public function new() { + Sys.setCwd(originalPath); + + var project:String = null; + + try { + project = File.getContent('project.ini'); + } catch(e) { + Sys.println('\033[1;31merm... error\033[0m working directory does not have a project.ini, are you located in your project directory?'); + return; + } + + var parsedProject:Project = new Project(new Ini(project)); + + Sys.println(parsedProject.toArgList().join('\n')); + } +} \ No newline at end of file diff --git a/tools/project/Ini.hx b/tools/project/Ini.hx new file mode 100644 index 0000000..1c8c467 --- /dev/null +++ b/tools/project/Ini.hx @@ -0,0 +1,50 @@ +package tools.project; + +using StringTools; + +// basic ini parser, might seperate it into a seperate library + +@:transitive +abstract OneOfThree(Dynamic) from T1 to T1 from T2 to T2 from T3 to T3 {} + +typedef IniEntry = OneOfThree; +typedef IniSection = Map; + +class Ini { + public var globalVariables:IniSection = []; + public var sections:Map = []; + + public function new(string:String) { + final lines:Array = string.split('\n'); + + var curSection:String = ''; + + for (line in lines) { + if (isComment(line)) continue; + if (line.trim() == '') continue; + + if (line.charAt(0) == '[') { + if (line.indexOf(']') == -1) + throw 'Expected ]'; + + curSection = line.substr(1, line.indexOf(']') - 1); + if (sections[curSection] == null) sections.set(curSection, []); + continue; + } + + if (line.indexOf('=') == -1) throw 'Expected ='; + + final section:IniSection = (curSection == '' ? globalVariables : sections[curSection]); + final entryName:String = line.substr(0, line.indexOf('=')).trim(); + final entryValue:String = line.substr(line.indexOf('=') + 1).trim(); + + if (entryValue == 'true' || entryValue == 'false') section[entryName] = entryValue == 'true'; + else if (~/[0-9]/.match(entryValue.charAt(0))) section[entryName] = Std.parseFloat(entryValue); + else if (entryValue.charAt(0) == '\"' || entryValue.charAt(0) == '\'') section[entryName] = entryValue.substr(1, entryValue.length - 2); + else section[entryName] = entryValue; + } + } + + inline function isComment(string:String):Bool + return string.charAt(0) == ';' || string.charAt(0) == '#'; +} \ No newline at end of file diff --git a/tools/project/Project.hx b/tools/project/Project.hx new file mode 100644 index 0000000..03e2684 --- /dev/null +++ b/tools/project/Project.hx @@ -0,0 +1,61 @@ +package tools.project; + +import tools.project.Ini; + +class Project { + + var sources:Array = []; + var output:String = ''; + var filename:String = ''; + var resourceFolder:String = ''; + var mainClass:String = ''; + + var gameWidth:Int = 0; + var gameHeight:Int = 0; + + var windowTitle:String = ''; + var windowResizable:Bool = false; + + var defines:Map = []; + var libraries:Map = []; + + var useCCompilation:Bool = false; + + public function new(projectFile:Ini, ?useCCompilation:Bool = false) { + this.useCCompilation = useCCompilation; + + filename = projectFile.globalVariables['filename']; + output = projectFile.globalVariables['output']; + resourceFolder = projectFile.globalVariables['resources']; + mainClass = projectFile.globalVariables['main']; + + for (_ => source in projectFile.sections['sources']) + sources.push(source); + + gameWidth = Std.int(projectFile.sections['game']['width']); + gameHeight = Std.int(projectFile.sections['game']['height']); + + windowTitle = projectFile.sections['window']['title']; + windowResizable = projectFile.sections['window']['resizable']; + + for (defineName => define in projectFile.sections['defines']) + defines[defineName] = Std.string(define); // in this case we want the value to be a string + + for (library => version in projectFile.sections['libraries']) + libraries[library] = Std.string(version); + } + + public function toArgList():Array { + var list:Array = []; + + list.push('--hl ' + '$output/$filename${useCCompilation ? '.c' : '.hl'}'.normalize()); + list.push('-m $mainClass'); + for (source in sources) list.push('-p $source'); + for (defineName => define in defines) list.push('-D $defineName${define == '' ? '' : '=\"$define\"'}'); + for (library => version in libraries) list.push('-L $library${version == '' ? '' : ':$version'}'); + list.push('-L lemons'); + + return list; + } + +} \ No newline at end of file From 9148195a8e1449ad1e41ac20d60c67d961e74827 Mon Sep 17 00:00:00 2001 From: ThePlank <75984453+ThePlank@users.noreply.github.com> Date: Fri, 3 May 2024 11:21:03 +0200 Subject: [PATCH 08/19] add null coalescing to project --- tools/project/Project.hx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tools/project/Project.hx b/tools/project/Project.hx index 03e2684..7739d85 100644 --- a/tools/project/Project.hx +++ b/tools/project/Project.hx @@ -1,6 +1,7 @@ package tools.project; import tools.project.Ini; +import haxe.Serializer.run; class Project { @@ -24,19 +25,19 @@ class Project { public function new(projectFile:Ini, ?useCCompilation:Bool = false) { this.useCCompilation = useCCompilation; - filename = projectFile.globalVariables['filename']; - output = projectFile.globalVariables['output']; - resourceFolder = projectFile.globalVariables['resources']; - mainClass = projectFile.globalVariables['main']; + filename = projectFile.globalVariables['filename'] ?? 'game'; + output = projectFile.globalVariables['output'] ?? 'out/'; + resourceFolder = projectFile.globalVariables['resources'] ?? 'res/'; + mainClass = projectFile.globalVariables['main'] ?? 'Main'; for (_ => source in projectFile.sections['sources']) sources.push(source); - gameWidth = Std.int(projectFile.sections['game']['width']); - gameHeight = Std.int(projectFile.sections['game']['height']); + gameWidth = Std.int(projectFile.sections['game']['width'] ?? 640); + gameHeight = Std.int(projectFile.sections['game']['height'] ?? 480); - windowTitle = projectFile.sections['window']['title']; - windowResizable = projectFile.sections['window']['resizable']; + windowTitle = projectFile.sections['window']['title'] ?? 'lemons project'; + windowResizable = projectFile.sections['window']['resizable'] ?? true; for (defineName => define in projectFile.sections['defines']) defines[defineName] = Std.string(define); // in this case we want the value to be a string @@ -55,6 +56,11 @@ class Project { for (library => version in libraries) list.push('-L $library${version == '' ? '' : ':$version'}'); list.push('-L lemons'); + list.push('-D gameSize=${gameWidth}x${gameHeight}'); + + final windowSettings = {title: windowTitle, resizable: windowResizable}; + list.push('-D windowSettings=${run(windowSettings)}'); + return list; } From 0a549a5c565a979bf1a0d77e63a60167f2b77d0f Mon Sep 17 00:00:00 2001 From: plank <75984453+ThePlank@users.noreply.github.com> Date: Sat, 4 May 2024 15:58:51 +0200 Subject: [PATCH 09/19] Update LICENSE --- LICENSE | 659 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 412 insertions(+), 247 deletions(-) diff --git a/LICENSE b/LICENSE index d159169..8000a6f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,221 +1,397 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. The precise terms and conditions for copying, distribution and -modification follow. +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. - GNU GENERAL PUBLIC LICENSE + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - a) You must cause the modified files to carry prominent notices + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, +identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of +on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. +entire whole, and thus to each and every part regardless of who wrote +it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or -collective works based on the Program. +collective works based on the Library. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not compelled to copy the source along with the object code. - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are +distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying -the Program or works based on it. +the Library or works based on it. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to +You are not responsible for enforcing compliance by third parties with this License. - 7. If, as a consequence of a court judgment or allegation of patent + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. +refrain entirely from distribution of the Library. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is +integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that @@ -226,114 +402,103 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - 8. If the distribution and/or use of the Program is restricted in + 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. NO WARRANTY - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Programs + How to Apply These Terms to Your New Libraries - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. - + Copyright (C) - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + USA Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if +school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random + Hacker. - , 1 April 1989 + , 1 April 1990 Ty Coon, President of Vice -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. +That's all there is to it! From 8c818fdc851b5dc396ce4b33333254819d027101 Mon Sep 17 00:00:00 2001 From: plank <75984453+ThePlank@users.noreply.github.com> Date: Sat, 4 May 2024 16:02:49 +0200 Subject: [PATCH 10/19] here too --- LICENSE | 659 ++++++++++++++------------------------------------------ 1 file changed, 160 insertions(+), 499 deletions(-) diff --git a/LICENSE b/LICENSE index 8000a6f..0a04128 100644 --- a/LICENSE +++ b/LICENSE @@ -1,504 +1,165 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random - Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. From 41970a8d810e605c5e74b5f9a3e2eb06c2a513bf Mon Sep 17 00:00:00 2001 From: ThePlank <75984453+ThePlank@users.noreply.github.com> Date: Sun, 16 Jun 2024 09:20:56 +0200 Subject: [PATCH 11/19] m --- src/hl/Format.hx | 140 -- src/lemons/App.hx | 262 +-- src/lemons/Time.hx | 21 + src/lemons/display/Camera.hx | 18 - src/lemons/display/Group.hx | 32 - src/lemons/display/IDrawable.hx | 6 - src/lemons/display/Object.hx | 20 - src/lemons/display/Scene.hx | 6 - src/lemons/display/Shader.hx | 92 - src/lemons/display/Sprite.hx | 58 - src/lemons/display/Texture.hx | 75 - src/lemons/display/render/GLFWWindow.hx | 55 + src/lemons/display/render/Renderer.hx | 21 + src/lemons/display/render/Window.hx | 41 + src/lemons/display/render/_backend/GLFW.hx | 430 ++++ src/lemons/display/render/_backend/OpenGL.hx | 1908 ++++++++++++++++++ src/lemons/geom/Matrix4.hx | 65 - src/lemons/geom/Vector0.hx | 7 - src/lemons/geom/Vector2.hx | 11 - src/lemons/geom/Vector3.hx | 13 - src/lemons/sound/Sound.hx | 162 -- src/lemons/sound/SoundData.hx | 163 -- src/lemons/sound/effects/Effects.hx | 313 --- src/lemons/sound/filters/Filters.hx | 105 - tools/project/Project.hx | 7 +- 25 files changed, 2503 insertions(+), 1528 deletions(-) delete mode 100644 src/hl/Format.hx create mode 100644 src/lemons/Time.hx delete mode 100644 src/lemons/display/Camera.hx delete mode 100644 src/lemons/display/Group.hx delete mode 100644 src/lemons/display/IDrawable.hx delete mode 100644 src/lemons/display/Object.hx delete mode 100644 src/lemons/display/Scene.hx delete mode 100644 src/lemons/display/Shader.hx delete mode 100644 src/lemons/display/Sprite.hx delete mode 100644 src/lemons/display/Texture.hx create mode 100644 src/lemons/display/render/GLFWWindow.hx create mode 100644 src/lemons/display/render/Renderer.hx create mode 100644 src/lemons/display/render/Window.hx create mode 100644 src/lemons/display/render/_backend/GLFW.hx create mode 100644 src/lemons/display/render/_backend/OpenGL.hx delete mode 100644 src/lemons/geom/Matrix4.hx delete mode 100644 src/lemons/geom/Vector0.hx delete mode 100644 src/lemons/geom/Vector2.hx delete mode 100644 src/lemons/geom/Vector3.hx delete mode 100644 src/lemons/sound/Sound.hx delete mode 100644 src/lemons/sound/SoundData.hx delete mode 100644 src/lemons/sound/effects/Effects.hx delete mode 100644 src/lemons/sound/filters/Filters.hx diff --git a/src/hl/Format.hx b/src/hl/Format.hx deleted file mode 100644 index ee83160..0000000 --- a/src/hl/Format.hx +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (C)2005-2019 Haxe Foundation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -package hl; - -enum abstract PixelFormat(Int) { - var RGB = 0; - var BGR = 1; - var RGBX = 2; - var BGRX = 3; - var XBGR = 4; - var XRGB = 5; - var GRAY = 6; - var RGBA = 7; - var BGRA = 8; - var ABGR = 9; - var ARGB = 10; - var CMYK = 11; -} - -typedef OGG = hl.Abstract<"fmt_ogg">; -typedef Mp3 = hl.Abstract<"fmt_mp3">; - - -// These are the bindings for the HL `fmt.hdll` library, which contains various low level formats handling. -class Format { - // Decode JPG data into the target buffer. - @:hlNative("fmt", "jpg_decode") - public static function decodeJPG(src:hl.Bytes, srcLen:Int, dst:hl.Bytes, width:Int, height:Int, stride:Int, format:PixelFormat, flags:Int):Bool { - return false; - } - - // Decode PNG data into the target buffer. - @:hlNative("fmt", "png_decode") - public static function decodePNG(src:hl.Bytes, srcLen:Int, dst:hl.Bytes, width:Int, height:Int, stride:Int, format:PixelFormat, flags:Int):Bool { - return false; - } - - // Decode any image data into ARGB pixels - #if (hl_ver >= version("1.10.0")) - @:hlNative("fmt", "dxt_decode") - public static function decodeDXT(src:hl.Bytes, dst:hl.Bytes, width:Int, height:Int, dxtFormat:Int):Bool { - return false; - } - #end - - /** - Upscale/downscale an image. - Currently supported flag bits: 1 = bilinear filtering - **/ - @:hlNative("fmt", "img_scale") - public static function scaleImage(out:hl.Bytes, outPos:Int, outStride:Int, outWidth:Int, outHeight:Int, _in:hl.Bytes, inPos:Int, inStride:Int, - inWidth:Int, inHeight:Int, flags:Int) {} - - /** - Performs a cryptographic digest of some bytes. - 0 = Md5 , 1 = Sha1 , 2 = Crc32, 3 = Adler32 - Set 256 flag to tell the src are String bytes. - **/ - @:hlNative("fmt", "digest") - public static function digest(out:hl.Bytes, src:hl.Bytes, srcLen:Int, algorithm:Int) {} - - - // ogg - - @:hlNative("fmt", "ogg_open") - public static function openOgg(bytes:hl.Bytes, size:Int):OGG - return null; - - @:hlNative("fmt", "ogg_info") - public static function oggInfo(ogg:OGG, bitrate:hl.Ref, freq:hl.Ref, samples:hl.Ref, channels:hl.Ref):Void {} - - @:hlNative("fmt", "ogg_tell") - public static function oggTell(ogg:OGG):Int - return 0; - - @:hlNative("fmt", "ogg_seek") - public static function oggSeek(ogg:OGG, sample:Int):Bool - return false; - - @:hlNative("fmt", "ogg_read") - public static function oggRead(ogg:OGG, output:hl.Bytes, size:Int, format:Int):Int - return -1; - - // mp3 - - @:hlNative("fmt", "mp3_open") - public static function openMp3(#if (hl_ver >= "1.13.0") bytes:hl.Bytes, size:Int #end):Mp3 - return null; - - @:hlNative("fmt", "mp3_frame_info") - public static function mp3FrameInfo(mp3:Mp3, bitrate:hl.Ref, channels:hl.Ref, frameBytes:hl.Ref, hz:hl.Ref, layer:hl.Ref):Void {} - - @:hlNative("fmt", "mp3_decode_frame") - public static function mp3DecodeFrame(mp3:Mp3, bytes:hl.Bytes, size:Int, position:Int, output:hl.Bytes, outputSize:Int, offset:Int):Int - return 0; -} - -class Mikktspace { - public var buffer:hl.BytesAccess; - public var stride:Int; - public var xPos:Int; - public var normalPos:Int; - public var uvPos:Int; - public var tangents:hl.BytesAccess; - public var tangentStride:Int; - public var tangentPos:Int; - public var indexes:hl.BytesAccess; - public var indices:Int; - - public function new() {} - - public function compute(threshold = 180.) { - if (!_compute(this, threshold)) - throw "assert"; - } - - @:hlNative("fmt", "compute_mikkt_tangents") static function _compute(m:Dynamic, threshold:Float):Bool { - return false; - } -} diff --git a/src/lemons/App.hx b/src/lemons/App.hx index d058c2e..c6a9751 100644 --- a/src/lemons/App.hx +++ b/src/lemons/App.hx @@ -1,267 +1,47 @@ package lemons; -import sdl.GL; -import sdl.Event; -import sdl.Sdl; -import sdl.Sdl.SDLHint; -import sdl.Window; -import sdl.Event.WindowStateChange; - -import lemons.input.keyboard.KeyCode; +import lemons.display.render.Renderer; +import lemons.display.render.Window; +import lemons.display.render.GLFWWindow; import lemons.macro.DefineMacro; -import lemons.sound.Sound; -import lemons.geom.Matrix4; - -import lemons.display.Scene; -import lemons.display.Sprite; - -import lemons.util.Signal; +import lemons.Time; /** - * Entry point for every Lemons project + * entry point for every lemons project **/ class App { - - private static var _glVao:VertexArray; - private static var _glVbo:Buffer; - private static var _glEbo:Buffer; - - /** - * Main game window - **/ - public static var mainWindow:sdl.Window; - - /** - * A container for SDL signals - **/ - public var callbacks:WindowCallbacks; - - - public var scene:Scene; + public var renderer:Renderer; + public var window:Window; /** - * Creates the main window and starts the update loop, don't override this + * creates the main window and starts the update loop, don't override this **/ public function new() { - Sdl.init(); - - callbacks = new WindowCallbacks(); - - var windowSize = DefineMacro.getDefineValue('windowResolution').split(','); - mainWindow = new sdl.Window(DefineMacro.getDefineValue('windowTitle'), - Std.parseInt(windowSize[0]), Std.parseInt(windowSize[1]), 0, 0, - Window.SDL_WINDOW_SHOWN | Window.SDL_WINDOW_RESIZABLE); - mainWindow.center(); - - initBuffers(); - - #if windowVsync mainWindow.vsync = true; #end - GL.viewport(0, 0, Std.parseInt(windowSize[0]), Std.parseInt(windowSize[1])); - Sprite.projection = Matrix4.orthographic(0, Std.parseInt(windowSize[0]), Std.parseInt(windowSize[1]), 0); - - scene = new Scene(); - - init(); - - var lastTime = Sys.time(); - while (true) { - var newTime = Sys.time(); - if (!Sdl.processEvents(onEvent)) break; + var rendererType:RendererType = DefineMacro.getDefineValue('renderer'); + var windowSettings = haxe.Unserializer.run(DefineMacro.getDefineValue('windowSettings')); + var gameSize = DefineMacro.getDefineValue('gameSize').split('x').map((str) -> return Std.parseInt(str)); - update(newTime - lastTime); - scene.draw(); - mainWindow.present(); - lastTime = newTime; - if (mainWindow.vsync) Sys.sleep(1 / 60); + switch(rendererType) { + case OPENGL | VULKAN: window = new GLFWWindow(gameSize[0], gameSize[1], windowSettings.title); + default: throw 'not implemented'; } - Sound.stopEngine(); - } - - - private function initBuffers() { - var vertex:Array = [ - 1, 1, 1, 1, // top right - 1, -1, 1, 0, // bottom right - -1, -1, 0, 0, // bottom left - -1, 1, 0, 1, // top left - ]; - - var indices:Array = [ - 0, 1, 3, // first triangle - 1, 2, 3 // second triangle - ]; - - var vertexBytes = hl.Bytes.getArray(vertex); - var indiceBytes = hl.Bytes.getArray(indices); - - _glVbo = GL.createBuffer(); - _glEbo = GL.createBuffer(); - - _glVao = GL.createVertexArray(); - - GL.bindBuffer(GL.ARRAY_BUFFER, _glVbo); - GL.bufferData(GL.ARRAY_BUFFER, vertex.length * 4, vertexBytes, GL.STATIC_DRAW); - - GL.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, _glEbo); - GL.bufferData(GL.ELEMENT_ARRAY_BUFFER, indices.length * 4, indiceBytes, GL.STATIC_DRAW); + this.renderer = new Renderer(rendererType, gameSize[0], gameSize[1], window); - GL.bindVertexArray(_glVao); - - GL.vertexAttribPointer(0, 2, GL.FLOAT, false, 4 * 4, 0); - GL.enableVertexAttribArray(0); + init(); - GL.vertexAttribPointer(1, 2, GL.FLOAT, false, 4 * 4, 2 * 4); - GL.enableVertexAttribArray(1); + Time.startLoop(() -> {}, this); } /** - * Called after the window gets initialized, override this when creating a new app + * called after the window gets initialized, override this when creating a new app **/ public function init():Void {} /** - * Main update function - * @param Delta time between the last update call in seconds + * main update function + * @param delta time between the last update call in seconds **/ public function update(delta:Float):Void {} - - /** - * Called when a SDL event gets called - * @param event The SDL event in question: - **/ - @:dox(show) - private function onEvent(event:Event):Bool { - if (callbacks == null) return true; - switch (event.type) { - case Quit: callbacks.onClose.dispatch(null); - case MouseMove: callbacks.onMouseMove.dispatch({x: event.mouseX, y: event.mouseY}); - case MouseLeave: callbacks.onMouseLeave.dispatch(null); - case MouseDown: callbacks.onMouseDown.dispatch(event.button); - case MouseUp: callbacks.onMouseUp.dispatch(event.button); - case MouseWheel: callbacks.onMouseWheel.dispatch(event.wheelDelta); - case KeyDown: callbacks.onKeyDown.dispatch(event.keyCode); - case KeyUp: callbacks.onKeyUp.dispatch(event.keyCode); - case WindowState: - var targetCallback:Signal = switch(event.state) { - case Show: callbacks.onWindowShow; - case Hide: callbacks.onWindowHide; - case Expose: callbacks.onWindowExpose; - case Move: callbacks.onWindowMove; - case Resize: callbacks.onWindowResize; - case Minimize: callbacks.onWindowMinimize; - case Maximize: callbacks.onWindowMaximize; - case Restore: callbacks.onWindowRestore; - case Enter: callbacks.onWindowEnter; - case Leave: callbacks.onWindowLeave; - case Focus: callbacks.onWindowFocus; - case Blur: callbacks.onWindowBlur; - case Close: callbacks.onWindowClose; - } - targetCallback.dispatch(null); - default: - } - - return true; - } -} - -/** - * Class that holds all callbacks in SDL -**/ -@:publicFields -class WindowCallbacks { - // TODO: update Signal to allow Void as a avalible input type - - /** - * Not really a window event but it's in the event list so... - * - * Called when the game is closed - **/ - var onClose:Signal; - - // window - - /** - * Called when the window gets shown(?) idk since focus is a thing - **/ - var onWindowShow:Signal; - var onWindowHide:Signal; - var onWindowExpose:Signal; - var onWindowMove:Signal; - var onWindowResize:Signal; - var onWindowMinimize:Signal; - var onWindowMaximize:Signal; - var onWindowRestore:Signal; - var onWindowEnter:Signal; - var onWindowLeave:Signal; - var onWindowFocus:Signal; - var onWindowBlur:Signal; - var onWindowClose:Signal; - - // mouse - - /** - * Called when the mouse is moved in the window - **/ - var onMouseMove:Signal<{x:Int, y:Int}, Void>; - /** - * Called when the mouse leaves the window but i'm not sure since this has never happened to me when testing - **/ - var onMouseLeave:Signal; - /** - * Called when a mouse button is pressed - **/ - var onMouseDown:Signal; - /** - * Called when a mouse button is released - **/ - var onMouseUp:Signal; - /** - * Called when the mouse wheel gets moved - **/ - var onMouseWheel:Signal; - - // keyboard - - /** - * Called when a key is down / held down - **/ - var onKeyDown:Signal; - - /** - * Called when a key is released - **/ - var onKeyUp:Signal; - - - public function new():Void { - onClose = new Signal(); - - onWindowShow = new Signal(); - onWindowHide = new Signal(); - onWindowExpose = new Signal(); - onWindowMove = new Signal(); - onWindowResize = new Signal(); - onWindowMinimize = new Signal(); - onWindowMaximize = new Signal(); - onWindowRestore = new Signal(); - onWindowEnter = new Signal(); - onWindowLeave = new Signal(); - onWindowFocus = new Signal(); - onWindowBlur = new Signal(); - onWindowClose = new Signal(); - - onMouseMove = new Signal<{x:Int, y:Int}, Void>(); - onMouseLeave = new Signal(); - onMouseDown = new Signal(); - onMouseUp = new Signal(); - onMouseWheel = new Signal(); - - onKeyDown = new Signal(); - onKeyUp = new Signal(); - - } - -} \ No newline at end of file +} \ No newline at end of file diff --git a/src/lemons/Time.hx b/src/lemons/Time.hx new file mode 100644 index 0000000..e3b5c11 --- /dev/null +++ b/src/lemons/Time.hx @@ -0,0 +1,21 @@ +package lemons; + +class Time { + public static var fps(get, never):Int; + public static var delta(default, null):Float; + + static function get_fps():Int return Math.round(1 / delta); + + static var lastTimestamp:Float = 0; + static public function startLoop(updateFunc:Void->Void, app:lemons.App) { + while (app.window.live) { + final time:Float = app.window.time; + delta = time - lastTimestamp; + lastTimestamp = time; + + updateFunc(); + + app.window.update(); + } + } +} \ No newline at end of file diff --git a/src/lemons/display/Camera.hx b/src/lemons/display/Camera.hx deleted file mode 100644 index 1bc28dd..0000000 --- a/src/lemons/display/Camera.hx +++ /dev/null @@ -1,18 +0,0 @@ -package lemons.display; - -import sdl.GL.Buffer; -import sdl.GL.VertexArray; - -class Camera extends Object { - - - public function new(x:Int, y:Int, width:Int, height:Int) { - super(x, y, width, height); - // initBuffers(); - } - - - override public function update(elapsed:Float) { - - } -} \ No newline at end of file diff --git a/src/lemons/display/Group.hx b/src/lemons/display/Group.hx deleted file mode 100644 index 1062c77..0000000 --- a/src/lemons/display/Group.hx +++ /dev/null @@ -1,32 +0,0 @@ -package lemons.display; - -import lemons.display.Object; -import lemons.display.IDrawable; - -class Group extends Object implements IDrawable { - public final members:Array = []; - - public function new() { - super(0, 0, 0, 0); - } - - public function add(newMember:T):T { - if (members.contains(newMember)) return newMember; - - members.push(newMember); - return newMember; - } - - public function insert(newMember:T, index:Int):T { - if (members.contains(newMember)) return newMember; - - members.insert(index, newMember); - return newMember; - } - - public function remove(newMember:T):Bool - return members.remove(newMember); - - public function draw() - for (member in members) if (member is IDrawable) cast (member, IDrawable).draw(); -} \ No newline at end of file diff --git a/src/lemons/display/IDrawable.hx b/src/lemons/display/IDrawable.hx deleted file mode 100644 index edb601d..0000000 --- a/src/lemons/display/IDrawable.hx +++ /dev/null @@ -1,6 +0,0 @@ -package lemons.display; - -interface IDrawable { - // public var camera: - public function draw():Void; -} \ No newline at end of file diff --git a/src/lemons/display/Object.hx b/src/lemons/display/Object.hx deleted file mode 100644 index b8dca05..0000000 --- a/src/lemons/display/Object.hx +++ /dev/null @@ -1,20 +0,0 @@ -package lemons.display; - -import lemons.geom.Vector2; - -class Object { - public var position:Vector2; - public var scale:Vector2; - public var width:Int; - public var height:Int; - public var rotation:Float = 0; - - public function new(x:Int, y:Int, width:Int, height:Int) { - this.position = new Vector2(x, y); - this.scale = new Vector2(1, 1); - this.width = width; - this.height = height; - } - - public function update(delta:Float) {} -} \ No newline at end of file diff --git a/src/lemons/display/Scene.hx b/src/lemons/display/Scene.hx deleted file mode 100644 index 917131f..0000000 --- a/src/lemons/display/Scene.hx +++ /dev/null @@ -1,6 +0,0 @@ -package lemons.display; - -import lemons.display.Object; -import lemons.display.Group; - -class Scene extends Group {} \ No newline at end of file diff --git a/src/lemons/display/Shader.hx b/src/lemons/display/Shader.hx deleted file mode 100644 index 44adc52..0000000 --- a/src/lemons/display/Shader.hx +++ /dev/null @@ -1,92 +0,0 @@ -package lemons.display; - -import sdl.GL.Shader as GLShader; -import sdl.GL.Program as GLProgram; -import sdl.GL; -import lemons.geom.Matrix4; -import lemons.display.Sprite; - -using StringTools; - -class Shader { - private static final headerTag:String = '#header'; - private static final bodyTag:String = '#body'; - - private static var vertexHeader:String = ' - #version 400 - layout (location = 0) in vec3 glPos; - layout (location = 1) in vec2 glTexPos; - uniform mat4 drawMatrix; - uniform mat4 projection; - out vec2 texPos; - '; - - private static var vertexBody:String = ' - void main(void) { - gl_Position = projection * drawMatrix * vec4(glPos, 1.0); - texPos = vec2(glTexPos.x, -glTexPos.y); - } - '; - - private static var fragmentHeader:String = ' - #version 400 - out vec4 fragColor; - in vec2 texPos; - uniform sampler2D tex; - '; - - private static var fragmentBody:String = ' - void main(void) { - vec4 texel = texture(tex, texPos); - if (texel.a == 0) { discard; } - fragColor = texel; - } - '; - - private var glProgram:GLProgram; - - public function new(?vertSource:String, ?fragSource:String) { - var vertexShader:GLShader = GL.createShader(GL.VERTEX_SHADER); - var fragShader:GLShader = GL.createShader(GL.FRAGMENT_SHADER); - - if (vertSource == null) vertSource = '#header#body'; - if (fragSource == null) fragSource = '#header#body'; - - vertSource = vertSource.replace(headerTag, vertexHeader); - fragSource = fragSource.replace(headerTag, fragmentHeader); - vertSource = vertSource.replace(bodyTag, vertexBody); - fragSource = fragSource.replace(bodyTag, fragmentBody); - - // todo: refactor - GL.shaderSource(vertexShader, vertSource); - GL.compileShader(vertexShader); - - if (!GL.getShaderParameter(vertexShader, GL.COMPILE_STATUS)) - trace('oops! shader forgored\nlog:\n${GL.getShaderInfoLog(vertexShader)}'); - - GL.shaderSource(fragShader, fragSource); - GL.compileShader(fragShader); - - if (!GL.getShaderParameter(fragShader, GL.COMPILE_STATUS)) - trace('oops! shader forgored\nlog:\n${GL.getShaderInfoLog(fragShader)}'); - - glProgram = GL.createProgram(); - GL.attachShader(glProgram, vertexShader); - GL.attachShader(glProgram, fragShader); - GL.linkProgram(glProgram); - - if (!GL.getProgramParameter(glProgram, GL.LINK_STATUS)) - trace('oops! program forgored\nlog:\n${GL.getShaderInfoLog(fragShader)}'); - - GL.deleteShader(vertexShader); - GL.deleteShader(fragShader); - } - - public function use() GL.useProgram(glProgram); - - public function setBool(name:String, value:Bool) GL.uniform1i(GL.getUniformLocation(glProgram, name), (value ? 1 : 0)); - public function setInt(name:String, value:Int) GL.uniform1i(GL.getUniformLocation(glProgram, name), value); - - public function setMatrix4(name:String, value:Matrix4) - GL.uniformMatrix4fv(GL.getUniformLocation(glProgram, name), false, value.toGLByteShit(), 0, 1); -} \ No newline at end of file diff --git a/src/lemons/display/Sprite.hx b/src/lemons/display/Sprite.hx deleted file mode 100644 index a02a3ad..0000000 --- a/src/lemons/display/Sprite.hx +++ /dev/null @@ -1,58 +0,0 @@ -package lemons.display; - -import sdl.GL; -import lemons.display.Shader; -import lemons.display.Texture; -import lemons.display.Object; -import lemons.display.IDrawable; -import lemons.geom.Matrix4; - -class Sprite extends Object implements IDrawable { - - @:allow(lemons.display.Shader) - @:allow(lemons.App) - private static var projection:Matrix4; - - public var shader:Shader; - public var texture(default, set):Texture; - - private var drawMatrix:Matrix4; - - public function new(x:Int, y:Int, ?texture:Texture) { - super(x, y, 0, 0); - this.shader = new Shader(); - this.drawMatrix = new Matrix4(); - - if (texture != null) { - width = texture.width; - height = texture.height; - this.texture = texture; - } - } - - private function set_texture(tex:Texture) { - tex.use(); - shader.use(); - shader.setInt('tex', 0); - return texture = tex; - } - - - public function draw() { - // trace('gay'); - drawMatrix.identity(); - drawMatrix.translateByVector2(position); - drawMatrix.scaleByVector2(scale); - // drawMatrix.rotateX(rotation); - @:privateAccess GL.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, App._glEbo); - @:privateAccess GL.bindVertexArray(App._glVao); - - GL.activeTexture(GL.TEXTURE0); - texture.use(); - shader.use(); - shader.setMatrix4('drawMatrix', drawMatrix); - shader.setMatrix4('projection', projection); - - GL.drawElements(GL.TRIANGLES, 6, GL.UNSIGNED_INT, 0); - } -} \ No newline at end of file diff --git a/src/lemons/display/Texture.hx b/src/lemons/display/Texture.hx deleted file mode 100644 index 3583b83..0000000 --- a/src/lemons/display/Texture.hx +++ /dev/null @@ -1,75 +0,0 @@ -package lemons.display; - -import sdl.GL.Texture as GLTexture; -import sdl.GL; -import haxe.io.Bytes; -import lemons.util.IDestroyable; -import hl.Format.PixelFormat; -import format.png.Tools as PNGTools; -import format.png.Reader as PNGReader; -import haxe.io.BytesInput; - -enum TextureFiltering { - LINEAR; - NEAREST_NEIGHBOUR; -} - -class Texture implements IDestroyable { - private var glTexture:GLTexture; - public var data:Bytes; - public var format:PixelFormat; - - public var width:Int; - public var height:Int; - - public function new(width:Int, height:Int) { - this.width = width; - this.height = height; - glTexture = GL.createTexture(); - format = RGBA; - use(); - GL.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_WRAP_S, GL.REPEAT); - GL.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_WRAP_T, GL.REPEAT); - } - - private function uploadToGL() { - use(); - GL.texImage2D(GL.TEXTURE_2D, 0, fromPixelFormat(format), width, height, 0, GL.RGBA, GL.UNSIGNED_BYTE, data); - GL.generateMipmap(GL.TEXTURE_2D); - } - - public function use() GL.bindTexture(GL.TEXTURE_2D, glTexture); - - public function destroy():Void { - data = null; - GL.deleteTexture(glTexture); - } - - public static function fromBytes(bytes:Bytes):Texture { - var tex:Texture = new Texture(0, 0); - try { - var format = PNGTools.getHeader(new PNGReader(new BytesInput(bytes)).read()); - tex.width = format.width; - tex.height = format.height; - - var daData:Bytes = Bytes.alloc(format.width * format.height); - hl.Format.decodePNG(bytes, bytes.length, daData, format.width, format.height, 0, RGBA, 0); - tex.data = daData; - tex.uploadToGL(); - } catch(e) {} - return tex; - } - - private static function fromPixelFormat(format:PixelFormat) - return switch(format) { - case RGB: GL.RGB; - - case BGR: GL.BGRA; - case BGRA: GL.BGRA; - case BGRX: GL.BGRA; - - case RGBX: GL.RGB; - case RGBA: GL.RGBA; - default: throw 'unknown pixel fomat !!'; - } -} \ No newline at end of file diff --git a/src/lemons/display/render/GLFWWindow.hx b/src/lemons/display/render/GLFWWindow.hx new file mode 100644 index 0000000..11e6ddf --- /dev/null +++ b/src/lemons/display/render/GLFWWindow.hx @@ -0,0 +1,55 @@ +package lemons.display.render; + +import lemons.display.render._backend.GLFW; + +@SuppressWarnings("checkstyle:CodeSimilarity") +class GLFWWindow extends Window { + var windowHandle:NativeGLFWWindow; + static var initialized:Bool; + + public function new(width:Int, height:Int, title:String) { + super(width, height, title); + if (!initialized) GLFW.glfwInit(); + windowHandle = GLFW.glfwCreateWindow(width, height, title, null, null); + } + + override public function close():Void {} + + override public function update():Void + GLFW.glfwPollEvents(); + + override function get_width():Int { + var wid = 0; + var hei = 0; + GLFW.glfwGetWindowSize(windowHandle, wid, hei); + return wid; + } + + override function get_time():Float + return GLFW.glfwGetTime(); + + override function get_height():Int { + var wid = 0; + var hei = 0; + GLFW.glfwGetWindowSize(windowHandle, wid, hei); + return hei; + } + + override function get_live():Bool + return GLFW.glfwWindowShouldClose(windowHandle) == GLFW.GLFW_FALSE; + + override function set_width(wid:Int):Int { + GLFW.glfwSetWindowSize(windowHandle, wid, height); + return width = wid; + } + + override function set_height(hei:Int):Int { + GLFW.glfwSetWindowSize(windowHandle, width, hei); + return height = hei; + } + + override function set_time(time:Float):Float{ + GLFW.glfwSetTime(time); + return time; + } +} \ No newline at end of file diff --git a/src/lemons/display/render/Renderer.hx b/src/lemons/display/render/Renderer.hx new file mode 100644 index 0000000..1b43abf --- /dev/null +++ b/src/lemons/display/render/Renderer.hx @@ -0,0 +1,21 @@ +package lemons.display.render; + +import lemons.display.render.*; +import lemons.display.render._backend.*; + +enum abstract RendererType(String) from String { + var OPENGL = "OPENGL"; + var VULKAN = "VULKAN"; + var DIRECTX = "DIRECTX"; + var METAL = "METAL"; +} + +@:access(lemons.display.render.GLFWWindow.windowHandle) +class Renderer { + var window:Window; + + public function new(renderer:RendererType, width:Int, height:Int, window:Window) { + + this.window = window; + } +} \ No newline at end of file diff --git a/src/lemons/display/render/Window.hx b/src/lemons/display/render/Window.hx new file mode 100644 index 0000000..67d4c91 --- /dev/null +++ b/src/lemons/display/render/Window.hx @@ -0,0 +1,41 @@ +package lemons.display.render; + +class Window { + @:isVar public var width(get, set):Int; + @:isVar public var height(get, set):Int; + @:isVar public var x(get, set):Int; + @:isVar public var y(get, set):Int; + @:isVar public var title(get, set):String; + @:isVar public var minimized(get, set):Bool; + @:isVar public var maximized(get, set):Bool; + @:isVar public var live(get, never):Bool; + + @:isVar public var time(get, set):Float; + + public function new(width:Int, height:Int, title:String):Void {} + + public function close():Void {} + + public function update():Void {} + + function get_width():Int return 0; + function get_height():Int return 0; + function get_x():Int return 0; + function get_y():Int return 0; + function get_title():String return ''; + function get_minimized():Bool return false; + function get_maximized():Bool return false; + function get_live():Bool return false; + + function get_time():Float return 0; + + function set_width(_:Int):Int return 0; + function set_height(_:Int):Int return 0; + function set_x(_:Int):Int return 0; + function set_y(_:Int):Int return 0; + function set_title(_:String):String return ''; + function set_minimized(_:Bool):Bool return false; + function set_maximized(_:Bool):Bool return false; + + function set_time(_:Float):Float return 0; +} \ No newline at end of file diff --git a/src/lemons/display/render/_backend/GLFW.hx b/src/lemons/display/render/_backend/GLFW.hx new file mode 100644 index 0000000..fc07e76 --- /dev/null +++ b/src/lemons/display/render/_backend/GLFW.hx @@ -0,0 +1,430 @@ +package lemons.display.render._backend; + +typedef NativeGLFWMonitor = hl.Abstract<"GLFWmonitor*">; +typedef NativeGLFWWindow = hl.Abstract<"GLFWwindow*">; +typedef NativeGLFWCursor = hl.Abstract<"GLFWcursor*">; + +@:structInit +class JoystickState { + var buttons:hl.NativeArray = new hl.NativeArray(15); + var axes:hl.NativeArray = new hl.NativeArray(6); +} + +@SuppressWarnings("checkstyle:CodeSimilarity") +@:hlNative('lemons', 'glfw_') +class GLFW { + public static final GLFW_VERSION_MAJOR:Int = 3; + public static final GLFW_VERSION_MINOR:Int = 4; + public static final GLFW_VERSION_REVISION:Int = 0; + public static final GLFW_TRUE:Int = 1; + public static final GLFW_FALSE:Int = 0; + public static final GLFW_RELEASE:Int = 0; + public static final GLFW_PRESS:Int = 1; + public static final GLFW_REPEAT:Int = 2; + public static final GLFW_HAT_CENTERED:Int = 0; + public static final GLFW_HAT_UP:Int = 1; + public static final GLFW_HAT_RIGHT:Int = 2; + public static final GLFW_HAT_DOWN:Int = 4; + public static final GLFW_HAT_LEFT:Int = 8; + public static final GLFW_HAT_RIGHT_UP:Int = (GLFW_HAT_RIGHT | GLFW_HAT_UP); + public static final GLFW_HAT_RIGHT_DOWN:Int = (GLFW_HAT_RIGHT | GLFW_HAT_DOWN); + public static final GLFW_HAT_LEFT_UP:Int = (GLFW_HAT_LEFT | GLFW_HAT_UP); + public static final GLFW_HAT_LEFT_DOWN:Int = (GLFW_HAT_LEFT | GLFW_HAT_DOWN); + public static final GLFW_KEY_UNKNOWN:Int = -1; + public static final GLFW_KEY_SPACE:Int = 32; + public static final GLFW_KEY_APOSTROPHE:Int = 39; + public static final GLFW_KEY_COMMA:Int = 44; + public static final GLFW_KEY_MINUS:Int = 45; + public static final GLFW_KEY_PERIOD:Int = 46; + public static final GLFW_KEY_SLASH:Int = 47; + public static final GLFW_KEY_0:Int = 48; + public static final GLFW_KEY_1:Int = 49; + public static final GLFW_KEY_2:Int = 50; + public static final GLFW_KEY_3:Int = 51; + public static final GLFW_KEY_4:Int = 52; + public static final GLFW_KEY_5:Int = 53; + public static final GLFW_KEY_6:Int = 54; + public static final GLFW_KEY_7:Int = 55; + public static final GLFW_KEY_8:Int = 56; + public static final GLFW_KEY_9:Int = 57; + public static final GLFW_KEY_SEMICOLON:Int = 59; + public static final GLFW_KEY_EQUAL:Int = 61; + public static final GLFW_KEY_A:Int = 65; + public static final GLFW_KEY_B:Int = 66; + public static final GLFW_KEY_C:Int = 67; + public static final GLFW_KEY_D:Int = 68; + public static final GLFW_KEY_E:Int = 69; + public static final GLFW_KEY_F:Int = 70; + public static final GLFW_KEY_G:Int = 71; + public static final GLFW_KEY_H:Int = 72; + public static final GLFW_KEY_I:Int = 73; + public static final GLFW_KEY_J:Int = 74; + public static final GLFW_KEY_K:Int = 75; + public static final GLFW_KEY_L:Int = 76; + public static final GLFW_KEY_M:Int = 77; + public static final GLFW_KEY_N:Int = 78; + public static final GLFW_KEY_O:Int = 79; + public static final GLFW_KEY_P:Int = 80; + public static final GLFW_KEY_Q:Int = 81; + public static final GLFW_KEY_R:Int = 82; + public static final GLFW_KEY_S:Int = 83; + public static final GLFW_KEY_T:Int = 84; + public static final GLFW_KEY_U:Int = 85; + public static final GLFW_KEY_V:Int = 86; + public static final GLFW_KEY_W:Int = 87; + public static final GLFW_KEY_X:Int = 88; + public static final GLFW_KEY_Y:Int = 89; + public static final GLFW_KEY_Z:Int = 90; + public static final GLFW_KEY_LEFT_BRACKET:Int = 91; + public static final GLFW_KEY_BACKSLASH:Int = 92; + public static final GLFW_KEY_RIGHT_BRACKET:Int = 93; + public static final GLFW_KEY_GRAVE_ACCENT:Int = 96; + public static final GLFW_KEY_WORLD_1:Int = 161; + public static final GLFW_KEY_WORLD_2:Int = 162; + public static final GLFW_KEY_ESCAPE:Int = 256; + public static final GLFW_KEY_ENTER:Int = 257; + public static final GLFW_KEY_TAB:Int = 258; + public static final GLFW_KEY_BACKSPACE:Int = 259; + public static final GLFW_KEY_INSERT:Int = 260; + public static final GLFW_KEY_DELETE:Int = 261; + public static final GLFW_KEY_RIGHT:Int = 262; + public static final GLFW_KEY_LEFT:Int = 263; + public static final GLFW_KEY_DOWN:Int = 264; + public static final GLFW_KEY_UP:Int = 265; + public static final GLFW_KEY_PAGE_UP:Int = 266; + public static final GLFW_KEY_PAGE_DOWN:Int = 267; + public static final GLFW_KEY_HOME:Int = 268; + public static final GLFW_KEY_END:Int = 269; + public static final GLFW_KEY_CAPS_LOCK:Int = 280; + public static final GLFW_KEY_SCROLL_LOCK:Int = 281; + public static final GLFW_KEY_NUM_LOCK:Int = 282; + public static final GLFW_KEY_PRINT_SCREEN:Int = 283; + public static final GLFW_KEY_PAUSE:Int = 284; + public static final GLFW_KEY_F1:Int = 290; + public static final GLFW_KEY_F2:Int = 291; + public static final GLFW_KEY_F3:Int = 292; + public static final GLFW_KEY_F4:Int = 293; + public static final GLFW_KEY_F5:Int = 294; + public static final GLFW_KEY_F6:Int = 295; + public static final GLFW_KEY_F7:Int = 296; + public static final GLFW_KEY_F8:Int = 297; + public static final GLFW_KEY_F9:Int = 298; + public static final GLFW_KEY_F10:Int = 299; + public static final GLFW_KEY_F11:Int = 300; + public static final GLFW_KEY_F12:Int = 301; + public static final GLFW_KEY_F13:Int = 302; + public static final GLFW_KEY_F14:Int = 303; + public static final GLFW_KEY_F15:Int = 304; + public static final GLFW_KEY_F16:Int = 305; + public static final GLFW_KEY_F17:Int = 306; + public static final GLFW_KEY_F18:Int = 307; + public static final GLFW_KEY_F19:Int = 308; + public static final GLFW_KEY_F20:Int = 309; + public static final GLFW_KEY_F21:Int = 310; + public static final GLFW_KEY_F22:Int = 311; + public static final GLFW_KEY_F23:Int = 312; + public static final GLFW_KEY_F24:Int = 313; + public static final GLFW_KEY_F25:Int = 314; + public static final GLFW_KEY_KP_0:Int = 320; + public static final GLFW_KEY_KP_1:Int = 321; + public static final GLFW_KEY_KP_2:Int = 322; + public static final GLFW_KEY_KP_3:Int = 323; + public static final GLFW_KEY_KP_4:Int = 324; + public static final GLFW_KEY_KP_5:Int = 325; + public static final GLFW_KEY_KP_6:Int = 326; + public static final GLFW_KEY_KP_7:Int = 327; + public static final GLFW_KEY_KP_8:Int = 328; + public static final GLFW_KEY_KP_9:Int = 329; + public static final GLFW_KEY_KP_DECIMAL:Int = 330; + public static final GLFW_KEY_KP_DIVIDE:Int = 331; + public static final GLFW_KEY_KP_MULTIPLY:Int = 332; + public static final GLFW_KEY_KP_SUBTRACT:Int = 333; + public static final GLFW_KEY_KP_ADD:Int = 334; + public static final GLFW_KEY_KP_ENTER:Int = 335; + public static final GLFW_KEY_KP_EQUAL:Int = 336; + public static final GLFW_KEY_LEFT_SHIFT:Int = 340; + public static final GLFW_KEY_LEFT_CONTROL:Int = 341; + public static final GLFW_KEY_LEFT_ALT:Int = 342; + public static final GLFW_KEY_LEFT_SUPER:Int = 343; + public static final GLFW_KEY_RIGHT_SHIFT:Int = 344; + public static final GLFW_KEY_RIGHT_CONTROL:Int = 345; + public static final GLFW_KEY_RIGHT_ALT:Int = 346; + public static final GLFW_KEY_RIGHT_SUPER:Int = 347; + public static final GLFW_KEY_MENU:Int = 348; + public static final GLFW_KEY_LAST:Int = GLFW_KEY_MENU; + public static final GLFW_MOD_SHIFT:Int = 0x0001; + public static final GLFW_MOD_CONTROL:Int = 0x0002; + public static final GLFW_MOD_ALT:Int = 0x0004; + public static final GLFW_MOD_SUPER:Int = 0x0008; + public static final GLFW_MOD_CAPS_LOCK:Int = 0x0010; + public static final GLFW_MOD_NUM_LOCK:Int = 0x0020; + public static final GLFW_MOUSE_BUTTON_1:Int = 0; + public static final GLFW_MOUSE_BUTTON_2:Int = 1; + public static final GLFW_MOUSE_BUTTON_3:Int = 2; + public static final GLFW_MOUSE_BUTTON_4:Int = 3; + public static final GLFW_MOUSE_BUTTON_5:Int = 4; + public static final GLFW_MOUSE_BUTTON_6:Int = 5; + public static final GLFW_MOUSE_BUTTON_7:Int = 6; + public static final GLFW_MOUSE_BUTTON_8:Int = 7; + public static final GLFW_MOUSE_BUTTON_LAST:Int = GLFW_MOUSE_BUTTON_8; + public static final GLFW_MOUSE_BUTTON_LEFT:Int = GLFW_MOUSE_BUTTON_1; + public static final GLFW_MOUSE_BUTTON_RIGHT:Int = GLFW_MOUSE_BUTTON_2; + public static final GLFW_MOUSE_BUTTON_MIDDLE:Int = GLFW_MOUSE_BUTTON_3; + public static final GLFW_JOYSTICK_1:Int = 0; + public static final GLFW_JOYSTICK_2:Int = 1; + public static final GLFW_JOYSTICK_3:Int = 2; + public static final GLFW_JOYSTICK_4:Int = 3; + public static final GLFW_JOYSTICK_5:Int = 4; + public static final GLFW_JOYSTICK_6:Int = 5; + public static final GLFW_JOYSTICK_7:Int = 6; + public static final GLFW_JOYSTICK_8:Int = 7; + public static final GLFW_JOYSTICK_9:Int = 8; + public static final GLFW_JOYSTICK_10:Int = 9; + public static final GLFW_JOYSTICK_11:Int = 10; + public static final GLFW_JOYSTICK_12:Int = 11; + public static final GLFW_JOYSTICK_13:Int = 12; + public static final GLFW_JOYSTICK_14:Int = 13; + public static final GLFW_JOYSTICK_15:Int = 14; + public static final GLFW_JOYSTICK_16:Int = 15; + public static final GLFW_JOYSTICK_LAST:Int = GLFW_JOYSTICK_16; + public static final GLFW_GAMEPAD_BUTTON_A:Int = 0; + public static final GLFW_GAMEPAD_BUTTON_B:Int = 1; + public static final GLFW_GAMEPAD_BUTTON_X:Int = 2; + public static final GLFW_GAMEPAD_BUTTON_Y:Int = 3; + public static final GLFW_GAMEPAD_BUTTON_LEFT_BUMPER:Int = 4; + public static final GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER:Int = 5; + public static final GLFW_GAMEPAD_BUTTON_BACK:Int = 6; + public static final GLFW_GAMEPAD_BUTTON_START:Int = 7; + public static final GLFW_GAMEPAD_BUTTON_GUIDE:Int = 8; + public static final GLFW_GAMEPAD_BUTTON_LEFT_THUMB:Int = 9; + public static final GLFW_GAMEPAD_BUTTON_RIGHT_THUMB:Int = 10; + public static final GLFW_GAMEPAD_BUTTON_DPAD_UP:Int = 11; + public static final GLFW_GAMEPAD_BUTTON_DPAD_RIGHT:Int = 12; + public static final GLFW_GAMEPAD_BUTTON_DPAD_DOWN:Int = 13; + public static final GLFW_GAMEPAD_BUTTON_DPAD_LEFT:Int = 14; + public static final GLFW_GAMEPAD_BUTTON_LAST:Int = GLFW_GAMEPAD_BUTTON_DPAD_LEFT; + public static final GLFW_GAMEPAD_BUTTON_CROSS:Int = GLFW_GAMEPAD_BUTTON_A; + public static final GLFW_GAMEPAD_BUTTON_CIRCLE:Int = GLFW_GAMEPAD_BUTTON_B; + public static final GLFW_GAMEPAD_BUTTON_SQUARE:Int = GLFW_GAMEPAD_BUTTON_X; + public static final GLFW_GAMEPAD_BUTTON_TRIANGLE:Int = GLFW_GAMEPAD_BUTTON_Y; + public static final GLFW_GAMEPAD_AXIS_LEFT_X:Int = 0; + public static final GLFW_GAMEPAD_AXIS_LEFT_Y:Int = 1; + public static final GLFW_GAMEPAD_AXIS_RIGHT_X:Int = 2; + public static final GLFW_GAMEPAD_AXIS_RIGHT_Y:Int = 3; + public static final GLFW_GAMEPAD_AXIS_LEFT_TRIGGER:Int = 4; + public static final GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER:Int = 5; + public static final GLFW_GAMEPAD_AXIS_LAST:Int = GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER; + public static final GLFW_NO_ERROR:Int = 0; + public static final GLFW_NOT_INITIALIZED:Int = 0x00010001; + public static final GLFW_NO_CURRENT_CONTEXT:Int = 0x00010002; + public static final GLFW_INVALID_ENUM:Int = 0x00010003; + public static final GLFW_INVALID_VALUE:Int = 0x00010004; + public static final GLFW_OUT_OF_MEMORY:Int = 0x00010005; + public static final GLFW_API_UNAVAILABLE:Int = 0x00010006; + public static final GLFW_VERSION_UNAVAILABLE:Int = 0x00010007; + public static final GLFW_PLATFORM_ERROR:Int = 0x00010008; + public static final GLFW_FORMAT_UNAVAILABLE:Int = 0x00010009; + public static final GLFW_NO_WINDOW_CONTEXT:Int = 0x0001000A; + public static final GLFW_CURSOR_UNAVAILABLE:Int = 0x0001000B; + public static final GLFW_FEATURE_UNAVAILABLE:Int = 0x0001000C; + public static final GLFW_FEATURE_UNIMPLEMENTED:Int = 0x0001000D; + public static final GLFW_PLATFORM_UNAVAILABLE:Int = 0x0001000E; + public static final GLFW_FOCUSED:Int = 0x00020001; + public static final GLFW_ICONIFIED:Int = 0x00020002; + public static final GLFW_RESIZABLE:Int = 0x00020003; + public static final GLFW_VISIBLE:Int = 0x00020004; + public static final GLFW_DECORATED:Int = 0x00020005; + public static final GLFW_AUTO_ICONIFY:Int = 0x00020006; + public static final GLFW_FLOATING:Int = 0x00020007; + public static final GLFW_MAXIMIZED:Int = 0x00020008; + public static final GLFW_CENTER_CURSOR:Int = 0x00020009; + public static final GLFW_TRANSPARENT_FRAMEBUFFER:Int = 0x0002000A; + public static final GLFW_HOVERED:Int = 0x0002000B; + public static final GLFW_FOCUS_ON_SHOW:Int = 0x0002000C; + public static final GLFW_MOUSE_PASSTHROUGH:Int = 0x0002000D; + public static final GLFW_POSITION_X:Int = 0x0002000E; + public static final GLFW_POSITION_Y:Int = 0x0002000F; + public static final GLFW_RED_BITS:Int = 0x00021001; + public static final GLFW_GREEN_BITS:Int = 0x00021002; + public static final GLFW_BLUE_BITS:Int = 0x00021003; + public static final GLFW_ALPHA_BITS:Int = 0x00021004; + public static final GLFW_DEPTH_BITS:Int = 0x00021005; + public static final GLFW_STENCIL_BITS:Int = 0x00021006; + public static final GLFW_ACCUM_RED_BITS:Int = 0x00021007; + public static final GLFW_ACCUM_GREEN_BITS:Int = 0x00021008; + public static final GLFW_ACCUM_BLUE_BITS:Int = 0x00021009; + public static final GLFW_ACCUM_ALPHA_BITS:Int = 0x0002100A; + public static final GLFW_AUX_BUFFERS:Int = 0x0002100B; + public static final GLFW_STEREO:Int = 0x0002100C; + public static final GLFW_SAMPLES:Int = 0x0002100D; + public static final GLFW_SRGB_CAPABLE:Int = 0x0002100E; + public static final GLFW_REFRESH_RATE:Int = 0x0002100F; + public static final GLFW_DOUBLEBUFFER:Int = 0x00021010; + public static final GLFW_CLIENT_API:Int = 0x00022001; + public static final GLFW_CONTEXT_VERSION_MAJOR:Int = 0x00022002; + public static final GLFW_CONTEXT_VERSION_MINOR:Int = 0x00022003; + public static final GLFW_CONTEXT_REVISION:Int = 0x00022004; + public static final GLFW_CONTEXT_ROBUSTNESS:Int = 0x00022005; + public static final GLFW_OPENGL_FORWARD_COMPAT:Int = 0x00022006; + public static final GLFW_CONTEXT_DEBUG:Int = 0x00022007; + public static final GLFW_OPENGL_DEBUG_CONTEXT:Int = GLFW_CONTEXT_DEBUG; + public static final GLFW_OPENGL_PROFILE:Int = 0x00022008; + public static final GLFW_CONTEXT_RELEASE_BEHAVIOR:Int = 0x00022009; + public static final GLFW_CONTEXT_NO_ERROR:Int = 0x0002200A; + public static final GLFW_CONTEXT_CREATION_API:Int = 0x0002200B; + public static final GLFW_SCALE_TO_MONITOR:Int = 0x0002200C; + public static final GLFW_SCALE_FRAMEBUFFER:Int = 0x0002200D; + public static final GLFW_COCOA_RETINA_FRAMEBUFFER:Int = 0x00023001; + public static final GLFW_COCOA_FRAME_NAME:Int = 0x00023002; + public static final GLFW_COCOA_GRAPHICS_SWITCHING:Int = 0x00023003; + public static final GLFW_X11_CLASS_NAME:Int = 0x00024001; + public static final GLFW_X11_INSTANCE_NAME:Int = 0x00024002; + public static final GLFW_WIN32_KEYBOARD_MENU:Int = 0x00025001; + public static final GLFW_WIN32_SHOWDEFAULT:Int = 0x00025002; + public static final GLFW_WAYLAND_APP_ID:Int = 0x00026001; + public static final GLFW_NO_API:Int = 0; + public static final GLFW_OPENGL_API:Int = 0x00030001; + public static final GLFW_OPENGL_ES_API:Int = 0x00030002; + public static final GLFW_NO_ROBUSTNESS:Int = 0; + public static final GLFW_NO_RESET_NOTIFICATION:Int = 0x00031001; + public static final GLFW_LOSE_CONTEXT_ON_RESET:Int = 0x00031002; + public static final GLFW_OPENGL_ANY_PROFILE:Int = 0; + public static final GLFW_OPENGL_CORE_PROFILE:Int = 0x00032001; + public static final GLFW_OPENGL_COMPAT_PROFILE:Int = 0x00032002; + public static final GLFW_CURSOR:Int = 0x00033001; + public static final GLFW_STICKY_KEYS:Int = 0x00033002; + public static final GLFW_STICKY_MOUSE_BUTTONS:Int = 0x00033003; + public static final GLFW_LOCK_KEY_MODS:Int = 0x00033004; + public static final GLFW_RAW_MOUSE_MOTION:Int = 0x00033005; + public static final GLFW_CURSOR_NORMAL:Int = 0x00034001; + public static final GLFW_CURSOR_HIDDEN:Int = 0x00034002; + public static final GLFW_CURSOR_DISABLED:Int = 0x00034003; + public static final GLFW_CURSOR_CAPTURED:Int = 0x00034004; + public static final GLFW_ANY_RELEASE_BEHAVIOR:Int = 0; + public static final GLFW_RELEASE_BEHAVIOR_FLUSH:Int = 0x00035001; + public static final GLFW_RELEASE_BEHAVIOR_NONE:Int = 0x00035002; + public static final GLFW_NATIVE_CONTEXT_API:Int = 0x00036001; + public static final GLFW_EGL_CONTEXT_API:Int = 0x00036002; + public static final GLFW_OSMESA_CONTEXT_API:Int = 0x00036003; + public static final GLFW_ANGLE_PLATFORM_TYPE_NONE:Int = 0x00037001; + public static final GLFW_ANGLE_PLATFORM_TYPE_OPENGL:Int = 0x00037002; + public static final GLFW_ANGLE_PLATFORM_TYPE_OPENGLES:Int = 0x00037003; + public static final GLFW_ANGLE_PLATFORM_TYPE_D3D9:Int = 0x00037004; + public static final GLFW_ANGLE_PLATFORM_TYPE_D3D11:Int = 0x00037005; + public static final GLFW_ANGLE_PLATFORM_TYPE_VULKAN:Int = 0x00037007; + public static final GLFW_ANGLE_PLATFORM_TYPE_METAL:Int = 0x00037008; + public static final GLFW_WAYLAND_PREFER_LIBDECOR:Int = 0x00038001; + public static final GLFW_WAYLAND_DISABLE_LIBDECOR:Int = 0x00038002; + public static final GLFW_ANY_POSITION:Int = 0x80000000; + public static final GLFW_ARROW_CURSOR:Int = 0x00036001; + public static final GLFW_IBEAM_CURSOR:Int = 0x00036002; + public static final GLFW_CROSSHAIR_CURSOR:Int = 0x00036003; + public static final GLFW_POINTING_HAND_CURSOR:Int = 0x00036004; + public static final GLFW_RESIZE_EW_CURSOR:Int = 0x00036005; + public static final GLFW_RESIZE_NS_CURSOR:Int = 0x00036006; + public static final GLFW_RESIZE_NWSE_CURSOR:Int = 0x00036007; + public static final GLFW_RESIZE_NESW_CURSOR:Int = 0x00036008; + public static final GLFW_RESIZE_ALL_CURSOR:Int = 0x00036009; + public static final GLFW_NOT_ALLOWED_CURSOR:Int = 0x0003600A; + public static final GLFW_HRESIZE_CURSOR:Int = GLFW_RESIZE_EW_CURSOR; + public static final GLFW_VRESIZE_CURSOR:Int = GLFW_RESIZE_NS_CURSOR; + public static final GLFW_HAND_CURSOR:Int = GLFW_POINTING_HAND_CURSOR; + public static final GLFW_CONNECTED:Int = 0x00040001; + public static final GLFW_DISCONNECTED:Int = 0x00040002; + public static final GLFW_JOYSTICK_HAT_BUTTONS:Int = 0x00050001; + public static final GLFW_ANGLE_PLATFORM_TYPE:Int = 0x00050002; + public static final GLFW_PLATFORM:Int = 0x00050003; + public static final GLFW_COCOA_CHDIR_RESOURCES:Int = 0x00051001; + public static final GLFW_COCOA_MENUBAR:Int = 0x00051002; + public static final GLFW_X11_XCB_VULKAN_SURFACE:Int = 0x00052001; + public static final GLFW_WAYLAND_LIBDECOR:Int = 0x00053001; + public static final GLFW_ANY_PLATFORM:Int = 0x00060000; + public static final GLFW_PLATFORM_WIN32:Int = 0x00060001; + public static final GLFW_PLATFORM_COCOA:Int = 0x00060002; + public static final GLFW_PLATFORM_WAYLAND:Int = 0x00060003; + public static final GLFW_PLATFORM_X11:Int = 0x00060004; + public static final GLFW_PLATFORM_NULL:Int = 0x00060005; + public static final GLFW_DONT_CARE:Int = -1; + + public static function glfwInit():Int { return 0; } + public static function glfwTerminate():Void {} + public static function glfwInitHint(hint:Int, value:Int):Void {} + public static function glfwWindowHintString(hint:Int, value:String):Void {} + public static function glfwPollEvents():Void {} + public static function glfwWaitEvents():Void {} + public static function glfwWaitEventsTimeout(timeout:hl.F64):Void {} + public static function glfwPostEmptyEvent():Void {} + public static function glfwGetTime():hl.F64 { return 0; } + public static function glfwSetTime(time:hl.F64):Void {} + public static function glfwGetTimerValue():hl.I64 { return 0; } + public static function glfwGetTimerFrequency():hl.I64 { return 0; } + public static function glfwSwapInterval(interval:Int):Void {} + public static function glfwExtensionSupported(extension:String):Int { return 0; } + + public static function glfwGetPrimaryMonitor():NativeGLFWMonitor { return null; } + public static function glfwGetMonitorPos(monitor:NativeGLFWMonitor, xPos:hl.Ref, yPos:hl.Ref):Void {} + public static function glfwGetMonitorWorkarea(monitor:NativeGLFWMonitor, xPos:hl.Ref, yPos:hl.Ref, width:hl.Ref, height:hl.Ref):Void {} + public static function glfwGetMonitorPhysicalSize(monitor:NativeGLFWMonitor, widthMM:hl.Ref, heightMM:hl.Ref):Void {} + public static function glfwGetMonitorContentScale(monitor:NativeGLFWMonitor, xScale:hl.Ref, yScale:hl.Ref):Void {} + public static function glfwGetMonitorName(monitor:NativeGLFWMonitor):hl.Bytes { return null; } + + public static function glfwCreateWindow(width:Int, height:Int, title:String, monitor:NativeGLFWMonitor, share:Null):NativeGLFWWindow { return null; } + public static function glfwDestroyWindow(window:NativeGLFWWindow):Void {} + public static function glfwWindowShouldClose(window:NativeGLFWWindow):Int { return 0; } + public static function glfwSetWindowShouldClose(window:NativeGLFWWindow, value:Int):Void {} + public static function glfwGetWindowTitle(window:NativeGLFWWindow):hl.Bytes { return null; } + public static function glfwSetWindowTitle(window:NativeGLFWWindow, title:String):Void {} + + public static function glfwGetWindowPos(window:NativeGLFWWindow, xPos:hl.Ref, yPos:hl.Ref):Void {} + public static function glfwSetWindowPos(window:NativeGLFWWindow, xPos:Int, yPos:Int):Void {} + public static function glfwGetWindowSize(window:NativeGLFWWindow, width:hl.Ref, height:hl.Ref):Void {} + public static function glfwSetWindowSizeLimits(window:NativeGLFWWindow, minWidth:Int, minHeight:Int, maxWidth:Int, maxHeight:Int):Void {} + public static function glfwSetWindowAspectRatio(window:NativeGLFWWindow, numer:Int, denom:Int):Void {} + public static function glfwSetWindowSize(window:NativeGLFWWindow, width:Int, height:Int):Void {} + public static function glfwGetFramebufferSize(window:NativeGLFWWindow, xPos:hl.Ref, yPos:hl.Ref):Void {} + public static function glfwGetWindowFrameSize(window:NativeGLFWWindow, left:hl.Ref, top:hl.Ref, right:hl.Ref, bottom:hl.Ref):Void {} + public static function glfwGetWindowContentScale(window:NativeGLFWWindow, xScale:hl.Ref, yScale:hl.Ref):Void {} + public static function glfwGetWindowOpacity(window:NativeGLFWWindow):hl.F32 { return 0; } + public static function glfwSetWindowOpacity(window:NativeGLFWWindow, opacity:hl.F32):Void {} + public static function glfwIconifyWindow(window:NativeGLFWWindow):Void {} + public static function glfwRestoreWindow(window:NativeGLFWWindow):Void {} + public static function glfwMaximizeWindow(window:NativeGLFWWindow):Void {} + public static function glfwShowWindow(window:NativeGLFWWindow):Void {} + public static function glfwHideWindow(window:NativeGLFWWindow):Void {} + public static function glfwFocusWindow(window:NativeGLFWWindow):Void {} + public static function glfwRequestWindowAttention(window:NativeGLFWWindow):Void {} + public static function glfwGetWindowMonitor(window:NativeGLFWWindow):NativeGLFWMonitor { return null; } + public static function glfwSetWindowMonitor(window:NativeGLFWWindow, monitor:NativeGLFWMonitor, xPos:Int, yPos:Int, width:Int, height:Int, refreshRate:Int):Void {} + public static function glfwGetWindowAttrib(window:NativeGLFWWindow, attrib:Int):Int { return 0; } + public static function glfwSetWindowAttrib(window:NativeGLFWWindow, attrib:Int, value:Int):Void {} + public static function glfwGetInputMode(window:NativeGLFWWindow, mode:Int):Int { return 0; } + public static function glfwSetInputMode(window:NativeGLFWWindow, mode:Int, value:Int):Void {} + public static function glfwMakeContextCurrent(window:NativeGLFWWindow):Void {} + public static function glfwGetCurrentContext():NativeGLFWWindow { return null; } + public static function glfwSetClipboardString(window:NativeGLFWWindow, string:String):Void {} + public static function glfwGetClipboardString(window:NativeGLFWWindow):hl.Bytes { return null; } + public static function glfwSwapBuffers(window:NativeGLFWWindow):Void {} + + public static function glfwCreateStandardCursor(shape:Int):NativeGLFWCursor { return null; } + public static function glfwDestroyCursor(cursor:NativeGLFWCursor):Void {} + public static function glfwSetCursor(window:NativeGLFWWindow, cursor:NativeGLFWCursor):Void {} + public static function glfwRawMouseMotionSupported():Int { return 0; } + public static function glfwGetMouseButton(window:NativeGLFWWindow, button:Int):Int { return 0; } + public static function glfwGetCursorPos(window:NativeGLFWWindow, xPos:hl.Ref, yPos:hl.Ref):Void {} + public static function glfwSetCursorPos(window:NativeGLFWWindow, xPos:hl.F64, yPos:hl.F64):Void {} + + public static function glfwGetKeyName(key:Int, scancode:Int):hl.Bytes { return null; } + public static function glfwGetKeyScancode(key:Int):Int { return 0; } + public static function glfwGetKey(window:NativeGLFWWindow, key:Int):Int { return 0; } + + public static function glfwJoystickPresent(jid:Int):Int { return 0; } + public static function glfwGetJoystickAxes(jid:Int):hl.NativeArray { return null; } + public static function glfwGetJoystickButtons(jid:Int):hl.NativeArray { return null; } + public static function glfwGetJoystickHats(jid:Int):hl.NativeArray { return null; } + public static function glfwGetJoystickName(jid:Int):hl.Bytes { return null; } + public static function glfwGetJoystickGuid(jid:Int):hl.Bytes { return null; } + public static function glfwJoystickIsGamepad(jid:Int):Int { return 0; } + public static function glfwUpdateGamepadMappings(string:String):Int { return 0; } + public static function glfwGetGamepadName(jid:Int):hl.Bytes { return null; } + public static function glfwGetGamepadState(jid:Int, state:Dynamic):Void {} +} \ No newline at end of file diff --git a/src/lemons/display/render/_backend/OpenGL.hx b/src/lemons/display/render/_backend/OpenGL.hx new file mode 100644 index 0000000..91f619d --- /dev/null +++ b/src/lemons/display/render/_backend/OpenGL.hx @@ -0,0 +1,1908 @@ +/* + Generated with liblemons' GLADGenerator https://github.com/LemonsFramework/liblemons +*/ + +package lemons.display.render._backend; + +@SuppressWarnings("checkstyle:CodeSimilarity") +@:hlNative('lemons', 'gl_') +class OpenGL { + public static final GL_DEPTH_BUFFER_BIT:Int = 0x00000100; + public static final GL_STENCIL_BUFFER_BIT:Int = 0x00000400; + public static final GL_COLOR_BUFFER_BIT:Int = 0x00004000; + public static final GL_DYNAMIC_STORAGE_BIT:Int = 0x0100; + public static final GL_CLIENT_STORAGE_BIT:Int = 0x0200; + public static final GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT:Int = 0x00000001; + public static final GL_CONTEXT_FLAG_DEBUG_BIT:Int = 0x00000002; + public static final GL_CONTEXT_CORE_PROFILE_BIT:Int = 0x00000001; + public static final GL_CONTEXT_COMPATIBILITY_PROFILE_BIT:Int = 0x00000002; + public static final GL_MAP_READ_BIT:Int = 0x0001; + public static final GL_MAP_WRITE_BIT:Int = 0x0002; + public static final GL_MAP_INVALIDATE_RANGE_BIT:Int = 0x0004; + public static final GL_MAP_INVALIDATE_BUFFER_BIT:Int = 0x0008; + public static final GL_MAP_FLUSH_EXPLICIT_BIT:Int = 0x0010; + public static final GL_MAP_UNSYNCHRONIZED_BIT:Int = 0x0020; + public static final GL_MAP_PERSISTENT_BIT:Int = 0x0040; + public static final GL_MAP_COHERENT_BIT:Int = 0x0080; + public static final GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT:Int = 0x00000001; + public static final GL_ELEMENT_ARRAY_BARRIER_BIT:Int = 0x00000002; + public static final GL_UNIFORM_BARRIER_BIT:Int = 0x00000004; + public static final GL_TEXTURE_FETCH_BARRIER_BIT:Int = 0x00000008; + public static final GL_SHADER_IMAGE_ACCESS_BARRIER_BIT:Int = 0x00000020; + public static final GL_COMMAND_BARRIER_BIT:Int = 0x00000040; + public static final GL_PIXEL_BUFFER_BARRIER_BIT:Int = 0x00000080; + public static final GL_TEXTURE_UPDATE_BARRIER_BIT:Int = 0x00000100; + public static final GL_BUFFER_UPDATE_BARRIER_BIT:Int = 0x00000200; + public static final GL_FRAMEBUFFER_BARRIER_BIT:Int = 0x00000400; + public static final GL_TRANSFORM_FEEDBACK_BARRIER_BIT:Int = 0x00000800; + public static final GL_ATOMIC_COUNTER_BARRIER_BIT:Int = 0x00001000; + public static final GL_SHADER_STORAGE_BARRIER_BIT:Int = 0x00002000; + public static final GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT:Int = 0x00004000; + public static final GL_QUERY_BUFFER_BARRIER_BIT:Int = 0x00008000; + public static final GL_ALL_BARRIER_BITS:Int = 0xFFFFFFFF; + public static final GL_SYNC_FLUSH_COMMANDS_BIT:Int = 0x00000001; + public static final GL_VERTEX_SHADER_BIT:Int = 0x00000001; + public static final GL_FRAGMENT_SHADER_BIT:Int = 0x00000002; + public static final GL_GEOMETRY_SHADER_BIT:Int = 0x00000004; + public static final GL_TESS_CONTROL_SHADER_BIT:Int = 0x00000008; + public static final GL_TESS_EVALUATION_SHADER_BIT:Int = 0x00000010; + public static final GL_COMPUTE_SHADER_BIT:Int = 0x00000020; + public static final GL_ALL_SHADER_BITS:Int = 0xFFFFFFFF; + public static final GL_FALSE:Int = 0; + public static final GL_NO_ERROR:Int = 0; + public static final GL_ZERO:Int = 0; + public static final GL_NONE:Int = 0; + public static final GL_TRUE:Int = 1; + public static final GL_ONE:Int = 1; + public static final GL_INVALID_INDEX:Int = 0xFFFFFFFF; + public static final GL_TIMEOUT_IGNORED:Int = 0xFFFFFFFFFFFFFFFF; + public static final GL_POINTS:Int = 0x0000; + public static final GL_LINES:Int = 0x0001; + public static final GL_LINE_LOOP:Int = 0x0002; + public static final GL_LINE_STRIP:Int = 0x0003; + public static final GL_TRIANGLES:Int = 0x0004; + public static final GL_TRIANGLE_STRIP:Int = 0x0005; + public static final GL_TRIANGLE_FAN:Int = 0x0006; + public static final GL_QUADS:Int = 0x0007; + public static final GL_LINES_ADJACENCY:Int = 0x000A; + public static final GL_LINE_STRIP_ADJACENCY:Int = 0x000B; + public static final GL_TRIANGLES_ADJACENCY:Int = 0x000C; + public static final GL_TRIANGLE_STRIP_ADJACENCY:Int = 0x000D; + public static final GL_PATCHES:Int = 0x000E; + public static final GL_NEVER:Int = 0x0200; + public static final GL_LESS:Int = 0x0201; + public static final GL_EQUAL:Int = 0x0202; + public static final GL_LEQUAL:Int = 0x0203; + public static final GL_GREATER:Int = 0x0204; + public static final GL_NOTEQUAL:Int = 0x0205; + public static final GL_GEQUAL:Int = 0x0206; + public static final GL_ALWAYS:Int = 0x0207; + public static final GL_SRC_COLOR:Int = 0x0300; + public static final GL_ONE_MINUS_SRC_COLOR:Int = 0x0301; + public static final GL_SRC_ALPHA:Int = 0x0302; + public static final GL_ONE_MINUS_SRC_ALPHA:Int = 0x0303; + public static final GL_DST_ALPHA:Int = 0x0304; + public static final GL_ONE_MINUS_DST_ALPHA:Int = 0x0305; + public static final GL_DST_COLOR:Int = 0x0306; + public static final GL_ONE_MINUS_DST_COLOR:Int = 0x0307; + public static final GL_SRC_ALPHA_SATURATE:Int = 0x0308; + public static final GL_FRONT_LEFT:Int = 0x0400; + public static final GL_FRONT_RIGHT:Int = 0x0401; + public static final GL_BACK_LEFT:Int = 0x0402; + public static final GL_BACK_RIGHT:Int = 0x0403; + public static final GL_FRONT:Int = 0x0404; + public static final GL_BACK:Int = 0x0405; + public static final GL_LEFT:Int = 0x0406; + public static final GL_RIGHT:Int = 0x0407; + public static final GL_FRONT_AND_BACK:Int = 0x0408; + public static final GL_INVALID_ENUM:Int = 0x0500; + public static final GL_INVALID_VALUE:Int = 0x0501; + public static final GL_INVALID_OPERATION:Int = 0x0502; + public static final GL_STACK_OVERFLOW:Int = 0x0503; + public static final GL_STACK_UNDERFLOW:Int = 0x0504; + public static final GL_OUT_OF_MEMORY:Int = 0x0505; + public static final GL_INVALID_FRAMEBUFFER_OPERATION:Int = 0x0506; + public static final GL_CW:Int = 0x0900; + public static final GL_CCW:Int = 0x0901; + public static final GL_POINT_SIZE:Int = 0x0B11; + public static final GL_POINT_SIZE_RANGE:Int = 0x0B12; + public static final GL_SMOOTH_POINT_SIZE_RANGE:Int = 0x0B12; + public static final GL_POINT_SIZE_GRANULARITY:Int = 0x0B13; + public static final GL_SMOOTH_POINT_SIZE_GRANULARITY:Int = 0x0B13; + public static final GL_LINE_SMOOTH:Int = 0x0B20; + public static final GL_LINE_WIDTH:Int = 0x0B21; + public static final GL_LINE_WIDTH_RANGE:Int = 0x0B22; + public static final GL_SMOOTH_LINE_WIDTH_RANGE:Int = 0x0B22; + public static final GL_LINE_WIDTH_GRANULARITY:Int = 0x0B23; + public static final GL_SMOOTH_LINE_WIDTH_GRANULARITY:Int = 0x0B23; + public static final GL_POLYGON_MODE:Int = 0x0B40; + public static final GL_POLYGON_SMOOTH:Int = 0x0B41; + public static final GL_CULL_FACE:Int = 0x0B44; + public static final GL_CULL_FACE_MODE:Int = 0x0B45; + public static final GL_FRONT_FACE:Int = 0x0B46; + public static final GL_DEPTH_RANGE:Int = 0x0B70; + public static final GL_DEPTH_TEST:Int = 0x0B71; + public static final GL_DEPTH_WRITEMASK:Int = 0x0B72; + public static final GL_DEPTH_CLEAR_VALUE:Int = 0x0B73; + public static final GL_DEPTH_FUNC:Int = 0x0B74; + public static final GL_STENCIL_TEST:Int = 0x0B90; + public static final GL_STENCIL_CLEAR_VALUE:Int = 0x0B91; + public static final GL_STENCIL_FUNC:Int = 0x0B92; + public static final GL_STENCIL_VALUE_MASK:Int = 0x0B93; + public static final GL_STENCIL_FAIL:Int = 0x0B94; + public static final GL_STENCIL_PASS_DEPTH_FAIL:Int = 0x0B95; + public static final GL_STENCIL_PASS_DEPTH_PASS:Int = 0x0B96; + public static final GL_STENCIL_REF:Int = 0x0B97; + public static final GL_STENCIL_WRITEMASK:Int = 0x0B98; + public static final GL_VIEWPORT:Int = 0x0BA2; + public static final GL_DITHER:Int = 0x0BD0; + public static final GL_BLEND_DST:Int = 0x0BE0; + public static final GL_BLEND_SRC:Int = 0x0BE1; + public static final GL_BLEND:Int = 0x0BE2; + public static final GL_LOGIC_OP_MODE:Int = 0x0BF0; + public static final GL_COLOR_LOGIC_OP:Int = 0x0BF2; + public static final GL_DRAW_BUFFER:Int = 0x0C01; + public static final GL_READ_BUFFER:Int = 0x0C02; + public static final GL_SCISSOR_BOX:Int = 0x0C10; + public static final GL_SCISSOR_TEST:Int = 0x0C11; + public static final GL_COLOR_CLEAR_VALUE:Int = 0x0C22; + public static final GL_COLOR_WRITEMASK:Int = 0x0C23; + public static final GL_DOUBLEBUFFER:Int = 0x0C32; + public static final GL_STEREO:Int = 0x0C33; + public static final GL_LINE_SMOOTH_HINT:Int = 0x0C52; + public static final GL_POLYGON_SMOOTH_HINT:Int = 0x0C53; + public static final GL_UNPACK_SWAP_BYTES:Int = 0x0CF0; + public static final GL_UNPACK_LSB_FIRST:Int = 0x0CF1; + public static final GL_UNPACK_ROW_LENGTH:Int = 0x0CF2; + public static final GL_UNPACK_SKIP_ROWS:Int = 0x0CF3; + public static final GL_UNPACK_SKIP_PIXELS:Int = 0x0CF4; + public static final GL_UNPACK_ALIGNMENT:Int = 0x0CF5; + public static final GL_PACK_SWAP_BYTES:Int = 0x0D00; + public static final GL_PACK_LSB_FIRST:Int = 0x0D01; + public static final GL_PACK_ROW_LENGTH:Int = 0x0D02; + public static final GL_PACK_SKIP_ROWS:Int = 0x0D03; + public static final GL_PACK_SKIP_PIXELS:Int = 0x0D04; + public static final GL_PACK_ALIGNMENT:Int = 0x0D05; + public static final GL_MAX_CLIP_DISTANCES:Int = 0x0D32; + public static final GL_MAX_TEXTURE_SIZE:Int = 0x0D33; + public static final GL_MAX_VIEWPORT_DIMS:Int = 0x0D3A; + public static final GL_SUBPIXEL_BITS:Int = 0x0D50; + public static final GL_TEXTURE_1D:Int = 0x0DE0; + public static final GL_TEXTURE_2D:Int = 0x0DE1; + public static final GL_TEXTURE_WIDTH:Int = 0x1000; + public static final GL_TEXTURE_HEIGHT:Int = 0x1001; + public static final GL_TEXTURE_INTERNAL_FORMAT:Int = 0x1003; + public static final GL_TEXTURE_BORDER_COLOR:Int = 0x1004; + public static final GL_DONT_CARE:Int = 0x1100; + public static final GL_FASTEST:Int = 0x1101; + public static final GL_NICEST:Int = 0x1102; + public static final GL_BYTE:Int = 0x1400; + public static final GL_UNSIGNED_BYTE:Int = 0x1401; + public static final GL_SHORT:Int = 0x1402; + public static final GL_UNSIGNED_SHORT:Int = 0x1403; + public static final GL_INT:Int = 0x1404; + public static final GL_UNSIGNED_INT:Int = 0x1405; + public static final GL_FLOAT:Int = 0x1406; + public static final GL_DOUBLE:Int = 0x140A; + public static final GL_HALF_FLOAT:Int = 0x140B; + public static final GL_FIXED:Int = 0x140C; + public static final GL_CLEAR:Int = 0x1500; + public static final GL_AND:Int = 0x1501; + public static final GL_AND_REVERSE:Int = 0x1502; + public static final GL_COPY:Int = 0x1503; + public static final GL_AND_INVERTED:Int = 0x1504; + public static final GL_NOOP:Int = 0x1505; + public static final GL_XOR:Int = 0x1506; + public static final GL_OR:Int = 0x1507; + public static final GL_NOR:Int = 0x1508; + public static final GL_EQUIV:Int = 0x1509; + public static final GL_INVERT:Int = 0x150A; + public static final GL_OR_REVERSE:Int = 0x150B; + public static final GL_COPY_INVERTED:Int = 0x150C; + public static final GL_OR_INVERTED:Int = 0x150D; + public static final GL_NAND:Int = 0x150E; + public static final GL_SET:Int = 0x150F; + public static final GL_TEXTURE:Int = 0x1702; + public static final GL_COLOR:Int = 0x1800; + public static final GL_DEPTH:Int = 0x1801; + public static final GL_STENCIL:Int = 0x1802; + public static final GL_STENCIL_INDEX:Int = 0x1901; + public static final GL_DEPTH_COMPONENT:Int = 0x1902; + public static final GL_RED:Int = 0x1903; + public static final GL_GREEN:Int = 0x1904; + public static final GL_BLUE:Int = 0x1905; + public static final GL_ALPHA:Int = 0x1906; + public static final GL_RGB:Int = 0x1907; + public static final GL_RGBA:Int = 0x1908; + public static final GL_POINT:Int = 0x1B00; + public static final GL_LINE:Int = 0x1B01; + public static final GL_FILL:Int = 0x1B02; + public static final GL_KEEP:Int = 0x1E00; + public static final GL_REPLACE:Int = 0x1E01; + public static final GL_INCR:Int = 0x1E02; + public static final GL_DECR:Int = 0x1E03; + public static final GL_VENDOR:Int = 0x1F00; + public static final GL_RENDERER:Int = 0x1F01; + public static final GL_VERSION:Int = 0x1F02; + public static final GL_EXTENSIONS:Int = 0x1F03; + public static final GL_NEAREST:Int = 0x2600; + public static final GL_LINEAR:Int = 0x2601; + public static final GL_NEAREST_MIPMAP_NEAREST:Int = 0x2700; + public static final GL_LINEAR_MIPMAP_NEAREST:Int = 0x2701; + public static final GL_NEAREST_MIPMAP_LINEAR:Int = 0x2702; + public static final GL_LINEAR_MIPMAP_LINEAR:Int = 0x2703; + public static final GL_TEXTURE_MAG_FILTER:Int = 0x2800; + public static final GL_TEXTURE_MIN_FILTER:Int = 0x2801; + public static final GL_TEXTURE_WRAP_S:Int = 0x2802; + public static final GL_TEXTURE_WRAP_T:Int = 0x2803; + public static final GL_REPEAT:Int = 0x2901; + public static final GL_POLYGON_OFFSET_UNITS:Int = 0x2A00; + public static final GL_POLYGON_OFFSET_POINT:Int = 0x2A01; + public static final GL_POLYGON_OFFSET_LINE:Int = 0x2A02; + public static final GL_R3_G3_B2:Int = 0x2A10; + public static final GL_CLIP_DISTANCE0:Int = 0x3000; + public static final GL_CLIP_DISTANCE1:Int = 0x3001; + public static final GL_CLIP_DISTANCE2:Int = 0x3002; + public static final GL_CLIP_DISTANCE3:Int = 0x3003; + public static final GL_CLIP_DISTANCE4:Int = 0x3004; + public static final GL_CLIP_DISTANCE5:Int = 0x3005; + public static final GL_CLIP_DISTANCE6:Int = 0x3006; + public static final GL_CLIP_DISTANCE7:Int = 0x3007; + public static final GL_CONSTANT_COLOR:Int = 0x8001; + public static final GL_ONE_MINUS_CONSTANT_COLOR:Int = 0x8002; + public static final GL_CONSTANT_ALPHA:Int = 0x8003; + public static final GL_ONE_MINUS_CONSTANT_ALPHA:Int = 0x8004; + public static final GL_BLEND_COLOR:Int = 0x8005; + public static final GL_FUNC_ADD:Int = 0x8006; + public static final GL_MIN:Int = 0x8007; + public static final GL_MAX:Int = 0x8008; + public static final GL_BLEND_EQUATION:Int = 0x8009; + public static final GL_BLEND_EQUATION_RGB:Int = 0x8009; + public static final GL_FUNC_SUBTRACT:Int = 0x800A; + public static final GL_FUNC_REVERSE_SUBTRACT:Int = 0x800B; + public static final GL_UNSIGNED_BYTE_3_3_2:Int = 0x8032; + public static final GL_UNSIGNED_SHORT_4_4_4_4:Int = 0x8033; + public static final GL_UNSIGNED_SHORT_5_5_5_1:Int = 0x8034; + public static final GL_UNSIGNED_INT_8_8_8_8:Int = 0x8035; + public static final GL_UNSIGNED_INT_10_10_10_2:Int = 0x8036; + public static final GL_POLYGON_OFFSET_FILL:Int = 0x8037; + public static final GL_POLYGON_OFFSET_FACTOR:Int = 0x8038; + public static final GL_RGB4:Int = 0x804F; + public static final GL_RGB5:Int = 0x8050; + public static final GL_RGB8:Int = 0x8051; + public static final GL_RGB10:Int = 0x8052; + public static final GL_RGB12:Int = 0x8053; + public static final GL_RGB16:Int = 0x8054; + public static final GL_RGBA2:Int = 0x8055; + public static final GL_RGBA4:Int = 0x8056; + public static final GL_RGB5_A1:Int = 0x8057; + public static final GL_RGBA8:Int = 0x8058; + public static final GL_RGB10_A2:Int = 0x8059; + public static final GL_RGBA12:Int = 0x805A; + public static final GL_RGBA16:Int = 0x805B; + public static final GL_TEXTURE_RED_SIZE:Int = 0x805C; + public static final GL_TEXTURE_GREEN_SIZE:Int = 0x805D; + public static final GL_TEXTURE_BLUE_SIZE:Int = 0x805E; + public static final GL_TEXTURE_ALPHA_SIZE:Int = 0x805F; + public static final GL_PROXY_TEXTURE_1D:Int = 0x8063; + public static final GL_PROXY_TEXTURE_2D:Int = 0x8064; + public static final GL_TEXTURE_BINDING_1D:Int = 0x8068; + public static final GL_TEXTURE_BINDING_2D:Int = 0x8069; + public static final GL_TEXTURE_BINDING_3D:Int = 0x806A; + public static final GL_PACK_SKIP_IMAGES:Int = 0x806B; + public static final GL_PACK_IMAGE_HEIGHT:Int = 0x806C; + public static final GL_UNPACK_SKIP_IMAGES:Int = 0x806D; + public static final GL_UNPACK_IMAGE_HEIGHT:Int = 0x806E; + public static final GL_TEXTURE_3D:Int = 0x806F; + public static final GL_PROXY_TEXTURE_3D:Int = 0x8070; + public static final GL_TEXTURE_DEPTH:Int = 0x8071; + public static final GL_TEXTURE_WRAP_R:Int = 0x8072; + public static final GL_MAX_3D_TEXTURE_SIZE:Int = 0x8073; + public static final GL_VERTEX_ARRAY:Int = 0x8074; + public static final GL_MULTISAMPLE:Int = 0x809D; + public static final GL_SAMPLE_ALPHA_TO_COVERAGE:Int = 0x809E; + public static final GL_SAMPLE_ALPHA_TO_ONE:Int = 0x809F; + public static final GL_SAMPLE_COVERAGE:Int = 0x80A0; + public static final GL_SAMPLE_BUFFERS:Int = 0x80A8; + public static final GL_SAMPLES:Int = 0x80A9; + public static final GL_SAMPLE_COVERAGE_VALUE:Int = 0x80AA; + public static final GL_SAMPLE_COVERAGE_INVERT:Int = 0x80AB; + public static final GL_BLEND_DST_RGB:Int = 0x80C8; + public static final GL_BLEND_SRC_RGB:Int = 0x80C9; + public static final GL_BLEND_DST_ALPHA:Int = 0x80CA; + public static final GL_BLEND_SRC_ALPHA:Int = 0x80CB; + public static final GL_BGR:Int = 0x80E0; + public static final GL_BGRA:Int = 0x80E1; + public static final GL_MAX_ELEMENTS_VERTICES:Int = 0x80E8; + public static final GL_MAX_ELEMENTS_INDICES:Int = 0x80E9; + public static final GL_POINT_FADE_THRESHOLD_SIZE:Int = 0x8128; + public static final GL_CLAMP_TO_BORDER:Int = 0x812D; + public static final GL_CLAMP_TO_EDGE:Int = 0x812F; + public static final GL_TEXTURE_MIN_LOD:Int = 0x813A; + public static final GL_TEXTURE_MAX_LOD:Int = 0x813B; + public static final GL_TEXTURE_BASE_LEVEL:Int = 0x813C; + public static final GL_TEXTURE_MAX_LEVEL:Int = 0x813D; + public static final GL_DEPTH_COMPONENT16:Int = 0x81A5; + public static final GL_DEPTH_COMPONENT24:Int = 0x81A6; + public static final GL_DEPTH_COMPONENT32:Int = 0x81A7; + public static final GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:Int = 0x8210; + public static final GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:Int = 0x8211; + public static final GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:Int = 0x8212; + public static final GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:Int = 0x8213; + public static final GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:Int = 0x8214; + public static final GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:Int = 0x8215; + public static final GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:Int = 0x8216; + public static final GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:Int = 0x8217; + public static final GL_FRAMEBUFFER_DEFAULT:Int = 0x8218; + public static final GL_FRAMEBUFFER_UNDEFINED:Int = 0x8219; + public static final GL_DEPTH_STENCIL_ATTACHMENT:Int = 0x821A; + public static final GL_MAJOR_VERSION:Int = 0x821B; + public static final GL_MINOR_VERSION:Int = 0x821C; + public static final GL_NUM_EXTENSIONS:Int = 0x821D; + public static final GL_CONTEXT_FLAGS:Int = 0x821E; + public static final GL_BUFFER_IMMUTABLE_STORAGE:Int = 0x821F; + public static final GL_BUFFER_STORAGE_FLAGS:Int = 0x8220; + public static final GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED:Int = 0x8221; + public static final GL_COMPRESSED_RED:Int = 0x8225; + public static final GL_COMPRESSED_RG:Int = 0x8226; + public static final GL_RG:Int = 0x8227; + public static final GL_RG_INTEGER:Int = 0x8228; + public static final GL_R8:Int = 0x8229; + public static final GL_R16:Int = 0x822A; + public static final GL_RG8:Int = 0x822B; + public static final GL_RG16:Int = 0x822C; + public static final GL_R16F:Int = 0x822D; + public static final GL_R32F:Int = 0x822E; + public static final GL_RG16F:Int = 0x822F; + public static final GL_RG32F:Int = 0x8230; + public static final GL_R8I:Int = 0x8231; + public static final GL_R8UI:Int = 0x8232; + public static final GL_R16I:Int = 0x8233; + public static final GL_R16UI:Int = 0x8234; + public static final GL_R32I:Int = 0x8235; + public static final GL_R32UI:Int = 0x8236; + public static final GL_RG8I:Int = 0x8237; + public static final GL_RG8UI:Int = 0x8238; + public static final GL_RG16I:Int = 0x8239; + public static final GL_RG16UI:Int = 0x823A; + public static final GL_RG32I:Int = 0x823B; + public static final GL_RG32UI:Int = 0x823C; + public static final GL_DEBUG_OUTPUT_SYNCHRONOUS:Int = 0x8242; + public static final GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:Int = 0x8243; + public static final GL_DEBUG_CALLBACK_FUNCTION:Int = 0x8244; + public static final GL_DEBUG_CALLBACK_USER_PARAM:Int = 0x8245; + public static final GL_DEBUG_SOURCE_API:Int = 0x8246; + public static final GL_DEBUG_SOURCE_WINDOW_SYSTEM:Int = 0x8247; + public static final GL_DEBUG_SOURCE_SHADER_COMPILER:Int = 0x8248; + public static final GL_DEBUG_SOURCE_THIRD_PARTY:Int = 0x8249; + public static final GL_DEBUG_SOURCE_APPLICATION:Int = 0x824A; + public static final GL_DEBUG_SOURCE_OTHER:Int = 0x824B; + public static final GL_DEBUG_TYPE_ERROR:Int = 0x824C; + public static final GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:Int = 0x824D; + public static final GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:Int = 0x824E; + public static final GL_DEBUG_TYPE_PORTABILITY:Int = 0x824F; + public static final GL_DEBUG_TYPE_PERFORMANCE:Int = 0x8250; + public static final GL_DEBUG_TYPE_OTHER:Int = 0x8251; + public static final GL_PROGRAM_BINARY_RETRIEVABLE_HINT:Int = 0x8257; + public static final GL_PROGRAM_SEPARABLE:Int = 0x8258; + public static final GL_ACTIVE_PROGRAM:Int = 0x8259; + public static final GL_PROGRAM_PIPELINE_BINDING:Int = 0x825A; + public static final GL_MAX_VIEWPORTS:Int = 0x825B; + public static final GL_VIEWPORT_SUBPIXEL_BITS:Int = 0x825C; + public static final GL_VIEWPORT_BOUNDS_RANGE:Int = 0x825D; + public static final GL_LAYER_PROVOKING_VERTEX:Int = 0x825E; + public static final GL_VIEWPORT_INDEX_PROVOKING_VERTEX:Int = 0x825F; + public static final GL_UNDEFINED_VERTEX:Int = 0x8260; + public static final GL_MAX_COMPUTE_SHARED_MEMORY_SIZE:Int = 0x8262; + public static final GL_MAX_COMPUTE_UNIFORM_COMPONENTS:Int = 0x8263; + public static final GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS:Int = 0x8264; + public static final GL_MAX_COMPUTE_ATOMIC_COUNTERS:Int = 0x8265; + public static final GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS:Int = 0x8266; + public static final GL_COMPUTE_WORK_GROUP_SIZE:Int = 0x8267; + public static final GL_DEBUG_TYPE_MARKER:Int = 0x8268; + public static final GL_DEBUG_TYPE_PUSH_GROUP:Int = 0x8269; + public static final GL_DEBUG_TYPE_POP_GROUP:Int = 0x826A; + public static final GL_DEBUG_SEVERITY_NOTIFICATION:Int = 0x826B; + public static final GL_MAX_DEBUG_GROUP_STACK_DEPTH:Int = 0x826C; + public static final GL_DEBUG_GROUP_STACK_DEPTH:Int = 0x826D; + public static final GL_MAX_UNIFORM_LOCATIONS:Int = 0x826E; + public static final GL_INTERNALFORMAT_SUPPORTED:Int = 0x826F; + public static final GL_INTERNALFORMAT_PREFERRED:Int = 0x8270; + public static final GL_INTERNALFORMAT_RED_SIZE:Int = 0x8271; + public static final GL_INTERNALFORMAT_GREEN_SIZE:Int = 0x8272; + public static final GL_INTERNALFORMAT_BLUE_SIZE:Int = 0x8273; + public static final GL_INTERNALFORMAT_ALPHA_SIZE:Int = 0x8274; + public static final GL_INTERNALFORMAT_DEPTH_SIZE:Int = 0x8275; + public static final GL_INTERNALFORMAT_STENCIL_SIZE:Int = 0x8276; + public static final GL_INTERNALFORMAT_SHARED_SIZE:Int = 0x8277; + public static final GL_INTERNALFORMAT_RED_TYPE:Int = 0x8278; + public static final GL_INTERNALFORMAT_GREEN_TYPE:Int = 0x8279; + public static final GL_INTERNALFORMAT_BLUE_TYPE:Int = 0x827A; + public static final GL_INTERNALFORMAT_ALPHA_TYPE:Int = 0x827B; + public static final GL_INTERNALFORMAT_DEPTH_TYPE:Int = 0x827C; + public static final GL_INTERNALFORMAT_STENCIL_TYPE:Int = 0x827D; + public static final GL_MAX_WIDTH:Int = 0x827E; + public static final GL_MAX_HEIGHT:Int = 0x827F; + public static final GL_MAX_DEPTH:Int = 0x8280; + public static final GL_MAX_LAYERS:Int = 0x8281; + public static final GL_MAX_COMBINED_DIMENSIONS:Int = 0x8282; + public static final GL_COLOR_COMPONENTS:Int = 0x8283; + public static final GL_DEPTH_COMPONENTS:Int = 0x8284; + public static final GL_STENCIL_COMPONENTS:Int = 0x8285; + public static final GL_COLOR_RENDERABLE:Int = 0x8286; + public static final GL_DEPTH_RENDERABLE:Int = 0x8287; + public static final GL_STENCIL_RENDERABLE:Int = 0x8288; + public static final GL_FRAMEBUFFER_RENDERABLE:Int = 0x8289; + public static final GL_FRAMEBUFFER_RENDERABLE_LAYERED:Int = 0x828A; + public static final GL_FRAMEBUFFER_BLEND:Int = 0x828B; + public static final GL_READ_PIXELS:Int = 0x828C; + public static final GL_READ_PIXELS_FORMAT:Int = 0x828D; + public static final GL_READ_PIXELS_TYPE:Int = 0x828E; + public static final GL_TEXTURE_IMAGE_FORMAT:Int = 0x828F; + public static final GL_TEXTURE_IMAGE_TYPE:Int = 0x8290; + public static final GL_GET_TEXTURE_IMAGE_FORMAT:Int = 0x8291; + public static final GL_GET_TEXTURE_IMAGE_TYPE:Int = 0x8292; + public static final GL_MIPMAP:Int = 0x8293; + public static final GL_MANUAL_GENERATE_MIPMAP:Int = 0x8294; + public static final GL_AUTO_GENERATE_MIPMAP:Int = 0x8295; + public static final GL_COLOR_ENCODING:Int = 0x8296; + public static final GL_SRGB_READ:Int = 0x8297; + public static final GL_SRGB_WRITE:Int = 0x8298; + public static final GL_FILTER:Int = 0x829A; + public static final GL_VERTEX_TEXTURE:Int = 0x829B; + public static final GL_TESS_CONTROL_TEXTURE:Int = 0x829C; + public static final GL_TESS_EVALUATION_TEXTURE:Int = 0x829D; + public static final GL_GEOMETRY_TEXTURE:Int = 0x829E; + public static final GL_FRAGMENT_TEXTURE:Int = 0x829F; + public static final GL_COMPUTE_TEXTURE:Int = 0x82A0; + public static final GL_TEXTURE_SHADOW:Int = 0x82A1; + public static final GL_TEXTURE_GATHER:Int = 0x82A2; + public static final GL_TEXTURE_GATHER_SHADOW:Int = 0x82A3; + public static final GL_SHADER_IMAGE_LOAD:Int = 0x82A4; + public static final GL_SHADER_IMAGE_STORE:Int = 0x82A5; + public static final GL_SHADER_IMAGE_ATOMIC:Int = 0x82A6; + public static final GL_IMAGE_TEXEL_SIZE:Int = 0x82A7; + public static final GL_IMAGE_COMPATIBILITY_CLASS:Int = 0x82A8; + public static final GL_IMAGE_PIXEL_FORMAT:Int = 0x82A9; + public static final GL_IMAGE_PIXEL_TYPE:Int = 0x82AA; + public static final GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST:Int = 0x82AC; + public static final GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST:Int = 0x82AD; + public static final GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE:Int = 0x82AE; + public static final GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE:Int = 0x82AF; + public static final GL_TEXTURE_COMPRESSED_BLOCK_WIDTH:Int = 0x82B1; + public static final GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT:Int = 0x82B2; + public static final GL_TEXTURE_COMPRESSED_BLOCK_SIZE:Int = 0x82B3; + public static final GL_CLEAR_BUFFER:Int = 0x82B4; + public static final GL_TEXTURE_VIEW:Int = 0x82B5; + public static final GL_VIEW_COMPATIBILITY_CLASS:Int = 0x82B6; + public static final GL_FULL_SUPPORT:Int = 0x82B7; + public static final GL_CAVEAT_SUPPORT:Int = 0x82B8; + public static final GL_IMAGE_CLASS_4_X_32:Int = 0x82B9; + public static final GL_IMAGE_CLASS_2_X_32:Int = 0x82BA; + public static final GL_IMAGE_CLASS_1_X_32:Int = 0x82BB; + public static final GL_IMAGE_CLASS_4_X_16:Int = 0x82BC; + public static final GL_IMAGE_CLASS_2_X_16:Int = 0x82BD; + public static final GL_IMAGE_CLASS_1_X_16:Int = 0x82BE; + public static final GL_IMAGE_CLASS_4_X_8:Int = 0x82BF; + public static final GL_IMAGE_CLASS_2_X_8:Int = 0x82C0; + public static final GL_IMAGE_CLASS_1_X_8:Int = 0x82C1; + public static final GL_IMAGE_CLASS_11_11_10:Int = 0x82C2; + public static final GL_IMAGE_CLASS_10_10_10_2:Int = 0x82C3; + public static final GL_VIEW_CLASS_128_BITS:Int = 0x82C4; + public static final GL_VIEW_CLASS_96_BITS:Int = 0x82C5; + public static final GL_VIEW_CLASS_64_BITS:Int = 0x82C6; + public static final GL_VIEW_CLASS_48_BITS:Int = 0x82C7; + public static final GL_VIEW_CLASS_32_BITS:Int = 0x82C8; + public static final GL_VIEW_CLASS_24_BITS:Int = 0x82C9; + public static final GL_VIEW_CLASS_16_BITS:Int = 0x82CA; + public static final GL_VIEW_CLASS_8_BITS:Int = 0x82CB; + public static final GL_VIEW_CLASS_S3TC_DXT1_RGB:Int = 0x82CC; + public static final GL_VIEW_CLASS_S3TC_DXT1_RGBA:Int = 0x82CD; + public static final GL_VIEW_CLASS_S3TC_DXT3_RGBA:Int = 0x82CE; + public static final GL_VIEW_CLASS_S3TC_DXT5_RGBA:Int = 0x82CF; + public static final GL_VIEW_CLASS_RGTC1_RED:Int = 0x82D0; + public static final GL_VIEW_CLASS_RGTC2_RG:Int = 0x82D1; + public static final GL_VIEW_CLASS_BPTC_UNORM:Int = 0x82D2; + public static final GL_VIEW_CLASS_BPTC_FLOAT:Int = 0x82D3; + public static final GL_VERTEX_ATTRIB_BINDING:Int = 0x82D4; + public static final GL_VERTEX_ATTRIB_RELATIVE_OFFSET:Int = 0x82D5; + public static final GL_VERTEX_BINDING_DIVISOR:Int = 0x82D6; + public static final GL_VERTEX_BINDING_OFFSET:Int = 0x82D7; + public static final GL_VERTEX_BINDING_STRIDE:Int = 0x82D8; + public static final GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET:Int = 0x82D9; + public static final GL_MAX_VERTEX_ATTRIB_BINDINGS:Int = 0x82DA; + public static final GL_TEXTURE_VIEW_MIN_LEVEL:Int = 0x82DB; + public static final GL_TEXTURE_VIEW_NUM_LEVELS:Int = 0x82DC; + public static final GL_TEXTURE_VIEW_MIN_LAYER:Int = 0x82DD; + public static final GL_TEXTURE_VIEW_NUM_LAYERS:Int = 0x82DE; + public static final GL_TEXTURE_IMMUTABLE_LEVELS:Int = 0x82DF; + public static final GL_BUFFER:Int = 0x82E0; + public static final GL_SHADER:Int = 0x82E1; + public static final GL_PROGRAM:Int = 0x82E2; + public static final GL_QUERY:Int = 0x82E3; + public static final GL_PROGRAM_PIPELINE:Int = 0x82E4; + public static final GL_MAX_VERTEX_ATTRIB_STRIDE:Int = 0x82E5; + public static final GL_SAMPLER:Int = 0x82E6; + public static final GL_DISPLAY_LIST:Int = 0x82E7; + public static final GL_MAX_LABEL_LENGTH:Int = 0x82E8; + public static final GL_NUM_SHADING_LANGUAGE_VERSIONS:Int = 0x82E9; + public static final GL_UNSIGNED_BYTE_2_3_3_REV:Int = 0x8362; + public static final GL_UNSIGNED_SHORT_5_6_5:Int = 0x8363; + public static final GL_UNSIGNED_SHORT_5_6_5_REV:Int = 0x8364; + public static final GL_UNSIGNED_SHORT_4_4_4_4_REV:Int = 0x8365; + public static final GL_UNSIGNED_SHORT_1_5_5_5_REV:Int = 0x8366; + public static final GL_UNSIGNED_INT_8_8_8_8_REV:Int = 0x8367; + public static final GL_UNSIGNED_INT_2_10_10_10_REV:Int = 0x8368; + public static final GL_MIRRORED_REPEAT:Int = 0x8370; + public static final GL_ALIASED_LINE_WIDTH_RANGE:Int = 0x846E; + public static final GL_TEXTURE0:Int = 0x84C0; + public static final GL_TEXTURE1:Int = 0x84C1; + public static final GL_TEXTURE2:Int = 0x84C2; + public static final GL_TEXTURE3:Int = 0x84C3; + public static final GL_TEXTURE4:Int = 0x84C4; + public static final GL_TEXTURE5:Int = 0x84C5; + public static final GL_TEXTURE6:Int = 0x84C6; + public static final GL_TEXTURE7:Int = 0x84C7; + public static final GL_TEXTURE8:Int = 0x84C8; + public static final GL_TEXTURE9:Int = 0x84C9; + public static final GL_TEXTURE10:Int = 0x84CA; + public static final GL_TEXTURE11:Int = 0x84CB; + public static final GL_TEXTURE12:Int = 0x84CC; + public static final GL_TEXTURE13:Int = 0x84CD; + public static final GL_TEXTURE14:Int = 0x84CE; + public static final GL_TEXTURE15:Int = 0x84CF; + public static final GL_TEXTURE16:Int = 0x84D0; + public static final GL_TEXTURE17:Int = 0x84D1; + public static final GL_TEXTURE18:Int = 0x84D2; + public static final GL_TEXTURE19:Int = 0x84D3; + public static final GL_TEXTURE20:Int = 0x84D4; + public static final GL_TEXTURE21:Int = 0x84D5; + public static final GL_TEXTURE22:Int = 0x84D6; + public static final GL_TEXTURE23:Int = 0x84D7; + public static final GL_TEXTURE24:Int = 0x84D8; + public static final GL_TEXTURE25:Int = 0x84D9; + public static final GL_TEXTURE26:Int = 0x84DA; + public static final GL_TEXTURE27:Int = 0x84DB; + public static final GL_TEXTURE28:Int = 0x84DC; + public static final GL_TEXTURE29:Int = 0x84DD; + public static final GL_TEXTURE30:Int = 0x84DE; + public static final GL_TEXTURE31:Int = 0x84DF; + public static final GL_ACTIVE_TEXTURE:Int = 0x84E0; + public static final GL_MAX_RENDERBUFFER_SIZE:Int = 0x84E8; + public static final GL_COMPRESSED_RGB:Int = 0x84ED; + public static final GL_COMPRESSED_RGBA:Int = 0x84EE; + public static final GL_TEXTURE_COMPRESSION_HINT:Int = 0x84EF; + public static final GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER:Int = 0x84F0; + public static final GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER:Int = 0x84F1; + public static final GL_TEXTURE_RECTANGLE:Int = 0x84F5; + public static final GL_TEXTURE_BINDING_RECTANGLE:Int = 0x84F6; + public static final GL_PROXY_TEXTURE_RECTANGLE:Int = 0x84F7; + public static final GL_MAX_RECTANGLE_TEXTURE_SIZE:Int = 0x84F8; + public static final GL_DEPTH_STENCIL:Int = 0x84F9; + public static final GL_UNSIGNED_INT_24_8:Int = 0x84FA; + public static final GL_MAX_TEXTURE_LOD_BIAS:Int = 0x84FD; + public static final GL_TEXTURE_LOD_BIAS:Int = 0x8501; + public static final GL_INCR_WRAP:Int = 0x8507; + public static final GL_DECR_WRAP:Int = 0x8508; + public static final GL_TEXTURE_CUBE_MAP:Int = 0x8513; + public static final GL_TEXTURE_BINDING_CUBE_MAP:Int = 0x8514; + public static final GL_TEXTURE_CUBE_MAP_POSITIVE_X:Int = 0x8515; + public static final GL_TEXTURE_CUBE_MAP_NEGATIVE_X:Int = 0x8516; + public static final GL_TEXTURE_CUBE_MAP_POSITIVE_Y:Int = 0x8517; + public static final GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:Int = 0x8518; + public static final GL_TEXTURE_CUBE_MAP_POSITIVE_Z:Int = 0x8519; + public static final GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:Int = 0x851A; + public static final GL_PROXY_TEXTURE_CUBE_MAP:Int = 0x851B; + public static final GL_MAX_CUBE_MAP_TEXTURE_SIZE:Int = 0x851C; + public static final GL_SRC1_ALPHA:Int = 0x8589; + public static final GL_VERTEX_ARRAY_BINDING:Int = 0x85B5; + public static final GL_VERTEX_ATTRIB_ARRAY_ENABLED:Int = 0x8622; + public static final GL_VERTEX_ATTRIB_ARRAY_SIZE:Int = 0x8623; + public static final GL_VERTEX_ATTRIB_ARRAY_STRIDE:Int = 0x8624; + public static final GL_VERTEX_ATTRIB_ARRAY_TYPE:Int = 0x8625; + public static final GL_CURRENT_VERTEX_ATTRIB:Int = 0x8626; + public static final GL_VERTEX_PROGRAM_POINT_SIZE:Int = 0x8642; + public static final GL_PROGRAM_POINT_SIZE:Int = 0x8642; + public static final GL_VERTEX_ATTRIB_ARRAY_POINTER:Int = 0x8645; + public static final GL_DEPTH_CLAMP:Int = 0x864F; + public static final GL_TEXTURE_COMPRESSED_IMAGE_SIZE:Int = 0x86A0; + public static final GL_TEXTURE_COMPRESSED:Int = 0x86A1; + public static final GL_NUM_COMPRESSED_TEXTURE_FORMATS:Int = 0x86A2; + public static final GL_COMPRESSED_TEXTURE_FORMATS:Int = 0x86A3; + public static final GL_PROGRAM_BINARY_LENGTH:Int = 0x8741; + public static final GL_MIRROR_CLAMP_TO_EDGE:Int = 0x8743; + public static final GL_VERTEX_ATTRIB_ARRAY_LONG:Int = 0x874E; + public static final GL_BUFFER_SIZE:Int = 0x8764; + public static final GL_BUFFER_USAGE:Int = 0x8765; + public static final GL_NUM_PROGRAM_BINARY_FORMATS:Int = 0x87FE; + public static final GL_PROGRAM_BINARY_FORMATS:Int = 0x87FF; + public static final GL_STENCIL_BACK_FUNC:Int = 0x8800; + public static final GL_STENCIL_BACK_FAIL:Int = 0x8801; + public static final GL_STENCIL_BACK_PASS_DEPTH_FAIL:Int = 0x8802; + public static final GL_STENCIL_BACK_PASS_DEPTH_PASS:Int = 0x8803; + public static final GL_RGBA32F:Int = 0x8814; + public static final GL_RGB32F:Int = 0x8815; + public static final GL_RGBA16F:Int = 0x881A; + public static final GL_RGB16F:Int = 0x881B; + public static final GL_MAX_DRAW_BUFFERS:Int = 0x8824; + public static final GL_DRAW_BUFFER0:Int = 0x8825; + public static final GL_DRAW_BUFFER1:Int = 0x8826; + public static final GL_DRAW_BUFFER2:Int = 0x8827; + public static final GL_DRAW_BUFFER3:Int = 0x8828; + public static final GL_DRAW_BUFFER4:Int = 0x8829; + public static final GL_DRAW_BUFFER5:Int = 0x882A; + public static final GL_DRAW_BUFFER6:Int = 0x882B; + public static final GL_DRAW_BUFFER7:Int = 0x882C; + public static final GL_DRAW_BUFFER8:Int = 0x882D; + public static final GL_DRAW_BUFFER9:Int = 0x882E; + public static final GL_DRAW_BUFFER10:Int = 0x882F; + public static final GL_DRAW_BUFFER11:Int = 0x8830; + public static final GL_DRAW_BUFFER12:Int = 0x8831; + public static final GL_DRAW_BUFFER13:Int = 0x8832; + public static final GL_DRAW_BUFFER14:Int = 0x8833; + public static final GL_DRAW_BUFFER15:Int = 0x8834; + public static final GL_BLEND_EQUATION_ALPHA:Int = 0x883D; + public static final GL_TEXTURE_DEPTH_SIZE:Int = 0x884A; + public static final GL_TEXTURE_COMPARE_MODE:Int = 0x884C; + public static final GL_TEXTURE_COMPARE_FUNC:Int = 0x884D; + public static final GL_COMPARE_REF_TO_TEXTURE:Int = 0x884E; + public static final GL_TEXTURE_CUBE_MAP_SEAMLESS:Int = 0x884F; + public static final GL_QUERY_COUNTER_BITS:Int = 0x8864; + public static final GL_CURRENT_QUERY:Int = 0x8865; + public static final GL_QUERY_RESULT:Int = 0x8866; + public static final GL_QUERY_RESULT_AVAILABLE:Int = 0x8867; + public static final GL_MAX_VERTEX_ATTRIBS:Int = 0x8869; + public static final GL_VERTEX_ATTRIB_ARRAY_NORMALIZED:Int = 0x886A; + public static final GL_MAX_TESS_CONTROL_INPUT_COMPONENTS:Int = 0x886C; + public static final GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS:Int = 0x886D; + public static final GL_MAX_TEXTURE_IMAGE_UNITS:Int = 0x8872; + public static final GL_GEOMETRY_SHADER_INVOCATIONS:Int = 0x887F; + public static final GL_ARRAY_BUFFER:Int = 0x8892; + public static final GL_ELEMENT_ARRAY_BUFFER:Int = 0x8893; + public static final GL_ARRAY_BUFFER_BINDING:Int = 0x8894; + public static final GL_ELEMENT_ARRAY_BUFFER_BINDING:Int = 0x8895; + public static final GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:Int = 0x889F; + public static final GL_READ_ONLY:Int = 0x88B8; + public static final GL_WRITE_ONLY:Int = 0x88B9; + public static final GL_READ_WRITE:Int = 0x88BA; + public static final GL_BUFFER_ACCESS:Int = 0x88BB; + public static final GL_BUFFER_MAPPED:Int = 0x88BC; + public static final GL_BUFFER_MAP_POINTER:Int = 0x88BD; + public static final GL_TIME_ELAPSED:Int = 0x88BF; + public static final GL_STREAM_DRAW:Int = 0x88E0; + public static final GL_STREAM_READ:Int = 0x88E1; + public static final GL_STREAM_COPY:Int = 0x88E2; + public static final GL_STATIC_DRAW:Int = 0x88E4; + public static final GL_STATIC_READ:Int = 0x88E5; + public static final GL_STATIC_COPY:Int = 0x88E6; + public static final GL_DYNAMIC_DRAW:Int = 0x88E8; + public static final GL_DYNAMIC_READ:Int = 0x88E9; + public static final GL_DYNAMIC_COPY:Int = 0x88EA; + public static final GL_PIXEL_PACK_BUFFER:Int = 0x88EB; + public static final GL_PIXEL_UNPACK_BUFFER:Int = 0x88EC; + public static final GL_PIXEL_PACK_BUFFER_BINDING:Int = 0x88ED; + public static final GL_PIXEL_UNPACK_BUFFER_BINDING:Int = 0x88EF; + public static final GL_DEPTH24_STENCIL8:Int = 0x88F0; + public static final GL_TEXTURE_STENCIL_SIZE:Int = 0x88F1; + public static final GL_SRC1_COLOR:Int = 0x88F9; + public static final GL_ONE_MINUS_SRC1_COLOR:Int = 0x88FA; + public static final GL_ONE_MINUS_SRC1_ALPHA:Int = 0x88FB; + public static final GL_MAX_DUAL_SOURCE_DRAW_BUFFERS:Int = 0x88FC; + public static final GL_VERTEX_ATTRIB_ARRAY_INTEGER:Int = 0x88FD; + public static final GL_VERTEX_ATTRIB_ARRAY_DIVISOR:Int = 0x88FE; + public static final GL_MAX_ARRAY_TEXTURE_LAYERS:Int = 0x88FF; + public static final GL_MIN_PROGRAM_TEXEL_OFFSET:Int = 0x8904; + public static final GL_MAX_PROGRAM_TEXEL_OFFSET:Int = 0x8905; + public static final GL_SAMPLES_PASSED:Int = 0x8914; + public static final GL_GEOMETRY_VERTICES_OUT:Int = 0x8916; + public static final GL_GEOMETRY_INPUT_TYPE:Int = 0x8917; + public static final GL_GEOMETRY_OUTPUT_TYPE:Int = 0x8918; + public static final GL_SAMPLER_BINDING:Int = 0x8919; + public static final GL_CLAMP_READ_COLOR:Int = 0x891C; + public static final GL_FIXED_ONLY:Int = 0x891D; + public static final GL_UNIFORM_BUFFER:Int = 0x8A11; + public static final GL_UNIFORM_BUFFER_BINDING:Int = 0x8A28; + public static final GL_UNIFORM_BUFFER_START:Int = 0x8A29; + public static final GL_UNIFORM_BUFFER_SIZE:Int = 0x8A2A; + public static final GL_MAX_VERTEX_UNIFORM_BLOCKS:Int = 0x8A2B; + public static final GL_MAX_GEOMETRY_UNIFORM_BLOCKS:Int = 0x8A2C; + public static final GL_MAX_FRAGMENT_UNIFORM_BLOCKS:Int = 0x8A2D; + public static final GL_MAX_COMBINED_UNIFORM_BLOCKS:Int = 0x8A2E; + public static final GL_MAX_UNIFORM_BUFFER_BINDINGS:Int = 0x8A2F; + public static final GL_MAX_UNIFORM_BLOCK_SIZE:Int = 0x8A30; + public static final GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:Int = 0x8A31; + public static final GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS:Int = 0x8A32; + public static final GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:Int = 0x8A33; + public static final GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT:Int = 0x8A34; + public static final GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH:Int = 0x8A35; + public static final GL_ACTIVE_UNIFORM_BLOCKS:Int = 0x8A36; + public static final GL_UNIFORM_TYPE:Int = 0x8A37; + public static final GL_UNIFORM_SIZE:Int = 0x8A38; + public static final GL_UNIFORM_NAME_LENGTH:Int = 0x8A39; + public static final GL_UNIFORM_BLOCK_INDEX:Int = 0x8A3A; + public static final GL_UNIFORM_OFFSET:Int = 0x8A3B; + public static final GL_UNIFORM_ARRAY_STRIDE:Int = 0x8A3C; + public static final GL_UNIFORM_MATRIX_STRIDE:Int = 0x8A3D; + public static final GL_UNIFORM_IS_ROW_MAJOR:Int = 0x8A3E; + public static final GL_UNIFORM_BLOCK_BINDING:Int = 0x8A3F; + public static final GL_UNIFORM_BLOCK_DATA_SIZE:Int = 0x8A40; + public static final GL_UNIFORM_BLOCK_NAME_LENGTH:Int = 0x8A41; + public static final GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS:Int = 0x8A42; + public static final GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:Int = 0x8A43; + public static final GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:Int = 0x8A44; + public static final GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER:Int = 0x8A45; + public static final GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:Int = 0x8A46; + public static final GL_FRAGMENT_SHADER:Int = 0x8B30; + public static final GL_VERTEX_SHADER:Int = 0x8B31; + public static final GL_MAX_FRAGMENT_UNIFORM_COMPONENTS:Int = 0x8B49; + public static final GL_MAX_VERTEX_UNIFORM_COMPONENTS:Int = 0x8B4A; + public static final GL_MAX_VARYING_FLOATS:Int = 0x8B4B; + public static final GL_MAX_VARYING_COMPONENTS:Int = 0x8B4B; + public static final GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS:Int = 0x8B4C; + public static final GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:Int = 0x8B4D; + public static final GL_SHADER_TYPE:Int = 0x8B4F; + public static final GL_FLOAT_VEC2:Int = 0x8B50; + public static final GL_FLOAT_VEC3:Int = 0x8B51; + public static final GL_FLOAT_VEC4:Int = 0x8B52; + public static final GL_INT_VEC2:Int = 0x8B53; + public static final GL_INT_VEC3:Int = 0x8B54; + public static final GL_INT_VEC4:Int = 0x8B55; + public static final GL_BOOL:Int = 0x8B56; + public static final GL_BOOL_VEC2:Int = 0x8B57; + public static final GL_BOOL_VEC3:Int = 0x8B58; + public static final GL_BOOL_VEC4:Int = 0x8B59; + public static final GL_FLOAT_MAT2:Int = 0x8B5A; + public static final GL_FLOAT_MAT3:Int = 0x8B5B; + public static final GL_FLOAT_MAT4:Int = 0x8B5C; + public static final GL_SAMPLER_1D:Int = 0x8B5D; + public static final GL_SAMPLER_2D:Int = 0x8B5E; + public static final GL_SAMPLER_3D:Int = 0x8B5F; + public static final GL_SAMPLER_CUBE:Int = 0x8B60; + public static final GL_SAMPLER_1D_SHADOW:Int = 0x8B61; + public static final GL_SAMPLER_2D_SHADOW:Int = 0x8B62; + public static final GL_SAMPLER_2D_RECT:Int = 0x8B63; + public static final GL_SAMPLER_2D_RECT_SHADOW:Int = 0x8B64; + public static final GL_FLOAT_MAT2x3:Int = 0x8B65; + public static final GL_FLOAT_MAT2x4:Int = 0x8B66; + public static final GL_FLOAT_MAT3x2:Int = 0x8B67; + public static final GL_FLOAT_MAT3x4:Int = 0x8B68; + public static final GL_FLOAT_MAT4x2:Int = 0x8B69; + public static final GL_FLOAT_MAT4x3:Int = 0x8B6A; + public static final GL_DELETE_STATUS:Int = 0x8B80; + public static final GL_COMPILE_STATUS:Int = 0x8B81; + public static final GL_LINK_STATUS:Int = 0x8B82; + public static final GL_VALIDATE_STATUS:Int = 0x8B83; + public static final GL_INFO_LOG_LENGTH:Int = 0x8B84; + public static final GL_ATTACHED_SHADERS:Int = 0x8B85; + public static final GL_ACTIVE_UNIFORMS:Int = 0x8B86; + public static final GL_ACTIVE_UNIFORM_MAX_LENGTH:Int = 0x8B87; + public static final GL_SHADER_SOURCE_LENGTH:Int = 0x8B88; + public static final GL_ACTIVE_ATTRIBUTES:Int = 0x8B89; + public static final GL_ACTIVE_ATTRIBUTE_MAX_LENGTH:Int = 0x8B8A; + public static final GL_FRAGMENT_SHADER_DERIVATIVE_HINT:Int = 0x8B8B; + public static final GL_SHADING_LANGUAGE_VERSION:Int = 0x8B8C; + public static final GL_CURRENT_PROGRAM:Int = 0x8B8D; + public static final GL_IMPLEMENTATION_COLOR_READ_TYPE:Int = 0x8B9A; + public static final GL_IMPLEMENTATION_COLOR_READ_FORMAT:Int = 0x8B9B; + public static final GL_TEXTURE_RED_TYPE:Int = 0x8C10; + public static final GL_TEXTURE_GREEN_TYPE:Int = 0x8C11; + public static final GL_TEXTURE_BLUE_TYPE:Int = 0x8C12; + public static final GL_TEXTURE_ALPHA_TYPE:Int = 0x8C13; + public static final GL_TEXTURE_DEPTH_TYPE:Int = 0x8C16; + public static final GL_UNSIGNED_NORMALIZED:Int = 0x8C17; + public static final GL_TEXTURE_1D_ARRAY:Int = 0x8C18; + public static final GL_PROXY_TEXTURE_1D_ARRAY:Int = 0x8C19; + public static final GL_TEXTURE_2D_ARRAY:Int = 0x8C1A; + public static final GL_PROXY_TEXTURE_2D_ARRAY:Int = 0x8C1B; + public static final GL_TEXTURE_BINDING_1D_ARRAY:Int = 0x8C1C; + public static final GL_TEXTURE_BINDING_2D_ARRAY:Int = 0x8C1D; + public static final GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS:Int = 0x8C29; + public static final GL_TEXTURE_BUFFER:Int = 0x8C2A; + public static final GL_TEXTURE_BUFFER_BINDING:Int = 0x8C2A; + public static final GL_MAX_TEXTURE_BUFFER_SIZE:Int = 0x8C2B; + public static final GL_TEXTURE_BINDING_BUFFER:Int = 0x8C2C; + public static final GL_TEXTURE_BUFFER_DATA_STORE_BINDING:Int = 0x8C2D; + public static final GL_ANY_SAMPLES_PASSED:Int = 0x8C2F; + public static final GL_SAMPLE_SHADING:Int = 0x8C36; + public static final GL_MIN_SAMPLE_SHADING_VALUE:Int = 0x8C37; + public static final GL_R11F_G11F_B10F:Int = 0x8C3A; + public static final GL_UNSIGNED_INT_10F_11F_11F_REV:Int = 0x8C3B; + public static final GL_RGB9_E5:Int = 0x8C3D; + public static final GL_UNSIGNED_INT_5_9_9_9_REV:Int = 0x8C3E; + public static final GL_TEXTURE_SHARED_SIZE:Int = 0x8C3F; + public static final GL_SRGB:Int = 0x8C40; + public static final GL_SRGB8:Int = 0x8C41; + public static final GL_SRGB_ALPHA:Int = 0x8C42; + public static final GL_SRGB8_ALPHA8:Int = 0x8C43; + public static final GL_COMPRESSED_SRGB:Int = 0x8C48; + public static final GL_COMPRESSED_SRGB_ALPHA:Int = 0x8C49; + public static final GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH:Int = 0x8C76; + public static final GL_TRANSFORM_FEEDBACK_BUFFER_MODE:Int = 0x8C7F; + public static final GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:Int = 0x8C80; + public static final GL_TRANSFORM_FEEDBACK_VARYINGS:Int = 0x8C83; + public static final GL_TRANSFORM_FEEDBACK_BUFFER_START:Int = 0x8C84; + public static final GL_TRANSFORM_FEEDBACK_BUFFER_SIZE:Int = 0x8C85; + public static final GL_PRIMITIVES_GENERATED:Int = 0x8C87; + public static final GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:Int = 0x8C88; + public static final GL_RASTERIZER_DISCARD:Int = 0x8C89; + public static final GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:Int = 0x8C8A; + public static final GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:Int = 0x8C8B; + public static final GL_INTERLEAVED_ATTRIBS:Int = 0x8C8C; + public static final GL_SEPARATE_ATTRIBS:Int = 0x8C8D; + public static final GL_TRANSFORM_FEEDBACK_BUFFER:Int = 0x8C8E; + public static final GL_TRANSFORM_FEEDBACK_BUFFER_BINDING:Int = 0x8C8F; + public static final GL_POINT_SPRITE_COORD_ORIGIN:Int = 0x8CA0; + public static final GL_LOWER_LEFT:Int = 0x8CA1; + public static final GL_UPPER_LEFT:Int = 0x8CA2; + public static final GL_STENCIL_BACK_REF:Int = 0x8CA3; + public static final GL_STENCIL_BACK_VALUE_MASK:Int = 0x8CA4; + public static final GL_STENCIL_BACK_WRITEMASK:Int = 0x8CA5; + public static final GL_DRAW_FRAMEBUFFER_BINDING:Int = 0x8CA6; + public static final GL_FRAMEBUFFER_BINDING:Int = 0x8CA6; + public static final GL_RENDERBUFFER_BINDING:Int = 0x8CA7; + public static final GL_READ_FRAMEBUFFER:Int = 0x8CA8; + public static final GL_DRAW_FRAMEBUFFER:Int = 0x8CA9; + public static final GL_READ_FRAMEBUFFER_BINDING:Int = 0x8CAA; + public static final GL_RENDERBUFFER_SAMPLES:Int = 0x8CAB; + public static final GL_DEPTH_COMPONENT32F:Int = 0x8CAC; + public static final GL_DEPTH32F_STENCIL8:Int = 0x8CAD; + public static final GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:Int = 0x8CD0; + public static final GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:Int = 0x8CD1; + public static final GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:Int = 0x8CD2; + public static final GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:Int = 0x8CD3; + public static final GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:Int = 0x8CD4; + public static final GL_FRAMEBUFFER_COMPLETE:Int = 0x8CD5; + public static final GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:Int = 0x8CD6; + public static final GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:Int = 0x8CD7; + public static final GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:Int = 0x8CDB; + public static final GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:Int = 0x8CDC; + public static final GL_FRAMEBUFFER_UNSUPPORTED:Int = 0x8CDD; + public static final GL_MAX_COLOR_ATTACHMENTS:Int = 0x8CDF; + public static final GL_COLOR_ATTACHMENT0:Int = 0x8CE0; + public static final GL_COLOR_ATTACHMENT1:Int = 0x8CE1; + public static final GL_COLOR_ATTACHMENT2:Int = 0x8CE2; + public static final GL_COLOR_ATTACHMENT3:Int = 0x8CE3; + public static final GL_COLOR_ATTACHMENT4:Int = 0x8CE4; + public static final GL_COLOR_ATTACHMENT5:Int = 0x8CE5; + public static final GL_COLOR_ATTACHMENT6:Int = 0x8CE6; + public static final GL_COLOR_ATTACHMENT7:Int = 0x8CE7; + public static final GL_COLOR_ATTACHMENT8:Int = 0x8CE8; + public static final GL_COLOR_ATTACHMENT9:Int = 0x8CE9; + public static final GL_COLOR_ATTACHMENT10:Int = 0x8CEA; + public static final GL_COLOR_ATTACHMENT11:Int = 0x8CEB; + public static final GL_COLOR_ATTACHMENT12:Int = 0x8CEC; + public static final GL_COLOR_ATTACHMENT13:Int = 0x8CED; + public static final GL_COLOR_ATTACHMENT14:Int = 0x8CEE; + public static final GL_COLOR_ATTACHMENT15:Int = 0x8CEF; + public static final GL_COLOR_ATTACHMENT16:Int = 0x8CF0; + public static final GL_COLOR_ATTACHMENT17:Int = 0x8CF1; + public static final GL_COLOR_ATTACHMENT18:Int = 0x8CF2; + public static final GL_COLOR_ATTACHMENT19:Int = 0x8CF3; + public static final GL_COLOR_ATTACHMENT20:Int = 0x8CF4; + public static final GL_COLOR_ATTACHMENT21:Int = 0x8CF5; + public static final GL_COLOR_ATTACHMENT22:Int = 0x8CF6; + public static final GL_COLOR_ATTACHMENT23:Int = 0x8CF7; + public static final GL_COLOR_ATTACHMENT24:Int = 0x8CF8; + public static final GL_COLOR_ATTACHMENT25:Int = 0x8CF9; + public static final GL_COLOR_ATTACHMENT26:Int = 0x8CFA; + public static final GL_COLOR_ATTACHMENT27:Int = 0x8CFB; + public static final GL_COLOR_ATTACHMENT28:Int = 0x8CFC; + public static final GL_COLOR_ATTACHMENT29:Int = 0x8CFD; + public static final GL_COLOR_ATTACHMENT30:Int = 0x8CFE; + public static final GL_COLOR_ATTACHMENT31:Int = 0x8CFF; + public static final GL_DEPTH_ATTACHMENT:Int = 0x8D00; + public static final GL_STENCIL_ATTACHMENT:Int = 0x8D20; + public static final GL_FRAMEBUFFER:Int = 0x8D40; + public static final GL_RENDERBUFFER:Int = 0x8D41; + public static final GL_RENDERBUFFER_WIDTH:Int = 0x8D42; + public static final GL_RENDERBUFFER_HEIGHT:Int = 0x8D43; + public static final GL_RENDERBUFFER_INTERNAL_FORMAT:Int = 0x8D44; + public static final GL_STENCIL_INDEX1:Int = 0x8D46; + public static final GL_STENCIL_INDEX4:Int = 0x8D47; + public static final GL_STENCIL_INDEX8:Int = 0x8D48; + public static final GL_STENCIL_INDEX16:Int = 0x8D49; + public static final GL_RENDERBUFFER_RED_SIZE:Int = 0x8D50; + public static final GL_RENDERBUFFER_GREEN_SIZE:Int = 0x8D51; + public static final GL_RENDERBUFFER_BLUE_SIZE:Int = 0x8D52; + public static final GL_RENDERBUFFER_ALPHA_SIZE:Int = 0x8D53; + public static final GL_RENDERBUFFER_DEPTH_SIZE:Int = 0x8D54; + public static final GL_RENDERBUFFER_STENCIL_SIZE:Int = 0x8D55; + public static final GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:Int = 0x8D56; + public static final GL_MAX_SAMPLES:Int = 0x8D57; + public static final GL_RGB565:Int = 0x8D62; + public static final GL_PRIMITIVE_RESTART_FIXED_INDEX:Int = 0x8D69; + public static final GL_ANY_SAMPLES_PASSED_CONSERVATIVE:Int = 0x8D6A; + public static final GL_MAX_ELEMENT_INDEX:Int = 0x8D6B; + public static final GL_RGBA32UI:Int = 0x8D70; + public static final GL_RGB32UI:Int = 0x8D71; + public static final GL_RGBA16UI:Int = 0x8D76; + public static final GL_RGB16UI:Int = 0x8D77; + public static final GL_RGBA8UI:Int = 0x8D7C; + public static final GL_RGB8UI:Int = 0x8D7D; + public static final GL_RGBA32I:Int = 0x8D82; + public static final GL_RGB32I:Int = 0x8D83; + public static final GL_RGBA16I:Int = 0x8D88; + public static final GL_RGB16I:Int = 0x8D89; + public static final GL_RGBA8I:Int = 0x8D8E; + public static final GL_RGB8I:Int = 0x8D8F; + public static final GL_RED_INTEGER:Int = 0x8D94; + public static final GL_GREEN_INTEGER:Int = 0x8D95; + public static final GL_BLUE_INTEGER:Int = 0x8D96; + public static final GL_RGB_INTEGER:Int = 0x8D98; + public static final GL_RGBA_INTEGER:Int = 0x8D99; + public static final GL_BGR_INTEGER:Int = 0x8D9A; + public static final GL_BGRA_INTEGER:Int = 0x8D9B; + public static final GL_INT_2_10_10_10_REV:Int = 0x8D9F; + public static final GL_FRAMEBUFFER_ATTACHMENT_LAYERED:Int = 0x8DA7; + public static final GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS:Int = 0x8DA8; + public static final GL_FLOAT_32_UNSIGNED_INT_24_8_REV:Int = 0x8DAD; + public static final GL_FRAMEBUFFER_SRGB:Int = 0x8DB9; + public static final GL_COMPRESSED_RED_RGTC1:Int = 0x8DBB; + public static final GL_COMPRESSED_SIGNED_RED_RGTC1:Int = 0x8DBC; + public static final GL_COMPRESSED_RG_RGTC2:Int = 0x8DBD; + public static final GL_COMPRESSED_SIGNED_RG_RGTC2:Int = 0x8DBE; + public static final GL_SAMPLER_1D_ARRAY:Int = 0x8DC0; + public static final GL_SAMPLER_2D_ARRAY:Int = 0x8DC1; + public static final GL_SAMPLER_BUFFER:Int = 0x8DC2; + public static final GL_SAMPLER_1D_ARRAY_SHADOW:Int = 0x8DC3; + public static final GL_SAMPLER_2D_ARRAY_SHADOW:Int = 0x8DC4; + public static final GL_SAMPLER_CUBE_SHADOW:Int = 0x8DC5; + public static final GL_UNSIGNED_INT_VEC2:Int = 0x8DC6; + public static final GL_UNSIGNED_INT_VEC3:Int = 0x8DC7; + public static final GL_UNSIGNED_INT_VEC4:Int = 0x8DC8; + public static final GL_INT_SAMPLER_1D:Int = 0x8DC9; + public static final GL_INT_SAMPLER_2D:Int = 0x8DCA; + public static final GL_INT_SAMPLER_3D:Int = 0x8DCB; + public static final GL_INT_SAMPLER_CUBE:Int = 0x8DCC; + public static final GL_INT_SAMPLER_2D_RECT:Int = 0x8DCD; + public static final GL_INT_SAMPLER_1D_ARRAY:Int = 0x8DCE; + public static final GL_INT_SAMPLER_2D_ARRAY:Int = 0x8DCF; + public static final GL_INT_SAMPLER_BUFFER:Int = 0x8DD0; + public static final GL_UNSIGNED_INT_SAMPLER_1D:Int = 0x8DD1; + public static final GL_UNSIGNED_INT_SAMPLER_2D:Int = 0x8DD2; + public static final GL_UNSIGNED_INT_SAMPLER_3D:Int = 0x8DD3; + public static final GL_UNSIGNED_INT_SAMPLER_CUBE:Int = 0x8DD4; + public static final GL_UNSIGNED_INT_SAMPLER_2D_RECT:Int = 0x8DD5; + public static final GL_UNSIGNED_INT_SAMPLER_1D_ARRAY:Int = 0x8DD6; + public static final GL_UNSIGNED_INT_SAMPLER_2D_ARRAY:Int = 0x8DD7; + public static final GL_UNSIGNED_INT_SAMPLER_BUFFER:Int = 0x8DD8; + public static final GL_GEOMETRY_SHADER:Int = 0x8DD9; + public static final GL_MAX_GEOMETRY_UNIFORM_COMPONENTS:Int = 0x8DDF; + public static final GL_MAX_GEOMETRY_OUTPUT_VERTICES:Int = 0x8DE0; + public static final GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:Int = 0x8DE1; + public static final GL_ACTIVE_SUBROUTINES:Int = 0x8DE5; + public static final GL_ACTIVE_SUBROUTINE_UNIFORMS:Int = 0x8DE6; + public static final GL_MAX_SUBROUTINES:Int = 0x8DE7; + public static final GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS:Int = 0x8DE8; + public static final GL_LOW_FLOAT:Int = 0x8DF0; + public static final GL_MEDIUM_FLOAT:Int = 0x8DF1; + public static final GL_HIGH_FLOAT:Int = 0x8DF2; + public static final GL_LOW_INT:Int = 0x8DF3; + public static final GL_MEDIUM_INT:Int = 0x8DF4; + public static final GL_HIGH_INT:Int = 0x8DF5; + public static final GL_SHADER_BINARY_FORMATS:Int = 0x8DF8; + public static final GL_NUM_SHADER_BINARY_FORMATS:Int = 0x8DF9; + public static final GL_SHADER_COMPILER:Int = 0x8DFA; + public static final GL_MAX_VERTEX_UNIFORM_VECTORS:Int = 0x8DFB; + public static final GL_MAX_VARYING_VECTORS:Int = 0x8DFC; + public static final GL_MAX_FRAGMENT_UNIFORM_VECTORS:Int = 0x8DFD; + public static final GL_QUERY_WAIT:Int = 0x8E13; + public static final GL_QUERY_NO_WAIT:Int = 0x8E14; + public static final GL_QUERY_BY_REGION_WAIT:Int = 0x8E15; + public static final GL_QUERY_BY_REGION_NO_WAIT:Int = 0x8E16; + public static final GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS:Int = 0x8E1E; + public static final GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS:Int = 0x8E1F; + public static final GL_TRANSFORM_FEEDBACK:Int = 0x8E22; + public static final GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED:Int = 0x8E23; + public static final GL_TRANSFORM_FEEDBACK_PAUSED:Int = 0x8E23; + public static final GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE:Int = 0x8E24; + public static final GL_TRANSFORM_FEEDBACK_ACTIVE:Int = 0x8E24; + public static final GL_TRANSFORM_FEEDBACK_BINDING:Int = 0x8E25; + public static final GL_TIMESTAMP:Int = 0x8E28; + public static final GL_TEXTURE_SWIZZLE_R:Int = 0x8E42; + public static final GL_TEXTURE_SWIZZLE_G:Int = 0x8E43; + public static final GL_TEXTURE_SWIZZLE_B:Int = 0x8E44; + public static final GL_TEXTURE_SWIZZLE_A:Int = 0x8E45; + public static final GL_TEXTURE_SWIZZLE_RGBA:Int = 0x8E46; + public static final GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS:Int = 0x8E47; + public static final GL_ACTIVE_SUBROUTINE_MAX_LENGTH:Int = 0x8E48; + public static final GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH:Int = 0x8E49; + public static final GL_NUM_COMPATIBLE_SUBROUTINES:Int = 0x8E4A; + public static final GL_COMPATIBLE_SUBROUTINES:Int = 0x8E4B; + public static final GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:Int = 0x8E4C; + public static final GL_FIRST_VERTEX_CONVENTION:Int = 0x8E4D; + public static final GL_LAST_VERTEX_CONVENTION:Int = 0x8E4E; + public static final GL_PROVOKING_VERTEX:Int = 0x8E4F; + public static final GL_SAMPLE_POSITION:Int = 0x8E50; + public static final GL_SAMPLE_MASK:Int = 0x8E51; + public static final GL_SAMPLE_MASK_VALUE:Int = 0x8E52; + public static final GL_MAX_SAMPLE_MASK_WORDS:Int = 0x8E59; + public static final GL_MAX_GEOMETRY_SHADER_INVOCATIONS:Int = 0x8E5A; + public static final GL_MIN_FRAGMENT_INTERPOLATION_OFFSET:Int = 0x8E5B; + public static final GL_MAX_FRAGMENT_INTERPOLATION_OFFSET:Int = 0x8E5C; + public static final GL_FRAGMENT_INTERPOLATION_OFFSET_BITS:Int = 0x8E5D; + public static final GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET:Int = 0x8E5E; + public static final GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET:Int = 0x8E5F; + public static final GL_MAX_TRANSFORM_FEEDBACK_BUFFERS:Int = 0x8E70; + public static final GL_MAX_VERTEX_STREAMS:Int = 0x8E71; + public static final GL_PATCH_VERTICES:Int = 0x8E72; + public static final GL_PATCH_DEFAULT_INNER_LEVEL:Int = 0x8E73; + public static final GL_PATCH_DEFAULT_OUTER_LEVEL:Int = 0x8E74; + public static final GL_TESS_CONTROL_OUTPUT_VERTICES:Int = 0x8E75; + public static final GL_TESS_GEN_MODE:Int = 0x8E76; + public static final GL_TESS_GEN_SPACING:Int = 0x8E77; + public static final GL_TESS_GEN_VERTEX_ORDER:Int = 0x8E78; + public static final GL_TESS_GEN_POINT_MODE:Int = 0x8E79; + public static final GL_ISOLINES:Int = 0x8E7A; + public static final GL_FRACTIONAL_ODD:Int = 0x8E7B; + public static final GL_FRACTIONAL_EVEN:Int = 0x8E7C; + public static final GL_MAX_PATCH_VERTICES:Int = 0x8E7D; + public static final GL_MAX_TESS_GEN_LEVEL:Int = 0x8E7E; + public static final GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS:Int = 0x8E7F; + public static final GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS:Int = 0x8E80; + public static final GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS:Int = 0x8E81; + public static final GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS:Int = 0x8E82; + public static final GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS:Int = 0x8E83; + public static final GL_MAX_TESS_PATCH_COMPONENTS:Int = 0x8E84; + public static final GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS:Int = 0x8E85; + public static final GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS:Int = 0x8E86; + public static final GL_TESS_EVALUATION_SHADER:Int = 0x8E87; + public static final GL_TESS_CONTROL_SHADER:Int = 0x8E88; + public static final GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS:Int = 0x8E89; + public static final GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS:Int = 0x8E8A; + public static final GL_COMPRESSED_RGBA_BPTC_UNORM:Int = 0x8E8C; + public static final GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM:Int = 0x8E8D; + public static final GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT:Int = 0x8E8E; + public static final GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:Int = 0x8E8F; + public static final GL_COPY_READ_BUFFER:Int = 0x8F36; + public static final GL_COPY_READ_BUFFER_BINDING:Int = 0x8F36; + public static final GL_COPY_WRITE_BUFFER:Int = 0x8F37; + public static final GL_COPY_WRITE_BUFFER_BINDING:Int = 0x8F37; + public static final GL_MAX_IMAGE_UNITS:Int = 0x8F38; + public static final GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS:Int = 0x8F39; + public static final GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:Int = 0x8F39; + public static final GL_IMAGE_BINDING_NAME:Int = 0x8F3A; + public static final GL_IMAGE_BINDING_LEVEL:Int = 0x8F3B; + public static final GL_IMAGE_BINDING_LAYERED:Int = 0x8F3C; + public static final GL_IMAGE_BINDING_LAYER:Int = 0x8F3D; + public static final GL_IMAGE_BINDING_ACCESS:Int = 0x8F3E; + public static final GL_DRAW_INDIRECT_BUFFER:Int = 0x8F3F; + public static final GL_DRAW_INDIRECT_BUFFER_BINDING:Int = 0x8F43; + public static final GL_DOUBLE_MAT2:Int = 0x8F46; + public static final GL_DOUBLE_MAT3:Int = 0x8F47; + public static final GL_DOUBLE_MAT4:Int = 0x8F48; + public static final GL_DOUBLE_MAT2x3:Int = 0x8F49; + public static final GL_DOUBLE_MAT2x4:Int = 0x8F4A; + public static final GL_DOUBLE_MAT3x2:Int = 0x8F4B; + public static final GL_DOUBLE_MAT3x4:Int = 0x8F4C; + public static final GL_DOUBLE_MAT4x2:Int = 0x8F4D; + public static final GL_DOUBLE_MAT4x3:Int = 0x8F4E; + public static final GL_VERTEX_BINDING_BUFFER:Int = 0x8F4F; + public static final GL_R8_SNORM:Int = 0x8F94; + public static final GL_RG8_SNORM:Int = 0x8F95; + public static final GL_RGB8_SNORM:Int = 0x8F96; + public static final GL_RGBA8_SNORM:Int = 0x8F97; + public static final GL_R16_SNORM:Int = 0x8F98; + public static final GL_RG16_SNORM:Int = 0x8F99; + public static final GL_RGB16_SNORM:Int = 0x8F9A; + public static final GL_RGBA16_SNORM:Int = 0x8F9B; + public static final GL_SIGNED_NORMALIZED:Int = 0x8F9C; + public static final GL_PRIMITIVE_RESTART:Int = 0x8F9D; + public static final GL_PRIMITIVE_RESTART_INDEX:Int = 0x8F9E; + public static final GL_DOUBLE_VEC2:Int = 0x8FFC; + public static final GL_DOUBLE_VEC3:Int = 0x8FFD; + public static final GL_DOUBLE_VEC4:Int = 0x8FFE; + public static final GL_TEXTURE_CUBE_MAP_ARRAY:Int = 0x9009; + public static final GL_TEXTURE_BINDING_CUBE_MAP_ARRAY:Int = 0x900A; + public static final GL_PROXY_TEXTURE_CUBE_MAP_ARRAY:Int = 0x900B; + public static final GL_SAMPLER_CUBE_MAP_ARRAY:Int = 0x900C; + public static final GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW:Int = 0x900D; + public static final GL_INT_SAMPLER_CUBE_MAP_ARRAY:Int = 0x900E; + public static final GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY:Int = 0x900F; + public static final GL_IMAGE_1D:Int = 0x904C; + public static final GL_IMAGE_2D:Int = 0x904D; + public static final GL_IMAGE_3D:Int = 0x904E; + public static final GL_IMAGE_2D_RECT:Int = 0x904F; + public static final GL_IMAGE_CUBE:Int = 0x9050; + public static final GL_IMAGE_BUFFER:Int = 0x9051; + public static final GL_IMAGE_1D_ARRAY:Int = 0x9052; + public static final GL_IMAGE_2D_ARRAY:Int = 0x9053; + public static final GL_IMAGE_CUBE_MAP_ARRAY:Int = 0x9054; + public static final GL_IMAGE_2D_MULTISAMPLE:Int = 0x9055; + public static final GL_IMAGE_2D_MULTISAMPLE_ARRAY:Int = 0x9056; + public static final GL_INT_IMAGE_1D:Int = 0x9057; + public static final GL_INT_IMAGE_2D:Int = 0x9058; + public static final GL_INT_IMAGE_3D:Int = 0x9059; + public static final GL_INT_IMAGE_2D_RECT:Int = 0x905A; + public static final GL_INT_IMAGE_CUBE:Int = 0x905B; + public static final GL_INT_IMAGE_BUFFER:Int = 0x905C; + public static final GL_INT_IMAGE_1D_ARRAY:Int = 0x905D; + public static final GL_INT_IMAGE_2D_ARRAY:Int = 0x905E; + public static final GL_INT_IMAGE_CUBE_MAP_ARRAY:Int = 0x905F; + public static final GL_INT_IMAGE_2D_MULTISAMPLE:Int = 0x9060; + public static final GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY:Int = 0x9061; + public static final GL_UNSIGNED_INT_IMAGE_1D:Int = 0x9062; + public static final GL_UNSIGNED_INT_IMAGE_2D:Int = 0x9063; + public static final GL_UNSIGNED_INT_IMAGE_3D:Int = 0x9064; + public static final GL_UNSIGNED_INT_IMAGE_2D_RECT:Int = 0x9065; + public static final GL_UNSIGNED_INT_IMAGE_CUBE:Int = 0x9066; + public static final GL_UNSIGNED_INT_IMAGE_BUFFER:Int = 0x9067; + public static final GL_UNSIGNED_INT_IMAGE_1D_ARRAY:Int = 0x9068; + public static final GL_UNSIGNED_INT_IMAGE_2D_ARRAY:Int = 0x9069; + public static final GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY:Int = 0x906A; + public static final GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE:Int = 0x906B; + public static final GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY:Int = 0x906C; + public static final GL_MAX_IMAGE_SAMPLES:Int = 0x906D; + public static final GL_IMAGE_BINDING_FORMAT:Int = 0x906E; + public static final GL_RGB10_A2UI:Int = 0x906F; + public static final GL_MIN_MAP_BUFFER_ALIGNMENT:Int = 0x90BC; + public static final GL_IMAGE_FORMAT_COMPATIBILITY_TYPE:Int = 0x90C7; + public static final GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE:Int = 0x90C8; + public static final GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS:Int = 0x90C9; + public static final GL_MAX_VERTEX_IMAGE_UNIFORMS:Int = 0x90CA; + public static final GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS:Int = 0x90CB; + public static final GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS:Int = 0x90CC; + public static final GL_MAX_GEOMETRY_IMAGE_UNIFORMS:Int = 0x90CD; + public static final GL_MAX_FRAGMENT_IMAGE_UNIFORMS:Int = 0x90CE; + public static final GL_MAX_COMBINED_IMAGE_UNIFORMS:Int = 0x90CF; + public static final GL_SHADER_STORAGE_BUFFER:Int = 0x90D2; + public static final GL_SHADER_STORAGE_BUFFER_BINDING:Int = 0x90D3; + public static final GL_SHADER_STORAGE_BUFFER_START:Int = 0x90D4; + public static final GL_SHADER_STORAGE_BUFFER_SIZE:Int = 0x90D5; + public static final GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS:Int = 0x90D6; + public static final GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS:Int = 0x90D7; + public static final GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS:Int = 0x90D8; + public static final GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS:Int = 0x90D9; + public static final GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS:Int = 0x90DA; + public static final GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS:Int = 0x90DB; + public static final GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS:Int = 0x90DC; + public static final GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS:Int = 0x90DD; + public static final GL_MAX_SHADER_STORAGE_BLOCK_SIZE:Int = 0x90DE; + public static final GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT:Int = 0x90DF; + public static final GL_DEPTH_STENCIL_TEXTURE_MODE:Int = 0x90EA; + public static final GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS:Int = 0x90EB; + public static final GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER:Int = 0x90EC; + public static final GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER:Int = 0x90ED; + public static final GL_DISPATCH_INDIRECT_BUFFER:Int = 0x90EE; + public static final GL_DISPATCH_INDIRECT_BUFFER_BINDING:Int = 0x90EF; + public static final GL_TEXTURE_2D_MULTISAMPLE:Int = 0x9100; + public static final GL_PROXY_TEXTURE_2D_MULTISAMPLE:Int = 0x9101; + public static final GL_TEXTURE_2D_MULTISAMPLE_ARRAY:Int = 0x9102; + public static final GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY:Int = 0x9103; + public static final GL_TEXTURE_BINDING_2D_MULTISAMPLE:Int = 0x9104; + public static final GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY:Int = 0x9105; + public static final GL_TEXTURE_SAMPLES:Int = 0x9106; + public static final GL_TEXTURE_FIXED_SAMPLE_LOCATIONS:Int = 0x9107; + public static final GL_SAMPLER_2D_MULTISAMPLE:Int = 0x9108; + public static final GL_INT_SAMPLER_2D_MULTISAMPLE:Int = 0x9109; + public static final GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE:Int = 0x910A; + public static final GL_SAMPLER_2D_MULTISAMPLE_ARRAY:Int = 0x910B; + public static final GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY:Int = 0x910C; + public static final GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY:Int = 0x910D; + public static final GL_MAX_COLOR_TEXTURE_SAMPLES:Int = 0x910E; + public static final GL_MAX_DEPTH_TEXTURE_SAMPLES:Int = 0x910F; + public static final GL_MAX_INTEGER_SAMPLES:Int = 0x9110; + public static final GL_MAX_SERVER_WAIT_TIMEOUT:Int = 0x9111; + public static final GL_OBJECT_TYPE:Int = 0x9112; + public static final GL_SYNC_CONDITION:Int = 0x9113; + public static final GL_SYNC_STATUS:Int = 0x9114; + public static final GL_SYNC_FLAGS:Int = 0x9115; + public static final GL_SYNC_FENCE:Int = 0x9116; + public static final GL_SYNC_GPU_COMMANDS_COMPLETE:Int = 0x9117; + public static final GL_UNSIGNALED:Int = 0x9118; + public static final GL_SIGNALED:Int = 0x9119; + public static final GL_ALREADY_SIGNALED:Int = 0x911A; + public static final GL_TIMEOUT_EXPIRED:Int = 0x911B; + public static final GL_CONDITION_SATISFIED:Int = 0x911C; + public static final GL_WAIT_FAILED:Int = 0x911D; + public static final GL_BUFFER_ACCESS_FLAGS:Int = 0x911F; + public static final GL_BUFFER_MAP_LENGTH:Int = 0x9120; + public static final GL_BUFFER_MAP_OFFSET:Int = 0x9121; + public static final GL_MAX_VERTEX_OUTPUT_COMPONENTS:Int = 0x9122; + public static final GL_MAX_GEOMETRY_INPUT_COMPONENTS:Int = 0x9123; + public static final GL_MAX_GEOMETRY_OUTPUT_COMPONENTS:Int = 0x9124; + public static final GL_MAX_FRAGMENT_INPUT_COMPONENTS:Int = 0x9125; + public static final GL_CONTEXT_PROFILE_MASK:Int = 0x9126; + public static final GL_UNPACK_COMPRESSED_BLOCK_WIDTH:Int = 0x9127; + public static final GL_UNPACK_COMPRESSED_BLOCK_HEIGHT:Int = 0x9128; + public static final GL_UNPACK_COMPRESSED_BLOCK_DEPTH:Int = 0x9129; + public static final GL_UNPACK_COMPRESSED_BLOCK_SIZE:Int = 0x912A; + public static final GL_PACK_COMPRESSED_BLOCK_WIDTH:Int = 0x912B; + public static final GL_PACK_COMPRESSED_BLOCK_HEIGHT:Int = 0x912C; + public static final GL_PACK_COMPRESSED_BLOCK_DEPTH:Int = 0x912D; + public static final GL_PACK_COMPRESSED_BLOCK_SIZE:Int = 0x912E; + public static final GL_TEXTURE_IMMUTABLE_FORMAT:Int = 0x912F; + public static final GL_MAX_DEBUG_MESSAGE_LENGTH:Int = 0x9143; + public static final GL_MAX_DEBUG_LOGGED_MESSAGES:Int = 0x9144; + public static final GL_DEBUG_LOGGED_MESSAGES:Int = 0x9145; + public static final GL_DEBUG_SEVERITY_HIGH:Int = 0x9146; + public static final GL_DEBUG_SEVERITY_MEDIUM:Int = 0x9147; + public static final GL_DEBUG_SEVERITY_LOW:Int = 0x9148; + public static final GL_QUERY_BUFFER:Int = 0x9192; + public static final GL_QUERY_BUFFER_BINDING:Int = 0x9193; + public static final GL_QUERY_RESULT_NO_WAIT:Int = 0x9194; + public static final GL_TEXTURE_BUFFER_OFFSET:Int = 0x919D; + public static final GL_TEXTURE_BUFFER_SIZE:Int = 0x919E; + public static final GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT:Int = 0x919F; + public static final GL_COMPUTE_SHADER:Int = 0x91B9; + public static final GL_MAX_COMPUTE_UNIFORM_BLOCKS:Int = 0x91BB; + public static final GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS:Int = 0x91BC; + public static final GL_MAX_COMPUTE_IMAGE_UNIFORMS:Int = 0x91BD; + public static final GL_MAX_COMPUTE_WORK_GROUP_COUNT:Int = 0x91BE; + public static final GL_MAX_COMPUTE_WORK_GROUP_SIZE:Int = 0x91BF; + public static final GL_COMPRESSED_R11_EAC:Int = 0x9270; + public static final GL_COMPRESSED_SIGNED_R11_EAC:Int = 0x9271; + public static final GL_COMPRESSED_RG11_EAC:Int = 0x9272; + public static final GL_COMPRESSED_SIGNED_RG11_EAC:Int = 0x9273; + public static final GL_COMPRESSED_RGB8_ETC2:Int = 0x9274; + public static final GL_COMPRESSED_SRGB8_ETC2:Int = 0x9275; + public static final GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:Int = 0x9276; + public static final GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:Int = 0x9277; + public static final GL_COMPRESSED_RGBA8_ETC2_EAC:Int = 0x9278; + public static final GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:Int = 0x9279; + public static final GL_ATOMIC_COUNTER_BUFFER:Int = 0x92C0; + public static final GL_ATOMIC_COUNTER_BUFFER_BINDING:Int = 0x92C1; + public static final GL_ATOMIC_COUNTER_BUFFER_START:Int = 0x92C2; + public static final GL_ATOMIC_COUNTER_BUFFER_SIZE:Int = 0x92C3; + public static final GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE:Int = 0x92C4; + public static final GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS:Int = 0x92C5; + public static final GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES:Int = 0x92C6; + public static final GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER:Int = 0x92C7; + public static final GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER:Int = 0x92C8; + public static final GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER:Int = 0x92C9; + public static final GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER:Int = 0x92CA; + public static final GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER:Int = 0x92CB; + public static final GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS:Int = 0x92CC; + public static final GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS:Int = 0x92CD; + public static final GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS:Int = 0x92CE; + public static final GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS:Int = 0x92CF; + public static final GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS:Int = 0x92D0; + public static final GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS:Int = 0x92D1; + public static final GL_MAX_VERTEX_ATOMIC_COUNTERS:Int = 0x92D2; + public static final GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS:Int = 0x92D3; + public static final GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS:Int = 0x92D4; + public static final GL_MAX_GEOMETRY_ATOMIC_COUNTERS:Int = 0x92D5; + public static final GL_MAX_FRAGMENT_ATOMIC_COUNTERS:Int = 0x92D6; + public static final GL_MAX_COMBINED_ATOMIC_COUNTERS:Int = 0x92D7; + public static final GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE:Int = 0x92D8; + public static final GL_ACTIVE_ATOMIC_COUNTER_BUFFERS:Int = 0x92D9; + public static final GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX:Int = 0x92DA; + public static final GL_UNSIGNED_INT_ATOMIC_COUNTER:Int = 0x92DB; + public static final GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS:Int = 0x92DC; + public static final GL_DEBUG_OUTPUT:Int = 0x92E0; + public static final GL_UNIFORM:Int = 0x92E1; + public static final GL_UNIFORM_BLOCK:Int = 0x92E2; + public static final GL_PROGRAM_INPUT:Int = 0x92E3; + public static final GL_PROGRAM_OUTPUT:Int = 0x92E4; + public static final GL_BUFFER_VARIABLE:Int = 0x92E5; + public static final GL_SHADER_STORAGE_BLOCK:Int = 0x92E6; + public static final GL_IS_PER_PATCH:Int = 0x92E7; + public static final GL_VERTEX_SUBROUTINE:Int = 0x92E8; + public static final GL_TESS_CONTROL_SUBROUTINE:Int = 0x92E9; + public static final GL_TESS_EVALUATION_SUBROUTINE:Int = 0x92EA; + public static final GL_GEOMETRY_SUBROUTINE:Int = 0x92EB; + public static final GL_FRAGMENT_SUBROUTINE:Int = 0x92EC; + public static final GL_COMPUTE_SUBROUTINE:Int = 0x92ED; + public static final GL_VERTEX_SUBROUTINE_UNIFORM:Int = 0x92EE; + public static final GL_TESS_CONTROL_SUBROUTINE_UNIFORM:Int = 0x92EF; + public static final GL_TESS_EVALUATION_SUBROUTINE_UNIFORM:Int = 0x92F0; + public static final GL_GEOMETRY_SUBROUTINE_UNIFORM:Int = 0x92F1; + public static final GL_FRAGMENT_SUBROUTINE_UNIFORM:Int = 0x92F2; + public static final GL_COMPUTE_SUBROUTINE_UNIFORM:Int = 0x92F3; + public static final GL_TRANSFORM_FEEDBACK_VARYING:Int = 0x92F4; + public static final GL_ACTIVE_RESOURCES:Int = 0x92F5; + public static final GL_MAX_NAME_LENGTH:Int = 0x92F6; + public static final GL_MAX_NUM_ACTIVE_VARIABLES:Int = 0x92F7; + public static final GL_MAX_NUM_COMPATIBLE_SUBROUTINES:Int = 0x92F8; + public static final GL_NAME_LENGTH:Int = 0x92F9; + public static final GL_TYPE:Int = 0x92FA; + public static final GL_ARRAY_SIZE:Int = 0x92FB; + public static final GL_OFFSET:Int = 0x92FC; + public static final GL_BLOCK_INDEX:Int = 0x92FD; + public static final GL_ARRAY_STRIDE:Int = 0x92FE; + public static final GL_MATRIX_STRIDE:Int = 0x92FF; + public static final GL_IS_ROW_MAJOR:Int = 0x9300; + public static final GL_ATOMIC_COUNTER_BUFFER_INDEX:Int = 0x9301; + public static final GL_BUFFER_BINDING:Int = 0x9302; + public static final GL_BUFFER_DATA_SIZE:Int = 0x9303; + public static final GL_NUM_ACTIVE_VARIABLES:Int = 0x9304; + public static final GL_ACTIVE_VARIABLES:Int = 0x9305; + public static final GL_REFERENCED_BY_VERTEX_SHADER:Int = 0x9306; + public static final GL_REFERENCED_BY_TESS_CONTROL_SHADER:Int = 0x9307; + public static final GL_REFERENCED_BY_TESS_EVALUATION_SHADER:Int = 0x9308; + public static final GL_REFERENCED_BY_GEOMETRY_SHADER:Int = 0x9309; + public static final GL_REFERENCED_BY_FRAGMENT_SHADER:Int = 0x930A; + public static final GL_REFERENCED_BY_COMPUTE_SHADER:Int = 0x930B; + public static final GL_TOP_LEVEL_ARRAY_SIZE:Int = 0x930C; + public static final GL_TOP_LEVEL_ARRAY_STRIDE:Int = 0x930D; + public static final GL_LOCATION:Int = 0x930E; + public static final GL_LOCATION_INDEX:Int = 0x930F; + public static final GL_FRAMEBUFFER_DEFAULT_WIDTH:Int = 0x9310; + public static final GL_FRAMEBUFFER_DEFAULT_HEIGHT:Int = 0x9311; + public static final GL_FRAMEBUFFER_DEFAULT_LAYERS:Int = 0x9312; + public static final GL_FRAMEBUFFER_DEFAULT_SAMPLES:Int = 0x9313; + public static final GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS:Int = 0x9314; + public static final GL_MAX_FRAMEBUFFER_WIDTH:Int = 0x9315; + public static final GL_MAX_FRAMEBUFFER_HEIGHT:Int = 0x9316; + public static final GL_MAX_FRAMEBUFFER_LAYERS:Int = 0x9317; + public static final GL_MAX_FRAMEBUFFER_SAMPLES:Int = 0x9318; + public static final GL_LOCATION_COMPONENT:Int = 0x934A; + public static final GL_TRANSFORM_FEEDBACK_BUFFER_INDEX:Int = 0x934B; + public static final GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE:Int = 0x934C; + public static final GL_CLEAR_TEXTURE:Int = 0x9365; + public static final GL_NUM_SAMPLE_COUNTS:Int = 0x9380; + + public static function glActiveShaderProgram(pipeline:Int, program:Int):Void {} + public static function glActiveTexture(texture:Int):Void {} + public static function glAttachShader(program:Int, shader:Int):Void {} + public static function glBeginConditionalRender(id:Int, mode:Int):Void {} + public static function glBeginQuery(target:Int, id:Int):Void {} + public static function glBeginQueryIndexed(target:Int, index:Int, id:Int):Void {} + public static function glBeginTransformFeedback(primitiveMode:Int):Void {} + public static function glBindAttribLocation(program:Int, index:Int, name:String):Void {} + public static function glBindBuffer(target:Int, buffer:Int):Void {} + public static function glBindBufferBase(target:Int, index:Int, buffer:Int):Void {} + public static function glBindBufferRange(target:Int, index:Int, buffer:Int, offset:hl.Ref, size:hl.Ref):Void {} + public static function glBindBuffersBase(target:Int, first:Int, count:Int, buffers:hl.Ref):Void {} + public static function glBindBuffersRange(target:Int, first:Int, count:Int, buffers:hl.Ref, offsets:hl.NativeArray>, sizes:hl.NativeArray>):Void {} + public static function glBindFragDataLocation(program:Int, color:Int, name:String):Void {} + public static function glBindFragDataLocationIndexed(program:Int, colorNumber:Int, index:Int, name:String):Void {} + public static function glBindFramebuffer(target:Int, framebuffer:Int):Void {} + public static function glBindImageTexture(unit:Int, texture:Int, level:Int, layered:Int, layer:Int, access:Int, format:Int):Void {} + public static function glBindImageTextures(first:Int, count:Int, textures:hl.Ref):Void {} + public static function glBindProgramPipeline(pipeline:Int):Void {} + public static function glBindRenderbuffer(target:Int, renderbuffer:Int):Void {} + public static function glBindSampler(unit:Int, sampler:Int):Void {} + public static function glBindSamplers(first:Int, count:Int, samplers:hl.Ref):Void {} + public static function glBindTexture(target:Int, texture:Int):Void {} + public static function glBindTextures(first:Int, count:Int, textures:hl.Ref):Void {} + public static function glBindTransformFeedback(target:Int, id:Int):Void {} + public static function glBindVertexArray(array:Int):Void {} + public static function glBindVertexBuffer(bindingindex:Int, buffer:Int, offset:hl.Ref, stride:Int):Void {} + public static function glBindVertexBuffers(first:Int, count:Int, buffers:hl.Ref, offsets:hl.NativeArray>, strides:hl.Ref):Void {} + public static function glBlendColor(red:hl.F32, green:hl.F32, blue:hl.F32, alpha:hl.F32):Void {} + public static function glBlendEquation(mode:Int):Void {} + public static function glBlendEquationSeparate(modeRGB:Int, modeAlpha:Int):Void {} + public static function glBlendEquationSeparatei(buf:Int, modeRGB:Int, modeAlpha:Int):Void {} + public static function glBlendEquationi(buf:Int, mode:Int):Void {} + public static function glBlendFunc(sfactor:Int, dfactor:Int):Void {} + public static function glBlendFuncSeparate(sfactorRGB:Int, dfactorRGB:Int, sfactorAlpha:Int, dfactorAlpha:Int):Void {} + public static function glBlendFuncSeparatei(buf:Int, srcRGB:Int, dstRGB:Int, srcAlpha:Int, dstAlpha:Int):Void {} + public static function glBlendFunci(buf:Int, src:Int, dst:Int):Void {} + public static function glBlitFramebuffer(srcX0:Int, srcY0:Int, srcX1:Int, srcY1:Int, dstX0:Int, dstY0:Int, dstX1:Int, dstY1:Int, mask:Int, filter:Int):Void {} + public static function glBufferData(target:Int, size:hl.Ref, data:hl.Bytes, usage:Int):Void {} + public static function glBufferStorage(target:Int, size:hl.Ref, data:hl.Bytes, flags:Int):Void {} + public static function glBufferSubData(target:Int, offset:hl.Ref, size:hl.Ref, data:hl.Bytes):Void {} + public static function glCheckFramebufferStatus(target:Int):Int { return 0; } + public static function glClampColor(target:Int, clamp:Int):Void {} + public static function glClear(mask:Int):Void {} + public static function glClearBufferData(target:Int, internalformat:Int, format:Int, type:Int, data:hl.Bytes):Void {} + public static function glClearBufferSubData(target:Int, internalformat:Int, offset:hl.Ref, size:hl.Ref, format:Int, type:Int, data:hl.Bytes):Void {} + public static function glClearBufferfi(buffer:Int, drawbuffer:Int, depth:hl.F32, stencil:Int):Void {} + public static function glClearBufferfv(buffer:Int, drawbuffer:Int, value:hl.Ref):Void {} + public static function glClearBufferiv(buffer:Int, drawbuffer:Int, value:hl.Ref):Void {} + public static function glClearBufferuiv(buffer:Int, drawbuffer:Int, value:hl.Ref):Void {} + public static function glClearColor(red:hl.F32, green:hl.F32, blue:hl.F32, alpha:hl.F32):Void {} + public static function glClearDepth(depth:hl.F64):Void {} + public static function glClearDepthf(d:hl.F32):Void {} + public static function glClearStencil(s:Int):Void {} + public static function glClearTexImage(texture:Int, level:Int, format:Int, type:Int, data:hl.Bytes):Void {} + public static function glClearTexSubImage(texture:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, type:Int, data:hl.Bytes):Void {} + public static function glClientWaitSync(sync:hl.Abstract<"GLSync">, flags:Int, timeout:hl.I64):Int { return 0; } + public static function glColorMask(red:Int, green:Int, blue:Int, alpha:Int):Void {} + public static function glColorMaski(index:Int, r:Int, g:Int, b:Int, a:Int):Void {} + public static function glColorP3ui(type:Int, color:Int):Void {} + public static function glColorP3uiv(type:Int, color:hl.Ref):Void {} + public static function glColorP4ui(type:Int, color:Int):Void {} + public static function glColorP4uiv(type:Int, color:hl.Ref):Void {} + public static function glCompileShader(shader:Int):Void {} + public static function glCompressedTexImage1D(target:Int, level:Int, internalformat:Int, width:Int, border:Int, imageSize:Int, data:hl.Bytes):Void {} + public static function glCompressedTexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, imageSize:Int, data:hl.Bytes):Void {} + public static function glCompressedTexImage3D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, imageSize:Int, data:hl.Bytes):Void {} + public static function glCompressedTexSubImage1D(target:Int, level:Int, xoffset:Int, width:Int, format:Int, imageSize:Int, data:hl.Bytes):Void {} + public static function glCompressedTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, imageSize:Int, data:hl.Bytes):Void {} + public static function glCompressedTexSubImage3D(target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, imageSize:Int, data:hl.Bytes):Void {} + public static function glCopyBufferSubData(readTarget:Int, writeTarget:Int, readOffset:hl.Ref, writeOffset:hl.Ref, size:hl.Ref):Void {} + public static function glCopyImageSubData(srcName:Int, srcTarget:Int, srcLevel:Int, srcX:Int, srcY:Int, srcZ:Int, dstName:Int, dstTarget:Int, dstLevel:Int, dstX:Int, dstY:Int, dstZ:Int, srcWidth:Int, srcHeight:Int, srcDepth:Int):Void {} + public static function glCopyTexImage1D(target:Int, level:Int, internalformat:Int, x:Int, y:Int, width:Int, border:Int):Void {} + public static function glCopyTexImage2D(target:Int, level:Int, internalformat:Int, x:Int, y:Int, width:Int, height:Int, border:Int):Void {} + public static function glCopyTexSubImage1D(target:Int, level:Int, xoffset:Int, x:Int, y:Int, width:Int):Void {} + public static function glCopyTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, x:Int, y:Int, width:Int, height:Int):Void {} + public static function glCopyTexSubImage3D(target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, x:Int, y:Int, width:Int, height:Int):Void {} + public static function glCreateProgram():Int { return 0; } + public static function glCreateShader(type:Int):Int { return 0; } + public static function glCreateShaderProgramv(type:Int, count:Int, strings:hl.NativeArray):Int { return 0; } + public static function glCullFace(mode:Int):Void {} + public static function glDebugMessageCallback(callback:(Int->Int->Int->Int->Int->hl.Bytes), userParam:hl.Bytes):Void {} + public static function glDebugMessageControl(source:Int, type:Int, severity:Int, count:Int, ids:hl.Ref, enabled:Int):Void {} + public static function glDebugMessageInsert(source:Int, type:Int, id:Int, severity:Int, length:Int, buf:String):Void {} + public static function glDeleteBuffers(n:Int, buffers:hl.Ref):Void {} + public static function glDeleteFramebuffers(n:Int, framebuffers:hl.Ref):Void {} + public static function glDeleteProgram(program:Int):Void {} + public static function glDeleteProgramPipelines(n:Int, pipelines:hl.Ref):Void {} + public static function glDeleteQueries(n:Int, ids:hl.Ref):Void {} + public static function glDeleteRenderbuffers(n:Int, renderbuffers:hl.Ref):Void {} + public static function glDeleteSamplers(count:Int, samplers:hl.Ref):Void {} + public static function glDeleteShader(shader:Int):Void {} + public static function glDeleteSync(sync:hl.Abstract<"GLSync">):Void {} + public static function glDeleteTextures(n:Int, textures:hl.Ref):Void {} + public static function glDeleteTransformFeedbacks(n:Int, ids:hl.Ref):Void {} + public static function glDeleteVertexArrays(n:Int, arrays:hl.Ref):Void {} + public static function glDepthFunc(func:Int):Void {} + public static function glDepthMask(flag:Int):Void {} + public static function glDepthRange(n:hl.F64, f:hl.F64):Void {} + public static function glDepthRangeArrayv(first:Int, count:Int, v:hl.Ref):Void {} + public static function glDepthRangeIndexed(index:Int, n:hl.F64, f:hl.F64):Void {} + public static function glDepthRangef(n:hl.F32, f:hl.F32):Void {} + public static function glDetachShader(program:Int, shader:Int):Void {} + public static function glDisable(cap:Int):Void {} + public static function glDisableVertexAttribArray(index:Int):Void {} + public static function glDisablei(target:Int, index:Int):Void {} + public static function glDispatchCompute(num_groups_x:Int, num_groups_y:Int, num_groups_z:Int):Void {} + public static function glDispatchComputeIndirect(indirect:hl.Ref):Void {} + public static function glDrawArrays(mode:Int, first:Int, count:Int):Void {} + public static function glDrawArraysIndirect(mode:Int, indirect:hl.Bytes):Void {} + public static function glDrawArraysInstanced(mode:Int, first:Int, count:Int, instancecount:Int):Void {} + public static function glDrawArraysInstancedBaseInstance(mode:Int, first:Int, count:Int, instancecount:Int, baseinstance:Int):Void {} + public static function glDrawBuffer(buf:Int):Void {} + public static function glDrawBuffers(n:Int, bufs:hl.Ref):Void {} + public static function glDrawElements(mode:Int, count:Int, type:Int, indices:hl.Bytes):Void {} + public static function glDrawElementsBaseVertex(mode:Int, count:Int, type:Int, indices:hl.Bytes, basevertex:Int):Void {} + public static function glDrawElementsIndirect(mode:Int, type:Int, indirect:hl.Bytes):Void {} + public static function glDrawElementsInstanced(mode:Int, count:Int, type:Int, indices:hl.Bytes, instancecount:Int):Void {} + public static function glDrawElementsInstancedBaseInstance(mode:Int, count:Int, type:Int, indices:hl.Bytes, instancecount:Int, baseinstance:Int):Void {} + public static function glDrawElementsInstancedBaseVertex(mode:Int, count:Int, type:Int, indices:hl.Bytes, instancecount:Int, basevertex:Int):Void {} + public static function glDrawElementsInstancedBaseVertexBaseInstance(mode:Int, count:Int, type:Int, indices:hl.Bytes, instancecount:Int, basevertex:Int, baseinstance:Int):Void {} + public static function glDrawRangeElements(mode:Int, start:Int, end:Int, count:Int, type:Int, indices:hl.Bytes):Void {} + public static function glDrawRangeElementsBaseVertex(mode:Int, start:Int, end:Int, count:Int, type:Int, indices:hl.Bytes, basevertex:Int):Void {} + public static function glDrawTransformFeedback(mode:Int, id:Int):Void {} + public static function glDrawTransformFeedbackInstanced(mode:Int, id:Int, instancecount:Int):Void {} + public static function glDrawTransformFeedbackStream(mode:Int, id:Int, stream:Int):Void {} + public static function glDrawTransformFeedbackStreamInstanced(mode:Int, id:Int, stream:Int, instancecount:Int):Void {} + public static function glEnable(cap:Int):Void {} + public static function glEnableVertexAttribArray(index:Int):Void {} + public static function glEnablei(target:Int, index:Int):Void {} + public static function glEndConditionalRender():Void {} + public static function glEndQuery(target:Int):Void {} + public static function glEndQueryIndexed(target:Int, index:Int):Void {} + public static function glEndTransformFeedback():Void {} + public static function glFenceSync(condition:Int, flags:Int):hl.Abstract<"GLSync"> { return null; } + public static function glFinish():Void {} + public static function glFlush():Void {} + public static function glFlushMappedBufferRange(target:Int, offset:hl.Ref, length:hl.Ref):Void {} + public static function glFramebufferParameteri(target:Int, pname:Int, param:Int):Void {} + public static function glFramebufferRenderbuffer(target:Int, attachment:Int, renderbuffertarget:Int, renderbuffer:Int):Void {} + public static function glFramebufferTexture(target:Int, attachment:Int, texture:Int, level:Int):Void {} + public static function glFramebufferTexture1D(target:Int, attachment:Int, textarget:Int, texture:Int, level:Int):Void {} + public static function glFramebufferTexture2D(target:Int, attachment:Int, textarget:Int, texture:Int, level:Int):Void {} + public static function glFramebufferTexture3D(target:Int, attachment:Int, textarget:Int, texture:Int, level:Int, zoffset:Int):Void {} + public static function glFramebufferTextureLayer(target:Int, attachment:Int, texture:Int, level:Int, layer:Int):Void {} + public static function glFrontFace(mode:Int):Void {} + public static function glGenBuffers(n:Int, buffers:hl.Ref):Void {} + public static function glGenFramebuffers(n:Int, framebuffers:hl.Ref):Void {} + public static function glGenProgramPipelines(n:Int, pipelines:hl.Ref):Void {} + public static function glGenQueries(n:Int, ids:hl.Ref):Void {} + public static function glGenRenderbuffers(n:Int, renderbuffers:hl.Ref):Void {} + public static function glGenSamplers(count:Int, samplers:hl.Ref):Void {} + public static function glGenTextures(n:Int, textures:hl.Ref):Void {} + public static function glGenTransformFeedbacks(n:Int, ids:hl.Ref):Void {} + public static function glGenVertexArrays(n:Int, arrays:hl.Ref):Void {} + public static function glGenerateMipmap(target:Int):Void {} + public static function glGetActiveAtomicCounterBufferiv(program:Int, bufferIndex:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetActiveAttrib(program:Int, index:Int, bufSize:Int, length:hl.Ref, size:hl.Ref, type:hl.Ref, name:String):Void {} + public static function glGetActiveSubroutineName(program:Int, shadertype:Int, index:Int, bufSize:Int, length:hl.Ref, name:String):Void {} + public static function glGetActiveSubroutineUniformName(program:Int, shadertype:Int, index:Int, bufSize:Int, length:hl.Ref, name:String):Void {} + public static function glGetActiveSubroutineUniformiv(program:Int, shadertype:Int, index:Int, pname:Int, values:hl.Ref):Void {} + public static function glGetActiveUniform(program:Int, index:Int, bufSize:Int, length:hl.Ref, size:hl.Ref, type:hl.Ref, name:String):Void {} + public static function glGetActiveUniformBlockName(program:Int, uniformBlockIndex:Int, bufSize:Int, length:hl.Ref, uniformBlockName:String):Void {} + public static function glGetActiveUniformBlockiv(program:Int, uniformBlockIndex:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetActiveUniformName(program:Int, uniformIndex:Int, bufSize:Int, length:hl.Ref, uniformName:String):Void {} + public static function glGetActiveUniformsiv(program:Int, uniformCount:Int, uniformIndices:hl.Ref, pname:Int, params:hl.Ref):Void {} + public static function glGetAttachedShaders(program:Int, maxCount:Int, count:hl.Ref, shaders:hl.Ref):Void {} + public static function glGetAttribLocation(program:Int, name:String):Int { return 0; } + public static function glGetBooleani_v(target:Int, index:Int, data:hl.Ref):Void {} + public static function glGetBooleanv(pname:Int, data:hl.Ref):Void {} + public static function glGetBufferParameteri64v(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetBufferParameteriv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetBufferPointerv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetBufferSubData(target:Int, offset:hl.Ref, size:hl.Ref, data:hl.Bytes):Void {} + public static function glGetCompressedTexImage(target:Int, level:Int, img:hl.Bytes):Void {} + public static function glGetDebugMessageLog(count:Int, bufSize:Int, sources:hl.Ref, types:hl.Ref, ids:hl.Ref, severities:hl.Ref, lengths:hl.Ref, messageLog:String):Int { return 0; } + public static function glGetDoublei_v(target:Int, index:Int, data:hl.Ref):Void {} + public static function glGetDoublev(pname:Int, data:hl.Ref):Void {} + public static function glGetError():Int { return 0; } + public static function glGetFloati_v(target:Int, index:Int, data:hl.Ref):Void {} + public static function glGetFloatv(pname:Int, data:hl.Ref):Void {} + public static function glGetFragDataIndex(program:Int, name:String):Int { return 0; } + public static function glGetFragDataLocation(program:Int, name:String):Int { return 0; } + public static function glGetFramebufferAttachmentParameteriv(target:Int, attachment:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetFramebufferParameteriv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetInteger64i_v(target:Int, index:Int, data:hl.Ref):Void {} + public static function glGetInteger64v(pname:Int, data:hl.Ref):Void {} + public static function glGetIntegeri_v(target:Int, index:Int, data:hl.Ref):Void {} + public static function glGetIntegerv(pname:Int, data:hl.Ref):Void {} + public static function glGetInternalformati64v(target:Int, internalformat:Int, pname:Int, count:Int, params:hl.Ref):Void {} + public static function glGetInternalformativ(target:Int, internalformat:Int, pname:Int, count:Int, params:hl.Ref):Void {} + public static function glGetMultisamplefv(pname:Int, index:Int, val:hl.Ref):Void {} + public static function glGetObjectLabel(identifier:Int, name:Int, bufSize:Int, length:hl.Ref, label:String):Void {} + public static function glGetObjectPtrLabel(ptr:hl.Bytes, bufSize:Int, length:hl.Ref, label:String):Void {} + public static function glGetPointerv(pname:Int, params:hl.Ref):Void {} + public static function glGetProgramBinary(program:Int, bufSize:Int, length:hl.Ref, binaryFormat:hl.Ref, binary:hl.Bytes):Void {} + public static function glGetProgramInfoLog(program:Int, bufSize:Int, length:hl.Ref, infoLog:String):Void {} + public static function glGetProgramInterfaceiv(program:Int, programInterface:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetProgramPipelineInfoLog(pipeline:Int, bufSize:Int, length:hl.Ref, infoLog:String):Void {} + public static function glGetProgramPipelineiv(pipeline:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetProgramResourceIndex(program:Int, programInterface:Int, name:String):Int { return 0; } + public static function glGetProgramResourceLocation(program:Int, programInterface:Int, name:String):Int { return 0; } + public static function glGetProgramResourceLocationIndex(program:Int, programInterface:Int, name:String):Int { return 0; } + public static function glGetProgramResourceName(program:Int, programInterface:Int, index:Int, bufSize:Int, length:hl.Ref, name:String):Void {} + public static function glGetProgramResourceiv(program:Int, programInterface:Int, index:Int, propCount:Int, props:hl.Ref, count:Int, length:hl.Ref, params:hl.Ref):Void {} + public static function glGetProgramStageiv(program:Int, shadertype:Int, pname:Int, values:hl.Ref):Void {} + public static function glGetProgramiv(program:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetQueryIndexediv(target:Int, index:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetQueryObjecti64v(id:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetQueryObjectiv(id:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetQueryObjectui64v(id:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetQueryObjectuiv(id:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetQueryiv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetRenderbufferParameteriv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetSamplerParameterIiv(sampler:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetSamplerParameterIuiv(sampler:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetSamplerParameterfv(sampler:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetSamplerParameteriv(sampler:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetShaderInfoLog(shader:Int, bufSize:Int, length:hl.Ref, infoLog:String):Void {} + public static function glGetShaderPrecisionFormat(shadertype:Int, precisiontype:Int, range:hl.Ref, precision:hl.Ref):Void {} + public static function glGetShaderSource(shader:Int, bufSize:Int, length:hl.Ref, source:String):Void {} + public static function glGetShaderiv(shader:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetString(name:Int):String { return ''; } + public static function glGetStringi(name:Int, index:Int):String { return ''; } + public static function glGetSubroutineIndex(program:Int, shadertype:Int, name:String):Int { return 0; } + public static function glGetSubroutineUniformLocation(program:Int, shadertype:Int, name:String):Int { return 0; } + public static function glGetSynciv(sync:hl.Abstract<"GLSync">, pname:Int, count:Int, length:hl.Ref, values:hl.Ref):Void {} + public static function glGetTexImage(target:Int, level:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} + public static function glGetTexLevelParameterfv(target:Int, level:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetTexLevelParameteriv(target:Int, level:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetTexParameterIiv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetTexParameterIuiv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetTexParameterfv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetTexParameteriv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetTransformFeedbackVarying(program:Int, index:Int, bufSize:Int, length:hl.Ref, size:hl.Ref, type:hl.Ref, name:String):Void {} + public static function glGetUniformBlockIndex(program:Int, uniformBlockName:String):Int { return 0; } + public static function glGetUniformIndices(program:Int, uniformCount:Int, uniformNames:hl.NativeArray, uniformIndices:hl.Ref):Void {} + public static function glGetUniformLocation(program:Int, name:String):Int { return 0; } + public static function glGetUniformSubroutineuiv(shadertype:Int, location:Int, params:hl.Ref):Void {} + public static function glGetUniformdv(program:Int, location:Int, params:hl.Ref):Void {} + public static function glGetUniformfv(program:Int, location:Int, params:hl.Ref):Void {} + public static function glGetUniformiv(program:Int, location:Int, params:hl.Ref):Void {} + public static function glGetUniformuiv(program:Int, location:Int, params:hl.Ref):Void {} + public static function glGetVertexAttribIiv(index:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetVertexAttribIuiv(index:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetVertexAttribLdv(index:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetVertexAttribPointerv(index:Int, pname:Int, pointer:hl.Ref):Void {} + public static function glGetVertexAttribdv(index:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetVertexAttribfv(index:Int, pname:Int, params:hl.Ref):Void {} + public static function glGetVertexAttribiv(index:Int, pname:Int, params:hl.Ref):Void {} + public static function glHint(target:Int, mode:Int):Void {} + public static function glInvalidateBufferData(buffer:Int):Void {} + public static function glInvalidateBufferSubData(buffer:Int, offset:hl.Ref, length:hl.Ref):Void {} + public static function glInvalidateFramebuffer(target:Int, numAttachments:Int, attachments:hl.Ref):Void {} + public static function glInvalidateSubFramebuffer(target:Int, numAttachments:Int, attachments:hl.Ref, x:Int, y:Int, width:Int, height:Int):Void {} + public static function glInvalidateTexImage(texture:Int, level:Int):Void {} + public static function glInvalidateTexSubImage(texture:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int):Void {} + public static function glIsBuffer(buffer:Int):Int { return 0; } + public static function glIsEnabled(cap:Int):Int { return 0; } + public static function glIsEnabledi(target:Int, index:Int):Int { return 0; } + public static function glIsFramebuffer(framebuffer:Int):Int { return 0; } + public static function glIsProgram(program:Int):Int { return 0; } + public static function glIsProgramPipeline(pipeline:Int):Int { return 0; } + public static function glIsQuery(id:Int):Int { return 0; } + public static function glIsRenderbuffer(renderbuffer:Int):Int { return 0; } + public static function glIsSampler(sampler:Int):Int { return 0; } + public static function glIsShader(shader:Int):Int { return 0; } + public static function glIsSync(sync:hl.Abstract<"GLSync">):Int { return 0; } + public static function glIsTexture(texture:Int):Int { return 0; } + public static function glIsTransformFeedback(id:Int):Int { return 0; } + public static function glIsVertexArray(array:Int):Int { return 0; } + public static function glLineWidth(width:hl.F32):Void {} + public static function glLinkProgram(program:Int):Void {} + public static function glLogicOp(opcode:Int):Void {} + public static function glMapBuffer(target:Int, access:Int):hl.Bytes { return null; } + public static function glMapBufferRange(target:Int, offset:hl.Ref, length:hl.Ref, access:Int):hl.Bytes { return null; } + public static function glMemoryBarrier(barriers:Int):Void {} + public static function glMinSampleShading(value:hl.F32):Void {} + public static function glMultiDrawArrays(mode:Int, first:hl.Ref, count:hl.Ref, drawcount:Int):Void {} + public static function glMultiDrawArraysIndirect(mode:Int, indirect:hl.Bytes, drawcount:Int, stride:Int):Void {} + public static function glMultiDrawElements(mode:Int, count:hl.Ref, type:Int, indices:hl.Ref, drawcount:Int):Void {} + public static function glMultiDrawElementsBaseVertex(mode:Int, count:hl.Ref, type:Int, indices:hl.Ref, drawcount:Int, basevertex:hl.Ref):Void {} + public static function glMultiDrawElementsIndirect(mode:Int, type:Int, indirect:hl.Bytes, drawcount:Int, stride:Int):Void {} + public static function glMultiTexCoordP1ui(texture:Int, type:Int, coords:Int):Void {} + public static function glMultiTexCoordP1uiv(texture:Int, type:Int, coords:hl.Ref):Void {} + public static function glMultiTexCoordP2ui(texture:Int, type:Int, coords:Int):Void {} + public static function glMultiTexCoordP2uiv(texture:Int, type:Int, coords:hl.Ref):Void {} + public static function glMultiTexCoordP3ui(texture:Int, type:Int, coords:Int):Void {} + public static function glMultiTexCoordP3uiv(texture:Int, type:Int, coords:hl.Ref):Void {} + public static function glMultiTexCoordP4ui(texture:Int, type:Int, coords:Int):Void {} + public static function glMultiTexCoordP4uiv(texture:Int, type:Int, coords:hl.Ref):Void {} + public static function glNormalP3ui(type:Int, coords:Int):Void {} + public static function glNormalP3uiv(type:Int, coords:hl.Ref):Void {} + public static function glObjectLabel(identifier:Int, name:Int, length:Int, label:String):Void {} + public static function glObjectPtrLabel(ptr:hl.Bytes, length:Int, label:String):Void {} + public static function glPatchParameterfv(pname:Int, values:hl.Ref):Void {} + public static function glPatchParameteri(pname:Int, value:Int):Void {} + public static function glPauseTransformFeedback():Void {} + public static function glPixelStoref(pname:Int, param:hl.F32):Void {} + public static function glPixelStorei(pname:Int, param:Int):Void {} + public static function glPointParameterf(pname:Int, param:hl.F32):Void {} + public static function glPointParameterfv(pname:Int, params:hl.Ref):Void {} + public static function glPointParameteri(pname:Int, param:Int):Void {} + public static function glPointParameteriv(pname:Int, params:hl.Ref):Void {} + public static function glPointSize(size:hl.F32):Void {} + public static function glPolygonMode(face:Int, mode:Int):Void {} + public static function glPolygonOffset(factor:hl.F32, units:hl.F32):Void {} + public static function glPopDebugGroup():Void {} + public static function glPrimitiveRestartIndex(index:Int):Void {} + public static function glProgramBinary(program:Int, binaryFormat:Int, binary:hl.Bytes, length:Int):Void {} + public static function glProgramParameteri(program:Int, pname:Int, value:Int):Void {} + public static function glProgramUniform1d(program:Int, location:Int, v0:hl.F64):Void {} + public static function glProgramUniform1dv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform1f(program:Int, location:Int, v0:hl.F32):Void {} + public static function glProgramUniform1fv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform1i(program:Int, location:Int, v0:Int):Void {} + public static function glProgramUniform1iv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform1ui(program:Int, location:Int, v0:Int):Void {} + public static function glProgramUniform1uiv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform2d(program:Int, location:Int, v0:hl.F64, v1:hl.F64):Void {} + public static function glProgramUniform2dv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform2f(program:Int, location:Int, v0:hl.F32, v1:hl.F32):Void {} + public static function glProgramUniform2fv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform2i(program:Int, location:Int, v0:Int, v1:Int):Void {} + public static function glProgramUniform2iv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform2ui(program:Int, location:Int, v0:Int, v1:Int):Void {} + public static function glProgramUniform2uiv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform3d(program:Int, location:Int, v0:hl.F64, v1:hl.F64, v2:hl.F64):Void {} + public static function glProgramUniform3dv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform3f(program:Int, location:Int, v0:hl.F32, v1:hl.F32, v2:hl.F32):Void {} + public static function glProgramUniform3fv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform3i(program:Int, location:Int, v0:Int, v1:Int, v2:Int):Void {} + public static function glProgramUniform3iv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform3ui(program:Int, location:Int, v0:Int, v1:Int, v2:Int):Void {} + public static function glProgramUniform3uiv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform4d(program:Int, location:Int, v0:hl.F64, v1:hl.F64, v2:hl.F64, v3:hl.F64):Void {} + public static function glProgramUniform4dv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform4f(program:Int, location:Int, v0:hl.F32, v1:hl.F32, v2:hl.F32, v3:hl.F32):Void {} + public static function glProgramUniform4fv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform4i(program:Int, location:Int, v0:Int, v1:Int, v2:Int, v3:Int):Void {} + public static function glProgramUniform4iv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniform4ui(program:Int, location:Int, v0:Int, v1:Int, v2:Int, v3:Int):Void {} + public static function glProgramUniform4uiv(program:Int, location:Int, count:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix2dv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix2fv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix2x3dv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix2x3fv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix2x4dv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix2x4fv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix3dv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix3fv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix3x2dv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix3x2fv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix3x4dv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix3x4fv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix4dv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix4fv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix4x2dv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix4x2fv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix4x3dv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProgramUniformMatrix4x3fv(program:Int, location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glProvokingVertex(mode:Int):Void {} + public static function glPushDebugGroup(source:Int, id:Int, length:Int, message:String):Void {} + public static function glQueryCounter(id:Int, target:Int):Void {} + public static function glReadBuffer(src:Int):Void {} + public static function glReadPixels(x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} + public static function glReleaseShaderCompiler():Void {} + public static function glRenderbufferStorage(target:Int, internalformat:Int, width:Int, height:Int):Void {} + public static function glRenderbufferStorageMultisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int):Void {} + public static function glResumeTransformFeedback():Void {} + public static function glSampleCoverage(value:hl.F32, invert:Int):Void {} + public static function glSampleMaski(maskNumber:Int, mask:Int):Void {} + public static function glSamplerParameterIiv(sampler:Int, pname:Int, param:hl.Ref):Void {} + public static function glSamplerParameterIuiv(sampler:Int, pname:Int, param:hl.Ref):Void {} + public static function glSamplerParameterf(sampler:Int, pname:Int, param:hl.F32):Void {} + public static function glSamplerParameterfv(sampler:Int, pname:Int, param:hl.Ref):Void {} + public static function glSamplerParameteri(sampler:Int, pname:Int, param:Int):Void {} + public static function glSamplerParameteriv(sampler:Int, pname:Int, param:hl.Ref):Void {} + public static function glScissor(x:Int, y:Int, width:Int, height:Int):Void {} + public static function glScissorArrayv(first:Int, count:Int, v:hl.Ref):Void {} + public static function glScissorIndexed(index:Int, left:Int, bottom:Int, width:Int, height:Int):Void {} + public static function glScissorIndexedv(index:Int, v:hl.Ref):Void {} + public static function glSecondaryColorP3ui(type:Int, color:Int):Void {} + public static function glSecondaryColorP3uiv(type:Int, color:hl.Ref):Void {} + public static function glShaderBinary(count:Int, shaders:hl.Ref, binaryFormat:Int, binary:hl.Bytes, length:Int):Void {} + public static function glShaderSource(shader:Int, count:Int, string:hl.NativeArray, length:hl.Ref):Void {} + public static function glShaderStorageBlockBinding(program:Int, storageBlockIndex:Int, storageBlockBinding:Int):Void {} + public static function glStencilFunc(func:Int, ref:Int, mask:Int):Void {} + public static function glStencilFuncSeparate(face:Int, func:Int, ref:Int, mask:Int):Void {} + public static function glStencilMask(mask:Int):Void {} + public static function glStencilMaskSeparate(face:Int, mask:Int):Void {} + public static function glStencilOp(fail:Int, zfail:Int, zpass:Int):Void {} + public static function glStencilOpSeparate(face:Int, sfail:Int, dpfail:Int, dppass:Int):Void {} + public static function glTexBuffer(target:Int, internalformat:Int, buffer:Int):Void {} + public static function glTexBufferRange(target:Int, internalformat:Int, buffer:Int, offset:hl.Ref, size:hl.Ref):Void {} + public static function glTexCoordP1ui(type:Int, coords:Int):Void {} + public static function glTexCoordP1uiv(type:Int, coords:hl.Ref):Void {} + public static function glTexCoordP2ui(type:Int, coords:Int):Void {} + public static function glTexCoordP2uiv(type:Int, coords:hl.Ref):Void {} + public static function glTexCoordP3ui(type:Int, coords:Int):Void {} + public static function glTexCoordP3uiv(type:Int, coords:hl.Ref):Void {} + public static function glTexCoordP4ui(type:Int, coords:Int):Void {} + public static function glTexCoordP4uiv(type:Int, coords:hl.Ref):Void {} + public static function glTexImage1D(target:Int, level:Int, internalformat:Int, width:Int, border:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} + public static function glTexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} + public static function glTexImage2DMultisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, fixedsamplelocations:Int):Void {} + public static function glTexImage3D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} + public static function glTexImage3DMultisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, depth:Int, fixedsamplelocations:Int):Void {} + public static function glTexParameterIiv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glTexParameterIuiv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glTexParameterf(target:Int, pname:Int, param:hl.F32):Void {} + public static function glTexParameterfv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glTexParameteri(target:Int, pname:Int, param:Int):Void {} + public static function glTexParameteriv(target:Int, pname:Int, params:hl.Ref):Void {} + public static function glTexStorage1D(target:Int, levels:Int, internalformat:Int, width:Int):Void {} + public static function glTexStorage2D(target:Int, levels:Int, internalformat:Int, width:Int, height:Int):Void {} + public static function glTexStorage2DMultisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, fixedsamplelocations:Int):Void {} + public static function glTexStorage3D(target:Int, levels:Int, internalformat:Int, width:Int, height:Int, depth:Int):Void {} + public static function glTexStorage3DMultisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, depth:Int, fixedsamplelocations:Int):Void {} + public static function glTexSubImage1D(target:Int, level:Int, xoffset:Int, width:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} + public static function glTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} + public static function glTexSubImage3D(target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} + public static function glTextureView(texture:Int, target:Int, origtexture:Int, internalformat:Int, minlevel:Int, numlevels:Int, minlayer:Int, numlayers:Int):Void {} + public static function glTransformFeedbackVaryings(program:Int, count:Int, varyings:hl.NativeArray, bufferMode:Int):Void {} + public static function glUniform1d(location:Int, x:hl.F64):Void {} + public static function glUniform1dv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform1f(location:Int, v0:hl.F32):Void {} + public static function glUniform1fv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform1i(location:Int, v0:Int):Void {} + public static function glUniform1iv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform1ui(location:Int, v0:Int):Void {} + public static function glUniform1uiv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform2d(location:Int, x:hl.F64, y:hl.F64):Void {} + public static function glUniform2dv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform2f(location:Int, v0:hl.F32, v1:hl.F32):Void {} + public static function glUniform2fv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform2i(location:Int, v0:Int, v1:Int):Void {} + public static function glUniform2iv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform2ui(location:Int, v0:Int, v1:Int):Void {} + public static function glUniform2uiv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform3d(location:Int, x:hl.F64, y:hl.F64, z:hl.F64):Void {} + public static function glUniform3dv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform3f(location:Int, v0:hl.F32, v1:hl.F32, v2:hl.F32):Void {} + public static function glUniform3fv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform3i(location:Int, v0:Int, v1:Int, v2:Int):Void {} + public static function glUniform3iv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform3ui(location:Int, v0:Int, v1:Int, v2:Int):Void {} + public static function glUniform3uiv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform4d(location:Int, x:hl.F64, y:hl.F64, z:hl.F64, w:hl.F64):Void {} + public static function glUniform4dv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform4f(location:Int, v0:hl.F32, v1:hl.F32, v2:hl.F32, v3:hl.F32):Void {} + public static function glUniform4fv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform4i(location:Int, v0:Int, v1:Int, v2:Int, v3:Int):Void {} + public static function glUniform4iv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniform4ui(location:Int, v0:Int, v1:Int, v2:Int, v3:Int):Void {} + public static function glUniform4uiv(location:Int, count:Int, value:hl.Ref):Void {} + public static function glUniformBlockBinding(program:Int, uniformBlockIndex:Int, uniformBlockBinding:Int):Void {} + public static function glUniformMatrix2dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix2fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix2x3dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix2x3fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix2x4dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix2x4fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix3dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix3fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix3x2dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix3x2fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix3x4dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix3x4fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix4dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix4fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix4x2dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix4x2fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix4x3dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformMatrix4x3fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} + public static function glUniformSubroutinesuiv(shadertype:Int, count:Int, indices:hl.Ref):Void {} + public static function glUnmapBuffer(target:Int):Int { return 0; } + public static function glUseProgram(program:Int):Void {} + public static function glUseProgramStages(pipeline:Int, stages:Int, program:Int):Void {} + public static function glValidateProgram(program:Int):Void {} + public static function glValidateProgramPipeline(pipeline:Int):Void {} + public static function glVertexAttrib1d(index:Int, x:hl.F64):Void {} + public static function glVertexAttrib1dv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib1f(index:Int, x:hl.F32):Void {} + public static function glVertexAttrib1fv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib1s(index:Int, x:Int):Void {} + public static function glVertexAttrib1sv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib2d(index:Int, x:hl.F64, y:hl.F64):Void {} + public static function glVertexAttrib2dv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib2f(index:Int, x:hl.F32, y:hl.F32):Void {} + public static function glVertexAttrib2fv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib2s(index:Int, x:Int, y:Int):Void {} + public static function glVertexAttrib2sv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib3d(index:Int, x:hl.F64, y:hl.F64, z:hl.F64):Void {} + public static function glVertexAttrib3dv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib3f(index:Int, x:hl.F32, y:hl.F32, z:hl.F32):Void {} + public static function glVertexAttrib3fv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib3s(index:Int, x:Int, y:Int, z:Int):Void {} + public static function glVertexAttrib3sv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib4Nbv(index:Int, v:String):Void {} + public static function glVertexAttrib4Niv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib4Nsv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib4Nub(index:Int, x:Int, y:Int, z:Int, w:Int):Void {} + public static function glVertexAttrib4Nubv(index:Int, v:String):Void {} + public static function glVertexAttrib4Nuiv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib4Nusv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib4bv(index:Int, v:String):Void {} + public static function glVertexAttrib4d(index:Int, x:hl.F64, y:hl.F64, z:hl.F64, w:hl.F64):Void {} + public static function glVertexAttrib4dv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib4f(index:Int, x:hl.F32, y:hl.F32, z:hl.F32, w:hl.F32):Void {} + public static function glVertexAttrib4fv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib4iv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib4s(index:Int, x:Int, y:Int, z:Int, w:Int):Void {} + public static function glVertexAttrib4sv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib4ubv(index:Int, v:String):Void {} + public static function glVertexAttrib4uiv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttrib4usv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribBinding(attribindex:Int, bindingindex:Int):Void {} + public static function glVertexAttribDivisor(index:Int, divisor:Int):Void {} + public static function glVertexAttribFormat(attribindex:Int, size:Int, type:Int, normalized:Int, relativeoffset:Int):Void {} + public static function glVertexAttribI1i(index:Int, x:Int):Void {} + public static function glVertexAttribI1iv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribI1ui(index:Int, x:Int):Void {} + public static function glVertexAttribI1uiv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribI2i(index:Int, x:Int, y:Int):Void {} + public static function glVertexAttribI2iv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribI2ui(index:Int, x:Int, y:Int):Void {} + public static function glVertexAttribI2uiv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribI3i(index:Int, x:Int, y:Int, z:Int):Void {} + public static function glVertexAttribI3iv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribI3ui(index:Int, x:Int, y:Int, z:Int):Void {} + public static function glVertexAttribI3uiv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribI4bv(index:Int, v:String):Void {} + public static function glVertexAttribI4i(index:Int, x:Int, y:Int, z:Int, w:Int):Void {} + public static function glVertexAttribI4iv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribI4sv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribI4ubv(index:Int, v:String):Void {} + public static function glVertexAttribI4ui(index:Int, x:Int, y:Int, z:Int, w:Int):Void {} + public static function glVertexAttribI4uiv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribI4usv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribIFormat(attribindex:Int, size:Int, type:Int, relativeoffset:Int):Void {} + public static function glVertexAttribIPointer(index:Int, size:Int, type:Int, stride:Int, pointer:hl.Bytes):Void {} + public static function glVertexAttribL1d(index:Int, x:hl.F64):Void {} + public static function glVertexAttribL1dv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribL2d(index:Int, x:hl.F64, y:hl.F64):Void {} + public static function glVertexAttribL2dv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribL3d(index:Int, x:hl.F64, y:hl.F64, z:hl.F64):Void {} + public static function glVertexAttribL3dv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribL4d(index:Int, x:hl.F64, y:hl.F64, z:hl.F64, w:hl.F64):Void {} + public static function glVertexAttribL4dv(index:Int, v:hl.Ref):Void {} + public static function glVertexAttribLFormat(attribindex:Int, size:Int, type:Int, relativeoffset:Int):Void {} + public static function glVertexAttribLPointer(index:Int, size:Int, type:Int, stride:Int, pointer:hl.Bytes):Void {} + public static function glVertexAttribP1ui(index:Int, type:Int, normalized:Int, value:Int):Void {} + public static function glVertexAttribP1uiv(index:Int, type:Int, normalized:Int, value:hl.Ref):Void {} + public static function glVertexAttribP2ui(index:Int, type:Int, normalized:Int, value:Int):Void {} + public static function glVertexAttribP2uiv(index:Int, type:Int, normalized:Int, value:hl.Ref):Void {} + public static function glVertexAttribP3ui(index:Int, type:Int, normalized:Int, value:Int):Void {} + public static function glVertexAttribP3uiv(index:Int, type:Int, normalized:Int, value:hl.Ref):Void {} + public static function glVertexAttribP4ui(index:Int, type:Int, normalized:Int, value:Int):Void {} + public static function glVertexAttribP4uiv(index:Int, type:Int, normalized:Int, value:hl.Ref):Void {} + public static function glVertexAttribPointer(index:Int, size:Int, type:Int, normalized:Int, stride:Int, pointer:hl.Bytes):Void {} + public static function glVertexBindingDivisor(bindingindex:Int, divisor:Int):Void {} + public static function glVertexP2ui(type:Int, value:Int):Void {} + public static function glVertexP2uiv(type:Int, value:hl.Ref):Void {} + public static function glVertexP3ui(type:Int, value:Int):Void {} + public static function glVertexP3uiv(type:Int, value:hl.Ref):Void {} + public static function glVertexP4ui(type:Int, value:Int):Void {} + public static function glVertexP4uiv(type:Int, value:hl.Ref):Void {} + public static function glViewport(x:Int, y:Int, width:Int, height:Int):Void {} + public static function glViewportArrayv(first:Int, count:Int, v:hl.Ref):Void {} + public static function glViewportIndexedf(index:Int, x:hl.F32, y:hl.F32, w:hl.F32, h:hl.F32):Void {} + public static function glViewportIndexedfv(index:Int, v:hl.Ref):Void {} + public static function glWaitSync(sync:hl.Abstract<"GLSync">, flags:Int, timeout:hl.I64):Void {} +} \ No newline at end of file diff --git a/src/lemons/geom/Matrix4.hx b/src/lemons/geom/Matrix4.hx deleted file mode 100644 index 962b149..0000000 --- a/src/lemons/geom/Matrix4.hx +++ /dev/null @@ -1,65 +0,0 @@ -package lemons.geom; - -import lemons.geom.Vector2; -import lemons.geom.Vector3; - -abstract Matrix4(Array) to Array { - public function new() { - identity(); - } - - inline public function identity() - this = [1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1]; - - public function translateByVector2(vector:Vector2):Void { - this[3] += vector.x; - this[7] += vector.y; - } - - public function translateByVector3(vector:Vector3):Void { - this[3] += vector.x; - this[7] += vector.y; - this[10] += vector.z; - } - - public function scaleByVector2(vector:Vector2):Void { - this[0] *= vector.x; - this[5] *= vector.y; - } - - public function scaleByVector3(vector:Vector3):Void { - this[0] *= vector.x; - this[5] *= vector.y; - this[10] *= vector.z; - } - - public function rotateX(angle:Float):Void { - var cosAngle:Float = Math.cos(angle); - var sinAngle:Float = Math.sin(angle); - - this[5] += cosAngle; - this[6] += -sinAngle; - this[9] += sinAngle; - this[10] += cosAngle; - } - - static public function orthographic(left:Float, right:Float, top:Float, bottom:Float) { - var matrix:Matrix4 = new Matrix4(); - - var sx = 1.0 / (right - left); - var sy = 1.0 / (bottom - top); - matrix[0] = 2.0 * sx; - matrix[5] = 2.0 * sy; - matrix[12] = -(left + right) * sx; - matrix[13] = -(top + bottom) * sy; - - return matrix; - } - - public function toGLByteShit():hl.Bytes - return hl.Bytes.getArray(this); - -} \ No newline at end of file diff --git a/src/lemons/geom/Vector0.hx b/src/lemons/geom/Vector0.hx deleted file mode 100644 index d6ec59b..0000000 --- a/src/lemons/geom/Vector0.hx +++ /dev/null @@ -1,7 +0,0 @@ -package lemons.geom; - -/* - * A vector with zero variables, thanks nint - * @see -*/ -#if gen_docs @:keep #end class Vector0 { } \ No newline at end of file diff --git a/src/lemons/geom/Vector2.hx b/src/lemons/geom/Vector2.hx deleted file mode 100644 index e1f7299..0000000 --- a/src/lemons/geom/Vector2.hx +++ /dev/null @@ -1,11 +0,0 @@ -package lemons.geom; - -class Vector2 { - public var x:Float; - public var y:Float; - - public function new(x:Float, y:Float) { - this.x = x; - this.y = y; - } -} \ No newline at end of file diff --git a/src/lemons/geom/Vector3.hx b/src/lemons/geom/Vector3.hx deleted file mode 100644 index 96862ff..0000000 --- a/src/lemons/geom/Vector3.hx +++ /dev/null @@ -1,13 +0,0 @@ -package lemons.geom; - -class Vector3 { - public var x:Float; - public var y:Float; - public var z:Float; - - public function new(x:Float, y:Float, z:Float) { - this.x = x; - this.y = y; - this.z = z; - } -} \ No newline at end of file diff --git a/src/lemons/sound/Sound.hx b/src/lemons/sound/Sound.hx deleted file mode 100644 index 8f0d7c3..0000000 --- a/src/lemons/sound/Sound.hx +++ /dev/null @@ -1,162 +0,0 @@ -package lemons.sound; - -import openal.*; -import hl.Bytes; -import lemons.geom.Vector3; - -import lemons.sound.SoundData; -import lemons.sound.filters.Filters.Filter; -import lemons.sound.effects.Effects.Effect; -import lemons.util.IDestroyable; - -import sys.io.File; - -class Sound implements IDestroyable { - public static var tempBytes:Bytes; - public var alSource:AL.Source; - private var alEffectSlot:EFX.EffectSlot; - - public var data:SoundData; - - public var duration(default, null):Float; - public var time(get, set):Float; - - @:isVar public var loop(get, set):Bool; - - @:isVar public var pitch(get, set):Float; - @:isVar public var volume(get, set):Float; - - public var pan(default, set):Float; - public var velocity(default, set):Vector3; - - public var filter(default, set):Filter; - public var effect(default, set):Effect; - - public function new():Void { - AL.genSources(1, tempBytes); - alSource = AL.Source.ofInt(tempBytes.getI32(0)); - - EFX.genAuxiliaryEffectSlots(1, tempBytes); - alEffectSlot = EFX.EffectSlot.ofInt(tempBytes.getI32(0)); - AL.source3i(alSource, EFX.AUXILIARY_SEND_FILTER, alEffectSlot.toInt(), 0, EFX.FILTER_NULL); - - AL.sourcei(alSource, AL.SOURCE_RELATIVE, AL.TRUE); - pan = 0.5; - velocity = new Vector3(0, 0, 0); - - pitch = 1; - volume = 1; - - loop = false; - } - - public function loadBuffer(buffer:AL.Buffer) { - AL.sourcei(alSource, AL.BUFFER, buffer.toInt()); - duration = AL.getBufferi(buffer, AL.SIZE) / (AL.getBufferi(buffer, AL.CHANNELS) * (AL.getBufferi(buffer, AL.BITS) / 8)); - } - - public function loadSoundData(data:SoundData) { - this.data = data; - loadBuffer(data.alBuffer); - } - - public function play():Void - AL.sourcePlay(alSource); - - public function pause():Void - AL.sourcePause(alSource); - - public function destroy():Void { - tempBytes.setI32(0, alEffectSlot.toInt()); - EFX.deleteAuxiliaryEffectSlots(1, tempBytes); - - tempBytes.setI32(0, alSource.toInt()); - AL.deleteSources(1, tempBytes); - - data = null; - } - - public static function getErrorString(?error:Int):String { - if (error == null) error = AL.getError(); - return switch(error) { - case AL.NO_ERROR: 'No error'; - case AL.INVALID_NAME: 'Invalid name'; - case AL.INVALID_ENUM: 'Invalid enum'; - case AL.INVALID_VALUE: 'Invalid value'; - case AL.INVALID_OPERATION: 'Invalid operation'; - case AL.OUT_OF_MEMORY: 'Out of memory'; - default: 'Unknown'; - } - } - - private static function __init__() { - @:privateAccess tempBytes = Bytes.alloc(1); - var device = ALC.openDevice(ALC.getString(null, ALC.DEFAULT_DEVICE_SPECIFIER)); - var context = ALC.createContext(device, tempBytes); - - ALC.makeContextCurrent(context); - } - - @:allow(lemons.App) - private static function stopEngine() { - var context:ALC.Context = ALC.getCurrentContext(); - var device:ALC.Device = ALC.getContextsDevice(context); - ALC.closeDevice(device); - ALC.destroyContext(context); - } - - function get_loop():Bool return (AL.getSourcei(alSource, AL.LOOPING)) == 1; - function set_loop(value:Bool):Bool { - AL.sourcei(alSource, AL.LOOPING, (value ? 1 : 0)); - return loop = value; - } - - function get_time():Float return AL.getSourcef(alSource, AL.SEC_OFFSET); - function set_time(value:Float):Float { - AL.sourcef(alSource, AL.SEC_OFFSET, value); - return volume = value; - } - - function set_filter(value:Filter):Filter { - AL.sourcei(alSource, EFX.DIRECT_FILTER, value.alFilter.toInt()); - return filter = value; - } - - function set_effect(value:Effect):Effect { - EFX.auxiliaryEffectSloti(alEffectSlot, EFX.EFFECTSLOT_EFFECT, value.alEffect.toInt()); - return effect = value; - } - - function get_volume():Float return AL.getSourcef(alSource, AL.GAIN); - function set_volume(value:Float):Float { - AL.sourcef(alSource, AL.GAIN, value); - return volume = value; - } - - function get_pitch():Float return AL.getSourcef(alSource, AL.PITCH); - function set_pitch(value:Float):Float { - AL.sourcef(alSource, AL.PITCH, value); - return pitch = value; - } - - function set_pan(value:Float):Float { - AL.source3f(alSource, AL.POSITION, value * 2 - 1, 0, 0); - return pan = value; - } - - function set_velocity(value:Vector3):Vector3 { - AL.source3f(alSource, AL.POSITION, value.x, value.y, value.z); - return velocity = value; - } - - - public static function createFromBytes(data:haxe.io.Bytes):Sound { - var sound:Sound = new Sound(); - sound.loadSoundData(SoundData.createFromBytes(data)); - return sound; - } - - public static function createFromFile(path:String):Sound - return Sound.createFromBytes(File.getBytes(path)); - -} \ No newline at end of file diff --git a/src/lemons/sound/SoundData.hx b/src/lemons/sound/SoundData.hx deleted file mode 100644 index 0812b68..0000000 --- a/src/lemons/sound/SoundData.hx +++ /dev/null @@ -1,163 +0,0 @@ -package lemons.sound; - -import format.wav.Reader as WavReader; -import format.wav.Data.WAVE as WavData; -import openal.*; -import haxe.io.Bytes; -import haxe.io.BytesInput; -import lemons.sound.Sound; -import hl.Ref; -import hl.Format; -import hl.Format.OGG; -import lemons.util.IDestroyable; -import haxe.io.Path; - -/** - * Class that holds the info and data of the sound - * - * Basically a wrappper for openal's buffer -**/ -class SoundData implements IDestroyable { - @:allow(lemons.sound.Sound) - private var alBuffer:AL.Buffer; - - /** - * Format value used for OpenAL - **/ - public var format:Int; - - /** - * The sound's sample rate - **/ - public var sampleRate:Int; - - /** - * Bits per sample of the sound - **/ - public var bitsPerSample:Int; - - /** - * The sound's bitrate - **/ - public var bitrate:Int; - - /** - * The ammound of audio channels in the sound - **/ - public var channels:Int; - - /** - * Actual data of the sound - **/ - public var data:Bytes; - - /** - * Creates a new empty instance of `SoundData` - * - * The instance won't be able to be used yet since it's empty - **/ - public function new() { - AL.genBuffers(1, Sound.tempBytes); - alBuffer = AL.Buffer.ofInt(Sound.tempBytes.getI32(0)); - } - - /** - * Loads the instance of SoundData with the specified bytes, note that the only formats that are supported are WAV, OGG, MP3 and FLAC - * @param bytes Bytes to load - **/ - public function fromBytes(bytes:Bytes) { - var signature:String = bytes.getString(0, 4); - - switch (signature.toLowerCase()) { - case 'flac': // fLaC - throw 'unimplemented!! check back later!'; - - case 'id3': // MP3 - var reader:Mp3 = Format.openMp3(#if (hl_ver >= "1.13.0") bytes, bytes.length #end); - // technically unneeded arguments since the c function doesent even define them - // but the prim definition expects them to be here so idk - data = Bytes.alloc(1); - Format.mp3DecodeFrame(reader, bytes, 1, 0, data, 1, 0); - - var b = 0, c = 0, fb = 0, h = 0, l = 0; - Format.mp3FrameInfo(reader, b, c, fb, h, l); - trace(b, c, fb, h, l); - - case 'oggs': // Vorbis - var reader:OGG = Format.openOgg(bytes, bytes.length); - - var b = 0, f = 0, s = 0, c = 0; - Format.oggInfo(reader, b, f, s, c); - - data = Bytes.alloc(s * c * 2); - var offset:Int = 0; - while (true) { - var balls:Int = Format.oggRead(reader, hl.Bytes.fromBytes(data).offset(offset), 4096, 2); - if (balls == 0) - break; - offset += balls; - } - channels = c; - sampleRate = f; - format = getFormat(c, 16); - - uploadToBuffer(); - - case 'riff': // WAV - var wavFile:WavData = new WavReader(new BytesInput(bytes)).read(); - - format = getFormat(wavFile.header.channels, wavFile.header.bitsPerSample); - sampleRate = wavFile.header.samplingRate; - channels = wavFile.header.channels; - bitsPerSample = wavFile.header.bitsPerSample; - - data = wavFile.data; - - uploadToBuffer(); - default: - throw 'unknown sound format!!!\nfound signature: ${signature}'; - } - } - - /** - * Creates a new instance of `SoundData` and loads the specified bytes - * @param bytes Bytes to load - **/ - public static function createFromBytes(bytes:Bytes):SoundData { - var daNewData = new SoundData(); - daNewData.fromBytes(bytes); - return daNewData; - } - - @:dox(hide) - private function uploadToBuffer() - AL.bufferData(alBuffer, format, data, data.length, sampleRate); - - /** - * Helper function to get a openAL format specifer - * @param channels Ammount of channels - * @param bitsPerSample Bits per sample - **/ - public static function getFormat(channels:Int, bitsPerSample:Int):Int // refactor this - return switch (channels) { - case 1: - switch (bitsPerSample) { - case 8: AL.FORMAT_MONO8; - case 16: AL.FORMAT_MONO16; - default: throw 'Invalid ammount of bits per sample! $bitsPerSample'; - } - case 2: - switch (bitsPerSample) { - case 8: AL.FORMAT_STEREO8; - case 16: AL.FORMAT_STEREO16; - default: throw 'Invalid ammount of bits per sample! $bitsPerSample'; - } - default: throw 'Invalid ammount of channels! $channels'; - } - - public function destroy():Void { - Sound.tempBytes.setI32(0, alBuffer.toInt()); - AL.deleteBuffers(1, Sound.tempBytes); - data = null; - } -} \ No newline at end of file diff --git a/src/lemons/sound/effects/Effects.hx b/src/lemons/sound/effects/Effects.hx deleted file mode 100644 index 99b7292..0000000 --- a/src/lemons/sound/effects/Effects.hx +++ /dev/null @@ -1,313 +0,0 @@ -package lemons.sound.effects; - -import openal.*; -import lemons.sound.Sound; -import lemons.util.IDestroyable; - -/** - * Base effect class. don't use this by itself. -**/ -@:dox(hide) -class Effect implements IDestroyable { - @:allow(lemons.sound.Sound) - private var alEffect:EFX.Effect; - - public function new(effectType:Int) { - EFX.genEffects(1, Sound.tempBytes); - alEffect = EFX.Effect.ofInt(Sound.tempBytes.getI32(0)); - EFX.effecti(alEffect, EFX.EFFECT_TYPE, effectType); - } - - public function destroy():Void { - Sound.tempBytes.setI32(0, alEffect.toInt()); - EFX.deleteEffects(1, Sound.tempBytes); - } - - // helpers - private function getInt(key:Int) return EFX.getEffecti(alEffect, key); - private function getFloat(key:Int) return EFX.getEffectf(alEffect, key); - private function setInt(key:Int, value:Int) { EFX.effecti(alEffect, key, value); return value; } - private function setFloat(key:Int, value:Float) { EFX.effectf(alEffect, key, value); return value; } - - private static function __init__() AL.loadExtensions(); -} - -class ReverbEffect extends Effect { - @:isVar public var density(get, set):Float; - @:isVar public var diffusion(get, set):Float; - @:isVar public var gain(get, set):Float; - @:isVar public var gainHF(get, set):Float; - @:isVar public var decayTime(get, set):Float; - @:isVar public var decayHFRatio(get, set):Float; - @:isVar public var reflectionGain(get, set):Float; - @:isVar public var reflectionDelay(get, set):Float; - @:isVar public var lateReverbGain(get, set):Float; - @:isVar public var lateReverbDelay(get, set):Float; - @:isVar public var airAbsorptionGainHF(get, set):Float; - @:isVar public var roomRolloffFactor(get, set):Float; - @:isVar public var decayHFLimit(get, set):Float; - - public function new() super(EFX.EFFECT_REVERB); - - function get_density():Float return getFloat(EFX.REVERB_DENSITY); - function get_diffusion():Float return getFloat(EFX.REVERB_DIFFUSION); - function get_gain():Float return getFloat(EFX.REVERB_GAIN); - function get_gainHF():Float return getFloat(EFX.REVERB_GAINHF); - function get_decayTime():Float return getFloat(EFX.REVERB_DECAY_TIME); - function get_decayHFRatio():Float return getFloat(EFX.REVERB_DECAY_HFRATIO); - function get_reflectionGain():Float return getFloat(EFX.REVERB_REFLECTIONS_GAIN); - function get_reflectionDelay():Float return getFloat(EFX.REVERB_REFLECTIONS_DELAY); - function get_lateReverbGain():Float return getFloat(EFX.REVERB_LATE_REVERB_GAIN); - function get_lateReverbDelay():Float return getFloat(EFX.REVERB_LATE_REVERB_DELAY); - function get_airAbsorptionGainHF():Float return getFloat(EFX.REVERB_AIR_ABSORPTION_GAINHF); - function get_roomRolloffFactor():Float return getFloat(EFX.REVERB_ROOM_ROLLOFF_FACTOR); - function get_decayHFLimit():Float return getFloat(EFX.REVERB_DECAY_HFLIMIT); - - function set_density(value:Float):Float return setFloat(EFX.REVERB_DENSITY, value); - function set_diffusion(value:Float):Float return setFloat(EFX.REVERB_DIFFUSION, value); - function set_gain(value:Float):Float return setFloat(EFX.REVERB_GAIN, value); - function set_gainHF(value:Float):Float return setFloat(EFX.REVERB_GAINHF, value); - function set_decayTime(value:Float):Float return setFloat(EFX.REVERB_DECAY_TIME, value); - function set_decayHFRatio(value:Float):Float return setFloat(EFX.REVERB_DECAY_HFRATIO, value); - function set_reflectionGain(value:Float):Float return setFloat(EFX.REVERB_REFLECTIONS_GAIN, value); - function set_reflectionDelay(value:Float):Float return setFloat(EFX.REVERB_REFLECTIONS_DELAY, value); - function set_lateReverbGain(value:Float):Float return setFloat(EFX.REVERB_LATE_REVERB_GAIN, value); - function set_lateReverbDelay(value:Float):Float return setFloat(EFX.REVERB_LATE_REVERB_DELAY, value); - function set_airAbsorptionGainHF(value:Float):Float return setFloat(EFX.REVERB_AIR_ABSORPTION_GAINHF, value); - function set_roomRolloffFactor(value:Float):Float return setFloat(EFX.REVERB_ROOM_ROLLOFF_FACTOR, value); - function set_decayHFLimit(value:Float):Float return setFloat(EFX.REVERB_DECAY_HFLIMIT, value); -} - -class DistortionEffect extends Effect { - @:isVar public var edge(get, set):Float; - @:isVar public var gain(get, set):Float; - @:isVar public var lowpassCutoff(get, set):Float; - @:isVar public var eqCenter(get, set):Float; - @:isVar public var eqBandwidth(get, set):Float; - - public function new() super(EFX.EFFECT_DISTORTION); - - function get_edge():Float return getFloat(EFX.DISTORTION_EDGE); - function get_gain():Float return getFloat(EFX.DISTORTION_GAIN); - function get_lowpassCutoff():Float return getFloat(EFX.DISTORTION_LOWPASS_CUTOFF); - function get_eqCenter():Float return getFloat(EFX.DISTORTION_EQCENTER); - function get_eqBandwidth():Float return getFloat(EFX.DISTORTION_EQBANDWIDTH); - - function set_edge(value:Float):Float return setFloat(EFX.DISTORTION_EDGE, value); - function set_gain(value:Float):Float return setFloat(EFX.DISTORTION_GAIN, value); - function set_lowpassCutoff(value:Float):Float return setFloat(EFX.DISTORTION_LOWPASS_CUTOFF, value); - function set_eqCenter(value:Float):Float return setFloat(EFX.DISTORTION_EQCENTER, value); - function set_eqBandwidth(value:Float):Float return setFloat(EFX.DISTORTION_EQBANDWIDTH, value); -} - -class EchoEffect extends Effect { - @:isVar public var delay(get, set):Float; - @:isVar public var stereoDelay(get, set):Float; - @:isVar public var damping(get, set):Float; - @:isVar public var feedback(get, set):Float; - @:isVar public var spread(get, set):Float; - - public function new() super(EFX.EFFECT_ECHO); - - function get_delay():Float return getFloat(EFX.ECHO_DELAY); - function get_stereoDelay():Float return getFloat(EFX.ECHO_LRDELAY); - function get_damping():Float return getFloat(EFX.ECHO_DAMPING); - function get_feedback():Float return getFloat(EFX.ECHO_FEEDBACK); - function get_spread():Float return getFloat(EFX.ECHO_SPREAD); - - function set_delay(value:Float):Float return setFloat(EFX.ECHO_DELAY, value); - function set_stereoDelay(value:Float):Float return setFloat(EFX.ECHO_LRDELAY, value); - function set_damping(value:Float):Float return setFloat(EFX.ECHO_DAMPING, value); - function set_feedback(value:Float):Float return setFloat(EFX.ECHO_FEEDBACK, value); - function set_spread(value:Float):Float return setFloat(EFX.ECHO_SPREAD, value); -} - -class FlangerEffect extends Effect { - @:isVar public var waveform(get, set):Float; - @:isVar public var phase(get, set):Int; - @:isVar public var rate(get, set):Float; - @:isVar public var depth(get, set):Float; - @:isVar public var feedback(get, set):Float; - @:isVar public var delay(get, set):Float; - - public function new() super(EFX.EFFECT_FLANGER); - - function get_waveform():Float return getFloat(EFX.FLANGER_WAVEFORM); - function get_phase():Int return getInt(EFX.FLANGER_PHASE); - function get_rate():Float return getFloat(EFX.FLANGER_RATE); - function get_depth():Float return getFloat(EFX.FLANGER_DEPTH); - function get_feedback():Float return getFloat(EFX.FLANGER_FEEDBACK); - function get_delay():Float return getFloat(EFX.FLANGER_DELAY); - - function set_waveform(value:Float):Float return setFloat(EFX.FLANGER_WAVEFORM, value); - function set_phase(value:Int):Int return setInt(EFX.FLANGER_PHASE, value); - function set_rate(value:Float):Float return setFloat(EFX.FLANGER_RATE, value); - function set_depth(value:Float):Float return setFloat(EFX.FLANGER_DEPTH, value); - function set_feedback(value:Float):Float return setFloat(EFX.FLANGER_FEEDBACK, value); - function set_delay(value:Float):Float return setFloat(EFX.FLANGER_DELAY, value); -} - -class RingModulatorEffect extends Effect { - @:isVar public var frequency(get, set):Float; - @:isVar public var highpassCutoff(get, set):Float; - @:isVar public var waveform(get, set):Float; - - public function new() super(EFX.EFFECT_RING_MODULATOR); - - function get_frequency():Float return getFloat(EFX.RING_MODULATOR_FREQUENCY); - function get_highpassCutoff():Float return getFloat(EFX.RING_MODULATOR_HIGHPASS_CUTOFF); - function get_waveform():Float return getFloat(EFX.RING_MODULATOR_WAVEFORM); - - function set_frequency(value:Float):Float return setFloat(EFX.RING_MODULATOR_FREQUENCY, value); - function set_highpassCutoff(value:Float):Float return setFloat(EFX.RING_MODULATOR_HIGHPASS_CUTOFF, value); - function set_waveform(value:Float):Float return setFloat(EFX.RING_MODULATOR_WAVEFORM, value); -} - -class CompressorEffect extends Effect { - @:isVar public var enabled(get, set):Bool; - - public function new() super(EFX.EFFECT_COMPRESSOR); - - function get_enabled():Bool return getInt(EFX.COMPRESSOR_ONOFF) == 1; - - function set_enabled(value:Bool):Bool return setFloat(EFX.COMPRESSOR_ONOFF, (value ? 1 : 0)) == 1; -} - -class EqualizerEffect extends Effect { - @:isVar public var lowGain(get, set):Float; - @:isVar public var lowCutoff(get, set):Float; - - @:isVar public var mid1Gain(get, set):Float; - @:isVar public var mid1Center(get, set):Float; - @:isVar public var mid1Width(get, set):Float; - @:isVar public var mid2Gain(get, set):Float; - @:isVar public var mid2Center(get, set):Float; - @:isVar public var mid2Width(get, set):Float; - - @:isVar public var highGain(get, set):Float; - @:isVar public var highCutoff(get, set):Float; - - public function new() super(EFX.EFFECT_EQUALIZER); - - function get_lowGain():Float return getFloat(EFX.EQUALIZER_LOW_GAIN); - function get_lowCutoff():Float return getFloat(EFX.EQUALIZER_LOW_CUTOFF); - function get_mid1Gain():Float return getFloat(EFX.EQUALIZER_MID1_GAIN); - function get_mid1Center():Float return getFloat(EFX.EQUALIZER_MID1_CENTER); - function get_mid1Width():Float return getFloat(EFX.EQUALIZER_MID1_WIDTH); - function get_mid2Gain():Float return getFloat(EFX.EQUALIZER_MID2_GAIN); - function get_mid2Center():Float return getFloat(EFX.EQUALIZER_MID2_CENTER); - function get_mid2Width():Float return getFloat(EFX.EQUALIZER_MID2_WIDTH); - function get_highGain():Float return getFloat(EFX.EQUALIZER_HIGH_GAIN); - function get_highCutoff():Float return getFloat(EFX.EQUALIZER_HIGH_CUTOFF); - - function set_lowGain(value:Float):Float return setFloat(EFX.EQUALIZER_LOW_GAIN, value); - function set_lowCutoff(value:Float):Float return setFloat(EFX.EQUALIZER_LOW_CUTOFF, value); - function set_mid1Gain(value:Float):Float return setFloat(EFX.EQUALIZER_MID1_GAIN, value); - function set_mid1Center(value:Float):Float return setFloat(EFX.EQUALIZER_MID1_CENTER, value); - function set_mid1Width(value:Float):Float return setFloat(EFX.EQUALIZER_MID1_WIDTH, value); - function set_mid2Gain(value:Float):Float return setFloat(EFX.EQUALIZER_MID2_GAIN, value); - function set_mid2Center(value:Float):Float return setFloat(EFX.EQUALIZER_MID2_CENTER, value); - function set_mid2Width(value:Float):Float return setFloat(EFX.EQUALIZER_MID2_WIDTH, value); - function set_highGain(value:Float):Float return setFloat(EFX.EQUALIZER_HIGH_GAIN, value); - function set_highCutoff(value:Float):Float return setFloat(EFX.EQUALIZER_HIGH_CUTOFF, value); -} - -class EAXReverbEffect extends Effect { - @:isVar public var density(get, set):Float; - @:isVar public var diffusion(get, set):Float; - @:isVar public var gain(get, set):Float; - @:isVar public var gainHF(get, set):Float; - @:isVar public var gainLF(get, set):Float; - @:isVar public var decayTime(get, set):Float; - @:isVar public var decayHFRatio(get, set):Float; - @:isVar public var decayLFRatio(get, set):Float; - @:isVar public var reflectionsGain(get, set):Float; - @:isVar public var reflectionsDelay(get, set):Float; - @:isVar public var reflectionsPan(get, set):Float; - @:isVar public var lateReverbGain(get, set):Float; - @:isVar public var lateReverbDelay(get, set):Float; - @:isVar public var lateReverbPan(get, set):Float; - @:isVar public var echoTime(get, set):Float; - @:isVar public var echoDepth(get, set):Float; - @:isVar public var modulationTime(get, set):Float; - @:isVar public var modulationDepth(get, set):Float; - @:isVar public var airAbsorptionGainHF(get, set):Float; - @:isVar public var HFReference(get, set):Float; - @:isVar public var LFReference(get, set):Float; - @:isVar public var roomRolloffFactor(get, set):Float; - @:isVar public var decayHFLimit(get, set):Float; - - public function new() super(EFX.EFFECT_EAXREVERB); - - function get_density():Float return getFloat(EFX.EAXREVERB_DENSITY); - function get_diffusion():Float return getFloat(EFX.EAXREVERB_DIFFUSION); - function get_gain():Float return getFloat(EFX.EAXREVERB_GAIN); - function get_gainHF():Float return getFloat(EFX.EAXREVERB_GAINHF); - function get_gainLF():Float return getFloat(EFX.EAXREVERB_GAINLF); - function get_decayTime():Float return getFloat(EFX.EAXREVERB_DECAY_TIME); - function get_decayHFRatio():Float return getFloat(EFX.EAXREVERB_DECAY_HFRATIO); - function get_decayLFRatio():Float return getFloat(EFX.EAXREVERB_DECAY_LFRATIO); - function get_reflectionsGain():Float return getFloat(EFX.EAXREVERB_REFLECTIONS_GAIN); - function get_reflectionsDelay():Float return getFloat(EFX.EAXREVERB_REFLECTIONS_DELAY); - function get_reflectionsPan():Float return getFloat(EFX.EAXREVERB_REFLECTIONS_PAN); - function get_lateReverbGain():Float return getFloat(EFX.EAXREVERB_LATE_REVERB_GAIN); - function get_lateReverbDelay():Float return getFloat(EFX.EAXREVERB_LATE_REVERB_DELAY); - function get_lateReverbPan():Float return getFloat(EFX.EAXREVERB_LATE_REVERB_PAN); - function get_echoTime():Float return getFloat(EFX.EAXREVERB_ECHO_TIME); - function get_echoDepth():Float return getFloat(EFX.EAXREVERB_ECHO_DEPTH); - function get_modulationTime():Float return getFloat(EFX.EAXREVERB_MODULATION_TIME); - function get_modulationDepth():Float return getFloat(EFX.EAXREVERB_MODULATION_DEPTH); - function get_airAbsorptionGainHF():Float return getFloat(EFX.EAXREVERB_AIR_ABSORPTION_GAINHF); - function get_HFReference():Float return getFloat(EFX.EAXREVERB_HFREFERENCE); - function get_LFReference():Float return getFloat(EFX.EAXREVERB_LFREFERENCE); - function get_roomRolloffFactor():Float return getFloat(EFX.EAXREVERB_ROOM_ROLLOFF_FACTOR); - function get_decayHFLimit():Float return getFloat(EFX.EAXREVERB_DECAY_HFLIMIT); - - function set_density(value:Float):Float return setFloat(EFX.EAXREVERB_DENSITY, value); - function set_diffusion(value:Float):Float return setFloat(EFX.EAXREVERB_DIFFUSION, value); - function set_gain(value:Float):Float return setFloat(EFX.EAXREVERB_GAIN, value); - function set_gainHF(value:Float):Float return setFloat(EFX.EAXREVERB_GAINHF, value); - function set_gainLF(value:Float):Float return setFloat(EFX.EAXREVERB_GAINLF, value); - function set_decayTime(value:Float):Float return setFloat(EFX.EAXREVERB_DECAY_TIME, value); - function set_decayHFRatio(value:Float):Float return setFloat(EFX.EAXREVERB_DECAY_HFRATIO, value); - function set_decayLFRatio(value:Float):Float return setFloat(EFX.EAXREVERB_DECAY_LFRATIO, value); - function set_reflectionsGain(value:Float):Float return setFloat(EFX.EAXREVERB_REFLECTIONS_GAIN, value); - function set_reflectionsDelay(value:Float):Float return setFloat(EFX.EAXREVERB_REFLECTIONS_DELAY, value); - function set_reflectionsPan(value:Float):Float return setFloat(EFX.EAXREVERB_REFLECTIONS_PAN, value); - function set_lateReverbGain(value:Float):Float return setFloat(EFX.EAXREVERB_LATE_REVERB_GAIN, value); - function set_lateReverbDelay(value:Float):Float return setFloat(EFX.EAXREVERB_LATE_REVERB_DELAY, value); - function set_lateReverbPan(value:Float):Float return setFloat(EFX.EAXREVERB_LATE_REVERB_PAN, value); - function set_echoTime(value:Float):Float return setFloat(EFX.EAXREVERB_ECHO_TIME, value); - function set_echoDepth(value:Float):Float return setFloat(EFX.EAXREVERB_ECHO_DEPTH, value); - function set_modulationTime(value:Float):Float return setFloat(EFX.EAXREVERB_MODULATION_TIME, value); - function set_modulationDepth(value:Float):Float return setFloat(EFX.EAXREVERB_MODULATION_DEPTH, value); - function set_airAbsorptionGainHF(value:Float):Float return setFloat(EFX.EAXREVERB_AIR_ABSORPTION_GAINHF, value); - function set_HFReference(value:Float):Float return setFloat(EFX.EAXREVERB_HFREFERENCE, value); - function set_LFReference(value:Float):Float return setFloat(EFX.EAXREVERB_LFREFERENCE, value); - function set_roomRolloffFactor(value:Float):Float return setFloat(EFX.EAXREVERB_ROOM_ROLLOFF_FACTOR, value); - function set_decayHFLimit(value:Float):Float return setFloat(EFX.EAXREVERB_DECAY_HFLIMIT, value); - -} - - -// these effects dont work?? - -class ChorusEffect extends Effect { - public function new() super(EFX.EFFECT_CHORUS); -} - -class FrequencyShifterEffect extends Effect { - public function new() super(EFX.EFFECT_FREQUENCY_SHIFTER); -} - -class VocalMorpherEffect extends Effect { - public function new() super(EFX.EFFECT_VOCAL_MORPHER); -} - -class PitchShifterEffect extends Effect { - public function new() super(EFX.EFFECT_PITCH_SHIFTER); -} - -class AutowahEffect extends Effect { - public function new() super(EFX.EFFECT_AUTOWAH); -} \ No newline at end of file diff --git a/src/lemons/sound/filters/Filters.hx b/src/lemons/sound/filters/Filters.hx deleted file mode 100644 index e5a2d69..0000000 --- a/src/lemons/sound/filters/Filters.hx +++ /dev/null @@ -1,105 +0,0 @@ -package lemons.sound.filters; - -import openal.*; -import lemons.sound.Sound; -import lemons.util.IDestroyable; - -class Filter implements IDestroyable { - public var alFilter:EFX.Filter; - public function new(filterType:Int) { - EFX.genFilters(1, Sound.tempBytes); - alFilter = EFX.Filter.ofInt(Sound.tempBytes.getI32(0)); - EFX.filteri(alFilter, EFX.FILTER_TYPE, filterType); - } - - public function destroy():Void { - Sound.tempBytes.setI32(0, alFilter.toInt()); - EFX.deleteFilters(1, Sound.tempBytes); - } -} - -class LowPassFilter extends Filter { - @:isVar public var gain(get, set):Float; - @:isVar public var gainHF(get, set):Float; - - public function new() { - super(EFX.FILTER_LOWPASS); - - gain = 1; - gainHF = 1; - } - - function get_gain():Float - return EFX.getFilterf(alFilter, EFX.LOWPASS_GAIN); - function set_gain(value:Float):Float { - EFX.filterf(alFilter, EFX.LOWPASS_GAIN, value); - return gain = value; - } - - function get_gainHF():Float - return EFX.getFilterf(alFilter, EFX.LOWPASS_GAINHF); - function set_gainHF(value:Float):Float { - EFX.filterf(alFilter, EFX.LOWPASS_GAINHF, value); - return gainHF = value; - } -} - -class HighPassFilter extends Filter { - @:isVar public var gain(get, set):Float; - @:isVar public var gainLF(get, set):Float; - - public function new() { - super(EFX.FILTER_HIGHPASS); - - gain = 1; - gainLF = 1; - } - - function get_gain():Float - return EFX.getFilterf(alFilter, EFX.HIGHPASS_GAIN); - function set_gain(value:Float):Float { - EFX.filterf(alFilter, EFX.HIGHPASS_GAIN, value); - return gain = value; - } - - function get_gainLF():Float - return EFX.getFilterf(alFilter, EFX.HIGHPASS_GAINLF); - function set_gainLF(value:Float):Float { - EFX.filterf(alFilter, EFX.HIGHPASS_GAINLF, value); - return gainLF = value; - } -} - -class BandPassFilter extends Filter { - @:isVar public var gain(get, set):Float; - @:isVar public var gainLF(get, set):Float; - @:isVar public var gainHF(get, set):Float; - - public function new() { - super(EFX.FILTER_BANDPASS); - - gain = 1; - gainLF = 1; - gainHF = 1; - } - - function get_gain():Float - return EFX.getFilterf(alFilter, EFX.BANDPASS_GAIN); - function set_gain(value:Float):Float { - EFX.filterf(alFilter, EFX.BANDPASS_GAIN, value); - return gain = value; - } - - function get_gainLF():Float - return EFX.getFilterf(alFilter, EFX.BANDPASS_GAINLF); - function set_gainLF(value:Float):Float { - EFX.filterf(alFilter, EFX.BANDPASS_GAINLF, value); - return gainHF = value; - } - function get_gainHF():Float - return EFX.getFilterf(alFilter, EFX.BANDPASS_GAINHF); - function set_gainHF(value:Float):Float { - EFX.filterf(alFilter, EFX.BANDPASS_GAINHF, value); - return gainHF = value; - } -} \ No newline at end of file diff --git a/tools/project/Project.hx b/tools/project/Project.hx index 7739d85..95f0fd0 100644 --- a/tools/project/Project.hx +++ b/tools/project/Project.hx @@ -11,6 +11,8 @@ class Project { var resourceFolder:String = ''; var mainClass:String = ''; + var preferedRenderer:String = ''; + var gameWidth:Int = 0; var gameHeight:Int = 0; @@ -39,6 +41,8 @@ class Project { windowTitle = projectFile.sections['window']['title'] ?? 'lemons project'; windowResizable = projectFile.sections['window']['resizable'] ?? true; + preferedRenderer = projectFile.globalVariables['renderer'] ?? 'OPENGL'; // TODO: add "BEST" option where the game checks what renderers are avalible on the gpu, probabbly in a list of vulkan, then directx and at last opengl + for (defineName => define in projectFile.sections['defines']) defines[defineName] = Std.string(define); // in this case we want the value to be a string @@ -55,8 +59,9 @@ class Project { for (defineName => define in defines) list.push('-D $defineName${define == '' ? '' : '=\"$define\"'}'); for (library => version in libraries) list.push('-L $library${version == '' ? '' : ':$version'}'); list.push('-L lemons'); - + list.push('-D gameSize=${gameWidth}x${gameHeight}'); + list.push('-D renderer=${preferedRenderer}'); final windowSettings = {title: windowTitle, resizable: windowResizable}; list.push('-D windowSettings=${run(windowSettings)}'); From 7b2e562e77bbc200e41583e9b65fbb571d21a844 Mon Sep 17 00:00:00 2001 From: ThePlank <75984453+ThePlank@users.noreply.github.com> Date: Sun, 30 Jun 2024 15:39:08 +0200 Subject: [PATCH 12/19] render stuffff --- src/lemons/App.hx | 4 +- src/lemons/Time.hx | 3 ++ src/lemons/display/Color.hx | 3 ++ src/lemons/display/Colour.hx | 44 +++++++++++++++++++ src/lemons/display/render/GLFWWindow.hx | 12 ++++- src/lemons/display/render/Renderer.hx | 21 ++++++++- src/lemons/display/render/_backend/OpenGL.hx | 26 ++++++----- src/lemons/display/render/drivers/Driver.hx | 12 +++++ .../display/render/drivers/OpenGLDriver.hx | 25 +++++++++++ src/lemons/import.hx | 2 + tools/Main.hx | 2 + tools/commands/BuildCommand.hx | 11 ++++- tools/commands/TestCommand.hx | 12 +++++ tools/import.hx | 1 + tools/project/Project.hx | 31 ++++++++----- 15 files changed, 178 insertions(+), 31 deletions(-) create mode 100644 src/lemons/display/Color.hx create mode 100644 src/lemons/display/Colour.hx create mode 100644 src/lemons/display/render/drivers/Driver.hx create mode 100644 src/lemons/display/render/drivers/OpenGLDriver.hx create mode 100644 src/lemons/import.hx create mode 100644 tools/commands/TestCommand.hx diff --git a/src/lemons/App.hx b/src/lemons/App.hx index c6a9751..2fe4d33 100644 --- a/src/lemons/App.hx +++ b/src/lemons/App.hx @@ -31,7 +31,9 @@ class App { init(); - Time.startLoop(() -> {}, this); + Time.startLoop(() -> { + renderer.prepare(); + }, this); } /** diff --git a/src/lemons/Time.hx b/src/lemons/Time.hx index e3b5c11..2531e30 100644 --- a/src/lemons/Time.hx +++ b/src/lemons/Time.hx @@ -6,11 +6,14 @@ class Time { static function get_fps():Int return Math.round(1 / delta); + static public var desiredDelta:Float = 1 / 60; + static var lastTimestamp:Float = 0; static public function startLoop(updateFunc:Void->Void, app:lemons.App) { while (app.window.live) { final time:Float = app.window.time; delta = time - lastTimestamp; + if (delta <= desiredDelta) continue; lastTimestamp = time; updateFunc(); diff --git a/src/lemons/display/Color.hx b/src/lemons/display/Color.hx new file mode 100644 index 0000000..84e196c --- /dev/null +++ b/src/lemons/display/Color.hx @@ -0,0 +1,3 @@ +package lemons.display; + +typedef Color = lemons.display.Colour; \ No newline at end of file diff --git a/src/lemons/display/Colour.hx b/src/lemons/display/Colour.hx new file mode 100644 index 0000000..a82b102 --- /dev/null +++ b/src/lemons/display/Colour.hx @@ -0,0 +1,44 @@ +package lemons.display; + +abstract Colour(Int) to Int { + public var redFloat(get, never):Float; + public var greenFloat(get, never):Float; + public var blueFloat(get, never):Float; + public var alphaFloat(get, never):Float; + + public var red(get, never):Int; + public var green(get, never):Int; + public var blue(get, never):Int; + public var alpha(get, never):Int; + + @:from + static function fromInt(int:Int) { + return new Colour(int); + } + + public function new(int:Int) { + this = int; + } + + function get_alpha():Int + return ((this >> 24) & 0xFF); + function get_red():Int + return ((this >> 16) & 0xFF); + function get_green():Int + return ((this >> 8) & 0xFF); + function get_blue():Int + return ((this) & 0xFF); + + function get_alphaFloat():Float + return alpha / 255; + function get_redFloat():Float + return red / 255; + function get_greenFloat():Float + return green / 255; + function get_blueFloat():Float + return blue / 255; + + function toString():String + return '#' + this.hex(8); +} + diff --git a/src/lemons/display/render/GLFWWindow.hx b/src/lemons/display/render/GLFWWindow.hx index 11e6ddf..73cabbd 100644 --- a/src/lemons/display/render/GLFWWindow.hx +++ b/src/lemons/display/render/GLFWWindow.hx @@ -9,14 +9,22 @@ class GLFWWindow extends Window { public function new(width:Int, height:Int, title:String) { super(width, height, title); - if (!initialized) GLFW.glfwInit(); + if (!initialized) { + GLFW.glfwInit(); + GLFW.glfwInitHint(GLFW.GLFW_CONTEXT_VERSION_MAJOR, 3); + GLFW.glfwInitHint(GLFW.GLFW_CONTEXT_VERSION_MINOR, 3); + GLFW.glfwInitHint(GLFW.GLFW_OPENGL_PROFILE, GLFW.GLFW_OPENGL_CORE_PROFILE); + } + windowHandle = GLFW.glfwCreateWindow(width, height, title, null, null); } override public function close():Void {} - override public function update():Void + override public function update():Void { + GLFW.glfwSwapBuffers(windowHandle); GLFW.glfwPollEvents(); + } override function get_width():Int { var wid = 0; diff --git a/src/lemons/display/render/Renderer.hx b/src/lemons/display/render/Renderer.hx index 1b43abf..b2bec2c 100644 --- a/src/lemons/display/render/Renderer.hx +++ b/src/lemons/display/render/Renderer.hx @@ -1,7 +1,7 @@ package lemons.display.render; import lemons.display.render.*; -import lemons.display.render._backend.*; +import lemons.display.render.drivers.*; enum abstract RendererType(String) from String { var OPENGL = "OPENGL"; @@ -13,9 +13,26 @@ enum abstract RendererType(String) from String { @:access(lemons.display.render.GLFWWindow.windowHandle) class Renderer { var window:Window; + public var driver:Driver; public function new(renderer:RendererType, width:Int, height:Int, window:Window) { - this.window = window; + + driver = switch (renderer) { + case OPENGL: new OpenGLDriver(); + default: null; + } + + driver.selectWindow(window); + var successs:Bool = driver.init(); + + if (!successs) + throw 'unable to initialize driver'; + + driver.setViewport(0, 0, width, height); + } + + public function prepare() { + driver.prepare(); } } \ No newline at end of file diff --git a/src/lemons/display/render/_backend/OpenGL.hx b/src/lemons/display/render/_backend/OpenGL.hx index 91f619d..cfbf10e 100644 --- a/src/lemons/display/render/_backend/OpenGL.hx +++ b/src/lemons/display/render/_backend/OpenGL.hx @@ -55,7 +55,7 @@ class OpenGL { public static final GL_TRUE:Int = 1; public static final GL_ONE:Int = 1; public static final GL_INVALID_INDEX:Int = 0xFFFFFFFF; - public static final GL_TIMEOUT_IGNORED:Int = 0xFFFFFFFFFFFFFFFF; + // public static final GL_TIMEOUT_IGNORED:Int = 0xFFFFFFFFFFFFFFFF; public static final GL_POINTS:Int = 0x0000; public static final GL_LINES:Int = 0x0001; public static final GL_LINE_LOOP:Int = 0x0002; @@ -1332,6 +1332,8 @@ class OpenGL { public static final GL_CLEAR_TEXTURE:Int = 0x9365; public static final GL_NUM_SAMPLE_COUNTS:Int = 0x9380; + public static function gladLoadGl():Int { return 0; } + public static function glActiveShaderProgram(pipeline:Int, program:Int):Void {} public static function glActiveTexture(texture:Int):Void {} public static function glAttachShader(program:Int, shader:Int):Void {} @@ -1413,9 +1415,9 @@ class OpenGL { public static function glCreateShader(type:Int):Int { return 0; } public static function glCreateShaderProgramv(type:Int, count:Int, strings:hl.NativeArray):Int { return 0; } public static function glCullFace(mode:Int):Void {} - public static function glDebugMessageCallback(callback:(Int->Int->Int->Int->Int->hl.Bytes), userParam:hl.Bytes):Void {} - public static function glDebugMessageControl(source:Int, type:Int, severity:Int, count:Int, ids:hl.Ref, enabled:Int):Void {} - public static function glDebugMessageInsert(source:Int, type:Int, id:Int, severity:Int, length:Int, buf:String):Void {} + // public static function glDebugMessageCallback(callback:(Int->Int->Int->Int->Int)->hl.Bytes, userParam:hl.Bytes):Void {} + // public static function glDebugMessageControl(source:Int, type:Int, severity:Int, count:Int, ids:hl.Ref, enabled:Int):Void {} + // public static function glDebugMessageInsert(source:Int, type:Int, id:Int, severity:Int, length:Int, buf:String):Void {} public static function glDeleteBuffers(n:Int, buffers:hl.Ref):Void {} public static function glDeleteFramebuffers(n:Int, framebuffers:hl.Ref):Void {} public static function glDeleteProgram(program:Int):Void {} @@ -1737,9 +1739,9 @@ class OpenGL { public static function glTexCoordP4uiv(type:Int, coords:hl.Ref):Void {} public static function glTexImage1D(target:Int, level:Int, internalformat:Int, width:Int, border:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} public static function glTexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} - public static function glTexImage2DMultisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, fixedsamplelocations:Int):Void {} + public static function glTexImage2_d_multisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, fixedsamplelocations:Int):Void {} public static function glTexImage3D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} - public static function glTexImage3DMultisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, depth:Int, fixedsamplelocations:Int):Void {} + public static function glTexImage3_d_multisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, depth:Int, fixedsamplelocations:Int):Void {} public static function glTexParameterIiv(target:Int, pname:Int, params:hl.Ref):Void {} public static function glTexParameterIuiv(target:Int, pname:Int, params:hl.Ref):Void {} public static function glTexParameterf(target:Int, pname:Int, param:hl.F32):Void {} @@ -1748,9 +1750,9 @@ class OpenGL { public static function glTexParameteriv(target:Int, pname:Int, params:hl.Ref):Void {} public static function glTexStorage1D(target:Int, levels:Int, internalformat:Int, width:Int):Void {} public static function glTexStorage2D(target:Int, levels:Int, internalformat:Int, width:Int, height:Int):Void {} - public static function glTexStorage2DMultisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, fixedsamplelocations:Int):Void {} + public static function glTexStorage2_d_multisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, fixedsamplelocations:Int):Void {} public static function glTexStorage3D(target:Int, levels:Int, internalformat:Int, width:Int, height:Int, depth:Int):Void {} - public static function glTexStorage3DMultisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, depth:Int, fixedsamplelocations:Int):Void {} + public static function glTexStorage3_d_multisample(target:Int, samples:Int, internalformat:Int, width:Int, height:Int, depth:Int, fixedsamplelocations:Int):Void {} public static function glTexSubImage1D(target:Int, level:Int, xoffset:Int, width:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} public static function glTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} public static function glTexSubImage3D(target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, type:Int, pixels:hl.Bytes):Void {} @@ -1872,8 +1874,8 @@ class OpenGL { public static function glVertexAttribI4ui(index:Int, x:Int, y:Int, z:Int, w:Int):Void {} public static function glVertexAttribI4uiv(index:Int, v:hl.Ref):Void {} public static function glVertexAttribI4usv(index:Int, v:hl.Ref):Void {} - public static function glVertexAttribIFormat(attribindex:Int, size:Int, type:Int, relativeoffset:Int):Void {} - public static function glVertexAttribIPointer(index:Int, size:Int, type:Int, stride:Int, pointer:hl.Bytes):Void {} + public static function glVertexAttrib_i_format(attribindex:Int, size:Int, type:Int, relativeoffset:Int):Void {} + public static function glVertexAttrib_i_pointer(index:Int, size:Int, type:Int, stride:Int, pointer:hl.Bytes):Void {} public static function glVertexAttribL1d(index:Int, x:hl.F64):Void {} public static function glVertexAttribL1dv(index:Int, v:hl.Ref):Void {} public static function glVertexAttribL2d(index:Int, x:hl.F64, y:hl.F64):Void {} @@ -1882,8 +1884,8 @@ class OpenGL { public static function glVertexAttribL3dv(index:Int, v:hl.Ref):Void {} public static function glVertexAttribL4d(index:Int, x:hl.F64, y:hl.F64, z:hl.F64, w:hl.F64):Void {} public static function glVertexAttribL4dv(index:Int, v:hl.Ref):Void {} - public static function glVertexAttribLFormat(attribindex:Int, size:Int, type:Int, relativeoffset:Int):Void {} - public static function glVertexAttribLPointer(index:Int, size:Int, type:Int, stride:Int, pointer:hl.Bytes):Void {} + public static function glVertexAttrib_l_format(attribindex:Int, size:Int, type:Int, relativeoffset:Int):Void {} + public static function glVertexAttrib_l_pointer(index:Int, size:Int, type:Int, stride:Int, pointer:hl.Bytes):Void {} public static function glVertexAttribP1ui(index:Int, type:Int, normalized:Int, value:Int):Void {} public static function glVertexAttribP1uiv(index:Int, type:Int, normalized:Int, value:hl.Ref):Void {} public static function glVertexAttribP2ui(index:Int, type:Int, normalized:Int, value:Int):Void {} diff --git a/src/lemons/display/render/drivers/Driver.hx b/src/lemons/display/render/drivers/Driver.hx new file mode 100644 index 0000000..3bf1396 --- /dev/null +++ b/src/lemons/display/render/drivers/Driver.hx @@ -0,0 +1,12 @@ +package lemons.display.render.drivers; + +import lemons.display.render.Window; + +class Driver { + public var backgroundColour:Colour = 0x00000000; + public function new() {} + public function init():Bool { return false; } + public function prepare() {} + public function setViewport(x:Int, y:Int, width:Int, height:Int) {} + public function selectWindow(window:Window) {} +} \ No newline at end of file diff --git a/src/lemons/display/render/drivers/OpenGLDriver.hx b/src/lemons/display/render/drivers/OpenGLDriver.hx new file mode 100644 index 0000000..d9992f1 --- /dev/null +++ b/src/lemons/display/render/drivers/OpenGLDriver.hx @@ -0,0 +1,25 @@ +package lemons.display.render.drivers; + +import lemons.display.render._backend.OpenGL; +import lemons.display.render._backend.GLFW; +import lemons.display.render.Window; + +class OpenGLDriver extends Driver { + override public function init():Bool { + return OpenGL.gladLoadGl() != 0; + } + + override public function selectWindow(window:Window) { + GLFW.glfwMakeContextCurrent((cast window).windowHandle); + } + + override public function setViewport(x:Int, y:Int, width:Int, height:Int) { + OpenGL.glViewport(x, y, width, height); + } + + override public function prepare() { + OpenGL.glClearColor(backgroundColour.redFloat, backgroundColour.greenFloat, backgroundColour.blueFloat, backgroundColour.alphaFloat); + OpenGL.glClear(OpenGL.GL_COLOR_BUFFER_BIT); + } + +} \ No newline at end of file diff --git a/src/lemons/import.hx b/src/lemons/import.hx new file mode 100644 index 0000000..ee2c098 --- /dev/null +++ b/src/lemons/import.hx @@ -0,0 +1,2 @@ +import lemons.display.Colour; +using StringTools; \ No newline at end of file diff --git a/tools/Main.hx b/tools/Main.hx index 843600e..c80dad6 100644 --- a/tools/Main.hx +++ b/tools/Main.hx @@ -27,6 +27,8 @@ class Main { new tools.commands.DisplayCommand(); case 'rebuild': new tools.commands.RebuildCommand(); + case 'test': + new tools.commands.TestCommand(); default: Sys.println('\033[1;31merm... error\033[0m invalid command: $argThing'); diff --git a/tools/commands/BuildCommand.hx b/tools/commands/BuildCommand.hx index 28f43aa..bd95b1b 100644 --- a/tools/commands/BuildCommand.hx +++ b/tools/commands/BuildCommand.hx @@ -5,6 +5,9 @@ import tools.project.Project; import tools.project.Ini; class BuildCommand { + public var parsedProject:Project; + public var exitCode:Int; + public function new() { Sys.setCwd(originalPath); @@ -17,8 +20,12 @@ class BuildCommand { return; } - var parsedProject:Project = new Project(new Ini(project)); + parsedProject = new Project(new Ini(project)); + + exitCode = Sys.command('haxe ' + parsedProject.toArgList().join(' ')); - Sys.command('haxe ' + parsedProject.toArgList().join(' ')); + var libraryFiles:Array = sys.FileSystem.readDirectory(libPath + '/liblemons/out/').filter((str) -> return !str.contains('.pdb')); + for (file in libraryFiles) + sys.io.File.copy(libPath + '/liblemons/out/' + file, parsedProject.getOutputPath() + '/' + file); } } \ No newline at end of file diff --git a/tools/commands/TestCommand.hx b/tools/commands/TestCommand.hx new file mode 100644 index 0000000..2806283 --- /dev/null +++ b/tools/commands/TestCommand.hx @@ -0,0 +1,12 @@ +package tools.commands; + +class TestCommand { + public function new() { + var build:BuildCommand = new BuildCommand(); + + if (build.exitCode != 0) return; + + Sys.command('cd', [build.parsedProject.getOutputPath()]); + Sys.command(build.parsedProject.getOutputFilename(), []); + } +} \ No newline at end of file diff --git a/tools/import.hx b/tools/import.hx index 41ee03a..c8da5bd 100644 --- a/tools/import.hx +++ b/tools/import.hx @@ -2,3 +2,4 @@ import tools.Util.libPath; import tools.Util.originalPath; import sys.io.File; using haxe.io.Path; +using StringTools; diff --git a/tools/project/Project.hx b/tools/project/Project.hx index 95f0fd0..e2b28a3 100644 --- a/tools/project/Project.hx +++ b/tools/project/Project.hx @@ -5,24 +5,26 @@ import haxe.Serializer.run; class Project { - var sources:Array = []; var output:String = ''; var filename:String = ''; - var resourceFolder:String = ''; - var mainClass:String = ''; - var preferedRenderer:String = ''; + public var sources:Array = []; - var gameWidth:Int = 0; - var gameHeight:Int = 0; + public var resourceFolder:String = ''; + public var mainClass:String = ''; - var windowTitle:String = ''; - var windowResizable:Bool = false; + public var preferedRenderer:String = ''; - var defines:Map = []; - var libraries:Map = []; + public var gameWidth:Int = 0; + public var gameHeight:Int = 0; - var useCCompilation:Bool = false; + public var windowTitle:String = ''; + public var windowResizable:Bool = false; + + public var defines:Map = []; + public var libraries:Map = []; + + public var useCCompilation:Bool = false; public function new(projectFile:Ini, ?useCCompilation:Bool = false) { this.useCCompilation = useCCompilation; @@ -53,7 +55,7 @@ class Project { public function toArgList():Array { var list:Array = []; - list.push('--hl ' + '$output/$filename${useCCompilation ? '.c' : '.hl'}'.normalize()); + list.push('--hl ' + getOutputPath() + '/' + getOutputFilename()); list.push('-m $mainClass'); for (source in sources) list.push('-p $source'); for (defineName => define in defines) list.push('-D $defineName${define == '' ? '' : '=\"$define\"'}'); @@ -69,4 +71,9 @@ class Project { return list; } + public function getOutputPath():String + return output.normalize(); + + public function getOutputFilename():String + return '$filename${useCCompilation ? '.c' : '.hl'}'.normalize(); } \ No newline at end of file From d5dcf2b4b7c36386003c4903347feb79d75cc793 Mon Sep 17 00:00:00 2001 From: plank <75984453+ThePlank@users.noreply.github.com> Date: Mon, 5 Aug 2024 19:16:59 +0200 Subject: [PATCH 13/19] vertex array --- src/lemons/display/render/GLFWWindow.hx | 11 +++---- src/lemons/display/render/Renderer.hx | 6 +++- src/lemons/display/render/VertexArray.hx | 18 +++++++++++ src/lemons/display/render/_backend/GLFW.hx | 16 +++++----- src/lemons/display/render/_backend/OpenGL.hx | 25 +++++++-------- src/lemons/display/render/drivers/Driver.hx | 2 ++ .../display/render/drivers/OpenGLDriver.hx | 12 +++++++ tools/Main.hx | 4 ++- tools/Util.hx | 23 ++++++++++++++ tools/commands/BuildCommand.hx | 6 ++-- tools/commands/DisplayCommand.hx | 2 +- tools/commands/RebuildCommand.hx | 7 +++-- tools/commands/SetupCommand.hx | 22 +++++++++++++ tools/commands/TestCommand.hx | 2 +- tools/import.hx | 3 +- tools/project/Ini.hx | 31 ++++++++++++++++++- 16 files changed, 151 insertions(+), 39 deletions(-) create mode 100644 src/lemons/display/render/VertexArray.hx create mode 100644 tools/commands/SetupCommand.hx diff --git a/src/lemons/display/render/GLFWWindow.hx b/src/lemons/display/render/GLFWWindow.hx index 73cabbd..bbcb573 100644 --- a/src/lemons/display/render/GLFWWindow.hx +++ b/src/lemons/display/render/GLFWWindow.hx @@ -9,14 +9,13 @@ class GLFWWindow extends Window { public function new(width:Int, height:Int, title:String) { super(width, height, title); - if (!initialized) { + if (!initialized) GLFW.glfwInit(); - GLFW.glfwInitHint(GLFW.GLFW_CONTEXT_VERSION_MAJOR, 3); - GLFW.glfwInitHint(GLFW.GLFW_CONTEXT_VERSION_MINOR, 3); - GLFW.glfwInitHint(GLFW.GLFW_OPENGL_PROFILE, GLFW.GLFW_OPENGL_CORE_PROFILE); - } - windowHandle = GLFW.glfwCreateWindow(width, height, title, null, null); + GLFW.glfwInitHint(GLFW.GLFW_CONTEXT_VERSION_MAJOR, 3); + GLFW.glfwInitHint(GLFW.GLFW_CONTEXT_VERSION_MINOR, 3); + GLFW.glfwInitHint(GLFW.GLFW_OPENGL_PROFILE, GLFW.GLFW_OPENGL_CORE_PROFILE); + windowHandle = GLFW.glfwCreateWindow(width, height, title, (0:hl.I64), (0:hl.I64)); } override public function close():Void {} diff --git a/src/lemons/display/render/Renderer.hx b/src/lemons/display/render/Renderer.hx index b2bec2c..de46127 100644 --- a/src/lemons/display/render/Renderer.hx +++ b/src/lemons/display/render/Renderer.hx @@ -14,7 +14,7 @@ enum abstract RendererType(String) from String { class Renderer { var window:Window; public var driver:Driver; - + public function new(renderer:RendererType, width:Int, height:Int, window:Window) { this.window = window; @@ -32,6 +32,10 @@ class Renderer { driver.setViewport(0, 0, width, height); } + public function createVertexArray():VertexArray { + return new VertexArray(driver); + } + public function prepare() { driver.prepare(); } diff --git a/src/lemons/display/render/VertexArray.hx b/src/lemons/display/render/VertexArray.hx new file mode 100644 index 0000000..dedeab1 --- /dev/null +++ b/src/lemons/display/render/VertexArray.hx @@ -0,0 +1,18 @@ +package lemons.display.render; + +import lemons.display.render.drivers.Driver; + +class VertexArray { + var _nativeHandle:Int = -1; + var driver:Driver; + + public function new(driver:Driver) { + this.driver = driver; + _nativeHandle = driver.createNativeVertexArray(); + trace(_nativeHandle); + } + + public function bufferData(arr:Array) { + driver.bufferVertexArray(_nativeHandle, arr); + } +} \ No newline at end of file diff --git a/src/lemons/display/render/_backend/GLFW.hx b/src/lemons/display/render/_backend/GLFW.hx index fc07e76..a2a9b62 100644 --- a/src/lemons/display/render/_backend/GLFW.hx +++ b/src/lemons/display/render/_backend/GLFW.hx @@ -1,8 +1,8 @@ package lemons.display.render._backend; -typedef NativeGLFWMonitor = hl.Abstract<"GLFWmonitor*">; -typedef NativeGLFWWindow = hl.Abstract<"GLFWwindow*">; -typedef NativeGLFWCursor = hl.Abstract<"GLFWcursor*">; +typedef NativeGLFWMonitor = hl.I64; +typedef NativeGLFWWindow = hl.I64; +typedef NativeGLFWCursor = hl.I64; @:structInit class JoystickState { @@ -361,14 +361,14 @@ class GLFW { public static function glfwSwapInterval(interval:Int):Void {} public static function glfwExtensionSupported(extension:String):Int { return 0; } - public static function glfwGetPrimaryMonitor():NativeGLFWMonitor { return null; } + public static function glfwGetPrimaryMonitor():NativeGLFWMonitor { return 0; } public static function glfwGetMonitorPos(monitor:NativeGLFWMonitor, xPos:hl.Ref, yPos:hl.Ref):Void {} public static function glfwGetMonitorWorkarea(monitor:NativeGLFWMonitor, xPos:hl.Ref, yPos:hl.Ref, width:hl.Ref, height:hl.Ref):Void {} public static function glfwGetMonitorPhysicalSize(monitor:NativeGLFWMonitor, widthMM:hl.Ref, heightMM:hl.Ref):Void {} public static function glfwGetMonitorContentScale(monitor:NativeGLFWMonitor, xScale:hl.Ref, yScale:hl.Ref):Void {} public static function glfwGetMonitorName(monitor:NativeGLFWMonitor):hl.Bytes { return null; } - public static function glfwCreateWindow(width:Int, height:Int, title:String, monitor:NativeGLFWMonitor, share:Null):NativeGLFWWindow { return null; } + public static function glfwCreateWindow(width:Int, height:Int, title:String, monitor:NativeGLFWMonitor, share:NativeGLFWWindow):NativeGLFWWindow { return 0; } public static function glfwDestroyWindow(window:NativeGLFWWindow):Void {} public static function glfwWindowShouldClose(window:NativeGLFWWindow):Int { return 0; } public static function glfwSetWindowShouldClose(window:NativeGLFWWindow, value:Int):Void {} @@ -393,19 +393,19 @@ class GLFW { public static function glfwHideWindow(window:NativeGLFWWindow):Void {} public static function glfwFocusWindow(window:NativeGLFWWindow):Void {} public static function glfwRequestWindowAttention(window:NativeGLFWWindow):Void {} - public static function glfwGetWindowMonitor(window:NativeGLFWWindow):NativeGLFWMonitor { return null; } + public static function glfwGetWindowMonitor(window:NativeGLFWWindow):NativeGLFWMonitor { return 0; } public static function glfwSetWindowMonitor(window:NativeGLFWWindow, monitor:NativeGLFWMonitor, xPos:Int, yPos:Int, width:Int, height:Int, refreshRate:Int):Void {} public static function glfwGetWindowAttrib(window:NativeGLFWWindow, attrib:Int):Int { return 0; } public static function glfwSetWindowAttrib(window:NativeGLFWWindow, attrib:Int, value:Int):Void {} public static function glfwGetInputMode(window:NativeGLFWWindow, mode:Int):Int { return 0; } public static function glfwSetInputMode(window:NativeGLFWWindow, mode:Int, value:Int):Void {} public static function glfwMakeContextCurrent(window:NativeGLFWWindow):Void {} - public static function glfwGetCurrentContext():NativeGLFWWindow { return null; } + public static function glfwGetCurrentContext():NativeGLFWWindow { return 0; } public static function glfwSetClipboardString(window:NativeGLFWWindow, string:String):Void {} public static function glfwGetClipboardString(window:NativeGLFWWindow):hl.Bytes { return null; } public static function glfwSwapBuffers(window:NativeGLFWWindow):Void {} - public static function glfwCreateStandardCursor(shape:Int):NativeGLFWCursor { return null; } + public static function glfwCreateStandardCursor(shape:Int):NativeGLFWCursor { return 0; } public static function glfwDestroyCursor(cursor:NativeGLFWCursor):Void {} public static function glfwSetCursor(window:NativeGLFWWindow, cursor:NativeGLFWCursor):Void {} public static function glfwRawMouseMotionSupported():Int { return 0; } diff --git a/src/lemons/display/render/_backend/OpenGL.hx b/src/lemons/display/render/_backend/OpenGL.hx index cfbf10e..e732ba7 100644 --- a/src/lemons/display/render/_backend/OpenGL.hx +++ b/src/lemons/display/render/_backend/OpenGL.hx @@ -4,7 +4,6 @@ package lemons.display.render._backend; -@SuppressWarnings("checkstyle:CodeSimilarity") @:hlNative('lemons', 'gl_') class OpenGL { public static final GL_DEPTH_BUFFER_BIT:Int = 0x00000100; @@ -1332,8 +1331,6 @@ class OpenGL { public static final GL_CLEAR_TEXTURE:Int = 0x9365; public static final GL_NUM_SAMPLE_COUNTS:Int = 0x9380; - public static function gladLoadGl():Int { return 0; } - public static function glActiveShaderProgram(pipeline:Int, program:Int):Void {} public static function glActiveTexture(texture:Int):Void {} public static function glAttachShader(program:Int, shader:Int):Void {} @@ -1415,7 +1412,7 @@ class OpenGL { public static function glCreateShader(type:Int):Int { return 0; } public static function glCreateShaderProgramv(type:Int, count:Int, strings:hl.NativeArray):Int { return 0; } public static function glCullFace(mode:Int):Void {} - // public static function glDebugMessageCallback(callback:(Int->Int->Int->Int->Int)->hl.Bytes, userParam:hl.Bytes):Void {} + // public static function glDebugMessageCallback(callback:(Int->Int->Int->Int->Int->hl.Bytes), userParam:hl.Bytes):Void {} // public static function glDebugMessageControl(source:Int, type:Int, severity:Int, count:Int, ids:hl.Ref, enabled:Int):Void {} // public static function glDebugMessageInsert(source:Int, type:Int, id:Int, severity:Int, length:Int, buf:String):Void {} public static function glDeleteBuffers(n:Int, buffers:hl.Ref):Void {} @@ -1480,15 +1477,15 @@ class OpenGL { public static function glFramebufferTexture3D(target:Int, attachment:Int, textarget:Int, texture:Int, level:Int, zoffset:Int):Void {} public static function glFramebufferTextureLayer(target:Int, attachment:Int, texture:Int, level:Int, layer:Int):Void {} public static function glFrontFace(mode:Int):Void {} - public static function glGenBuffers(n:Int, buffers:hl.Ref):Void {} - public static function glGenFramebuffers(n:Int, framebuffers:hl.Ref):Void {} - public static function glGenProgramPipelines(n:Int, pipelines:hl.Ref):Void {} - public static function glGenQueries(n:Int, ids:hl.Ref):Void {} - public static function glGenRenderbuffers(n:Int, renderbuffers:hl.Ref):Void {} - public static function glGenSamplers(count:Int, samplers:hl.Ref):Void {} - public static function glGenTextures(n:Int, textures:hl.Ref):Void {} - public static function glGenTransformFeedbacks(n:Int, ids:hl.Ref):Void {} - public static function glGenVertexArrays(n:Int, arrays:hl.Ref):Void {} + public static function glGenBuffers():Int { return 0; } + public static function glGenFramebuffers():Int { return 0; } + public static function glGenProgramPipelines():Int { return 0; } + public static function glGenQueries():Int { return 0; } + public static function glGenRenderbuffers():Int { return 0; } + public static function glGenSamplers():Int { return 0; } + public static function glGenTextures():Int { return 0; } + public static function glGenTransformFeedbacks():Int { return 0; } + public static function glGenVertexArrays():Int { return 0; } public static function glGenerateMipmap(target:Int):Void {} public static function glGetActiveAtomicCounterBufferiv(program:Int, bufferIndex:Int, pname:Int, params:hl.Ref):Void {} public static function glGetActiveAttrib(program:Int, index:Int, bufSize:Int, length:hl.Ref, size:hl.Ref, type:hl.Ref, name:String):Void {} @@ -1907,4 +1904,6 @@ class OpenGL { public static function glViewportIndexedf(index:Int, x:hl.F32, y:hl.F32, w:hl.F32, h:hl.F32):Void {} public static function glViewportIndexedfv(index:Int, v:hl.Ref):Void {} public static function glWaitSync(sync:hl.Abstract<"GLSync">, flags:Int, timeout:hl.I64):Void {} + + public static function gladLoadGl():Int { return 0; } } \ No newline at end of file diff --git a/src/lemons/display/render/drivers/Driver.hx b/src/lemons/display/render/drivers/Driver.hx index 3bf1396..638465b 100644 --- a/src/lemons/display/render/drivers/Driver.hx +++ b/src/lemons/display/render/drivers/Driver.hx @@ -9,4 +9,6 @@ class Driver { public function prepare() {} public function setViewport(x:Int, y:Int, width:Int, height:Int) {} public function selectWindow(window:Window) {} + public function createNativeVertexArray():Dynamic { return null; } + public function bufferVertexArray(vertArray:Dynamic, verticies:Array) {} } \ No newline at end of file diff --git a/src/lemons/display/render/drivers/OpenGLDriver.hx b/src/lemons/display/render/drivers/OpenGLDriver.hx index d9992f1..b4ebd9d 100644 --- a/src/lemons/display/render/drivers/OpenGLDriver.hx +++ b/src/lemons/display/render/drivers/OpenGLDriver.hx @@ -22,4 +22,16 @@ class OpenGLDriver extends Driver { OpenGL.glClear(OpenGL.GL_COLOR_BUFFER_BIT); } + override public function createNativeVertexArray():Dynamic { + var buf = OpenGL.glGenBuffers(); + return buf; + } + + override public function bufferVertexArray(vertArray:Dynamic, verticies:Array) { + var size = verticies.length * 4; + + OpenGL.glBindBuffer(OpenGL.GL_ARRAY_BUFFER, vertArray); + OpenGL.glBufferData(OpenGL.GL_ARRAY_BUFFER, size, hl.Bytes.getArray(verticies), OpenGL.GL_STATIC_DRAW); + } + } \ No newline at end of file diff --git a/tools/Main.hx b/tools/Main.hx index c80dad6..0e40ea5 100644 --- a/tools/Main.hx +++ b/tools/Main.hx @@ -4,7 +4,7 @@ class Main { public function new() { Sys.setCwd(libPath); - var args = Sys.args(); + args = Sys.args(); originalPath = args.pop(); if (args.length == 0) { @@ -29,6 +29,8 @@ class Main { new tools.commands.RebuildCommand(); case 'test': new tools.commands.TestCommand(); + case 'setup': + new tools.commands.SetupCommand(); default: Sys.println('\033[1;31merm... error\033[0m invalid command: $argThing'); diff --git a/tools/Util.hx b/tools/Util.hx index 4ef574a..9fced0d 100644 --- a/tools/Util.hx +++ b/tools/Util.hx @@ -1,12 +1,18 @@ package tools; import sys.io.Process; +import tools.project.Ini; using StringTools; class Util { + @:allow(tools.Main) + private static var args:Array = []; + public static var libPath:String = ''; public static var originalPath:String = ''; + public static var setup:Ini; + private static function __init__() { var process = new Process('haxelib', ['path', 'lemons']); @@ -23,5 +29,22 @@ class Util { process.close(); + + Sys.setCwd(libPath); + + try { + setup = new Ini().parse(File.getContent('setup.ini')); + } catch(e) { + setup = new Ini(); + setup.globalVariables['liblemonsDirectory'] = '$libPath/liblemons'; + File.saveContent('setup.ini', setup.toString()); + } + } + + public static function iterateThroughArguments(callback:String->Bool, escapeOnReturn:Bool = false) { + for (arg in args) { + var theReturn:Bool = callback(args.shift()); + if (escapeOnReturn && theReturn) return; + } } } \ No newline at end of file diff --git a/tools/commands/BuildCommand.hx b/tools/commands/BuildCommand.hx index bd95b1b..8f51138 100644 --- a/tools/commands/BuildCommand.hx +++ b/tools/commands/BuildCommand.hx @@ -20,12 +20,12 @@ class BuildCommand { return; } - parsedProject = new Project(new Ini(project)); + parsedProject = new Project(new Ini().parse(project)); exitCode = Sys.command('haxe ' + parsedProject.toArgList().join(' ')); - var libraryFiles:Array = sys.FileSystem.readDirectory(libPath + '/liblemons/out/').filter((str) -> return !str.contains('.pdb')); + var libraryFiles:Array = sys.FileSystem.readDirectory(setup.globalVariables['liblemonsDirectory'] + '/out').filter((str) -> return !str.contains('.pdb')); for (file in libraryFiles) - sys.io.File.copy(libPath + '/liblemons/out/' + file, parsedProject.getOutputPath() + '/' + file); + sys.io.File.copy(setup.globalVariables['liblemonsDirectory'] + '/out/' + file, parsedProject.getOutputPath() + '/' + file); } } \ No newline at end of file diff --git a/tools/commands/DisplayCommand.hx b/tools/commands/DisplayCommand.hx index f598410..0b74537 100644 --- a/tools/commands/DisplayCommand.hx +++ b/tools/commands/DisplayCommand.hx @@ -17,7 +17,7 @@ class DisplayCommand { return; } - var parsedProject:Project = new Project(new Ini(project)); + var parsedProject:Project = new Project(new Ini().parse(project)); Sys.println(parsedProject.toArgList().join('\n')); } diff --git a/tools/commands/RebuildCommand.hx b/tools/commands/RebuildCommand.hx index b210b9b..7c48f7f 100644 --- a/tools/commands/RebuildCommand.hx +++ b/tools/commands/RebuildCommand.hx @@ -1,9 +1,13 @@ package tools.commands; import sys.io.Process; +import tools.project.Ini; class RebuildCommand { + public function new() { + Sys.setCwd(setup.globalVariables['liblemonsDirectory']); + if (Sys.systemName().toLowerCase() == 'windows') { // whyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy try { // the visual studio installer should always be here; if not im gonna have a panic attack @@ -26,9 +30,8 @@ class RebuildCommand { } - Sys.command('cd $libPath/liblemons'); Sys.command('mkdir make'); - Sys.command('cd make'); + Sys.setCwd(Sys.getCwd() + '/make'); Sys.command('cmake ..'); Sys.command('cmake --build .'); } diff --git a/tools/commands/SetupCommand.hx b/tools/commands/SetupCommand.hx new file mode 100644 index 0000000..8388876 --- /dev/null +++ b/tools/commands/SetupCommand.hx @@ -0,0 +1,22 @@ +package tools.commands; + +import sys.io.Process; +import tools.project.Ini; + +class SetupCommand { + public function new() { + Sys.setCwd(libPath); + + Sys.println('the current path for liblemons is ${setup.globalVariables['liblemonsDirectory']}'); + Sys.println('enter your liblemons directory [default is $libPath/liblemons]'); + + var line:String = Sys.stdin().readLine(); + + if (line.trim() == '') { + Sys.println('reverting to default directory...'); + setup.globalVariables['liblemonsDirectory'] = '$libPath/liblemons'; + } else setup.globalVariables['liblemonsDirectory'] = line; + + File.saveContent('setup.ini', setup.toString()); + } +} \ No newline at end of file diff --git a/tools/commands/TestCommand.hx b/tools/commands/TestCommand.hx index 2806283..e910121 100644 --- a/tools/commands/TestCommand.hx +++ b/tools/commands/TestCommand.hx @@ -7,6 +7,6 @@ class TestCommand { if (build.exitCode != 0) return; Sys.command('cd', [build.parsedProject.getOutputPath()]); - Sys.command(build.parsedProject.getOutputFilename(), []); + Sys.command('hl', [build.parsedProject.getOutputFilename()]); } } \ No newline at end of file diff --git a/tools/import.hx b/tools/import.hx index c8da5bd..b2a282c 100644 --- a/tools/import.hx +++ b/tools/import.hx @@ -1,5 +1,4 @@ -import tools.Util.libPath; -import tools.Util.originalPath; +import tools.Util.*; import sys.io.File; using haxe.io.Path; using StringTools; diff --git a/tools/project/Ini.hx b/tools/project/Ini.hx index 1c8c467..5ea9eb7 100644 --- a/tools/project/Ini.hx +++ b/tools/project/Ini.hx @@ -14,7 +14,9 @@ class Ini { public var globalVariables:IniSection = []; public var sections:Map = []; - public function new(string:String) { + public function new() {} + + public function parse(string:String):Ini { final lines:Array = string.split('\n'); var curSection:String = ''; @@ -43,8 +45,35 @@ class Ini { else if (entryValue.charAt(0) == '\"' || entryValue.charAt(0) == '\'') section[entryName] = entryValue.substr(1, entryValue.length - 2); else section[entryName] = entryValue; } + + return this; } + public function toString():String { + var buffer:StringBuf = new StringBuf(); + + inline function addEntry(key:String, value:IniEntry) { + buffer.add(key); + buffer.add(' = '); + buffer.add(stringifyValue(value)); + buffer.add('\n'); + } + + for (key => value in globalVariables) addEntry(key, value); + + for (name => section in sections) { + buffer.add('\n'); + buffer.add('[$name]'); + buffer.add('\n'); + for (key => value in section) addEntry(key, value); + } + + return buffer.toString(); + } + + inline function stringifyValue(val:IniEntry):String + return if (val is String) '\'$val\''; else Std.string(val); + inline function isComment(string:String):Bool return string.charAt(0) == ';' || string.charAt(0) == '#'; } \ No newline at end of file From 042c9ccbcc702084c1c4d7ee3489cdacbf6f318c Mon Sep 17 00:00:00 2001 From: plank <75984453+ThePlank@users.noreply.github.com> Date: Fri, 9 Aug 2024 12:34:27 +0200 Subject: [PATCH 14/19] rename `Colour` to `Color` due to positive feedback on the class name `Colour` --- src/lemons/Time.hx | 2 +- src/lemons/display/Color.hx | 44 ++++++++++++++++++- src/lemons/display/Colour.hx | 44 ------------------- src/lemons/display/render/drivers/Driver.hx | 2 +- .../display/render/drivers/OpenGLDriver.hx | 2 +- src/lemons/import.hx | 2 +- 6 files changed, 47 insertions(+), 49 deletions(-) delete mode 100644 src/lemons/display/Colour.hx diff --git a/src/lemons/Time.hx b/src/lemons/Time.hx index 2531e30..1af2cfc 100644 --- a/src/lemons/Time.hx +++ b/src/lemons/Time.hx @@ -13,7 +13,7 @@ class Time { while (app.window.live) { final time:Float = app.window.time; delta = time - lastTimestamp; - if (delta <= desiredDelta) continue; + if (delta <= desiredDelta) Sys.sleep(desiredDelta - delta); lastTimestamp = time; updateFunc(); diff --git a/src/lemons/display/Color.hx b/src/lemons/display/Color.hx index 84e196c..b76f79e 100644 --- a/src/lemons/display/Color.hx +++ b/src/lemons/display/Color.hx @@ -1,3 +1,45 @@ package lemons.display; -typedef Color = lemons.display.Colour; \ No newline at end of file +abstract Color(Int) to Int { + public var redFloat(get, never):Float; + public var greenFloat(get, never):Float; + public var blueFloat(get, never):Float; + public var alphaFloat(get, never):Float; + + public var red(get, never):Int; + public var green(get, never):Int; + public var blue(get, never):Int; + public var alpha(get, never):Int; + + @:from + static function fromInt(int:Int) { + return new Colour(int); + } + + public function new(int:Int) { + this = int; + } + + function get_alpha():Int + return ((this >> 24) & 0xFF); + function get_red():Int + return ((this >> 16) & 0xFF); + function get_green():Int + return ((this >> 8) & 0xFF); + function get_blue():Int + return ((this) & 0xFF); + + function get_alphaFloat():Float + return alpha / 255; + function get_redFloat():Float + return red / 255; + function get_greenFloat():Float + return green / 255; + function get_blueFloat():Float + return blue / 255; + + function toString():String + return '#' + this.hex(8); +} + +typedef Colour = lemons.display.Color; \ No newline at end of file diff --git a/src/lemons/display/Colour.hx b/src/lemons/display/Colour.hx deleted file mode 100644 index a82b102..0000000 --- a/src/lemons/display/Colour.hx +++ /dev/null @@ -1,44 +0,0 @@ -package lemons.display; - -abstract Colour(Int) to Int { - public var redFloat(get, never):Float; - public var greenFloat(get, never):Float; - public var blueFloat(get, never):Float; - public var alphaFloat(get, never):Float; - - public var red(get, never):Int; - public var green(get, never):Int; - public var blue(get, never):Int; - public var alpha(get, never):Int; - - @:from - static function fromInt(int:Int) { - return new Colour(int); - } - - public function new(int:Int) { - this = int; - } - - function get_alpha():Int - return ((this >> 24) & 0xFF); - function get_red():Int - return ((this >> 16) & 0xFF); - function get_green():Int - return ((this >> 8) & 0xFF); - function get_blue():Int - return ((this) & 0xFF); - - function get_alphaFloat():Float - return alpha / 255; - function get_redFloat():Float - return red / 255; - function get_greenFloat():Float - return green / 255; - function get_blueFloat():Float - return blue / 255; - - function toString():String - return '#' + this.hex(8); -} - diff --git a/src/lemons/display/render/drivers/Driver.hx b/src/lemons/display/render/drivers/Driver.hx index 638465b..d41fd7e 100644 --- a/src/lemons/display/render/drivers/Driver.hx +++ b/src/lemons/display/render/drivers/Driver.hx @@ -3,7 +3,7 @@ package lemons.display.render.drivers; import lemons.display.render.Window; class Driver { - public var backgroundColour:Colour = 0x00000000; + public var backgroundColor:Color = 0x00000000; public function new() {} public function init():Bool { return false; } public function prepare() {} diff --git a/src/lemons/display/render/drivers/OpenGLDriver.hx b/src/lemons/display/render/drivers/OpenGLDriver.hx index b4ebd9d..5e93b5b 100644 --- a/src/lemons/display/render/drivers/OpenGLDriver.hx +++ b/src/lemons/display/render/drivers/OpenGLDriver.hx @@ -18,7 +18,7 @@ class OpenGLDriver extends Driver { } override public function prepare() { - OpenGL.glClearColor(backgroundColour.redFloat, backgroundColour.greenFloat, backgroundColour.blueFloat, backgroundColour.alphaFloat); + OpenGL.glClearColor(backgroundColor.redFloat, backgroundColor.greenFloat, backgroundColor.blueFloat, backgroundColor.alphaFloat); OpenGL.glClear(OpenGL.GL_COLOR_BUFFER_BIT); } diff --git a/src/lemons/import.hx b/src/lemons/import.hx index ee2c098..6c3b3c1 100644 --- a/src/lemons/import.hx +++ b/src/lemons/import.hx @@ -1,2 +1,2 @@ -import lemons.display.Colour; +import lemons.display.Color; using StringTools; \ No newline at end of file From 47c5445c24c17f521fd87595c3e9fa07c59ce071 Mon Sep 17 00:00:00 2001 From: plank <75984453+ThePlank@users.noreply.github.com> Date: Sat, 10 Aug 2024 10:30:19 +0200 Subject: [PATCH 15/19] Update LICENSE --- LICENSE | 186 +++++++------------------------------------------------- 1 file changed, 21 insertions(+), 165 deletions(-) diff --git a/LICENSE b/LICENSE index 0a04128..93a1d1d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,165 +1,21 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. +MIT License + +Copyright (c) 2024 Lemons Framework + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 585ba6514b13b96ac9b5b3716fa569d5dee7af46 Mon Sep 17 00:00:00 2001 From: plank <75984453+ThePlank@users.noreply.github.com> Date: Sun, 11 Aug 2024 15:35:16 +0200 Subject: [PATCH 16/19] gotta do shaders --- src/lemons/display/Color.hx | 35 ++++++++----------- src/lemons/display/render/VertexArray.hx | 7 ++-- src/lemons/display/render/drivers/Driver.hx | 7 +++- .../display/render/drivers/OpenGLDriver.hx | 18 ++++++++-- 4 files changed, 40 insertions(+), 27 deletions(-) diff --git a/src/lemons/display/Color.hx b/src/lemons/display/Color.hx index b76f79e..f058291 100644 --- a/src/lemons/display/Color.hx +++ b/src/lemons/display/Color.hx @@ -20,26 +20,21 @@ abstract Color(Int) to Int { this = int; } - function get_alpha():Int - return ((this >> 24) & 0xFF); - function get_red():Int - return ((this >> 16) & 0xFF); - function get_green():Int - return ((this >> 8) & 0xFF); - function get_blue():Int - return ((this) & 0xFF); - - function get_alphaFloat():Float - return alpha / 255; - function get_redFloat():Float - return red / 255; - function get_greenFloat():Float - return green / 255; - function get_blueFloat():Float - return blue / 255; - - function toString():String - return '#' + this.hex(8); + function get_alpha():Int return ((this >> 24) & 0xFF); + function get_red():Int return ((this >> 16) & 0xFF); + function get_green():Int return ((this >> 8) & 0xFF); + function get_blue():Int return ((this) & 0xFF); + + function get_alphaFloat():Float return alpha / 255; + function get_redFloat():Float return red / 255; + function get_greenFloat():Float return green / 255; + function get_blueFloat():Float return blue / 255; + + function toString():String return '#' + this.hex(8); + + + // function reconstruct(r:Int, g:Int, b:Int, a:Int):Void + // this = } typedef Colour = lemons.display.Color; \ No newline at end of file diff --git a/src/lemons/display/render/VertexArray.hx b/src/lemons/display/render/VertexArray.hx index dedeab1..39383af 100644 --- a/src/lemons/display/render/VertexArray.hx +++ b/src/lemons/display/render/VertexArray.hx @@ -3,16 +3,17 @@ package lemons.display.render; import lemons.display.render.drivers.Driver; class VertexArray { + var _nativeBufferHandle:Int = -1; var _nativeHandle:Int = -1; var driver:Driver; public function new(driver:Driver) { this.driver = driver; + _nativeBufferHandle = driver.createNativeVertexBuffer(); _nativeHandle = driver.createNativeVertexArray(); - trace(_nativeHandle); } public function bufferData(arr:Array) { - driver.bufferVertexArray(_nativeHandle, arr); - } + driver.bufferVertexBuffer(_nativeHandle, arr); + } } \ No newline at end of file diff --git a/src/lemons/display/render/drivers/Driver.hx b/src/lemons/display/render/drivers/Driver.hx index d41fd7e..b63d69d 100644 --- a/src/lemons/display/render/drivers/Driver.hx +++ b/src/lemons/display/render/drivers/Driver.hx @@ -9,6 +9,11 @@ class Driver { public function prepare() {} public function setViewport(x:Int, y:Int, width:Int, height:Int) {} public function selectWindow(window:Window) {} + public function createNativeVertexBuffer():Dynamic { return null; } + public function bufferVertexBuffer(vertBuf:Dynamic, verticies:Array) {} public function createNativeVertexArray():Dynamic { return null; } - public function bufferVertexArray(vertArray:Dynamic, verticies:Array) {} + public function setupVertexArray(vertArray:Dynamic, size:Int, stride:Int, offset:Int) {} + public function draw(vertArray:Dynamic, offset:Int, length:Int) {} + + // public function createProgram(vertex:Shader, pixel:Shader) {} } \ No newline at end of file diff --git a/src/lemons/display/render/drivers/OpenGLDriver.hx b/src/lemons/display/render/drivers/OpenGLDriver.hx index 5e93b5b..57c861c 100644 --- a/src/lemons/display/render/drivers/OpenGLDriver.hx +++ b/src/lemons/display/render/drivers/OpenGLDriver.hx @@ -22,16 +22,28 @@ class OpenGLDriver extends Driver { OpenGL.glClear(OpenGL.GL_COLOR_BUFFER_BIT); } - override public function createNativeVertexArray():Dynamic { + override public function createNativeVertexBuffer():Dynamic { var buf = OpenGL.glGenBuffers(); return buf; } - override public function bufferVertexArray(vertArray:Dynamic, verticies:Array) { + override public function bufferVertexBuffer(vertBuf:Dynamic, verticies:Array) { var size = verticies.length * 4; - OpenGL.glBindBuffer(OpenGL.GL_ARRAY_BUFFER, vertArray); + OpenGL.glBindBuffer(OpenGL.GL_ARRAY_BUFFER, vertBuf); OpenGL.glBufferData(OpenGL.GL_ARRAY_BUFFER, size, hl.Bytes.getArray(verticies), OpenGL.GL_STATIC_DRAW); } + override public function createNativeVertexArray():Dynamic { + var arr = OpenGL.glGenVertexArrays(); + return arr; + } + + override public function setupVertexArray(vertArray:Dynamic, size:Int, stride:Int, offset:Int) { + OpenGL.glVertexAttribPointer(vertArray, size, OpenGL.GL_FLOAT, OpenGL.GL_FALSE, stride, hl.Bytes.fromAddress(0)); + } + + // override public function draw(vertArray:Dynamic, offset:Int, length:Int) { + // glVertexAttribPointer(vertArray, size, OpenGL.GL_FLOAT, OpenGL.GL_FALSE, side, hl.Bytes.fromAddress(0)); + // } } \ No newline at end of file From 2ef9614cc6977bff6dd8dab3bf5c39182e8896b3 Mon Sep 17 00:00:00 2001 From: plank <75984453+ThePlank@users.noreply.github.com> Date: Sat, 17 Aug 2024 12:36:45 +0200 Subject: [PATCH 17/19] start on shaders and documentation --- .gitignore | 5 +- buildDox.bat | 3 +- genDocs.hxml | 2 +- src/lemons/App.hx | 2 +- src/lemons/Time.hx | 56 +++++++++++++++---- src/lemons/display/Color.hx | 9 +++ src/lemons/display/render/Renderer.hx | 17 ++++++ src/lemons/display/render/Window.hx | 3 + src/lemons/display/render/drivers/Driver.hx | 5 +- .../display/render/drivers/OpenGLDriver.hx | 14 +++++ src/lemons/display/shader/Shader.hx | 49 ++++++++++++++++ tools/Util.hx | 12 ++-- tools/projectTemplate.ini | 20 +++++++ 13 files changed, 175 insertions(+), 22 deletions(-) create mode 100644 src/lemons/display/shader/Shader.hx create mode 100644 tools/projectTemplate.ini diff --git a/.gitignore b/.gitignore index 47eceb5..66175c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.hl -docs/ -pages/ \ No newline at end of file +out +setup.ini +docs/theme diff --git a/buildDox.bat b/buildDox.bat index 408db89..5a0a54e 100644 --- a/buildDox.bat +++ b/buildDox.bat @@ -1 +1,2 @@ -haxelib run dox -i docs --title "lemons api reference" -D version "balls" -D website "https://github.com/ThePlank/lemons" -D logo "https://cdn.discordapp.com/attachments/1083070583245373564/1162054095910207528/Untitled12_20231008154638.png" -D themeColor 0xFFFF63 -D textColor 0xFFFF63 -D description "dumb game framework" -D source-path "https://github.com/ThePlank/lemons/tree/main/src" \ No newline at end of file +rem theme will be avalible later when i finish it +haxelib run dox -i docs -o docs/out/doc.xml -theme docs/theme \ No newline at end of file diff --git a/genDocs.hxml b/genDocs.hxml index d723d4d..4eff49d 100644 --- a/genDocs.hxml +++ b/genDocs.hxml @@ -1,4 +1,4 @@ --xml docs/doc.xml +-xml docs/out/doc.xml extraParams.hxml -p src -hl dummy.hl diff --git a/src/lemons/App.hx b/src/lemons/App.hx index 2fe4d33..4b6afd3 100644 --- a/src/lemons/App.hx +++ b/src/lemons/App.hx @@ -31,7 +31,7 @@ class App { init(); - Time.startLoop(() -> { + new Time().start(() -> { renderer.prepare(); }, this); } diff --git a/src/lemons/Time.hx b/src/lemons/Time.hx index 1af2cfc..2ea344a 100644 --- a/src/lemons/Time.hx +++ b/src/lemons/Time.hx @@ -1,24 +1,60 @@ package lemons; +/** + * time keeping singleton of lemons. contains the main loop and other variables related to timing +**/ class Time { - public static var fps(get, never):Int; - public static var delta(default, null):Float; + /** + * instance of `Time` + **/ + public static var self(default, null):Time; - static function get_fps():Int return Math.round(1 / delta); - static public var desiredDelta:Float = 1 / 60; + /** + * target framerate of the game + **/ + public var fps(get, set):Int; - static var lastTimestamp:Float = 0; - static public function startLoop(updateFunc:Void->Void, app:lemons.App) { + /** + * time between the last frame and current frame + **/ + public var delta(default, null):Float; + + /** + * create a new instance of `Time` + * @throws Exception `cannot have more than one main loop` when a `Time` already exists. use `Time.self` instead + **/ + public function new():Void { + if (self != null) throw 'cannot have more than one main loop'; + + self = this; + } + + var _timestamp:Float = 0; + var _delta:Float = 0; + + /** + * starts the main loop + * @param updateFunc function to call when an update happens + * @param app a `lemons.App` with an existing window + **/ + public function start(updateFunc:Void->Void, app:lemons.App) { while (app.window.live) { final time:Float = app.window.time; - delta = time - lastTimestamp; - if (delta <= desiredDelta) Sys.sleep(desiredDelta - delta); - lastTimestamp = time; + delta = time - _timestamp; - updateFunc(); + if (delta <= _delta) Sys.sleep(_delta - delta); + updateFunc(); app.window.update(); + + _timestamp = time; } } + + function get_fps():Int return Math.floor(1 / _delta); + function set_fps(fps:Int):Int { + _delta = 1 / fps; + return fps; + } } \ No newline at end of file diff --git a/src/lemons/display/Color.hx b/src/lemons/display/Color.hx index f058291..c1600ce 100644 --- a/src/lemons/display/Color.hx +++ b/src/lemons/display/Color.hx @@ -1,5 +1,10 @@ package lemons.display; +/** + * abstract used to indentify colo(u)r in lemons + * the internal format for color is AARRGGBB + * TODO: right now the abstract can't reconstruct itself, so you can't just set one component of the color unless you reconstruct it +**/ abstract Color(Int) to Int { public var redFloat(get, never):Float; public var greenFloat(get, never):Float; @@ -37,4 +42,8 @@ abstract Color(Int) to Int { // this = } +/** + * the correct spelling of colour + * people hated that i used color primarily so this is now a typedef +**/ typedef Colour = lemons.display.Color; \ No newline at end of file diff --git a/src/lemons/display/render/Renderer.hx b/src/lemons/display/render/Renderer.hx index de46127..13f759b 100644 --- a/src/lemons/display/render/Renderer.hx +++ b/src/lemons/display/render/Renderer.hx @@ -10,11 +10,25 @@ enum abstract RendererType(String) from String { var METAL = "METAL"; } +/** + * renderer of lemons, basically a front end for the driver backends +**/ @:access(lemons.display.render.GLFWWindow.windowHandle) class Renderer { var window:Window; + + /** + * driver used to render the game + **/ public var driver:Driver; + /** + * creates a new `Renderer` + * @param renderer renderer type + * @param width width + * @param height height + * @param window window to render to + **/ public function new(renderer:RendererType, width:Int, height:Int, window:Window) { this.window = window; @@ -36,6 +50,9 @@ class Renderer { return new VertexArray(driver); } + /** + * prepares the renderer to start drawing a frame + **/ public function prepare() { driver.prepare(); } diff --git a/src/lemons/display/render/Window.hx b/src/lemons/display/render/Window.hx index 67d4c91..5d16f4a 100644 --- a/src/lemons/display/render/Window.hx +++ b/src/lemons/display/render/Window.hx @@ -1,5 +1,8 @@ package lemons.display.render; +/** + * base type for a window +**/ class Window { @:isVar public var width(get, set):Int; @:isVar public var height(get, set):Int; diff --git a/src/lemons/display/render/drivers/Driver.hx b/src/lemons/display/render/drivers/Driver.hx index b63d69d..d6f3a5b 100644 --- a/src/lemons/display/render/drivers/Driver.hx +++ b/src/lemons/display/render/drivers/Driver.hx @@ -1,6 +1,7 @@ package lemons.display.render.drivers; import lemons.display.render.Window; +import lemons.display.shader.Shader; class Driver { public var backgroundColor:Color = 0x00000000; @@ -15,5 +16,7 @@ class Driver { public function setupVertexArray(vertArray:Dynamic, size:Int, stride:Int, offset:Int) {} public function draw(vertArray:Dynamic, offset:Int, length:Int) {} - // public function createProgram(vertex:Shader, pixel:Shader) {} + public function createProgram(vertex:Shader, pixel:Shader) {} + public function createShader(type:ShaderType):Dynamic { return null; } + public function compileShader(shader:Shader):Int { return 0; } } \ No newline at end of file diff --git a/src/lemons/display/render/drivers/OpenGLDriver.hx b/src/lemons/display/render/drivers/OpenGLDriver.hx index 57c861c..7c7da9b 100644 --- a/src/lemons/display/render/drivers/OpenGLDriver.hx +++ b/src/lemons/display/render/drivers/OpenGLDriver.hx @@ -3,6 +3,7 @@ package lemons.display.render.drivers; import lemons.display.render._backend.OpenGL; import lemons.display.render._backend.GLFW; import lemons.display.render.Window; +import lemons.display.shader.Shader; class OpenGLDriver extends Driver { override public function init():Bool { @@ -43,6 +44,19 @@ class OpenGLDriver extends Driver { OpenGL.glVertexAttribPointer(vertArray, size, OpenGL.GL_FLOAT, OpenGL.GL_FALSE, stride, hl.Bytes.fromAddress(0)); } + override public function createShader(type:ShaderType):Dynamic { + var shader = OpenGL.glCreateShader(switch (type) { + case VERTEX: OpenGL.GL_VERTEX_SHADER; + case PIXEL: OpenGL.GL_FRAGMENT_SHADER; + }); + return shader; + } + + override public function compileShader(shader:Shader):Int { + // var shader = OpenGL.glCreateShader(); + return 0; + } + // override public function draw(vertArray:Dynamic, offset:Int, length:Int) { // glVertexAttribPointer(vertArray, size, OpenGL.GL_FLOAT, OpenGL.GL_FALSE, side, hl.Bytes.fromAddress(0)); // } diff --git a/src/lemons/display/shader/Shader.hx b/src/lemons/display/shader/Shader.hx new file mode 100644 index 0000000..e8818e5 --- /dev/null +++ b/src/lemons/display/shader/Shader.hx @@ -0,0 +1,49 @@ +package lemons.display.shader; + +import lemons.display.render.Renderer; + +enum abstract ShaderType(Int) to Int { + var VERTEX = 0; + var PIXEL = 1; +} + +/** + * `Shader` contains info on how the gpu should draw your object. you can create vertex (position) or pixel shaders and use them for drawing + * + * these shaders are written in GLSL ([OpenGL Shading Language](https://wikipedia.org/wiki/OpenGL_Shading_Language)) and transpiled to the renderer the game uses + * + * you're able to create shaders by either: + * embedding them + * ```haxe + * @:shader(PIXEL, 'code') + * class SomePixelShader extends Shader {} + * + * ``` + * or loading them from a string or resource + * ```haxe + * final somePixelShader:Shader = Shader.fromResource(PIXEL, /*some resource here*\/); + * ``` + * + * TODO: write some lexer and transpiler for glsl since all the transpiler i can find are in c++ +**/ +class Shader { + public var shaderType(default, null):ShaderType = VERTEX; + + var _source:String; + var _compiled:Bool = false; + var _nativeHandle:Int = 0; + + public function new(shaderType:ShaderType) { + this.shaderType = shaderType; + } + + public static function fromString(type:ShaderType, source:String):Shader { + final shader:Shader = new Shader(type); + shader._source = source; + return shader; + } + + function compile(renderer:Renderer):Void { + _nativeHandle = renderer.driver.createShader(shaderType); + } +} \ No newline at end of file diff --git a/tools/Util.hx b/tools/Util.hx index 9fced0d..ffe4629 100644 --- a/tools/Util.hx +++ b/tools/Util.hx @@ -41,10 +41,10 @@ class Util { } } - public static function iterateThroughArguments(callback:String->Bool, escapeOnReturn:Bool = false) { - for (arg in args) { - var theReturn:Bool = callback(args.shift()); - if (escapeOnReturn && theReturn) return; - } - } + // public static function removeArgument(arg:String) args.remove(args.indexOf(arg)); + // public static function getArgument(arg:String):Bool { + // final reslut:Bool = args.indexOf(arg) != -1; + // if (reslut) removeArgument(arg); + // return reslut; + // } } \ No newline at end of file diff --git a/tools/projectTemplate.ini b/tools/projectTemplate.ini new file mode 100644 index 0000000..c75d076 --- /dev/null +++ b/tools/projectTemplate.ini @@ -0,0 +1,20 @@ +filename = 'filename' +output = 'out/' +resources = 'res/' + +main = 'Main' + +[sources] +mainSrc = 'src/' + +[game] +width = 640 +height = 480 + +[window] +title = '' +resizable = true + +[defines] + +[libraries] \ No newline at end of file From 203cb7baf93f46483b1c1728e2a280797f406da8 Mon Sep 17 00:00:00 2001 From: plank <75984453+ThePlank@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:34:13 +0200 Subject: [PATCH 18/19] the uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh --- .gitignore | 1 + buildDox.bat | 4 +- genDocs.hxml | 6 +- src/lemons/App.hx | 12 +- src/lemons/Time.hx | 3 +- src/lemons/display/Color.hx | 2 +- src/lemons/display/Mesh.hx | 75 ++++++++ src/lemons/display/render/Buffer.hx | 62 ++++++ src/lemons/display/render/GLFWWindow.hx | 4 +- src/lemons/display/render/Renderer.hx | 177 +++++++++++++++++- src/lemons/display/render/VertexArray.hx | 19 -- .../render/{_backend => _internal}/GLFW.hx | 2 +- .../render/{_backend => _internal}/OpenGL.hx | 66 +++---- src/lemons/display/render/drivers/Driver.hx | 47 ++++- .../display/render/drivers/OpenGLDriver.hx | 165 +++++++++++++--- src/lemons/display/shader/Program.hx | 88 +++++++++ src/lemons/display/shader/Shader.hx | 12 +- src/lemons/geometry/Matrix.hx | 90 +++++++++ src/lemons/geometry/Rect.hx | 45 +++++ src/lemons/import.hx | 1 + src/lemons/util/IDestroyable.hx | 4 +- src/lemons/util/Log.hx | 11 ++ src/lemons/util/Signal.hx | 4 + tools/commands/BuildCommand.hx | 11 +- 24 files changed, 786 insertions(+), 125 deletions(-) create mode 100644 src/lemons/display/Mesh.hx create mode 100644 src/lemons/display/render/Buffer.hx delete mode 100644 src/lemons/display/render/VertexArray.hx rename src/lemons/display/render/{_backend => _internal}/GLFW.hx (99%) rename src/lemons/display/render/{_backend => _internal}/OpenGL.hx (97%) create mode 100644 src/lemons/display/shader/Program.hx create mode 100644 src/lemons/geometry/Matrix.hx create mode 100644 src/lemons/geometry/Rect.hx create mode 100644 src/lemons/util/Log.hx diff --git a/.gitignore b/.gitignore index 66175c0..ad17527 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ out setup.ini docs/theme +docs/ diff --git a/buildDox.bat b/buildDox.bat index 5a0a54e..037dc67 100644 --- a/buildDox.bat +++ b/buildDox.bat @@ -1,2 +1,4 @@ rem theme will be avalible later when i finish it -haxelib run dox -i docs -o docs/out/doc.xml -theme docs/theme \ No newline at end of file +haxelib run dox -i docs -o docs -theme docs/theme +cd docs/out +haxelib run snake-server \ No newline at end of file diff --git a/genDocs.hxml b/genDocs.hxml index 4eff49d..8844c7a 100644 --- a/genDocs.hxml +++ b/genDocs.hxml @@ -1,8 +1,8 @@ --xml docs/out/doc.xml +-xml docs/doc.xml extraParams.hxml -p src -hl dummy.hl -D gen_docs +-dce no lemons - --cmd buildDox.bat \ No newline at end of file +# -cmd buildDox.bat \ No newline at end of file diff --git a/src/lemons/App.hx b/src/lemons/App.hx index 4b6afd3..2139300 100644 --- a/src/lemons/App.hx +++ b/src/lemons/App.hx @@ -32,7 +32,9 @@ class App { init(); new Time().start(() -> { - renderer.prepare(); + update(); + final _data:RendererData = renderer.prepare(); + draw(_data); }, this); } @@ -43,7 +45,11 @@ class App { /** * main update function - * @param delta time between the last update call in seconds **/ - public function update(delta:Float):Void {} + public function update():Void {} + + /** + * main draw function + **/ + public function draw(_data:RendererData):Void {} } \ No newline at end of file diff --git a/src/lemons/Time.hx b/src/lemons/Time.hx index 2ea344a..d21345b 100644 --- a/src/lemons/Time.hx +++ b/src/lemons/Time.hx @@ -9,7 +9,6 @@ class Time { **/ public static var self(default, null):Time; - /** * target framerate of the game **/ @@ -21,7 +20,7 @@ class Time { public var delta(default, null):Float; /** - * create a new instance of `Time` + * creates a new instance of `Time` * @throws Exception `cannot have more than one main loop` when a `Time` already exists. use `Time.self` instead **/ public function new():Void { diff --git a/src/lemons/display/Color.hx b/src/lemons/display/Color.hx index c1600ce..1c5eca2 100644 --- a/src/lemons/display/Color.hx +++ b/src/lemons/display/Color.hx @@ -18,7 +18,7 @@ abstract Color(Int) to Int { @:from static function fromInt(int:Int) { - return new Colour(int); + return new Color(int); } public function new(int:Int) { diff --git a/src/lemons/display/Mesh.hx b/src/lemons/display/Mesh.hx new file mode 100644 index 0000000..adb9deb --- /dev/null +++ b/src/lemons/display/Mesh.hx @@ -0,0 +1,75 @@ +package lemons.display; + +import lemons.display.render.Buffer; + +/** + * a mesh. stores vertex, uv and indecie data +**/ +@:allow(lemons.display.render.Renderer) +class Mesh { + var _vertex:SingleBuffer; + var _indices:UIntBuffer; + + public var bufferMode(default, null):BufferUploadMode; + public var verticies(default, null):UInt; + public var length(default, null):UInt; + + var _verticies:UInt = 0; + var _length:UInt = 0; + + var _vertexArr:Array = []; + var _indecieArr:Array = []; + + public function new(bufferMode:BufferUploadMode) { + this.bufferMode = bufferMode; + _vertex = new SingleBuffer(this.bufferMode); + _indices = new UIntBuffer(this.bufferMode); + } + + public function clear() { + _vertex.clear(); + _indices.clear(); + _vertexArr = []; + _indecieArr = []; + _verticies = 0; + verticies = 0; + + _length = 0; + length = 0; + } + + public function addVertex(x:Single, y:Single, u:Single, v:Single):Int { + _vertexArr.push(x); + _vertexArr.push(y); + _vertexArr.push(0); + _vertexArr.push(u); + _vertexArr.push(v); + return _verticies++; + } + + public function makeQuad(v1:Int, v2:Int, v3:Int, v4:Int) { + _indecieArr.push(v1); + _indecieArr.push(v2); + _indecieArr.push(v3); + + _indecieArr.push(v1); + _indecieArr.push(v3); + _indecieArr.push(v4); + _length += 6; + } + + public function makeTrig(v1:Int, v2:Int, v3:Int) { + _indecieArr.push(v1); + _indecieArr.push(v2); + _indecieArr.push(v3); + _length += 3; + } + + public function finish() { + _vertex.bufferData(_vertexArr); + _indices.bufferData(_indecieArr); + verticies = _verticies; + length = _length; + } + +} \ No newline at end of file diff --git a/src/lemons/display/render/Buffer.hx b/src/lemons/display/render/Buffer.hx new file mode 100644 index 0000000..4ae67a0 --- /dev/null +++ b/src/lemons/display/render/Buffer.hx @@ -0,0 +1,62 @@ +package lemons.display.render; + +import lemons.display.render.drivers.Driver; + +enum abstract BufferType(Int) to Int { + var VERTEX = 0; + var ELEMENT = 1; +} + +/** + * defines the buffer mode for a mesh object +**/ +enum abstract BufferUploadMode(Int) from Int to Int { + /** + * stream buffer type, ideal for changing vertex data sub-each frame + **/ + var STREAM = 0; + + /** + * Static buffer type, ideal to re-use prebuilt vertex data + **/ + var STATIC = 1; + + /** + * dynamic buffer type, ideal for occasional data updates + **/ + var DYNAMIC = 2; +} + +@:allow(lemons.display.render.Renderer) +@:generic +class Buffer implements IDestroyable { + var _nativeHandle:Int = -1; + var _needsReupload:Bool = false; + var _needsAllocation:Bool = false; + var _bufferMode:BufferUploadMode = STATIC; + + public var data(default, null):Array; + + public function new(mode:BufferUploadMode) { + _bufferMode = mode; + _needsAllocation = true; + } + + public function bufferData(arr:Array) { + data = arr.copy(); + _needsReupload = true; + } + + public function clear() { + data = []; + _needsReupload = true; + } + + public function destroy() { + data = null; + // TODO: tell the driver to delete the handle here + } +} + +typedef SingleBuffer = Buffer; +typedef UIntBuffer = Buffer; \ No newline at end of file diff --git a/src/lemons/display/render/GLFWWindow.hx b/src/lemons/display/render/GLFWWindow.hx index bbcb573..f00b9b3 100644 --- a/src/lemons/display/render/GLFWWindow.hx +++ b/src/lemons/display/render/GLFWWindow.hx @@ -1,6 +1,7 @@ package lemons.display.render; -import lemons.display.render._backend.GLFW; +import lemons.display.render._internal.GLFW; +import lemons.display.render._internal.OpenGL; @SuppressWarnings("checkstyle:CodeSimilarity") class GLFWWindow extends Window { @@ -15,6 +16,7 @@ class GLFWWindow extends Window { GLFW.glfwInitHint(GLFW.GLFW_CONTEXT_VERSION_MAJOR, 3); GLFW.glfwInitHint(GLFW.GLFW_CONTEXT_VERSION_MINOR, 3); GLFW.glfwInitHint(GLFW.GLFW_OPENGL_PROFILE, GLFW.GLFW_OPENGL_CORE_PROFILE); + GLFW.glfwInitHint(GLFW.GLFW_OPENGL_FORWARD_COMPAT, OpenGL.GL_TRUE); windowHandle = GLFW.glfwCreateWindow(width, height, title, (0:hl.I64), (0:hl.I64)); } diff --git a/src/lemons/display/render/Renderer.hx b/src/lemons/display/render/Renderer.hx index 13f759b..01de5fb 100644 --- a/src/lemons/display/render/Renderer.hx +++ b/src/lemons/display/render/Renderer.hx @@ -1,26 +1,104 @@ package lemons.display.render; import lemons.display.render.*; +import lemons.display.Mesh; +import lemons.display.render.Buffer; +import lemons.display.shader.Shader; +import lemons.display.shader.Program; import lemons.display.render.drivers.*; enum abstract RendererType(String) from String { var OPENGL = "OPENGL"; var VULKAN = "VULKAN"; var DIRECTX = "DIRECTX"; - var METAL = "METAL"; +} + +enum abstract DataType(Int) to Int { + var INT = 0; + var SINGLE = 1; +} + +/** + * holder for draw instruction data that `Renderer` should handle + * this class is obtained when using `Renderer.prepare` and passed onto all `IRenderable`s +**/ +class RendererData { + // var _area:Rect; + public var renderer:Renderer; + public var program(default, null):Program; + + var defaultProgram:Program; + + var vertexArray:Int; + + // TODO: make this start a batch and not just setup the mesh + public function startBatch(mesh:Mesh) { + renderer.checkBuffer(mesh._vertex, VERTEX); + renderer.checkBuffer(mesh._indices, ELEMENT); + + renderer.driver.selectBuffer(mesh._vertex._nativeHandle, VERTEX); + renderer.driver.selectBuffer(mesh._indices._nativeHandle, ELEMENT); + setupAttributes(defaultProgram); + + renderer.driver.selectBuffer(0, VERTEX); + } + + public function useProgram(?program:Program) { + if (program != null) renderer.checkProgram(program); + this.program = (program != null ? program : defaultProgram); + } + + public function draw(mesh:Mesh) { + renderer.driver.selectBuffer(mesh._indices._nativeHandle, ELEMENT); + renderer.driver.selectVertexArray(vertexArray); + renderer.driver.selectProgram(program._nativeHandle); + renderer.driver.drawElements(0, mesh.length); + } + + /** + * sets a area of where objects should start rendering, everything outside of this area is ignored + **/ + public function renderArea(x:Int, y:Int, width:Int, height:Int) { + + } + + public function clear() { + program = defaultProgram; + } + + public function new(renderer:Renderer) { + this.renderer = renderer; + vertexArray = renderer.driver.createVertexArray(); + + defaultProgram = new Program(); + useProgram(defaultProgram); + } + + function setupAttributes(program:Program) { + renderer.driver.selectVertexArray(vertexArray); + for (atti in 0...program.attributes.length) { + final attr = program.attributes[atti]; + renderer.driver.setupVertexArray(atti, attr.size, attr.type, attr.stride, attr.offset); + renderer.driver.toggleVertexArrayAttr(atti, true); + } + } } /** * renderer of lemons, basically a front end for the driver backends **/ -@:access(lemons.display.render.GLFWWindow.windowHandle) class Renderer { - var window:Window; - /** * driver used to render the game **/ public var driver:Driver; + + /** + * window that the renderer is drawing to + **/ + public var window:Window; + + var _data:RendererData; /** * creates a new `Renderer` @@ -40,20 +118,99 @@ class Renderer { driver.selectWindow(window); var successs:Bool = driver.init(); - if (!successs) - throw 'unable to initialize driver'; + if (!successs) throw 'unable to initialize driver'; driver.setViewport(0, 0, width, height); - } - public function createVertexArray():VertexArray { - return new VertexArray(driver); + this._data = new RendererData(this); } /** * prepares the renderer to start drawing a frame **/ - public function prepare() { + public function prepare():RendererData { driver.prepare(); + _data.clear(); + return _data; + } + + + /** + * checks if a given `Program` needs allocation and if needed, checks both vertex and pixel shaders and compiles the program + * @param prog program to check + **/ + public function checkProgram(prog:Program) { + checkShader(prog.vertexShader); + checkShader(prog.pixelShader); + + if (!prog._needsAllocation) { + if (prog._uniformQueue != null) { + driver.selectProgram(prog._nativeHandle); + var curUniform = prog._uniformQueue; + while (curUniform != null) { + final func = switch(curUniform.type) { + case MATRIX: driver.shaderWriteMatrix; + default: throw 'not implemented'; + } + + func(prog._nativeHandle, curUniform.uniform, curUniform.value); + + curUniform = curUniform.next; + } + } + + return; + } + + if (prog._nativeHandle > -1) driver.deleteProgram(prog._nativeHandle); + + prog._nativeHandle = driver.createProgram(); + driver.addToProgram(prog._nativeHandle, prog.pixelShader._nativeHandle); + driver.addToProgram(prog._nativeHandle, prog.vertexShader._nativeHandle); + + var result = driver.compileProgram(prog._nativeHandle); + if (!result.success) throw 'shader compilation error:\n' + result.error; + + prog._needsAllocation = false; + } + + /** + * checks if a given `Shader` needs compilatrion + * @param shad shader to check + **/ + public function checkShader(shad:Shader) { + if (!shad._compiled) { + shad._nativeHandle = driver.createShader(shad.shaderType); + var result = driver.compileShader(shad._nativeHandle, shad._source); + if (!result.success) throw 'shader compilation error:\n' + result.error; + shad._compiled = true; + } + } + + public extern inline overload function checkBuffer(buf:Buffer, type:BufferType) { + if (!buf._needsAllocation && !buf._needsReupload) return; + if (buf._needsAllocation) { + buf._nativeHandle = driver.createBuffer(); + buf._needsAllocation = false; + } + + if (buf._needsReupload) { + driver.bufferData(buf._nativeHandle, type, buf.data, buf.data.length * 4, buf._bufferMode); + // TODO: error handling + buf._needsReupload = false; + } + } + + public extern inline overload function checkBuffer(buf:Buffer, type:BufferType) { + if (!buf._needsAllocation && !buf._needsReupload) return; + if (buf._needsAllocation) { + buf._nativeHandle = driver.createBuffer(); + buf._needsAllocation = false; + } + + if (buf._needsReupload) { + driver.bufferDataInt(buf._nativeHandle, type, buf.data, buf.data.length * 4, buf._bufferMode); + buf._needsReupload = false; + } } } \ No newline at end of file diff --git a/src/lemons/display/render/VertexArray.hx b/src/lemons/display/render/VertexArray.hx deleted file mode 100644 index 39383af..0000000 --- a/src/lemons/display/render/VertexArray.hx +++ /dev/null @@ -1,19 +0,0 @@ -package lemons.display.render; - -import lemons.display.render.drivers.Driver; - -class VertexArray { - var _nativeBufferHandle:Int = -1; - var _nativeHandle:Int = -1; - var driver:Driver; - - public function new(driver:Driver) { - this.driver = driver; - _nativeBufferHandle = driver.createNativeVertexBuffer(); - _nativeHandle = driver.createNativeVertexArray(); - } - - public function bufferData(arr:Array) { - driver.bufferVertexBuffer(_nativeHandle, arr); - } -} \ No newline at end of file diff --git a/src/lemons/display/render/_backend/GLFW.hx b/src/lemons/display/render/_internal/GLFW.hx similarity index 99% rename from src/lemons/display/render/_backend/GLFW.hx rename to src/lemons/display/render/_internal/GLFW.hx index a2a9b62..8be9020 100644 --- a/src/lemons/display/render/_backend/GLFW.hx +++ b/src/lemons/display/render/_internal/GLFW.hx @@ -1,4 +1,4 @@ -package lemons.display.render._backend; +package lemons.display.render._internal; typedef NativeGLFWMonitor = hl.I64; typedef NativeGLFWWindow = hl.I64; diff --git a/src/lemons/display/render/_backend/OpenGL.hx b/src/lemons/display/render/_internal/OpenGL.hx similarity index 97% rename from src/lemons/display/render/_backend/OpenGL.hx rename to src/lemons/display/render/_internal/OpenGL.hx index e732ba7..ea91bbb 100644 --- a/src/lemons/display/render/_backend/OpenGL.hx +++ b/src/lemons/display/render/_internal/OpenGL.hx @@ -2,7 +2,7 @@ Generated with liblemons' GLADGenerator https://github.com/LemonsFramework/liblemons */ -package lemons.display.render._backend; +package lemons.display.render._internal; @:hlNative('lemons', 'gl_') class OpenGL { @@ -54,7 +54,7 @@ class OpenGL { public static final GL_TRUE:Int = 1; public static final GL_ONE:Int = 1; public static final GL_INVALID_INDEX:Int = 0xFFFFFFFF; - // public static final GL_TIMEOUT_IGNORED:Int = 0xFFFFFFFFFFFFFFFF; + // public static final GL_TIMEOUT_IGNORED:haxe.Int64 = 0xFFFFFFFFFFFFFFFF; public static final GL_POINTS:Int = 0x0000; public static final GL_LINES:Int = 0x0001; public static final GL_LINE_LOOP:Int = 0x0002; @@ -1369,7 +1369,7 @@ class OpenGL { public static function glBlendFuncSeparatei(buf:Int, srcRGB:Int, dstRGB:Int, srcAlpha:Int, dstAlpha:Int):Void {} public static function glBlendFunci(buf:Int, src:Int, dst:Int):Void {} public static function glBlitFramebuffer(srcX0:Int, srcY0:Int, srcX1:Int, srcY1:Int, dstX0:Int, dstY0:Int, dstX1:Int, dstY1:Int, mask:Int, filter:Int):Void {} - public static function glBufferData(target:Int, size:hl.Ref, data:hl.Bytes, usage:Int):Void {} + public static function glBufferData(target:Int, size:Int, data:hl.Bytes, usage:Int):Void {} public static function glBufferStorage(target:Int, size:hl.Ref, data:hl.Bytes, flags:Int):Void {} public static function glBufferSubData(target:Int, offset:hl.Ref, size:hl.Ref, data:hl.Bytes):Void {} public static function glCheckFramebufferStatus(target:Int):Int { return 0; } @@ -1445,7 +1445,7 @@ class OpenGL { public static function glDrawArraysInstancedBaseInstance(mode:Int, first:Int, count:Int, instancecount:Int, baseinstance:Int):Void {} public static function glDrawBuffer(buf:Int):Void {} public static function glDrawBuffers(n:Int, bufs:hl.Ref):Void {} - public static function glDrawElements(mode:Int, count:Int, type:Int, indices:hl.Bytes):Void {} + public static function glDrawElements(mode:Int, count:Int, type:Int, indices:Int):Void {} public static function glDrawElementsBaseVertex(mode:Int, count:Int, type:Int, indices:hl.Bytes, basevertex:Int):Void {} public static function glDrawElementsIndirect(mode:Int, type:Int, indirect:hl.Bytes):Void {} public static function glDrawElementsInstanced(mode:Int, count:Int, type:Int, indices:hl.Bytes, instancecount:Int):Void {} @@ -1716,7 +1716,7 @@ class OpenGL { public static function glSecondaryColorP3ui(type:Int, color:Int):Void {} public static function glSecondaryColorP3uiv(type:Int, color:hl.Ref):Void {} public static function glShaderBinary(count:Int, shaders:hl.Ref, binaryFormat:Int, binary:hl.Bytes, length:Int):Void {} - public static function glShaderSource(shader:Int, count:Int, string:hl.NativeArray, length:hl.Ref):Void {} + public static function glShaderSource(shader:Int, string:String):Void {} public static function glShaderStorageBlockBinding(program:Int, storageBlockIndex:Int, storageBlockBinding:Int):Void {} public static function glStencilFunc(func:Int, ref:Int, mask:Int):Void {} public static function glStencilFuncSeparate(face:Int, func:Int, ref:Int, mask:Int):Void {} @@ -1756,57 +1756,39 @@ class OpenGL { public static function glTextureView(texture:Int, target:Int, origtexture:Int, internalformat:Int, minlevel:Int, numlevels:Int, minlayer:Int, numlayers:Int):Void {} public static function glTransformFeedbackVaryings(program:Int, count:Int, varyings:hl.NativeArray, bufferMode:Int):Void {} public static function glUniform1d(location:Int, x:hl.F64):Void {} - public static function glUniform1dv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform1f(location:Int, v0:hl.F32):Void {} - public static function glUniform1fv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform1i(location:Int, v0:Int):Void {} - public static function glUniform1iv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform1ui(location:Int, v0:Int):Void {} - public static function glUniform1uiv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform2d(location:Int, x:hl.F64, y:hl.F64):Void {} - public static function glUniform2dv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform2f(location:Int, v0:hl.F32, v1:hl.F32):Void {} - public static function glUniform2fv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform2i(location:Int, v0:Int, v1:Int):Void {} - public static function glUniform2iv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform2ui(location:Int, v0:Int, v1:Int):Void {} - public static function glUniform2uiv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform3d(location:Int, x:hl.F64, y:hl.F64, z:hl.F64):Void {} - public static function glUniform3dv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform3f(location:Int, v0:hl.F32, v1:hl.F32, v2:hl.F32):Void {} - public static function glUniform3fv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform3i(location:Int, v0:Int, v1:Int, v2:Int):Void {} - public static function glUniform3iv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform3ui(location:Int, v0:Int, v1:Int, v2:Int):Void {} - public static function glUniform3uiv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform4d(location:Int, x:hl.F64, y:hl.F64, z:hl.F64, w:hl.F64):Void {} - public static function glUniform4dv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform4f(location:Int, v0:hl.F32, v1:hl.F32, v2:hl.F32, v3:hl.F32):Void {} - public static function glUniform4fv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform4i(location:Int, v0:Int, v1:Int, v2:Int, v3:Int):Void {} - public static function glUniform4iv(location:Int, count:Int, value:hl.Ref):Void {} public static function glUniform4ui(location:Int, v0:Int, v1:Int, v2:Int, v3:Int):Void {} - public static function glUniform4uiv(location:Int, count:Int, value:hl.Ref):Void {} - public static function glUniformBlockBinding(program:Int, uniformBlockIndex:Int, uniformBlockBinding:Int):Void {} - public static function glUniformMatrix2dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix2fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix2x3dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix2x3fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix2x4dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix2x4fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix3dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix3fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix3x2dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix3x2fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix3x4dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix3x4fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix4dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix4fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix4x2dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix4x2fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix4x3dv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformMatrix4x3fv(location:Int, count:Int, transpose:Int, value:hl.Ref):Void {} - public static function glUniformSubroutinesuiv(shadertype:Int, count:Int, indices:hl.Ref):Void {} + public static function glUniformMatrix2dv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix2fv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix2x3dv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix2x3fv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix2x4dv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix2x4fv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix3dv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix3fv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix3x2dv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix3x2fv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix3x4dv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix3x4fv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix4dv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix4fv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix4x2dv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix4x2fv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix4x3dv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} + public static function glUniformMatrix4x3fv(location:Int, count:Int, transpose:Int, value:hl.Bytes):Void {} public static function glUnmapBuffer(target:Int):Int { return 0; } public static function glUseProgram(program:Int):Void {} public static function glUseProgramStages(pipeline:Int, stages:Int, program:Int):Void {} @@ -1891,7 +1873,7 @@ class OpenGL { public static function glVertexAttribP3uiv(index:Int, type:Int, normalized:Int, value:hl.Ref):Void {} public static function glVertexAttribP4ui(index:Int, type:Int, normalized:Int, value:Int):Void {} public static function glVertexAttribP4uiv(index:Int, type:Int, normalized:Int, value:hl.Ref):Void {} - public static function glVertexAttribPointer(index:Int, size:Int, type:Int, normalized:Int, stride:Int, pointer:hl.Bytes):Void {} + public static function glVertexAttribPointer(index:Int, size:Int, type:Int, normalized:Int, stride:Int, offset:Int):Void {} public static function glVertexBindingDivisor(bindingindex:Int, divisor:Int):Void {} public static function glVertexP2ui(type:Int, value:Int):Void {} public static function glVertexP2uiv(type:Int, value:hl.Ref):Void {} diff --git a/src/lemons/display/render/drivers/Driver.hx b/src/lemons/display/render/drivers/Driver.hx index d6f3a5b..fcbfe00 100644 --- a/src/lemons/display/render/drivers/Driver.hx +++ b/src/lemons/display/render/drivers/Driver.hx @@ -1,7 +1,10 @@ package lemons.display.render.drivers; import lemons.display.render.Window; +import lemons.geometry.Matrix; import lemons.display.shader.Shader; +import lemons.display.render.Buffer; +import lemons.display.render.Renderer.DataType; class Driver { public var backgroundColor:Color = 0x00000000; @@ -10,13 +13,39 @@ class Driver { public function prepare() {} public function setViewport(x:Int, y:Int, width:Int, height:Int) {} public function selectWindow(window:Window) {} - public function createNativeVertexBuffer():Dynamic { return null; } - public function bufferVertexBuffer(vertBuf:Dynamic, verticies:Array) {} - public function createNativeVertexArray():Dynamic { return null; } - public function setupVertexArray(vertArray:Dynamic, size:Int, stride:Int, offset:Int) {} - public function draw(vertArray:Dynamic, offset:Int, length:Int) {} - - public function createProgram(vertex:Shader, pixel:Shader) {} - public function createShader(type:ShaderType):Dynamic { return null; } - public function compileShader(shader:Shader):Int { return 0; } + public function createBuffer():Int { return 0; } + public function selectBuffer(buf:Int, type:BufferType) {} + + public function createVertexArray():Int { return 0; } + public function setupVertexArray(index:Int, size:Int, type:DataType, stride:Int, offset:Int) {} + public function selectVertexArray(vertArray:Int) {} + public function toggleVertexArrayAttr(index:Int, enabled:Bool) {} + public function deleteVertexArray(arr:Int) {} + + public function drawElements(offset:Int, length:Int) {} + + public function createShader(type:ShaderType):Int { return 0; } + public function compileShader(shader:Int, source:String):{ success:Bool, error:String } { return null; } + public function shaderWriteMatrix(shader:Int, name:String, matrix:Matrix) {} + + // i cant overload these! stupid!!!!!!!!! + public function bufferData(buf:Int, bufferType:BufferType, data:Array, size:Int, mode:BufferUploadMode) {} + public function bufferDataInt(buf:Int, bufferType:BufferType, data:Array, size:Int, mode:BufferUploadMode) {} + + function getBufferUploadMode(type:BufferUploadMode):Int { return 0; } + function getBufferType(type:BufferType):Int { return 0; } + function getDataType(type:DataType):Int { return 0; } + + public function createProgram():Int { return 0; } + public function deleteProgram(prog:Int) {} + public function addToProgram(prog:Int, shad:Int) {} + public function compileProgram(prog:Int):{ success:Bool, ?error:String } { return null; } + public function selectProgram(program:Int) {} + + function getDataSize(type:DataType):Int { + return switch(type) { + case INT | SINGLE: 4; + default: 0; + } + } } \ No newline at end of file diff --git a/src/lemons/display/render/drivers/OpenGLDriver.hx b/src/lemons/display/render/drivers/OpenGLDriver.hx index 7c7da9b..029f121 100644 --- a/src/lemons/display/render/drivers/OpenGLDriver.hx +++ b/src/lemons/display/render/drivers/OpenGLDriver.hx @@ -1,13 +1,31 @@ package lemons.display.render.drivers; -import lemons.display.render._backend.OpenGL; -import lemons.display.render._backend.GLFW; +import lemons.display.render._internal.OpenGL; +import lemons.display.render._internal.GLFW; import lemons.display.render.Window; import lemons.display.shader.Shader; +import lemons.display.render.Buffer; +import lemons.display.render.Renderer.DataType; +import lemons.geometry.Matrix; + +import haxe.macro.Expr; +import haxe.macro.Context; class OpenGLDriver extends Driver { + var functionCallStack:Array<{name:String, method:String, error:Int}> = []; + inline function pushToStack(name:String, method:String) { + functionCallStack.push({name: name, method: method, error: OpenGL.glGetError()}); + } + + function dump() { + for (call in functionCallStack) trace('Called ${call.name} in ${call.method} and returned ${call.error.hex(4)}'); + functionCallStack = []; + } + override public function init():Bool { - return OpenGL.gladLoadGl() != 0; + final result:Int = OpenGL.gladLoadGl(); + OpenGL.glFinish(); + return result != 0; } override public function selectWindow(window:Window) { @@ -19,32 +37,48 @@ class OpenGLDriver extends Driver { } override public function prepare() { + OpenGL.glUseProgram(0); + OpenGL.glColorMask(OpenGL.GL_TRUE, OpenGL.GL_TRUE, OpenGL.GL_TRUE, OpenGL.GL_TRUE); OpenGL.glClearColor(backgroundColor.redFloat, backgroundColor.greenFloat, backgroundColor.blueFloat, backgroundColor.alphaFloat); - OpenGL.glClear(OpenGL.GL_COLOR_BUFFER_BIT); + OpenGL.glDepthMask(OpenGL.GL_TRUE); + OpenGL.glClearDepth(1); + OpenGL.glClearStencil(0); + OpenGL.glClear(OpenGL.GL_COLOR_BUFFER_BIT | OpenGL.GL_DEPTH_BUFFER_BIT | OpenGL.GL_STENCIL_BUFFER_BIT); } - override public function createNativeVertexBuffer():Dynamic { + override public function createBuffer():Int { var buf = OpenGL.glGenBuffers(); return buf; } - override public function bufferVertexBuffer(vertBuf:Dynamic, verticies:Array) { - var size = verticies.length * 4; - - OpenGL.glBindBuffer(OpenGL.GL_ARRAY_BUFFER, vertBuf); - OpenGL.glBufferData(OpenGL.GL_ARRAY_BUFFER, size, hl.Bytes.getArray(verticies), OpenGL.GL_STATIC_DRAW); + override public function selectBuffer(buf:Int, type:BufferType) { + OpenGL.glBindBuffer(getBufferType(type), buf); } - override public function createNativeVertexArray():Dynamic { + override public function createVertexArray():Int { var arr = OpenGL.glGenVertexArrays(); return arr; } - override public function setupVertexArray(vertArray:Dynamic, size:Int, stride:Int, offset:Int) { - OpenGL.glVertexAttribPointer(vertArray, size, OpenGL.GL_FLOAT, OpenGL.GL_FALSE, stride, hl.Bytes.fromAddress(0)); + override public function setupVertexArray(index:Int, size:Int, type:DataType, stride:Int, offset:Int) { + OpenGL.glVertexAttribPointer(index, size, getDataType(type), OpenGL.GL_FALSE, stride * getDataSize(type), offset * getDataSize(type)); + } + + override public function selectVertexArray(vertArray:Int) { + OpenGL.glBindVertexArray(vertArray); + } + + override public function toggleVertexArrayAttr(index:Int, enabled:Bool) { + if (enabled) OpenGL.glEnableVertexAttribArray(index); + else OpenGL.glDisableVertexAttribArray(index); } - override public function createShader(type:ShaderType):Dynamic { + override public function deleteVertexArray(arr:Int) { + var siz:hl.Ref = cast arr; + OpenGL.glDeleteVertexArrays(1, siz); + } + + override public function createShader(type:ShaderType):Int { var shader = OpenGL.glCreateShader(switch (type) { case VERTEX: OpenGL.GL_VERTEX_SHADER; case PIXEL: OpenGL.GL_FRAGMENT_SHADER; @@ -52,12 +86,101 @@ class OpenGLDriver extends Driver { return shader; } - override public function compileShader(shader:Shader):Int { - // var shader = OpenGL.glCreateShader(); - return 0; + override public function compileShader(shader:Int, source:String):{ success:Bool, ?error:String } { + OpenGL.glShaderSource(shader, source); + OpenGL.glCompileShader(shader); // i guess we doin shader compilation error now + var success = 0; + OpenGL.glGetShaderiv(shader, OpenGL.GL_COMPILE_STATUS, success); + if (success == 0) { + var str = ''; + OpenGL.glGetShaderInfoLog(shader, 512, null, str); + + // reencode these int utf16 since string uses utf16 internally + var outLen = 0; + @:privateAccess str.bytes = str.bytes.utf8ToUtf16(0, outLen); + + return {success: false, error: str}; + } + return {success: true}; + } + + override public function createProgram():Int { + final prog = OpenGL.glCreateProgram(); + return prog; + } + + override public function deleteProgram(prog:Int) { + OpenGL.glDeleteProgram(prog); + } + + override public function addToProgram(prog:Int, shad:Int) { + OpenGL.glAttachShader(prog, shad); + } + + override public function compileProgram(prog:Int):{ success:Bool, ?error:String } { + OpenGL.glLinkProgram(prog); + var success = 0; + OpenGL.glGetProgramiv(prog, OpenGL.GL_LINK_STATUS, success); + if (success == 0) { + var str = ''; + OpenGL.glGetProgramInfoLog(prog, 512, null, str); + + // reencode these int utf16 since string uses utf16 internally + var outLen = 0; + @:privateAccess str.bytes = str.bytes.utf8ToUtf16(0, outLen); + + return {success: false, error: str}; + } + return {success: true}; + } + + override public function selectProgram(prog:Int) { + OpenGL.glUseProgram(prog); + } + + override public function drawElements(offset:Int, length:Int) { + OpenGL.glDrawElements(OpenGL.GL_TRIANGLES, length, OpenGL.GL_UNSIGNED_INT, 0); + } + + override public function bufferData(buf:Int, bufferType:BufferType, data:Array, size:Int, mode:BufferUploadMode) { + final type = getBufferType(bufferType); + OpenGL.glBindBuffer(type, buf); + OpenGL.glBufferData(type, size, hl.Bytes.getArray(data), getBufferUploadMode(mode)); + } + + override public function bufferDataInt(buf:Int, bufferType:BufferType, data:Array, size:Int, mode:BufferUploadMode) { + final type = getBufferType(bufferType); + OpenGL.glBindBuffer(type, buf); + OpenGL.glBufferData(type, size, hl.Bytes.getArray(data), getBufferUploadMode(mode)); + } + + override public function shaderWriteMatrix(prog:Int, name:String, matrix:Matrix) { + var loc = OpenGL.glGetUniformLocation(prog, name); + var vector:haxe.ds.Vector = matrix; + OpenGL.glUniformMatrix4fv(loc, 1, OpenGL.GL_FALSE, hl.Bytes.getArray(vector.toData())); + } + + override function getBufferType(type:BufferType):Int { + return switch(type) { + case VERTEX: OpenGL.GL_ARRAY_BUFFER; + case ELEMENT: OpenGL.GL_ELEMENT_ARRAY_BUFFER; + }; } - // override public function draw(vertArray:Dynamic, offset:Int, length:Int) { - // glVertexAttribPointer(vertArray, size, OpenGL.GL_FLOAT, OpenGL.GL_FALSE, side, hl.Bytes.fromAddress(0)); - // } -} \ No newline at end of file + override function getDataType(type:DataType):Int { + return switch(type) { + case INT: OpenGL.GL_UNSIGNED_INT; + case SINGLE: OpenGL.GL_FLOAT; + }; + } + + override function getBufferUploadMode(type:BufferUploadMode):Int { + return switch(type) { + case STREAM: OpenGL.GL_STREAM_DRAW; + case STATIC: OpenGL.GL_STATIC_DRAW; + case DYNAMIC: OpenGL.GL_DYNAMIC_DRAW; + }; + } +} + + diff --git a/src/lemons/display/shader/Program.hx b/src/lemons/display/shader/Program.hx new file mode 100644 index 0000000..2510853 --- /dev/null +++ b/src/lemons/display/shader/Program.hx @@ -0,0 +1,88 @@ +package lemons.display.shader; + +import lemons.display.render.Renderer.DataType; +import lemons.geometry.Matrix; + +typedef Attributes = Array<{size:Int, type:DataType, stride:Int, offset:Int}> + +enum UniformWriteDataType { + MATRIX; +} + +class UniformWrite { + public var next:UniformWrite; + public var value(default, null):Any; + public var type(default, null):UniformWriteDataType; + public var uniform(default, null):String; + + public function new(value:Any, type:UniformWriteDataType, uniform:String) { + this.value = value; + this.type = type; + this.uniform = uniform; + } +} + + +@:allow(lemons.display.render.Renderer) +class Program { + var _nativeHandle:Int = -1; + var _needsAllocation:Bool; + var _uniformQueue(default, null):UniformWrite = null; + + var attributes:Attributes = _defaultAttributes; + + public var vertexShader(default, null):Shader = _defaultVertexShader; + public var pixelShader(default, null):Shader = _defaultPixelShader; + + // TODO: embed these shaders when i make the macro for it + static var _defaultVertexShader:Shader = Shader.fromString(VERTEX, ' + #version 330 core + layout (location = 0) in vec3 vecPos; + layout (location = 1) in vec2 vecUV; + out vec2 uv; + + uniform mat4 trans; + uniform mat4 proj; + + void main(void) { + gl_Position = proj * trans * vec4(vecPos, 1.0); + uv = vecUV; + }'); + + static var _defaultPixelShader:Shader = Shader.fromString(PIXEL, ' + #version 330 core + in vec2 uv; + out vec4 pixelColor; + + void main() + { + pixelColor = vec4(1.0f, 1.0f, 1.0f, 1.0f); + }'); + + static var _defaultAttributes:Attributes = [{/* pos */ size: 3, type: SINGLE, stride: 5, offset: 0}, {/* uv */ size: 2, type: SINGLE, stride: 5, offset: 3}]; + + + public function new() { + _needsAllocation = true; + } + + public function setShader(?vertexShader:Shader, ?pixelShader:Shader) { + if (vertexShader != null) this.vertexShader = vertexShader; + if (pixelShader != null) this.pixelShader = pixelShader; + _needsAllocation = true; + } + + inline public function writeMat4(name:String, mat:Matrix) writeUniform(new UniformWrite(mat, MATRIX, name)); + + // maybe refactor this list to be reversed instead? if someone thats stupid sets like 89524103 uniforms this will take a lot of cycles + function writeUniform(item:UniformWrite):Void { + if (_uniformQueue == null) { + _uniformQueue = item; + return; + } + + var topItem:UniformWrite = _uniformQueue; + while (topItem.next != null) topItem = topItem.next; + topItem.next = item; + } +} diff --git a/src/lemons/display/shader/Shader.hx b/src/lemons/display/shader/Shader.hx index e8818e5..df0df32 100644 --- a/src/lemons/display/shader/Shader.hx +++ b/src/lemons/display/shader/Shader.hx @@ -1,6 +1,7 @@ package lemons.display.shader; import lemons.display.render.Renderer; +import lemons.geometry.Matrix; enum abstract ShaderType(Int) to Int { var VERTEX = 0; @@ -24,16 +25,17 @@ enum abstract ShaderType(Int) to Int { * final somePixelShader:Shader = Shader.fromResource(PIXEL, /*some resource here*\/); * ``` * - * TODO: write some lexer and transpiler for glsl since all the transpiler i can find are in c++ + * TODO: write some lexer and transpiler for glsl since all the transpilers i can find are in c++ and not c **/ +@:allow(lemons.display.render.Renderer) class Shader { public var shaderType(default, null):ShaderType = VERTEX; var _source:String; + var _nativeHandle:Int = -1; var _compiled:Bool = false; - var _nativeHandle:Int = 0; - public function new(shaderType:ShaderType) { + private function new(shaderType:ShaderType) { this.shaderType = shaderType; } @@ -42,8 +44,4 @@ class Shader { shader._source = source; return shader; } - - function compile(renderer:Renderer):Void { - _nativeHandle = renderer.driver.createShader(shaderType); - } } \ No newline at end of file diff --git a/src/lemons/geometry/Matrix.hx b/src/lemons/geometry/Matrix.hx new file mode 100644 index 0000000..d916a1e --- /dev/null +++ b/src/lemons/geometry/Matrix.hx @@ -0,0 +1,90 @@ +package lemons.geometry; + +import haxe.ds.Vector; + +/** + * a 4x4 matrix. what else would it be? +**/ +abstract Matrix(Vector) to Vector { + + private function new(vec:Vector):Void { + if (vec.length != 16) throw 'Vector must be 16 Singles long'; + this = vec; + } + + @:from public static function fromArray(arr:Array):Matrix { + var matrix = new Matrix(Vector.fromArrayCopy(arr)); + return matrix; + } + + public static function fromIdentity():Matrix { + var matrix = new Matrix(new Vector(16)); + matrix.identity(); + return matrix; + } + + public function transform(x:Float, y:Float):Void { + this[12] += x; + this[13] += y; + } + + inline public function scale(x:Single, y:Single):Void { + this = mult(fromArray([ + x, 0, 0, 0, + 0, y, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1])); + } + + inline public function rotate(theta:Float):Void { + var cosTheta = Math.cos(theta); + var sinTheta = Math.sin(theta); + this = mult(fromArray([ + cosTheta, -sinTheta, 0, 0, + sinTheta, cosTheta, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1])); + } + + public function identity():Void { + this[0] = 1; this[1] = 0; this[2] = 0; this[3] = 0; + this[4] = 0; this[5] = 1; this[6] = 0; this[7] = 0; + this[8] = 0; this[9] = 0; this[10] = 1; this[11] = 0; + this[12] = 0; this[13] = 0; this[14] = 0; this[15] = 1; + } + + public function orthographic(left:Float, right:Float, top:Float, bottom:Float, far:Float, near:Float):Void { + this[0] = 2 / (right - left); this[1] = 0; this[2] = 0; this[3] = 0; + this[4] = 0; this[5] = 2 / (top - bottom); this[6] = 0; this[7] = 0; + this[8] = 0; this[9] = 0; this[10] = -2 / (far - near); this[11] = 0; + this[12] = -((right + left) / (right - left)); this[13] = -((top + bottom) / (top - bottom)); this[14] = -((far + near) / (far - near)); this[15] = 1; + } + + @:op(A * B) public function mult(mat:Matrix):Matrix { + return fromArray([ + this[0] * mat[0] + this[1] * mat[4] + this[2] * mat[8] + this[3] * mat[12], + this[0] * mat[1] + this[1] * mat[5] + this[2] * mat[9] + this[3] * mat[13], + this[0] * mat[2] + this[1] * mat[6] + this[2] * mat[10] + this[3] * mat[14], + this[0] * mat[3] + this[1] * mat[7] + this[2] * mat[11] + this[3] * mat[15], + + this[4] * mat[0] + this[5] * mat[4] + this[6] * mat[8] + this[7] * mat[12], + this[4] * mat[1] + this[5] * mat[5] + this[6] * mat[9] + this[7] * mat[13], + this[4] * mat[2] + this[5] * mat[6] + this[6] * mat[10] + this[7] * mat[14], + this[4] * mat[3] + this[5] * mat[7] + this[6] * mat[11] + this[7] * mat[15], + + this[8] * mat[0] + this[9] * mat[4] + this[10] * mat[8] + this[11] * mat[12], + this[8] * mat[1] + this[9] * mat[5] + this[10] * mat[9] + this[11] * mat[13], + this[8] * mat[2] + this[9] * mat[6] + this[10] * mat[10] + this[11] * mat[14], + this[8] * mat[3] + this[9] * mat[7] + this[10] * mat[11] + this[11] * mat[15], + + this[12] * mat[0] + this[13] * mat[4] + this[14] * mat[8] + this[15] * mat[12], + this[12] * mat[1] + this[13] * mat[5] + this[14] * mat[9] + this[15] * mat[13], + this[12] * mat[2] + this[13] * mat[6] + this[14] * mat[10] + this[15] * mat[14], + this[12] * mat[3] + this[13] * mat[7] + this[14] * mat[11] + this[15] * mat[15], + ]); + } + + @:op([]) public function get(comp:Int):Single return this[comp]; + @:op([]) public function set(comp:Int, value:Single) this[comp] = value; + +} \ No newline at end of file diff --git a/src/lemons/geometry/Rect.hx b/src/lemons/geometry/Rect.hx new file mode 100644 index 0000000..cb0f1c7 --- /dev/null +++ b/src/lemons/geometry/Rect.hx @@ -0,0 +1,45 @@ +package lemons.geometry; + +/** + * a rectangle. what else would it be? +**/ +class Rect { + public var x:Float; + public var y:Float; + public var width:Float; + public var height:Float; + + public var left(get, set):Float; + public var bottom(get, set):Float; + public var top(get, set):Float; + public var right(get, set):Float; + + public function new(x:Float, y:Float, width:Float, height:Float):Void { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + } + + /** + * check for if another rectangle is colliding/intersecting this one + **/ + public function rectColliding(otherRect:Rect):Bool { + // watch out! its the gay rectangle intersect check + return (this.left < otherRect.right && this.right > otherRect.left && + this.top > otherRect.bottom && this.bottom < otherRect.top); + } + + + function get_left():Float return x; + function set_left(lef:Float):Float return x = lef; + + function get_top():Float return y; + function set_top(topp:Float):Float return y = topp; + + function get_bottom():Float return y + height; + function set_bottom(bot:Float):Float return height = bot - y; + + function get_right():Float return x + width; + function set_right(rig:Float):Float return width = rig - x; +} \ No newline at end of file diff --git a/src/lemons/import.hx b/src/lemons/import.hx index 6c3b3c1..215afb7 100644 --- a/src/lemons/import.hx +++ b/src/lemons/import.hx @@ -1,2 +1,3 @@ +import lemons.util.IDestroyable; import lemons.display.Color; using StringTools; \ No newline at end of file diff --git a/src/lemons/util/IDestroyable.hx b/src/lemons/util/IDestroyable.hx index 83d7b18..5603b5c 100644 --- a/src/lemons/util/IDestroyable.hx +++ b/src/lemons/util/IDestroyable.hx @@ -1,11 +1,11 @@ package lemons.util; /** - * Basic interface for a class that can be destroyed + * basic interface for a class that can be destroyed **/ interface IDestroyable { /** - * Destroyes the instance + * destroyes the instance **/ public function destroy():Void; } \ No newline at end of file diff --git a/src/lemons/util/Log.hx b/src/lemons/util/Log.hx new file mode 100644 index 0000000..dbee7ac --- /dev/null +++ b/src/lemons/util/Log.hx @@ -0,0 +1,11 @@ +package lemons.util; + + +// TODO: this class + +class Log { + static var useColor:Bool = true; + + + #if sys static function __init__():Void useColor = Sys.args().contains('--nocolor'); #end +} \ No newline at end of file diff --git a/src/lemons/util/Signal.hx b/src/lemons/util/Signal.hx index 46b6ee0..1e702da 100644 --- a/src/lemons/util/Signal.hx +++ b/src/lemons/util/Signal.hx @@ -1,5 +1,9 @@ package lemons.util; + +// TODO: this class is non functional for cases like Void->Void, fix that + + class Signal { private var listeners:Array<{func:I->R, once:Bool}> = []; diff --git a/tools/commands/BuildCommand.hx b/tools/commands/BuildCommand.hx index 8f51138..40a1b13 100644 --- a/tools/commands/BuildCommand.hx +++ b/tools/commands/BuildCommand.hx @@ -24,8 +24,13 @@ class BuildCommand { exitCode = Sys.command('haxe ' + parsedProject.toArgList().join(' ')); - var libraryFiles:Array = sys.FileSystem.readDirectory(setup.globalVariables['liblemonsDirectory'] + '/out').filter((str) -> return !str.contains('.pdb')); - for (file in libraryFiles) - sys.io.File.copy(setup.globalVariables['liblemonsDirectory'] + '/out/' + file, parsedProject.getOutputPath() + '/' + file); + try { + var libraryFiles:Array = sys.FileSystem.readDirectory(setup.globalVariables['liblemonsDirectory'] + '/out').filter((str) -> return !str.contains('.pdb')); + for (file in libraryFiles) + sys.io.File.copy(setup.globalVariables['liblemonsDirectory'] + '/out/' + file, parsedProject.getOutputPath() + '/' + file); + } catch(e) { + Sys.println('could not find the native extension library for lemons. make sure the path ${setup.globalVariables['liblemonsDirectory'] + '/out'} exists.\nif you are using the git version of lemons, you should follow the guide on how to build the native extension manually.\nif this was downloaded off of haxelib, send an issue in the lemons github repository\nhttps://github.com/LemonsFramework/lemons'); + } + } } \ No newline at end of file From 61a15fb7034a816846fc0072794c51bf6cfcd83d Mon Sep 17 00:00:00 2001 From: plank <75984453+ThePlank@users.noreply.github.com> Date: Fri, 27 Dec 2024 18:45:06 +0100 Subject: [PATCH 19/19] push what i have right now because i not only upgraded pcs but also transferred the same clone over to a new drive --- resources/unknown.png | Bin 0 -> 542 bytes src/lemons/Time.hx | 9 ++++++ src/lemons/display/Texture.hx | 12 ++++++++ src/lemons/display/render/Renderer.hx | 2 +- src/lemons/resource/Image.hx | 41 ++++++++++++++++++++++++++ tools/commands/BuildCommand.hx | 1 + 6 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 resources/unknown.png create mode 100644 src/lemons/display/Texture.hx create mode 100644 src/lemons/resource/Image.hx diff --git a/resources/unknown.png b/resources/unknown.png new file mode 100644 index 0000000000000000000000000000000000000000..e471bb64b3bd20082604e4ec72ca4245f78a0f2c GIT binary patch literal 542 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1SEZ8zRdwrjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc4Vyh(978JN-rltiy5k_?a8YarLp8IXf=c@T z)dlY+9I#&ShmlROCA+L(`SNos!zVGR{(a}O=IMvmb!XnZd-(jH$@1>Mel86&7z`Pc zn2xY?a0&=3s5$u1Um!Yf|9k(*Reub>f9L}?uh03%@cUkR)US=k90ukT1(oSB=@@S%Tbq^p{{!Qc N!PC{xWt~$(69D$QxcvYC literal 0 HcmV?d00001 diff --git a/src/lemons/Time.hx b/src/lemons/Time.hx index d21345b..54ba800 100644 --- a/src/lemons/Time.hx +++ b/src/lemons/Time.hx @@ -39,6 +39,10 @@ class Time { **/ public function start(updateFunc:Void->Void, app:lemons.App) { while (app.window.live) { + #if profiler + hl.Profile.event(-1); + #end + final time:Float = app.window.time; delta = time - _timestamp; @@ -48,6 +52,11 @@ class Time { app.window.update(); _timestamp = time; + + #if profiler + hl.Profile.event(0); + hl.Profile.event(-2); + #end } } diff --git a/src/lemons/display/Texture.hx b/src/lemons/display/Texture.hx new file mode 100644 index 0000000..cf1c224 --- /dev/null +++ b/src/lemons/display/Texture.hx @@ -0,0 +1,12 @@ +package lemons.display; + + +/** + * a texture. note that this isn't the same as `Image`. `Image` is a class that holds image data at a software level, while `Texture` is at a hardware level. +**/ +@:allow(lemons.display.render.Renderer) +class Texture { + + + +} \ No newline at end of file diff --git a/src/lemons/display/render/Renderer.hx b/src/lemons/display/render/Renderer.hx index 01de5fb..7a57d59 100644 --- a/src/lemons/display/render/Renderer.hx +++ b/src/lemons/display/render/Renderer.hx @@ -158,7 +158,7 @@ class Renderer { curUniform = curUniform.next; } } - + prog._uniformQueue = null; return; } diff --git a/src/lemons/resource/Image.hx b/src/lemons/resource/Image.hx new file mode 100644 index 0000000..0741689 --- /dev/null +++ b/src/lemons/resource/Image.hx @@ -0,0 +1,41 @@ +package lemons.display; + +import haxe.io.Bytes; + + +/** + * specifies in what colour format the raw image data is stored in +**/ +enum abstract ImageFormat(Int) to Int { + /** + * indicates 4 values in order of red, green, blue and alpha, all using 8 bits and 32 bits in total + **/ + var RGBA32 = 0; + + /** + * indicates a greyscale image with only one value, red, using 8 bits + **/ + var RED8 = 1; + + /** + * red 8 more like uhhhhhhhhh red 40 + * haha get it + * red 40 + * + * red fourty + * + * nevertheless, this is the same as `RED8` + **/ + var RED40 = 1; +} + +/** + * an image +**/ +class Image { + public final bytes:Bytes; + + function new(bytes:Bytes, format:ImageFormat) { + this.bytes = bytes; + } +} \ No newline at end of file diff --git a/tools/commands/BuildCommand.hx b/tools/commands/BuildCommand.hx index 40a1b13..238c0a4 100644 --- a/tools/commands/BuildCommand.hx +++ b/tools/commands/BuildCommand.hx @@ -30,6 +30,7 @@ class BuildCommand { sys.io.File.copy(setup.globalVariables['liblemonsDirectory'] + '/out/' + file, parsedProject.getOutputPath() + '/' + file); } catch(e) { Sys.println('could not find the native extension library for lemons. make sure the path ${setup.globalVariables['liblemonsDirectory'] + '/out'} exists.\nif you are using the git version of lemons, you should follow the guide on how to build the native extension manually.\nif this was downloaded off of haxelib, send an issue in the lemons github repository\nhttps://github.com/LemonsFramework/lemons'); + Sys.println(e); } }