diff --git a/ExampleApplication/ExampleApplication.csproj b/ExampleApplication/ExampleApplication.csproj index ff4a0d8..5988753 100644 --- a/ExampleApplication/ExampleApplication.csproj +++ b/ExampleApplication/ExampleApplication.csproj @@ -6,8 +6,8 @@ AnyCPU {A2B3BBC8-3D48-46DD-B3CF-263F554E4474} Exe - Raylib_example - Raylib-example + ExampleApplication + ExampleApplication v4.6.1 512 true @@ -240,8 +240,6 @@ - - @@ -249,7 +247,4 @@ - - XCOPY "$(ProjectDir)Examples\resources" "$(TargetDir)\resources\" /Y /S /I - \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/AnonymousPro-Bold.ttf b/ExampleApplication/Examples/resources/AnonymousPro-Bold.ttf deleted file mode 100644 index badb0aa..0000000 Binary files a/ExampleApplication/Examples/resources/AnonymousPro-Bold.ttf and /dev/null differ diff --git a/ExampleApplication/Examples/resources/AnonymousPro_OFL.txt b/ExampleApplication/Examples/resources/AnonymousPro_OFL.txt deleted file mode 100644 index 5ca1911..0000000 --- a/ExampleApplication/Examples/resources/AnonymousPro_OFL.txt +++ /dev/null @@ -1,94 +0,0 @@ -Copyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com), -with Reserved Font Name Anonymous Pro. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/ExampleApplication/Examples/resources/KAISG.ttf b/ExampleApplication/Examples/resources/KAISG.ttf deleted file mode 100644 index 04478b2..0000000 Binary files a/ExampleApplication/Examples/resources/KAISG.ttf and /dev/null differ diff --git a/ExampleApplication/Examples/resources/angle_gauge.png b/ExampleApplication/Examples/resources/angle_gauge.png deleted file mode 100644 index f7871de..0000000 Binary files a/ExampleApplication/Examples/resources/angle_gauge.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/applause.mp3 b/ExampleApplication/Examples/resources/applause.mp3 deleted file mode 100644 index 084a7d1..0000000 Binary files a/ExampleApplication/Examples/resources/applause.mp3 and /dev/null differ diff --git a/ExampleApplication/Examples/resources/background.png b/ExampleApplication/Examples/resources/background.png deleted file mode 100644 index 69a74b7..0000000 Binary files a/ExampleApplication/Examples/resources/background.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/billboard.png b/ExampleApplication/Examples/resources/billboard.png deleted file mode 100644 index e2fe398..0000000 Binary files a/ExampleApplication/Examples/resources/billboard.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/bmfont.fnt b/ExampleApplication/Examples/resources/bmfont.fnt deleted file mode 100644 index 372c2c8..0000000 --- a/ExampleApplication/Examples/resources/bmfont.fnt +++ /dev/null @@ -1,99 +0,0 @@ -info face="Arial Black" size=-32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=2,2 outline=0 -common lineHeight=45 base=35 scaleW=512 scaleH=256 pages=1 packed=0 alphaChnl=0 redChnl=4 greenChnl=4 blueChnl=4 -page id=0 file="bmfont.png" -chars count=95 -char id=32 x=423 y=141 width=3 height=45 xoffset=-1 yoffset=0 xadvance=11 page=0 chnl=15 -char id=33 x=323 y=141 width=9 height=45 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15 -char id=34 x=123 y=141 width=16 height=45 xoffset=0 yoffset=0 xadvance=16 page=0 chnl=15 -char id=35 x=221 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=36 x=244 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=37 x=70 y=0 width=30 height=45 xoffset=1 yoffset=0 xadvance=32 page=0 chnl=15 -char id=38 x=390 y=0 width=25 height=45 xoffset=2 yoffset=0 xadvance=28 page=0 chnl=15 -char id=39 x=378 y=141 width=8 height=45 xoffset=1 yoffset=0 xadvance=9 page=0 chnl=15 -char id=40 x=222 y=141 width=11 height=45 xoffset=1 yoffset=0 xadvance=12 page=0 chnl=15 -char id=41 x=499 y=94 width=11 height=45 xoffset=1 yoffset=0 xadvance=12 page=0 chnl=15 -char id=42 x=497 y=47 width=13 height=45 xoffset=2 yoffset=0 xadvance=18 page=0 chnl=15 -char id=43 x=394 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=44 x=367 y=141 width=9 height=45 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15 -char id=45 x=261 y=141 width=11 height=45 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15 -char id=46 x=356 y=141 width=9 height=45 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15 -char id=47 x=248 y=141 width=11 height=45 xoffset=-1 yoffset=0 xadvance=9 page=0 chnl=15 -char id=48 x=382 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=49 x=496 y=0 width=14 height=45 xoffset=2 yoffset=0 xadvance=21 page=0 chnl=15 -char id=50 x=134 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=51 x=359 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=52 x=313 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=53 x=336 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=54 x=178 y=94 width=20 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=55 x=478 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=56 x=290 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=57 x=90 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=58 x=345 y=141 width=9 height=45 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15 -char id=59 x=334 y=141 width=9 height=45 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15 -char id=60 x=0 y=141 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=61 x=21 y=141 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=62 x=310 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=63 x=352 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=20 page=0 chnl=15 -char id=64 x=279 y=0 width=26 height=45 xoffset=-1 yoffset=0 xadvance=24 page=0 chnl=15 -char id=65 x=193 y=0 width=27 height=45 xoffset=-1 yoffset=0 xadvance=25 page=0 chnl=15 -char id=66 x=150 y=47 width=22 height=45 xoffset=2 yoffset=0 xadvance=25 page=0 chnl=15 -char id=67 x=444 y=0 width=24 height=45 xoffset=1 yoffset=0 xadvance=25 page=0 chnl=15 -char id=68 x=174 y=47 width=22 height=45 xoffset=2 yoffset=0 xadvance=25 page=0 chnl=15 -char id=69 x=156 y=94 width=20 height=45 xoffset=2 yoffset=0 xadvance=23 page=0 chnl=15 -char id=70 x=63 y=141 width=18 height=45 xoffset=2 yoffset=0 xadvance=21 page=0 chnl=15 -char id=71 x=417 y=0 width=25 height=45 xoffset=1 yoffset=0 xadvance=27 page=0 chnl=15 -char id=72 x=125 y=47 width=23 height=45 xoffset=2 yoffset=0 xadvance=27 page=0 chnl=15 -char id=73 x=388 y=141 width=8 height=45 xoffset=2 yoffset=0 xadvance=12 page=0 chnl=15 -char id=74 x=200 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=75 x=251 y=0 width=26 height=45 xoffset=2 yoffset=0 xadvance=27 page=0 chnl=15 -char id=76 x=373 y=94 width=19 height=45 xoffset=2 yoffset=0 xadvance=21 page=0 chnl=15 -char id=77 x=134 y=0 width=28 height=45 xoffset=1 yoffset=0 xadvance=30 page=0 chnl=15 -char id=78 x=100 y=47 width=23 height=45 xoffset=2 yoffset=0 xadvance=27 page=0 chnl=15 -char id=79 x=363 y=0 width=25 height=45 xoffset=1 yoffset=0 xadvance=27 page=0 chnl=15 -char id=80 x=112 y=94 width=20 height=45 xoffset=2 yoffset=0 xadvance=23 page=0 chnl=15 -char id=81 x=335 y=0 width=26 height=45 xoffset=1 yoffset=0 xadvance=27 page=0 chnl=15 -char id=82 x=470 y=0 width=24 height=45 xoffset=2 yoffset=0 xadvance=25 page=0 chnl=15 -char id=83 x=75 y=47 width=23 height=45 xoffset=0 yoffset=0 xadvance=23 page=0 chnl=15 -char id=84 x=50 y=47 width=23 height=45 xoffset=0 yoffset=0 xadvance=23 page=0 chnl=15 -char id=85 x=25 y=47 width=23 height=45 xoffset=2 yoffset=0 xadvance=27 page=0 chnl=15 -char id=86 x=307 y=0 width=26 height=45 xoffset=0 yoffset=0 xadvance=25 page=0 chnl=15 -char id=87 x=0 y=0 width=34 height=45 xoffset=-1 yoffset=0 xadvance=32 page=0 chnl=15 -char id=88 x=222 y=0 width=27 height=45 xoffset=-1 yoffset=0 xadvance=25 page=0 chnl=15 -char id=89 x=164 y=0 width=27 height=45 xoffset=-1 yoffset=0 xadvance=25 page=0 chnl=15 -char id=90 x=0 y=47 width=23 height=45 xoffset=0 yoffset=0 xadvance=23 page=0 chnl=15 -char id=91 x=274 y=141 width=11 height=45 xoffset=1 yoffset=0 xadvance=12 page=0 chnl=15 -char id=92 x=300 y=141 width=10 height=45 xoffset=-1 yoffset=0 xadvance=9 page=0 chnl=15 -char id=93 x=287 y=141 width=11 height=45 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 -char id=94 x=457 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=95 x=103 y=141 width=18 height=45 xoffset=-1 yoffset=0 xadvance=16 page=0 chnl=15 -char id=96 x=312 y=141 width=9 height=45 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15 -char id=97 x=474 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=98 x=68 y=94 width=20 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=99 x=267 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=100 x=46 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=101 x=198 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=102 x=141 y=141 width=15 height=45 xoffset=-1 yoffset=0 xadvance=12 page=0 chnl=15 -char id=103 x=222 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=104 x=415 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=105 x=398 y=141 width=7 height=45 xoffset=2 yoffset=0 xadvance=11 page=0 chnl=15 -char id=106 x=235 y=141 width=11 height=45 xoffset=-2 yoffset=0 xadvance=11 page=0 chnl=15 -char id=107 x=405 y=47 width=21 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=108 x=407 y=141 width=7 height=45 xoffset=2 yoffset=0 xadvance=11 page=0 chnl=15 -char id=109 x=102 y=0 width=30 height=45 xoffset=1 yoffset=0 xadvance=32 page=0 chnl=15 -char id=110 x=331 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=111 x=428 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=112 x=266 y=94 width=20 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=113 x=288 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=114 x=158 y=141 width=15 height=45 xoffset=1 yoffset=0 xadvance=14 page=0 chnl=15 -char id=115 x=244 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=20 page=0 chnl=15 -char id=116 x=175 y=141 width=14 height=45 xoffset=0 yoffset=0 xadvance=14 page=0 chnl=15 -char id=117 x=436 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 -char id=118 x=451 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=20 page=0 chnl=15 -char id=119 x=36 y=0 width=32 height=45 xoffset=-1 yoffset=0 xadvance=30 page=0 chnl=15 -char id=120 x=0 y=94 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 -char id=121 x=23 y=94 width=21 height=45 xoffset=0 yoffset=0 xadvance=20 page=0 chnl=15 -char id=122 x=83 y=141 width=18 height=45 xoffset=0 yoffset=0 xadvance=18 page=0 chnl=15 -char id=123 x=191 y=141 width=14 height=45 xoffset=-1 yoffset=0 xadvance=12 page=0 chnl=15 -char id=124 x=416 y=141 width=5 height=45 xoffset=2 yoffset=0 xadvance=9 page=0 chnl=15 -char id=125 x=207 y=141 width=13 height=45 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15 -char id=126 x=42 y=141 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15 diff --git a/ExampleApplication/Examples/resources/bmfont.png b/ExampleApplication/Examples/resources/bmfont.png deleted file mode 100644 index 9d62159..0000000 Binary files a/ExampleApplication/Examples/resources/bmfont.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/cat.png b/ExampleApplication/Examples/resources/cat.png deleted file mode 100644 index d023aa2..0000000 Binary files a/ExampleApplication/Examples/resources/cat.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/chiptun1.mod b/ExampleApplication/Examples/resources/chiptun1.mod deleted file mode 100644 index 00d1688..0000000 Binary files a/ExampleApplication/Examples/resources/chiptun1.mod and /dev/null differ diff --git a/ExampleApplication/Examples/resources/coin.wav b/ExampleApplication/Examples/resources/coin.wav deleted file mode 100644 index 6007509..0000000 Binary files a/ExampleApplication/Examples/resources/coin.wav and /dev/null differ diff --git a/ExampleApplication/Examples/resources/cubicmap.png b/ExampleApplication/Examples/resources/cubicmap.png deleted file mode 100644 index b361c01..0000000 Binary files a/ExampleApplication/Examples/resources/cubicmap.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/cubicmap_atlas.png b/ExampleApplication/Examples/resources/cubicmap_atlas.png deleted file mode 100644 index 7ddfc83..0000000 Binary files a/ExampleApplication/Examples/resources/cubicmap_atlas.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/custom_alagard.png b/ExampleApplication/Examples/resources/custom_alagard.png deleted file mode 100644 index c3eb63b..0000000 Binary files a/ExampleApplication/Examples/resources/custom_alagard.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/custom_jupiter_crash.png b/ExampleApplication/Examples/resources/custom_jupiter_crash.png deleted file mode 100644 index 451b591..0000000 Binary files a/ExampleApplication/Examples/resources/custom_jupiter_crash.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/custom_mecha.png b/ExampleApplication/Examples/resources/custom_mecha.png deleted file mode 100644 index 59caab2..0000000 Binary files a/ExampleApplication/Examples/resources/custom_mecha.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/dresden_square.hdr b/ExampleApplication/Examples/resources/dresden_square.hdr deleted file mode 100644 index b6d0e77..0000000 Binary files a/ExampleApplication/Examples/resources/dresden_square.hdr and /dev/null differ diff --git a/ExampleApplication/Examples/resources/fonts/alagard.png b/ExampleApplication/Examples/resources/fonts/alagard.png deleted file mode 100644 index 3ac4bf1..0000000 Binary files a/ExampleApplication/Examples/resources/fonts/alagard.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/fonts/alpha_beta.png b/ExampleApplication/Examples/resources/fonts/alpha_beta.png deleted file mode 100644 index c362bfb..0000000 Binary files a/ExampleApplication/Examples/resources/fonts/alpha_beta.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/fonts/jupiter_crash.png b/ExampleApplication/Examples/resources/fonts/jupiter_crash.png deleted file mode 100644 index 1f5172f..0000000 Binary files a/ExampleApplication/Examples/resources/fonts/jupiter_crash.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/fonts/mecha.png b/ExampleApplication/Examples/resources/fonts/mecha.png deleted file mode 100644 index 8022d18..0000000 Binary files a/ExampleApplication/Examples/resources/fonts/mecha.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/fonts/pixantiqua.png b/ExampleApplication/Examples/resources/fonts/pixantiqua.png deleted file mode 100644 index ce422e7..0000000 Binary files a/ExampleApplication/Examples/resources/fonts/pixantiqua.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/fonts/pixelplay.png b/ExampleApplication/Examples/resources/fonts/pixelplay.png deleted file mode 100644 index bf8f881..0000000 Binary files a/ExampleApplication/Examples/resources/fonts/pixelplay.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/fonts/romulus.png b/ExampleApplication/Examples/resources/fonts/romulus.png deleted file mode 100644 index 46ccc32..0000000 Binary files a/ExampleApplication/Examples/resources/fonts/romulus.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/fonts/setback.png b/ExampleApplication/Examples/resources/fonts/setback.png deleted file mode 100644 index 086f3e2..0000000 Binary files a/ExampleApplication/Examples/resources/fonts/setback.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/fudesumi.png b/ExampleApplication/Examples/resources/fudesumi.png deleted file mode 100644 index 9d9038f..0000000 Binary files a/ExampleApplication/Examples/resources/fudesumi.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/fudesumi.raw b/ExampleApplication/Examples/resources/fudesumi.raw deleted file mode 100644 index dad6ff0..0000000 Binary files a/ExampleApplication/Examples/resources/fudesumi.raw and /dev/null differ diff --git a/ExampleApplication/Examples/resources/guitar_noodling.ogg b/ExampleApplication/Examples/resources/guitar_noodling.ogg deleted file mode 100644 index f502204..0000000 Binary files a/ExampleApplication/Examples/resources/guitar_noodling.ogg and /dev/null differ diff --git a/ExampleApplication/Examples/resources/heightmap.png b/ExampleApplication/Examples/resources/heightmap.png deleted file mode 100644 index fe30f67..0000000 Binary files a/ExampleApplication/Examples/resources/heightmap.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/mini1111.xm b/ExampleApplication/Examples/resources/mini1111.xm deleted file mode 100644 index a185c1a..0000000 Binary files a/ExampleApplication/Examples/resources/mini1111.xm and /dev/null differ diff --git a/ExampleApplication/Examples/resources/models/barracks_diffuse.png b/ExampleApplication/Examples/resources/models/barracks_diffuse.png deleted file mode 100644 index 25a3658..0000000 Binary files a/ExampleApplication/Examples/resources/models/barracks_diffuse.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/models/church_diffuse.png b/ExampleApplication/Examples/resources/models/church_diffuse.png deleted file mode 100644 index 7399846..0000000 Binary files a/ExampleApplication/Examples/resources/models/church_diffuse.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/models/watermill_diffuse.png b/ExampleApplication/Examples/resources/models/watermill_diffuse.png deleted file mode 100644 index 7064956..0000000 Binary files a/ExampleApplication/Examples/resources/models/watermill_diffuse.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/parrots.png b/ExampleApplication/Examples/resources/parrots.png deleted file mode 100644 index d6ec60b..0000000 Binary files a/ExampleApplication/Examples/resources/parrots.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/pbr/trooper_albedo.png b/ExampleApplication/Examples/resources/pbr/trooper_albedo.png deleted file mode 100644 index ac1422e..0000000 Binary files a/ExampleApplication/Examples/resources/pbr/trooper_albedo.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/pbr/trooper_ao.png b/ExampleApplication/Examples/resources/pbr/trooper_ao.png deleted file mode 100644 index 8567f7b..0000000 Binary files a/ExampleApplication/Examples/resources/pbr/trooper_ao.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/pbr/trooper_metalness.png b/ExampleApplication/Examples/resources/pbr/trooper_metalness.png deleted file mode 100644 index 6c212a0..0000000 Binary files a/ExampleApplication/Examples/resources/pbr/trooper_metalness.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/pbr/trooper_normals.png b/ExampleApplication/Examples/resources/pbr/trooper_normals.png deleted file mode 100644 index 59c7bdc..0000000 Binary files a/ExampleApplication/Examples/resources/pbr/trooper_normals.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/pbr/trooper_roughness.png b/ExampleApplication/Examples/resources/pbr/trooper_roughness.png deleted file mode 100644 index 53186d5..0000000 Binary files a/ExampleApplication/Examples/resources/pbr/trooper_roughness.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/pitch.png b/ExampleApplication/Examples/resources/pitch.png deleted file mode 100644 index 6d7a233..0000000 Binary files a/ExampleApplication/Examples/resources/pitch.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/pixantiqua.fnt b/ExampleApplication/Examples/resources/pixantiqua.fnt deleted file mode 100644 index 971b9b0..0000000 --- a/ExampleApplication/Examples/resources/pixantiqua.fnt +++ /dev/null @@ -1,188 +0,0 @@ -info face="PixAntiqua" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=2,2,2,2 spacing=2,2 outline=0 -common lineHeight=32 base=27 scaleW=512 scaleH=512 pages=1 packed=0 alphaChnl=0 redChnl=4 greenChnl=4 blueChnl=4 -page id=0 file="pixantiqua_0.png" -chars count=184 -char id=32 x=9 y=304 width=7 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=33 x=391 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=34 x=240 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=35 x=468 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=36 x=152 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=37 x=176 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=38 x=303 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=39 x=495 y=266 width=8 height=36 xoffset=-3 yoffset=-2 xadvance=5 page=0 chnl=15 -char id=40 x=256 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=199 x=432 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=200 x=126 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=201 x=147 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=202 x=288 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=203 x=189 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=204 x=468 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=205 x=486 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=206 x=0 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=207 x=72 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=208 x=329 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=209 x=277 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=210 x=182 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=211 x=26 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=41 x=272 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=42 x=288 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=43 x=414 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=44 x=378 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=45 x=414 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=46 x=443 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=47 x=392 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=48 x=485 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=49 x=450 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=50 x=21 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=51 x=42 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=59 x=456 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=60 x=168 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=61 x=309 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=62 x=336 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=63 x=315 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=64 x=364 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=65 x=390 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=66 x=120 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=67 x=144 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=68 x=168 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=69 x=294 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=52 x=488 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=53 x=63 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=54 x=24 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=55 x=48 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=56 x=72 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=57 x=96 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=58 x=404 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=70 x=252 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=71 x=192 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=72 x=78 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=78 x=78 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=79 x=355 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=80 x=264 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=81 x=381 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=82 x=288 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=83 x=312 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=91 x=144 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=92 x=108 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=93 x=304 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=94 x=34 y=0 width=32 height=36 xoffset=-3 yoffset=-2 xadvance=29 page=0 chnl=15 -char id=95 x=231 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=96 x=442 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=97 x=408 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=98 x=432 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=99 x=210 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=84 x=336 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=85 x=360 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=86 x=0 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=87 x=68 y=0 width=30 height=36 xoffset=-3 yoffset=-2 xadvance=27 page=0 chnl=15 -char id=88 x=26 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=89 x=384 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=90 x=84 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=100 x=456 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=101 x=480 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=102 x=54 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=103 x=0 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=104 x=24 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=105 x=469 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=106 x=18 y=266 width=16 height=36 xoffset=-8 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=107 x=48 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=108 x=417 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=109 x=161 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 -char id=110 x=72 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=111 x=96 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=117 x=192 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=118 x=216 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=119 x=248 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 -char id=120 x=240 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=121 x=264 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=122 x=288 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=123 x=432 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=124 x=365 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=125 x=378 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=126 x=393 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=127 x=132 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 -char id=160 x=0 y=304 width=7 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=161 x=352 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=162 x=351 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=163 x=336 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=165 x=360 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=167 x=384 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=169 x=433 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=170 x=224 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=171 x=105 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=172 x=0 y=0 width=32 height=36 xoffset=-3 yoffset=-2 xadvance=29 page=0 chnl=15 -char id=173 x=494 y=38 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=174 x=52 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=175 x=52 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=176 x=126 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=177 x=435 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=178 x=320 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=179 x=336 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=181 x=459 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=112 x=120 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=113 x=144 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=114 x=396 y=228 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=115 x=168 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=116 x=36 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=182 x=408 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=183 x=498 y=190 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=185 x=192 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=186 x=208 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=187 x=477 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=191 x=456 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=192 x=407 y=0 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=193 x=234 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=194 x=416 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=195 x=156 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=196 x=130 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=197 x=104 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=198 x=190 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 -char id=212 x=0 y=76 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=213 x=338 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=214 x=312 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=215 x=357 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=216 x=286 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=217 x=456 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=218 x=480 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=219 x=0 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=220 x=24 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=221 x=48 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=222 x=260 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=223 x=72 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=224 x=96 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=225 x=120 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=226 x=144 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=227 x=168 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=228 x=192 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=229 x=216 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=230 x=219 y=0 width=27 height=36 xoffset=-3 yoffset=-2 xadvance=24 page=0 chnl=15 -char id=231 x=372 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=73 x=90 y=266 width=16 height=36 xoffset=-3 yoffset=-2 xadvance=13 page=0 chnl=15 -char id=74 x=216 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=75 x=240 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=76 x=273 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=77 x=100 y=0 width=30 height=36 xoffset=-3 yoffset=-2 xadvance=27 page=0 chnl=15 -char id=232 x=312 y=152 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=233 x=240 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=234 x=264 y=190 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=235 x=104 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=236 x=430 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=237 x=482 y=266 width=11 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=238 x=160 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=11 page=0 chnl=15 -char id=239 x=176 y=266 width=14 height=36 xoffset=-3 yoffset=-2 xadvance=8 page=0 chnl=15 -char id=240 x=128 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=241 x=200 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=242 x=224 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=243 x=248 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=244 x=272 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=245 x=296 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=246 x=320 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=247 x=330 y=190 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=248 x=208 y=38 width=24 height=36 xoffset=-3 yoffset=-2 xadvance=21 page=0 chnl=15 -char id=249 x=344 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=250 x=368 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=251 x=416 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=252 x=440 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=253 x=464 y=76 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 -char id=254 x=0 y=228 width=19 height=36 xoffset=-3 yoffset=-2 xadvance=16 page=0 chnl=15 -char id=255 x=0 y=114 width=22 height=36 xoffset=-3 yoffset=-2 xadvance=19 page=0 chnl=15 diff --git a/ExampleApplication/Examples/resources/pixantiqua.ttf b/ExampleApplication/Examples/resources/pixantiqua.ttf deleted file mode 100644 index e012875..0000000 Binary files a/ExampleApplication/Examples/resources/pixantiqua.ttf and /dev/null differ diff --git a/ExampleApplication/Examples/resources/pixantiqua_0.png b/ExampleApplication/Examples/resources/pixantiqua_0.png deleted file mode 100644 index 2aa2870..0000000 Binary files a/ExampleApplication/Examples/resources/pixantiqua_0.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/plane.png b/ExampleApplication/Examples/resources/plane.png deleted file mode 100644 index 58951ea..0000000 Binary files a/ExampleApplication/Examples/resources/plane.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/plane_diffuse.png b/ExampleApplication/Examples/resources/plane_diffuse.png deleted file mode 100644 index fb16f24..0000000 Binary files a/ExampleApplication/Examples/resources/plane_diffuse.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/ps3.png b/ExampleApplication/Examples/resources/ps3.png deleted file mode 100644 index 98befac..0000000 Binary files a/ExampleApplication/Examples/resources/ps3.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/raylib_logo.png b/ExampleApplication/Examples/resources/raylib_logo.png deleted file mode 100644 index 6654562..0000000 Binary files a/ExampleApplication/Examples/resources/raylib_logo.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/scarfy.png b/ExampleApplication/Examples/resources/scarfy.png deleted file mode 100644 index beb5ffa..0000000 Binary files a/ExampleApplication/Examples/resources/scarfy.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/shaders/brdf.fs b/ExampleApplication/Examples/resources/shaders/brdf.fs deleted file mode 100644 index 59ae384..0000000 --- a/ExampleApplication/Examples/resources/shaders/brdf.fs +++ /dev/null @@ -1,140 +0,0 @@ -/******************************************************************************************* -* -* rPBR [shader] - Bidirectional reflectance distribution function fragment shader -* -* Copyright (c) 2017 Victor Fisac -* -**********************************************************************************************/ - -#version 330 -#define MAX_SAMPLES 1024u - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; - -// Constant values -const float PI = 3.14159265359; - -// Output fragment color -out vec4 finalColor; - -float DistributionGGX(vec3 N, vec3 H, float roughness); -float RadicalInverse_VdC(uint bits); -vec2 Hammersley(uint i, uint N); -vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness); -float GeometrySchlickGGX(float NdotV, float roughness); -float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness); -vec2 IntegrateBRDF(float NdotV, float roughness); - -float DistributionGGX(vec3 N, vec3 H, float roughness) -{ - float a = roughness*roughness; - float a2 = a*a; - float NdotH = max(dot(N, H), 0.0); - float NdotH2 = NdotH*NdotH; - - float nom = a2; - float denom = (NdotH2*(a2 - 1.0) + 1.0); - denom = PI*denom*denom; - - return nom/denom; -} - -float RadicalInverse_VdC(uint bits) -{ - bits = (bits << 16u) | (bits >> 16u); - bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); - bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); - bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); - bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); - return float(bits) * 2.3283064365386963e-10; // / 0x100000000 -} - -vec2 Hammersley(uint i, uint N) -{ - return vec2(float(i)/float(N), RadicalInverse_VdC(i)); -} - -vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness) -{ - float a = roughness*roughness; - float phi = 2.0 * PI * Xi.x; - float cosTheta = sqrt((1.0 - Xi.y)/(1.0 + (a*a - 1.0)*Xi.y)); - float sinTheta = sqrt(1.0 - cosTheta*cosTheta); - - // Transform from spherical coordinates to cartesian coordinates (halfway vector) - vec3 H = vec3(cos(phi)*sinTheta, sin(phi)*sinTheta, cosTheta); - - // Transform from tangent space H vector to world space sample vector - vec3 up = ((abs(N.z) < 0.999) ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0)); - vec3 tangent = normalize(cross(up, N)); - vec3 bitangent = cross(N, tangent); - vec3 sampleVec = tangent*H.x + bitangent*H.y + N*H.z; - - return normalize(sampleVec); -} - -float GeometrySchlickGGX(float NdotV, float roughness) -{ - // For IBL k is calculated different - float k = (roughness*roughness)/2.0; - - float nom = NdotV; - float denom = NdotV*(1.0 - k) + k; - - return nom/denom; -} - -float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness) -{ - float NdotV = max(dot(N, V), 0.0); - float NdotL = max(dot(N, L), 0.0); - float ggx2 = GeometrySchlickGGX(NdotV, roughness); - float ggx1 = GeometrySchlickGGX(NdotL, roughness); - - return ggx1*ggx2; -} - -vec2 IntegrateBRDF(float NdotV, float roughness) -{ - vec3 V = vec3(sqrt(1.0 - NdotV*NdotV), 0.0, NdotV); - float A = 0.0; - float B = 0.0; - vec3 N = vec3(0.0, 0.0, 1.0); - - for(uint i = 0u; i < MAX_SAMPLES; i++) - { - // Generate a sample vector that's biased towards the preferred alignment direction (importance sampling) - vec2 Xi = Hammersley(i, MAX_SAMPLES); - vec3 H = ImportanceSampleGGX(Xi, N, roughness); - vec3 L = normalize(2.0*dot(V, H)*H - V); - float NdotL = max(L.z, 0.0); - float NdotH = max(H.z, 0.0); - float VdotH = max(dot(V, H), 0.0); - - if (NdotL > 0.0) - { - float G = GeometrySmith(N, V, L, roughness); - float G_Vis = (G*VdotH)/(NdotH*NdotV); - float Fc = pow(1.0 - VdotH, 5.0); - - A += (1.0 - Fc)*G_Vis; - B += Fc*G_Vis; - } - } - - // Calculate brdf average sample - A /= float(MAX_SAMPLES); - B /= float(MAX_SAMPLES); - - return vec2(A, B); -} - -void main() -{ - // Calculate brdf based on texture coordinates - vec2 brdf = IntegrateBRDF(fragTexCoord.x, fragTexCoord.y); - - // Calculate final fragment color - finalColor = vec4(brdf.r, brdf.g, 0.0, 1.0); -} diff --git a/ExampleApplication/Examples/resources/shaders/brdf.vs b/ExampleApplication/Examples/resources/shaders/brdf.vs deleted file mode 100644 index 0638467..0000000 --- a/ExampleApplication/Examples/resources/shaders/brdf.vs +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************************* -* -* rPBR [shader] - Bidirectional reflectance distribution function vertex shader -* -* Copyright (c) 2017 Victor Fisac -* -**********************************************************************************************/ - -#version 330 - -// Input vertex attributes -in vec3 vertexPosition; -in vec2 vertexTexCoord; - -// Output vertex attributes (to fragment shader) -out vec2 fragTexCoord; - -void main() -{ - // Calculate fragment position based on model transformations - fragTexCoord = vertexTexCoord; - - // Calculate final vertex position - gl_Position = vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/cubemap.fs b/ExampleApplication/Examples/resources/shaders/cubemap.fs deleted file mode 100644 index 09ae62f..0000000 --- a/ExampleApplication/Examples/resources/shaders/cubemap.fs +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************************* -* -* rPBR [shader] - Equirectangular to cubemap fragment shader -* -* Copyright (c) 2017 Victor Fisac -* -**********************************************************************************************/ - -#version 330 - -// Input vertex attributes (from vertex shader) -in vec3 fragPos; - -// Input uniform values -uniform sampler2D equirectangularMap; - -// Output fragment color -out vec4 finalColor; - -vec2 SampleSphericalMap(vec3 v) -{ - vec2 uv = vec2(atan(v.z, v.x), asin(v.y)); - uv *= vec2(0.1591, 0.3183); - uv += 0.5; - return uv; -} - -void main() -{ - // Normalize local position - vec2 uv = SampleSphericalMap(normalize(fragPos)); - - // Fetch color from texture map - vec3 color = texture(equirectangularMap, uv).rgb; - - // Calculate final fragment color - finalColor = vec4(color, 1.0); -} diff --git a/ExampleApplication/Examples/resources/shaders/cubemap.vs b/ExampleApplication/Examples/resources/shaders/cubemap.vs deleted file mode 100644 index 6e0bf4e..0000000 --- a/ExampleApplication/Examples/resources/shaders/cubemap.vs +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************************* -* -* rPBR [shader] - Equirectangular to cubemap vertex shader -* -* Copyright (c) 2017 Victor Fisac -* -**********************************************************************************************/ - -#version 330 - -// Input vertex attributes -in vec3 vertexPosition; - -// Input uniform values -uniform mat4 projection; -uniform mat4 view; - -// Output vertex attributes (to fragment shader) -out vec3 fragPos; - -void main() -{ - // Calculate fragment position based on model transformations - fragPos = vertexPosition; - - // Calculate final vertex position - gl_Position = projection*view*vec4(vertexPosition, 1.0); -} diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/base.fs b/ExampleApplication/Examples/resources/shaders/glsl100/base.fs deleted file mode 100644 index b004ba0..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/base.fs +++ /dev/null @@ -1,24 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables -uniform vec2 resolution = vec2(800, 450); - -void main() -{ - // Texel color fetching from texture sampler - vec4 texelColor = texture2D(texture0, fragTexCoord); - - // NOTE: Implement here your fragment shader code - - gl_FragColor = texelColor*colDiffuse; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/base.vs b/ExampleApplication/Examples/resources/shaders/glsl100/base.vs deleted file mode 100644 index 4be76b9..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/base.vs +++ /dev/null @@ -1,26 +0,0 @@ -#version 100 - -// Input vertex attributes -attribute vec3 vertexPosition; -attribute vec2 vertexTexCoord; -attribute vec3 vertexNormal; -attribute vec4 vertexColor; - -// Input uniform values -uniform mat4 mvp; - -// Output vertex attributes (to fragment shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Send vertex attributes to fragment shader - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - - // Calculate final vertex position - gl_Position = mvp*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/bloom.fs b/ExampleApplication/Examples/resources/shaders/glsl100/bloom.fs deleted file mode 100644 index a8e1d20..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/bloom.fs +++ /dev/null @@ -1,39 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -const vec2 size = vec2(800, 450); // render size -const float samples = 5.0; // pixels per axis; higher = bigger glow, worse performance -const float quality = 2.5; // lower = smaller glow, better quality - -void main() -{ - vec4 sum = vec4(0); - vec2 sizeFactor = vec2(1)/size*quality; - - // Texel color fetching from texture sampler - vec4 source = texture2D(texture0, fragTexCoord); - - const int range = 2; // should be = (samples - 1)/2; - - for (int x = -range; x <= range; x++) - { - for (int y = -range; y <= range; y++) - { - sum += texture2D(texture0, fragTexCoord + vec2(x, y)*sizeFactor); - } - } - - // Calculate final fragment color - gl_FragColor = ((sum/(samples*samples)) + source)*colDiffuse; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/blur.fs b/ExampleApplication/Examples/resources/shaders/glsl100/blur.fs deleted file mode 100644 index 96f780e..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/blur.fs +++ /dev/null @@ -1,34 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800.0; -const float renderHeight = 450.0; - -vec3 offset = vec3(0.0, 1.3846153846, 3.2307692308); -vec3 weight = vec3(0.2270270270, 0.3162162162, 0.0702702703); - -void main() -{ - // Texel color fetching from texture sampler - vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight.x; - - tc += texture2D(texture0, fragTexCoord + vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; - tc += texture2D(texture0, fragTexCoord - vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; - - tc += texture2D(texture0, fragTexCoord + vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; - tc += texture2D(texture0, fragTexCoord - vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/cross_hatching.fs b/ExampleApplication/Examples/resources/shaders/glsl100/cross_hatching.fs deleted file mode 100644 index 7d63b0a..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/cross_hatching.fs +++ /dev/null @@ -1,47 +0,0 @@ -# version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -float hatchOffsetY = 5.0; -float lumThreshold01 = 0.9; -float lumThreshold02 = 0.7; -float lumThreshold03 = 0.5; -float lumThreshold04 = 0.3; - -void main() -{ - vec3 tc = vec3(1.0, 1.0, 1.0); - float lum = length(texture2D(texture0, fragTexCoord).rgb); - - if (lum < lumThreshold01) - { - if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - if (lum < lumThreshold02) - { - if (mod(gl_FragCoord .x - gl_FragCoord .y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - if (lum < lumThreshold03) - { - if (mod(gl_FragCoord .x + gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - if (lum < lumThreshold04) - { - if (mod(gl_FragCoord .x - gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/cross_stitching.fs b/ExampleApplication/Examples/resources/shaders/glsl100/cross_stitching.fs deleted file mode 100644 index de6d4f4..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/cross_stitching.fs +++ /dev/null @@ -1,57 +0,0 @@ -# version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800.0; -const float renderHeight = 450.0; - -float stitchingSize = 6.0; -int invert = 0; - -vec4 PostFX(sampler2D tex, vec2 uv) -{ - vec4 c = vec4(0.0); - float size = stitchingSize; - vec2 cPos = uv * vec2(renderWidth, renderHeight); - vec2 tlPos = floor(cPos / vec2(size, size)); - tlPos *= size; - - int remX = int(mod(cPos.x, size)); - int remY = int(mod(cPos.y, size)); - - if (remX == 0 && remY == 0) tlPos = cPos; - - vec2 blPos = tlPos; - blPos.y += (size - 1.0); - - if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y))))) - { - if (invert == 1) c = vec4(0.2, 0.15, 0.05, 1.0); - else c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; - } - else - { - if (invert == 1) c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; - else c = vec4(0.0, 0.0, 0.0, 1.0); - } - - return c; -} - -void main() -{ - vec3 tc = PostFX(texture0, fragTexCoord).rgb; - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/distortion.fs b/ExampleApplication/Examples/resources/shaders/glsl100/distortion.fs deleted file mode 100644 index 50116ce..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/distortion.fs +++ /dev/null @@ -1,54 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; - -// Input uniform values -uniform sampler2D texture0; - -// NOTE: Default parameters for Oculus Rift DK2 device -const vec2 LeftLensCenter = vec2(0.2863248, 0.5); -const vec2 RightLensCenter = vec2(0.7136753, 0.5); -const vec2 LeftScreenCenter = vec2(0.25, 0.5); -const vec2 RightScreenCenter = vec2(0.75, 0.5); -const vec2 Scale = vec2(0.25, 0.45); -const vec2 ScaleIn = vec2(4.0, 2.5); -const vec4 HmdWarpParam = vec4(1.0, 0.22, 0.24, 0.0); -const vec4 ChromaAbParam = vec4(0.996, -0.004, 1.014, 0.0); - -void main() -{ - // The following two variables need to be set per eye - vec2 LensCenter = fragTexCoord.x < 0.5 ? LeftLensCenter : RightLensCenter; - vec2 ScreenCenter = fragTexCoord.x < 0.5 ? LeftScreenCenter : RightScreenCenter; - - // Scales input texture coordinates for distortion: vec2 HmdWarp(vec2 fragTexCoord, vec2 LensCenter) - vec2 theta = (fragTexCoord - LensCenter)*ScaleIn; // Scales to [-1, 1] - float rSq = theta.x*theta.x + theta.y*theta.y; - vec2 theta1 = theta*(HmdWarpParam.x + HmdWarpParam.y*rSq + HmdWarpParam.z*rSq*rSq + HmdWarpParam.w*rSq*rSq*rSq); - //vec2 tc = LensCenter + Scale*theta1; - - // Detect whether blue texture coordinates are out of range since these will scaled out the furthest - vec2 thetaBlue = theta1*(ChromaAbParam.z + ChromaAbParam.w*rSq); - vec2 tcBlue = LensCenter + Scale*thetaBlue; - - if (any(bvec2(clamp(tcBlue, ScreenCenter - vec2(0.25, 0.5), ScreenCenter + vec2(0.25, 0.5)) - tcBlue))) gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - else - { - // Do blue texture lookup - float blue = texture2D(texture0, tcBlue).b; - - // Do green lookup (no scaling) - vec2 tcGreen = LensCenter + Scale*theta1; - float green = texture2D(texture0, tcGreen).g; - - // Do red scale and lookup - vec2 thetaRed = theta1*(ChromaAbParam.x + ChromaAbParam.y*rSq); - vec2 tcRed = LensCenter + Scale*thetaRed; - float red = texture2D(texture0, tcRed).r; - - gl_FragColor = vec4(red, green, blue, 1.0); - } -} diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/dream_vision.fs b/ExampleApplication/Examples/resources/shaders/glsl100/dream_vision.fs deleted file mode 100644 index fa9c5b7..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/dream_vision.fs +++ /dev/null @@ -1,37 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -void main() -{ - vec4 color = texture2D(texture0, fragTexCoord); - - color += texture2D(texture0, fragTexCoord + 0.001); - color += texture2D(texture0, fragTexCoord + 0.003); - color += texture2D(texture0, fragTexCoord + 0.005); - color += texture2D(texture0, fragTexCoord + 0.007); - color += texture2D(texture0, fragTexCoord + 0.009); - color += texture2D(texture0, fragTexCoord + 0.011); - - color += texture2D(texture0, fragTexCoord - 0.001); - color += texture2D(texture0, fragTexCoord - 0.003); - color += texture2D(texture0, fragTexCoord - 0.005); - color += texture2D(texture0, fragTexCoord - 0.007); - color += texture2D(texture0, fragTexCoord - 0.009); - color += texture2D(texture0, fragTexCoord - 0.011); - - color.rgb = vec3((color.r + color.g + color.b)/3.0); - color = color/9.5; - - gl_FragColor = color; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/fisheye.fs b/ExampleApplication/Examples/resources/shaders/glsl100/fisheye.fs deleted file mode 100644 index 8beb3d4..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/fisheye.fs +++ /dev/null @@ -1,43 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -const float PI = 3.1415926535; - -void main() -{ - float aperture = 178.0; - float apertureHalf = 0.5 * aperture * (PI / 180.0); - float maxFactor = sin(apertureHalf); - - vec2 uv = vec2(0.0); - vec2 xy = 2.0 * fragTexCoord.xy - 1.0; - float d = length(xy); - - if (d < (2.0 - maxFactor)) - { - d = length(xy * maxFactor); - float z = sqrt(1.0 - d * d); - float r = atan(d, z) / PI; - float phi = atan(xy.y, xy.x); - - uv.x = r * cos(phi) + 0.5; - uv.y = r * sin(phi) + 0.5; - } - else - { - uv = fragTexCoord.xy; - } - - gl_FragColor = texture2D(texture0, uv); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/grayscale.fs b/ExampleApplication/Examples/resources/shaders/glsl100/grayscale.fs deleted file mode 100644 index 15174ea..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/grayscale.fs +++ /dev/null @@ -1,25 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -void main() -{ - // Texel color fetching from texture sampler - vec4 texelColor = texture2D(texture0, fragTexCoord)*colDiffuse*fragColor; - - // Convert texel color to grayscale using NTSC conversion weights - float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114)); - - // Calculate final fragment color - gl_FragColor = vec4(gray, gray, gray, texelColor.a); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/pixelizer.fs b/ExampleApplication/Examples/resources/shaders/glsl100/pixelizer.fs deleted file mode 100644 index 44fb0ca..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/pixelizer.fs +++ /dev/null @@ -1,32 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800.0; -const float renderHeight = 450.0; - -float pixelWidth = 5.0; -float pixelHeight = 5.0; - -void main() -{ - float dx = pixelWidth*(1.0/renderWidth); - float dy = pixelHeight*(1.0/renderHeight); - - vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy)); - - vec3 tc = texture2D(texture0, coord).rgb; - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/posterization.fs b/ExampleApplication/Examples/resources/shaders/glsl100/posterization.fs deleted file mode 100644 index a7942c8..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/posterization.fs +++ /dev/null @@ -1,29 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -float gamma = 0.6; -float numColors = 8.0; - -void main() -{ - vec3 color = texture2D(texture0, fragTexCoord.xy).rgb; - - color = pow(color, vec3(gamma, gamma, gamma)); - color = color*numColors; - color = floor(color); - color = color/numColors; - color = pow(color, vec3(1.0/gamma)); - - gl_FragColor = vec4(color, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/predator.fs b/ExampleApplication/Examples/resources/shaders/glsl100/predator.fs deleted file mode 100644 index 37dc0bd..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/predator.fs +++ /dev/null @@ -1,31 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -void main() -{ - vec3 color = texture2D(texture0, fragTexCoord).rgb; - vec3 colors[3]; - colors[0] = vec3(0.0, 0.0, 1.0); - colors[1] = vec3(1.0, 1.0, 0.0); - colors[2] = vec3(1.0, 0.0, 0.0); - - float lum = (color.r + color.g + color.b)/3.0; - - vec3 tc = vec3(0.0, 0.0, 0.0); - - if (lum < 0.5) tc = mix(colors[0], colors[1], lum/0.5); - else tc = mix(colors[1], colors[2], (lum - 0.5)/0.5); - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/scanlines.fs b/ExampleApplication/Examples/resources/shaders/glsl100/scanlines.fs deleted file mode 100644 index ce649e1..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/scanlines.fs +++ /dev/null @@ -1,44 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -float offset = 0.0; -float frequency = 450.0/3.0; - -uniform float time; - -void main() -{ -/* - // Scanlines method 1 - float tval = 0; //time - vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval)); - - vec4 color = texture2D(texture0, fragTexCoord); - - color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0); - color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y); - color *= vec4(0.8, 1.0, 0.7, 1); - color *= 0.9 + 0.1*sin(10.0*tval + uv.y*1000.0); - color *= 0.97 + 0.03*sin(110.0*tval); - - fragColor = color; -*/ - // Scanlines method 2 - float globalPos = (fragTexCoord.y + offset) * frequency; - float wavePos = cos((fract(globalPos) - 0.5)*3.14); - - vec4 color = texture2D(texture0, fragTexCoord); - - gl_FragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/sobel.fs b/ExampleApplication/Examples/resources/shaders/glsl100/sobel.fs deleted file mode 100644 index 745562a..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/sobel.fs +++ /dev/null @@ -1,40 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables -vec2 resolution = vec2(800.0, 450.0); - -void main() -{ - float x = 1.0/resolution.x; - float y = 1.0/resolution.y; - - vec4 horizEdge = vec4(0.0); - horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; - horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0; - horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; - horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; - horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0; - horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; - - vec4 vertEdge = vec4(0.0); - vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; - vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0; - vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; - vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; - vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0; - vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; - - vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb)); - - gl_FragColor = vec4(edge, texture2D(texture0, fragTexCoord).a); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl100/swirl.fs b/ExampleApplication/Examples/resources/shaders/glsl100/swirl.fs deleted file mode 100644 index b969aab..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl100/swirl.fs +++ /dev/null @@ -1,46 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -// NOTE: Render size values should be passed from code -const float renderWidth = 800; -const float renderHeight = 450; - -float radius = 250.0; -float angle = 0.8; - -uniform vec2 center; - -void main() -{ - vec2 texSize = vec2(renderWidth, renderHeight); - vec2 tc = fragTexCoord*texSize; - tc -= center; - - float dist = length(tc); - - if (dist < radius) - { - float percent = (radius - dist)/radius; - float theta = percent*percent*angle*8.0; - float s = sin(theta); - float c = cos(theta); - - tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c))); - } - - tc += center; - vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;; - - gl_FragColor = vec4(color.rgb, 1.0);; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/base.fs b/ExampleApplication/Examples/resources/shaders/glsl120/base.fs deleted file mode 100644 index 18799f9..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/base.fs +++ /dev/null @@ -1,22 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables -uniform vec2 resolution = vec2(800, 450); - -void main() -{ - // Texel color fetching from texture sampler - vec4 texelColor = texture2D(texture0, fragTexCoord); - - // NOTE: Implement here your fragment shader code - - gl_FragColor = texelColor*colDiffuse; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/base.vs b/ExampleApplication/Examples/resources/shaders/glsl120/base.vs deleted file mode 100644 index 674153d..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/base.vs +++ /dev/null @@ -1,26 +0,0 @@ -#version 120 - -// Input vertex attributes -attribute vec3 vertexPosition; -attribute vec2 vertexTexCoord; -attribute vec3 vertexNormal; -attribute vec4 vertexColor; - -// Input uniform values -uniform mat4 mvp; - -// Output vertex attributes (to fragment shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Send vertex attributes to fragment shader - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - - // Calculate final vertex position - gl_Position = mvp*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/bloom.fs b/ExampleApplication/Examples/resources/shaders/glsl120/bloom.fs deleted file mode 100644 index c28836b..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/bloom.fs +++ /dev/null @@ -1,37 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -const vec2 size = vec2(800, 450); // render size -const float samples = 5.0; // pixels per axis; higher = bigger glow, worse performance -const float quality = 2.5; // lower = smaller glow, better quality - -void main() -{ - vec4 sum = vec4(0); - vec2 sizeFactor = vec2(1)/size*quality; - - // Texel color fetching from texture sampler - vec4 source = texture2D(texture0, fragTexCoord); - - const int range = 2; // should be = (samples - 1)/2; - - for (int x = -range; x <= range; x++) - { - for (int y = -range; y <= range; y++) - { - sum += texture2D(texture0, fragTexCoord + vec2(x, y)*sizeFactor); - } - } - - // Calculate final fragment color - gl_FragColor = ((sum/(samples*samples)) + source)*colDiffuse; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/blur.fs b/ExampleApplication/Examples/resources/shaders/glsl120/blur.fs deleted file mode 100644 index 99cddfc..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/blur.fs +++ /dev/null @@ -1,32 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800.0; -const float renderHeight = 450.0; - -vec3 offset = vec3(0.0, 1.3846153846, 3.2307692308); -vec3 weight = vec3(0.2270270270, 0.3162162162, 0.0702702703); - -void main() -{ - // Texel color fetching from texture sampler - vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight.x; - - tc += texture2D(texture0, fragTexCoord + vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; - tc += texture2D(texture0, fragTexCoord - vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; - - tc += texture2D(texture0, fragTexCoord + vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; - tc += texture2D(texture0, fragTexCoord - vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/cross_hatching.fs b/ExampleApplication/Examples/resources/shaders/glsl120/cross_hatching.fs deleted file mode 100644 index 4651412..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/cross_hatching.fs +++ /dev/null @@ -1,45 +0,0 @@ -# version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -float hatchOffsetY = 5.0; -float lumThreshold01 = 0.9; -float lumThreshold02 = 0.7; -float lumThreshold03 = 0.5; -float lumThreshold04 = 0.3; - -void main() -{ - vec3 tc = vec3(1.0, 1.0, 1.0); - float lum = length(texture2D(texture0, fragTexCoord).rgb); - - if (lum < lumThreshold01) - { - if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - if (lum < lumThreshold02) - { - if (mod(gl_FragCoord .x - gl_FragCoord .y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - if (lum < lumThreshold03) - { - if (mod(gl_FragCoord .x + gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - if (lum < lumThreshold04) - { - if (mod(gl_FragCoord .x - gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/cross_stitching.fs b/ExampleApplication/Examples/resources/shaders/glsl120/cross_stitching.fs deleted file mode 100644 index dee4617..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/cross_stitching.fs +++ /dev/null @@ -1,55 +0,0 @@ -# version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800.0; -const float renderHeight = 450.0; - -float stitchingSize = 6.0; -int invert = 0; - -vec4 PostFX(sampler2D tex, vec2 uv) -{ - vec4 c = vec4(0.0); - float size = stitchingSize; - vec2 cPos = uv * vec2(renderWidth, renderHeight); - vec2 tlPos = floor(cPos / vec2(size, size)); - tlPos *= size; - - int remX = int(mod(cPos.x, size)); - int remY = int(mod(cPos.y, size)); - - if (remX == 0 && remY == 0) tlPos = cPos; - - vec2 blPos = tlPos; - blPos.y += (size - 1.0); - - if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y))))) - { - if (invert == 1) c = vec4(0.2, 0.15, 0.05, 1.0); - else c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; - } - else - { - if (invert == 1) c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; - else c = vec4(0.0, 0.0, 0.0, 1.0); - } - - return c; -} - -void main() -{ - vec3 tc = PostFX(texture0, fragTexCoord).rgb; - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/distortion.fs b/ExampleApplication/Examples/resources/shaders/glsl120/distortion.fs deleted file mode 100644 index f9d7f1e..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/distortion.fs +++ /dev/null @@ -1,52 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; - -// Input uniform values -uniform sampler2D texture0; - -// NOTE: Default parameters for Oculus Rift DK2 device -const vec2 LeftLensCenter = vec2(0.2863248, 0.5); -const vec2 RightLensCenter = vec2(0.7136753, 0.5); -const vec2 LeftScreenCenter = vec2(0.25, 0.5); -const vec2 RightScreenCenter = vec2(0.75, 0.5); -const vec2 Scale = vec2(0.25, 0.45); -const vec2 ScaleIn = vec2(4.0, 2.5); -const vec4 HmdWarpParam = vec4(1.0, 0.22, 0.24, 0.0); -const vec4 ChromaAbParam = vec4(0.996, -0.004, 1.014, 0.0); - -void main() -{ - // The following two variables need to be set per eye - vec2 LensCenter = fragTexCoord.x < 0.5 ? LeftLensCenter : RightLensCenter; - vec2 ScreenCenter = fragTexCoord.x < 0.5 ? LeftScreenCenter : RightScreenCenter; - - // Scales input texture coordinates for distortion: vec2 HmdWarp(vec2 fragTexCoord, vec2 LensCenter) - vec2 theta = (fragTexCoord - LensCenter)*ScaleIn; // Scales to [-1, 1] - float rSq = theta.x*theta.x + theta.y*theta.y; - vec2 theta1 = theta*(HmdWarpParam.x + HmdWarpParam.y*rSq + HmdWarpParam.z*rSq*rSq + HmdWarpParam.w*rSq*rSq*rSq); - //vec2 tc = LensCenter + Scale*theta1; - - // Detect whether blue texture coordinates are out of range since these will scaled out the furthest - vec2 thetaBlue = theta1*(ChromaAbParam.z + ChromaAbParam.w*rSq); - vec2 tcBlue = LensCenter + Scale*thetaBlue; - - if (any(bvec2(clamp(tcBlue, ScreenCenter - vec2(0.25, 0.5), ScreenCenter + vec2(0.25, 0.5)) - tcBlue))) gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); - else - { - // Do blue texture lookup - float blue = texture2D(texture0, tcBlue).b; - - // Do green lookup (no scaling) - vec2 tcGreen = LensCenter + Scale*theta1; - float green = texture2D(texture0, tcGreen).g; - - // Do red scale and lookup - vec2 thetaRed = theta1*(ChromaAbParam.x + ChromaAbParam.y*rSq); - vec2 tcRed = LensCenter + Scale*thetaRed; - float red = texture2D(texture0, tcRed).r; - - gl_FragColor = vec4(red, green, blue, 1.0); - } -} diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/dream_vision.fs b/ExampleApplication/Examples/resources/shaders/glsl120/dream_vision.fs deleted file mode 100644 index 4ca2a86..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/dream_vision.fs +++ /dev/null @@ -1,35 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -void main() -{ - vec4 color = texture2D(texture0, fragTexCoord); - - color += texture2D(texture0, fragTexCoord + 0.001); - color += texture2D(texture0, fragTexCoord + 0.003); - color += texture2D(texture0, fragTexCoord + 0.005); - color += texture2D(texture0, fragTexCoord + 0.007); - color += texture2D(texture0, fragTexCoord + 0.009); - color += texture2D(texture0, fragTexCoord + 0.011); - - color += texture2D(texture0, fragTexCoord - 0.001); - color += texture2D(texture0, fragTexCoord - 0.003); - color += texture2D(texture0, fragTexCoord - 0.005); - color += texture2D(texture0, fragTexCoord - 0.007); - color += texture2D(texture0, fragTexCoord - 0.009); - color += texture2D(texture0, fragTexCoord - 0.011); - - color.rgb = vec3((color.r + color.g + color.b)/3.0); - color = color/9.5; - - gl_FragColor = color; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/fisheye.fs b/ExampleApplication/Examples/resources/shaders/glsl120/fisheye.fs deleted file mode 100644 index 6f376ba..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/fisheye.fs +++ /dev/null @@ -1,41 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -const float PI = 3.1415926535; - -void main() -{ - float aperture = 178.0; - float apertureHalf = 0.5 * aperture * (PI / 180.0); - float maxFactor = sin(apertureHalf); - - vec2 uv = vec2(0.0); - vec2 xy = 2.0 * fragTexCoord.xy - 1.0; - float d = length(xy); - - if (d < (2.0 - maxFactor)) - { - d = length(xy * maxFactor); - float z = sqrt(1.0 - d * d); - float r = atan(d, z) / PI; - float phi = atan(xy.y, xy.x); - - uv.x = r * cos(phi) + 0.5; - uv.y = r * sin(phi) + 0.5; - } - else - { - uv = fragTexCoord.xy; - } - - gl_FragColor = texture2D(texture0, uv); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/grayscale.fs b/ExampleApplication/Examples/resources/shaders/glsl120/grayscale.fs deleted file mode 100644 index 4de60d2..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/grayscale.fs +++ /dev/null @@ -1,23 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -void main() -{ - // Texel color fetching from texture sampler - vec4 texelColor = texture2D(texture0, fragTexCoord)*colDiffuse*fragColor; - - // Convert texel color to grayscale using NTSC conversion weights - float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114)); - - // Calculate final fragment color - gl_FragColor = vec4(gray, gray, gray, texelColor.a); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/pixelizer.fs b/ExampleApplication/Examples/resources/shaders/glsl120/pixelizer.fs deleted file mode 100644 index 6f741fa..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/pixelizer.fs +++ /dev/null @@ -1,30 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800.0; -const float renderHeight = 450.0; - -float pixelWidth = 5.0; -float pixelHeight = 5.0; - -void main() -{ - float dx = pixelWidth*(1.0/renderWidth); - float dy = pixelHeight*(1.0/renderHeight); - - vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy)); - - vec3 tc = texture2D(texture0, coord).rgb; - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/posterization.fs b/ExampleApplication/Examples/resources/shaders/glsl120/posterization.fs deleted file mode 100644 index 475b93a..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/posterization.fs +++ /dev/null @@ -1,27 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -float gamma = 0.6; -float numColors = 8.0; - -void main() -{ - vec3 color = texture2D(texture0, fragTexCoord.xy).rgb; - - color = pow(color, vec3(gamma, gamma, gamma)); - color = color*numColors; - color = floor(color); - color = color/numColors; - color = pow(color, vec3(1.0/gamma)); - - gl_FragColor = vec4(color, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/predator.fs b/ExampleApplication/Examples/resources/shaders/glsl120/predator.fs deleted file mode 100644 index 2999cc8..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/predator.fs +++ /dev/null @@ -1,29 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -void main() -{ - vec3 color = texture2D(texture0, fragTexCoord).rgb; - vec3 colors[3]; - colors[0] = vec3(0.0, 0.0, 1.0); - colors[1] = vec3(1.0, 1.0, 0.0); - colors[2] = vec3(1.0, 0.0, 0.0); - - float lum = (color.r + color.g + color.b)/3.0; - - vec3 tc = vec3(0.0, 0.0, 0.0); - - if (lum < 0.5) tc = mix(colors[0], colors[1], lum/0.5); - else tc = mix(colors[1], colors[2], (lum - 0.5)/0.5); - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/scanlines.fs b/ExampleApplication/Examples/resources/shaders/glsl120/scanlines.fs deleted file mode 100644 index 929c79e..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/scanlines.fs +++ /dev/null @@ -1,42 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -float offset = 0.0; -float frequency = 450.0/3.0; - -uniform float time; - -void main() -{ -/* - // Scanlines method 1 - float tval = 0; //time - vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval)); - - vec4 color = texture2D(texture0, fragTexCoord); - - color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0); - color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y); - color *= vec4(0.8, 1.0, 0.7, 1); - color *= 0.9 + 0.1*sin(10.0*tval + uv.y*1000.0); - color *= 0.97 + 0.03*sin(110.0*tval); - - fragColor = color; -*/ - // Scanlines method 2 - float globalPos = (fragTexCoord.y + offset) * frequency; - float wavePos = cos((fract(globalPos) - 0.5)*3.14); - - vec4 color = texture2D(texture0, fragTexCoord); - - gl_FragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/sobel.fs b/ExampleApplication/Examples/resources/shaders/glsl120/sobel.fs deleted file mode 100644 index a3f3f2b..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/sobel.fs +++ /dev/null @@ -1,38 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables -vec2 resolution = vec2(800.0, 450.0); - -void main() -{ - float x = 1.0/resolution.x; - float y = 1.0/resolution.y; - - vec4 horizEdge = vec4(0.0); - horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; - horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0; - horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; - horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; - horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0; - horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; - - vec4 vertEdge = vec4(0.0); - vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; - vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0; - vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; - vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; - vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0; - vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; - - vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb)); - - gl_FragColor = vec4(edge, texture2D(texture0, fragTexCoord).a); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl120/swirl.fs b/ExampleApplication/Examples/resources/shaders/glsl120/swirl.fs deleted file mode 100644 index 0618e01..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl120/swirl.fs +++ /dev/null @@ -1,44 +0,0 @@ -#version 120 - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -// NOTE: Render size values should be passed from code -const float renderWidth = 800; -const float renderHeight = 450; - -float radius = 250.0; -float angle = 0.8; - -uniform vec2 center; - -void main() -{ - vec2 texSize = vec2(renderWidth, renderHeight); - vec2 tc = fragTexCoord*texSize; - tc -= center; - - float dist = length(tc); - - if (dist < radius) - { - float percent = (radius - dist)/radius; - float theta = percent*percent*angle*8.0; - float s = sin(theta); - float c = cos(theta); - - tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c))); - } - - tc += center; - vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;; - - gl_FragColor = vec4(color.rgb, 1.0);; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/base.fs b/ExampleApplication/Examples/resources/shaders/glsl330/base.fs deleted file mode 100644 index f1418df..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/base.fs +++ /dev/null @@ -1,25 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Texel color fetching from texture sampler - vec4 texelColor = texture(texture0, fragTexCoord); - - // NOTE: Implement here your fragment shader code - - finalColor = texelColor*colDiffuse; -} - diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/base.vs b/ExampleApplication/Examples/resources/shaders/glsl330/base.vs deleted file mode 100644 index f3099e8..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/base.vs +++ /dev/null @@ -1,26 +0,0 @@ -#version 330 - -// Input vertex attributes -in vec3 vertexPosition; -in vec2 vertexTexCoord; -in vec3 vertexNormal; -in vec4 vertexColor; - -// Input uniform values -uniform mat4 mvp; - -// Output vertex attributes (to fragment shader) -out vec2 fragTexCoord; -out vec4 fragColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Send vertex attributes to fragment shader - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - - // Calculate final vertex position - gl_Position = mvp*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/bloom.fs b/ExampleApplication/Examples/resources/shaders/glsl330/bloom.fs deleted file mode 100644 index 333d5b0..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/bloom.fs +++ /dev/null @@ -1,40 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -const vec2 size = vec2(800, 450); // render size -const float samples = 5.0; // pixels per axis; higher = bigger glow, worse performance -const float quality = 2.5; // lower = smaller glow, better quality - -void main() -{ - vec4 sum = vec4(0); - vec2 sizeFactor = vec2(1)/size*quality; - - // Texel color fetching from texture sampler - vec4 source = texture(texture0, fragTexCoord); - - const int range = 2; // should be = (samples - 1)/2; - - for (int x = -range; x <= range; x++) - { - for (int y = -range; y <= range; y++) - { - sum += texture(texture0, fragTexCoord + vec2(x, y)*sizeFactor); - } - } - - // Calculate final fragment color - finalColor = ((sum/(samples*samples)) + source)*colDiffuse; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/blur.fs b/ExampleApplication/Examples/resources/shaders/glsl330/blur.fs deleted file mode 100644 index e4df406..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/blur.fs +++ /dev/null @@ -1,35 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800; -const float renderHeight = 450; - -float offset[3] = float[](0.0, 1.3846153846, 3.2307692308); -float weight[3] = float[](0.2270270270, 0.3162162162, 0.0702702703); - -void main() -{ - // Texel color fetching from texture sampler - vec3 texelColor = texture(texture0, fragTexCoord).rgb*weight[0]; - - for (int i = 1; i < 3; i++) - { - texelColor += texture(texture0, fragTexCoord + vec2(offset[i])/renderWidth, 0.0).rgb*weight[i]; - texelColor += texture(texture0, fragTexCoord - vec2(offset[i])/renderWidth, 0.0).rgb*weight[i]; - } - - finalColor = vec4(texelColor, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/cross_hatching.fs b/ExampleApplication/Examples/resources/shaders/glsl330/cross_hatching.fs deleted file mode 100644 index f95ad07..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/cross_hatching.fs +++ /dev/null @@ -1,48 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -float hatchOffsetY = 5.0; -float lumThreshold01 = 0.9; -float lumThreshold02 = 0.7; -float lumThreshold03 = 0.5; -float lumThreshold04 = 0.3; - -void main() -{ - vec3 tc = vec3(1.0, 1.0, 1.0); - float lum = length(texture(texture0, fragTexCoord).rgb); - - if (lum < lumThreshold01) - { - if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - if (lum < lumThreshold02) - { - if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - if (lum < lumThreshold03) - { - if (mod(gl_FragCoord.x + gl_FragCoord.y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - if (lum < lumThreshold04) - { - if (mod(gl_FragCoord.x - gl_FragCoord.y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); - } - - finalColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/cross_stitching.fs b/ExampleApplication/Examples/resources/shaders/glsl330/cross_stitching.fs deleted file mode 100644 index 9cdd36c..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/cross_stitching.fs +++ /dev/null @@ -1,59 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800.0; -const float renderHeight = 450.0; - -float stitchingSize = 6.0; - -uniform int invert = 0; - -vec4 PostFX(sampler2D tex, vec2 uv) -{ - vec4 c = vec4(0.0); - float size = stitchingSize; - vec2 cPos = uv * vec2(renderWidth, renderHeight); - vec2 tlPos = floor(cPos / vec2(size, size)); - tlPos *= size; - - int remX = int(mod(cPos.x, size)); - int remY = int(mod(cPos.y, size)); - - if (remX == 0 && remY == 0) tlPos = cPos; - - vec2 blPos = tlPos; - blPos.y += (size - 1.0); - - if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y))))) - { - if (invert == 1) c = vec4(0.2, 0.15, 0.05, 1.0); - else c = texture(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; - } - else - { - if (invert == 1) c = texture(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; - else c = vec4(0.0, 0.0, 0.0, 1.0); - } - - return c; -} - -void main() -{ - vec3 tc = PostFX(texture0, fragTexCoord).rgb; - - finalColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/depth.fs b/ExampleApplication/Examples/resources/shaders/glsl330/depth.fs deleted file mode 100644 index 2422f39..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/depth.fs +++ /dev/null @@ -1,27 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; // Depth texture -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -void main() -{ - float zNear = 0.01; // camera z near - float zFar = 10.0; // camera z far - float z = texture(texture0, fragTexCoord).x; - - // Linearize depth value - float depth = (2.0*zNear)/(zFar + zNear - z*(zFar - zNear)); - - // Calculate final fragment color - finalColor = vec4(depth, depth, depth, 1.0f); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/distortion.fs b/ExampleApplication/Examples/resources/shaders/glsl330/distortion.fs deleted file mode 100644 index cb4be8f..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/distortion.fs +++ /dev/null @@ -1,56 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; - -// Input uniform values -uniform sampler2D texture0; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Default parameters for Oculus Rift DK2 device -const vec2 LeftLensCenter = vec2(0.2863248, 0.5); -const vec2 RightLensCenter = vec2(0.7136753, 0.5); -const vec2 LeftScreenCenter = vec2(0.25, 0.5); -const vec2 RightScreenCenter = vec2(0.75, 0.5); -const vec2 Scale = vec2(0.25, 0.45); -const vec2 ScaleIn = vec2(4.0, 2.5); -const vec4 HmdWarpParam = vec4(1.0, 0.22, 0.24, 0.0); -const vec4 ChromaAbParam = vec4(0.996, -0.004, 1.014, 0.0); - -void main() -{ - // The following two variables need to be set per eye - vec2 LensCenter = fragTexCoord.x < 0.5 ? LeftLensCenter : RightLensCenter; - vec2 ScreenCenter = fragTexCoord.x < 0.5 ? LeftScreenCenter : RightScreenCenter; - - // Scales input texture coordinates for distortion: vec2 HmdWarp(vec2 fragTexCoord, vec2 LensCenter) - vec2 theta = (fragTexCoord - LensCenter)*ScaleIn; // Scales to [-1, 1] - float rSq = theta.x*theta.x + theta.y*theta.y; - vec2 theta1 = theta*(HmdWarpParam.x + HmdWarpParam.y*rSq + HmdWarpParam.z*rSq*rSq + HmdWarpParam.w*rSq*rSq*rSq); - //vec2 tc = LensCenter + Scale*theta1; - - // Detect whether blue texture coordinates are out of range since these will scaled out the furthest - vec2 thetaBlue = theta1*(ChromaAbParam.z + ChromaAbParam.w*rSq); - vec2 tcBlue = LensCenter + Scale*thetaBlue; - - if (any(bvec2(clamp(tcBlue, ScreenCenter - vec2(0.25, 0.5), ScreenCenter + vec2(0.25, 0.5)) - tcBlue))) finalColor = vec4(0.0, 0.0, 0.0, 1.0); - else - { - // Do blue texture lookup - float blue = texture(texture0, tcBlue).b; - - // Do green lookup (no scaling) - vec2 tcGreen = LensCenter + Scale*theta1; - float green = texture(texture0, tcGreen).g; - - // Do red scale and lookup - vec2 thetaRed = theta1*(ChromaAbParam.x + ChromaAbParam.y*rSq); - vec2 tcRed = LensCenter + Scale*thetaRed; - float red = texture(texture0, tcRed).r; - - finalColor = vec4(red, green, blue, 1.0); - } -} - diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/dream_vision.fs b/ExampleApplication/Examples/resources/shaders/glsl330/dream_vision.fs deleted file mode 100644 index 0311586..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/dream_vision.fs +++ /dev/null @@ -1,34 +0,0 @@ -#version 330 - -in vec2 fragTexCoord; - -out vec4 fragColor; - -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -void main() -{ - vec4 color = texture(texture0, fragTexCoord); - - color += texture(texture0, fragTexCoord + 0.001); - color += texture(texture0, fragTexCoord + 0.003); - color += texture(texture0, fragTexCoord + 0.005); - color += texture(texture0, fragTexCoord + 0.007); - color += texture(texture0, fragTexCoord + 0.009); - color += texture(texture0, fragTexCoord + 0.011); - - color += texture(texture0, fragTexCoord - 0.001); - color += texture(texture0, fragTexCoord - 0.003); - color += texture(texture0, fragTexCoord - 0.005); - color += texture(texture0, fragTexCoord - 0.007); - color += texture(texture0, fragTexCoord - 0.009); - color += texture(texture0, fragTexCoord - 0.011); - - color.rgb = vec3((color.r + color.g + color.b)/3.0); - color = color/9.5; - - fragColor = color; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/fisheye.fs b/ExampleApplication/Examples/resources/shaders/glsl330/fisheye.fs deleted file mode 100644 index e85d7c9..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/fisheye.fs +++ /dev/null @@ -1,40 +0,0 @@ -#version 330 - -in vec2 fragTexCoord; - -out vec4 fragColor; - -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -const float PI = 3.1415926535; - -void main() -{ - float aperture = 178.0; - float apertureHalf = 0.5 * aperture * (PI / 180.0); - float maxFactor = sin(apertureHalf); - - vec2 uv = vec2(0); - vec2 xy = 2.0 * fragTexCoord.xy - 1.0; - float d = length(xy); - - if (d < (2.0 - maxFactor)) - { - d = length(xy * maxFactor); - float z = sqrt(1.0 - d * d); - float r = atan(d, z) / PI; - float phi = atan(xy.y, xy.x); - - uv.x = r * cos(phi) + 0.5; - uv.y = r * sin(phi) + 0.5; - } - else - { - uv = fragTexCoord.xy; - } - - fragColor = texture(texture0, uv); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/grayscale.fs b/ExampleApplication/Examples/resources/shaders/glsl330/grayscale.fs deleted file mode 100644 index 5b3e11b..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/grayscale.fs +++ /dev/null @@ -1,26 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Texel color fetching from texture sampler - vec4 texelColor = texture(texture0, fragTexCoord)*colDiffuse*fragColor; - - // Convert texel color to grayscale using NTSC conversion weights - float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114)); - - // Calculate final fragment color - finalColor = vec4(gray, gray, gray, texelColor.a); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/overdraw.fs b/ExampleApplication/Examples/resources/shaders/glsl330/overdraw.fs deleted file mode 100644 index 435217c..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/overdraw.fs +++ /dev/null @@ -1,26 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -void main() -{ - // To show overdraw, we just render all the fragments - // with a solid color and some transparency - - // NOTE: This is not a postpro render, - // it will only render all screen texture in a plain color - - finalColor = vec4(1.0, 0.0, 0.0, 0.2); -} - diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/pixelizer.fs b/ExampleApplication/Examples/resources/shaders/glsl330/pixelizer.fs deleted file mode 100644 index cf8aec4..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/pixelizer.fs +++ /dev/null @@ -1,33 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800; -const float renderHeight = 450; - -uniform float pixelWidth = 5.0; -uniform float pixelHeight = 5.0; - -void main() -{ - float dx = pixelWidth*(1.0/renderWidth); - float dy = pixelHeight*(1.0/renderHeight); - - vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy)); - - vec3 tc = texture(texture0, coord).rgb; - - finalColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/posterization.fs b/ExampleApplication/Examples/resources/shaders/glsl330/posterization.fs deleted file mode 100644 index be2b5dd..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/posterization.fs +++ /dev/null @@ -1,31 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -float gamma = 0.6; -float numColors = 8.0; - -void main() -{ - // Texel color fetching from texture sampler - vec3 texelColor = texture(texture0, fragTexCoord.xy).rgb; - - texelColor = pow(texelColor, vec3(gamma, gamma, gamma)); - texelColor = texelColor*numColors; - texelColor = floor(texelColor); - texelColor = texelColor/numColors; - texelColor = pow(texelColor, vec3(1.0/gamma)); - - finalColor = vec4(texelColor, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/predator.fs b/ExampleApplication/Examples/resources/shaders/glsl330/predator.fs deleted file mode 100644 index 6a55c76..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/predator.fs +++ /dev/null @@ -1,32 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Texel color fetching from texture sampler - vec3 texelColor = texture(texture0, fragTexCoord).rgb; - vec3 colors[3]; - colors[0] = vec3(0.0, 0.0, 1.0); - colors[1] = vec3(1.0, 1.0, 0.0); - colors[2] = vec3(1.0, 0.0, 0.0); - - float lum = (texelColor.r + texelColor.g + texelColor.b)/3.0; - - int ix = (lum < 0.5)? 0:1; - - vec3 tc = mix(colors[ix], colors[ix + 1], (lum - float(ix)*0.5)/0.5); - - finalColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/scanlines.fs b/ExampleApplication/Examples/resources/shaders/glsl330/scanlines.fs deleted file mode 100644 index 22dc9cd..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/scanlines.fs +++ /dev/null @@ -1,49 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800; -const float renderHeight = 450; -float offset = 0.0; - -uniform float time; - -void main() -{ - float frequency = renderHeight/3.0; -/* - // Scanlines method 1 - float tval = 0; //time - vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval)); - - vec4 color = texture(texture0, fragTexCoord); - - color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0); - color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y); - color *= vec4(0.8, 1.0, 0.7, 1); - color *= 0.9 + 0.1*sin(10.0*tval + uv.y*1000.0); - color *= 0.97 + 0.03*sin(110.0*tval); - - fragColor = color; -*/ - // Scanlines method 2 - float globalPos = (fragTexCoord.y + offset) * frequency; - float wavePos = cos((fract(globalPos) - 0.5)*3.14); - - // Texel color fetching from texture sampler - vec4 texelColor = texture(texture0, fragTexCoord); - - finalColor = mix(vec4(0.0, 0.3, 0.0, 0.0), texelColor, wavePos); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/sobel.fs b/ExampleApplication/Examples/resources/shaders/glsl330/sobel.fs deleted file mode 100644 index a1430cd..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/sobel.fs +++ /dev/null @@ -1,41 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables -uniform vec2 resolution = vec2(800, 450); - -void main() -{ - float x = 1.0/resolution.x; - float y = 1.0/resolution.y; - - vec4 horizEdge = vec4(0.0); - horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; - horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0; - horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; - horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; - horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0; - horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; - - vec4 vertEdge = vec4(0.0); - vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; - vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0; - vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; - vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; - vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0; - vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; - - vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb)); - - finalColor = vec4(edge, texture2D(texture0, fragTexCoord).a); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/glsl330/swirl.fs b/ExampleApplication/Examples/resources/shaders/glsl330/swirl.fs deleted file mode 100644 index 4741e59..0000000 --- a/ExampleApplication/Examples/resources/shaders/glsl330/swirl.fs +++ /dev/null @@ -1,47 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -// NOTE: Render size values should be passed from code -const float renderWidth = 800; -const float renderHeight = 450; - -float radius = 250.0; -float angle = 0.8; - -uniform vec2 center = vec2(200.0, 200.0); - -void main() -{ - vec2 texSize = vec2(renderWidth, renderHeight); - vec2 tc = fragTexCoord*texSize; - tc -= center; - - float dist = length(tc); - - if (dist < radius) - { - float percent = (radius - dist)/radius; - float theta = percent*percent*angle*8.0; - float s = sin(theta); - float c = cos(theta); - - tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c))); - } - - tc += center; - vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;; - - finalColor = vec4(color.rgb, 1.0);; -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/irradiance.fs b/ExampleApplication/Examples/resources/shaders/irradiance.fs deleted file mode 100644 index 8711367..0000000 --- a/ExampleApplication/Examples/resources/shaders/irradiance.fs +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************************* -* -* rPBR [shader] - Irradiance cubemap fragment shader -* -* Copyright (c) 2017 Victor Fisac -* -**********************************************************************************************/ - -#version 330 - -// Input vertex attributes (from vertex shader) -in vec3 fragPos; - -// Input uniform values -uniform samplerCube environmentMap; - -// Constant values -const float PI = 3.14159265359f; - -// Output fragment color -out vec4 finalColor; - -void main() -{ - // The sample direction equals the hemisphere's orientation - vec3 normal = normalize(fragPos); - - vec3 irradiance = vec3(0.0); - - vec3 up = vec3(0.0, 1.0, 0.0); - vec3 right = cross(up, normal); - up = cross(normal, right); - - float sampleDelta = 0.025f; - float nrSamples = 0.0f; - - for (float phi = 0.0; phi < 2.0*PI; phi += sampleDelta) - { - for (float theta = 0.0; theta < 0.5*PI; theta += sampleDelta) - { - // Spherical to cartesian (in tangent space) - vec3 tangentSample = vec3(sin(theta)*cos(phi), sin(theta)*sin(phi), cos(theta)); - - // tangent space to world - vec3 sampleVec = tangentSample.x*right + tangentSample.y*up + tangentSample.z*normal; - - // Fetch color from environment cubemap - irradiance += texture(environmentMap, sampleVec).rgb*cos(theta)*sin(theta); - nrSamples++; - } - } - - // Calculate irradiance average value from samples - irradiance = PI*irradiance*(1.0/float(nrSamples)); - - // Calculate final fragment color - finalColor = vec4(irradiance, 1.0); -} diff --git a/ExampleApplication/Examples/resources/shaders/pbr.fs b/ExampleApplication/Examples/resources/shaders/pbr.fs deleted file mode 100644 index 38d56c5..0000000 --- a/ExampleApplication/Examples/resources/shaders/pbr.fs +++ /dev/null @@ -1,298 +0,0 @@ -/******************************************************************************************* -* -* rPBR [shader] - Physically based rendering fragment shader -* -* Copyright (c) 2017 Victor Fisac -* -**********************************************************************************************/ - -#version 330 - -#define MAX_REFLECTION_LOD 4.0 -#define MAX_DEPTH_LAYER 20 -#define MIN_DEPTH_LAYER 10 - -#define MAX_LIGHTS 4 -#define LIGHT_DIRECTIONAL 0 -#define LIGHT_POINT 1 - -struct MaterialProperty { - vec3 color; - int useSampler; - sampler2D sampler; -}; - -struct Light { - int enabled; - int type; - vec3 position; - vec3 target; - vec4 color; -}; - -// Input vertex attributes (from vertex shader) -in vec3 fragPosition; -in vec2 fragTexCoord; -in vec3 fragNormal; -in vec3 fragTangent; -in vec3 fragBinormal; - -// Input material values -uniform MaterialProperty albedo; -uniform MaterialProperty normals; -uniform MaterialProperty metalness; -uniform MaterialProperty roughness; -uniform MaterialProperty occlusion; -uniform MaterialProperty emission; -uniform MaterialProperty height; - -// Input uniform values -uniform samplerCube irradianceMap; -uniform samplerCube prefilterMap; -uniform sampler2D brdfLUT; - -// Input lighting values -uniform Light lights[MAX_LIGHTS]; - -// Other uniform values -uniform int renderMode; -uniform vec3 viewPos; -vec2 texCoord; - -// Constant values -const float PI = 3.14159265359; - -// Output fragment color -out vec4 finalColor; - -vec3 ComputeMaterialProperty(MaterialProperty property); -float DistributionGGX(vec3 N, vec3 H, float roughness); -float GeometrySchlickGGX(float NdotV, float roughness); -float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness); -vec3 fresnelSchlick(float cosTheta, vec3 F0); -vec3 fresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness); -vec2 ParallaxMapping(vec2 texCoords, vec3 viewDir); - -vec3 ComputeMaterialProperty(MaterialProperty property) -{ - vec3 result = vec3(0.0, 0.0, 0.0); - - if (property.useSampler == 1) result = texture(property.sampler, texCoord).rgb; - else result = property.color; - - return result; -} - -float DistributionGGX(vec3 N, vec3 H, float roughness) -{ - float a = roughness*roughness; - float a2 = a*a; - float NdotH = max(dot(N, H), 0.0); - float NdotH2 = NdotH*NdotH; - - float nom = a2; - float denom = (NdotH2*(a2 - 1.0) + 1.0); - denom = PI*denom*denom; - - return nom/denom; -} - -float GeometrySchlickGGX(float NdotV, float roughness) -{ - float r = (roughness + 1.0); - float k = r*r/8.0; - - float nom = NdotV; - float denom = NdotV*(1.0 - k) + k; - - return nom/denom; -} -float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness) -{ - float NdotV = max(dot(N, V), 0.0); - float NdotL = max(dot(N, L), 0.0); - float ggx2 = GeometrySchlickGGX(NdotV, roughness); - float ggx1 = GeometrySchlickGGX(NdotL, roughness); - - return ggx1*ggx2; -} - -vec3 fresnelSchlick(float cosTheta, vec3 F0) -{ - return F0 + (1.0 - F0)*pow(1.0 - cosTheta, 5.0); -} - -vec3 fresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness) -{ - return F0 + (max(vec3(1.0 - roughness), F0) - F0)*pow(1.0 - cosTheta, 5.0); -} - -vec2 ParallaxMapping(vec2 texCoords, vec3 viewDir) -{ - // Calculate the number of depth layers and calculate the size of each layer - float numLayers = mix(MAX_DEPTH_LAYER, MIN_DEPTH_LAYER, abs(dot(vec3(0.0, 0.0, 1.0), viewDir))); - float layerDepth = 1.0/numLayers; - - // Calculate depth of current layer - float currentLayerDepth = 0.0; - - // Calculate the amount to shift the texture coordinates per layer (from vector P) - // Note: height amount is stored in height material attribute color R channel (sampler use is independent) - vec2 P = viewDir.xy*height.color.r; - vec2 deltaTexCoords = P/numLayers; - - // Store initial texture coordinates and depth values - vec2 currentTexCoords = texCoords; - float currentDepthMapValue = texture(height.sampler, currentTexCoords).r; - - while (currentLayerDepth < currentDepthMapValue) - { - // Shift texture coordinates along direction of P - currentTexCoords -= deltaTexCoords; - - // Get depth map value at current texture coordinates - currentDepthMapValue = texture(height.sampler, currentTexCoords).r; - - // Get depth of next layer - currentLayerDepth += layerDepth; - } - - // Get texture coordinates before collision (reverse operations) - vec2 prevTexCoords = currentTexCoords + deltaTexCoords; - - // Get depth after and before collision for linear interpolation - float afterDepth = currentDepthMapValue - currentLayerDepth; - float beforeDepth = texture(height.sampler, prevTexCoords).r - currentLayerDepth + layerDepth; - - // Interpolation of texture coordinates - float weight = afterDepth/(afterDepth - beforeDepth); - vec2 finalTexCoords = prevTexCoords*weight + currentTexCoords*(1.0 - weight); - - return finalTexCoords; -} - -void main() -{ - // Calculate TBN and RM matrices - mat3 TBN = transpose(mat3(fragTangent, fragBinormal, fragNormal)); - - // Calculate lighting required attributes - vec3 normal = normalize(fragNormal); - vec3 view = normalize(viewPos - fragPosition); - vec3 refl = reflect(-view, normal); - - // Check if parallax mapping is enabled and calculate texture coordinates to use based on height map - // NOTE: remember that 'texCoord' variable must be assigned before calling any ComputeMaterialProperty() function - if (height.useSampler == 1) texCoord = ParallaxMapping(fragTexCoord, view); - else texCoord = fragTexCoord; // Use default texture coordinates - - // Fetch material values from texture sampler or color attributes - vec3 color = ComputeMaterialProperty(albedo); - vec3 metal = ComputeMaterialProperty(metalness); - vec3 rough = ComputeMaterialProperty(roughness); - vec3 emiss = ComputeMaterialProperty(emission); - vec3 ao = ComputeMaterialProperty(occlusion); - - // Check if normal mapping is enabled - if (normals.useSampler == 1) - { - // Fetch normal map color and transform lighting values to tangent space - normal = ComputeMaterialProperty(normals); - normal = normalize(normal*2.0 - 1.0); - normal = normalize(normal*TBN); - - // Convert tangent space normal to world space due to cubemap reflection calculations - refl = normalize(reflect(-view, normal)); - } - - // Calculate reflectance at normal incidence - vec3 F0 = vec3(0.04); - F0 = mix(F0, color, metal.r); - - // Calculate lighting for all lights - vec3 Lo = vec3(0.0); - vec3 lightDot = vec3(0.0); - - for (int i = 0; i < MAX_LIGHTS; i++) - { - if (lights[i].enabled == 1) - { - // Calculate per-light radiance - vec3 light = vec3(0.0); - vec3 radiance = lights[i].color.rgb; - if (lights[i].type == LIGHT_DIRECTIONAL) light = -normalize(lights[i].target - lights[i].position); - else if (lights[i].type == LIGHT_POINT) - { - light = normalize(lights[i].position - fragPosition); - float distance = length(lights[i].position - fragPosition); - float attenuation = 1.0/(distance*distance); - radiance *= attenuation; - } - - // Cook-torrance BRDF - vec3 high = normalize(view + light); - float NDF = DistributionGGX(normal, high, rough.r); - float G = GeometrySmith(normal, view, light, rough.r); - vec3 F = fresnelSchlick(max(dot(high, view), 0.0), F0); - vec3 nominator = NDF*G*F; - float denominator = 4*max(dot(normal, view), 0.0)*max(dot(normal, light), 0.0) + 0.001; - vec3 brdf = nominator/denominator; - - // Store to kS the fresnel value and calculate energy conservation - vec3 kS = F; - vec3 kD = vec3(1.0) - kS; - - // Multiply kD by the inverse metalness such that only non-metals have diffuse lighting - kD *= 1.0 - metal.r; - - // Scale light by dot product between normal and light direction - float NdotL = max(dot(normal, light), 0.0); - - // Add to outgoing radiance Lo - // Note: BRDF is already multiplied by the Fresnel so it doesn't need to be multiplied again - Lo += (kD*color/PI + brdf)*radiance*NdotL*lights[i].color.a; - lightDot += radiance*NdotL + brdf*lights[i].color.a; - } - } - - // Calculate ambient lighting using IBL - vec3 F = fresnelSchlickRoughness(max(dot(normal, view), 0.0), F0, rough.r); - vec3 kS = F; - vec3 kD = 1.0 - kS; - kD *= 1.0 - metal.r; - - // Calculate indirect diffuse - vec3 irradiance = texture(irradianceMap, fragNormal).rgb; - vec3 diffuse = color*irradiance; - - // Sample both the prefilter map and the BRDF lut and combine them together as per the Split-Sum approximation - vec3 prefilterColor = textureLod(prefilterMap, refl, rough.r*MAX_REFLECTION_LOD).rgb; - vec2 brdf = texture(brdfLUT, vec2(max(dot(normal, view), 0.0), rough.r)).rg; - vec3 reflection = prefilterColor*(F*brdf.x + brdf.y); - - // Calculate final lighting - vec3 ambient = (kD*diffuse + reflection)*ao; - - // Calculate fragment color based on render mode - vec3 fragmentColor = ambient + Lo + emiss; // Physically Based Rendering - - if (renderMode == 1) fragmentColor = color; // Albedo - else if (renderMode == 2) fragmentColor = normal; // Normals - else if (renderMode == 3) fragmentColor = metal; // Metalness - else if (renderMode == 4) fragmentColor = rough; // Roughness - else if (renderMode == 5) fragmentColor = ao; // Ambient Occlusion - else if (renderMode == 6) fragmentColor = emiss; // Emission - else if (renderMode == 7) fragmentColor = lightDot; // Lighting - else if (renderMode == 8) fragmentColor = kS; // Fresnel - else if (renderMode == 9) fragmentColor = irradiance; // Irradiance - else if (renderMode == 10) fragmentColor = reflection; // Reflection - - // Apply HDR tonemapping - fragmentColor = fragmentColor/(fragmentColor + vec3(1.0)); - - // Apply gamma correction - fragmentColor = pow(fragmentColor, vec3(1.0/2.2)); - - // Calculate final fragment color - finalColor = vec4(fragmentColor, 1.0); -} diff --git a/ExampleApplication/Examples/resources/shaders/pbr.vs b/ExampleApplication/Examples/resources/shaders/pbr.vs deleted file mode 100644 index 8bd3faa..0000000 --- a/ExampleApplication/Examples/resources/shaders/pbr.vs +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************************* -* -* rPBR [shader] - Physically based rendering vertex shader -* -* Copyright (c) 2017 Victor Fisac -* -**********************************************************************************************/ - -#version 330 - -// Input vertex attributes -in vec3 vertexPosition; -in vec2 vertexTexCoord; -in vec3 vertexNormal; -in vec4 vertexTangent; - -// Input uniform values -uniform mat4 mvp; -uniform mat4 matModel; - -// Output vertex attributes (to fragment shader) -out vec3 fragPosition; -out vec2 fragTexCoord; -out vec3 fragNormal; -out vec3 fragTangent; -out vec3 fragBinormal; - -void main() -{ - // Calculate binormal from vertex normal and tangent - vec3 vertexBinormal = cross(vertexNormal, vec3(vertexTangent)); - - // Calculate fragment normal based on normal transformations - mat3 normalMatrix = transpose(inverse(mat3(matModel))); - - // Calculate fragment position based on model transformations - fragPosition = vec3(matModel*vec4(vertexPosition, 1.0f)); - - // Send vertex attributes to fragment shader - fragTexCoord = vertexTexCoord; - fragNormal = normalize(normalMatrix*vertexNormal); - fragTangent = normalize(normalMatrix*vec3(vertexTangent)); - fragTangent = normalize(fragTangent - dot(fragTangent, fragNormal)*fragNormal); - fragBinormal = normalize(normalMatrix*vertexBinormal); - fragBinormal = cross(fragNormal, fragTangent); - - // Calculate final vertex position - gl_Position = mvp*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/ExampleApplication/Examples/resources/shaders/prefilter.fs b/ExampleApplication/Examples/resources/shaders/prefilter.fs deleted file mode 100644 index f5cf64b..0000000 --- a/ExampleApplication/Examples/resources/shaders/prefilter.fs +++ /dev/null @@ -1,120 +0,0 @@ -/******************************************************************************************* -* -* rPBR [shader] - Prefiltered environment for reflections fragment shader -* -* Copyright (c) 2017 Victor Fisac -* -**********************************************************************************************/ - -#version 330 -#define MAX_SAMPLES 1024u -#define CUBEMAP_RESOLUTION 1024.0 - -// Input vertex attributes (from vertex shader) -in vec3 fragPos; - -// Input uniform values -uniform samplerCube environmentMap; -uniform float roughness; - -// Constant values -const float PI = 3.14159265359f; - -// Output fragment color -out vec4 finalColor; - -float DistributionGGX(vec3 N, vec3 H, float roughness); -float RadicalInverse_VdC(uint bits); -vec2 Hammersley(uint i, uint N); -vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness); - -float DistributionGGX(vec3 N, vec3 H, float roughness) -{ - float a = roughness*roughness; - float a2 = a*a; - float NdotH = max(dot(N, H), 0.0); - float NdotH2 = NdotH*NdotH; - - float nom = a2; - float denom = (NdotH2*(a2 - 1.0) + 1.0); - denom = PI*denom*denom; - - return nom/denom; -} - -float RadicalInverse_VdC(uint bits) -{ - bits = (bits << 16u) | (bits >> 16u); - bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); - bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); - bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); - bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); - return float(bits) * 2.3283064365386963e-10; // / 0x100000000 -} - -vec2 Hammersley(uint i, uint N) -{ - return vec2(float(i)/float(N), RadicalInverse_VdC(i)); -} - -vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness) -{ - float a = roughness*roughness; - float phi = 2.0 * PI * Xi.x; - float cosTheta = sqrt((1.0 - Xi.y)/(1.0 + (a*a - 1.0)*Xi.y)); - float sinTheta = sqrt(1.0 - cosTheta*cosTheta); - - // Transform from spherical coordinates to cartesian coordinates (halfway vector) - vec3 H = vec3(cos(phi)*sinTheta, sin(phi)*sinTheta, cosTheta); - - // Transform from tangent space H vector to world space sample vector - vec3 up = ((abs(N.z) < 0.999) ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0)); - vec3 tangent = normalize(cross(up, N)); - vec3 bitangent = cross(N, tangent); - vec3 sampleVec = tangent*H.x + bitangent*H.y + N*H.z; - - return normalize(sampleVec); -} - -void main() -{ - // Make the simplyfying assumption that V equals R equals the normal - vec3 N = normalize(fragPos); - vec3 R = N; - vec3 V = R; - - vec3 prefilteredColor = vec3(0.0); - float totalWeight = 0.0; - - for (uint i = 0u; i < MAX_SAMPLES; i++) - { - // Generate a sample vector that's biased towards the preferred alignment direction (importance sampling) - vec2 Xi = Hammersley(i, MAX_SAMPLES); - vec3 H = ImportanceSampleGGX(Xi, N, roughness); - vec3 L = normalize(2.0*dot(V, H)*H - V); - - float NdotL = max(dot(N, L), 0.0); - if(NdotL > 0.0) - { - // Sample from the environment's mip level based on roughness/pdf - float D = DistributionGGX(N, H, roughness); - float NdotH = max(dot(N, H), 0.0); - float HdotV = max(dot(H, V), 0.0); - float pdf = D*NdotH/(4.0*HdotV) + 0.0001; - - float resolution = CUBEMAP_RESOLUTION; - float saTexel = 4.0*PI/(6.0*resolution*resolution); - float saSample = 1.0/(float(MAX_SAMPLES)*pdf + 0.0001); - float mipLevel = ((roughness == 0.0) ? 0.0 : 0.5*log2(saSample/saTexel)); - - prefilteredColor += textureLod(environmentMap, L, mipLevel).rgb*NdotL; - totalWeight += NdotL; - } - } - - // Calculate prefilter average color - prefilteredColor = prefilteredColor/totalWeight; - - // Calculate final fragment color - finalColor = vec4(prefilteredColor, 1.0); -} diff --git a/ExampleApplication/Examples/resources/shaders/sdf.fs b/ExampleApplication/Examples/resources/shaders/sdf.fs deleted file mode 100644 index 44d33e9..0000000 --- a/ExampleApplication/Examples/resources/shaders/sdf.fs +++ /dev/null @@ -1,26 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables -const float smoothing = 1.0/16.0; - -void main() -{ - // Texel color fetching from texture sampler - // NOTE: Calculate alpha using signed distance field (SDF) - float distance = texture(texture0, fragTexCoord).a; - float alpha = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance); - - // Calculate final fragment color - finalColor = vec4(fragColor.rgb, fragColor.a*alpha); -} diff --git a/ExampleApplication/Examples/resources/shaders/skybox.fs b/ExampleApplication/Examples/resources/shaders/skybox.fs deleted file mode 100644 index 0bd2f32..0000000 --- a/ExampleApplication/Examples/resources/shaders/skybox.fs +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************************* -* -* rPBR [shader] - Background skybox fragment shader -* -* Copyright (c) 2017 Victor Fisac -* -**********************************************************************************************/ - -#version 330 - -// Input vertex attributes (from vertex shader) -in vec3 fragPos; - -// Input uniform values -uniform samplerCube environmentMap; - -// Output fragment color -out vec4 finalColor; - -void main() -{ - // Fetch color from texture map - vec3 color = texture(environmentMap, fragPos).rgb; - - // Apply gamma correction - color = color/(color + vec3(1.0)); - color = pow(color, vec3(1.0/2.2)); - - // Calculate final fragment color - finalColor = vec4(color, 1.0); -} diff --git a/ExampleApplication/Examples/resources/shaders/skybox.vs b/ExampleApplication/Examples/resources/shaders/skybox.vs deleted file mode 100644 index f40d615..0000000 --- a/ExampleApplication/Examples/resources/shaders/skybox.vs +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************************* -* -* rPBR [shader] - Background skybox vertex shader -* -* Copyright (c) 2017 Victor Fisac -* -**********************************************************************************************/ - -#version 330 - -// Input vertex attributes -in vec3 vertexPosition; - -// Input uniform values -uniform mat4 projection; -uniform mat4 view; - -// Output vertex attributes (to fragment shader) -out vec3 fragPos; - -void main() -{ - // Calculate fragment position based on model transformations - fragPos = vertexPosition; - - // Remove translation from the view matrix - mat4 rotView = mat4(mat3(view)); - vec4 clipPos = projection*rotView*vec4(vertexPosition, 1.0); - - // Calculate final vertex position - gl_Position = clipPos.xyww; -} diff --git a/ExampleApplication/Examples/resources/smoke.png b/ExampleApplication/Examples/resources/smoke.png deleted file mode 100644 index 7bad8c6..0000000 Binary files a/ExampleApplication/Examples/resources/smoke.png and /dev/null differ diff --git a/ExampleApplication/Examples/resources/sound.wav b/ExampleApplication/Examples/resources/sound.wav deleted file mode 100644 index b5d01c9..0000000 Binary files a/ExampleApplication/Examples/resources/sound.wav and /dev/null differ diff --git a/ExampleApplication/Examples/resources/spring.wav b/ExampleApplication/Examples/resources/spring.wav deleted file mode 100644 index c7fbf1b..0000000 Binary files a/ExampleApplication/Examples/resources/spring.wav and /dev/null differ diff --git a/ExampleApplication/Examples/resources/tanatana.flac b/ExampleApplication/Examples/resources/tanatana.flac deleted file mode 100644 index dfe735c..0000000 Binary files a/ExampleApplication/Examples/resources/tanatana.flac and /dev/null differ diff --git a/ExampleApplication/Examples/resources/tanatana.ogg b/ExampleApplication/Examples/resources/tanatana.ogg deleted file mode 100644 index 90b1795..0000000 Binary files a/ExampleApplication/Examples/resources/tanatana.ogg and /dev/null differ diff --git a/ExampleApplication/Examples/resources/weird.wav b/ExampleApplication/Examples/resources/weird.wav deleted file mode 100644 index 101029c..0000000 Binary files a/ExampleApplication/Examples/resources/weird.wav and /dev/null differ diff --git a/ExampleApplication/Examples/resources/xbox.png b/ExampleApplication/Examples/resources/xbox.png deleted file mode 100644 index 029c910..0000000 Binary files a/ExampleApplication/Examples/resources/xbox.png and /dev/null differ diff --git a/ExampleApplication/Program.cs b/ExampleApplication/Program.cs index 8c807f3..c458356 100644 --- a/ExampleApplication/Program.cs +++ b/ExampleApplication/Program.cs @@ -3,12 +3,11 @@ using static Raylib.rl; namespace ExampleApplication { - class Program + static class Program { static void Main(string[] args) - { - // LoadApp(); - Examples.shapes_basic_shapes(); + { + Examples.core_basic_window(); // DrawControl.Run(); } } diff --git a/ExampleApplication/Raylib-cs/Raylib.cs b/ExampleApplication/Raylib-cs/Raylib.cs index 605bacf..6588608 100644 --- a/ExampleApplication/Raylib-cs/Raylib.cs +++ b/ExampleApplication/Raylib-cs/Raylib.cs @@ -6,8 +6,7 @@ using System.Runtime.InteropServices; namespace Raylib { #region Raylib# Enums - - [Flags] + public enum LogType { LOG_INFO = 1, @@ -401,6 +400,7 @@ namespace Raylib } // Rectangle type + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Rectangle { public float x; @@ -419,6 +419,7 @@ namespace Raylib // Image type, bpp always RGBA (32bit) // NOTE: Data stored in CPU memory (RAM) + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Image { public IntPtr data; // Image raw data @@ -430,6 +431,7 @@ namespace Raylib // Texture2D type // NOTE: Data stored in GPU memory + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Texture2D { public uint id; // OpenGL texture id @@ -439,10 +441,8 @@ namespace Raylib public int format; // Data format (PixelFormat type) } - // Texture type, same as Texture2D - // typedef Texture2D Texture; - // RenderTexture2D type, for texture rendering + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct RenderTexture2D { public uint id; // OpenGL Framebuffer Object (FBO) id @@ -454,6 +454,7 @@ namespace Raylib // typedef RenderTexture2D RenderTexture; // Font character info + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct CharInfo { public int value; // Character value (Unicode) @@ -477,7 +478,8 @@ namespace Raylib // public static Color Font Font // Font type fallback, defaults to Font // Camera type, defines a camera position/orientation in 3d space - public struct Camera + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] + public struct Camera3D { public Vector3 position; // Camera position public Vector3 target; // Camera target it looks-at @@ -485,12 +487,23 @@ namespace Raylib public float fovy; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic - public int type; // Camera type, defines projection type: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC + public CameraType type; // Camera type, defines projection type: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC + + public Camera3D(Vector3 position, Vector3 target, Vector3 up, float fovy = 90, + CameraType type = CameraType.CAMERA_PERSPECTIVE) + { + this.position = position; + this.target = target; + this.up = up; + this.fovy = fovy; + this.type = type; + } } // public static Color Camera Camera3D // Camera type fallback, defaults to Camera3D // Camera2D type, defines a 2d camera + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Camera2D { public Vector2 offset; // Camera offset (displacement from target) @@ -500,6 +513,7 @@ namespace Raylib } // Bounding box type + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct BoundingBox { public Vector3 min; // Minimum vertex box-corner @@ -508,10 +522,12 @@ namespace Raylib // Vertex data definning a mesh // NOTE: Data stored in CPU memory (and GPU) + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Mesh { public int vertexCount; // Number of vertices stored in arrays public int triangleCount; // Number of triangles stored (indexed or not) + public float[] vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0) public float[] texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1) public float[] texcoords2; // Vertex second texture coordinates (useful for lightmaps) (shader-location = 5) @@ -521,10 +537,11 @@ namespace Raylib public ushort[] indices; // Vertex indices (in case vertex data comes indexed) public uint vaoId; // OpenGL Vertex Array Object id - //public uint vboId[7]; // OpenGL Vertex Buffer Objects id (7 types of vertex data) + public unsafe fixed uint vboId[7]; // OpenGL Vertex Buffer Objects id (7 types of vertex data) } // Shader type (generic) + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public unsafe struct Shader { public uint id; // Shader program id @@ -532,6 +549,7 @@ namespace Raylib } // Material texture map + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct MaterialMap { public Texture2D texture; // Material map texture @@ -540,14 +558,16 @@ namespace Raylib } // Material type (generic) - public class Material + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] + public struct Material { public Shader shader; // Material shader - MaterialMap[] maps = new MaterialMap[rl.MAX_MATERIAL_MAPS]; // Material maps - float[] param; // Material generic parameters (if required) + // public MaterialMap[] maps = new MaterialMap[rl.MAX_MATERIAL_MAPS]; // Material maps + public float[] param; // Material generic parameters (if required) } // Model type + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Model { public Mesh mesh; // Vertex data buffers (RAM and VRAM) @@ -556,6 +576,7 @@ namespace Raylib } // Ray type (useful for raycast) + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Ray { public Vector3 position; // Ray position (origin) @@ -569,6 +590,7 @@ namespace Raylib } // Raycast hit information + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct RayHitInfo { public bool hit; // Did the ray hit something? @@ -578,6 +600,7 @@ namespace Raylib } // Wave type, defines audio wave data + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Wave { public uint sampleCount; // Number of samples @@ -588,6 +611,7 @@ namespace Raylib } // Sound source type + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct Sound { public IntPtr audioBuffer; // Pointer to internal data used by the audio system @@ -596,15 +620,9 @@ namespace Raylib public int format; // Audio format specifier } - // Music type (file streaming from memory) - // NOTE: Anything longer than ~10 seconds should be streamed - // typedef struct MusicData *Music; - //public struct MusicData - //{ - //} - // Audio stream type // NOTE: Useful to create custom audio streams not bound to a specific file + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public class AudioStream { public uint sampleRate; // Frequency (samples per second) @@ -618,6 +636,7 @@ namespace Raylib } // Head-Mounted-Display device parameters + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public class VrDeviceInfo { public int hResolution; // HMD horizontal resolution in pixels @@ -637,19 +656,6 @@ namespace Raylib public static partial class rl { - /// - /// Copy raylib dll to output folder automatically - /// Needed to run bindings - /// - /*public static void LoadApp() - { - var libFolder = (Environment.Is64BitProcess ? "x64" : "x86"); - var dllPath = AppDomain.CurrentDomain.BaseDirectory + "../../../raylib-cs\\" + libFolder + "\\raylib.dll"; - var binPath = AppDomain.CurrentDomain.BaseDirectory + "raylib.dll"; - if (File.Exists(dllPath)) - File.Copy(dllPath, binPath, true); - }*/ - #region Raylib# Variables /* Used by DllImport to load the native library. */ @@ -692,479 +698,479 @@ namespace Raylib #region Raylib.h // Window-related functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void InitWindow(int width, int height, string title); // Initialize Window and Graphics Context (OpenGL) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void CloseWindow(); // Close window and unload OpenGL context - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool WindowShouldClose(); // Check if KEY_ESCAPE pressed or Close icon pressed - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsWindowMinimized(); // Check if window has been minimized (or lost focus) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ToggleFullscreen(); // Toggle fullscreen mode (only PLATFORM_DESKTOP) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetWindowTitle(string title); // Set title for window (only PLATFORM_DESKTOP) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetScreenWidth(); // Get current screen width - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetScreenHeight(); // Get current screen height // Cursor-related functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ShowCursor(); // Shows cursor - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void HideCursor(); // Hides cursor - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsCursorHidden(); // Check if cursor is not visible - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void EnableCursor(); // Enables cursor (unlock cursor) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DisableCursor(); // Disables cursor (lock cursor) // Drawing-related functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ClearBackground(Color color); // Set background color (framebuffer clear color) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void BeginDrawing(); // Setup canvas (framebuffer) to start drawing - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void EndDrawing(); // End canvas drawing and swap buffers (double buffering) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera (2D) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void End2dMode(); // Ends 2D mode with custom camera - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void Begin3dMode(Camera camera); // Initializes 3D mode with custom camera (3D) + [DllImport(nativeLibName)] + public static extern void Begin3dMode(Camera3D camera3D); // Initializes 3D mode with custom camera (3D) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void End3dMode(); // Ends 3D mode and returns to default 2D orthographic mode - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void EndTextureMode(); // Ends drawing to render texture // Screen-space-related functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Ray - GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position + GetMouseRay(Vector2 mousePosition, Camera3D camera3D); // Returns a ray trace from mouse position - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Vector2 GetWorldToScreen(Vector3 position, - Camera camera); // Returns the screen space position for a 3d world space position + Camera3D camera3D); // Returns the screen space position for a 3d world space position - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) + [DllImport(nativeLibName)] + public static extern Matrix GetCameraMatrix(Camera3D camera3D); // Returns camera transform matrix (view matrix) // Timming-related functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetTargetFPS(int fps); // Set target FPS (maximum) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetFPS(); // Returns current FPS - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float GetFrameTime(); // Returns time in seconds for last frame drawn // Color-related functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetHexValue(Color color); // Returns hexadecimal value for a Color - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float[] ColorToFloat(Color color); // Converts Color to float array and normalizes // Math useful functions (available from raymath.h) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float[] VectorToFloat(Vector3 vec); // Returns Vector3 as float array - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float[] MatrixToFloat(Matrix mat); // Returns Matrix as float array - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Vector3 Vector3Zero(); // Vector with components value 0.0f - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Vector3 Vector3One(); // Vector with components value 1.0f - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Matrix MatrixIdentity(); // Returns identity matrix // Misc. functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ShowLogo(); // Activate raylib logo at startup (can be done with flags) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void TraceLog(int logType, string text, object[] args); // Show trace log messages (INFO, WARNING, ERROR, DEBUG) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void TakeScreenshot(string fileName); // Takes a screenshot of current screen (saved a .png) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) // Files management functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsFileExtension(string fileName, string ext); // Check file extension - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern string GetExtension(string fileName); // Get file extension - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern string GetDirectoryPath(string fileName); // Get directory for a given fileName (with path) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern string GetWorkingDirectory(); // Get current working directory - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool ChangeDirectory(string dir); // Change working directory, returns true if success - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsFileDropped(); // Check if a file has been dropped into window - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern char[][] GetDroppedFiles(int[] count); // Get dropped files names - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ClearDroppedFiles(); // Clear dropped files paths buffer // Persistent storage management - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int StorageLoadValue(int position); // Load integer value from storage file (from defined position) // Input-related functions: keyboard - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsKeyPressed(int key); // Detect if a key has been pressed once - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsKeyDown(int key); // Detect if a key is being pressed - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsKeyReleased(int key); // Detect if a key has been released once - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsKeyUp(int key); // Detect if a key is NOT being pressed - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetKeyPressed(); // Get latest key pressed - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetExitKey(int key); // Set a custom key to exit program (default is ESC) // Input-related functions: gamepads - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsGamepadAvailable(int gamepad); // Detect if a gamepad is available - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsGamepadName(int gamepad, string name); // Check gamepad name (if available) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern string GetGamepadName(int gamepad); // Return gamepad internal name id - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsGamepadButtonPressed(int gamepad, int button); // Detect if a gamepad button has been pressed once - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsGamepadButtonDown(int gamepad, int button); // Detect if a gamepad button is being pressed - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsGamepadButtonReleased(int gamepad, int button); // Detect if a gamepad button has been released once - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsGamepadButtonUp(int gamepad, int button); // Detect if a gamepad button is NOT being pressed - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetGamepadButtonPressed(); // Get the last gamepad button pressed - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetGamepadAxisCount(int gamepad); // Return gamepad axis count for a gamepad - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float GetGamepadAxisMovement(int gamepad, int axis); // Return axis movement value for a gamepad axis // Input-related functions: mouse - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsMouseButtonPressed(int button); // Detect if a mouse button has been pressed once - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsMouseButtonDown(int button); // Detect if a mouse button is being pressed - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsMouseButtonReleased(int button); // Detect if a mouse button has been released once - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsMouseButtonUp(int button); // Detect if a mouse button is NOT being pressed - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetMouseX(); // Returns mouse position X - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetMouseY(); // Returns mouse position Y - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Vector2 GetMousePosition(); // Returns mouse position XY - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetMousePosition(Vector2 position); // Set mouse position XY - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetMouseWheelMove(); // Returns mouse wheel movement Y // Input-related functions: touch - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetTouchX(); // Get touch position X for touch point 0 (relative to screen size) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetTouchY(); // Get touch position Y for touch point 0 (relative to screen size) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Vector2 GetTouchPosition(int index); // Get touch position XY for a touch point index (relative to screen size) // Gestures-related functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetGesturesEnabled(uint gestureFlags); // Enable a set of gestures using flags - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsGestureDetected(int gesture); // Check if a gesture have been detected - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetGestureDetected(); // Get latest detected gesture // Get touch points count - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetTouchPointsCount(); // Get gesture hold time in milliseconds - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float GetGestureHoldDuration(); // Get gesture drag vector - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Vector2 GetGestureDragVector(); // Get gesture drag angle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float GetGestureDragAngle(); // Get gesture pinch delta - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Vector2 GetGesturePinchVector(); // Get gesture pinch angle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float GetGesturePinchAngle(); // Camera-related functions // Set camera mode (multiple camera modes available) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void SetCameraMode(Camera camera, int mode); + [DllImport(nativeLibName)] + public static extern void SetCameraMode(Camera3D camera3D, int mode); // Update camera position for selected mode - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void UpdateCamera(Camera camera); + [DllImport(nativeLibName)] + public static extern void UpdateCamera(Camera3D camera3D); // Set camera pan key to combine with mouse movement (free camera) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetCameraPanControl(int panKey); - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetCameraAltControl(int altKey); // Set camera alt key to combine with mouse movement (free camera) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetCameraSmoothZoomControl(int szKey); // Set camera smooth zoom key to combine with mouse (free camera) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetCameraMoveControls(int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey); // Set camera move controls (1st person and 3rd person cameras) // module: shapes // Basic shapes drawing functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawPixel(int posX, int posY, Color color); // Draw a pixel - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2); // Draw a vertical-gradient-filled rectangle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2); // Draw a horizontal-gradient-filled rectangle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawRectangleT(int posX, int posY, int width, int height, Color color); // Draw rectangle using text character - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawPolyEx(Vector2[] points, int numPoints, Color color); // Draw a closed polygon defined by points - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawPolyExLines(Vector2[] points, int numPoints, Color color); // Draw polygon lines // Basic shapes collision detection functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle @@ -1172,191 +1178,191 @@ namespace Raylib // module: textures // Image/Texture2D data loading/unloading functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image LoadImage(string fileName); // Load an image into CPU memory (RAM) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image LoadImageEx(Color[] pixels, int width, int height); // Load image data from Color array data (RGBA - 32bit) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image LoadImagePro(IntPtr data, int width, int height, int format); // Load image from raw data with parameters - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image LoadImageRaw(string fileName, int width, int height, int format, int headerSize); // Load image data from RAW file - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Texture2D LoadTexture(string fileName); // Load an image as texture into GPU memory - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Texture2D LoadTextureFromImage(Image image); // Load a texture from image data - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern RenderTexture2D LoadRenderTexture(int width, int height); // Load a texture to be used for rendering - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadImage(Image image); // Unload image from CPU memory (RAM) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadTexture(Texture2D texture); // Unload texture from GPU memory - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Color[] GetImageData(Image image); // Get pixel data from image as a Color struct array - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UpdateTexture(Texture2D texture, IntPtr pixels); // Update GPU texture with new data - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SaveImageAs(string fileName, Image image); // Save image to a PNG file // Image manipulation functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageToPOT(Image image, Color fillColor); // Convert image to POT (power-of-two) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageFormat(Image image, int newFormat); // Convert image data to desired format - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageAlphaMask(Image image, Image alphaMask); // Apply alpha mask to image - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageDither(Image image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image ImageCopy(Image image); // Create an image duplicate (useful for transformations) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageCrop( Image image, Rectangle crop); // Crop an image to a defined rectangle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageResize(ref Image image, int newWidth, int newHeight); // Resize and image (bilinear filtering) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageResizeNN(Image image, int newWidth, int newHeight); // Resize and image (Nearest-Neighbor scaling algorithm) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image ImageText(string text, int fontSize, Color color); // Create an image from text (default font) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image ImageTextEx(Font font, string text, int fontSize, int spacing, Color tint); // Create an image from text (custom sprite font) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageDraw(Image dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageDrawText(Image dst, Vector2 position, string text, int fontSize, Color color); // Draw text (default font) within an image (destination) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageDrawTextEx(Image dst, Vector2 position, Font font, string text, int fontSize, int spacing, Color color); // Draw text (custom sprite font) within image - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageFlipVertical(Image image); // Flip image vertically - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageFlipHorizontal(ref Image image); // Flip image horizontally - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageColorTint(Image image, Color color); // Modify image color: tint - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageColorInvert(Image image); // Modify image color: invert - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageColorGrayscale(Image image); // Modify bimage color: grayscale - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageColorContrast(Image image, float contrast); // Modify image color: contrast (-100 to 100) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ImageColorBrightness(Image image, int brightness); // Modify image color: brightness (-255 to 255) // Image generation functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image GenImageGradientV(int width, int height, Color top, Color bottom); // Generate image: vertical gradient - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image GenImageGradientH(int width, int height, Color left, Color right); // Generate image: horizontal gradient - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image GenImagePerlinNoise(int width, int height, float scale); // Generate image: perlin noise - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Image GenImageCellular(int width, int height, int tileSize); // Generate image: cellular algorithm. Bigger tileSize means bigger cells // Texture2D configuration functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void GenTextureMipmaps(Texture2D texture); // Generate GPU mipmaps for a texture - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetTextureFilter(Texture2D texture, int filterMode); // Set texture scaling filter mode - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetTextureWrap(Texture2D texture, int wrapMode); // Set texture wrapping mode // Texture2D drawing functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2 - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawTextureRec(Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, // Draw a part of a texture defined by a rectangle with 'pro' parameters float rotation, Color tint); @@ -1364,237 +1370,237 @@ namespace Raylib // module: text // Font loading/unloading functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Font GetDefaultFont(); // Get the default Font - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Font LoadFont(string fileName); // Load a Font image into GPU memory - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Font LoadFontEx(string fileName, int fontSize, int numChars, int fontChars); // Load a Font from TTF font with parameters - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadFont(Font spriteFont); // Unload Font from GPU memory // Text drawing functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawFPS(int posX, int posY); // Shows current FPS on top-left corner - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawText(string text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawTextEx(Font spriteFont, string text, Vector2 position, int fontSize, int spacing, Color tint); // Draw text using Font and additional parameters // Text misc. functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int MeasureText(string text, int fontSize); // Measure string width for default font - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Vector2 MeasureTextEx(Font spriteFont, string text, int fontSize, int spacing); // Measure string size for Font - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern string FormatText(string text, object[] args); // Formatting of text with variables to 'embed' - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern string SubText(string text, int position, int length); // Get a piece of a text string // module: models // Basic geometric 3D shapes drawing functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color); // Draw cube textured - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawSphere(Vector3 centerPos, float radius, Color color); // Draw sphere - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with extended parameters - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); // Draw a cylinder/cone - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); // Draw a cylinder/cone wires - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawPlane(Vector3 centerPos, Vector2 size, Color color); // Draw a plane XZ - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawRay(Ray ray, Color color); // Draw a ray line - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0)) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawGizmo(Vector3 position); // Draw simple gizmo // Model loading/unloading functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Model LoadModel(string fileName); // Load model from files (mesh and material) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadModel(Model model); // Unload model from memory (RAM and/or VRAM) // Mesh loading/unloading functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Mesh LoadMesh(string fileName); // Load mesh from file - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadMesh(Mesh mesh); // Unload mesh from memory (RAM and/or VRAM) // Mesh generation functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Mesh GenMeshPlane(float width, float length, int resX, int resZ); // Generate plane mesh (with subdivisions) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Mesh GenMeshCube(float width, float height, float length); // Generate cuboid mesh - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Mesh GenMeshSphere(float radius, int rings, int slices); // Generate sphere mesh (standard sphere) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Mesh GenMeshHemiSphere(float radius, int rings, int slices); // Generate half-sphere mesh (no bottom cap) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Mesh GenMeshCylinder(float radius, float height, int slices); // Generate cylinder mesh - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Mesh GenMeshTorus(float radius, float size, int radSeg, int sides); // Generate torus mesh - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Mesh GenMeshKnot(float radius, float size, int radSeg, int sides); // Generate trefoil knot mesh - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Mesh GenMeshHeightmap(Image heightmap, Vector3 size); // Generate heightmap mesh from image data - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize); // Generate cubes-based map mesh from image data // Material loading/unloading functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Material LoadMaterial(string fileName); // Load material from file - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Material LoadMaterialDefault(); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM) // Model drawing functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, + [DllImport(nativeLibName)] + public static extern void DrawBillboard(Camera3D camera3D, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, + [DllImport(nativeLibName)] + public static extern void DrawBillboardRec(Camera3D camera3D, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec // Collision detection functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionBoxes(Vector3 minBBox1, Vector3 maxBBox1, Vector3 minBBox2, Vector3 maxBBox2); // Detect collision between two boxes - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionBoxSphere(Vector3 minBBox, Vector3 maxBBox, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, ref Vector3 collisionPoint); // Detect collision between ray and sphere ex. - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool CheckCollisionRayBox(Ray ray, Vector3 minBBox, Vector3 maxBBox); // Detect collision between ray and box - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern RayHitInfo GetCollisionRayMesh(Ray ray, ref Mesh mesh); // Get collision info between ray and mesh - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight); // Get collision info between ray and ground plane (Y-normal plane) @@ -1602,232 +1608,232 @@ namespace Raylib // module: shaders (rlgl) // Shader loading/unloading functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern string LoadText(string fileName); // Load chars array from text file - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Shader LoadShader(string vsFileName, string fsFileName); // Load a custom shader and bind default locations - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadShader(Shader shader); // Unload a custom shader from memory - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Shader GetDefaultShader(); // Get default shader - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Texture2D GetDefaultTexture(); // Get default texture // Shader access functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern int GetShaderLocation(Shader shader, string uniformName); // Get shader uniform location - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetShaderValue(Shader shader, int uniformLoc, float[] value, int size); // Set shader uniform value (float) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetShaderValuei(Shader shader, int uniformLoc, int[] value, int size); // Set shader uniform value (int) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat); // Set shader uniform value (matrix 4x4) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetMatrixProjection(Matrix proj); // Set a custom projection matrix (replaces internal projection matrix) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetMatrixModelview(Matrix view); // Set a custom modelview matrix (replaces internal modelview matrix) // Shading beegin/end functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void BeginShaderMode(Shader shader); // Begin custom shader drawing - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void EndShaderMode(); // End custom shader drawing (use default shader) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void EndBlendMode(); // End blending mode (reset to default: alpha blending) // VR control functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern VrDeviceInfo GetVrDeviceInfo(int vrDeviceType); // Get VR device information for some standard devices - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void InitVrSimulator(VrDeviceInfo info); // Init VR simulator for selected device parameters - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void CloseVrSimulator(); // Close VR simulator for current device - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsVrSimulatorReady(); // Detect if VR simulator is ready - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void - UpdateVrTracking(Camera camera); // Update VR tracking (position and orientation) and camera + UpdateVrTracking(Camera3D camera3D); // Update VR tracking (position and orientation) and camera - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ToggleVrMode(); // Enable/Disable VR experience - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void BeginVrDrawing(); // Begin VR simulator stereo rendering - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void EndVrDrawing(); // End VR simulator stereo rendering //module: audio // Audio device management functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void InitAudioDevice(); // Initialize audio device and context - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void CloseAudioDevice(); // Close the audio device and context (and music stream) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsAudioDeviceReady(); // Check if audio device is ready - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetMasterVolume(float volume); // Set master volume (listener) // Wave/Sound loading/unloading functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Wave LoadWave(string fileName); // Load wave data from file into RAM - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Wave LoadWaveEx(float[] data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from float array data (32bit) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Sound LoadSound(string fileName); // Load sound to memory - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Sound LoadSoundFromWave(Wave wave); // Load sound to memory from wave data - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UpdateSound(Sound sound, IntPtr data, int numSamples); // Update sound buffer with new data - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadWave(Wave wave); // Unload wave data - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadSound(Sound sound); // Unload sound // Wave/Sound management functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void PlaySound(Sound sound); // Play a sound - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void PauseSound(Sound sound); // Pause a sound - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ResumeSound(Sound sound); // Resume a paused sound - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void StopSound(Sound sound); // Stop playing a sound - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void WaveFormat(Wave wave, int sampleRate, int sampleSize, int channels); // Convert wave data to desired format - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern Wave WaveCopy(Wave wave); // Copy a wave to a new wave - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void WaveCrop(Wave wave, int initSample, int finalSample); // Crop a wave to defined samples range - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float[] GetWaveData(Wave wave); // Get samples data from wave as a floats array // Music management functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern IntPtr LoadMusicStream(string fileName); // Load music stream from file - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UnloadMusicStream(IntPtr music); // Unload music stream - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void PlayMusicStream(IntPtr music); // Start music playing - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UpdateMusicStream(IntPtr music); // Updates buffers for music streaming - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void StopMusicStream(IntPtr music); // Stop music playing - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void PauseMusicStream(IntPtr music); // Pause music playing - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ResumeMusicStream(IntPtr music); // Resume playing paused music - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsMusicPlaying(IntPtr music); // Check if music is playing - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetMusicVolume(IntPtr music, float volume); // Set volume for music (1.0 is max level) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetMusicPitch(IntPtr music, float pitch); // Set pitch for a music (1.0 is base level) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void SetMusicLoopCount(IntPtr music, float count); // Set music loop count (loop repeats) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float GetMusicTimeLength(IntPtr music); // Get music time length (in seconds) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern float GetMusicTimePlayed(IntPtr music); // Get current music time played (in seconds) // AudioStream management functions - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern AudioStream InitAudioStream(uint sampleRate, uint sampleSize, uint channels); // Init audio stream (to stream raw audio pcm data) - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void UpdateAudioStream(AudioStream stream, IntPtr data, int numSamples); // Update audio stream buffers with data - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void CloseAudioStream(AudioStream stream); // Close audio stream and free memory - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern bool IsAudioBufferProcessed(AudioStream stream); // Check if any audio stream buffers requires refill - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void PlayAudioStream(AudioStream stream); // Play audio stream - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void PauseAudioStream(AudioStream stream); // Pause audio stream - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void ResumeAudioStream(AudioStream stream); // Resume audio stream - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + [DllImport(nativeLibName)] public static extern void StopAudioStream(AudioStream stream); // Stop audio stream #endregion diff --git a/ExampleApplication/Raylib-cs/x64/raylib.dll b/ExampleApplication/Raylib-cs/x64/raylib.dll deleted file mode 100644 index fe44fa8..0000000 Binary files a/ExampleApplication/Raylib-cs/x64/raylib.dll and /dev/null differ diff --git a/ExampleApplication/Raylib-cs/x86/raylib.dll b/ExampleApplication/Raylib-cs/x86/raylib.dll deleted file mode 100644 index 6a9ef2b..0000000 Binary files a/ExampleApplication/Raylib-cs/x86/raylib.dll and /dev/null differ diff --git a/Raylib-cs/App.config b/Generator/App.config similarity index 100% rename from Raylib-cs/App.config rename to Generator/App.config diff --git a/Raylib-cs/Generator.cs b/Generator/Generator.cs similarity index 100% rename from Raylib-cs/Generator.cs rename to Generator/Generator.cs diff --git a/Raylib-cs/Raylib-cs.csproj b/Generator/Generator.csproj similarity index 100% rename from Raylib-cs/Raylib-cs.csproj rename to Generator/Generator.csproj diff --git a/Raylib-cs/Program.cs b/Generator/Program.cs similarity index 92% rename from Raylib-cs/Program.cs rename to Generator/Program.cs index 267295a..598a56f 100644 --- a/Raylib-cs/Program.cs +++ b/Generator/Program.cs @@ -3,7 +3,7 @@ using CppSharp; namespace Raylibcs { - class Program + static class Program { static void Main(string[] args) { diff --git a/Raylib-cs/Properties/AssemblyInfo.cs b/Generator/Properties/AssemblyInfo.cs similarity index 100% rename from Raylib-cs/Properties/AssemblyInfo.cs rename to Generator/Properties/AssemblyInfo.cs diff --git a/Raylib-cs/packages.config b/Generator/packages.config similarity index 100% rename from Raylib-cs/packages.config rename to Generator/packages.config diff --git a/Raylib-cs/Raylib-cs.sln b/Raylib-cs.sln similarity index 91% rename from Raylib-cs/Raylib-cs.sln rename to Raylib-cs.sln index 83b1b9c..ff687c0 100644 --- a/Raylib-cs/Raylib-cs.sln +++ b/Raylib-cs.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27703.2035 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleApplication", "..\ExampleApplication\ExampleApplication.csproj", "{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleApplication", "ExampleApplication\ExampleApplication.csproj", "{A2B3BBC8-3D48-46DD-B3CF-263F554E4474}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raylib-cs", "Raylib-cs.csproj", "{3B25D9D6-17A6-4A32-B9D1-C637002BD554}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator", "Generator\Generator.csproj", "{3B25D9D6-17A6-4A32-B9D1-C637002BD554}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution